@gallop.software/studio 2.3.157 → 2.3.158

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.
@@ -1,12 +1,12 @@
1
- function lm(i,c){for(var f=0;f<c.length;f++){const d=c[f];if(typeof d!="string"&&!Array.isArray(d)){for(const h in d)if(h!=="default"&&!(h in i)){const p=Object.getOwnPropertyDescriptor(d,h);p&&Object.defineProperty(i,h,p.get?p:{enumerable:!0,get:()=>d[h]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))d(h);new MutationObserver(h=>{for(const p of h)if(p.type==="childList")for(const C of p.addedNodes)C.tagName==="LINK"&&C.rel==="modulepreload"&&d(C)}).observe(document,{childList:!0,subtree:!0});function f(h){const p={};return h.integrity&&(p.integrity=h.integrity),h.referrerPolicy&&(p.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?p.credentials="include":h.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function d(h){if(h.ep)return;h.ep=!0;const p=f(h);fetch(h.href,p)}})();function om(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Wc={exports:{}},si={};var ap;function im(){if(ap)return si;ap=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function f(d,h,p){var C=null;if(p!==void 0&&(C=""+p),h.key!==void 0&&(C=""+h.key),"key"in h){p={};for(var D in h)D!=="key"&&(p[D]=h[D])}else p=h;return h=p.ref,{$$typeof:i,type:d,key:C,ref:h!==void 0?h:null,props:p}}return si.Fragment=c,si.jsx=f,si.jsxs=f,si}var lp;function rm(){return lp||(lp=1,Wc.exports=im()),Wc.exports}var fi=rm(),Ic={exports:{}},Ve={};var op;function sm(){if(op)return Ve;op=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),C=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),_=Symbol.iterator;function q(S){return S===null||typeof S!="object"?null:(S=_&&S[_]||S["@@iterator"],typeof S=="function"?S:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,oe={};function J(S,O,ne){this.props=S,this.context=O,this.refs=oe,this.updater=ne||H}J.prototype.isReactComponent={},J.prototype.setState=function(S,O){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,O,"setState")},J.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function ce(){}ce.prototype=J.prototype;function Q(S,O,ne){this.props=S,this.context=O,this.refs=oe,this.updater=ne||H}var le=Q.prototype=new ce;le.constructor=Q,G(le,J.prototype),le.isPureReactComponent=!0;var X=Array.isArray;function P(){}var te={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function j(S,O,ne){var re=ne.ref;return{$$typeof:i,type:S,key:O,ref:re!==void 0?re:null,props:ne}}function W(S,O){return j(S.type,O,S.props)}function he(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function me(S){var O={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(ne){return O[ne]})}var ge=/\/+/g;function ie(S,O){return typeof S=="object"&&S!==null&&S.key!=null?me(""+S.key):O.toString(36)}function Oe(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(P,P):(S.status="pending",S.then(function(O){S.status==="pending"&&(S.status="fulfilled",S.value=O)},function(O){S.status==="pending"&&(S.status="rejected",S.reason=O)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function T(S,O,ne,re,we){var ze=typeof S;(ze==="undefined"||ze==="boolean")&&(S=null);var Ge=!1;if(S===null)Ge=!0;else switch(ze){case"bigint":case"string":case"number":Ge=!0;break;case"object":switch(S.$$typeof){case i:case c:Ge=!0;break;case A:return Ge=S._init,T(Ge(S._payload),O,ne,re,we)}}if(Ge)return we=we(S),Ge=re===""?"."+ie(S,0):re,X(we)?(ne="",Ge!=null&&(ne=Ge.replace(ge,"$&/")+"/"),T(we,O,ne,"",function(Pt){return Pt})):we!=null&&(he(we)&&(we=W(we,ne+(we.key==null||S&&S.key===we.key?"":(""+we.key).replace(ge,"$&/")+"/")+Ge)),O.push(we)),1;Ge=0;var xt=re===""?".":re+":";if(X(S))for(var Re=0;Re<S.length;Re++)re=S[Re],ze=xt+ie(re,Re),Ge+=T(re,O,ne,ze,we);else if(Re=q(S),typeof Re=="function")for(S=Re.call(S),Re=0;!(re=S.next()).done;)re=re.value,ze=xt+ie(re,Re++),Ge+=T(re,O,ne,ze,we);else if(ze==="object"){if(typeof S.then=="function")return T(Oe(S),O,ne,re,we);throw O=String(S),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return Ge}function Z(S,O,ne){if(S==null)return S;var re=[],we=0;return T(S,re,"","",function(ze){return O.call(ne,ze,we++)}),re}function ee(S){if(S._status===-1){var O=S._result;O=O(),O.then(function(ne){(S._status===0||S._status===-1)&&(S._status=1,S._result=ne)},function(ne){(S._status===0||S._status===-1)&&(S._status=2,S._result=ne)}),S._status===-1&&(S._status=0,S._result=O)}if(S._status===1)return S._result.default;throw S._result}var Ee=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},qe={map:Z,forEach:function(S,O,ne){Z(S,function(){O.apply(this,arguments)},ne)},count:function(S){var O=0;return Z(S,function(){O++}),O},toArray:function(S){return Z(S,function(O){return O})||[]},only:function(S){if(!he(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return Ve.Activity=z,Ve.Children=qe,Ve.Component=J,Ve.Fragment=f,Ve.Profiler=h,Ve.PureComponent=Q,Ve.StrictMode=d,Ve.Suspense=x,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=te,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(S){return te.H.useMemoCache(S)}},Ve.cache=function(S){return function(){return S.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(S,O,ne){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var re=G({},S.props),we=S.key;if(O!=null)for(ze in O.key!==void 0&&(we=""+O.key),O)!ae.call(O,ze)||ze==="key"||ze==="__self"||ze==="__source"||ze==="ref"&&O.ref===void 0||(re[ze]=O[ze]);var ze=arguments.length-2;if(ze===1)re.children=ne;else if(1<ze){for(var Ge=Array(ze),xt=0;xt<ze;xt++)Ge[xt]=arguments[xt+2];re.children=Ge}return j(S.type,we,re)},Ve.createContext=function(S){return S={$$typeof:C,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:p,_context:S},S},Ve.createElement=function(S,O,ne){var re,we={},ze=null;if(O!=null)for(re in O.key!==void 0&&(ze=""+O.key),O)ae.call(O,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(we[re]=O[re]);var Ge=arguments.length-2;if(Ge===1)we.children=ne;else if(1<Ge){for(var xt=Array(Ge),Re=0;Re<Ge;Re++)xt[Re]=arguments[Re+2];we.children=xt}if(S&&S.defaultProps)for(re in Ge=S.defaultProps,Ge)we[re]===void 0&&(we[re]=Ge[re]);return j(S,ze,we)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(S){return{$$typeof:D,render:S}},Ve.isValidElement=he,Ve.lazy=function(S){return{$$typeof:A,_payload:{_status:-1,_result:S},_init:ee}},Ve.memo=function(S,O){return{$$typeof:y,type:S,compare:O===void 0?null:O}},Ve.startTransition=function(S){var O=te.T,ne={};te.T=ne;try{var re=S(),we=te.S;we!==null&&we(ne,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(P,Ee)}catch(ze){Ee(ze)}finally{O!==null&&ne.types!==null&&(O.types=ne.types),te.T=O}},Ve.unstable_useCacheRefresh=function(){return te.H.useCacheRefresh()},Ve.use=function(S){return te.H.use(S)},Ve.useActionState=function(S,O,ne){return te.H.useActionState(S,O,ne)},Ve.useCallback=function(S,O){return te.H.useCallback(S,O)},Ve.useContext=function(S){return te.H.useContext(S)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(S,O){return te.H.useDeferredValue(S,O)},Ve.useEffect=function(S,O){return te.H.useEffect(S,O)},Ve.useEffectEvent=function(S){return te.H.useEffectEvent(S)},Ve.useId=function(){return te.H.useId()},Ve.useImperativeHandle=function(S,O,ne){return te.H.useImperativeHandle(S,O,ne)},Ve.useInsertionEffect=function(S,O){return te.H.useInsertionEffect(S,O)},Ve.useLayoutEffect=function(S,O){return te.H.useLayoutEffect(S,O)},Ve.useMemo=function(S,O){return te.H.useMemo(S,O)},Ve.useOptimistic=function(S,O){return te.H.useOptimistic(S,O)},Ve.useReducer=function(S,O,ne){return te.H.useReducer(S,O,ne)},Ve.useRef=function(S){return te.H.useRef(S)},Ve.useState=function(S){return te.H.useState(S)},Ve.useSyncExternalStore=function(S,O,ne){return te.H.useSyncExternalStore(S,O,ne)},Ve.useTransition=function(){return te.H.useTransition()},Ve.version="19.2.4",Ve}var ip;function du(){return ip||(ip=1,Ic.exports=sm()),Ic.exports}var v=du();const pt=om(v),rp=lm({__proto__:null,default:pt},[v]);function cm(i){if(i.sheet)return i.sheet;for(var c=0;c<document.styleSheets.length;c++)if(document.styleSheets[c].ownerNode===i)return document.styleSheets[c]}function um(i){var c=document.createElement("style");return c.setAttribute("data-emotion",i.key),i.nonce!==void 0&&c.setAttribute("nonce",i.nonce),c.appendChild(document.createTextNode("")),c.setAttribute("data-s",""),c}var dm=(function(){function i(f){var d=this;this._insertTag=function(h){var p;d.tags.length===0?d.insertionPoint?p=d.insertionPoint.nextSibling:d.prepend?p=d.container.firstChild:p=d.before:p=d.tags[d.tags.length-1].nextSibling,d.container.insertBefore(h,p),d.tags.push(h)},this.isSpeedy=f.speedy===void 0?!0:f.speedy,this.tags=[],this.ctr=0,this.nonce=f.nonce,this.key=f.key,this.container=f.container,this.prepend=f.prepend,this.insertionPoint=f.insertionPoint,this.before=null}var c=i.prototype;return c.hydrate=function(d){d.forEach(this._insertTag)},c.insert=function(d){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(um(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var p=cm(h);try{p.insertRule(d,p.cssRules.length)}catch{}}else h.appendChild(document.createTextNode(d));this.ctr++},c.flush=function(){this.tags.forEach(function(d){var h;return(h=d.parentNode)==null?void 0:h.removeChild(d)}),this.tags=[],this.ctr=0},i})(),dn="-ms-",Ur="-moz-",ut="-webkit-",Lp="comm",fu="rule",hu="decl",fm="@import",Op="@keyframes",hm="@layer",pm=Math.abs,jr=String.fromCharCode,gm=Object.assign;function mm(i,c){return cn(i,0)^45?(((c<<2^cn(i,0))<<2^cn(i,1))<<2^cn(i,2))<<2^cn(i,3):0}function _p(i){return i.trim()}function ym(i,c){return(i=c.exec(i))?i[0]:i}function dt(i,c,f){return i.replace(c,f)}function su(i,c){return i.indexOf(c)}function cn(i,c){return i.charCodeAt(c)|0}function hi(i,c,f){return i.slice(c,f)}function aa(i){return i.length}function pu(i){return i.length}function Or(i,c){return c.push(i),i}function bm(i,c){return i.map(c).join("")}var qr=1,ho=1,Hp=0,Cn=0,It=0,go="";function Yr(i,c,f,d,h,p,C){return{value:i,root:c,parent:f,type:d,props:h,children:p,line:qr,column:ho,length:C,return:""}}function ci(i,c){return gm(Yr("",null,null,"",null,null,0),i,{length:-i.length},c)}function vm(){return It}function xm(){return It=Cn>0?cn(go,--Cn):0,ho--,It===10&&(ho=1,qr--),It}function _n(){return It=Cn<Hp?cn(go,Cn++):0,ho++,It===10&&(ho=1,qr++),It}function oa(){return cn(go,Cn)}function _r(){return Cn}function mi(i,c){return hi(go,i,c)}function pi(i){switch(i){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Bp(i){return qr=ho=1,Hp=aa(go=i),Cn=0,[]}function Up(i){return go="",i}function Hr(i){return _p(mi(Cn-1,cu(i===91?i+2:i===40?i+1:i)))}function Sm(i){for(;(It=oa())&&It<33;)_n();return pi(i)>2||pi(It)>3?"":" "}function wm(i,c){for(;--c&&_n()&&!(It<48||It>102||It>57&&It<65||It>70&&It<97););return mi(i,_r()+(c<6&&oa()==32&&_n()==32))}function cu(i){for(;_n();)switch(It){case i:return Cn;case 34:case 39:i!==34&&i!==39&&cu(It);break;case 40:i===41&&cu(i);break;case 92:_n();break}return Cn}function Cm(i,c){for(;_n()&&i+It!==57;)if(i+It===84&&oa()===47)break;return"/*"+mi(c,Cn-1)+"*"+jr(i===47?i:_n())}function km(i){for(;!pi(oa());)_n();return mi(i,Cn)}function zm(i){return Up(Br("",null,null,null,[""],i=Bp(i),0,[0],i))}function Br(i,c,f,d,h,p,C,D,x){for(var y=0,A=0,z=C,_=0,q=0,H=0,G=1,oe=1,J=1,ce=0,Q="",le=h,X=p,P=d,te=Q;oe;)switch(H=ce,ce=_n()){case 40:if(H!=108&&cn(te,z-1)==58){su(te+=dt(Hr(ce),"&","&\f"),"&\f")!=-1&&(J=-1);break}case 34:case 39:case 91:te+=Hr(ce);break;case 9:case 10:case 13:case 32:te+=Sm(H);break;case 92:te+=wm(_r()-1,7);continue;case 47:switch(oa()){case 42:case 47:Or(Mm(Cm(_n(),_r()),c,f),x);break;default:te+="/"}break;case 123*G:D[y++]=aa(te)*J;case 125*G:case 59:case 0:switch(ce){case 0:case 125:oe=0;case 59+A:J==-1&&(te=dt(te,/\f/g,"")),q>0&&aa(te)-z&&Or(q>32?cp(te+";",d,f,z-1):cp(dt(te," ","")+";",d,f,z-2),x);break;case 59:te+=";";default:if(Or(P=sp(te,c,f,y,A,h,D,Q,le=[],X=[],z),p),ce===123)if(A===0)Br(te,c,P,P,le,p,z,D,X);else switch(_===99&&cn(te,3)===110?100:_){case 100:case 108:case 109:case 115:Br(i,P,P,d&&Or(sp(i,P,P,0,0,h,D,Q,h,le=[],z),X),h,X,z,D,d?le:X);break;default:Br(te,P,P,P,[""],X,0,D,X)}}y=A=q=0,G=J=1,Q=te="",z=C;break;case 58:z=1+aa(te),q=H;default:if(G<1){if(ce==123)--G;else if(ce==125&&G++==0&&xm()==125)continue}switch(te+=jr(ce),ce*G){case 38:J=A>0?1:(te+="\f",-1);break;case 44:D[y++]=(aa(te)-1)*J,J=1;break;case 64:oa()===45&&(te+=Hr(_n())),_=oa(),A=z=aa(Q=te+=km(_r())),ce++;break;case 45:H===45&&aa(te)==2&&(G=0)}}return p}function sp(i,c,f,d,h,p,C,D,x,y,A){for(var z=h-1,_=h===0?p:[""],q=pu(_),H=0,G=0,oe=0;H<d;++H)for(var J=0,ce=hi(i,z+1,z=pm(G=C[H])),Q=i;J<q;++J)(Q=_p(G>0?_[J]+" "+ce:dt(ce,/&\f/g,_[J])))&&(x[oe++]=Q);return Yr(i,c,f,h===0?fu:D,x,y,A)}function Mm(i,c,f){return Yr(i,c,f,Lp,jr(vm()),hi(i,2,-2),0)}function cp(i,c,f,d){return Yr(i,c,f,hu,hi(i,0,d),hi(i,d+1,-1),d)}function uo(i,c){for(var f="",d=pu(i),h=0;h<d;h++)f+=c(i[h],h,i,c)||"";return f}function Dm(i,c,f,d){switch(i.type){case hm:if(i.children.length)break;case fm:case hu:return i.return=i.return||i.value;case Lp:return"";case Op:return i.return=i.value+"{"+uo(i.children,d)+"}";case fu:i.value=i.props.join(",")}return aa(f=uo(i.children,d))?i.return=i.value+"{"+f+"}":""}function Am(i){var c=pu(i);return function(f,d,h,p){for(var C="",D=0;D<c;D++)C+=i[D](f,d,h,p)||"";return C}}function Tm(i){return function(c){c.root||(c=c.return)&&i(c)}}function Em(i){var c=Object.create(null);return function(f){return c[f]===void 0&&(c[f]=i(f)),c[f]}}var Rm=function(c,f,d){for(var h=0,p=0;h=p,p=oa(),h===38&&p===12&&(f[d]=1),!pi(p);)_n();return mi(c,Cn)},Lm=function(c,f){var d=-1,h=44;do switch(pi(h)){case 0:h===38&&oa()===12&&(f[d]=1),c[d]+=Rm(Cn-1,f,d);break;case 2:c[d]+=Hr(h);break;case 4:if(h===44){c[++d]=oa()===58?"&\f":"",f[d]=c[d].length;break}default:c[d]+=jr(h)}while(h=_n());return c},Om=function(c,f){return Up(Lm(Bp(c),f))},up=new WeakMap,_m=function(c){if(!(c.type!=="rule"||!c.parent||c.length<1)){for(var f=c.value,d=c.parent,h=c.column===d.column&&c.line===d.line;d.type!=="rule";)if(d=d.parent,!d)return;if(!(c.props.length===1&&f.charCodeAt(0)!==58&&!up.get(d))&&!h){up.set(c,!0);for(var p=[],C=Om(f,p),D=d.props,x=0,y=0;x<C.length;x++)for(var A=0;A<D.length;A++,y++)c.props[y]=p[x]?C[x].replace(/&\f/g,D[A]):D[A]+" "+C[x]}}},Hm=function(c){if(c.type==="decl"){var f=c.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(c.return="",c.value="")}};function Np(i,c){switch(mm(i,c)){case 5103:return ut+"print-"+i+i;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ut+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return ut+i+Ur+i+dn+i+i;case 6828:case 4268:return ut+i+dn+i+i;case 6165:return ut+i+dn+"flex-"+i+i;case 5187:return ut+i+dt(i,/(\w+).+(:[^]+)/,ut+"box-$1$2"+dn+"flex-$1$2")+i;case 5443:return ut+i+dn+"flex-item-"+dt(i,/flex-|-self/,"")+i;case 4675:return ut+i+dn+"flex-line-pack"+dt(i,/align-content|flex-|-self/,"")+i;case 5548:return ut+i+dn+dt(i,"shrink","negative")+i;case 5292:return ut+i+dn+dt(i,"basis","preferred-size")+i;case 6060:return ut+"box-"+dt(i,"-grow","")+ut+i+dn+dt(i,"grow","positive")+i;case 4554:return ut+dt(i,/([^-])(transform)/g,"$1"+ut+"$2")+i;case 6187:return dt(dt(dt(i,/(zoom-|grab)/,ut+"$1"),/(image-set)/,ut+"$1"),i,"")+i;case 5495:case 3959:return dt(i,/(image-set\([^]*)/,ut+"$1$`$1");case 4968:return dt(dt(i,/(.+:)(flex-)?(.*)/,ut+"box-pack:$3"+dn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ut+i+i;case 4095:case 3583:case 4068:case 2532:return dt(i,/(.+)-inline(.+)/,ut+"$1$2")+i;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(aa(i)-1-c>6)switch(cn(i,c+1)){case 109:if(cn(i,c+4)!==45)break;case 102:return dt(i,/(.+:)(.+)-([^]+)/,"$1"+ut+"$2-$3$1"+Ur+(cn(i,c+3)==108?"$3":"$2-$3"))+i;case 115:return~su(i,"stretch")?Np(dt(i,"stretch","fill-available"),c)+i:i}break;case 4949:if(cn(i,c+1)!==115)break;case 6444:switch(cn(i,aa(i)-3-(~su(i,"!important")&&10))){case 107:return dt(i,":",":"+ut)+i;case 101:return dt(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ut+(cn(i,14)===45?"inline-":"")+"box$3$1"+ut+"$2$3$1"+dn+"$2box$3")+i}break;case 5936:switch(cn(i,c+11)){case 114:return ut+i+dn+dt(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return ut+i+dn+dt(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return ut+i+dn+dt(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return ut+i+dn+i+i}return i}var Bm=function(c,f,d,h){if(c.length>-1&&!c.return)switch(c.type){case hu:c.return=Np(c.value,c.length);break;case Op:return uo([ci(c,{value:dt(c.value,"@","@"+ut)})],h);case fu:if(c.length)return bm(c.props,function(p){switch(ym(p,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return uo([ci(c,{props:[dt(p,/:(read-\w+)/,":"+Ur+"$1")]})],h);case"::placeholder":return uo([ci(c,{props:[dt(p,/:(plac\w+)/,":"+ut+"input-$1")]}),ci(c,{props:[dt(p,/:(plac\w+)/,":"+Ur+"$1")]}),ci(c,{props:[dt(p,/:(plac\w+)/,dn+"input-$1")]})],h)}return""})}},Um=[Bm],Nm=function(c){var f=c.key;if(f==="css"){var d=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(d,function(G){var oe=G.getAttribute("data-emotion");oe.indexOf(" ")!==-1&&(document.head.appendChild(G),G.setAttribute("data-s",""))})}var h=c.stylisPlugins||Um,p={},C,D=[];C=c.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(G){for(var oe=G.getAttribute("data-emotion").split(" "),J=1;J<oe.length;J++)p[oe[J]]=!0;D.push(G)});var x,y=[_m,Hm];{var A,z=[Dm,Tm(function(G){A.insert(G)})],_=Am(y.concat(h,z)),q=function(oe){return uo(zm(oe),_)};x=function(oe,J,ce,Q){A=ce,q(oe?oe+"{"+J.styles+"}":J.styles),Q&&(H.inserted[J.name]=!0)}}var H={key:f,sheet:new dm({key:f,container:C,nonce:c.nonce,speedy:c.speedy,prepend:c.prepend,insertionPoint:c.insertionPoint}),nonce:c.nonce,inserted:p,registered:{},insert:x};return H.sheet.hydrate(D),H},Pc={exports:{}},ht={};var dp;function jm(){if(dp)return ht;dp=1;var i=typeof Symbol=="function"&&Symbol.for,c=i?Symbol.for("react.element"):60103,f=i?Symbol.for("react.portal"):60106,d=i?Symbol.for("react.fragment"):60107,h=i?Symbol.for("react.strict_mode"):60108,p=i?Symbol.for("react.profiler"):60114,C=i?Symbol.for("react.provider"):60109,D=i?Symbol.for("react.context"):60110,x=i?Symbol.for("react.async_mode"):60111,y=i?Symbol.for("react.concurrent_mode"):60111,A=i?Symbol.for("react.forward_ref"):60112,z=i?Symbol.for("react.suspense"):60113,_=i?Symbol.for("react.suspense_list"):60120,q=i?Symbol.for("react.memo"):60115,H=i?Symbol.for("react.lazy"):60116,G=i?Symbol.for("react.block"):60121,oe=i?Symbol.for("react.fundamental"):60117,J=i?Symbol.for("react.responder"):60118,ce=i?Symbol.for("react.scope"):60119;function Q(X){if(typeof X=="object"&&X!==null){var P=X.$$typeof;switch(P){case c:switch(X=X.type,X){case x:case y:case d:case p:case h:case z:return X;default:switch(X=X&&X.$$typeof,X){case D:case A:case H:case q:case C:return X;default:return P}}case f:return P}}}function le(X){return Q(X)===y}return ht.AsyncMode=x,ht.ConcurrentMode=y,ht.ContextConsumer=D,ht.ContextProvider=C,ht.Element=c,ht.ForwardRef=A,ht.Fragment=d,ht.Lazy=H,ht.Memo=q,ht.Portal=f,ht.Profiler=p,ht.StrictMode=h,ht.Suspense=z,ht.isAsyncMode=function(X){return le(X)||Q(X)===x},ht.isConcurrentMode=le,ht.isContextConsumer=function(X){return Q(X)===D},ht.isContextProvider=function(X){return Q(X)===C},ht.isElement=function(X){return typeof X=="object"&&X!==null&&X.$$typeof===c},ht.isForwardRef=function(X){return Q(X)===A},ht.isFragment=function(X){return Q(X)===d},ht.isLazy=function(X){return Q(X)===H},ht.isMemo=function(X){return Q(X)===q},ht.isPortal=function(X){return Q(X)===f},ht.isProfiler=function(X){return Q(X)===p},ht.isStrictMode=function(X){return Q(X)===h},ht.isSuspense=function(X){return Q(X)===z},ht.isValidElementType=function(X){return typeof X=="string"||typeof X=="function"||X===d||X===y||X===p||X===h||X===z||X===_||typeof X=="object"&&X!==null&&(X.$$typeof===H||X.$$typeof===q||X.$$typeof===C||X.$$typeof===D||X.$$typeof===A||X.$$typeof===oe||X.$$typeof===J||X.$$typeof===ce||X.$$typeof===G)},ht.typeOf=Q,ht}var fp;function qm(){return fp||(fp=1,Pc.exports=jm()),Pc.exports}var eu,hp;function Ym(){if(hp)return eu;hp=1;var i=qm(),c={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},f={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},d={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},h={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},p={};p[i.ForwardRef]=d,p[i.Memo]=h;function C(H){return i.isMemo(H)?h:p[H.$$typeof]||c}var D=Object.defineProperty,x=Object.getOwnPropertyNames,y=Object.getOwnPropertySymbols,A=Object.getOwnPropertyDescriptor,z=Object.getPrototypeOf,_=Object.prototype;function q(H,G,oe){if(typeof G!="string"){if(_){var J=z(G);J&&J!==_&&q(H,J,oe)}var ce=x(G);y&&(ce=ce.concat(y(G)));for(var Q=C(H),le=C(G),X=0;X<ce.length;++X){var P=ce[X];if(!f[P]&&!(oe&&oe[P])&&!(le&&le[P])&&!(Q&&Q[P])){var te=A(G,P);try{D(H,P,te)}catch{}}}}return H}return eu=q,eu}Ym();var Gm=!0;function Xm(i,c,f){var d="";return f.split(" ").forEach(function(h){i[h]!==void 0?c.push(i[h]+";"):h&&(d+=h+" ")}),d}var jp=function(c,f,d){var h=c.key+"-"+f.name;(d===!1||Gm===!1)&&c.registered[h]===void 0&&(c.registered[h]=f.styles)},Vm=function(c,f,d){jp(c,f,d);var h=c.key+"-"+f.name;if(c.inserted[f.name]===void 0){var p=f;do c.insert(f===p?"."+h:"",p,c.sheet,!0),p=p.next;while(p!==void 0)}};function Fm(i){for(var c=0,f,d=0,h=i.length;h>=4;++d,h-=4)f=i.charCodeAt(d)&255|(i.charCodeAt(++d)&255)<<8|(i.charCodeAt(++d)&255)<<16|(i.charCodeAt(++d)&255)<<24,f=(f&65535)*1540483477+((f>>>16)*59797<<16),f^=f>>>24,c=(f&65535)*1540483477+((f>>>16)*59797<<16)^(c&65535)*1540483477+((c>>>16)*59797<<16);switch(h){case 3:c^=(i.charCodeAt(d+2)&255)<<16;case 2:c^=(i.charCodeAt(d+1)&255)<<8;case 1:c^=i.charCodeAt(d)&255,c=(c&65535)*1540483477+((c>>>16)*59797<<16)}return c^=c>>>13,c=(c&65535)*1540483477+((c>>>16)*59797<<16),((c^c>>>15)>>>0).toString(36)}var Qm={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},Km=/[A-Z]|^ms/g,Zm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,qp=function(c){return c.charCodeAt(1)===45},pp=function(c){return c!=null&&typeof c!="boolean"},tu=Em(function(i){return qp(i)?i:i.replace(Km,"-$&").toLowerCase()}),gp=function(c,f){switch(c){case"animation":case"animationName":if(typeof f=="string")return f.replace(Zm,function(d,h,p){return la={name:h,styles:p,next:la},h})}return Qm[c]!==1&&!qp(c)&&typeof f=="number"&&f!==0?f+"px":f};function gi(i,c,f){if(f==null)return"";var d=f;if(d.__emotion_styles!==void 0)return d;switch(typeof f){case"boolean":return"";case"object":{var h=f;if(h.anim===1)return la={name:h.name,styles:h.styles,next:la},h.name;var p=f;if(p.styles!==void 0){var C=p.next;if(C!==void 0)for(;C!==void 0;)la={name:C.name,styles:C.styles,next:la},C=C.next;var D=p.styles+";";return D}return Jm(i,c,f)}case"function":{if(i!==void 0){var x=la,y=f(i);return la=x,gi(i,c,y)}break}}var A=f;return A}function Jm(i,c,f){var d="";if(Array.isArray(f))for(var h=0;h<f.length;h++)d+=gi(i,c,f[h])+";";else for(var p in f){var C=f[p];if(typeof C!="object"){var D=C;pp(D)&&(d+=tu(p)+":"+gp(p,D)+";")}else if(Array.isArray(C)&&typeof C[0]=="string"&&c==null)for(var x=0;x<C.length;x++)pp(C[x])&&(d+=tu(p)+":"+gp(p,C[x])+";");else{var y=gi(i,c,C);switch(p){case"animation":case"animationName":{d+=tu(p)+":"+y+";";break}default:d+=p+"{"+y+"}"}}}return d}var mp=/label:\s*([^\s;{]+)\s*(;|$)/g,la;function Yp(i,c,f){if(i.length===1&&typeof i[0]=="object"&&i[0]!==null&&i[0].styles!==void 0)return i[0];var d=!0,h="";la=void 0;var p=i[0];if(p==null||p.raw===void 0)d=!1,h+=gi(f,c,p);else{var C=p;h+=C[0]}for(var D=1;D<i.length;D++)if(h+=gi(f,c,i[D]),d){var x=p;h+=x[D]}mp.lastIndex=0;for(var y="",A;(A=mp.exec(h))!==null;)y+="-"+A[1];var z=Fm(h)+y;return{name:z,styles:h,next:la}}var $m=function(c){return c()},Wm=rp.useInsertionEffect?rp.useInsertionEffect:!1,Im=Wm||$m,Gp=v.createContext(typeof HTMLElement<"u"?Nm({key:"css"}):null);Gp.Provider;var Pm=function(c){return v.forwardRef(function(f,d){var h=v.useContext(Gp);return c(f,h,d)})},e1=v.createContext({}),yi={}.hasOwnProperty,uu="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",gu=function(c,f){var d={};for(var h in f)yi.call(f,h)&&(d[h]=f[h]);return d[uu]=c,d},t1=function(c){var f=c.cache,d=c.serialized,h=c.isStringTag;return jp(f,d,h),Im(function(){return Vm(f,d,h)}),null},n1=Pm(function(i,c,f){var d=i.css;typeof d=="string"&&c.registered[d]!==void 0&&(d=c.registered[d]);var h=i[uu],p=[d],C="";typeof i.className=="string"?C=Xm(c.registered,p,i.className):i.className!=null&&(C=i.className+" ");var D=Yp(p,void 0,v.useContext(e1));C+=c.key+"-"+D.name;var x={};for(var y in i)yi.call(i,y)&&y!=="css"&&y!==uu&&(x[y]=i[y]);return x.className=C,f&&(x.ref=f),v.createElement(v.Fragment,null,v.createElement(t1,{cache:c,serialized:D,isStringTag:typeof h=="string"}),v.createElement(h,x))}),mu=n1,tt=fi.Fragment,r=function(c,f,d){return yi.call(f,"css")?fi.jsx(mu,gu(c,f),d):fi.jsx(c,f,d)},b=function(c,f,d){return yi.call(f,"css")?fi.jsxs(mu,gu(c,f),d):fi.jsxs(c,f,d)},nu={exports:{}},ui={},au={exports:{}},lu={};var yp;function a1(){return yp||(yp=1,(function(i){function c(T,Z){var ee=T.length;T.push(Z);e:for(;0<ee;){var Ee=ee-1>>>1,qe=T[Ee];if(0<h(qe,Z))T[Ee]=Z,T[ee]=qe,ee=Ee;else break e}}function f(T){return T.length===0?null:T[0]}function d(T){if(T.length===0)return null;var Z=T[0],ee=T.pop();if(ee!==Z){T[0]=ee;e:for(var Ee=0,qe=T.length,S=qe>>>1;Ee<S;){var O=2*(Ee+1)-1,ne=T[O],re=O+1,we=T[re];if(0>h(ne,ee))re<qe&&0>h(we,ne)?(T[Ee]=we,T[re]=ee,Ee=re):(T[Ee]=ne,T[O]=ee,Ee=O);else if(re<qe&&0>h(we,ee))T[Ee]=we,T[re]=ee,Ee=re;else break e}}return Z}function h(T,Z){var ee=T.sortIndex-Z.sortIndex;return ee!==0?ee:T.id-Z.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;i.unstable_now=function(){return p.now()}}else{var C=Date,D=C.now();i.unstable_now=function(){return C.now()-D}}var x=[],y=[],A=1,z=null,_=3,q=!1,H=!1,G=!1,oe=!1,J=typeof setTimeout=="function"?setTimeout:null,ce=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function le(T){for(var Z=f(y);Z!==null;){if(Z.callback===null)d(y);else if(Z.startTime<=T)d(y),Z.sortIndex=Z.expirationTime,c(x,Z);else break;Z=f(y)}}function X(T){if(G=!1,le(T),!H)if(f(x)!==null)H=!0,P||(P=!0,me());else{var Z=f(y);Z!==null&&Oe(X,Z.startTime-T)}}var P=!1,te=-1,ae=5,j=-1;function W(){return oe?!0:!(i.unstable_now()-j<ae)}function he(){if(oe=!1,P){var T=i.unstable_now();j=T;var Z=!0;try{e:{H=!1,G&&(G=!1,ce(te),te=-1),q=!0;var ee=_;try{t:{for(le(T),z=f(x);z!==null&&!(z.expirationTime>T&&W());){var Ee=z.callback;if(typeof Ee=="function"){z.callback=null,_=z.priorityLevel;var qe=Ee(z.expirationTime<=T);if(T=i.unstable_now(),typeof qe=="function"){z.callback=qe,le(T),Z=!0;break t}z===f(x)&&d(x),le(T)}else d(x);z=f(x)}if(z!==null)Z=!0;else{var S=f(y);S!==null&&Oe(X,S.startTime-T),Z=!1}}break e}finally{z=null,_=ee,q=!1}Z=void 0}}finally{Z?me():P=!1}}}var me;if(typeof Q=="function")me=function(){Q(he)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,ie=ge.port2;ge.port1.onmessage=he,me=function(){ie.postMessage(null)}}else me=function(){J(he,0)};function Oe(T,Z){te=J(function(){T(i.unstable_now())},Z)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(T){T.callback=null},i.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<T?Math.floor(1e3/T):5},i.unstable_getCurrentPriorityLevel=function(){return _},i.unstable_next=function(T){switch(_){case 1:case 2:case 3:var Z=3;break;default:Z=_}var ee=_;_=Z;try{return T()}finally{_=ee}},i.unstable_requestPaint=function(){oe=!0},i.unstable_runWithPriority=function(T,Z){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var ee=_;_=T;try{return Z()}finally{_=ee}},i.unstable_scheduleCallback=function(T,Z,ee){var Ee=i.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?Ee+ee:Ee):ee=Ee,T){case 1:var qe=-1;break;case 2:qe=250;break;case 5:qe=1073741823;break;case 4:qe=1e4;break;default:qe=5e3}return qe=ee+qe,T={id:A++,callback:Z,priorityLevel:T,startTime:ee,expirationTime:qe,sortIndex:-1},ee>Ee?(T.sortIndex=ee,c(y,T),f(x)===null&&T===f(y)&&(G?(ce(te),te=-1):G=!0,Oe(X,ee-Ee))):(T.sortIndex=qe,c(x,T),H||q||(H=!0,P||(P=!0,me()))),T},i.unstable_shouldYield=W,i.unstable_wrapCallback=function(T){var Z=_;return function(){var ee=_;_=Z;try{return T.apply(this,arguments)}finally{_=ee}}}})(lu)),lu}var bp;function l1(){return bp||(bp=1,au.exports=a1()),au.exports}var ou={exports:{}},un={};var vp;function o1(){if(vp)return un;vp=1;var i=du();function c(x){var y="https://react.dev/errors/"+x;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)y+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+x+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var d={d:{f,r:function(){throw Error(c(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},h=Symbol.for("react.portal");function p(x,y,A){var z=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:z==null?null:""+z,children:x,containerInfo:y,implementation:A}}var C=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function D(x,y){if(x==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return un.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,un.createPortal=function(x,y){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(c(299));return p(x,y,null,A)},un.flushSync=function(x){var y=C.T,A=d.p;try{if(C.T=null,d.p=2,x)return x()}finally{C.T=y,d.p=A,d.d.f()}},un.preconnect=function(x,y){typeof x=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,d.d.C(x,y))},un.prefetchDNS=function(x){typeof x=="string"&&d.d.D(x)},un.preinit=function(x,y){if(typeof x=="string"&&y&&typeof y.as=="string"){var A=y.as,z=D(A,y.crossOrigin),_=typeof y.integrity=="string"?y.integrity:void 0,q=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;A==="style"?d.d.S(x,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:z,integrity:_,fetchPriority:q}):A==="script"&&d.d.X(x,{crossOrigin:z,integrity:_,fetchPriority:q,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},un.preinitModule=function(x,y){if(typeof x=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var A=D(y.as,y.crossOrigin);d.d.M(x,{crossOrigin:A,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&d.d.M(x)},un.preload=function(x,y){if(typeof x=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var A=y.as,z=D(A,y.crossOrigin);d.d.L(x,A,{crossOrigin:z,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},un.preloadModule=function(x,y){if(typeof x=="string")if(y){var A=D(y.as,y.crossOrigin);d.d.m(x,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:A,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else d.d.m(x)},un.requestFormReset=function(x){d.d.r(x)},un.unstable_batchedUpdates=function(x,y){return x(y)},un.useFormState=function(x,y,A){return C.H.useFormState(x,y,A)},un.useFormStatus=function(){return C.H.useHostTransitionStatus()},un.version="19.2.4",un}var xp;function i1(){if(xp)return ou.exports;xp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),ou.exports=o1(),ou.exports}var Sp;function r1(){if(Sp)return ui;Sp=1;var i=l1(),c=du(),f=i1();function d(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function p(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function C(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function D(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(p(e)!==e)throw Error(d(188))}function y(e){var t=e.alternate;if(!t){if(t=p(e),t===null)throw Error(d(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var o=l.alternate;if(o===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===o.child){for(o=l.child;o;){if(o===n)return x(l),e;if(o===a)return x(l),t;o=o.sibling}throw Error(d(188))}if(n.return!==a.return)n=l,a=o;else{for(var u=!1,g=l.child;g;){if(g===n){u=!0,n=l,a=o;break}if(g===a){u=!0,a=l,n=o;break}g=g.sibling}if(!u){for(g=o.child;g;){if(g===n){u=!0,n=o,a=l;break}if(g===a){u=!0,a=o,n=l;break}g=g.sibling}if(!u)throw Error(d(189))}}if(n.alternate!==a)throw Error(d(190))}if(n.tag!==3)throw Error(d(188));return n.stateNode.current===n?e:t}function A(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A(e),t!==null)return t;e=e.sibling}return null}var z=Object.assign,_=Symbol.for("react.element"),q=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),ce=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),he=Symbol.iterator;function me(e){return e===null||typeof e!="object"?null:(e=he&&e[he]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function ie(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case J:return"Profiler";case oe:return"StrictMode";case X:return"Suspense";case P:return"SuspenseList";case j:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case Q:return e.displayName||"Context";case ce:return(e._context.displayName||"Context")+".Consumer";case le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:ie(e.type)||"Memo";case ae:t=e._payload,e=e._init;try{return ie(e(t))}catch{}}return null}var Oe=Array.isArray,T=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},Ee=[],qe=-1;function S(e){return{current:e}}function O(e){0>qe||(e.current=Ee[qe],Ee[qe]=null,qe--)}function ne(e,t){qe++,Ee[qe]=e.current,e.current=t}var re=S(null),we=S(null),ze=S(null),Ge=S(null);function xt(e,t){switch(ne(ze,t),ne(we,e),ne(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Mh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Mh(t),e=Dh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(re),ne(re,e)}function Re(){O(re),O(we),O(ze)}function Pt(e){e.memoizedState!==null&&ne(Ge,e);var t=re.current,n=Dh(t,e.type);t!==n&&(ne(we,e),ne(re,n))}function Ze(e){we.current===e&&(O(re),O(we)),Ge.current===e&&(O(Ge),li._currentValue=ee)}var Je,it;function Ht(e){if(Je===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Je=t&&t[1]||"",it=-1<n.stack.indexOf(`
1
+ function lm(i,c){for(var f=0;f<c.length;f++){const d=c[f];if(typeof d!="string"&&!Array.isArray(d)){for(const h in d)if(h!=="default"&&!(h in i)){const p=Object.getOwnPropertyDescriptor(d,h);p&&Object.defineProperty(i,h,p.get?p:{enumerable:!0,get:()=>d[h]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))d(h);new MutationObserver(h=>{for(const p of h)if(p.type==="childList")for(const C of p.addedNodes)C.tagName==="LINK"&&C.rel==="modulepreload"&&d(C)}).observe(document,{childList:!0,subtree:!0});function f(h){const p={};return h.integrity&&(p.integrity=h.integrity),h.referrerPolicy&&(p.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?p.credentials="include":h.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function d(h){if(h.ep)return;h.ep=!0;const p=f(h);fetch(h.href,p)}})();function om(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var $c={exports:{}},si={};var ap;function im(){if(ap)return si;ap=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function f(d,h,p){var C=null;if(p!==void 0&&(C=""+p),h.key!==void 0&&(C=""+h.key),"key"in h){p={};for(var D in h)D!=="key"&&(p[D]=h[D])}else p=h;return h=p.ref,{$$typeof:i,type:d,key:C,ref:h!==void 0?h:null,props:p}}return si.Fragment=c,si.jsx=f,si.jsxs=f,si}var lp;function rm(){return lp||(lp=1,$c.exports=im()),$c.exports}var fi=rm(),Ic={exports:{}},Fe={};var op;function sm(){if(op)return Fe;op=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),C=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),_=Symbol.iterator;function q(S){return S===null||typeof S!="object"?null:(S=_&&S[_]||S["@@iterator"],typeof S=="function"?S:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,oe={};function J(S,O,ne){this.props=S,this.context=O,this.refs=oe,this.updater=ne||H}J.prototype.isReactComponent={},J.prototype.setState=function(S,O){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,O,"setState")},J.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function ce(){}ce.prototype=J.prototype;function Q(S,O,ne){this.props=S,this.context=O,this.refs=oe,this.updater=ne||H}var le=Q.prototype=new ce;le.constructor=Q,G(le,J.prototype),le.isPureReactComponent=!0;var X=Array.isArray;function P(){}var te={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function j(S,O,ne){var re=ne.ref;return{$$typeof:i,type:S,key:O,ref:re!==void 0?re:null,props:ne}}function $(S,O){return j(S.type,O,S.props)}function he(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function me(S){var O={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(ne){return O[ne]})}var ge=/\/+/g;function ie(S,O){return typeof S=="object"&&S!==null&&S.key!=null?me(""+S.key):O.toString(36)}function Oe(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(P,P):(S.status="pending",S.then(function(O){S.status==="pending"&&(S.status="fulfilled",S.value=O)},function(O){S.status==="pending"&&(S.status="rejected",S.reason=O)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function T(S,O,ne,re,we){var Me=typeof S;(Me==="undefined"||Me==="boolean")&&(S=null);var Xe=!1;if(S===null)Xe=!0;else switch(Me){case"bigint":case"string":case"number":Xe=!0;break;case"object":switch(S.$$typeof){case i:case c:Xe=!0;break;case A:return Xe=S._init,T(Xe(S._payload),O,ne,re,we)}}if(Xe)return we=we(S),Xe=re===""?"."+ie(S,0):re,X(we)?(ne="",Xe!=null&&(ne=Xe.replace(ge,"$&/")+"/"),T(we,O,ne,"",function(Pt){return Pt})):we!=null&&(he(we)&&(we=$(we,ne+(we.key==null||S&&S.key===we.key?"":(""+we.key).replace(ge,"$&/")+"/")+Xe)),O.push(we)),1;Xe=0;var St=re===""?".":re+":";if(X(S))for(var Re=0;Re<S.length;Re++)re=S[Re],Me=St+ie(re,Re),Xe+=T(re,O,ne,Me,we);else if(Re=q(S),typeof Re=="function")for(S=Re.call(S),Re=0;!(re=S.next()).done;)re=re.value,Me=St+ie(re,Re++),Xe+=T(re,O,ne,Me,we);else if(Me==="object"){if(typeof S.then=="function")return T(Oe(S),O,ne,re,we);throw O=String(S),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return Xe}function Z(S,O,ne){if(S==null)return S;var re=[],we=0;return T(S,re,"","",function(Me){return O.call(ne,Me,we++)}),re}function ee(S){if(S._status===-1){var O=S._result;O=O(),O.then(function(ne){(S._status===0||S._status===-1)&&(S._status=1,S._result=ne)},function(ne){(S._status===0||S._status===-1)&&(S._status=2,S._result=ne)}),S._status===-1&&(S._status=0,S._result=O)}if(S._status===1)return S._result.default;throw S._result}var Ee=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},Ye={map:Z,forEach:function(S,O,ne){Z(S,function(){O.apply(this,arguments)},ne)},count:function(S){var O=0;return Z(S,function(){O++}),O},toArray:function(S){return Z(S,function(O){return O})||[]},only:function(S){if(!he(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return Fe.Activity=z,Fe.Children=Ye,Fe.Component=J,Fe.Fragment=f,Fe.Profiler=h,Fe.PureComponent=Q,Fe.StrictMode=d,Fe.Suspense=x,Fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=te,Fe.__COMPILER_RUNTIME={__proto__:null,c:function(S){return te.H.useMemoCache(S)}},Fe.cache=function(S){return function(){return S.apply(null,arguments)}},Fe.cacheSignal=function(){return null},Fe.cloneElement=function(S,O,ne){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var re=G({},S.props),we=S.key;if(O!=null)for(Me in O.key!==void 0&&(we=""+O.key),O)!ae.call(O,Me)||Me==="key"||Me==="__self"||Me==="__source"||Me==="ref"&&O.ref===void 0||(re[Me]=O[Me]);var Me=arguments.length-2;if(Me===1)re.children=ne;else if(1<Me){for(var Xe=Array(Me),St=0;St<Me;St++)Xe[St]=arguments[St+2];re.children=Xe}return j(S.type,we,re)},Fe.createContext=function(S){return S={$$typeof:C,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:p,_context:S},S},Fe.createElement=function(S,O,ne){var re,we={},Me=null;if(O!=null)for(re in O.key!==void 0&&(Me=""+O.key),O)ae.call(O,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(we[re]=O[re]);var Xe=arguments.length-2;if(Xe===1)we.children=ne;else if(1<Xe){for(var St=Array(Xe),Re=0;Re<Xe;Re++)St[Re]=arguments[Re+2];we.children=St}if(S&&S.defaultProps)for(re in Xe=S.defaultProps,Xe)we[re]===void 0&&(we[re]=Xe[re]);return j(S,Me,we)},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(S){return{$$typeof:D,render:S}},Fe.isValidElement=he,Fe.lazy=function(S){return{$$typeof:A,_payload:{_status:-1,_result:S},_init:ee}},Fe.memo=function(S,O){return{$$typeof:y,type:S,compare:O===void 0?null:O}},Fe.startTransition=function(S){var O=te.T,ne={};te.T=ne;try{var re=S(),we=te.S;we!==null&&we(ne,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(P,Ee)}catch(Me){Ee(Me)}finally{O!==null&&ne.types!==null&&(O.types=ne.types),te.T=O}},Fe.unstable_useCacheRefresh=function(){return te.H.useCacheRefresh()},Fe.use=function(S){return te.H.use(S)},Fe.useActionState=function(S,O,ne){return te.H.useActionState(S,O,ne)},Fe.useCallback=function(S,O){return te.H.useCallback(S,O)},Fe.useContext=function(S){return te.H.useContext(S)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(S,O){return te.H.useDeferredValue(S,O)},Fe.useEffect=function(S,O){return te.H.useEffect(S,O)},Fe.useEffectEvent=function(S){return te.H.useEffectEvent(S)},Fe.useId=function(){return te.H.useId()},Fe.useImperativeHandle=function(S,O,ne){return te.H.useImperativeHandle(S,O,ne)},Fe.useInsertionEffect=function(S,O){return te.H.useInsertionEffect(S,O)},Fe.useLayoutEffect=function(S,O){return te.H.useLayoutEffect(S,O)},Fe.useMemo=function(S,O){return te.H.useMemo(S,O)},Fe.useOptimistic=function(S,O){return te.H.useOptimistic(S,O)},Fe.useReducer=function(S,O,ne){return te.H.useReducer(S,O,ne)},Fe.useRef=function(S){return te.H.useRef(S)},Fe.useState=function(S){return te.H.useState(S)},Fe.useSyncExternalStore=function(S,O,ne){return te.H.useSyncExternalStore(S,O,ne)},Fe.useTransition=function(){return te.H.useTransition()},Fe.version="19.2.4",Fe}var ip;function du(){return ip||(ip=1,Ic.exports=sm()),Ic.exports}var v=du();const gt=om(v),rp=lm({__proto__:null,default:gt},[v]);function cm(i){if(i.sheet)return i.sheet;for(var c=0;c<document.styleSheets.length;c++)if(document.styleSheets[c].ownerNode===i)return document.styleSheets[c]}function um(i){var c=document.createElement("style");return c.setAttribute("data-emotion",i.key),i.nonce!==void 0&&c.setAttribute("nonce",i.nonce),c.appendChild(document.createTextNode("")),c.setAttribute("data-s",""),c}var dm=(function(){function i(f){var d=this;this._insertTag=function(h){var p;d.tags.length===0?d.insertionPoint?p=d.insertionPoint.nextSibling:d.prepend?p=d.container.firstChild:p=d.before:p=d.tags[d.tags.length-1].nextSibling,d.container.insertBefore(h,p),d.tags.push(h)},this.isSpeedy=f.speedy===void 0?!0:f.speedy,this.tags=[],this.ctr=0,this.nonce=f.nonce,this.key=f.key,this.container=f.container,this.prepend=f.prepend,this.insertionPoint=f.insertionPoint,this.before=null}var c=i.prototype;return c.hydrate=function(d){d.forEach(this._insertTag)},c.insert=function(d){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(um(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var p=cm(h);try{p.insertRule(d,p.cssRules.length)}catch{}}else h.appendChild(document.createTextNode(d));this.ctr++},c.flush=function(){this.tags.forEach(function(d){var h;return(h=d.parentNode)==null?void 0:h.removeChild(d)}),this.tags=[],this.ctr=0},i})(),dn="-ms-",Ur="-moz-",ft="-webkit-",Lp="comm",fu="rule",hu="decl",fm="@import",Op="@keyframes",hm="@layer",pm=Math.abs,jr=String.fromCharCode,gm=Object.assign;function mm(i,c){return cn(i,0)^45?(((c<<2^cn(i,0))<<2^cn(i,1))<<2^cn(i,2))<<2^cn(i,3):0}function _p(i){return i.trim()}function ym(i,c){return(i=c.exec(i))?i[0]:i}function ht(i,c,f){return i.replace(c,f)}function su(i,c){return i.indexOf(c)}function cn(i,c){return i.charCodeAt(c)|0}function hi(i,c,f){return i.slice(c,f)}function aa(i){return i.length}function pu(i){return i.length}function Or(i,c){return c.push(i),i}function bm(i,c){return i.map(c).join("")}var qr=1,ho=1,Hp=0,Cn=0,It=0,go="";function Yr(i,c,f,d,h,p,C){return{value:i,root:c,parent:f,type:d,props:h,children:p,line:qr,column:ho,length:C,return:""}}function ci(i,c){return gm(Yr("",null,null,"",null,null,0),i,{length:-i.length},c)}function vm(){return It}function xm(){return It=Cn>0?cn(go,--Cn):0,ho--,It===10&&(ho=1,qr--),It}function _n(){return It=Cn<Hp?cn(go,Cn++):0,ho++,It===10&&(ho=1,qr++),It}function oa(){return cn(go,Cn)}function _r(){return Cn}function mi(i,c){return hi(go,i,c)}function pi(i){switch(i){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Bp(i){return qr=ho=1,Hp=aa(go=i),Cn=0,[]}function Up(i){return go="",i}function Hr(i){return _p(mi(Cn-1,cu(i===91?i+2:i===40?i+1:i)))}function Sm(i){for(;(It=oa())&&It<33;)_n();return pi(i)>2||pi(It)>3?"":" "}function wm(i,c){for(;--c&&_n()&&!(It<48||It>102||It>57&&It<65||It>70&&It<97););return mi(i,_r()+(c<6&&oa()==32&&_n()==32))}function cu(i){for(;_n();)switch(It){case i:return Cn;case 34:case 39:i!==34&&i!==39&&cu(It);break;case 40:i===41&&cu(i);break;case 92:_n();break}return Cn}function Cm(i,c){for(;_n()&&i+It!==57;)if(i+It===84&&oa()===47)break;return"/*"+mi(c,Cn-1)+"*"+jr(i===47?i:_n())}function km(i){for(;!pi(oa());)_n();return mi(i,Cn)}function zm(i){return Up(Br("",null,null,null,[""],i=Bp(i),0,[0],i))}function Br(i,c,f,d,h,p,C,D,x){for(var y=0,A=0,z=C,_=0,q=0,H=0,G=1,oe=1,J=1,ce=0,Q="",le=h,X=p,P=d,te=Q;oe;)switch(H=ce,ce=_n()){case 40:if(H!=108&&cn(te,z-1)==58){su(te+=ht(Hr(ce),"&","&\f"),"&\f")!=-1&&(J=-1);break}case 34:case 39:case 91:te+=Hr(ce);break;case 9:case 10:case 13:case 32:te+=Sm(H);break;case 92:te+=wm(_r()-1,7);continue;case 47:switch(oa()){case 42:case 47:Or(Mm(Cm(_n(),_r()),c,f),x);break;default:te+="/"}break;case 123*G:D[y++]=aa(te)*J;case 125*G:case 59:case 0:switch(ce){case 0:case 125:oe=0;case 59+A:J==-1&&(te=ht(te,/\f/g,"")),q>0&&aa(te)-z&&Or(q>32?cp(te+";",d,f,z-1):cp(ht(te," ","")+";",d,f,z-2),x);break;case 59:te+=";";default:if(Or(P=sp(te,c,f,y,A,h,D,Q,le=[],X=[],z),p),ce===123)if(A===0)Br(te,c,P,P,le,p,z,D,X);else switch(_===99&&cn(te,3)===110?100:_){case 100:case 108:case 109:case 115:Br(i,P,P,d&&Or(sp(i,P,P,0,0,h,D,Q,h,le=[],z),X),h,X,z,D,d?le:X);break;default:Br(te,P,P,P,[""],X,0,D,X)}}y=A=q=0,G=J=1,Q=te="",z=C;break;case 58:z=1+aa(te),q=H;default:if(G<1){if(ce==123)--G;else if(ce==125&&G++==0&&xm()==125)continue}switch(te+=jr(ce),ce*G){case 38:J=A>0?1:(te+="\f",-1);break;case 44:D[y++]=(aa(te)-1)*J,J=1;break;case 64:oa()===45&&(te+=Hr(_n())),_=oa(),A=z=aa(Q=te+=km(_r())),ce++;break;case 45:H===45&&aa(te)==2&&(G=0)}}return p}function sp(i,c,f,d,h,p,C,D,x,y,A){for(var z=h-1,_=h===0?p:[""],q=pu(_),H=0,G=0,oe=0;H<d;++H)for(var J=0,ce=hi(i,z+1,z=pm(G=C[H])),Q=i;J<q;++J)(Q=_p(G>0?_[J]+" "+ce:ht(ce,/&\f/g,_[J])))&&(x[oe++]=Q);return Yr(i,c,f,h===0?fu:D,x,y,A)}function Mm(i,c,f){return Yr(i,c,f,Lp,jr(vm()),hi(i,2,-2),0)}function cp(i,c,f,d){return Yr(i,c,f,hu,hi(i,0,d),hi(i,d+1,-1),d)}function uo(i,c){for(var f="",d=pu(i),h=0;h<d;h++)f+=c(i[h],h,i,c)||"";return f}function Dm(i,c,f,d){switch(i.type){case hm:if(i.children.length)break;case fm:case hu:return i.return=i.return||i.value;case Lp:return"";case Op:return i.return=i.value+"{"+uo(i.children,d)+"}";case fu:i.value=i.props.join(",")}return aa(f=uo(i.children,d))?i.return=i.value+"{"+f+"}":""}function Am(i){var c=pu(i);return function(f,d,h,p){for(var C="",D=0;D<c;D++)C+=i[D](f,d,h,p)||"";return C}}function Tm(i){return function(c){c.root||(c=c.return)&&i(c)}}function Em(i){var c=Object.create(null);return function(f){return c[f]===void 0&&(c[f]=i(f)),c[f]}}var Rm=function(c,f,d){for(var h=0,p=0;h=p,p=oa(),h===38&&p===12&&(f[d]=1),!pi(p);)_n();return mi(c,Cn)},Lm=function(c,f){var d=-1,h=44;do switch(pi(h)){case 0:h===38&&oa()===12&&(f[d]=1),c[d]+=Rm(Cn-1,f,d);break;case 2:c[d]+=Hr(h);break;case 4:if(h===44){c[++d]=oa()===58?"&\f":"",f[d]=c[d].length;break}default:c[d]+=jr(h)}while(h=_n());return c},Om=function(c,f){return Up(Lm(Bp(c),f))},up=new WeakMap,_m=function(c){if(!(c.type!=="rule"||!c.parent||c.length<1)){for(var f=c.value,d=c.parent,h=c.column===d.column&&c.line===d.line;d.type!=="rule";)if(d=d.parent,!d)return;if(!(c.props.length===1&&f.charCodeAt(0)!==58&&!up.get(d))&&!h){up.set(c,!0);for(var p=[],C=Om(f,p),D=d.props,x=0,y=0;x<C.length;x++)for(var A=0;A<D.length;A++,y++)c.props[y]=p[x]?C[x].replace(/&\f/g,D[A]):D[A]+" "+C[x]}}},Hm=function(c){if(c.type==="decl"){var f=c.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(c.return="",c.value="")}};function Np(i,c){switch(mm(i,c)){case 5103:return ft+"print-"+i+i;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ft+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return ft+i+Ur+i+dn+i+i;case 6828:case 4268:return ft+i+dn+i+i;case 6165:return ft+i+dn+"flex-"+i+i;case 5187:return ft+i+ht(i,/(\w+).+(:[^]+)/,ft+"box-$1$2"+dn+"flex-$1$2")+i;case 5443:return ft+i+dn+"flex-item-"+ht(i,/flex-|-self/,"")+i;case 4675:return ft+i+dn+"flex-line-pack"+ht(i,/align-content|flex-|-self/,"")+i;case 5548:return ft+i+dn+ht(i,"shrink","negative")+i;case 5292:return ft+i+dn+ht(i,"basis","preferred-size")+i;case 6060:return ft+"box-"+ht(i,"-grow","")+ft+i+dn+ht(i,"grow","positive")+i;case 4554:return ft+ht(i,/([^-])(transform)/g,"$1"+ft+"$2")+i;case 6187:return ht(ht(ht(i,/(zoom-|grab)/,ft+"$1"),/(image-set)/,ft+"$1"),i,"")+i;case 5495:case 3959:return ht(i,/(image-set\([^]*)/,ft+"$1$`$1");case 4968:return ht(ht(i,/(.+:)(flex-)?(.*)/,ft+"box-pack:$3"+dn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ft+i+i;case 4095:case 3583:case 4068:case 2532:return ht(i,/(.+)-inline(.+)/,ft+"$1$2")+i;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(aa(i)-1-c>6)switch(cn(i,c+1)){case 109:if(cn(i,c+4)!==45)break;case 102:return ht(i,/(.+:)(.+)-([^]+)/,"$1"+ft+"$2-$3$1"+Ur+(cn(i,c+3)==108?"$3":"$2-$3"))+i;case 115:return~su(i,"stretch")?Np(ht(i,"stretch","fill-available"),c)+i:i}break;case 4949:if(cn(i,c+1)!==115)break;case 6444:switch(cn(i,aa(i)-3-(~su(i,"!important")&&10))){case 107:return ht(i,":",":"+ft)+i;case 101:return ht(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ft+(cn(i,14)===45?"inline-":"")+"box$3$1"+ft+"$2$3$1"+dn+"$2box$3")+i}break;case 5936:switch(cn(i,c+11)){case 114:return ft+i+dn+ht(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return ft+i+dn+ht(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return ft+i+dn+ht(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return ft+i+dn+i+i}return i}var Bm=function(c,f,d,h){if(c.length>-1&&!c.return)switch(c.type){case hu:c.return=Np(c.value,c.length);break;case Op:return uo([ci(c,{value:ht(c.value,"@","@"+ft)})],h);case fu:if(c.length)return bm(c.props,function(p){switch(ym(p,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return uo([ci(c,{props:[ht(p,/:(read-\w+)/,":"+Ur+"$1")]})],h);case"::placeholder":return uo([ci(c,{props:[ht(p,/:(plac\w+)/,":"+ft+"input-$1")]}),ci(c,{props:[ht(p,/:(plac\w+)/,":"+Ur+"$1")]}),ci(c,{props:[ht(p,/:(plac\w+)/,dn+"input-$1")]})],h)}return""})}},Um=[Bm],Nm=function(c){var f=c.key;if(f==="css"){var d=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(d,function(G){var oe=G.getAttribute("data-emotion");oe.indexOf(" ")!==-1&&(document.head.appendChild(G),G.setAttribute("data-s",""))})}var h=c.stylisPlugins||Um,p={},C,D=[];C=c.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(G){for(var oe=G.getAttribute("data-emotion").split(" "),J=1;J<oe.length;J++)p[oe[J]]=!0;D.push(G)});var x,y=[_m,Hm];{var A,z=[Dm,Tm(function(G){A.insert(G)})],_=Am(y.concat(h,z)),q=function(oe){return uo(zm(oe),_)};x=function(oe,J,ce,Q){A=ce,q(oe?oe+"{"+J.styles+"}":J.styles),Q&&(H.inserted[J.name]=!0)}}var H={key:f,sheet:new dm({key:f,container:C,nonce:c.nonce,speedy:c.speedy,prepend:c.prepend,insertionPoint:c.insertionPoint}),nonce:c.nonce,inserted:p,registered:{},insert:x};return H.sheet.hydrate(D),H},Pc={exports:{}},pt={};var dp;function jm(){if(dp)return pt;dp=1;var i=typeof Symbol=="function"&&Symbol.for,c=i?Symbol.for("react.element"):60103,f=i?Symbol.for("react.portal"):60106,d=i?Symbol.for("react.fragment"):60107,h=i?Symbol.for("react.strict_mode"):60108,p=i?Symbol.for("react.profiler"):60114,C=i?Symbol.for("react.provider"):60109,D=i?Symbol.for("react.context"):60110,x=i?Symbol.for("react.async_mode"):60111,y=i?Symbol.for("react.concurrent_mode"):60111,A=i?Symbol.for("react.forward_ref"):60112,z=i?Symbol.for("react.suspense"):60113,_=i?Symbol.for("react.suspense_list"):60120,q=i?Symbol.for("react.memo"):60115,H=i?Symbol.for("react.lazy"):60116,G=i?Symbol.for("react.block"):60121,oe=i?Symbol.for("react.fundamental"):60117,J=i?Symbol.for("react.responder"):60118,ce=i?Symbol.for("react.scope"):60119;function Q(X){if(typeof X=="object"&&X!==null){var P=X.$$typeof;switch(P){case c:switch(X=X.type,X){case x:case y:case d:case p:case h:case z:return X;default:switch(X=X&&X.$$typeof,X){case D:case A:case H:case q:case C:return X;default:return P}}case f:return P}}}function le(X){return Q(X)===y}return pt.AsyncMode=x,pt.ConcurrentMode=y,pt.ContextConsumer=D,pt.ContextProvider=C,pt.Element=c,pt.ForwardRef=A,pt.Fragment=d,pt.Lazy=H,pt.Memo=q,pt.Portal=f,pt.Profiler=p,pt.StrictMode=h,pt.Suspense=z,pt.isAsyncMode=function(X){return le(X)||Q(X)===x},pt.isConcurrentMode=le,pt.isContextConsumer=function(X){return Q(X)===D},pt.isContextProvider=function(X){return Q(X)===C},pt.isElement=function(X){return typeof X=="object"&&X!==null&&X.$$typeof===c},pt.isForwardRef=function(X){return Q(X)===A},pt.isFragment=function(X){return Q(X)===d},pt.isLazy=function(X){return Q(X)===H},pt.isMemo=function(X){return Q(X)===q},pt.isPortal=function(X){return Q(X)===f},pt.isProfiler=function(X){return Q(X)===p},pt.isStrictMode=function(X){return Q(X)===h},pt.isSuspense=function(X){return Q(X)===z},pt.isValidElementType=function(X){return typeof X=="string"||typeof X=="function"||X===d||X===y||X===p||X===h||X===z||X===_||typeof X=="object"&&X!==null&&(X.$$typeof===H||X.$$typeof===q||X.$$typeof===C||X.$$typeof===D||X.$$typeof===A||X.$$typeof===oe||X.$$typeof===J||X.$$typeof===ce||X.$$typeof===G)},pt.typeOf=Q,pt}var fp;function qm(){return fp||(fp=1,Pc.exports=jm()),Pc.exports}var eu,hp;function Ym(){if(hp)return eu;hp=1;var i=qm(),c={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},f={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},d={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},h={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},p={};p[i.ForwardRef]=d,p[i.Memo]=h;function C(H){return i.isMemo(H)?h:p[H.$$typeof]||c}var D=Object.defineProperty,x=Object.getOwnPropertyNames,y=Object.getOwnPropertySymbols,A=Object.getOwnPropertyDescriptor,z=Object.getPrototypeOf,_=Object.prototype;function q(H,G,oe){if(typeof G!="string"){if(_){var J=z(G);J&&J!==_&&q(H,J,oe)}var ce=x(G);y&&(ce=ce.concat(y(G)));for(var Q=C(H),le=C(G),X=0;X<ce.length;++X){var P=ce[X];if(!f[P]&&!(oe&&oe[P])&&!(le&&le[P])&&!(Q&&Q[P])){var te=A(G,P);try{D(H,P,te)}catch{}}}}return H}return eu=q,eu}Ym();var Gm=!0;function Xm(i,c,f){var d="";return f.split(" ").forEach(function(h){i[h]!==void 0?c.push(i[h]+";"):h&&(d+=h+" ")}),d}var jp=function(c,f,d){var h=c.key+"-"+f.name;(d===!1||Gm===!1)&&c.registered[h]===void 0&&(c.registered[h]=f.styles)},Vm=function(c,f,d){jp(c,f,d);var h=c.key+"-"+f.name;if(c.inserted[f.name]===void 0){var p=f;do c.insert(f===p?"."+h:"",p,c.sheet,!0),p=p.next;while(p!==void 0)}};function Fm(i){for(var c=0,f,d=0,h=i.length;h>=4;++d,h-=4)f=i.charCodeAt(d)&255|(i.charCodeAt(++d)&255)<<8|(i.charCodeAt(++d)&255)<<16|(i.charCodeAt(++d)&255)<<24,f=(f&65535)*1540483477+((f>>>16)*59797<<16),f^=f>>>24,c=(f&65535)*1540483477+((f>>>16)*59797<<16)^(c&65535)*1540483477+((c>>>16)*59797<<16);switch(h){case 3:c^=(i.charCodeAt(d+2)&255)<<16;case 2:c^=(i.charCodeAt(d+1)&255)<<8;case 1:c^=i.charCodeAt(d)&255,c=(c&65535)*1540483477+((c>>>16)*59797<<16)}return c^=c>>>13,c=(c&65535)*1540483477+((c>>>16)*59797<<16),((c^c>>>15)>>>0).toString(36)}var Qm={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},Km=/[A-Z]|^ms/g,Zm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,qp=function(c){return c.charCodeAt(1)===45},pp=function(c){return c!=null&&typeof c!="boolean"},tu=Em(function(i){return qp(i)?i:i.replace(Km,"-$&").toLowerCase()}),gp=function(c,f){switch(c){case"animation":case"animationName":if(typeof f=="string")return f.replace(Zm,function(d,h,p){return la={name:h,styles:p,next:la},h})}return Qm[c]!==1&&!qp(c)&&typeof f=="number"&&f!==0?f+"px":f};function gi(i,c,f){if(f==null)return"";var d=f;if(d.__emotion_styles!==void 0)return d;switch(typeof f){case"boolean":return"";case"object":{var h=f;if(h.anim===1)return la={name:h.name,styles:h.styles,next:la},h.name;var p=f;if(p.styles!==void 0){var C=p.next;if(C!==void 0)for(;C!==void 0;)la={name:C.name,styles:C.styles,next:la},C=C.next;var D=p.styles+";";return D}return Jm(i,c,f)}case"function":{if(i!==void 0){var x=la,y=f(i);return la=x,gi(i,c,y)}break}}var A=f;return A}function Jm(i,c,f){var d="";if(Array.isArray(f))for(var h=0;h<f.length;h++)d+=gi(i,c,f[h])+";";else for(var p in f){var C=f[p];if(typeof C!="object"){var D=C;pp(D)&&(d+=tu(p)+":"+gp(p,D)+";")}else if(Array.isArray(C)&&typeof C[0]=="string"&&c==null)for(var x=0;x<C.length;x++)pp(C[x])&&(d+=tu(p)+":"+gp(p,C[x])+";");else{var y=gi(i,c,C);switch(p){case"animation":case"animationName":{d+=tu(p)+":"+y+";";break}default:d+=p+"{"+y+"}"}}}return d}var mp=/label:\s*([^\s;{]+)\s*(;|$)/g,la;function Yp(i,c,f){if(i.length===1&&typeof i[0]=="object"&&i[0]!==null&&i[0].styles!==void 0)return i[0];var d=!0,h="";la=void 0;var p=i[0];if(p==null||p.raw===void 0)d=!1,h+=gi(f,c,p);else{var C=p;h+=C[0]}for(var D=1;D<i.length;D++)if(h+=gi(f,c,i[D]),d){var x=p;h+=x[D]}mp.lastIndex=0;for(var y="",A;(A=mp.exec(h))!==null;)y+="-"+A[1];var z=Fm(h)+y;return{name:z,styles:h,next:la}}var Wm=function(c){return c()},$m=rp.useInsertionEffect?rp.useInsertionEffect:!1,Im=$m||Wm,Gp=v.createContext(typeof HTMLElement<"u"?Nm({key:"css"}):null);Gp.Provider;var Pm=function(c){return v.forwardRef(function(f,d){var h=v.useContext(Gp);return c(f,h,d)})},e1=v.createContext({}),yi={}.hasOwnProperty,uu="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",gu=function(c,f){var d={};for(var h in f)yi.call(f,h)&&(d[h]=f[h]);return d[uu]=c,d},t1=function(c){var f=c.cache,d=c.serialized,h=c.isStringTag;return jp(f,d,h),Im(function(){return Vm(f,d,h)}),null},n1=Pm(function(i,c,f){var d=i.css;typeof d=="string"&&c.registered[d]!==void 0&&(d=c.registered[d]);var h=i[uu],p=[d],C="";typeof i.className=="string"?C=Xm(c.registered,p,i.className):i.className!=null&&(C=i.className+" ");var D=Yp(p,void 0,v.useContext(e1));C+=c.key+"-"+D.name;var x={};for(var y in i)yi.call(i,y)&&y!=="css"&&y!==uu&&(x[y]=i[y]);return x.className=C,f&&(x.ref=f),v.createElement(v.Fragment,null,v.createElement(t1,{cache:c,serialized:D,isStringTag:typeof h=="string"}),v.createElement(h,x))}),mu=n1,nt=fi.Fragment,r=function(c,f,d){return yi.call(f,"css")?fi.jsx(mu,gu(c,f),d):fi.jsx(c,f,d)},b=function(c,f,d){return yi.call(f,"css")?fi.jsxs(mu,gu(c,f),d):fi.jsxs(c,f,d)},nu={exports:{}},ui={},au={exports:{}},lu={};var yp;function a1(){return yp||(yp=1,(function(i){function c(T,Z){var ee=T.length;T.push(Z);e:for(;0<ee;){var Ee=ee-1>>>1,Ye=T[Ee];if(0<h(Ye,Z))T[Ee]=Z,T[ee]=Ye,ee=Ee;else break e}}function f(T){return T.length===0?null:T[0]}function d(T){if(T.length===0)return null;var Z=T[0],ee=T.pop();if(ee!==Z){T[0]=ee;e:for(var Ee=0,Ye=T.length,S=Ye>>>1;Ee<S;){var O=2*(Ee+1)-1,ne=T[O],re=O+1,we=T[re];if(0>h(ne,ee))re<Ye&&0>h(we,ne)?(T[Ee]=we,T[re]=ee,Ee=re):(T[Ee]=ne,T[O]=ee,Ee=O);else if(re<Ye&&0>h(we,ee))T[Ee]=we,T[re]=ee,Ee=re;else break e}}return Z}function h(T,Z){var ee=T.sortIndex-Z.sortIndex;return ee!==0?ee:T.id-Z.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;i.unstable_now=function(){return p.now()}}else{var C=Date,D=C.now();i.unstable_now=function(){return C.now()-D}}var x=[],y=[],A=1,z=null,_=3,q=!1,H=!1,G=!1,oe=!1,J=typeof setTimeout=="function"?setTimeout:null,ce=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function le(T){for(var Z=f(y);Z!==null;){if(Z.callback===null)d(y);else if(Z.startTime<=T)d(y),Z.sortIndex=Z.expirationTime,c(x,Z);else break;Z=f(y)}}function X(T){if(G=!1,le(T),!H)if(f(x)!==null)H=!0,P||(P=!0,me());else{var Z=f(y);Z!==null&&Oe(X,Z.startTime-T)}}var P=!1,te=-1,ae=5,j=-1;function $(){return oe?!0:!(i.unstable_now()-j<ae)}function he(){if(oe=!1,P){var T=i.unstable_now();j=T;var Z=!0;try{e:{H=!1,G&&(G=!1,ce(te),te=-1),q=!0;var ee=_;try{t:{for(le(T),z=f(x);z!==null&&!(z.expirationTime>T&&$());){var Ee=z.callback;if(typeof Ee=="function"){z.callback=null,_=z.priorityLevel;var Ye=Ee(z.expirationTime<=T);if(T=i.unstable_now(),typeof Ye=="function"){z.callback=Ye,le(T),Z=!0;break t}z===f(x)&&d(x),le(T)}else d(x);z=f(x)}if(z!==null)Z=!0;else{var S=f(y);S!==null&&Oe(X,S.startTime-T),Z=!1}}break e}finally{z=null,_=ee,q=!1}Z=void 0}}finally{Z?me():P=!1}}}var me;if(typeof Q=="function")me=function(){Q(he)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,ie=ge.port2;ge.port1.onmessage=he,me=function(){ie.postMessage(null)}}else me=function(){J(he,0)};function Oe(T,Z){te=J(function(){T(i.unstable_now())},Z)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(T){T.callback=null},i.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<T?Math.floor(1e3/T):5},i.unstable_getCurrentPriorityLevel=function(){return _},i.unstable_next=function(T){switch(_){case 1:case 2:case 3:var Z=3;break;default:Z=_}var ee=_;_=Z;try{return T()}finally{_=ee}},i.unstable_requestPaint=function(){oe=!0},i.unstable_runWithPriority=function(T,Z){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var ee=_;_=T;try{return Z()}finally{_=ee}},i.unstable_scheduleCallback=function(T,Z,ee){var Ee=i.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?Ee+ee:Ee):ee=Ee,T){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=ee+Ye,T={id:A++,callback:Z,priorityLevel:T,startTime:ee,expirationTime:Ye,sortIndex:-1},ee>Ee?(T.sortIndex=ee,c(y,T),f(x)===null&&T===f(y)&&(G?(ce(te),te=-1):G=!0,Oe(X,ee-Ee))):(T.sortIndex=Ye,c(x,T),H||q||(H=!0,P||(P=!0,me()))),T},i.unstable_shouldYield=$,i.unstable_wrapCallback=function(T){var Z=_;return function(){var ee=_;_=Z;try{return T.apply(this,arguments)}finally{_=ee}}}})(lu)),lu}var bp;function l1(){return bp||(bp=1,au.exports=a1()),au.exports}var ou={exports:{}},un={};var vp;function o1(){if(vp)return un;vp=1;var i=du();function c(x){var y="https://react.dev/errors/"+x;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)y+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+x+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var d={d:{f,r:function(){throw Error(c(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},h=Symbol.for("react.portal");function p(x,y,A){var z=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:z==null?null:""+z,children:x,containerInfo:y,implementation:A}}var C=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function D(x,y){if(x==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return un.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,un.createPortal=function(x,y){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(c(299));return p(x,y,null,A)},un.flushSync=function(x){var y=C.T,A=d.p;try{if(C.T=null,d.p=2,x)return x()}finally{C.T=y,d.p=A,d.d.f()}},un.preconnect=function(x,y){typeof x=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,d.d.C(x,y))},un.prefetchDNS=function(x){typeof x=="string"&&d.d.D(x)},un.preinit=function(x,y){if(typeof x=="string"&&y&&typeof y.as=="string"){var A=y.as,z=D(A,y.crossOrigin),_=typeof y.integrity=="string"?y.integrity:void 0,q=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;A==="style"?d.d.S(x,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:z,integrity:_,fetchPriority:q}):A==="script"&&d.d.X(x,{crossOrigin:z,integrity:_,fetchPriority:q,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},un.preinitModule=function(x,y){if(typeof x=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var A=D(y.as,y.crossOrigin);d.d.M(x,{crossOrigin:A,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&d.d.M(x)},un.preload=function(x,y){if(typeof x=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var A=y.as,z=D(A,y.crossOrigin);d.d.L(x,A,{crossOrigin:z,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},un.preloadModule=function(x,y){if(typeof x=="string")if(y){var A=D(y.as,y.crossOrigin);d.d.m(x,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:A,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else d.d.m(x)},un.requestFormReset=function(x){d.d.r(x)},un.unstable_batchedUpdates=function(x,y){return x(y)},un.useFormState=function(x,y,A){return C.H.useFormState(x,y,A)},un.useFormStatus=function(){return C.H.useHostTransitionStatus()},un.version="19.2.4",un}var xp;function i1(){if(xp)return ou.exports;xp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),ou.exports=o1(),ou.exports}var Sp;function r1(){if(Sp)return ui;Sp=1;var i=l1(),c=du(),f=i1();function d(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function p(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function C(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function D(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(p(e)!==e)throw Error(d(188))}function y(e){var t=e.alternate;if(!t){if(t=p(e),t===null)throw Error(d(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var o=l.alternate;if(o===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===o.child){for(o=l.child;o;){if(o===n)return x(l),e;if(o===a)return x(l),t;o=o.sibling}throw Error(d(188))}if(n.return!==a.return)n=l,a=o;else{for(var u=!1,g=l.child;g;){if(g===n){u=!0,n=l,a=o;break}if(g===a){u=!0,a=l,n=o;break}g=g.sibling}if(!u){for(g=o.child;g;){if(g===n){u=!0,n=o,a=l;break}if(g===a){u=!0,a=o,n=l;break}g=g.sibling}if(!u)throw Error(d(189))}}if(n.alternate!==a)throw Error(d(190))}if(n.tag!==3)throw Error(d(188));return n.stateNode.current===n?e:t}function A(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A(e),t!==null)return t;e=e.sibling}return null}var z=Object.assign,_=Symbol.for("react.element"),q=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),ce=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),he=Symbol.iterator;function me(e){return e===null||typeof e!="object"?null:(e=he&&e[he]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function ie(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case J:return"Profiler";case oe:return"StrictMode";case X:return"Suspense";case P:return"SuspenseList";case j:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case Q:return e.displayName||"Context";case ce:return(e._context.displayName||"Context")+".Consumer";case le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:ie(e.type)||"Memo";case ae:t=e._payload,e=e._init;try{return ie(e(t))}catch{}}return null}var Oe=Array.isArray,T=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},Ee=[],Ye=-1;function S(e){return{current:e}}function O(e){0>Ye||(e.current=Ee[Ye],Ee[Ye]=null,Ye--)}function ne(e,t){Ye++,Ee[Ye]=e.current,e.current=t}var re=S(null),we=S(null),Me=S(null),Xe=S(null);function St(e,t){switch(ne(Me,t),ne(we,e),ne(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Mh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Mh(t),e=Dh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(re),ne(re,e)}function Re(){O(re),O(we),O(Me)}function Pt(e){e.memoizedState!==null&&ne(Xe,e);var t=re.current,n=Dh(t,e.type);t!==n&&(ne(we,e),ne(re,n))}function Je(e){we.current===e&&(O(re),O(we)),Xe.current===e&&(O(Xe),li._currentValue=ee)}var We,rt;function Ht(e){if(We===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);We=t&&t[1]||"",rt=-1<n.stack.indexOf(`
2
2
  at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Je+e+it}var Yt=!1;function tn(e,t){if(!e||Yt)return"";Yt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(B){var L=B}Reflect.construct(e,[],K)}else{try{K.call()}catch(B){L=B}e.call(K.prototype)}}else{try{throw Error()}catch(B){L=B}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(B){if(B&&L&&typeof B.stack=="string")return[B.stack,L.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=a.DetermineComponentFrameRoot(),u=o[0],g=o[1];if(u&&g){var w=u.split(`
3
+ `+We+e+rt}var Yt=!1;function tn(e,t){if(!e||Yt)return"";Yt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(U){var L=U}Reflect.construct(e,[],K)}else{try{K.call()}catch(U){L=U}e.call(K.prototype)}}else{try{throw Error()}catch(U){L=U}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(U){if(U&&L&&typeof U.stack=="string")return[U.stack,L.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=a.DetermineComponentFrameRoot(),u=o[0],g=o[1];if(u&&g){var w=u.split(`
4
4
  `),R=g.split(`
5
5
  `);for(l=a=0;a<w.length&&!w[a].includes("DetermineComponentFrameRoot");)a++;for(;l<R.length&&!R[l].includes("DetermineComponentFrameRoot");)l++;if(a===w.length||l===R.length)for(a=w.length-1,l=R.length-1;1<=a&&0<=l&&w[a]!==R[l];)l--;for(;1<=a&&0<=l;a--,l--)if(w[a]!==R[l]){if(a!==1||l!==1)do if(a--,l--,0>l||w[a]!==R[l]){var Y=`
6
6
  `+w[a].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=a&&0<=l);break}}}finally{Yt=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ht(n):""}function Qt(e,t){switch(e.tag){case 26:case 27:case 5:return Ht(e.type);case 16:return Ht("Lazy");case 13:return e.child!==t&&t!==null?Ht("Suspense Fallback"):Ht("Suspense");case 19:return Ht("SuspenseList");case 0:case 15:return tn(e.type,!1);case 11:return tn(e.type.render,!1);case 1:return tn(e.type,!0);case 31:return Ht("Activity");default:return""}}function fn(e){try{var t="",n=null;do t+=Qt(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
7
  Error generating stack: `+a.message+`
8
- `+a.stack}}var Bt=Object.prototype.hasOwnProperty,$e=i.unstable_scheduleCallback,gt=i.unstable_cancelCallback,kt=i.unstable_shouldYield,Te=i.unstable_requestPaint,mt=i.unstable_now,hn=i.unstable_getCurrentPriorityLevel,Hn=i.unstable_ImmediatePriority,kn=i.unstable_UserBlockingPriority,mn=i.unstable_NormalPriority,$=i.unstable_LowPriority,ue=i.unstable_IdlePriority,Xe=i.log,at=i.unstable_setDisableYieldValue,Be=null,Me=null;function zt(e){if(typeof Xe=="function"&&at(e),Me&&typeof Me.setStrictMode=="function")try{Me.setStrictMode(Be,e)}catch{}}var yt=Math.clz32?Math.clz32:zl,Aa=Math.log,ia=Math.LN2;function zl(e){return e>>>=0,e===0?32:31-(Aa(e)/ia|0)|0}var U=256,De=262144,Ke=4194304;function ft(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 Rt(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,o=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var g=a&134217727;return g!==0?(a=g&~o,a!==0?l=ft(a):(u&=g,u!==0?l=ft(u):n||(n=g&~e,n!==0&&(l=ft(n))))):(g=a&~o,g!==0?l=ft(g):u!==0?l=ft(u):n||(n=a&~e,n!==0&&(l=ft(n)))),l===0?0:t!==0&&t!==l&&(t&o)===0&&(o=l&-l,n=t&-t,o>=n||o===32&&(n&4194048)!==0)?t:l}function zn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ml(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 ra(){var e=Ke;return Ke<<=1,(Ke&62914560)===0&&(Ke=4194304),e}function Bn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xr(e,t,n,a,l,o){var u=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var g=e.entanglements,w=e.expirationTimes,R=e.hiddenUpdates;for(n=u&~n;0<n;){var Y=31-yt(n),K=1<<Y;g[Y]=0,w[Y]=-1;var L=R[Y];if(L!==null)for(R[Y]=null,Y=0;Y<L.length;Y++){var B=L[Y];B!==null&&(B.lane&=-536870913)}n&=~K}a!==0&&bi(e,a,0),o!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=o&~(u&~t))}function bi(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-yt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function vi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-yt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function mo(e,t){var n=t&-t;return n=(n&42)!==0?1:sa(n),(n&(e.suspendedLanes|t))!==0?0:n}function sa(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 yo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function xi(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:$h(e.type))}function Kn(e,t){var n=Z.p;try{return Z.p=e,t()}finally{Z.p=n}}var In=Math.random().toString(36).slice(2),Lt="__reactFiber$"+In,Gt="__reactProps$"+In,Mn="__reactContainer$"+In,Dl="__reactEvents$"+In,Ta="__reactListeners$"+In,Ea="__reactHandles$"+In,bo="__reactResources$"+In,ol="__reactMarker$"+In;function vo(e){delete e[Lt],delete e[Gt],delete e[Dl],delete e[Ta],delete e[Ea]}function ca(e){var t=e[Lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Mn]||n[Lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_h(e);e!==null;){if(n=e[Lt])return n;e=_h(e)}return t}e=n,n=e.parentNode}return null}function pe(e){if(e=e[Lt]||e[Mn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function se(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function be(e){var t=e[bo];return t||(t=e[bo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ve(e){e[ol]=!0}var _e=new Set,Ue={};function lt(e,t){ot(e,t),ot(e+"Capture",t)}function ot(e,t){for(Ue[e]=t,e=0;e<t.length;e++)_e.add(t[e])}var Ne=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]*$"),pn={},xo={};function $p(e){return Bt.call(xo,e)?!0:Bt.call(pn,e)?!1:Ne.test(e)?xo[e]=!0:(pn[e]=!0,!1)}function Si(e,t,n){if($p(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function wi(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 ua(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function Un(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Wp(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,o=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(u){n=""+u,o.call(this,u)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(u){n=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vr(e){if(!e._valueTracker){var t=yu(e)?"checked":"value";e._valueTracker=Wp(e,t,""+e[t])}}function bu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=yu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Ci(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ip=/[\n"\\]/g;function Nn(e){return e.replace(Ip,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Fr(e,t,n,a,l,o,u,g){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Un(t)):e.value!==""+Un(t)&&(e.value=""+Un(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Qr(e,u,Un(t)):n!=null?Qr(e,u,Un(n)):a!=null&&e.removeAttribute("value"),l==null&&o!=null&&(e.defaultChecked=!!o),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.name=""+Un(g):e.removeAttribute("name")}function vu(e,t,n,a,l,o,u,g){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Vr(e);return}n=n!=null?""+Un(n):"",t=t!=null?""+Un(t):n,g||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=g?e.checked:!!a,e.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),Vr(e)}function Qr(e,t,n){t==="number"&&Ci(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Al(e,t,n,a){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Un(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function xu(e,t,n){if(t!=null&&(t=""+Un(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Un(n):""}function Su(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(d(92));if(Oe(a)){if(1<a.length)throw Error(d(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Un(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Vr(e)}function Tl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pp=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 wu(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||Pp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Cu(e,t,n){if(t!=null&&typeof t!="object")throw Error(d(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&wu(e,l,a)}else for(var o in t)t.hasOwnProperty(o)&&wu(e,o,t[o])}function Kr(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 e0=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"]]),t0=/^[\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 ki(e){return t0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function da(){}var Zr=null;function Jr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var El=null,Rl=null;function ku(e){var t=pe(e);if(t&&(e=t.stateNode)){var n=e[Gt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Fr(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="'+Nn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[Gt]||null;if(!l)throw Error(d(90));Fr(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&bu(a)}break e;case"textarea":xu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Al(e,!!n.multiple,t,!1)}}}var $r=!1;function zu(e,t,n){if($r)return e(t,n);$r=!0;try{var a=e(t);return a}finally{if($r=!1,(El!==null||Rl!==null)&&(dr(),El&&(t=El,e=Rl,Rl=El=null,ku(t),e)))for(t=0;t<e.length;t++)ku(e[t])}}function So(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Gt]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(d(231,t,typeof n));return n}var fa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wr=!1;if(fa)try{var wo={};Object.defineProperty(wo,"passive",{get:function(){Wr=!0}}),window.addEventListener("test",wo,wo),window.removeEventListener("test",wo,wo)}catch{Wr=!1}var Ra=null,Ir=null,zi=null;function Mu(){if(zi)return zi;var e,t=Ir,n=t.length,a,l="value"in Ra?Ra.value:Ra.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var u=n-e;for(a=1;a<=u&&t[n-a]===l[o-a];a++);return zi=l.slice(e,1<a?1-a:void 0)}function Mi(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 Di(){return!0}function Du(){return!1}function yn(e){function t(n,a,l,o,u){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=o,this.target=u,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(n=e[g],this[g]=n?n(o):o[g]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Di:Du,this.isPropagationStopped=Du,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Di)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Di)},persist:function(){},isPersistent:Di}),t}var il={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ai=yn(il),Co=z({},il,{view:0,detail:0}),n0=yn(Co),Pr,es,ko,Ti=z({},Co,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ns,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!==ko&&(ko&&e.type==="mousemove"?(Pr=e.screenX-ko.screenX,es=e.screenY-ko.screenY):es=Pr=0,ko=e),Pr)},movementY:function(e){return"movementY"in e?e.movementY:es}}),Au=yn(Ti),a0=z({},Ti,{dataTransfer:0}),l0=yn(a0),o0=z({},Co,{relatedTarget:0}),ts=yn(o0),i0=z({},il,{animationName:0,elapsedTime:0,pseudoElement:0}),r0=yn(i0),s0=z({},il,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),c0=yn(s0),u0=z({},il,{data:0}),Tu=yn(u0),d0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},f0={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"},h0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function p0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=h0[e])?!!t[e]:!1}function ns(){return p0}var g0=z({},Co,{key:function(e){if(e.key){var t=d0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Mi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?f0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ns,charCode:function(e){return e.type==="keypress"?Mi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),m0=yn(g0),y0=z({},Ti,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eu=yn(y0),b0=z({},Co,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ns}),v0=yn(b0),x0=z({},il,{propertyName:0,elapsedTime:0,pseudoElement:0}),S0=yn(x0),w0=z({},Ti,{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}),C0=yn(w0),k0=z({},il,{newState:0,oldState:0}),z0=yn(k0),M0=[9,13,27,32],as=fa&&"CompositionEvent"in window,zo=null;fa&&"documentMode"in document&&(zo=document.documentMode);var D0=fa&&"TextEvent"in window&&!zo,Ru=fa&&(!as||zo&&8<zo&&11>=zo),Lu=" ",Ou=!1;function _u(e,t){switch(e){case"keyup":return M0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ll=!1;function A0(e,t){switch(e){case"compositionend":return Hu(t);case"keypress":return t.which!==32?null:(Ou=!0,Lu);case"textInput":return e=t.data,e===Lu&&Ou?null:e;default:return null}}function T0(e,t){if(Ll)return e==="compositionend"||!as&&_u(e,t)?(e=Mu(),zi=Ir=Ra=null,Ll=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ru&&t.locale!=="ko"?null:t.data;default:return null}}var E0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Bu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!E0[e.type]:t==="textarea"}function Uu(e,t,n,a){El?Rl?Rl.push(a):Rl=[a]:El=a,t=br(t,"onChange"),0<t.length&&(n=new Ai("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Mo=null,Do=null;function R0(e){xh(e,0)}function Ei(e){var t=se(e);if(bu(t))return e}function Nu(e,t){if(e==="change")return t}var ju=!1;if(fa){var ls;if(fa){var os="oninput"in document;if(!os){var qu=document.createElement("div");qu.setAttribute("oninput","return;"),os=typeof qu.oninput=="function"}ls=os}else ls=!1;ju=ls&&(!document.documentMode||9<document.documentMode)}function Yu(){Mo&&(Mo.detachEvent("onpropertychange",Gu),Do=Mo=null)}function Gu(e){if(e.propertyName==="value"&&Ei(Do)){var t=[];Uu(t,Do,e,Jr(e)),zu(R0,t)}}function L0(e,t,n){e==="focusin"?(Yu(),Mo=t,Do=n,Mo.attachEvent("onpropertychange",Gu)):e==="focusout"&&Yu()}function O0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ei(Do)}function _0(e,t){if(e==="click")return Ei(t)}function H0(e,t){if(e==="input"||e==="change")return Ei(t)}function B0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dn=typeof Object.is=="function"?Object.is:B0;function Ao(e,t){if(Dn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!Bt.call(t,l)||!Dn(e[l],t[l]))return!1}return!0}function Xu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vu(e,t){var n=Xu(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Xu(n)}}function Fu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ci(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ci(e.document)}return t}function is(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 U0=fa&&"documentMode"in document&&11>=document.documentMode,Ol=null,rs=null,To=null,ss=!1;function Ku(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ss||Ol==null||Ol!==Ci(a)||(a=Ol,"selectionStart"in a&&is(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),To&&Ao(To,a)||(To=a,a=br(rs,"onSelect"),0<a.length&&(t=new Ai("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Ol)))}function rl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _l={animationend:rl("Animation","AnimationEnd"),animationiteration:rl("Animation","AnimationIteration"),animationstart:rl("Animation","AnimationStart"),transitionrun:rl("Transition","TransitionRun"),transitionstart:rl("Transition","TransitionStart"),transitioncancel:rl("Transition","TransitionCancel"),transitionend:rl("Transition","TransitionEnd")},cs={},Zu={};fa&&(Zu=document.createElement("div").style,"AnimationEvent"in window||(delete _l.animationend.animation,delete _l.animationiteration.animation,delete _l.animationstart.animation),"TransitionEvent"in window||delete _l.transitionend.transition);function sl(e){if(cs[e])return cs[e];if(!_l[e])return e;var t=_l[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zu)return cs[e]=t[n];return e}var Ju=sl("animationend"),$u=sl("animationiteration"),Wu=sl("animationstart"),N0=sl("transitionrun"),j0=sl("transitionstart"),q0=sl("transitioncancel"),Iu=sl("transitionend"),Pu=new Map,us="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(" ");us.push("scrollEnd");function Zn(e,t){Pu.set(e,t),lt(t,[e])}var Ri=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==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)},jn=[],Hl=0,ds=0;function Li(){for(var e=Hl,t=ds=Hl=0;t<e;){var n=jn[t];jn[t++]=null;var a=jn[t];jn[t++]=null;var l=jn[t];jn[t++]=null;var o=jn[t];if(jn[t++]=null,a!==null&&l!==null){var u=a.pending;u===null?l.next=l:(l.next=u.next,u.next=l),a.pending=l}o!==0&&ed(n,l,o)}}function Oi(e,t,n,a){jn[Hl++]=e,jn[Hl++]=t,jn[Hl++]=n,jn[Hl++]=a,ds|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function fs(e,t,n,a){return Oi(e,t,n,a),_i(e)}function cl(e,t){return Oi(e,null,null,t),_i(e)}function ed(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!1,o=e.return;o!==null;)o.childLanes|=n,a=o.alternate,a!==null&&(a.childLanes|=n),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(l=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,l&&t!==null&&(l=31-yt(n),e=o.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),o):null}function _i(e){if(50<Wo)throw Wo=0,Sc=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Bl={};function Y0(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(e,t,n,a){return new Y0(e,t,n,a)}function hs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ha(e,t){var n=e.alternate;return n===null?(n=An(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function td(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 Hi(e,t,n,a,l,o){var u=0;if(a=e,typeof e=="function")hs(e)&&(u=1);else if(typeof e=="string")u=Qg(e,n,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case j:return e=An(31,n,t,l),e.elementType=j,e.lanes=o,e;case G:return ul(n.children,l,o,t);case oe:u=8,l|=24;break;case J:return e=An(12,n,t,l|2),e.elementType=J,e.lanes=o,e;case X:return e=An(13,n,t,l),e.elementType=X,e.lanes=o,e;case P:return e=An(19,n,t,l),e.elementType=P,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:u=10;break e;case ce:u=9;break e;case le:u=11;break e;case te:u=14;break e;case ae:u=16,a=null;break e}u=29,n=Error(d(130,e===null?"null":typeof e,"")),a=null}return t=An(u,n,t,l),t.elementType=e,t.type=a,t.lanes=o,t}function ul(e,t,n,a){return e=An(7,e,a,t),e.lanes=n,e}function ps(e,t,n){return e=An(6,e,null,t),e.lanes=n,e}function nd(e){var t=An(18,null,null,0);return t.stateNode=e,t}function gs(e,t,n){return t=An(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ad=new WeakMap;function qn(e,t){if(typeof e=="object"&&e!==null){var n=ad.get(e);return n!==void 0?n:(t={value:e,source:t,stack:fn(t)},ad.set(e,t),t)}return{value:e,source:t,stack:fn(t)}}var Ul=[],Nl=0,Bi=null,Eo=0,Yn=[],Gn=0,La=null,Pn=1,ea="";function pa(e,t){Ul[Nl++]=Eo,Ul[Nl++]=Bi,Bi=e,Eo=t}function ld(e,t,n){Yn[Gn++]=Pn,Yn[Gn++]=ea,Yn[Gn++]=La,La=e;var a=Pn;e=ea;var l=32-yt(a)-1;a&=~(1<<l),n+=1;var o=32-yt(t)+l;if(30<o){var u=l-l%5;o=(a&(1<<u)-1).toString(32),a>>=u,l-=u,Pn=1<<32-yt(t)+l|n<<l|a,ea=o+e}else Pn=1<<o|n<<l|a,ea=e}function ms(e){e.return!==null&&(pa(e,1),ld(e,1,0))}function ys(e){for(;e===Bi;)Bi=Ul[--Nl],Ul[Nl]=null,Eo=Ul[--Nl],Ul[Nl]=null;for(;e===La;)La=Yn[--Gn],Yn[Gn]=null,ea=Yn[--Gn],Yn[Gn]=null,Pn=Yn[--Gn],Yn[Gn]=null}function od(e,t){Yn[Gn++]=Pn,Yn[Gn++]=ea,Yn[Gn++]=La,Pn=t.id,ea=t.overflow,La=e}var an=null,Tt=null,nt=!1,Oa=null,Xn=!1,bs=Error(d(519));function _a(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ro(qn(t,e)),bs}function id(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Lt]=e,t[Gt]=a,n){case"dialog":Ie("cancel",t),Ie("close",t);break;case"iframe":case"object":case"embed":Ie("load",t);break;case"video":case"audio":for(n=0;n<Po.length;n++)Ie(Po[n],t);break;case"source":Ie("error",t);break;case"img":case"image":case"link":Ie("error",t),Ie("load",t);break;case"details":Ie("toggle",t);break;case"input":Ie("invalid",t),vu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ie("invalid",t);break;case"textarea":Ie("invalid",t),Su(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||kh(t.textContent,n)?(a.popover!=null&&(Ie("beforetoggle",t),Ie("toggle",t)),a.onScroll!=null&&Ie("scroll",t),a.onScrollEnd!=null&&Ie("scrollend",t),a.onClick!=null&&(t.onclick=da),t=!0):t=!1,t||_a(e,!0)}function rd(e){for(an=e.return;an;)switch(an.tag){case 5:case 31:case 13:Xn=!1;return;case 27:case 3:Xn=!0;return;default:an=an.return}}function jl(e){if(e!==an)return!1;if(!nt)return rd(e),nt=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Bc(e.type,e.memoizedProps)),n=!n),n&&Tt&&_a(e),rd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Tt=Oh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Tt=Oh(e)}else t===27?(t=Tt,Za(e.type)?(e=Yc,Yc=null,Tt=e):Tt=t):Tt=an?Fn(e.stateNode.nextSibling):null;return!0}function dl(){Tt=an=null,nt=!1}function vs(){var e=Oa;return e!==null&&(Sn===null?Sn=e:Sn.push.apply(Sn,e),Oa=null),e}function Ro(e){Oa===null?Oa=[e]:Oa.push(e)}var xs=S(null),fl=null,ga=null;function Ha(e,t,n){ne(xs,t._currentValue),t._currentValue=n}function ma(e){e._currentValue=xs.current,O(xs)}function Ss(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function ws(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var o=l.dependencies;if(o!==null){var u=l.child;o=o.firstContext;e:for(;o!==null;){var g=o;o=l;for(var w=0;w<t.length;w++)if(g.context===t[w]){o.lanes|=n,g=o.alternate,g!==null&&(g.lanes|=n),Ss(o.return,n,e),a||(u=null);break e}o=g.next}}else if(l.tag===18){if(u=l.return,u===null)throw Error(d(341));u.lanes|=n,o=u.alternate,o!==null&&(o.lanes|=n),Ss(u,n,e),u=null}else u=l.child;if(u!==null)u.return=l;else for(u=l;u!==null;){if(u===e){u=null;break}if(l=u.sibling,l!==null){l.return=u.return,u=l;break}u=u.return}l=u}}function ql(e,t,n,a){e=null;for(var l=t,o=!1;l!==null;){if(!o){if((l.flags&524288)!==0)o=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var u=l.alternate;if(u===null)throw Error(d(387));if(u=u.memoizedProps,u!==null){var g=l.type;Dn(l.pendingProps.value,u.value)||(e!==null?e.push(g):e=[g])}}else if(l===Ge.current){if(u=l.alternate,u===null)throw Error(d(387));u.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(li):e=[li])}l=l.return}e!==null&&ws(t,e,n,a),t.flags|=262144}function Ui(e){for(e=e.firstContext;e!==null;){if(!Dn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function hl(e){fl=e,ga=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ln(e){return sd(fl,e)}function Ni(e,t){return fl===null&&hl(e),sd(e,t)}function sd(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ga===null){if(e===null)throw Error(d(308));ga=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ga=ga.next=t;return n}var G0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},X0=i.unstable_scheduleCallback,V0=i.unstable_NormalPriority,Kt={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cs(){return{controller:new G0,data:new Map,refCount:0}}function Lo(e){e.refCount--,e.refCount===0&&X0(V0,function(){e.controller.abort()})}var Oo=null,ks=0,Yl=0,Gl=null;function F0(e,t){if(Oo===null){var n=Oo=[];ks=0,Yl=Dc(),Gl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return ks++,t.then(cd,cd),t}function cd(){if(--ks===0&&Oo!==null){Gl!==null&&(Gl.status="fulfilled");var e=Oo;Oo=null,Yl=0,Gl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Q0(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),a}var ud=T.S;T.S=function(e,t){Zf=mt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&F0(e,t),ud!==null&&ud(e,t)};var pl=S(null);function zs(){var e=pl.current;return e!==null?e:Mt.pooledCache}function ji(e,t){t===null?ne(pl,pl.current):ne(pl,t.pool)}function dd(){var e=zs();return e===null?null:{parent:Kt._currentValue,pool:e}}var Xl=Error(d(460)),Ms=Error(d(474)),qi=Error(d(542)),Yi={then:function(){}};function fd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function hd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(da,da),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,gd(e),e;default:if(typeof t.status=="string")t.then(da,da);else{if(e=Mt,e!==null&&100<e.shellSuspendCounter)throw Error(d(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,gd(e),e}throw ml=t,Xl}}function gl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ml=n,Xl):n}}var ml=null;function pd(){if(ml===null)throw Error(d(459));var e=ml;return ml=null,e}function gd(e){if(e===Xl||e===qi)throw Error(d(483))}var Vl=null,_o=0;function Gi(e){var t=_o;return _o+=1,Vl===null&&(Vl=[]),hd(Vl,e,t)}function Ho(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Xi(e,t){throw t.$$typeof===_?Error(d(525)):(e=Object.prototype.toString.call(t),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function md(e){function t(M,k){if(e){var E=M.deletions;E===null?(M.deletions=[k],M.flags|=16):E.push(k)}}function n(M,k){if(!e)return null;for(;k!==null;)t(M,k),k=k.sibling;return null}function a(M){for(var k=new Map;M!==null;)M.key!==null?k.set(M.key,M):k.set(M.index,M),M=M.sibling;return k}function l(M,k){return M=ha(M,k),M.index=0,M.sibling=null,M}function o(M,k,E){return M.index=E,e?(E=M.alternate,E!==null?(E=E.index,E<k?(M.flags|=67108866,k):E):(M.flags|=67108866,k)):(M.flags|=1048576,k)}function u(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function g(M,k,E,V){return k===null||k.tag!==6?(k=ps(E,M.mode,V),k.return=M,k):(k=l(k,E),k.return=M,k)}function w(M,k,E,V){var Ae=E.type;return Ae===G?Y(M,k,E.props.children,V,E.key):k!==null&&(k.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===ae&&gl(Ae)===k.type)?(k=l(k,E.props),Ho(k,E),k.return=M,k):(k=Hi(E.type,E.key,E.props,null,M.mode,V),Ho(k,E),k.return=M,k)}function R(M,k,E,V){return k===null||k.tag!==4||k.stateNode.containerInfo!==E.containerInfo||k.stateNode.implementation!==E.implementation?(k=gs(E,M.mode,V),k.return=M,k):(k=l(k,E.children||[]),k.return=M,k)}function Y(M,k,E,V,Ae){return k===null||k.tag!==7?(k=ul(E,M.mode,V,Ae),k.return=M,k):(k=l(k,E),k.return=M,k)}function K(M,k,E){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=ps(""+k,M.mode,E),k.return=M,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case q:return E=Hi(k.type,k.key,k.props,null,M.mode,E),Ho(E,k),E.return=M,E;case H:return k=gs(k,M.mode,E),k.return=M,k;case ae:return k=gl(k),K(M,k,E)}if(Oe(k)||me(k))return k=ul(k,M.mode,E,null),k.return=M,k;if(typeof k.then=="function")return K(M,Gi(k),E);if(k.$$typeof===Q)return K(M,Ni(M,k),E);Xi(M,k)}return null}function L(M,k,E,V){var Ae=k!==null?k.key:null;if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return Ae!==null?null:g(M,k,""+E,V);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case q:return E.key===Ae?w(M,k,E,V):null;case H:return E.key===Ae?R(M,k,E,V):null;case ae:return E=gl(E),L(M,k,E,V)}if(Oe(E)||me(E))return Ae!==null?null:Y(M,k,E,V,null);if(typeof E.then=="function")return L(M,k,Gi(E),V);if(E.$$typeof===Q)return L(M,k,Ni(M,E),V);Xi(M,E)}return null}function B(M,k,E,V,Ae){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return M=M.get(E)||null,g(k,M,""+V,Ae);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case q:return M=M.get(V.key===null?E:V.key)||null,w(k,M,V,Ae);case H:return M=M.get(V.key===null?E:V.key)||null,R(k,M,V,Ae);case ae:return V=gl(V),B(M,k,E,V,Ae)}if(Oe(V)||me(V))return M=M.get(E)||null,Y(k,M,V,Ae,null);if(typeof V.then=="function")return B(M,k,E,Gi(V),Ae);if(V.$$typeof===Q)return B(M,k,E,Ni(k,V),Ae);Xi(k,V)}return null}function ye(M,k,E,V){for(var Ae=null,rt=null,Ce=k,Qe=k=0,et=null;Ce!==null&&Qe<E.length;Qe++){Ce.index>Qe?(et=Ce,Ce=null):et=Ce.sibling;var st=L(M,Ce,E[Qe],V);if(st===null){Ce===null&&(Ce=et);break}e&&Ce&&st.alternate===null&&t(M,Ce),k=o(st,k,Qe),rt===null?Ae=st:rt.sibling=st,rt=st,Ce=et}if(Qe===E.length)return n(M,Ce),nt&&pa(M,Qe),Ae;if(Ce===null){for(;Qe<E.length;Qe++)Ce=K(M,E[Qe],V),Ce!==null&&(k=o(Ce,k,Qe),rt===null?Ae=Ce:rt.sibling=Ce,rt=Ce);return nt&&pa(M,Qe),Ae}for(Ce=a(Ce);Qe<E.length;Qe++)et=B(Ce,M,Qe,E[Qe],V),et!==null&&(e&&et.alternate!==null&&Ce.delete(et.key===null?Qe:et.key),k=o(et,k,Qe),rt===null?Ae=et:rt.sibling=et,rt=et);return e&&Ce.forEach(function(Pa){return t(M,Pa)}),nt&&pa(M,Qe),Ae}function Le(M,k,E,V){if(E==null)throw Error(d(151));for(var Ae=null,rt=null,Ce=k,Qe=k=0,et=null,st=E.next();Ce!==null&&!st.done;Qe++,st=E.next()){Ce.index>Qe?(et=Ce,Ce=null):et=Ce.sibling;var Pa=L(M,Ce,st.value,V);if(Pa===null){Ce===null&&(Ce=et);break}e&&Ce&&Pa.alternate===null&&t(M,Ce),k=o(Pa,k,Qe),rt===null?Ae=Pa:rt.sibling=Pa,rt=Pa,Ce=et}if(st.done)return n(M,Ce),nt&&pa(M,Qe),Ae;if(Ce===null){for(;!st.done;Qe++,st=E.next())st=K(M,st.value,V),st!==null&&(k=o(st,k,Qe),rt===null?Ae=st:rt.sibling=st,rt=st);return nt&&pa(M,Qe),Ae}for(Ce=a(Ce);!st.done;Qe++,st=E.next())st=B(Ce,M,Qe,st.value,V),st!==null&&(e&&st.alternate!==null&&Ce.delete(st.key===null?Qe:st.key),k=o(st,k,Qe),rt===null?Ae=st:rt.sibling=st,rt=st);return e&&Ce.forEach(function(am){return t(M,am)}),nt&&pa(M,Qe),Ae}function Ct(M,k,E,V){if(typeof E=="object"&&E!==null&&E.type===G&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case q:e:{for(var Ae=E.key;k!==null;){if(k.key===Ae){if(Ae=E.type,Ae===G){if(k.tag===7){n(M,k.sibling),V=l(k,E.props.children),V.return=M,M=V;break e}}else if(k.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===ae&&gl(Ae)===k.type){n(M,k.sibling),V=l(k,E.props),Ho(V,E),V.return=M,M=V;break e}n(M,k);break}else t(M,k);k=k.sibling}E.type===G?(V=ul(E.props.children,M.mode,V,E.key),V.return=M,M=V):(V=Hi(E.type,E.key,E.props,null,M.mode,V),Ho(V,E),V.return=M,M=V)}return u(M);case H:e:{for(Ae=E.key;k!==null;){if(k.key===Ae)if(k.tag===4&&k.stateNode.containerInfo===E.containerInfo&&k.stateNode.implementation===E.implementation){n(M,k.sibling),V=l(k,E.children||[]),V.return=M,M=V;break e}else{n(M,k);break}else t(M,k);k=k.sibling}V=gs(E,M.mode,V),V.return=M,M=V}return u(M);case ae:return E=gl(E),Ct(M,k,E,V)}if(Oe(E))return ye(M,k,E,V);if(me(E)){if(Ae=me(E),typeof Ae!="function")throw Error(d(150));return E=Ae.call(E),Le(M,k,E,V)}if(typeof E.then=="function")return Ct(M,k,Gi(E),V);if(E.$$typeof===Q)return Ct(M,k,Ni(M,E),V);Xi(M,E)}return typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint"?(E=""+E,k!==null&&k.tag===6?(n(M,k.sibling),V=l(k,E),V.return=M,M=V):(n(M,k),V=ps(E,M.mode,V),V.return=M,M=V),u(M)):n(M,k)}return function(M,k,E,V){try{_o=0;var Ae=Ct(M,k,E,V);return Vl=null,Ae}catch(Ce){if(Ce===Xl||Ce===qi)throw Ce;var rt=An(29,Ce,null,M.mode);return rt.lanes=V,rt.return=M,rt}}}var yl=md(!0),yd=md(!1),Ba=!1;function Ds(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function As(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 Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Na(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ct&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=_i(e),ed(e,null,n),t}return Oi(e,a,t,n),_i(e)}function Bo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,vi(e,n)}}function Ts(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var u={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?l=o=u:o=o.next=u,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Es=!1;function Uo(){if(Es){var e=Gl;if(e!==null)throw e}}function No(e,t,n,a){Es=!1;var l=e.updateQueue;Ba=!1;var o=l.firstBaseUpdate,u=l.lastBaseUpdate,g=l.shared.pending;if(g!==null){l.shared.pending=null;var w=g,R=w.next;w.next=null,u===null?o=R:u.next=R,u=w;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,g=Y.lastBaseUpdate,g!==u&&(g===null?Y.firstBaseUpdate=R:g.next=R,Y.lastBaseUpdate=w))}if(o!==null){var K=l.baseState;u=0,Y=R=w=null,g=o;do{var L=g.lane&-536870913,B=L!==g.lane;if(B?(Pe&L)===L:(a&L)===L){L!==0&&L===Yl&&(Es=!0),Y!==null&&(Y=Y.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var ye=e,Le=g;L=t;var Ct=n;switch(Le.tag){case 1:if(ye=Le.payload,typeof ye=="function"){K=ye.call(Ct,K,L);break e}K=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Le.payload,L=typeof ye=="function"?ye.call(Ct,K,L):ye,L==null)break e;K=z({},K,L);break e;case 2:Ba=!0}}L=g.callback,L!==null&&(e.flags|=64,B&&(e.flags|=8192),B=l.callbacks,B===null?l.callbacks=[L]:B.push(L))}else B={lane:L,tag:g.tag,payload:g.payload,callback:g.callback,next:null},Y===null?(R=Y=B,w=K):Y=Y.next=B,u|=L;if(g=g.next,g===null){if(g=l.shared.pending,g===null)break;B=g,g=B.next,B.next=null,l.lastBaseUpdate=B,l.shared.pending=null}}while(!0);Y===null&&(w=K),l.baseState=w,l.firstBaseUpdate=R,l.lastBaseUpdate=Y,o===null&&(l.shared.lanes=0),Xa|=u,e.lanes=u,e.memoizedState=K}}function bd(e,t){if(typeof e!="function")throw Error(d(191,e));e.call(t)}function vd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)bd(n[e],t)}var Fl=S(null),Vi=S(0);function xd(e,t){e=za,ne(Vi,e),ne(Fl,t),za=e|t.baseLanes}function Rs(){ne(Vi,za),ne(Fl,Fl.current)}function Ls(){za=Vi.current,O(Fl),O(Vi)}var Tn=S(null),Vn=null;function ja(e){var t=e.alternate;ne(Xt,Xt.current&1),ne(Tn,e),Vn===null&&(t===null||Fl.current!==null||t.memoizedState!==null)&&(Vn=e)}function Os(e){ne(Xt,Xt.current),ne(Tn,e),Vn===null&&(Vn=e)}function Sd(e){e.tag===22?(ne(Xt,Xt.current),ne(Tn,e),Vn===null&&(Vn=e)):qa()}function qa(){ne(Xt,Xt.current),ne(Tn,Tn.current)}function En(e){O(Tn),Vn===e&&(Vn=null),O(Xt)}var Xt=S(0);function Fi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||jc(n)||qc(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 ya=0,Fe=null,St=null,Zt=null,Qi=!1,Ql=!1,bl=!1,Ki=0,jo=0,Kl=null,K0=0;function Nt(){throw Error(d(321))}function _s(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Dn(e[n],t[n]))return!1;return!0}function Hs(e,t,n,a,l,o){return ya=o,Fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?lf:$s,bl=!1,o=n(a,l),bl=!1,Ql&&(o=Cd(t,n,a,l)),wd(e),o}function wd(e){T.H=Go;var t=St!==null&&St.next!==null;if(ya=0,Zt=St=Fe=null,Qi=!1,jo=0,Kl=null,t)throw Error(d(300));e===null||Jt||(e=e.dependencies,e!==null&&Ui(e)&&(Jt=!0))}function Cd(e,t,n,a){Fe=e;var l=0;do{if(Ql&&(Kl=null),jo=0,Ql=!1,25<=l)throw Error(d(301));if(l+=1,Zt=St=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}T.H=of,o=t(n,a)}while(Ql);return o}function Z0(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?qo(t):t,e=e.useState()[0],(St!==null?St.memoizedState:null)!==e&&(Fe.flags|=1024),t}function Bs(){var e=Ki!==0;return Ki=0,e}function Us(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ns(e){if(Qi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qi=!1}ya=0,Zt=St=Fe=null,Ql=!1,jo=Ki=0,Kl=null}function gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?Fe.memoizedState=Zt=e:Zt=Zt.next=e,Zt}function Vt(){if(St===null){var e=Fe.alternate;e=e!==null?e.memoizedState:null}else e=St.next;var t=Zt===null?Fe.memoizedState:Zt.next;if(t!==null)Zt=t,St=e;else{if(e===null)throw Fe.alternate===null?Error(d(467)):Error(d(310));St=e,e={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},Zt===null?Fe.memoizedState=Zt=e:Zt=Zt.next=e}return Zt}function Zi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qo(e){var t=jo;return jo+=1,Kl===null&&(Kl=[]),e=hd(Kl,e,t),t=Fe,(Zt===null?t.memoizedState:Zt.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?lf:$s),e}function Ji(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return qo(e);if(e.$$typeof===Q)return ln(e)}throw Error(d(438,String(e)))}function js(e){var t=null,n=Fe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Fe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Zi(),Fe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=W;return t.index++,n}function ba(e,t){return typeof t=="function"?t(e):t}function $i(e){var t=Vt();return qs(t,St,e)}function qs(e,t,n){var a=e.queue;if(a===null)throw Error(d(311));a.lastRenderedReducer=n;var l=e.baseQueue,o=a.pending;if(o!==null){if(l!==null){var u=l.next;l.next=o.next,o.next=u}t.baseQueue=l=o,a.pending=null}if(o=e.baseState,l===null)e.memoizedState=o;else{t=l.next;var g=u=null,w=null,R=t,Y=!1;do{var K=R.lane&-536870913;if(K!==R.lane?(Pe&K)===K:(ya&K)===K){var L=R.revertLane;if(L===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),K===Yl&&(Y=!0);else if((ya&L)===L){R=R.next,L===Yl&&(Y=!0);continue}else K={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},w===null?(g=w=K,u=o):w=w.next=K,Fe.lanes|=L,Xa|=L;K=R.action,bl&&n(o,K),o=R.hasEagerState?R.eagerState:n(o,K)}else L={lane:K,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},w===null?(g=w=L,u=o):w=w.next=L,Fe.lanes|=K,Xa|=K;R=R.next}while(R!==null&&R!==t);if(w===null?u=o:w.next=g,!Dn(o,e.memoizedState)&&(Jt=!0,Y&&(n=Gl,n!==null)))throw n;e.memoizedState=o,e.baseState=u,e.baseQueue=w,a.lastRenderedState=o}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ys(e){var t=Vt(),n=t.queue;if(n===null)throw Error(d(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,o=t.memoizedState;if(l!==null){n.pending=null;var u=l=l.next;do o=e(o,u.action),u=u.next;while(u!==l);Dn(o,t.memoizedState)||(Jt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,a]}function kd(e,t,n){var a=Fe,l=Vt(),o=nt;if(o){if(n===void 0)throw Error(d(407));n=n()}else n=t();var u=!Dn((St||l).memoizedState,n);if(u&&(l.memoizedState=n,Jt=!0),l=l.queue,Vs(Dd.bind(null,a,l,e),[e]),l.getSnapshot!==t||u||Zt!==null&&Zt.memoizedState.tag&1){if(a.flags|=2048,Zl(9,{destroy:void 0},Md.bind(null,a,l,n,t),null),Mt===null)throw Error(d(349));o||(ya&127)!==0||zd(a,t,n)}return n}function zd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Fe.updateQueue,t===null?(t=Zi(),Fe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Md(e,t,n,a){t.value=n,t.getSnapshot=a,Ad(t)&&Td(e)}function Dd(e,t,n){return n(function(){Ad(t)&&Td(e)})}function Ad(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Dn(e,n)}catch{return!0}}function Td(e){var t=cl(e,2);t!==null&&wn(t,e,2)}function Gs(e){var t=gn();if(typeof e=="function"){var n=e;if(e=n(),bl){zt(!0);try{n()}finally{zt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t}function Ed(e,t,n,a){return e.baseState=n,qs(e,St,typeof a=="function"?a:ba)}function J0(e,t,n,a,l){if(Pi(e))throw Error(d(485));if(e=t.action,e!==null){var o={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){o.listeners.push(u)}};T.T!==null?n(!0):o.isTransition=!1,a(o),n=t.pending,n===null?(o.next=t.pending=o,Rd(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Rd(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var o=T.T,u={};T.T=u;try{var g=n(l,a),w=T.S;w!==null&&w(u,g),Ld(e,t,g)}catch(R){Xs(e,t,R)}finally{o!==null&&u.types!==null&&(o.types=u.types),T.T=o}}else try{o=n(l,a),Ld(e,t,o)}catch(R){Xs(e,t,R)}}function Ld(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Od(e,t,a)},function(a){return Xs(e,t,a)}):Od(e,t,n)}function Od(e,t,n){t.status="fulfilled",t.value=n,_d(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Rd(e,n)))}function Xs(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,_d(t),t=t.next;while(t!==a)}e.action=null}function _d(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Hd(e,t){return t}function Bd(e,t){if(nt){var n=Mt.formState;if(n!==null){e:{var a=Fe;if(nt){if(Tt){t:{for(var l=Tt,o=Xn;l.nodeType!==8;){if(!o){l=null;break t}if(l=Fn(l.nextSibling),l===null){l=null;break t}}o=l.data,l=o==="F!"||o==="F"?l:null}if(l){Tt=Fn(l.nextSibling),a=l.data==="F!";break e}}_a(a)}a=!1}a&&(t=n[0])}}return n=gn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hd,lastRenderedState:t},n.queue=a,n=tf.bind(null,Fe,a),a.dispatch=n,a=Gs(!1),o=Js.bind(null,Fe,!1,a.queue),a=gn(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=J0.bind(null,Fe,l,o,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Ud(e){var t=Vt();return Nd(t,St,e)}function Nd(e,t,n){if(t=qs(e,t,Hd)[0],e=$i(ba)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=qo(t)}catch(u){throw u===Xl?qi:u}else a=t;t=Vt();var l=t.queue,o=l.dispatch;return n!==t.memoizedState&&(Fe.flags|=2048,Zl(9,{destroy:void 0},$0.bind(null,l,n),null)),[a,o,e]}function $0(e,t){e.action=t}function jd(e){var t=Vt(),n=St;if(n!==null)return Nd(t,n,e);Vt(),t=t.memoizedState,n=Vt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Zl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Fe.updateQueue,t===null&&(t=Zi(),Fe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function qd(){return Vt().memoizedState}function Wi(e,t,n,a){var l=gn();Fe.flags|=e,l.memoizedState=Zl(1|t,{destroy:void 0},n,a===void 0?null:a)}function Ii(e,t,n,a){var l=Vt();a=a===void 0?null:a;var o=l.memoizedState.inst;St!==null&&a!==null&&_s(a,St.memoizedState.deps)?l.memoizedState=Zl(t,o,n,a):(Fe.flags|=e,l.memoizedState=Zl(1|t,o,n,a))}function Yd(e,t){Wi(8390656,8,e,t)}function Vs(e,t){Ii(2048,8,e,t)}function W0(e){Fe.flags|=4;var t=Fe.updateQueue;if(t===null)t=Zi(),Fe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Gd(e){var t=Vt().memoizedState;return W0({ref:t,nextImpl:e}),function(){if((ct&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function Xd(e,t){return Ii(4,2,e,t)}function Vd(e,t){return Ii(4,4,e,t)}function Fd(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 Qd(e,t,n){n=n!=null?n.concat([e]):null,Ii(4,4,Fd.bind(null,t,e),n)}function Fs(){}function Kd(e,t){var n=Vt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&_s(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Zd(e,t){var n=Vt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&_s(t,a[1]))return a[0];if(a=e(),bl){zt(!0);try{e()}finally{zt(!1)}}return n.memoizedState=[a,t],a}function Qs(e,t,n){return n===void 0||(ya&1073741824)!==0&&(Pe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=$f(),Fe.lanes|=e,Xa|=e,n)}function Jd(e,t,n,a){return Dn(n,t)?n:Fl.current!==null?(e=Qs(e,n,a),Dn(e,t)||(Jt=!0),e):(ya&42)===0||(ya&1073741824)!==0&&(Pe&261930)===0?(Jt=!0,e.memoizedState=n):(e=$f(),Fe.lanes|=e,Xa|=e,t)}function $d(e,t,n,a,l){var o=Z.p;Z.p=o!==0&&8>o?o:8;var u=T.T,g={};T.T=g,Js(e,!1,t,n);try{var w=l(),R=T.S;if(R!==null&&R(g,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var Y=Q0(w,a);Yo(e,t,Y,On(e))}else Yo(e,t,a,On(e))}catch(K){Yo(e,t,{then:function(){},status:"rejected",reason:K},On())}finally{Z.p=o,u!==null&&g.types!==null&&(u.types=g.types),T.T=u}}function I0(){}function Ks(e,t,n,a){if(e.tag!==5)throw Error(d(476));var l=Wd(e).queue;$d(e,l,t,ee,n===null?I0:function(){return Id(e),n(a)})}function Wd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Id(e){var t=Wd(e);t.next===null&&(t=e.alternate.memoizedState),Yo(e,t.next.queue,{},On())}function Zs(){return ln(li)}function Pd(){return Vt().memoizedState}function ef(){return Vt().memoizedState}function P0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=On();e=Ua(n);var a=Na(t,e,n);a!==null&&(wn(a,t,n),Bo(a,t,n)),t={cache:Cs()},e.payload=t;return}t=t.return}}function eg(e,t,n){var a=On();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Pi(e)?nf(t,n):(n=fs(e,t,n,a),n!==null&&(wn(n,e,a),af(n,t,a)))}function tf(e,t,n){var a=On();Yo(e,t,n,a)}function Yo(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Pi(e))nf(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var u=t.lastRenderedState,g=o(u,n);if(l.hasEagerState=!0,l.eagerState=g,Dn(g,u))return Oi(e,t,l,0),Mt===null&&Li(),!1}catch{}if(n=fs(e,t,l,a),n!==null)return wn(n,e,a),af(n,t,a),!0}return!1}function Js(e,t,n,a){if(a={lane:2,revertLane:Dc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Pi(e)){if(t)throw Error(d(479))}else t=fs(e,n,a,2),t!==null&&wn(t,e,2)}function Pi(e){var t=e.alternate;return e===Fe||t!==null&&t===Fe}function nf(e,t){Ql=Qi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function af(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,vi(e,n)}}var Go={readContext:ln,use:Ji,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt};Go.useEffectEvent=Nt;var lf={readContext:ln,use:Ji,useCallback:function(e,t){return gn().memoizedState=[e,t===void 0?null:t],e},useContext:ln,useEffect:Yd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Wi(4194308,4,Fd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wi(4194308,4,e,t)},useInsertionEffect:function(e,t){Wi(4,2,e,t)},useMemo:function(e,t){var n=gn();t=t===void 0?null:t;var a=e();if(bl){zt(!0);try{e()}finally{zt(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=gn();if(n!==void 0){var l=n(t);if(bl){zt(!0);try{n(t)}finally{zt(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=eg.bind(null,Fe,e),[a.memoizedState,e]},useRef:function(e){var t=gn();return e={current:e},t.memoizedState=e},useState:function(e){e=Gs(e);var t=e.queue,n=tf.bind(null,Fe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Fs,useDeferredValue:function(e,t){var n=gn();return Qs(n,e,t)},useTransition:function(){var e=Gs(!1);return e=$d.bind(null,Fe,e.queue,!0,!1),gn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Fe,l=gn();if(nt){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),Mt===null)throw Error(d(349));(Pe&127)!==0||zd(a,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Yd(Dd.bind(null,a,o,e),[e]),a.flags|=2048,Zl(9,{destroy:void 0},Md.bind(null,a,o,n,t),null),n},useId:function(){var e=gn(),t=Mt.identifierPrefix;if(nt){var n=ea,a=Pn;n=(a&~(1<<32-yt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ki++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=K0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Zs,useFormState:Bd,useActionState:Bd,useOptimistic:function(e){var t=gn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Js.bind(null,Fe,!0,n),n.dispatch=t,[e,t]},useMemoCache:js,useCacheRefresh:function(){return gn().memoizedState=P0.bind(null,Fe)},useEffectEvent:function(e){var t=gn(),n={impl:e};return t.memoizedState=n,function(){if((ct&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},$s={readContext:ln,use:Ji,useCallback:Kd,useContext:ln,useEffect:Vs,useImperativeHandle:Qd,useInsertionEffect:Xd,useLayoutEffect:Vd,useMemo:Zd,useReducer:$i,useRef:qd,useState:function(){return $i(ba)},useDebugValue:Fs,useDeferredValue:function(e,t){var n=Vt();return Jd(n,St.memoizedState,e,t)},useTransition:function(){var e=$i(ba)[0],t=Vt().memoizedState;return[typeof e=="boolean"?e:qo(e),t]},useSyncExternalStore:kd,useId:Pd,useHostTransitionStatus:Zs,useFormState:Ud,useActionState:Ud,useOptimistic:function(e,t){var n=Vt();return Ed(n,St,e,t)},useMemoCache:js,useCacheRefresh:ef};$s.useEffectEvent=Gd;var of={readContext:ln,use:Ji,useCallback:Kd,useContext:ln,useEffect:Vs,useImperativeHandle:Qd,useInsertionEffect:Xd,useLayoutEffect:Vd,useMemo:Zd,useReducer:Ys,useRef:qd,useState:function(){return Ys(ba)},useDebugValue:Fs,useDeferredValue:function(e,t){var n=Vt();return St===null?Qs(n,e,t):Jd(n,St.memoizedState,e,t)},useTransition:function(){var e=Ys(ba)[0],t=Vt().memoizedState;return[typeof e=="boolean"?e:qo(e),t]},useSyncExternalStore:kd,useId:Pd,useHostTransitionStatus:Zs,useFormState:jd,useActionState:jd,useOptimistic:function(e,t){var n=Vt();return St!==null?Ed(n,St,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:js,useCacheRefresh:ef};of.useEffectEvent=Gd;function Ws(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:z({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Is={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=On(),l=Ua(a);l.payload=t,n!=null&&(l.callback=n),t=Na(e,l,a),t!==null&&(wn(t,e,a),Bo(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=On(),l=Ua(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Na(e,l,a),t!==null&&(wn(t,e,a),Bo(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=On(),a=Ua(n);a.tag=2,t!=null&&(a.callback=t),t=Na(e,a,n),t!==null&&(wn(t,e,n),Bo(t,e,n))}};function rf(e,t,n,a,l,o,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,o,u):t.prototype&&t.prototype.isPureReactComponent?!Ao(n,a)||!Ao(l,o):!0}function sf(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Is.enqueueReplaceState(t,t.state,null)}function vl(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=z({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function cf(e){Ri(e)}function uf(e){console.error(e)}function df(e){Ri(e)}function er(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function ff(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function Ps(e,t,n){return n=Ua(n),n.tag=3,n.payload={element:null},n.callback=function(){er(e,t)},n}function hf(e){return e=Ua(e),e.tag=3,e}function pf(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var o=a.value;e.payload=function(){return l(o)},e.callback=function(){ff(t,n,a)}}var u=n.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){ff(t,n,a),typeof l!="function"&&(Va===null?Va=new Set([this]):Va.add(this));var g=a.stack;this.componentDidCatch(a.value,{componentStack:g!==null?g:""})})}function tg(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&ql(t,n,l,!0),n=Tn.current,n!==null){switch(n.tag){case 31:case 13:return Vn===null?fr():n.alternate===null&&jt===0&&(jt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Yi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),kc(e,a,l)),!1;case 22:return n.flags|=65536,a===Yi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),kc(e,a,l)),!1}throw Error(d(435,n.tag))}return kc(e,a,l),fr(),!1}if(nt)return t=Tn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==bs&&(e=Error(d(422),{cause:a}),Ro(qn(e,n)))):(a!==bs&&(t=Error(d(423),{cause:a}),Ro(qn(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=qn(a,n),l=Ps(e.stateNode,a,l),Ts(e,l),jt!==4&&(jt=2)),!1;var o=Error(d(520),{cause:a});if(o=qn(o,n),$o===null?$o=[o]:$o.push(o),jt!==4&&(jt=2),t===null)return!0;a=qn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=Ps(n.stateNode,a,e),Ts(n,e),!1;case 1:if(t=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Va===null||!Va.has(o))))return n.flags|=65536,l&=-l,n.lanes|=l,l=hf(l),pf(l,e,n,a),Ts(n,l),!1}n=n.return}while(n!==null);return!1}var ec=Error(d(461)),Jt=!1;function on(e,t,n,a){t.child=e===null?yd(t,null,n,a):yl(t,e.child,n,a)}function gf(e,t,n,a,l){n=n.render;var o=t.ref;if("ref"in a){var u={};for(var g in a)g!=="ref"&&(u[g]=a[g])}else u=a;return hl(t),a=Hs(e,t,n,u,o,l),g=Bs(),e!==null&&!Jt?(Us(e,t,l),va(e,t,l)):(nt&&g&&ms(t),t.flags|=1,on(e,t,a,l),t.child)}function mf(e,t,n,a,l){if(e===null){var o=n.type;return typeof o=="function"&&!hs(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,yf(e,t,o,a,l)):(e=Hi(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!sc(e,l)){var u=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ao,n(u,a)&&e.ref===t.ref)return va(e,t,l)}return t.flags|=1,e=ha(o,a),e.ref=t.ref,e.return=t,t.child=e}function yf(e,t,n,a,l){if(e!==null){var o=e.memoizedProps;if(Ao(o,a)&&e.ref===t.ref)if(Jt=!1,t.pendingProps=a=o,sc(e,l))(e.flags&131072)!==0&&(Jt=!0);else return t.lanes=e.lanes,va(e,t,l)}return tc(e,t,n,a,l)}function bf(e,t,n,a){var l=a.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|n:n,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;a=l&~o}else a=0,t.child=null;return vf(e,t,o,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ji(t,o!==null?o.cachePool:null),o!==null?xd(t,o):Rs(),Sd(t);else return a=t.lanes=536870912,vf(e,t,o!==null?o.baseLanes|n:n,n,a)}else o!==null?(ji(t,o.cachePool),xd(t,o),qa(),t.memoizedState=null):(e!==null&&ji(t,null),Rs(),qa());return on(e,t,l,n),t.child}function Xo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function vf(e,t,n,a,l){var o=zs();return o=o===null?null:{parent:Kt._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&ji(t,null),Rs(),Sd(t),e!==null&&ql(e,t,a,!0),t.childLanes=l,null}function tr(e,t){return t=ar({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function xf(e,t,n){return yl(t,e.child,null,n),e=tr(t,t.pendingProps),e.flags|=2,En(t),t.memoizedState=null,e}function ng(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(nt){if(a.mode==="hidden")return e=tr(t,a),t.lanes=536870912,Xo(null,e);if(Os(t),(e=Tt)?(e=Lh(e,Xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:La!==null?{id:Pn,overflow:ea}:null,retryLane:536870912,hydrationErrors:null},n=nd(e),n.return=t,t.child=n,an=t,Tt=null)):e=null,e===null)throw _a(t);return t.lanes=536870912,null}return tr(t,a)}var o=e.memoizedState;if(o!==null){var u=o.dehydrated;if(Os(t),l)if(t.flags&256)t.flags&=-257,t=xf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(d(558));else if(Jt||ql(e,t,n,!1),l=(n&e.childLanes)!==0,Jt||l){if(a=Mt,a!==null&&(u=mo(a,n),u!==0&&u!==o.retryLane))throw o.retryLane=u,cl(e,u),wn(a,e,u),ec;fr(),t=xf(e,t,n)}else e=o.treeContext,Tt=Fn(u.nextSibling),an=t,nt=!0,Oa=null,Xn=!1,e!==null&&od(t,e),t=tr(t,a),t.flags|=4096;return t}return e=ha(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function nr(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(d(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function tc(e,t,n,a,l){return hl(t),n=Hs(e,t,n,a,void 0,l),a=Bs(),e!==null&&!Jt?(Us(e,t,l),va(e,t,l)):(nt&&a&&ms(t),t.flags|=1,on(e,t,n,l),t.child)}function Sf(e,t,n,a,l,o){return hl(t),t.updateQueue=null,n=Cd(t,a,n,l),wd(e),a=Bs(),e!==null&&!Jt?(Us(e,t,o),va(e,t,o)):(nt&&a&&ms(t),t.flags|=1,on(e,t,n,o),t.child)}function wf(e,t,n,a,l){if(hl(t),t.stateNode===null){var o=Bl,u=n.contextType;typeof u=="object"&&u!==null&&(o=ln(u)),o=new n(a,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Is,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=a,o.state=t.memoizedState,o.refs={},Ds(t),u=n.contextType,o.context=typeof u=="object"&&u!==null?ln(u):Bl,o.state=t.memoizedState,u=n.getDerivedStateFromProps,typeof u=="function"&&(Ws(t,n,u,a),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(u=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),u!==o.state&&Is.enqueueReplaceState(o,o.state,null),No(t,a,o,l),Uo(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){o=t.stateNode;var g=t.memoizedProps,w=vl(n,g);o.props=w;var R=o.context,Y=n.contextType;u=Bl,typeof Y=="object"&&Y!==null&&(u=ln(Y));var K=n.getDerivedStateFromProps;Y=typeof K=="function"||typeof o.getSnapshotBeforeUpdate=="function",g=t.pendingProps!==g,Y||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(g||R!==u)&&sf(t,o,a,u),Ba=!1;var L=t.memoizedState;o.state=L,No(t,a,o,l),Uo(),R=t.memoizedState,g||L!==R||Ba?(typeof K=="function"&&(Ws(t,n,K,a),R=t.memoizedState),(w=Ba||rf(t,n,w,a,L,R,u))?(Y||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=R),o.props=a,o.state=R,o.context=u,a=w):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{o=t.stateNode,As(e,t),u=t.memoizedProps,Y=vl(n,u),o.props=Y,K=t.pendingProps,L=o.context,R=n.contextType,w=Bl,typeof R=="object"&&R!==null&&(w=ln(R)),g=n.getDerivedStateFromProps,(R=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==K||L!==w)&&sf(t,o,a,w),Ba=!1,L=t.memoizedState,o.state=L,No(t,a,o,l),Uo();var B=t.memoizedState;u!==K||L!==B||Ba||e!==null&&e.dependencies!==null&&Ui(e.dependencies)?(typeof g=="function"&&(Ws(t,n,g,a),B=t.memoizedState),(Y=Ba||rf(t,n,Y,a,L,B,w)||e!==null&&e.dependencies!==null&&Ui(e.dependencies))?(R||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(a,B,w),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(a,B,w)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=B),o.props=a,o.state=B,o.context=w,a=Y):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),a=!1)}return o=a,nr(e,t),a=(t.flags&128)!==0,o||a?(o=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&a?(t.child=yl(t,e.child,null,l),t.child=yl(t,null,n,l)):on(e,t,n,l),t.memoizedState=o.state,e=t.child):e=va(e,t,l),e}function Cf(e,t,n,a){return dl(),t.flags|=256,on(e,t,n,a),t.child}var nc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ac(e){return{baseLanes:e,cachePool:dd()}}function lc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ln),e}function kf(e,t,n){var a=t.pendingProps,l=!1,o=(t.flags&128)!==0,u;if((u=o)||(u=e!==null&&e.memoizedState===null?!1:(Xt.current&2)!==0),u&&(l=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(nt){if(l?ja(t):qa(),(e=Tt)?(e=Lh(e,Xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:La!==null?{id:Pn,overflow:ea}:null,retryLane:536870912,hydrationErrors:null},n=nd(e),n.return=t,t.child=n,an=t,Tt=null)):e=null,e===null)throw _a(t);return qc(e)?t.lanes=32:t.lanes=536870912,null}var g=a.children;return a=a.fallback,l?(qa(),l=t.mode,g=ar({mode:"hidden",children:g},l),a=ul(a,l,n,null),g.return=t,a.return=t,g.sibling=a,t.child=g,a=t.child,a.memoizedState=ac(n),a.childLanes=lc(e,u,n),t.memoizedState=nc,Xo(null,a)):(ja(t),oc(t,g))}var w=e.memoizedState;if(w!==null&&(g=w.dehydrated,g!==null)){if(o)t.flags&256?(ja(t),t.flags&=-257,t=ic(e,t,n)):t.memoizedState!==null?(qa(),t.child=e.child,t.flags|=128,t=null):(qa(),g=a.fallback,l=t.mode,a=ar({mode:"visible",children:a.children},l),g=ul(g,l,n,null),g.flags|=2,a.return=t,g.return=t,a.sibling=g,t.child=a,yl(t,e.child,null,n),a=t.child,a.memoizedState=ac(n),a.childLanes=lc(e,u,n),t.memoizedState=nc,t=Xo(null,a));else if(ja(t),qc(g)){if(u=g.nextSibling&&g.nextSibling.dataset,u)var R=u.dgst;u=R,a=Error(d(419)),a.stack="",a.digest=u,Ro({value:a,source:null,stack:null}),t=ic(e,t,n)}else if(Jt||ql(e,t,n,!1),u=(n&e.childLanes)!==0,Jt||u){if(u=Mt,u!==null&&(a=mo(u,n),a!==0&&a!==w.retryLane))throw w.retryLane=a,cl(e,a),wn(u,e,a),ec;jc(g)||fr(),t=ic(e,t,n)}else jc(g)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,Tt=Fn(g.nextSibling),an=t,nt=!0,Oa=null,Xn=!1,e!==null&&od(t,e),t=oc(t,a.children),t.flags|=4096);return t}return l?(qa(),g=a.fallback,l=t.mode,w=e.child,R=w.sibling,a=ha(w,{mode:"hidden",children:a.children}),a.subtreeFlags=w.subtreeFlags&65011712,R!==null?g=ha(R,g):(g=ul(g,l,n,null),g.flags|=2),g.return=t,a.return=t,a.sibling=g,t.child=a,Xo(null,a),a=t.child,g=e.child.memoizedState,g===null?g=ac(n):(l=g.cachePool,l!==null?(w=Kt._currentValue,l=l.parent!==w?{parent:w,pool:w}:l):l=dd(),g={baseLanes:g.baseLanes|n,cachePool:l}),a.memoizedState=g,a.childLanes=lc(e,u,n),t.memoizedState=nc,Xo(e.child,a)):(ja(t),n=e.child,e=n.sibling,n=ha(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=n,t.memoizedState=null,n)}function oc(e,t){return t=ar({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ar(e,t){return e=An(22,e,null,t),e.lanes=0,e}function ic(e,t,n){return yl(t,e.child,null,n),e=oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Ss(e.return,t,n)}function rc(e,t,n,a,l,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=n,u.tailMode=l,u.treeForkCount=o)}function Mf(e,t,n){var a=t.pendingProps,l=a.revealOrder,o=a.tail;a=a.children;var u=Xt.current,g=(u&2)!==0;if(g?(u=u&1|2,t.flags|=128):u&=1,ne(Xt,u),on(e,t,a,n),a=nt?Eo:0,!g&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zf(e,n,t);else if(e.tag===19)zf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Fi(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),rc(t,!1,l,n,o,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Fi(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}rc(t,!0,n,null,o,a);break;case"together":rc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function va(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ql(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(d(153));if(t.child!==null){for(e=t.child,n=ha(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ha(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function sc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ui(e)))}function ag(e,t,n){switch(t.tag){case 3:xt(t,t.stateNode.containerInfo),Ha(t,Kt,e.memoizedState.cache),dl();break;case 27:case 5:Pt(t);break;case 4:xt(t,t.stateNode.containerInfo);break;case 10:Ha(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Os(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ja(t),t.flags|=128,null):(n&t.child.childLanes)!==0?kf(e,t,n):(ja(t),e=va(e,t,n),e!==null?e.sibling:null);ja(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(ql(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return Mf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ne(Xt,Xt.current),a)break;return null;case 22:return t.lanes=0,bf(e,t,n,t.pendingProps);case 24:Ha(t,Kt,e.memoizedState.cache)}return va(e,t,n)}function Df(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Jt=!0;else{if(!sc(e,n)&&(t.flags&128)===0)return Jt=!1,ag(e,t,n);Jt=(e.flags&131072)!==0}else Jt=!1,nt&&(t.flags&1048576)!==0&&ld(t,Eo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=gl(t.elementType),t.type=e,typeof e=="function")hs(e)?(a=vl(e,a),t.tag=1,t=wf(null,t,e,a,n)):(t.tag=0,t=tc(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===le){t.tag=11,t=gf(null,t,e,a,n);break e}else if(l===te){t.tag=14,t=mf(null,t,e,a,n);break e}}throw t=ie(e)||e,Error(d(306,t,""))}}return t;case 0:return tc(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=vl(a,t.pendingProps),wf(e,t,a,l,n);case 3:e:{if(xt(t,t.stateNode.containerInfo),e===null)throw Error(d(387));a=t.pendingProps;var o=t.memoizedState;l=o.element,As(e,t),No(t,a,null,n);var u=t.memoizedState;if(a=u.cache,Ha(t,Kt,a),a!==o.cache&&ws(t,[Kt],n,!0),Uo(),a=u.element,o.isDehydrated)if(o={element:a,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Cf(e,t,a,n);break e}else if(a!==l){l=qn(Error(d(424)),t),Ro(l),t=Cf(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Tt=Fn(e.firstChild),an=t,nt=!0,Oa=null,Xn=!0,n=yd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(dl(),a===l){t=va(e,t,n);break e}on(e,t,a,n)}t=t.child}return t;case 26:return nr(e,t),e===null?(n=Nh(t.type,null,t.pendingProps,null))?t.memoizedState=n:nt||(n=t.type,e=t.pendingProps,a=vr(ze.current).createElement(n),a[Lt]=t,a[Gt]=e,rn(a,n,e),ve(a),t.stateNode=a):t.memoizedState=Nh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pt(t),e===null&&nt&&(a=t.stateNode=Hh(t.type,t.pendingProps,ze.current),an=t,Xn=!0,l=Tt,Za(t.type)?(Yc=l,Tt=Fn(a.firstChild)):Tt=l),on(e,t,t.pendingProps.children,n),nr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&nt&&((l=a=Tt)&&(a=Og(a,t.type,t.pendingProps,Xn),a!==null?(t.stateNode=a,an=t,Tt=Fn(a.firstChild),Xn=!1,l=!0):l=!1),l||_a(t)),Pt(t),l=t.type,o=t.pendingProps,u=e!==null?e.memoizedProps:null,a=o.children,Bc(l,o)?a=null:u!==null&&Bc(l,u)&&(t.flags|=32),t.memoizedState!==null&&(l=Hs(e,t,Z0,null,null,n),li._currentValue=l),nr(e,t),on(e,t,a,n),t.child;case 6:return e===null&&nt&&((e=n=Tt)&&(n=_g(n,t.pendingProps,Xn),n!==null?(t.stateNode=n,an=t,Tt=null,e=!0):e=!1),e||_a(t)),null;case 13:return kf(e,t,n);case 4:return xt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=yl(t,null,a,n):on(e,t,a,n),t.child;case 11:return gf(e,t,t.type,t.pendingProps,n);case 7:return on(e,t,t.pendingProps,n),t.child;case 8:return on(e,t,t.pendingProps.children,n),t.child;case 12:return on(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Ha(t,t.type,a.value),on(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,hl(t),l=ln(l),a=a(l),t.flags|=1,on(e,t,a,n),t.child;case 14:return mf(e,t,t.type,t.pendingProps,n);case 15:return yf(e,t,t.type,t.pendingProps,n);case 19:return Mf(e,t,n);case 31:return ng(e,t,n);case 22:return bf(e,t,n,t.pendingProps);case 24:return hl(t),a=ln(Kt),e===null?(l=zs(),l===null&&(l=Mt,o=Cs(),l.pooledCache=o,o.refCount++,o!==null&&(l.pooledCacheLanes|=n),l=o),t.memoizedState={parent:a,cache:l},Ds(t),Ha(t,Kt,l)):((e.lanes&n)!==0&&(As(e,t),No(t,null,null,n),Uo()),l=e.memoizedState,o=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),Ha(t,Kt,a)):(a=o.cache,Ha(t,Kt,a),a!==l.cache&&ws(t,[Kt],n,!0))),on(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function xa(e){e.flags|=4}function cc(e,t,n,a,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(eh())e.flags|=8192;else throw ml=Yi,Ms}else e.flags&=-16777217}function Af(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Xh(t))if(eh())e.flags|=8192;else throw ml=Yi,Ms}function lr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ra():536870912,e.lanes|=t,Il|=t)}function Vo(e,t){if(!nt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Et(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags&65011712,a|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function lg(e,t,n){var a=t.pendingProps;switch(ys(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Et(t),null;case 1:return Et(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ma(Kt),Re(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(jl(t)?xa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vs())),Et(t),null;case 26:var l=t.type,o=t.memoizedState;return e===null?(xa(t),o!==null?(Et(t),Af(t,o)):(Et(t),cc(t,l,null,a,n))):o?o!==e.memoizedState?(xa(t),Et(t),Af(t,o)):(Et(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&xa(t),Et(t),cc(t,l,e,a,n)),null;case 27:if(Ze(t),n=ze.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&xa(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return Et(t),null}e=re.current,jl(t)?id(t):(e=Hh(l,a,n),t.stateNode=e,xa(t))}return Et(t),null;case 5:if(Ze(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&xa(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return Et(t),null}if(o=re.current,jl(t))id(t);else{var u=vr(ze.current);switch(o){case 1:o=u.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:o=u.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":o=u.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":o=u.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":o=u.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?o.multiple=!0:a.size&&(o.size=a.size);break;default:o=typeof a.is=="string"?u.createElement(l,{is:a.is}):u.createElement(l)}}o[Lt]=t,o[Gt]=a;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)o.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=o;e:switch(rn(o,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&xa(t)}}return Et(t),cc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&xa(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(e=ze.current,jl(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=an,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[Lt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||kh(e.nodeValue,n)),e||_a(t,!0)}else e=vr(e).createTextNode(a),e[Lt]=t,t.stateNode=e}return Et(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=jl(t),n!==null){if(e===null){if(!a)throw Error(d(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(557));e[Lt]=t}else dl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Et(t),e=!1}else n=vs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(En(t),t):(En(t),null);if((t.flags&128)!==0)throw Error(d(558))}return Et(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=jl(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(d(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(d(317));l[Lt]=t}else dl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Et(t),l=!1}else l=vs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(En(t),t):(En(t),null)}return En(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),lr(t,t.updateQueue),Et(t),null);case 4:return Re(),e===null&&Rc(t.stateNode.containerInfo),Et(t),null;case 10:return ma(t.type),Et(t),null;case 19:if(O(Xt),a=t.memoizedState,a===null)return Et(t),null;if(l=(t.flags&128)!==0,o=a.rendering,o===null)if(l)Vo(a,!1);else{if(jt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Fi(e),o!==null){for(t.flags|=128,Vo(a,!1),e=o.updateQueue,t.updateQueue=e,lr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)td(n,e),n=n.sibling;return ne(Xt,Xt.current&1|2),nt&&pa(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&mt()>cr&&(t.flags|=128,l=!0,Vo(a,!1),t.lanes=4194304)}else{if(!l)if(e=Fi(o),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,lr(t,e),Vo(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!nt)return Et(t),null}else 2*mt()-a.renderingStartTime>cr&&n!==536870912&&(t.flags|=128,l=!0,Vo(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(e=a.last,e!==null?e.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=mt(),e.sibling=null,n=Xt.current,ne(Xt,l?n&1|2:n&1),nt&&pa(t,a.treeForkCount),e):(Et(t),null);case 22:case 23:return En(t),Ls(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Et(t),t.subtreeFlags&6&&(t.flags|=8192)):Et(t),n=t.updateQueue,n!==null&&lr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&O(pl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ma(Kt),Et(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function og(e,t){switch(ys(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ma(Kt),Re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ze(t),null;case 31:if(t.memoizedState!==null){if(En(t),t.alternate===null)throw Error(d(340));dl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(En(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));dl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(Xt),null;case 4:return Re(),null;case 10:return ma(t.type),null;case 22:case 23:return En(t),Ls(),e!==null&&O(pl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ma(Kt),null;case 25:return null;default:return null}}function Tf(e,t){switch(ys(t),t.tag){case 3:ma(Kt),Re();break;case 26:case 27:case 5:Ze(t);break;case 4:Re();break;case 31:t.memoizedState!==null&&En(t);break;case 13:En(t);break;case 19:O(Xt);break;case 10:ma(t.type);break;case 22:case 23:En(t),Ls(),e!==null&&O(pl);break;case 24:ma(Kt)}}function Fo(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&e)===e){a=void 0;var o=n.create,u=n.inst;a=o(),u.destroy=a}n=n.next}while(n!==l)}}catch(g){vt(t,t.return,g)}}function Ya(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){var u=a.inst,g=u.destroy;if(g!==void 0){u.destroy=void 0,l=t;var w=n,R=g;try{R()}catch(Y){vt(l,w,Y)}}}a=a.next}while(a!==o)}}catch(Y){vt(t,t.return,Y)}}function Ef(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{vd(t,n)}catch(a){vt(e,e.return,a)}}}function Rf(e,t,n){n.props=vl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){vt(e,t,a)}}function Qo(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(l){vt(e,t,l)}}function ta(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){vt(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){vt(e,t,l)}else n.current=null}function Lf(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){vt(e,e.return,l)}}function uc(e,t,n){try{var a=e.stateNode;Dg(a,e.type,n,t),a[Gt]=t}catch(l){vt(e,e.return,l)}}function Of(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Za(e.type)||e.tag===4}function dc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Of(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&&Za(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 fc(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=da));else if(a!==4&&(a===27&&Za(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(fc(e,t,n),e=e.sibling;e!==null;)fc(e,t,n),e=e.sibling}function or(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Za(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(or(e,t,n),e=e.sibling;e!==null;)or(e,t,n),e=e.sibling}function _f(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);rn(t,a,n),t[Lt]=e,t[Gt]=n}catch(o){vt(e,e.return,o)}}var Sa=!1,$t=!1,hc=!1,Hf=typeof WeakSet=="function"?WeakSet:Set,nn=null;function ig(e,t){if(e=e.containerInfo,_c=Mr,e=Qu(e),is(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var l=a.anchorOffset,o=a.focusNode;a=a.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var u=0,g=-1,w=-1,R=0,Y=0,K=e,L=null;t:for(;;){for(var B;K!==n||l!==0&&K.nodeType!==3||(g=u+l),K!==o||a!==0&&K.nodeType!==3||(w=u+a),K.nodeType===3&&(u+=K.nodeValue.length),(B=K.firstChild)!==null;)L=K,K=B;for(;;){if(K===e)break t;if(L===n&&++R===l&&(g=u),L===o&&++Y===a&&(w=u),(B=K.nextSibling)!==null)break;K=L,L=K.parentNode}K=B}n=g===-1||w===-1?null:{start:g,end:w}}else n=null}n=n||{start:0,end:0}}else n=null;for(Hc={focusedElem:e,selectionRange:n},Mr=!1,nn=t;nn!==null;)if(t=nn,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nn=e;else for(;nn!==null;){switch(t=nn,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,n=t,l=o.memoizedProps,o=o.memoizedState,a=n.stateNode;try{var ye=vl(n.type,l);e=a.getSnapshotBeforeUpdate(ye,o),a.__reactInternalSnapshotBeforeUpdate=e}catch(Le){vt(n,n.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Nc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Nc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(d(163))}if(e=t.sibling,e!==null){e.return=t.return,nn=e;break}nn=t.return}}function Bf(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Ca(e,n),a&4&&Fo(5,n);break;case 1:if(Ca(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(u){vt(n,n.return,u)}else{var l=vl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){vt(n,n.return,u)}}a&64&&Ef(n),a&512&&Qo(n,n.return);break;case 3:if(Ca(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{vd(e,t)}catch(u){vt(n,n.return,u)}}break;case 27:t===null&&a&4&&_f(n);case 26:case 5:Ca(e,n),t===null&&a&4&&Lf(n),a&512&&Qo(n,n.return);break;case 12:Ca(e,n);break;case 31:Ca(e,n),a&4&&jf(e,n);break;case 13:Ca(e,n),a&4&&qf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=gg.bind(null,n),Hg(e,n))));break;case 22:if(a=n.memoizedState!==null||Sa,!a){t=t!==null&&t.memoizedState!==null||$t,l=Sa;var o=$t;Sa=a,($t=t)&&!o?ka(e,n,(n.subtreeFlags&8772)!==0):Ca(e,n),Sa=l,$t=o}break;case 30:break;default:Ca(e,n)}}function Uf(e){var t=e.alternate;t!==null&&(e.alternate=null,Uf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&vo(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 Ot=null,bn=!1;function wa(e,t,n){for(n=n.child;n!==null;)Nf(e,t,n),n=n.sibling}function Nf(e,t,n){if(Me&&typeof Me.onCommitFiberUnmount=="function")try{Me.onCommitFiberUnmount(Be,n)}catch{}switch(n.tag){case 26:$t||ta(n,t),wa(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$t||ta(n,t);var a=Ot,l=bn;Za(n.type)&&(Ot=n.stateNode,bn=!1),wa(e,t,n),ti(n.stateNode),Ot=a,bn=l;break;case 5:$t||ta(n,t);case 6:if(a=Ot,l=bn,Ot=null,wa(e,t,n),Ot=a,bn=l,Ot!==null)if(bn)try{(Ot.nodeType===9?Ot.body:Ot.nodeName==="HTML"?Ot.ownerDocument.body:Ot).removeChild(n.stateNode)}catch(o){vt(n,t,o)}else try{Ot.removeChild(n.stateNode)}catch(o){vt(n,t,o)}break;case 18:Ot!==null&&(bn?(e=Ot,Eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),io(e)):Eh(Ot,n.stateNode));break;case 4:a=Ot,l=bn,Ot=n.stateNode.containerInfo,bn=!0,wa(e,t,n),Ot=a,bn=l;break;case 0:case 11:case 14:case 15:Ya(2,n,t),$t||Ya(4,n,t),wa(e,t,n);break;case 1:$t||(ta(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Rf(n,t,a)),wa(e,t,n);break;case 21:wa(e,t,n);break;case 22:$t=(a=$t)||n.memoizedState!==null,wa(e,t,n),$t=a;break;default:wa(e,t,n)}}function jf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{io(e)}catch(n){vt(t,t.return,n)}}}function qf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{io(e)}catch(n){vt(t,t.return,n)}}function rg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Hf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Hf),t;default:throw Error(d(435,e.tag))}}function ir(e,t){var n=rg(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=mg.bind(null,e,a);a.then(l,l)}})}function vn(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],o=e,u=t,g=u;e:for(;g!==null;){switch(g.tag){case 27:if(Za(g.type)){Ot=g.stateNode,bn=!1;break e}break;case 5:Ot=g.stateNode,bn=!1;break e;case 3:case 4:Ot=g.stateNode.containerInfo,bn=!0;break e}g=g.return}if(Ot===null)throw Error(d(160));Nf(o,u,l),Ot=null,bn=!1,o=l.alternate,o!==null&&(o.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Yf(t,e),t=t.sibling}var Jn=null;function Yf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:vn(t,e),xn(e),a&4&&(Ya(3,e,e.return),Fo(3,e),Ya(5,e,e.return));break;case 1:vn(t,e),xn(e),a&512&&($t||n===null||ta(n,n.return)),a&64&&Sa&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var l=Jn;if(vn(t,e),xn(e),a&512&&($t||n===null||ta(n,n.return)),a&4){var o=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,l=l.ownerDocument||l;t:switch(a){case"title":o=l.getElementsByTagName("title")[0],(!o||o[ol]||o[Lt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=l.createElement(a),l.head.insertBefore(o,l.querySelector("head > title"))),rn(o,a,n),o[Lt]=e,ve(o),a=o;break e;case"link":var u=Yh("link","href",l).get(a+(n.href||""));if(u){for(var g=0;g<u.length;g++)if(o=u[g],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){u.splice(g,1);break t}}o=l.createElement(a),rn(o,a,n),l.head.appendChild(o);break;case"meta":if(u=Yh("meta","content",l).get(a+(n.content||""))){for(g=0;g<u.length;g++)if(o=u[g],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){u.splice(g,1);break t}}o=l.createElement(a),rn(o,a,n),l.head.appendChild(o);break;default:throw Error(d(468,a))}o[Lt]=e,ve(o),a=o}e.stateNode=a}else Gh(l,e.type,e.stateNode);else e.stateNode=qh(l,a,e.memoizedProps);else o!==a?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,a===null?Gh(l,e.type,e.stateNode):qh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&uc(e,e.memoizedProps,n.memoizedProps)}break;case 27:vn(t,e),xn(e),a&512&&($t||n===null||ta(n,n.return)),n!==null&&a&4&&uc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(vn(t,e),xn(e),a&512&&($t||n===null||ta(n,n.return)),e.flags&32){l=e.stateNode;try{Tl(l,"")}catch(ye){vt(e,e.return,ye)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,uc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(hc=!0);break;case 6:if(vn(t,e),xn(e),a&4){if(e.stateNode===null)throw Error(d(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ye){vt(e,e.return,ye)}}break;case 3:if(wr=null,l=Jn,Jn=xr(t.containerInfo),vn(t,e),Jn=l,xn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{io(t.containerInfo)}catch(ye){vt(e,e.return,ye)}hc&&(hc=!1,Gf(e));break;case 4:a=Jn,Jn=xr(e.stateNode.containerInfo),vn(t,e),xn(e),Jn=a;break;case 12:vn(t,e),xn(e);break;case 31:vn(t,e),xn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ir(e,a)));break;case 13:vn(t,e),xn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(sr=mt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ir(e,a)));break;case 22:l=e.memoizedState!==null;var w=n!==null&&n.memoizedState!==null,R=Sa,Y=$t;if(Sa=R||l,$t=Y||w,vn(t,e),$t=Y,Sa=R,xn(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||w||Sa||$t||xl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){w=n=t;try{if(o=w.stateNode,l)u=o.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{g=w.stateNode;var K=w.memoizedProps.style,L=K!=null&&K.hasOwnProperty("display")?K.display:null;g.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(ye){vt(w,w.return,ye)}}}else if(t.tag===6){if(n===null){w=t;try{w.stateNode.nodeValue=l?"":w.memoizedProps}catch(ye){vt(w,w.return,ye)}}}else if(t.tag===18){if(n===null){w=t;try{var B=w.stateNode;l?Rh(B,!0):Rh(w.stateNode,!1)}catch(ye){vt(w,w.return,ye)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,ir(e,n))));break;case 19:vn(t,e),xn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ir(e,a)));break;case 30:break;case 21:break;default:vn(t,e),xn(e)}}function xn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Of(a)){n=a;break}a=a.return}if(n==null)throw Error(d(160));switch(n.tag){case 27:var l=n.stateNode,o=dc(e);or(e,o,l);break;case 5:var u=n.stateNode;n.flags&32&&(Tl(u,""),n.flags&=-33);var g=dc(e);or(e,g,u);break;case 3:case 4:var w=n.stateNode.containerInfo,R=dc(e);fc(e,R,w);break;default:throw Error(d(161))}}catch(Y){vt(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Gf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ca(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Bf(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ya(4,t,t.return),xl(t);break;case 1:ta(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Rf(t,t.return,n),xl(t);break;case 27:ti(t.stateNode);case 26:case 5:ta(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function ka(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,o=t,u=o.flags;switch(o.tag){case 0:case 11:case 15:ka(l,o,n),Fo(4,o);break;case 1:if(ka(l,o,n),a=o,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(R){vt(a,a.return,R)}if(a=o,l=a.updateQueue,l!==null){var g=a.stateNode;try{var w=l.shared.hiddenCallbacks;if(w!==null)for(l.shared.hiddenCallbacks=null,l=0;l<w.length;l++)bd(w[l],g)}catch(R){vt(a,a.return,R)}}n&&u&64&&Ef(o),Qo(o,o.return);break;case 27:_f(o);case 26:case 5:ka(l,o,n),n&&a===null&&u&4&&Lf(o),Qo(o,o.return);break;case 12:ka(l,o,n);break;case 31:ka(l,o,n),n&&u&4&&jf(l,o);break;case 13:ka(l,o,n),n&&u&4&&qf(l,o);break;case 22:o.memoizedState===null&&ka(l,o,n),Qo(o,o.return);break;case 30:break;default:ka(l,o,n)}t=t.sibling}}function pc(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&&Lo(n))}function gc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Lo(e))}function $n(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Xf(e,t,n,a),t=t.sibling}function Xf(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:$n(e,t,n,a),l&2048&&Fo(9,t);break;case 1:$n(e,t,n,a);break;case 3:$n(e,t,n,a),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Lo(e)));break;case 12:if(l&2048){$n(e,t,n,a),e=t.stateNode;try{var o=t.memoizedProps,u=o.id,g=o.onPostCommit;typeof g=="function"&&g(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){vt(t,t.return,w)}}else $n(e,t,n,a);break;case 31:$n(e,t,n,a);break;case 13:$n(e,t,n,a);break;case 23:break;case 22:o=t.stateNode,u=t.alternate,t.memoizedState!==null?o._visibility&2?$n(e,t,n,a):Ko(e,t):o._visibility&2?$n(e,t,n,a):(o._visibility|=2,Jl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&pc(u,t);break;case 24:$n(e,t,n,a),l&2048&&gc(t.alternate,t);break;default:$n(e,t,n,a)}}function Jl(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,u=t,g=n,w=a,R=u.flags;switch(u.tag){case 0:case 11:case 15:Jl(o,u,g,w,l),Fo(8,u);break;case 23:break;case 22:var Y=u.stateNode;u.memoizedState!==null?Y._visibility&2?Jl(o,u,g,w,l):Ko(o,u):(Y._visibility|=2,Jl(o,u,g,w,l)),l&&R&2048&&pc(u.alternate,u);break;case 24:Jl(o,u,g,w,l),l&&R&2048&&gc(u.alternate,u);break;default:Jl(o,u,g,w,l)}t=t.sibling}}function Ko(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,l=a.flags;switch(a.tag){case 22:Ko(n,a),l&2048&&pc(a.alternate,a);break;case 24:Ko(n,a),l&2048&&gc(a.alternate,a);break;default:Ko(n,a)}t=t.sibling}}var Zo=8192;function $l(e,t,n){if(e.subtreeFlags&Zo)for(e=e.child;e!==null;)Vf(e,t,n),e=e.sibling}function Vf(e,t,n){switch(e.tag){case 26:$l(e,t,n),e.flags&Zo&&e.memoizedState!==null&&Kg(n,Jn,e.memoizedState,e.memoizedProps);break;case 5:$l(e,t,n);break;case 3:case 4:var a=Jn;Jn=xr(e.stateNode.containerInfo),$l(e,t,n),Jn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Zo,Zo=16777216,$l(e,t,n),Zo=a):$l(e,t,n));break;default:$l(e,t,n)}}function Ff(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 Jo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];nn=a,Kf(a,e)}Ff(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qf(e),e=e.sibling}function Qf(e){switch(e.tag){case 0:case 11:case 15:Jo(e),e.flags&2048&&Ya(9,e,e.return);break;case 3:Jo(e);break;case 12:Jo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,rr(e)):Jo(e);break;default:Jo(e)}}function rr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];nn=a,Kf(a,e)}Ff(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ya(8,t,t.return),rr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,rr(t));break;default:rr(t)}e=e.sibling}}function Kf(e,t){for(;nn!==null;){var n=nn;switch(n.tag){case 0:case 11:case 15:Ya(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Lo(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,nn=a;else e:for(n=e;nn!==null;){a=nn;var l=a.sibling,o=a.return;if(Uf(a),a===n){nn=null;break e}if(l!==null){l.return=o,nn=l;break e}nn=o}}}var sg={getCacheForType:function(e){var t=ln(Kt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ln(Kt).controller.signal}},cg=typeof WeakMap=="function"?WeakMap:Map,ct=0,Mt=null,We=null,Pe=0,bt=0,Rn=null,Ga=!1,Wl=!1,mc=!1,za=0,jt=0,Xa=0,Sl=0,yc=0,Ln=0,Il=0,$o=null,Sn=null,bc=!1,sr=0,Zf=0,cr=1/0,ur=null,Va=null,en=0,Fa=null,Pl=null,Ma=0,vc=0,xc=null,Jf=null,Wo=0,Sc=null;function On(){return(ct&2)!==0&&Pe!==0?Pe&-Pe:T.T!==null?Dc():xi()}function $f(){if(Ln===0)if((Pe&536870912)===0||nt){var e=De;De<<=1,(De&3932160)===0&&(De=262144),Ln=e}else Ln=536870912;return e=Tn.current,e!==null&&(e.flags|=32),Ln}function wn(e,t,n){(e===Mt&&(bt===2||bt===9)||e.cancelPendingCommit!==null)&&(eo(e,0),Qa(e,Pe,Ln,!1)),Ut(e,n),((ct&2)===0||e!==Mt)&&(e===Mt&&((ct&2)===0&&(Sl|=n),jt===4&&Qa(e,Pe,Ln,!1)),na(e))}function Wf(e,t,n){if((ct&6)!==0)throw Error(d(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||zn(e,t),l=a?fg(e,t):Cc(e,t,!0),o=a;do{if(l===0){Wl&&!a&&Qa(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!ug(n)){l=Cc(e,t,!1),o=!1;continue}if(l===2){if(o=t,e.errorRecoveryDisabledLanes&o)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var g=e;l=$o;var w=g.current.memoizedState.isDehydrated;if(w&&(eo(g,u).flags|=256),u=Cc(g,u,!1),u!==2){if(mc&&!w){g.errorRecoveryDisabledLanes|=o,Sl|=o,l=4;break e}o=Sn,Sn=l,o!==null&&(Sn===null?Sn=o:Sn.push.apply(Sn,o))}l=u}if(o=!1,l!==2)continue}}if(l===1){eo(e,0),Qa(e,t,0,!0);break}e:{switch(a=e,o=l,o){case 0:case 1:throw Error(d(345));case 4:if((t&4194048)!==t)break;case 6:Qa(a,t,Ln,!Ga);break e;case 2:Sn=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(l=sr+300-mt(),10<l)){if(Qa(a,t,Ln,!Ga),Rt(a,0,!0)!==0)break e;Ma=t,a.timeoutHandle=Ah(If.bind(null,a,n,Sn,ur,bc,t,Ln,Sl,Il,Ga,o,"Throttled",-0,0),l);break e}If(a,n,Sn,ur,bc,t,Ln,Sl,Il,Ga,o,null,-0,0)}}break}while(!0);na(e)}function If(e,t,n,a,l,o,u,g,w,R,Y,K,L,B){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:da},Vf(t,o,K);var ye=(o&62914560)===o?sr-mt():(o&4194048)===o?Zf-mt():0;if(ye=Zg(K,ye),ye!==null){Ma=o,e.cancelPendingCommit=ye(ih.bind(null,e,t,o,n,a,l,u,g,w,Y,K,null,L,B)),Qa(e,o,u,!R);return}}ih(e,t,o,n,a,l,u,g,w)}function ug(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var l=n[a],o=l.getSnapshot;l=l.value;try{if(!Dn(o(),l))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qa(e,t,n,a){t&=~yc,t&=~Sl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var o=31-yt(l),u=1<<o;a[o]=-1,l&=~u}n!==0&&bi(e,n,t)}function dr(){return(ct&6)===0?(Io(0),!1):!0}function wc(){if(We!==null){if(bt===0)var e=We.return;else e=We,ga=fl=null,Ns(e),Vl=null,_o=0,e=We;for(;e!==null;)Tf(e.alternate,e),e=e.return;We=null}}function eo(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Eg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ma=0,wc(),Mt=e,We=n=ha(e.current,null),Pe=t,bt=0,Rn=null,Ga=!1,Wl=zn(e,t),mc=!1,Il=Ln=yc=Sl=Xa=jt=0,Sn=$o=null,bc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-yt(a),o=1<<l;t|=e[l],a&=~o}return za=t,Li(),n}function Pf(e,t){Fe=null,T.H=Go,t===Xl||t===qi?(t=pd(),bt=3):t===Ms?(t=pd(),bt=4):bt=t===ec?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Rn=t,We===null&&(jt=1,er(e,qn(t,e.current)))}function eh(){var e=Tn.current;return e===null?!0:(Pe&4194048)===Pe?Vn===null:(Pe&62914560)===Pe||(Pe&536870912)!==0?e===Vn:!1}function th(){var e=T.H;return T.H=Go,e===null?Go:e}function nh(){var e=T.A;return T.A=sg,e}function fr(){jt=4,Ga||(Pe&4194048)!==Pe&&Tn.current!==null||(Wl=!0),(Xa&134217727)===0&&(Sl&134217727)===0||Mt===null||Qa(Mt,Pe,Ln,!1)}function Cc(e,t,n){var a=ct;ct|=2;var l=th(),o=nh();(Mt!==e||Pe!==t)&&(ur=null,eo(e,t)),t=!1;var u=jt;e:do try{if(bt!==0&&We!==null){var g=We,w=Rn;switch(bt){case 8:wc(),u=6;break e;case 3:case 2:case 9:case 6:Tn.current===null&&(t=!0);var R=bt;if(bt=0,Rn=null,to(e,g,w,R),n&&Wl){u=0;break e}break;default:R=bt,bt=0,Rn=null,to(e,g,w,R)}}dg(),u=jt;break}catch(Y){Pf(e,Y)}while(!0);return t&&e.shellSuspendCounter++,ga=fl=null,ct=a,T.H=l,T.A=o,We===null&&(Mt=null,Pe=0,Li()),u}function dg(){for(;We!==null;)ah(We)}function fg(e,t){var n=ct;ct|=2;var a=th(),l=nh();Mt!==e||Pe!==t?(ur=null,cr=mt()+500,eo(e,t)):Wl=zn(e,t);e:do try{if(bt!==0&&We!==null){t=We;var o=Rn;t:switch(bt){case 1:bt=0,Rn=null,to(e,t,o,1);break;case 2:case 9:if(fd(o)){bt=0,Rn=null,lh(t);break}t=function(){bt!==2&&bt!==9||Mt!==e||(bt=7),na(e)},o.then(t,t);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:fd(o)?(bt=0,Rn=null,lh(t)):(bt=0,Rn=null,to(e,t,o,7));break;case 5:var u=null;switch(We.tag){case 26:u=We.memoizedState;case 5:case 27:var g=We;if(u?Xh(u):g.stateNode.complete){bt=0,Rn=null;var w=g.sibling;if(w!==null)We=w;else{var R=g.return;R!==null?(We=R,hr(R)):We=null}break t}}bt=0,Rn=null,to(e,t,o,5);break;case 6:bt=0,Rn=null,to(e,t,o,6);break;case 8:wc(),jt=6;break e;default:throw Error(d(462))}}hg();break}catch(Y){Pf(e,Y)}while(!0);return ga=fl=null,T.H=a,T.A=l,ct=n,We!==null?0:(Mt=null,Pe=0,Li(),jt)}function hg(){for(;We!==null&&!kt();)ah(We)}function ah(e){var t=Df(e.alternate,e,za);e.memoizedProps=e.pendingProps,t===null?hr(e):We=t}function lh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Sf(n,t,t.pendingProps,t.type,void 0,Pe);break;case 11:t=Sf(n,t,t.pendingProps,t.type.render,t.ref,Pe);break;case 5:Ns(t);default:Tf(n,t),t=We=td(t,za),t=Df(n,t,za)}e.memoizedProps=e.pendingProps,t===null?hr(e):We=t}function to(e,t,n,a){ga=fl=null,Ns(t),Vl=null,_o=0;var l=t.return;try{if(tg(e,l,t,n,Pe)){jt=1,er(e,qn(n,e.current)),We=null;return}}catch(o){if(l!==null)throw We=l,o;jt=1,er(e,qn(n,e.current)),We=null;return}t.flags&32768?(nt||a===1?e=!0:Wl||(Pe&536870912)!==0?e=!1:(Ga=e=!0,(a===2||a===9||a===3||a===6)&&(a=Tn.current,a!==null&&a.tag===13&&(a.flags|=16384))),oh(t,e)):hr(t)}function hr(e){var t=e;do{if((t.flags&32768)!==0){oh(t,Ga);return}e=t.return;var n=lg(t.alternate,t,za);if(n!==null){We=n;return}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);jt===0&&(jt=5)}function oh(e,t){do{var n=og(e.alternate,e);if(n!==null){n.flags&=32767,We=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){We=e;return}We=e=n}while(e!==null);jt=6,We=null}function ih(e,t,n,a,l,o,u,g,w){e.cancelPendingCommit=null;do pr();while(en!==0);if((ct&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(o=t.lanes|t.childLanes,o|=ds,Xr(e,n,o,u,g,w),e===Mt&&(We=Mt=null,Pe=0),Pl=t,Fa=e,Ma=n,vc=o,xc=l,Jf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,yg(mn,function(){return dh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=T.T,T.T=null,l=Z.p,Z.p=2,u=ct,ct|=4;try{ig(e,t,n)}finally{ct=u,Z.p=l,T.T=a}}en=1,rh(),sh(),ch()}}function rh(){if(en===1){en=0;var e=Fa,t=Pl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=T.T,T.T=null;var a=Z.p;Z.p=2;var l=ct;ct|=4;try{Yf(t,e);var o=Hc,u=Qu(e.containerInfo),g=o.focusedElem,w=o.selectionRange;if(u!==g&&g&&g.ownerDocument&&Fu(g.ownerDocument.documentElement,g)){if(w!==null&&is(g)){var R=w.start,Y=w.end;if(Y===void 0&&(Y=R),"selectionStart"in g)g.selectionStart=R,g.selectionEnd=Math.min(Y,g.value.length);else{var K=g.ownerDocument||document,L=K&&K.defaultView||window;if(L.getSelection){var B=L.getSelection(),ye=g.textContent.length,Le=Math.min(w.start,ye),Ct=w.end===void 0?Le:Math.min(w.end,ye);!B.extend&&Le>Ct&&(u=Ct,Ct=Le,Le=u);var M=Vu(g,Le),k=Vu(g,Ct);if(M&&k&&(B.rangeCount!==1||B.anchorNode!==M.node||B.anchorOffset!==M.offset||B.focusNode!==k.node||B.focusOffset!==k.offset)){var E=K.createRange();E.setStart(M.node,M.offset),B.removeAllRanges(),Le>Ct?(B.addRange(E),B.extend(k.node,k.offset)):(E.setEnd(k.node,k.offset),B.addRange(E))}}}}for(K=[],B=g;B=B.parentNode;)B.nodeType===1&&K.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<K.length;g++){var V=K[g];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Mr=!!_c,Hc=_c=null}finally{ct=l,Z.p=a,T.T=n}}e.current=t,en=2}}function sh(){if(en===2){en=0;var e=Fa,t=Pl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=T.T,T.T=null;var a=Z.p;Z.p=2;var l=ct;ct|=4;try{Bf(e,t.alternate,t)}finally{ct=l,Z.p=a,T.T=n}}en=3}}function ch(){if(en===4||en===3){en=0,Te();var e=Fa,t=Pl,n=Ma,a=Jf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?en=5:(en=0,Pl=Fa=null,uh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(Va=null),yo(n),t=t.stateNode,Me&&typeof Me.onCommitFiberRoot=="function")try{Me.onCommitFiberRoot(Be,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=T.T,l=Z.p,Z.p=2,T.T=null;try{for(var o=e.onRecoverableError,u=0;u<a.length;u++){var g=a[u];o(g.value,{componentStack:g.stack})}}finally{T.T=t,Z.p=l}}(Ma&3)!==0&&pr(),na(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===Sc?Wo++:(Wo=0,Sc=e):Wo=0,Io(0)}}function uh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Lo(t)))}function pr(){return rh(),sh(),ch(),dh()}function dh(){if(en!==5)return!1;var e=Fa,t=vc;vc=0;var n=yo(Ma),a=T.T,l=Z.p;try{Z.p=32>n?32:n,T.T=null,n=xc,xc=null;var o=Fa,u=Ma;if(en=0,Pl=Fa=null,Ma=0,(ct&6)!==0)throw Error(d(331));var g=ct;if(ct|=4,Qf(o.current),Xf(o,o.current,u,n),ct=g,Io(0,!1),Me&&typeof Me.onPostCommitFiberRoot=="function")try{Me.onPostCommitFiberRoot(Be,o)}catch{}return!0}finally{Z.p=l,T.T=a,uh(e,t)}}function fh(e,t,n){t=qn(n,t),t=Ps(e.stateNode,t,2),e=Na(e,t,2),e!==null&&(Ut(e,2),na(e))}function vt(e,t,n){if(e.tag===3)fh(e,e,n);else for(;t!==null;){if(t.tag===3){fh(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Va===null||!Va.has(a))){e=qn(n,e),n=hf(2),a=Na(t,n,2),a!==null&&(pf(n,a,t,e),Ut(a,2),na(a));break}}t=t.return}}function kc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new cg;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(mc=!0,l.add(n),e=pg.bind(null,e,t,n),t.then(e,e))}function pg(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Mt===e&&(Pe&n)===n&&(jt===4||jt===3&&(Pe&62914560)===Pe&&300>mt()-sr?(ct&2)===0&&eo(e,0):yc|=n,Il===Pe&&(Il=0)),na(e)}function hh(e,t){t===0&&(t=ra()),e=cl(e,t),e!==null&&(Ut(e,t),na(e))}function gg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hh(e,n)}function mg(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(t),hh(e,n)}function yg(e,t){return $e(e,t)}var gr=null,no=null,zc=!1,mr=!1,Mc=!1,Ka=0;function na(e){e!==no&&e.next===null&&(no===null?gr=no=e:no=no.next=e),mr=!0,zc||(zc=!0,vg())}function Io(e,t){if(!Mc&&mr){Mc=!0;do for(var n=!1,a=gr;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var o=0;else{var u=a.suspendedLanes,g=a.pingedLanes;o=(1<<31-yt(42|e)+1)-1,o&=l&~(u&~g),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,yh(a,o))}else o=Pe,o=Rt(a,a===Mt?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(o&3)===0||zn(a,o)||(n=!0,yh(a,o));a=a.next}while(n);Mc=!1}}function bg(){ph()}function ph(){mr=zc=!1;var e=0;Ka!==0&&Tg()&&(e=Ka);for(var t=mt(),n=null,a=gr;a!==null;){var l=a.next,o=gh(a,t);o===0?(a.next=null,n===null?gr=l:n.next=l,l===null&&(no=n)):(n=a,(e!==0||(o&3)!==0)&&(mr=!0)),a=l}en!==0&&en!==5||Io(e),Ka!==0&&(Ka=0)}function gh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var u=31-yt(o),g=1<<u,w=l[u];w===-1?((g&n)===0||(g&a)!==0)&&(l[u]=Ml(g,t)):w<=t&&(e.expiredLanes|=g),o&=~g}if(t=Mt,n=Pe,n=Rt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(bt===2||bt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&gt(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||zn(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&gt(a),yo(n)){case 2:case 8:n=kn;break;case 32:n=mn;break;case 268435456:n=ue;break;default:n=mn}return a=mh.bind(null,e),n=$e(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&gt(a),e.callbackPriority=2,e.callbackNode=null,2}function mh(e,t){if(en!==0&&en!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(pr()&&e.callbackNode!==n)return null;var a=Pe;return a=Rt(e,e===Mt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Wf(e,a,t),gh(e,mt()),e.callbackNode!=null&&e.callbackNode===n?mh.bind(null,e):null)}function yh(e,t){if(pr())return null;Wf(e,t,!0)}function vg(){Rg(function(){(ct&6)!==0?$e(Hn,bg):ph()})}function Dc(){if(Ka===0){var e=Yl;e===0&&(e=U,U<<=1,(U&261888)===0&&(U=256)),Ka=e}return Ka}function bh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ki(""+e)}function vh(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 xg(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var o=bh((l[Gt]||null).action),u=a.submitter;u&&(t=(t=u[Gt]||null)?bh(t.formAction):u.getAttribute("formAction"),t!==null&&(o=t,u=null));var g=new Ai("action","action",null,a,l);e.push({event:g,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ka!==0){var w=u?vh(l,u):new FormData(l);Ks(n,{pending:!0,data:w,method:l.method,action:o},null,w)}}else typeof o=="function"&&(g.preventDefault(),w=u?vh(l,u):new FormData(l),Ks(n,{pending:!0,data:w,method:l.method,action:o},o,w))},currentTarget:l}]})}}for(var Ac=0;Ac<us.length;Ac++){var Tc=us[Ac],Sg=Tc.toLowerCase(),wg=Tc[0].toUpperCase()+Tc.slice(1);Zn(Sg,"on"+wg)}Zn(Ju,"onAnimationEnd"),Zn($u,"onAnimationIteration"),Zn(Wu,"onAnimationStart"),Zn("dblclick","onDoubleClick"),Zn("focusin","onFocus"),Zn("focusout","onBlur"),Zn(N0,"onTransitionRun"),Zn(j0,"onTransitionStart"),Zn(q0,"onTransitionCancel"),Zn(Iu,"onTransitionEnd"),ot("onMouseEnter",["mouseout","mouseover"]),ot("onMouseLeave",["mouseout","mouseover"]),ot("onPointerEnter",["pointerout","pointerover"]),ot("onPointerLeave",["pointerout","pointerover"]),lt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),lt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),lt("onBeforeInput",["compositionend","keypress","textInput","paste"]),lt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),lt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),lt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Po="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(" "),Cg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Po));function xh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var o=void 0;if(t)for(var u=a.length-1;0<=u;u--){var g=a[u],w=g.instance,R=g.currentTarget;if(g=g.listener,w!==o&&l.isPropagationStopped())break e;o=g,l.currentTarget=R;try{o(l)}catch(Y){Ri(Y)}l.currentTarget=null,o=w}else for(u=0;u<a.length;u++){if(g=a[u],w=g.instance,R=g.currentTarget,g=g.listener,w!==o&&l.isPropagationStopped())break e;o=g,l.currentTarget=R;try{o(l)}catch(Y){Ri(Y)}l.currentTarget=null,o=w}}}}function Ie(e,t){var n=t[Dl];n===void 0&&(n=t[Dl]=new Set);var a=e+"__bubble";n.has(a)||(Sh(t,e,2,!1),n.add(a))}function Ec(e,t,n){var a=0;t&&(a|=4),Sh(n,e,a,t)}var yr="_reactListening"+Math.random().toString(36).slice(2);function Rc(e){if(!e[yr]){e[yr]=!0,_e.forEach(function(n){n!=="selectionchange"&&(Cg.has(n)||Ec(n,!1,e),Ec(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yr]||(t[yr]=!0,Ec("selectionchange",!1,t))}}function Sh(e,t,n,a){switch($h(t)){case 2:var l=Wg;break;case 8:l=Ig;break;default:l=Qc}n=l.bind(null,t,n,e),l=void 0,!Wr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Lc(e,t,n,a,l){var o=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var g=a.stateNode.containerInfo;if(g===l)break;if(u===4)for(u=a.return;u!==null;){var w=u.tag;if((w===3||w===4)&&u.stateNode.containerInfo===l)return;u=u.return}for(;g!==null;){if(u=ca(g),u===null)return;if(w=u.tag,w===5||w===6||w===26||w===27){a=o=u;continue e}g=g.parentNode}}a=a.return}zu(function(){var R=o,Y=Jr(n),K=[];e:{var L=Pu.get(e);if(L!==void 0){var B=Ai,ye=e;switch(e){case"keypress":if(Mi(n)===0)break e;case"keydown":case"keyup":B=m0;break;case"focusin":ye="focus",B=ts;break;case"focusout":ye="blur",B=ts;break;case"beforeblur":case"afterblur":B=ts;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":B=Au;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=l0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=v0;break;case Ju:case $u:case Wu:B=r0;break;case Iu:B=S0;break;case"scroll":case"scrollend":B=n0;break;case"wheel":B=C0;break;case"copy":case"cut":case"paste":B=c0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Eu;break;case"toggle":case"beforetoggle":B=z0}var Le=(t&4)!==0,Ct=!Le&&(e==="scroll"||e==="scrollend"),M=Le?L!==null?L+"Capture":null:L;Le=[];for(var k=R,E;k!==null;){var V=k;if(E=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||E===null||M===null||(V=So(k,M),V!=null&&Le.push(ei(k,V,E))),Ct)break;k=k.return}0<Le.length&&(L=new B(L,ye,null,n,Y),K.push({event:L,listeners:Le}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",L&&n!==Zr&&(ye=n.relatedTarget||n.fromElement)&&(ca(ye)||ye[Mn]))break e;if((B||L)&&(L=Y.window===Y?Y:(L=Y.ownerDocument)?L.defaultView||L.parentWindow:window,B?(ye=n.relatedTarget||n.toElement,B=R,ye=ye?ca(ye):null,ye!==null&&(Ct=p(ye),Le=ye.tag,ye!==Ct||Le!==5&&Le!==27&&Le!==6)&&(ye=null)):(B=null,ye=R),B!==ye)){if(Le=Au,V="onMouseLeave",M="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(Le=Eu,V="onPointerLeave",M="onPointerEnter",k="pointer"),Ct=B==null?L:se(B),E=ye==null?L:se(ye),L=new Le(V,k+"leave",B,n,Y),L.target=Ct,L.relatedTarget=E,V=null,ca(Y)===R&&(Le=new Le(M,k+"enter",ye,n,Y),Le.target=E,Le.relatedTarget=Ct,V=Le),Ct=V,B&&ye)t:{for(Le=kg,M=B,k=ye,E=0,V=M;V;V=Le(V))E++;V=0;for(var Ae=k;Ae;Ae=Le(Ae))V++;for(;0<E-V;)M=Le(M),E--;for(;0<V-E;)k=Le(k),V--;for(;E--;){if(M===k||k!==null&&M===k.alternate){Le=M;break t}M=Le(M),k=Le(k)}Le=null}else Le=null;B!==null&&wh(K,L,B,Le,!1),ye!==null&&Ct!==null&&wh(K,Ct,ye,Le,!0)}}e:{if(L=R?se(R):window,B=L.nodeName&&L.nodeName.toLowerCase(),B==="select"||B==="input"&&L.type==="file")var rt=Nu;else if(Bu(L))if(ju)rt=H0;else{rt=O0;var Ce=L0}else B=L.nodeName,!B||B.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?R&&Kr(R.elementType)&&(rt=Nu):rt=_0;if(rt&&(rt=rt(e,R))){Uu(K,rt,n,Y);break e}Ce&&Ce(e,L,R),e==="focusout"&&R&&L.type==="number"&&R.memoizedProps.value!=null&&Qr(L,"number",L.value)}switch(Ce=R?se(R):window,e){case"focusin":(Bu(Ce)||Ce.contentEditable==="true")&&(Ol=Ce,rs=R,To=null);break;case"focusout":To=rs=Ol=null;break;case"mousedown":ss=!0;break;case"contextmenu":case"mouseup":case"dragend":ss=!1,Ku(K,n,Y);break;case"selectionchange":if(U0)break;case"keydown":case"keyup":Ku(K,n,Y)}var Qe;if(as)e:{switch(e){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else Ll?_u(e,n)&&(et="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(et="onCompositionStart");et&&(Ru&&n.locale!=="ko"&&(Ll||et!=="onCompositionStart"?et==="onCompositionEnd"&&Ll&&(Qe=Mu()):(Ra=Y,Ir="value"in Ra?Ra.value:Ra.textContent,Ll=!0)),Ce=br(R,et),0<Ce.length&&(et=new Tu(et,e,null,n,Y),K.push({event:et,listeners:Ce}),Qe?et.data=Qe:(Qe=Hu(n),Qe!==null&&(et.data=Qe)))),(Qe=D0?A0(e,n):T0(e,n))&&(et=br(R,"onBeforeInput"),0<et.length&&(Ce=new Tu("onBeforeInput","beforeinput",null,n,Y),K.push({event:Ce,listeners:et}),Ce.data=Qe)),xg(K,e,R,n,Y)}xh(K,t)})}function ei(e,t,n){return{instance:e,listener:t,currentTarget:n}}function br(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,o=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||o===null||(l=So(e,n),l!=null&&a.unshift(ei(e,l,o)),l=So(e,t),l!=null&&a.push(ei(e,l,o))),e.tag===3)return a;e=e.return}return[]}function kg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function wh(e,t,n,a,l){for(var o=t._reactName,u=[];n!==null&&n!==a;){var g=n,w=g.alternate,R=g.stateNode;if(g=g.tag,w!==null&&w===a)break;g!==5&&g!==26&&g!==27||R===null||(w=R,l?(R=So(n,o),R!=null&&u.unshift(ei(n,R,w))):l||(R=So(n,o),R!=null&&u.push(ei(n,R,w)))),n=n.return}u.length!==0&&e.push({event:t,listeners:u})}var zg=/\r\n?/g,Mg=/\u0000|\uFFFD/g;function Ch(e){return(typeof e=="string"?e:""+e).replace(zg,`
9
- `).replace(Mg,"")}function kh(e,t){return t=Ch(t),Ch(e)===t}function wt(e,t,n,a,l,o){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Tl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Tl(e,""+a);break;case"className":wi(e,"class",a);break;case"tabIndex":wi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":wi(e,n,a);break;case"style":Cu(e,a,o);break;case"data":if(t!=="object"){wi(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ki(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(n==="formAction"?(t!=="input"&&wt(e,t,"name",l.name,l,null),wt(e,t,"formEncType",l.formEncType,l,null),wt(e,t,"formMethod",l.formMethod,l,null),wt(e,t,"formTarget",l.formTarget,l,null)):(wt(e,t,"encType",l.encType,l,null),wt(e,t,"method",l.method,l,null),wt(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ki(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=da);break;case"onScroll":a!=null&&Ie("scroll",e);break;case"onScrollEnd":a!=null&&Ie("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=ki(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Ie("beforetoggle",e),Ie("toggle",e),Si(e,"popover",a);break;case"xlinkActuate":ua(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ua(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ua(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ua(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ua(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ua(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ua(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ua(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ua(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Si(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=e0.get(n)||n,Si(e,n,a))}}function Oc(e,t,n,a,l,o){switch(n){case"style":Cu(e,a,o);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Tl(e,a):(typeof a=="number"||typeof a=="bigint")&&Tl(e,""+a);break;case"onScroll":a!=null&&Ie("scroll",e);break;case"onScrollEnd":a!=null&&Ie("scrollend",e);break;case"onClick":a!=null&&(e.onclick=da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ue.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),o=e[Gt]||null,o=o!=null?o[n]:null,typeof o=="function"&&e.removeEventListener(t,o,l),typeof a=="function")){typeof o!="function"&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,l);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):Si(e,n,a)}}}function rn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",e),Ie("load",e);var a=!1,l=!1,o;for(o in n)if(n.hasOwnProperty(o)){var u=n[o];if(u!=null)switch(o){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:wt(e,t,o,u,n,null)}}l&&wt(e,t,"srcSet",n.srcSet,n,null),a&&wt(e,t,"src",n.src,n,null);return;case"input":Ie("invalid",e);var g=o=u=l=null,w=null,R=null;for(a in n)if(n.hasOwnProperty(a)){var Y=n[a];if(Y!=null)switch(a){case"name":l=Y;break;case"type":u=Y;break;case"checked":w=Y;break;case"defaultChecked":R=Y;break;case"value":o=Y;break;case"defaultValue":g=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(d(137,t));break;default:wt(e,t,a,Y,n,null)}}vu(e,o,g,w,R,u,l,!1);return;case"select":Ie("invalid",e),a=u=o=null;for(l in n)if(n.hasOwnProperty(l)&&(g=n[l],g!=null))switch(l){case"value":o=g;break;case"defaultValue":u=g;break;case"multiple":a=g;default:wt(e,t,l,g,n,null)}t=o,n=u,e.multiple=!!a,t!=null?Al(e,!!a,t,!1):n!=null&&Al(e,!!a,n,!0);return;case"textarea":Ie("invalid",e),o=l=a=null;for(u in n)if(n.hasOwnProperty(u)&&(g=n[u],g!=null))switch(u){case"value":a=g;break;case"defaultValue":l=g;break;case"children":o=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(d(91));break;default:wt(e,t,u,g,n,null)}Su(e,a,l,o);return;case"option":for(w in n)n.hasOwnProperty(w)&&(a=n[w],a!=null)&&(w==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":wt(e,t,w,a,n,null));return;case"dialog":Ie("beforetoggle",e),Ie("toggle",e),Ie("cancel",e),Ie("close",e);break;case"iframe":case"object":Ie("load",e);break;case"video":case"audio":for(a=0;a<Po.length;a++)Ie(Po[a],e);break;case"image":Ie("error",e),Ie("load",e);break;case"details":Ie("toggle",e);break;case"embed":case"source":case"link":Ie("error",e),Ie("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in n)if(n.hasOwnProperty(R)&&(a=n[R],a!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:wt(e,t,R,a,n,null)}return;default:if(Kr(t)){for(Y in n)n.hasOwnProperty(Y)&&(a=n[Y],a!==void 0&&Oc(e,t,Y,a,n,void 0));return}}for(g in n)n.hasOwnProperty(g)&&(a=n[g],a!=null&&wt(e,t,g,a,n,null))}function Dg(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,o=null,u=null,g=null,w=null,R=null,Y=null;for(B in n){var K=n[B];if(n.hasOwnProperty(B)&&K!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":w=K;default:a.hasOwnProperty(B)||wt(e,t,B,null,a,K)}}for(var L in a){var B=a[L];if(K=n[L],a.hasOwnProperty(L)&&(B!=null||K!=null))switch(L){case"type":o=B;break;case"name":l=B;break;case"checked":R=B;break;case"defaultChecked":Y=B;break;case"value":u=B;break;case"defaultValue":g=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(d(137,t));break;default:B!==K&&wt(e,t,L,B,a,K)}}Fr(e,u,g,w,R,Y,o,l);return;case"select":B=u=g=L=null;for(o in n)if(w=n[o],n.hasOwnProperty(o)&&w!=null)switch(o){case"value":break;case"multiple":B=w;default:a.hasOwnProperty(o)||wt(e,t,o,null,a,w)}for(l in a)if(o=a[l],w=n[l],a.hasOwnProperty(l)&&(o!=null||w!=null))switch(l){case"value":L=o;break;case"defaultValue":g=o;break;case"multiple":u=o;default:o!==w&&wt(e,t,l,o,a,w)}t=g,n=u,a=B,L!=null?Al(e,!!n,L,!1):!!a!=!!n&&(t!=null?Al(e,!!n,t,!0):Al(e,!!n,n?[]:"",!1));return;case"textarea":B=L=null;for(g in n)if(l=n[g],n.hasOwnProperty(g)&&l!=null&&!a.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:wt(e,t,g,null,a,l)}for(u in a)if(l=a[u],o=n[u],a.hasOwnProperty(u)&&(l!=null||o!=null))switch(u){case"value":L=l;break;case"defaultValue":B=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(d(91));break;default:l!==o&&wt(e,t,u,l,a,o)}xu(e,L,B);return;case"option":for(var ye in n)L=n[ye],n.hasOwnProperty(ye)&&L!=null&&!a.hasOwnProperty(ye)&&(ye==="selected"?e.selected=!1:wt(e,t,ye,null,a,L));for(w in a)L=a[w],B=n[w],a.hasOwnProperty(w)&&L!==B&&(L!=null||B!=null)&&(w==="selected"?e.selected=L&&typeof L!="function"&&typeof L!="symbol":wt(e,t,w,L,a,B));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 Le in n)L=n[Le],n.hasOwnProperty(Le)&&L!=null&&!a.hasOwnProperty(Le)&&wt(e,t,Le,null,a,L);for(R in a)if(L=a[R],B=n[R],a.hasOwnProperty(R)&&L!==B&&(L!=null||B!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(d(137,t));break;default:wt(e,t,R,L,a,B)}return;default:if(Kr(t)){for(var Ct in n)L=n[Ct],n.hasOwnProperty(Ct)&&L!==void 0&&!a.hasOwnProperty(Ct)&&Oc(e,t,Ct,void 0,a,L);for(Y in a)L=a[Y],B=n[Y],!a.hasOwnProperty(Y)||L===B||L===void 0&&B===void 0||Oc(e,t,Y,L,a,B);return}}for(var M in n)L=n[M],n.hasOwnProperty(M)&&L!=null&&!a.hasOwnProperty(M)&&wt(e,t,M,null,a,L);for(K in a)L=a[K],B=n[K],!a.hasOwnProperty(K)||L===B||L==null&&B==null||wt(e,t,K,L,a,B)}function zh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ag(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var l=n[a],o=l.transferSize,u=l.initiatorType,g=l.duration;if(o&&g&&zh(u)){for(u=0,g=l.responseEnd,a+=1;a<n.length;a++){var w=n[a],R=w.startTime;if(R>g)break;var Y=w.transferSize,K=w.initiatorType;Y&&zh(K)&&(w=w.responseEnd,u+=Y*(w<g?1:(g-R)/(w-R)))}if(--a,t+=8*(o+u)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var _c=null,Hc=null;function vr(e){return e.nodeType===9?e:e.ownerDocument}function Mh(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 Dh(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 Bc(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 Uc=null;function Tg(){var e=window.event;return e&&e.type==="popstate"?e===Uc?!1:(Uc=e,!0):(Uc=null,!1)}var Ah=typeof setTimeout=="function"?setTimeout:void 0,Eg=typeof clearTimeout=="function"?clearTimeout:void 0,Th=typeof Promise=="function"?Promise:void 0,Rg=typeof queueMicrotask=="function"?queueMicrotask:typeof Th<"u"?function(e){return Th.resolve(null).then(e).catch(Lg)}:Ah;function Lg(e){setTimeout(function(){throw e})}function Za(e){return e==="head"}function Eh(e,t){var n=t,a=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(l),io(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")ti(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ti(n);for(var o=n.firstChild;o;){var u=o.nextSibling,g=o.nodeName;o[ol]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=u}}else n==="body"&&ti(e.ownerDocument.body);n=l}while(n);io(t)}function Rh(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Nc(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":Nc(n),vo(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Og(e,t,n,a){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[ol])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=Fn(e.nextSibling),e===null)break}return null}function _g(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Fn(e.nextSibling),e===null))return null;return e}function Lh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Fn(e.nextSibling),e===null))return null;return e}function jc(e){return e.data==="$?"||e.data==="$~"}function qc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Hg(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Fn(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 Yc=null;function Oh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Fn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function _h(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Hh(e,t,n){switch(t=vr(n),e){case"html":if(e=t.documentElement,!e)throw Error(d(452));return e;case"head":if(e=t.head,!e)throw Error(d(453));return e;case"body":if(e=t.body,!e)throw Error(d(454));return e;default:throw Error(d(451))}}function ti(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);vo(e)}var Qn=new Map,Bh=new Set;function xr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Da=Z.d;Z.d={f:Bg,r:Ug,D:Ng,C:jg,L:qg,m:Yg,X:Xg,S:Gg,M:Vg};function Bg(){var e=Da.f(),t=dr();return e||t}function Ug(e){var t=pe(e);t!==null&&t.tag===5&&t.type==="form"?Id(t):Da.r(e)}var ao=typeof document>"u"?null:document;function Uh(e,t,n){var a=ao;if(a&&typeof t=="string"&&t){var l=Nn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Bh.has(l)||(Bh.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),rn(t,"link",e),ve(t),a.head.appendChild(t)))}}function Ng(e){Da.D(e),Uh("dns-prefetch",e,null)}function jg(e,t){Da.C(e,t),Uh("preconnect",e,t)}function qg(e,t,n){Da.L(e,t,n);var a=ao;if(a&&e&&t){var l='link[rel="preload"][as="'+Nn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Nn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Nn(n.imageSizes)+'"]')):l+='[href="'+Nn(e)+'"]';var o=l;switch(t){case"style":o=lo(e);break;case"script":o=oo(e)}Qn.has(o)||(e=z({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Qn.set(o,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(ni(o))||t==="script"&&a.querySelector(ai(o))||(t=a.createElement("link"),rn(t,"link",e),ve(t),a.head.appendChild(t)))}}function Yg(e,t){Da.m(e,t);var n=ao;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Nn(a)+'"][href="'+Nn(e)+'"]',o=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=oo(e)}if(!Qn.has(o)&&(e=z({rel:"modulepreload",href:e},t),Qn.set(o,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ai(o)))return}a=n.createElement("link"),rn(a,"link",e),ve(a),n.head.appendChild(a)}}}function Gg(e,t,n){Da.S(e,t,n);var a=ao;if(a&&e){var l=be(a).hoistableStyles,o=lo(e);t=t||"default";var u=l.get(o);if(!u){var g={loading:0,preload:null};if(u=a.querySelector(ni(o)))g.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Qn.get(o))&&Gc(e,n);var w=u=a.createElement("link");ve(w),rn(w,"link",e),w._p=new Promise(function(R,Y){w.onload=R,w.onerror=Y}),w.addEventListener("load",function(){g.loading|=1}),w.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Sr(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:g},l.set(o,u)}}}function Xg(e,t){Da.X(e,t);var n=ao;if(n&&e){var a=be(n).hoistableScripts,l=oo(e),o=a.get(l);o||(o=n.querySelector(ai(l)),o||(e=z({src:e,async:!0},t),(t=Qn.get(l))&&Xc(e,t),o=n.createElement("script"),ve(o),rn(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Vg(e,t){Da.M(e,t);var n=ao;if(n&&e){var a=be(n).hoistableScripts,l=oo(e),o=a.get(l);o||(o=n.querySelector(ai(l)),o||(e=z({src:e,async:!0,type:"module"},t),(t=Qn.get(l))&&Xc(e,t),o=n.createElement("script"),ve(o),rn(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Nh(e,t,n,a){var l=(l=ze.current)?xr(l):null;if(!l)throw Error(d(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=lo(n.href),n=be(l).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=lo(n.href);var o=be(l).hoistableStyles,u=o.get(e);if(u||(l=l.ownerDocument||l,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,u),(o=l.querySelector(ni(e)))&&!o._p&&(u.instance=o,u.state.loading=5),Qn.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},Qn.set(e,n),o||Fg(l,e,n,u.state))),t&&a===null)throw Error(d(528,""));return u}if(t&&a!==null)throw Error(d(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=oo(n),n=be(l).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,e))}}function lo(e){return'href="'+Nn(e)+'"'}function ni(e){return'link[rel="stylesheet"]['+e+"]"}function jh(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function Fg(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),rn(t,"link",n),ve(t),e.head.appendChild(t))}function oo(e){return'[src="'+Nn(e)+'"]'}function ai(e){return"script[async]"+e}function qh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Nn(n.href)+'"]');if(a)return t.instance=a,ve(a),a;var l=z({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ve(a),rn(a,"style",l),Sr(a,n.precedence,e),t.instance=a;case"stylesheet":l=lo(n.href);var o=e.querySelector(ni(l));if(o)return t.state.loading|=4,t.instance=o,ve(o),o;a=jh(n),(l=Qn.get(l))&&Gc(a,l),o=(e.ownerDocument||e).createElement("link"),ve(o);var u=o;return u._p=new Promise(function(g,w){u.onload=g,u.onerror=w}),rn(o,"link",a),t.state.loading|=4,Sr(o,n.precedence,e),t.instance=o;case"script":return o=oo(n.src),(l=e.querySelector(ai(o)))?(t.instance=l,ve(l),l):(a=n,(l=Qn.get(o))&&(a=z({},n),Xc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),ve(l),rn(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(d(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Sr(a,n.precedence,e));return t.instance}function Sr(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,o=l,u=0;u<a.length;u++){var g=a[u];if(g.dataset.precedence===t)o=g;else if(o!==l)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Gc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var wr=null;function Yh(e,t,n){if(wr===null){var a=new Map,l=wr=new Map;l.set(n,a)}else l=wr,a=l.get(n),a||(a=new Map,l.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var o=n[l];if(!(o[ol]||o[Lt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var u=o.getAttribute(t)||"";u=e+u;var g=a.get(u);g?g.push(o):a.set(u,[o])}}return a}function Gh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Qg(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 Xh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Kg(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=lo(a.href),o=t.querySelector(ni(l));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Cr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,ve(o);return}o=t.ownerDocument||t,a=jh(a),(l=Qn.get(l))&&Gc(a,l),o=o.createElement("link"),ve(o);var u=o;u._p=new Promise(function(g,w){u.onload=g,u.onerror=w}),rn(o,"link",a),n.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Cr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Vc=0;function Zg(e,t){return e.stylesheets&&e.count===0&&zr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&zr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Vc===0&&(Vc=62500*Ag());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&zr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Vc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function Cr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var kr=null;function zr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,kr=new Map,t.forEach(Jg,e),kr=null,Cr.call(e))}function Jg(e,t){if(!(t.state.loading&4)){var n=kr.get(e);if(n)var a=n.get(null);else{n=new Map,kr.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<l.length;o++){var u=l[o];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(n.set(u.dataset.precedence,u),a=u)}a&&n.set(null,a)}l=t.instance,u=l.getAttribute("data-precedence"),o=n.get(u)||a,o===a&&n.set(null,l),n.set(u,l),this.count++,a=Cr.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),o?o.parentNode.insertBefore(l,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var li={$$typeof:Q,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function $g(e,t,n,a,l,o,u,g,w){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=Bn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bn(0),this.hiddenUpdates=Bn(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=o,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function Vh(e,t,n,a,l,o,u,g,w,R,Y,K){return e=new $g(e,t,n,u,w,R,Y,K,g),t=1,o===!0&&(t|=24),o=An(3,null,null,t),e.current=o,o.stateNode=e,t=Cs(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:a,isDehydrated:n,cache:t},Ds(o),e}function Fh(e){return e?(e=Bl,e):Bl}function Qh(e,t,n,a,l,o){l=Fh(l),a.context===null?a.context=l:a.pendingContext=l,a=Ua(t),a.payload={element:n},o=o===void 0?null:o,o!==null&&(a.callback=o),n=Na(e,a,t),n!==null&&(wn(n,e,t),Bo(n,e,t))}function Kh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Fc(e,t){Kh(e,t),(e=e.alternate)&&Kh(e,t)}function Zh(e){if(e.tag===13||e.tag===31){var t=cl(e,67108864);t!==null&&wn(t,e,67108864),Fc(e,67108864)}}function Jh(e){if(e.tag===13||e.tag===31){var t=On();t=sa(t);var n=cl(e,t);n!==null&&wn(n,e,t),Fc(e,t)}}var Mr=!0;function Wg(e,t,n,a){var l=T.T;T.T=null;var o=Z.p;try{Z.p=2,Qc(e,t,n,a)}finally{Z.p=o,T.T=l}}function Ig(e,t,n,a){var l=T.T;T.T=null;var o=Z.p;try{Z.p=8,Qc(e,t,n,a)}finally{Z.p=o,T.T=l}}function Qc(e,t,n,a){if(Mr){var l=Kc(a);if(l===null)Lc(e,t,a,Dr,n),Wh(e,a);else if(em(l,e,t,n,a))a.stopPropagation();else if(Wh(e,a),t&4&&-1<Pg.indexOf(e)){for(;l!==null;){var o=pe(l);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var u=ft(o.pendingLanes);if(u!==0){var g=o;for(g.pendingLanes|=2,g.entangledLanes|=2;u;){var w=1<<31-yt(u);g.entanglements[1]|=w,u&=~w}na(o),(ct&6)===0&&(cr=mt()+500,Io(0))}}break;case 31:case 13:g=cl(o,2),g!==null&&wn(g,o,2),dr(),Fc(o,2)}if(o=Kc(a),o===null&&Lc(e,t,a,Dr,n),o===l)break;l=o}l!==null&&a.stopPropagation()}else Lc(e,t,a,null,n)}}function Kc(e){return e=Jr(e),Zc(e)}var Dr=null;function Zc(e){if(Dr=null,e=ca(e),e!==null){var t=p(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=C(t),e!==null)return e;e=null}else if(n===31){if(e=D(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Dr=e,null}function $h(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(hn()){case Hn:return 2;case kn:return 8;case mn:case $:return 32;case ue:return 268435456;default:return 32}default:return 32}}var Jc=!1,Ja=null,$a=null,Wa=null,oi=new Map,ii=new Map,Ia=[],Pg="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 Wh(e,t){switch(e){case"focusin":case"focusout":Ja=null;break;case"dragenter":case"dragleave":$a=null;break;case"mouseover":case"mouseout":Wa=null;break;case"pointerover":case"pointerout":oi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ii.delete(t.pointerId)}}function ri(e,t,n,a,l,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:o,targetContainers:[l]},t!==null&&(t=pe(t),t!==null&&Zh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function em(e,t,n,a,l){switch(t){case"focusin":return Ja=ri(Ja,e,t,n,a,l),!0;case"dragenter":return $a=ri($a,e,t,n,a,l),!0;case"mouseover":return Wa=ri(Wa,e,t,n,a,l),!0;case"pointerover":var o=l.pointerId;return oi.set(o,ri(oi.get(o)||null,e,t,n,a,l)),!0;case"gotpointercapture":return o=l.pointerId,ii.set(o,ri(ii.get(o)||null,e,t,n,a,l)),!0}return!1}function Ih(e){var t=ca(e.target);if(t!==null){var n=p(t);if(n!==null){if(t=n.tag,t===13){if(t=C(n),t!==null){e.blockedOn=t,Kn(e.priority,function(){Jh(n)});return}}else if(t===31){if(t=D(n),t!==null){e.blockedOn=t,Kn(e.priority,function(){Jh(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 Ar(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Zr=a,n.target.dispatchEvent(a),Zr=null}else return t=pe(n),t!==null&&Zh(t),e.blockedOn=n,!1;t.shift()}return!0}function Ph(e,t,n){Ar(e)&&n.delete(t)}function tm(){Jc=!1,Ja!==null&&Ar(Ja)&&(Ja=null),$a!==null&&Ar($a)&&($a=null),Wa!==null&&Ar(Wa)&&(Wa=null),oi.forEach(Ph),ii.forEach(Ph)}function Tr(e,t){e.blockedOn===t&&(e.blockedOn=null,Jc||(Jc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,tm)))}var Er=null;function ep(e){Er!==e&&(Er=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Er===e&&(Er=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(Zc(a||n)===null)continue;break}var o=pe(n);o!==null&&(e.splice(t,3),t-=3,Ks(o,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function io(e){function t(w){return Tr(w,e)}Ja!==null&&Tr(Ja,e),$a!==null&&Tr($a,e),Wa!==null&&Tr(Wa,e),oi.forEach(t),ii.forEach(t);for(var n=0;n<Ia.length;n++){var a=Ia[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ia.length&&(n=Ia[0],n.blockedOn===null);)Ih(n),n.blockedOn===null&&Ia.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],o=n[a+1],u=l[Gt]||null;if(typeof o=="function")u||ep(n);else if(u){var g=null;if(o&&o.hasAttribute("formAction")){if(l=o,u=o[Gt]||null)g=u.formAction;else if(Zc(l)!==null)continue}else g=u.action;typeof g=="function"?n[a+1]=g:(n.splice(a,3),a-=3),ep(n)}}}function tp(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(u){return l=u})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function $c(e){this._internalRoot=e}Rr.prototype.render=$c.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var n=t.current,a=On();Qh(n,a,e,t,null,null)},Rr.prototype.unmount=$c.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qh(e.current,2,null,e,null,null),dr(),t[Mn]=null}};function Rr(e){this._internalRoot=e}Rr.prototype.unstable_scheduleHydration=function(e){if(e){var t=xi();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ia.length&&t!==0&&t<Ia[n].priority;n++);Ia.splice(n,0,e),n===0&&Ih(e)}};var np=c.version;if(np!=="19.2.4")throw Error(d(527,np,"19.2.4"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(d(188)):(e=Object.keys(e).join(","),Error(d(268,e)));return e=y(t),e=e!==null?A(e):null,e=e===null?null:e.stateNode,e};var nm={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lr.isDisabled&&Lr.supportsFiber)try{Be=Lr.inject(nm),Me=Lr}catch{}}return ui.createRoot=function(e,t){if(!h(e))throw Error(d(299));var n=!1,a="",l=cf,o=uf,u=df;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Vh(e,1,!1,null,null,n,a,null,l,o,u,tp),e[Mn]=t.current,Rc(e),new $c(t)},ui.hydrateRoot=function(e,t,n){if(!h(e))throw Error(d(299));var a=!1,l="",o=cf,u=uf,g=df,w=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(u=n.onCaughtError),n.onRecoverableError!==void 0&&(g=n.onRecoverableError),n.formState!==void 0&&(w=n.formState)),t=Vh(e,1,!0,t,n??null,a,l,w,o,u,g,tp),t.context=Fh(null),n=t.current,a=On(),a=sa(a),l=Ua(a),l.callback=null,Na(n,l,a),n=a,t.current.lanes=n,Ut(t,n),na(t),e[Mn]=t.current,Rc(e),new Rr(t)},ui.version="19.2.4",ui}var wp;function s1(){if(wp)return nu.exports;wp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),nu.exports=r1(),nu.exports}var c1=s1(),Cp=function(c,f){var d=arguments;if(f==null||!yi.call(f,"css"))return v.createElement.apply(void 0,d);var h=d.length,p=new Array(h);p[0]=mu,p[1]=gu(c,f);for(var C=2;C<h;C++)p[C]=d[C];return v.createElement.apply(null,p)};(function(i){var c;c||(c=i.JSX||(i.JSX={}))})(Cp||(Cp={}));function m(){for(var i=arguments.length,c=new Array(i),f=0;f<i;f++)c[f]=arguments[f];return Yp(c)}function Ft(){var i=m.apply(void 0,arguments),c="animation-"+i.name;return{name:c,styles:"@keyframes "+c+"{"+i.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const u1={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0},d1={isOpen:!1,openStudio:()=>{},closeStudio:()=>{},toggleStudio:()=>{},currentPath:"public",setCurrentPath:()=>{},navigateUp:()=>{},selectedItems:new Set,toggleSelection:()=>{},selectRange:()=>{},selectAll:()=>{},clearSelection:()=>{},lastSelectedPath:null,viewMode:"grid",setViewMode:()=>{},focusedItem:null,setFocusedItem:()=>{},meta:null,setMeta:()=>{},isLoading:!1,setIsLoading:()=>{},refreshKey:0,triggerRefresh:()=>{},editedImageKey:null,setEditedImageKey:()=>{},scanRequested:!1,triggerScan:()=>{},clearScanRequest:()=>{},searchQuery:"",setSearchQuery:()=>{},error:null,showError:()=>{},clearError:()=>{},fileItems:[],setFileItems:()=>{},actionState:u1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Xp=v.createContext(d1);function po(){return v.useContext(Xp)}const kl="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",s={primary:"#635bff",primaryHover:"#5851e5",primaryLight:"#f0f0ff",background:"#f6f9fc",surface:"#ffffff",surfaceHover:"#f6f9fc",border:"#d8dee4",borderLight:"#e3e8ee",borderHover:"#c1c9d2",text:"#1a1f36",textSecondary:"#697386",textMuted:"#8792a2",success:"#0d7d4d",successLight:"#e6f7ef",danger:"#df1b41",dangerHover:"#c41535",dangerLight:"#fff5f7",imagesFolder:"#8b5cf6",hover:"#e8ecf0"},N={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},ll=m("font-family:",kl,";font-size:",N.base,";line-height:1.5;color:",s.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;}",""),f1=Ft`
8
+ `+a.stack}}var Bt=Object.prototype.hasOwnProperty,$e=i.unstable_scheduleCallback,mt=i.unstable_cancelCallback,zt=i.unstable_shouldYield,Te=i.unstable_requestPaint,yt=i.unstable_now,hn=i.unstable_getCurrentPriorityLevel,Hn=i.unstable_ImmediatePriority,kn=i.unstable_UserBlockingPriority,mn=i.unstable_NormalPriority,W=i.unstable_LowPriority,ue=i.unstable_IdlePriority,Ve=i.log,lt=i.unstable_setDisableYieldValue,Ue=null,De=null;function Mt(e){if(typeof Ve=="function"&&lt(e),De&&typeof De.setStrictMode=="function")try{De.setStrictMode(Ue,e)}catch{}}var bt=Math.clz32?Math.clz32:zl,Aa=Math.log,ia=Math.LN2;function zl(e){return e>>>=0,e===0?32:31-(Aa(e)/ia|0)|0}var B=256,_e=262144,ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function st(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,o=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var g=a&134217727;return g!==0?(a=g&~o,a!==0?l=Qe(a):(u&=g,u!==0?l=Qe(u):n||(n=g&~e,n!==0&&(l=Qe(n))))):(g=a&~o,g!==0?l=Qe(g):u!==0?l=Qe(u):n||(n=a&~e,n!==0&&(l=Qe(n)))),l===0?0:t!==0&&t!==l&&(t&o)===0&&(o=l&-l,n=t&-t,o>=n||o===32&&(n&4194048)!==0)?t:l}function zn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ml(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 ra(){var e=ze;return ze<<=1,(ze&62914560)===0&&(ze=4194304),e}function Bn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xr(e,t,n,a,l,o){var u=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var g=e.entanglements,w=e.expirationTimes,R=e.hiddenUpdates;for(n=u&~n;0<n;){var Y=31-bt(n),K=1<<Y;g[Y]=0,w[Y]=-1;var L=R[Y];if(L!==null)for(R[Y]=null,Y=0;Y<L.length;Y++){var U=L[Y];U!==null&&(U.lane&=-536870913)}n&=~K}a!==0&&bi(e,a,0),o!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=o&~(u&~t))}function bi(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-bt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function vi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-bt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function mo(e,t){var n=t&-t;return n=(n&42)!==0?1:sa(n),(n&(e.suspendedLanes|t))!==0?0:n}function sa(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 yo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function xi(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:Wh(e.type))}function Kn(e,t){var n=Z.p;try{return Z.p=e,t()}finally{Z.p=n}}var In=Math.random().toString(36).slice(2),Lt="__reactFiber$"+In,Gt="__reactProps$"+In,Mn="__reactContainer$"+In,Dl="__reactEvents$"+In,Ta="__reactListeners$"+In,Ea="__reactHandles$"+In,bo="__reactResources$"+In,ol="__reactMarker$"+In;function vo(e){delete e[Lt],delete e[Gt],delete e[Dl],delete e[Ta],delete e[Ea]}function ca(e){var t=e[Lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Mn]||n[Lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_h(e);e!==null;){if(n=e[Lt])return n;e=_h(e)}return t}e=n,n=e.parentNode}return null}function pe(e){if(e=e[Lt]||e[Mn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function se(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function be(e){var t=e[bo];return t||(t=e[bo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ve(e){e[ol]=!0}var He=new Set,Ne={};function ot(e,t){it(e,t),it(e+"Capture",t)}function it(e,t){for(Ne[e]=t,e=0;e<t.length;e++)He.add(t[e])}var je=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]*$"),pn={},xo={};function Wp(e){return Bt.call(xo,e)?!0:Bt.call(pn,e)?!1:je.test(e)?xo[e]=!0:(pn[e]=!0,!1)}function Si(e,t,n){if(Wp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function wi(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 ua(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function Un(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $p(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,o=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(u){n=""+u,o.call(this,u)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(u){n=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vr(e){if(!e._valueTracker){var t=yu(e)?"checked":"value";e._valueTracker=$p(e,t,""+e[t])}}function bu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=yu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Ci(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ip=/[\n"\\]/g;function Nn(e){return e.replace(Ip,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Fr(e,t,n,a,l,o,u,g){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Un(t)):e.value!==""+Un(t)&&(e.value=""+Un(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Qr(e,u,Un(t)):n!=null?Qr(e,u,Un(n)):a!=null&&e.removeAttribute("value"),l==null&&o!=null&&(e.defaultChecked=!!o),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.name=""+Un(g):e.removeAttribute("name")}function vu(e,t,n,a,l,o,u,g){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Vr(e);return}n=n!=null?""+Un(n):"",t=t!=null?""+Un(t):n,g||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=g?e.checked:!!a,e.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),Vr(e)}function Qr(e,t,n){t==="number"&&Ci(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Al(e,t,n,a){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Un(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function xu(e,t,n){if(t!=null&&(t=""+Un(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Un(n):""}function Su(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(d(92));if(Oe(a)){if(1<a.length)throw Error(d(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Un(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Vr(e)}function Tl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pp=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 wu(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||Pp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Cu(e,t,n){if(t!=null&&typeof t!="object")throw Error(d(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&wu(e,l,a)}else for(var o in t)t.hasOwnProperty(o)&&wu(e,o,t[o])}function Kr(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 e0=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"]]),t0=/^[\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 ki(e){return t0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function da(){}var Zr=null;function Jr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var El=null,Rl=null;function ku(e){var t=pe(e);if(t&&(e=t.stateNode)){var n=e[Gt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Fr(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="'+Nn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[Gt]||null;if(!l)throw Error(d(90));Fr(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&bu(a)}break e;case"textarea":xu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Al(e,!!n.multiple,t,!1)}}}var Wr=!1;function zu(e,t,n){if(Wr)return e(t,n);Wr=!0;try{var a=e(t);return a}finally{if(Wr=!1,(El!==null||Rl!==null)&&(dr(),El&&(t=El,e=Rl,Rl=El=null,ku(t),e)))for(t=0;t<e.length;t++)ku(e[t])}}function So(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Gt]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(d(231,t,typeof n));return n}var fa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$r=!1;if(fa)try{var wo={};Object.defineProperty(wo,"passive",{get:function(){$r=!0}}),window.addEventListener("test",wo,wo),window.removeEventListener("test",wo,wo)}catch{$r=!1}var Ra=null,Ir=null,zi=null;function Mu(){if(zi)return zi;var e,t=Ir,n=t.length,a,l="value"in Ra?Ra.value:Ra.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var u=n-e;for(a=1;a<=u&&t[n-a]===l[o-a];a++);return zi=l.slice(e,1<a?1-a:void 0)}function Mi(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 Di(){return!0}function Du(){return!1}function yn(e){function t(n,a,l,o,u){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=o,this.target=u,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(n=e[g],this[g]=n?n(o):o[g]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Di:Du,this.isPropagationStopped=Du,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Di)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Di)},persist:function(){},isPersistent:Di}),t}var il={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ai=yn(il),Co=z({},il,{view:0,detail:0}),n0=yn(Co),Pr,es,ko,Ti=z({},Co,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ns,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!==ko&&(ko&&e.type==="mousemove"?(Pr=e.screenX-ko.screenX,es=e.screenY-ko.screenY):es=Pr=0,ko=e),Pr)},movementY:function(e){return"movementY"in e?e.movementY:es}}),Au=yn(Ti),a0=z({},Ti,{dataTransfer:0}),l0=yn(a0),o0=z({},Co,{relatedTarget:0}),ts=yn(o0),i0=z({},il,{animationName:0,elapsedTime:0,pseudoElement:0}),r0=yn(i0),s0=z({},il,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),c0=yn(s0),u0=z({},il,{data:0}),Tu=yn(u0),d0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},f0={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"},h0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function p0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=h0[e])?!!t[e]:!1}function ns(){return p0}var g0=z({},Co,{key:function(e){if(e.key){var t=d0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Mi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?f0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ns,charCode:function(e){return e.type==="keypress"?Mi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),m0=yn(g0),y0=z({},Ti,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eu=yn(y0),b0=z({},Co,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ns}),v0=yn(b0),x0=z({},il,{propertyName:0,elapsedTime:0,pseudoElement:0}),S0=yn(x0),w0=z({},Ti,{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}),C0=yn(w0),k0=z({},il,{newState:0,oldState:0}),z0=yn(k0),M0=[9,13,27,32],as=fa&&"CompositionEvent"in window,zo=null;fa&&"documentMode"in document&&(zo=document.documentMode);var D0=fa&&"TextEvent"in window&&!zo,Ru=fa&&(!as||zo&&8<zo&&11>=zo),Lu=" ",Ou=!1;function _u(e,t){switch(e){case"keyup":return M0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ll=!1;function A0(e,t){switch(e){case"compositionend":return Hu(t);case"keypress":return t.which!==32?null:(Ou=!0,Lu);case"textInput":return e=t.data,e===Lu&&Ou?null:e;default:return null}}function T0(e,t){if(Ll)return e==="compositionend"||!as&&_u(e,t)?(e=Mu(),zi=Ir=Ra=null,Ll=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ru&&t.locale!=="ko"?null:t.data;default:return null}}var E0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Bu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!E0[e.type]:t==="textarea"}function Uu(e,t,n,a){El?Rl?Rl.push(a):Rl=[a]:El=a,t=br(t,"onChange"),0<t.length&&(n=new Ai("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Mo=null,Do=null;function R0(e){xh(e,0)}function Ei(e){var t=se(e);if(bu(t))return e}function Nu(e,t){if(e==="change")return t}var ju=!1;if(fa){var ls;if(fa){var os="oninput"in document;if(!os){var qu=document.createElement("div");qu.setAttribute("oninput","return;"),os=typeof qu.oninput=="function"}ls=os}else ls=!1;ju=ls&&(!document.documentMode||9<document.documentMode)}function Yu(){Mo&&(Mo.detachEvent("onpropertychange",Gu),Do=Mo=null)}function Gu(e){if(e.propertyName==="value"&&Ei(Do)){var t=[];Uu(t,Do,e,Jr(e)),zu(R0,t)}}function L0(e,t,n){e==="focusin"?(Yu(),Mo=t,Do=n,Mo.attachEvent("onpropertychange",Gu)):e==="focusout"&&Yu()}function O0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ei(Do)}function _0(e,t){if(e==="click")return Ei(t)}function H0(e,t){if(e==="input"||e==="change")return Ei(t)}function B0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dn=typeof Object.is=="function"?Object.is:B0;function Ao(e,t){if(Dn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!Bt.call(t,l)||!Dn(e[l],t[l]))return!1}return!0}function Xu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vu(e,t){var n=Xu(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Xu(n)}}function Fu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ci(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ci(e.document)}return t}function is(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 U0=fa&&"documentMode"in document&&11>=document.documentMode,Ol=null,rs=null,To=null,ss=!1;function Ku(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ss||Ol==null||Ol!==Ci(a)||(a=Ol,"selectionStart"in a&&is(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),To&&Ao(To,a)||(To=a,a=br(rs,"onSelect"),0<a.length&&(t=new Ai("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Ol)))}function rl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _l={animationend:rl("Animation","AnimationEnd"),animationiteration:rl("Animation","AnimationIteration"),animationstart:rl("Animation","AnimationStart"),transitionrun:rl("Transition","TransitionRun"),transitionstart:rl("Transition","TransitionStart"),transitioncancel:rl("Transition","TransitionCancel"),transitionend:rl("Transition","TransitionEnd")},cs={},Zu={};fa&&(Zu=document.createElement("div").style,"AnimationEvent"in window||(delete _l.animationend.animation,delete _l.animationiteration.animation,delete _l.animationstart.animation),"TransitionEvent"in window||delete _l.transitionend.transition);function sl(e){if(cs[e])return cs[e];if(!_l[e])return e;var t=_l[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zu)return cs[e]=t[n];return e}var Ju=sl("animationend"),Wu=sl("animationiteration"),$u=sl("animationstart"),N0=sl("transitionrun"),j0=sl("transitionstart"),q0=sl("transitioncancel"),Iu=sl("transitionend"),Pu=new Map,us="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(" ");us.push("scrollEnd");function Zn(e,t){Pu.set(e,t),ot(t,[e])}var Ri=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==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)},jn=[],Hl=0,ds=0;function Li(){for(var e=Hl,t=ds=Hl=0;t<e;){var n=jn[t];jn[t++]=null;var a=jn[t];jn[t++]=null;var l=jn[t];jn[t++]=null;var o=jn[t];if(jn[t++]=null,a!==null&&l!==null){var u=a.pending;u===null?l.next=l:(l.next=u.next,u.next=l),a.pending=l}o!==0&&ed(n,l,o)}}function Oi(e,t,n,a){jn[Hl++]=e,jn[Hl++]=t,jn[Hl++]=n,jn[Hl++]=a,ds|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function fs(e,t,n,a){return Oi(e,t,n,a),_i(e)}function cl(e,t){return Oi(e,null,null,t),_i(e)}function ed(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!1,o=e.return;o!==null;)o.childLanes|=n,a=o.alternate,a!==null&&(a.childLanes|=n),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(l=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,l&&t!==null&&(l=31-bt(n),e=o.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),o):null}function _i(e){if(50<$o)throw $o=0,Sc=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Bl={};function Y0(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(e,t,n,a){return new Y0(e,t,n,a)}function hs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ha(e,t){var n=e.alternate;return n===null?(n=An(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function td(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 Hi(e,t,n,a,l,o){var u=0;if(a=e,typeof e=="function")hs(e)&&(u=1);else if(typeof e=="string")u=Qg(e,n,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case j:return e=An(31,n,t,l),e.elementType=j,e.lanes=o,e;case G:return ul(n.children,l,o,t);case oe:u=8,l|=24;break;case J:return e=An(12,n,t,l|2),e.elementType=J,e.lanes=o,e;case X:return e=An(13,n,t,l),e.elementType=X,e.lanes=o,e;case P:return e=An(19,n,t,l),e.elementType=P,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:u=10;break e;case ce:u=9;break e;case le:u=11;break e;case te:u=14;break e;case ae:u=16,a=null;break e}u=29,n=Error(d(130,e===null?"null":typeof e,"")),a=null}return t=An(u,n,t,l),t.elementType=e,t.type=a,t.lanes=o,t}function ul(e,t,n,a){return e=An(7,e,a,t),e.lanes=n,e}function ps(e,t,n){return e=An(6,e,null,t),e.lanes=n,e}function nd(e){var t=An(18,null,null,0);return t.stateNode=e,t}function gs(e,t,n){return t=An(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ad=new WeakMap;function qn(e,t){if(typeof e=="object"&&e!==null){var n=ad.get(e);return n!==void 0?n:(t={value:e,source:t,stack:fn(t)},ad.set(e,t),t)}return{value:e,source:t,stack:fn(t)}}var Ul=[],Nl=0,Bi=null,Eo=0,Yn=[],Gn=0,La=null,Pn=1,ea="";function pa(e,t){Ul[Nl++]=Eo,Ul[Nl++]=Bi,Bi=e,Eo=t}function ld(e,t,n){Yn[Gn++]=Pn,Yn[Gn++]=ea,Yn[Gn++]=La,La=e;var a=Pn;e=ea;var l=32-bt(a)-1;a&=~(1<<l),n+=1;var o=32-bt(t)+l;if(30<o){var u=l-l%5;o=(a&(1<<u)-1).toString(32),a>>=u,l-=u,Pn=1<<32-bt(t)+l|n<<l|a,ea=o+e}else Pn=1<<o|n<<l|a,ea=e}function ms(e){e.return!==null&&(pa(e,1),ld(e,1,0))}function ys(e){for(;e===Bi;)Bi=Ul[--Nl],Ul[Nl]=null,Eo=Ul[--Nl],Ul[Nl]=null;for(;e===La;)La=Yn[--Gn],Yn[Gn]=null,ea=Yn[--Gn],Yn[Gn]=null,Pn=Yn[--Gn],Yn[Gn]=null}function od(e,t){Yn[Gn++]=Pn,Yn[Gn++]=ea,Yn[Gn++]=La,Pn=t.id,ea=t.overflow,La=e}var an=null,Et=null,at=!1,Oa=null,Xn=!1,bs=Error(d(519));function _a(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ro(qn(t,e)),bs}function id(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Lt]=e,t[Gt]=a,n){case"dialog":Pe("cancel",t),Pe("close",t);break;case"iframe":case"object":case"embed":Pe("load",t);break;case"video":case"audio":for(n=0;n<Po.length;n++)Pe(Po[n],t);break;case"source":Pe("error",t);break;case"img":case"image":case"link":Pe("error",t),Pe("load",t);break;case"details":Pe("toggle",t);break;case"input":Pe("invalid",t),vu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Pe("invalid",t);break;case"textarea":Pe("invalid",t),Su(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||kh(t.textContent,n)?(a.popover!=null&&(Pe("beforetoggle",t),Pe("toggle",t)),a.onScroll!=null&&Pe("scroll",t),a.onScrollEnd!=null&&Pe("scrollend",t),a.onClick!=null&&(t.onclick=da),t=!0):t=!1,t||_a(e,!0)}function rd(e){for(an=e.return;an;)switch(an.tag){case 5:case 31:case 13:Xn=!1;return;case 27:case 3:Xn=!0;return;default:an=an.return}}function jl(e){if(e!==an)return!1;if(!at)return rd(e),at=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Bc(e.type,e.memoizedProps)),n=!n),n&&Et&&_a(e),rd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Et=Oh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Et=Oh(e)}else t===27?(t=Et,Za(e.type)?(e=Yc,Yc=null,Et=e):Et=t):Et=an?Fn(e.stateNode.nextSibling):null;return!0}function dl(){Et=an=null,at=!1}function vs(){var e=Oa;return e!==null&&(Sn===null?Sn=e:Sn.push.apply(Sn,e),Oa=null),e}function Ro(e){Oa===null?Oa=[e]:Oa.push(e)}var xs=S(null),fl=null,ga=null;function Ha(e,t,n){ne(xs,t._currentValue),t._currentValue=n}function ma(e){e._currentValue=xs.current,O(xs)}function Ss(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function ws(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var o=l.dependencies;if(o!==null){var u=l.child;o=o.firstContext;e:for(;o!==null;){var g=o;o=l;for(var w=0;w<t.length;w++)if(g.context===t[w]){o.lanes|=n,g=o.alternate,g!==null&&(g.lanes|=n),Ss(o.return,n,e),a||(u=null);break e}o=g.next}}else if(l.tag===18){if(u=l.return,u===null)throw Error(d(341));u.lanes|=n,o=u.alternate,o!==null&&(o.lanes|=n),Ss(u,n,e),u=null}else u=l.child;if(u!==null)u.return=l;else for(u=l;u!==null;){if(u===e){u=null;break}if(l=u.sibling,l!==null){l.return=u.return,u=l;break}u=u.return}l=u}}function ql(e,t,n,a){e=null;for(var l=t,o=!1;l!==null;){if(!o){if((l.flags&524288)!==0)o=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var u=l.alternate;if(u===null)throw Error(d(387));if(u=u.memoizedProps,u!==null){var g=l.type;Dn(l.pendingProps.value,u.value)||(e!==null?e.push(g):e=[g])}}else if(l===Xe.current){if(u=l.alternate,u===null)throw Error(d(387));u.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(li):e=[li])}l=l.return}e!==null&&ws(t,e,n,a),t.flags|=262144}function Ui(e){for(e=e.firstContext;e!==null;){if(!Dn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function hl(e){fl=e,ga=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ln(e){return sd(fl,e)}function Ni(e,t){return fl===null&&hl(e),sd(e,t)}function sd(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ga===null){if(e===null)throw Error(d(308));ga=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ga=ga.next=t;return n}var G0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},X0=i.unstable_scheduleCallback,V0=i.unstable_NormalPriority,Kt={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cs(){return{controller:new G0,data:new Map,refCount:0}}function Lo(e){e.refCount--,e.refCount===0&&X0(V0,function(){e.controller.abort()})}var Oo=null,ks=0,Yl=0,Gl=null;function F0(e,t){if(Oo===null){var n=Oo=[];ks=0,Yl=Dc(),Gl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return ks++,t.then(cd,cd),t}function cd(){if(--ks===0&&Oo!==null){Gl!==null&&(Gl.status="fulfilled");var e=Oo;Oo=null,Yl=0,Gl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Q0(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),a}var ud=T.S;T.S=function(e,t){Zf=yt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&F0(e,t),ud!==null&&ud(e,t)};var pl=S(null);function zs(){var e=pl.current;return e!==null?e:Dt.pooledCache}function ji(e,t){t===null?ne(pl,pl.current):ne(pl,t.pool)}function dd(){var e=zs();return e===null?null:{parent:Kt._currentValue,pool:e}}var Xl=Error(d(460)),Ms=Error(d(474)),qi=Error(d(542)),Yi={then:function(){}};function fd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function hd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(da,da),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,gd(e),e;default:if(typeof t.status=="string")t.then(da,da);else{if(e=Dt,e!==null&&100<e.shellSuspendCounter)throw Error(d(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,gd(e),e}throw ml=t,Xl}}function gl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ml=n,Xl):n}}var ml=null;function pd(){if(ml===null)throw Error(d(459));var e=ml;return ml=null,e}function gd(e){if(e===Xl||e===qi)throw Error(d(483))}var Vl=null,_o=0;function Gi(e){var t=_o;return _o+=1,Vl===null&&(Vl=[]),hd(Vl,e,t)}function Ho(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Xi(e,t){throw t.$$typeof===_?Error(d(525)):(e=Object.prototype.toString.call(t),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function md(e){function t(M,k){if(e){var E=M.deletions;E===null?(M.deletions=[k],M.flags|=16):E.push(k)}}function n(M,k){if(!e)return null;for(;k!==null;)t(M,k),k=k.sibling;return null}function a(M){for(var k=new Map;M!==null;)M.key!==null?k.set(M.key,M):k.set(M.index,M),M=M.sibling;return k}function l(M,k){return M=ha(M,k),M.index=0,M.sibling=null,M}function o(M,k,E){return M.index=E,e?(E=M.alternate,E!==null?(E=E.index,E<k?(M.flags|=67108866,k):E):(M.flags|=67108866,k)):(M.flags|=1048576,k)}function u(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function g(M,k,E,V){return k===null||k.tag!==6?(k=ps(E,M.mode,V),k.return=M,k):(k=l(k,E),k.return=M,k)}function w(M,k,E,V){var Ae=E.type;return Ae===G?Y(M,k,E.props.children,V,E.key):k!==null&&(k.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===ae&&gl(Ae)===k.type)?(k=l(k,E.props),Ho(k,E),k.return=M,k):(k=Hi(E.type,E.key,E.props,null,M.mode,V),Ho(k,E),k.return=M,k)}function R(M,k,E,V){return k===null||k.tag!==4||k.stateNode.containerInfo!==E.containerInfo||k.stateNode.implementation!==E.implementation?(k=gs(E,M.mode,V),k.return=M,k):(k=l(k,E.children||[]),k.return=M,k)}function Y(M,k,E,V,Ae){return k===null||k.tag!==7?(k=ul(E,M.mode,V,Ae),k.return=M,k):(k=l(k,E),k.return=M,k)}function K(M,k,E){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=ps(""+k,M.mode,E),k.return=M,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case q:return E=Hi(k.type,k.key,k.props,null,M.mode,E),Ho(E,k),E.return=M,E;case H:return k=gs(k,M.mode,E),k.return=M,k;case ae:return k=gl(k),K(M,k,E)}if(Oe(k)||me(k))return k=ul(k,M.mode,E,null),k.return=M,k;if(typeof k.then=="function")return K(M,Gi(k),E);if(k.$$typeof===Q)return K(M,Ni(M,k),E);Xi(M,k)}return null}function L(M,k,E,V){var Ae=k!==null?k.key:null;if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return Ae!==null?null:g(M,k,""+E,V);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case q:return E.key===Ae?w(M,k,E,V):null;case H:return E.key===Ae?R(M,k,E,V):null;case ae:return E=gl(E),L(M,k,E,V)}if(Oe(E)||me(E))return Ae!==null?null:Y(M,k,E,V,null);if(typeof E.then=="function")return L(M,k,Gi(E),V);if(E.$$typeof===Q)return L(M,k,Ni(M,E),V);Xi(M,E)}return null}function U(M,k,E,V,Ae){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return M=M.get(E)||null,g(k,M,""+V,Ae);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case q:return M=M.get(V.key===null?E:V.key)||null,w(k,M,V,Ae);case H:return M=M.get(V.key===null?E:V.key)||null,R(k,M,V,Ae);case ae:return V=gl(V),U(M,k,E,V,Ae)}if(Oe(V)||me(V))return M=M.get(E)||null,Y(k,M,V,Ae,null);if(typeof V.then=="function")return U(M,k,E,Gi(V),Ae);if(V.$$typeof===Q)return U(M,k,E,Ni(k,V),Ae);Xi(k,V)}return null}function ye(M,k,E,V){for(var Ae=null,ct=null,Ce=k,Ze=k=0,tt=null;Ce!==null&&Ze<E.length;Ze++){Ce.index>Ze?(tt=Ce,Ce=null):tt=Ce.sibling;var ut=L(M,Ce,E[Ze],V);if(ut===null){Ce===null&&(Ce=tt);break}e&&Ce&&ut.alternate===null&&t(M,Ce),k=o(ut,k,Ze),ct===null?Ae=ut:ct.sibling=ut,ct=ut,Ce=tt}if(Ze===E.length)return n(M,Ce),at&&pa(M,Ze),Ae;if(Ce===null){for(;Ze<E.length;Ze++)Ce=K(M,E[Ze],V),Ce!==null&&(k=o(Ce,k,Ze),ct===null?Ae=Ce:ct.sibling=Ce,ct=Ce);return at&&pa(M,Ze),Ae}for(Ce=a(Ce);Ze<E.length;Ze++)tt=U(Ce,M,Ze,E[Ze],V),tt!==null&&(e&&tt.alternate!==null&&Ce.delete(tt.key===null?Ze:tt.key),k=o(tt,k,Ze),ct===null?Ae=tt:ct.sibling=tt,ct=tt);return e&&Ce.forEach(function(Pa){return t(M,Pa)}),at&&pa(M,Ze),Ae}function Le(M,k,E,V){if(E==null)throw Error(d(151));for(var Ae=null,ct=null,Ce=k,Ze=k=0,tt=null,ut=E.next();Ce!==null&&!ut.done;Ze++,ut=E.next()){Ce.index>Ze?(tt=Ce,Ce=null):tt=Ce.sibling;var Pa=L(M,Ce,ut.value,V);if(Pa===null){Ce===null&&(Ce=tt);break}e&&Ce&&Pa.alternate===null&&t(M,Ce),k=o(Pa,k,Ze),ct===null?Ae=Pa:ct.sibling=Pa,ct=Pa,Ce=tt}if(ut.done)return n(M,Ce),at&&pa(M,Ze),Ae;if(Ce===null){for(;!ut.done;Ze++,ut=E.next())ut=K(M,ut.value,V),ut!==null&&(k=o(ut,k,Ze),ct===null?Ae=ut:ct.sibling=ut,ct=ut);return at&&pa(M,Ze),Ae}for(Ce=a(Ce);!ut.done;Ze++,ut=E.next())ut=U(Ce,M,Ze,ut.value,V),ut!==null&&(e&&ut.alternate!==null&&Ce.delete(ut.key===null?Ze:ut.key),k=o(ut,k,Ze),ct===null?Ae=ut:ct.sibling=ut,ct=ut);return e&&Ce.forEach(function(am){return t(M,am)}),at&&pa(M,Ze),Ae}function kt(M,k,E,V){if(typeof E=="object"&&E!==null&&E.type===G&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case q:e:{for(var Ae=E.key;k!==null;){if(k.key===Ae){if(Ae=E.type,Ae===G){if(k.tag===7){n(M,k.sibling),V=l(k,E.props.children),V.return=M,M=V;break e}}else if(k.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===ae&&gl(Ae)===k.type){n(M,k.sibling),V=l(k,E.props),Ho(V,E),V.return=M,M=V;break e}n(M,k);break}else t(M,k);k=k.sibling}E.type===G?(V=ul(E.props.children,M.mode,V,E.key),V.return=M,M=V):(V=Hi(E.type,E.key,E.props,null,M.mode,V),Ho(V,E),V.return=M,M=V)}return u(M);case H:e:{for(Ae=E.key;k!==null;){if(k.key===Ae)if(k.tag===4&&k.stateNode.containerInfo===E.containerInfo&&k.stateNode.implementation===E.implementation){n(M,k.sibling),V=l(k,E.children||[]),V.return=M,M=V;break e}else{n(M,k);break}else t(M,k);k=k.sibling}V=gs(E,M.mode,V),V.return=M,M=V}return u(M);case ae:return E=gl(E),kt(M,k,E,V)}if(Oe(E))return ye(M,k,E,V);if(me(E)){if(Ae=me(E),typeof Ae!="function")throw Error(d(150));return E=Ae.call(E),Le(M,k,E,V)}if(typeof E.then=="function")return kt(M,k,Gi(E),V);if(E.$$typeof===Q)return kt(M,k,Ni(M,E),V);Xi(M,E)}return typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint"?(E=""+E,k!==null&&k.tag===6?(n(M,k.sibling),V=l(k,E),V.return=M,M=V):(n(M,k),V=ps(E,M.mode,V),V.return=M,M=V),u(M)):n(M,k)}return function(M,k,E,V){try{_o=0;var Ae=kt(M,k,E,V);return Vl=null,Ae}catch(Ce){if(Ce===Xl||Ce===qi)throw Ce;var ct=An(29,Ce,null,M.mode);return ct.lanes=V,ct.return=M,ct}}}var yl=md(!0),yd=md(!1),Ba=!1;function Ds(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function As(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 Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Na(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(dt&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=_i(e),ed(e,null,n),t}return Oi(e,a,t,n),_i(e)}function Bo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,vi(e,n)}}function Ts(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var u={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?l=o=u:o=o.next=u,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Es=!1;function Uo(){if(Es){var e=Gl;if(e!==null)throw e}}function No(e,t,n,a){Es=!1;var l=e.updateQueue;Ba=!1;var o=l.firstBaseUpdate,u=l.lastBaseUpdate,g=l.shared.pending;if(g!==null){l.shared.pending=null;var w=g,R=w.next;w.next=null,u===null?o=R:u.next=R,u=w;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,g=Y.lastBaseUpdate,g!==u&&(g===null?Y.firstBaseUpdate=R:g.next=R,Y.lastBaseUpdate=w))}if(o!==null){var K=l.baseState;u=0,Y=R=w=null,g=o;do{var L=g.lane&-536870913,U=L!==g.lane;if(U?(et&L)===L:(a&L)===L){L!==0&&L===Yl&&(Es=!0),Y!==null&&(Y=Y.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var ye=e,Le=g;L=t;var kt=n;switch(Le.tag){case 1:if(ye=Le.payload,typeof ye=="function"){K=ye.call(kt,K,L);break e}K=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Le.payload,L=typeof ye=="function"?ye.call(kt,K,L):ye,L==null)break e;K=z({},K,L);break e;case 2:Ba=!0}}L=g.callback,L!==null&&(e.flags|=64,U&&(e.flags|=8192),U=l.callbacks,U===null?l.callbacks=[L]:U.push(L))}else U={lane:L,tag:g.tag,payload:g.payload,callback:g.callback,next:null},Y===null?(R=Y=U,w=K):Y=Y.next=U,u|=L;if(g=g.next,g===null){if(g=l.shared.pending,g===null)break;U=g,g=U.next,U.next=null,l.lastBaseUpdate=U,l.shared.pending=null}}while(!0);Y===null&&(w=K),l.baseState=w,l.firstBaseUpdate=R,l.lastBaseUpdate=Y,o===null&&(l.shared.lanes=0),Xa|=u,e.lanes=u,e.memoizedState=K}}function bd(e,t){if(typeof e!="function")throw Error(d(191,e));e.call(t)}function vd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)bd(n[e],t)}var Fl=S(null),Vi=S(0);function xd(e,t){e=za,ne(Vi,e),ne(Fl,t),za=e|t.baseLanes}function Rs(){ne(Vi,za),ne(Fl,Fl.current)}function Ls(){za=Vi.current,O(Fl),O(Vi)}var Tn=S(null),Vn=null;function ja(e){var t=e.alternate;ne(Xt,Xt.current&1),ne(Tn,e),Vn===null&&(t===null||Fl.current!==null||t.memoizedState!==null)&&(Vn=e)}function Os(e){ne(Xt,Xt.current),ne(Tn,e),Vn===null&&(Vn=e)}function Sd(e){e.tag===22?(ne(Xt,Xt.current),ne(Tn,e),Vn===null&&(Vn=e)):qa()}function qa(){ne(Xt,Xt.current),ne(Tn,Tn.current)}function En(e){O(Tn),Vn===e&&(Vn=null),O(Xt)}var Xt=S(0);function Fi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||jc(n)||qc(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 ya=0,Ke=null,wt=null,Zt=null,Qi=!1,Ql=!1,bl=!1,Ki=0,jo=0,Kl=null,K0=0;function Nt(){throw Error(d(321))}function _s(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Dn(e[n],t[n]))return!1;return!0}function Hs(e,t,n,a,l,o){return ya=o,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?lf:Ws,bl=!1,o=n(a,l),bl=!1,Ql&&(o=Cd(t,n,a,l)),wd(e),o}function wd(e){T.H=Go;var t=wt!==null&&wt.next!==null;if(ya=0,Zt=wt=Ke=null,Qi=!1,jo=0,Kl=null,t)throw Error(d(300));e===null||Jt||(e=e.dependencies,e!==null&&Ui(e)&&(Jt=!0))}function Cd(e,t,n,a){Ke=e;var l=0;do{if(Ql&&(Kl=null),jo=0,Ql=!1,25<=l)throw Error(d(301));if(l+=1,Zt=wt=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}T.H=of,o=t(n,a)}while(Ql);return o}function Z0(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?qo(t):t,e=e.useState()[0],(wt!==null?wt.memoizedState:null)!==e&&(Ke.flags|=1024),t}function Bs(){var e=Ki!==0;return Ki=0,e}function Us(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ns(e){if(Qi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qi=!1}ya=0,Zt=wt=Ke=null,Ql=!1,jo=Ki=0,Kl=null}function gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?Ke.memoizedState=Zt=e:Zt=Zt.next=e,Zt}function Vt(){if(wt===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=wt.next;var t=Zt===null?Ke.memoizedState:Zt.next;if(t!==null)Zt=t,wt=e;else{if(e===null)throw Ke.alternate===null?Error(d(467)):Error(d(310));wt=e,e={memoizedState:wt.memoizedState,baseState:wt.baseState,baseQueue:wt.baseQueue,queue:wt.queue,next:null},Zt===null?Ke.memoizedState=Zt=e:Zt=Zt.next=e}return Zt}function Zi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qo(e){var t=jo;return jo+=1,Kl===null&&(Kl=[]),e=hd(Kl,e,t),t=Ke,(Zt===null?t.memoizedState:Zt.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?lf:Ws),e}function Ji(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return qo(e);if(e.$$typeof===Q)return ln(e)}throw Error(d(438,String(e)))}function js(e){var t=null,n=Ke.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Ke.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Zi(),Ke.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=$;return t.index++,n}function ba(e,t){return typeof t=="function"?t(e):t}function Wi(e){var t=Vt();return qs(t,wt,e)}function qs(e,t,n){var a=e.queue;if(a===null)throw Error(d(311));a.lastRenderedReducer=n;var l=e.baseQueue,o=a.pending;if(o!==null){if(l!==null){var u=l.next;l.next=o.next,o.next=u}t.baseQueue=l=o,a.pending=null}if(o=e.baseState,l===null)e.memoizedState=o;else{t=l.next;var g=u=null,w=null,R=t,Y=!1;do{var K=R.lane&-536870913;if(K!==R.lane?(et&K)===K:(ya&K)===K){var L=R.revertLane;if(L===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),K===Yl&&(Y=!0);else if((ya&L)===L){R=R.next,L===Yl&&(Y=!0);continue}else K={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},w===null?(g=w=K,u=o):w=w.next=K,Ke.lanes|=L,Xa|=L;K=R.action,bl&&n(o,K),o=R.hasEagerState?R.eagerState:n(o,K)}else L={lane:K,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},w===null?(g=w=L,u=o):w=w.next=L,Ke.lanes|=K,Xa|=K;R=R.next}while(R!==null&&R!==t);if(w===null?u=o:w.next=g,!Dn(o,e.memoizedState)&&(Jt=!0,Y&&(n=Gl,n!==null)))throw n;e.memoizedState=o,e.baseState=u,e.baseQueue=w,a.lastRenderedState=o}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ys(e){var t=Vt(),n=t.queue;if(n===null)throw Error(d(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,o=t.memoizedState;if(l!==null){n.pending=null;var u=l=l.next;do o=e(o,u.action),u=u.next;while(u!==l);Dn(o,t.memoizedState)||(Jt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,a]}function kd(e,t,n){var a=Ke,l=Vt(),o=at;if(o){if(n===void 0)throw Error(d(407));n=n()}else n=t();var u=!Dn((wt||l).memoizedState,n);if(u&&(l.memoizedState=n,Jt=!0),l=l.queue,Vs(Dd.bind(null,a,l,e),[e]),l.getSnapshot!==t||u||Zt!==null&&Zt.memoizedState.tag&1){if(a.flags|=2048,Zl(9,{destroy:void 0},Md.bind(null,a,l,n,t),null),Dt===null)throw Error(d(349));o||(ya&127)!==0||zd(a,t,n)}return n}function zd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ke.updateQueue,t===null?(t=Zi(),Ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Md(e,t,n,a){t.value=n,t.getSnapshot=a,Ad(t)&&Td(e)}function Dd(e,t,n){return n(function(){Ad(t)&&Td(e)})}function Ad(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Dn(e,n)}catch{return!0}}function Td(e){var t=cl(e,2);t!==null&&wn(t,e,2)}function Gs(e){var t=gn();if(typeof e=="function"){var n=e;if(e=n(),bl){Mt(!0);try{n()}finally{Mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t}function Ed(e,t,n,a){return e.baseState=n,qs(e,wt,typeof a=="function"?a:ba)}function J0(e,t,n,a,l){if(Pi(e))throw Error(d(485));if(e=t.action,e!==null){var o={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){o.listeners.push(u)}};T.T!==null?n(!0):o.isTransition=!1,a(o),n=t.pending,n===null?(o.next=t.pending=o,Rd(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Rd(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var o=T.T,u={};T.T=u;try{var g=n(l,a),w=T.S;w!==null&&w(u,g),Ld(e,t,g)}catch(R){Xs(e,t,R)}finally{o!==null&&u.types!==null&&(o.types=u.types),T.T=o}}else try{o=n(l,a),Ld(e,t,o)}catch(R){Xs(e,t,R)}}function Ld(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Od(e,t,a)},function(a){return Xs(e,t,a)}):Od(e,t,n)}function Od(e,t,n){t.status="fulfilled",t.value=n,_d(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Rd(e,n)))}function Xs(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,_d(t),t=t.next;while(t!==a)}e.action=null}function _d(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Hd(e,t){return t}function Bd(e,t){if(at){var n=Dt.formState;if(n!==null){e:{var a=Ke;if(at){if(Et){t:{for(var l=Et,o=Xn;l.nodeType!==8;){if(!o){l=null;break t}if(l=Fn(l.nextSibling),l===null){l=null;break t}}o=l.data,l=o==="F!"||o==="F"?l:null}if(l){Et=Fn(l.nextSibling),a=l.data==="F!";break e}}_a(a)}a=!1}a&&(t=n[0])}}return n=gn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hd,lastRenderedState:t},n.queue=a,n=tf.bind(null,Ke,a),a.dispatch=n,a=Gs(!1),o=Js.bind(null,Ke,!1,a.queue),a=gn(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=J0.bind(null,Ke,l,o,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Ud(e){var t=Vt();return Nd(t,wt,e)}function Nd(e,t,n){if(t=qs(e,t,Hd)[0],e=Wi(ba)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=qo(t)}catch(u){throw u===Xl?qi:u}else a=t;t=Vt();var l=t.queue,o=l.dispatch;return n!==t.memoizedState&&(Ke.flags|=2048,Zl(9,{destroy:void 0},W0.bind(null,l,n),null)),[a,o,e]}function W0(e,t){e.action=t}function jd(e){var t=Vt(),n=wt;if(n!==null)return Nd(t,n,e);Vt(),t=t.memoizedState,n=Vt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Zl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Ke.updateQueue,t===null&&(t=Zi(),Ke.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function qd(){return Vt().memoizedState}function $i(e,t,n,a){var l=gn();Ke.flags|=e,l.memoizedState=Zl(1|t,{destroy:void 0},n,a===void 0?null:a)}function Ii(e,t,n,a){var l=Vt();a=a===void 0?null:a;var o=l.memoizedState.inst;wt!==null&&a!==null&&_s(a,wt.memoizedState.deps)?l.memoizedState=Zl(t,o,n,a):(Ke.flags|=e,l.memoizedState=Zl(1|t,o,n,a))}function Yd(e,t){$i(8390656,8,e,t)}function Vs(e,t){Ii(2048,8,e,t)}function $0(e){Ke.flags|=4;var t=Ke.updateQueue;if(t===null)t=Zi(),Ke.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Gd(e){var t=Vt().memoizedState;return $0({ref:t,nextImpl:e}),function(){if((dt&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function Xd(e,t){return Ii(4,2,e,t)}function Vd(e,t){return Ii(4,4,e,t)}function Fd(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 Qd(e,t,n){n=n!=null?n.concat([e]):null,Ii(4,4,Fd.bind(null,t,e),n)}function Fs(){}function Kd(e,t){var n=Vt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&_s(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Zd(e,t){var n=Vt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&_s(t,a[1]))return a[0];if(a=e(),bl){Mt(!0);try{e()}finally{Mt(!1)}}return n.memoizedState=[a,t],a}function Qs(e,t,n){return n===void 0||(ya&1073741824)!==0&&(et&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Wf(),Ke.lanes|=e,Xa|=e,n)}function Jd(e,t,n,a){return Dn(n,t)?n:Fl.current!==null?(e=Qs(e,n,a),Dn(e,t)||(Jt=!0),e):(ya&42)===0||(ya&1073741824)!==0&&(et&261930)===0?(Jt=!0,e.memoizedState=n):(e=Wf(),Ke.lanes|=e,Xa|=e,t)}function Wd(e,t,n,a,l){var o=Z.p;Z.p=o!==0&&8>o?o:8;var u=T.T,g={};T.T=g,Js(e,!1,t,n);try{var w=l(),R=T.S;if(R!==null&&R(g,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var Y=Q0(w,a);Yo(e,t,Y,On(e))}else Yo(e,t,a,On(e))}catch(K){Yo(e,t,{then:function(){},status:"rejected",reason:K},On())}finally{Z.p=o,u!==null&&g.types!==null&&(u.types=g.types),T.T=u}}function I0(){}function Ks(e,t,n,a){if(e.tag!==5)throw Error(d(476));var l=$d(e).queue;Wd(e,l,t,ee,n===null?I0:function(){return Id(e),n(a)})}function $d(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Id(e){var t=$d(e);t.next===null&&(t=e.alternate.memoizedState),Yo(e,t.next.queue,{},On())}function Zs(){return ln(li)}function Pd(){return Vt().memoizedState}function ef(){return Vt().memoizedState}function P0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=On();e=Ua(n);var a=Na(t,e,n);a!==null&&(wn(a,t,n),Bo(a,t,n)),t={cache:Cs()},e.payload=t;return}t=t.return}}function eg(e,t,n){var a=On();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Pi(e)?nf(t,n):(n=fs(e,t,n,a),n!==null&&(wn(n,e,a),af(n,t,a)))}function tf(e,t,n){var a=On();Yo(e,t,n,a)}function Yo(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Pi(e))nf(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var u=t.lastRenderedState,g=o(u,n);if(l.hasEagerState=!0,l.eagerState=g,Dn(g,u))return Oi(e,t,l,0),Dt===null&&Li(),!1}catch{}if(n=fs(e,t,l,a),n!==null)return wn(n,e,a),af(n,t,a),!0}return!1}function Js(e,t,n,a){if(a={lane:2,revertLane:Dc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Pi(e)){if(t)throw Error(d(479))}else t=fs(e,n,a,2),t!==null&&wn(t,e,2)}function Pi(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function nf(e,t){Ql=Qi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function af(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,vi(e,n)}}var Go={readContext:ln,use:Ji,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt};Go.useEffectEvent=Nt;var lf={readContext:ln,use:Ji,useCallback:function(e,t){return gn().memoizedState=[e,t===void 0?null:t],e},useContext:ln,useEffect:Yd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,$i(4194308,4,Fd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $i(4194308,4,e,t)},useInsertionEffect:function(e,t){$i(4,2,e,t)},useMemo:function(e,t){var n=gn();t=t===void 0?null:t;var a=e();if(bl){Mt(!0);try{e()}finally{Mt(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=gn();if(n!==void 0){var l=n(t);if(bl){Mt(!0);try{n(t)}finally{Mt(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=eg.bind(null,Ke,e),[a.memoizedState,e]},useRef:function(e){var t=gn();return e={current:e},t.memoizedState=e},useState:function(e){e=Gs(e);var t=e.queue,n=tf.bind(null,Ke,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Fs,useDeferredValue:function(e,t){var n=gn();return Qs(n,e,t)},useTransition:function(){var e=Gs(!1);return e=Wd.bind(null,Ke,e.queue,!0,!1),gn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Ke,l=gn();if(at){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),Dt===null)throw Error(d(349));(et&127)!==0||zd(a,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Yd(Dd.bind(null,a,o,e),[e]),a.flags|=2048,Zl(9,{destroy:void 0},Md.bind(null,a,o,n,t),null),n},useId:function(){var e=gn(),t=Dt.identifierPrefix;if(at){var n=ea,a=Pn;n=(a&~(1<<32-bt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ki++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=K0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Zs,useFormState:Bd,useActionState:Bd,useOptimistic:function(e){var t=gn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Js.bind(null,Ke,!0,n),n.dispatch=t,[e,t]},useMemoCache:js,useCacheRefresh:function(){return gn().memoizedState=P0.bind(null,Ke)},useEffectEvent:function(e){var t=gn(),n={impl:e};return t.memoizedState=n,function(){if((dt&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:ln,use:Ji,useCallback:Kd,useContext:ln,useEffect:Vs,useImperativeHandle:Qd,useInsertionEffect:Xd,useLayoutEffect:Vd,useMemo:Zd,useReducer:Wi,useRef:qd,useState:function(){return Wi(ba)},useDebugValue:Fs,useDeferredValue:function(e,t){var n=Vt();return Jd(n,wt.memoizedState,e,t)},useTransition:function(){var e=Wi(ba)[0],t=Vt().memoizedState;return[typeof e=="boolean"?e:qo(e),t]},useSyncExternalStore:kd,useId:Pd,useHostTransitionStatus:Zs,useFormState:Ud,useActionState:Ud,useOptimistic:function(e,t){var n=Vt();return Ed(n,wt,e,t)},useMemoCache:js,useCacheRefresh:ef};Ws.useEffectEvent=Gd;var of={readContext:ln,use:Ji,useCallback:Kd,useContext:ln,useEffect:Vs,useImperativeHandle:Qd,useInsertionEffect:Xd,useLayoutEffect:Vd,useMemo:Zd,useReducer:Ys,useRef:qd,useState:function(){return Ys(ba)},useDebugValue:Fs,useDeferredValue:function(e,t){var n=Vt();return wt===null?Qs(n,e,t):Jd(n,wt.memoizedState,e,t)},useTransition:function(){var e=Ys(ba)[0],t=Vt().memoizedState;return[typeof e=="boolean"?e:qo(e),t]},useSyncExternalStore:kd,useId:Pd,useHostTransitionStatus:Zs,useFormState:jd,useActionState:jd,useOptimistic:function(e,t){var n=Vt();return wt!==null?Ed(n,wt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:js,useCacheRefresh:ef};of.useEffectEvent=Gd;function $s(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:z({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Is={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=On(),l=Ua(a);l.payload=t,n!=null&&(l.callback=n),t=Na(e,l,a),t!==null&&(wn(t,e,a),Bo(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=On(),l=Ua(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Na(e,l,a),t!==null&&(wn(t,e,a),Bo(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=On(),a=Ua(n);a.tag=2,t!=null&&(a.callback=t),t=Na(e,a,n),t!==null&&(wn(t,e,n),Bo(t,e,n))}};function rf(e,t,n,a,l,o,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,o,u):t.prototype&&t.prototype.isPureReactComponent?!Ao(n,a)||!Ao(l,o):!0}function sf(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Is.enqueueReplaceState(t,t.state,null)}function vl(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=z({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function cf(e){Ri(e)}function uf(e){console.error(e)}function df(e){Ri(e)}function er(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function ff(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function Ps(e,t,n){return n=Ua(n),n.tag=3,n.payload={element:null},n.callback=function(){er(e,t)},n}function hf(e){return e=Ua(e),e.tag=3,e}function pf(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var o=a.value;e.payload=function(){return l(o)},e.callback=function(){ff(t,n,a)}}var u=n.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){ff(t,n,a),typeof l!="function"&&(Va===null?Va=new Set([this]):Va.add(this));var g=a.stack;this.componentDidCatch(a.value,{componentStack:g!==null?g:""})})}function tg(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&ql(t,n,l,!0),n=Tn.current,n!==null){switch(n.tag){case 31:case 13:return Vn===null?fr():n.alternate===null&&jt===0&&(jt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Yi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),kc(e,a,l)),!1;case 22:return n.flags|=65536,a===Yi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),kc(e,a,l)),!1}throw Error(d(435,n.tag))}return kc(e,a,l),fr(),!1}if(at)return t=Tn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==bs&&(e=Error(d(422),{cause:a}),Ro(qn(e,n)))):(a!==bs&&(t=Error(d(423),{cause:a}),Ro(qn(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=qn(a,n),l=Ps(e.stateNode,a,l),Ts(e,l),jt!==4&&(jt=2)),!1;var o=Error(d(520),{cause:a});if(o=qn(o,n),Wo===null?Wo=[o]:Wo.push(o),jt!==4&&(jt=2),t===null)return!0;a=qn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=Ps(n.stateNode,a,e),Ts(n,e),!1;case 1:if(t=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Va===null||!Va.has(o))))return n.flags|=65536,l&=-l,n.lanes|=l,l=hf(l),pf(l,e,n,a),Ts(n,l),!1}n=n.return}while(n!==null);return!1}var ec=Error(d(461)),Jt=!1;function on(e,t,n,a){t.child=e===null?yd(t,null,n,a):yl(t,e.child,n,a)}function gf(e,t,n,a,l){n=n.render;var o=t.ref;if("ref"in a){var u={};for(var g in a)g!=="ref"&&(u[g]=a[g])}else u=a;return hl(t),a=Hs(e,t,n,u,o,l),g=Bs(),e!==null&&!Jt?(Us(e,t,l),va(e,t,l)):(at&&g&&ms(t),t.flags|=1,on(e,t,a,l),t.child)}function mf(e,t,n,a,l){if(e===null){var o=n.type;return typeof o=="function"&&!hs(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,yf(e,t,o,a,l)):(e=Hi(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!sc(e,l)){var u=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ao,n(u,a)&&e.ref===t.ref)return va(e,t,l)}return t.flags|=1,e=ha(o,a),e.ref=t.ref,e.return=t,t.child=e}function yf(e,t,n,a,l){if(e!==null){var o=e.memoizedProps;if(Ao(o,a)&&e.ref===t.ref)if(Jt=!1,t.pendingProps=a=o,sc(e,l))(e.flags&131072)!==0&&(Jt=!0);else return t.lanes=e.lanes,va(e,t,l)}return tc(e,t,n,a,l)}function bf(e,t,n,a){var l=a.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|n:n,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;a=l&~o}else a=0,t.child=null;return vf(e,t,o,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ji(t,o!==null?o.cachePool:null),o!==null?xd(t,o):Rs(),Sd(t);else return a=t.lanes=536870912,vf(e,t,o!==null?o.baseLanes|n:n,n,a)}else o!==null?(ji(t,o.cachePool),xd(t,o),qa(),t.memoizedState=null):(e!==null&&ji(t,null),Rs(),qa());return on(e,t,l,n),t.child}function Xo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function vf(e,t,n,a,l){var o=zs();return o=o===null?null:{parent:Kt._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&ji(t,null),Rs(),Sd(t),e!==null&&ql(e,t,a,!0),t.childLanes=l,null}function tr(e,t){return t=ar({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function xf(e,t,n){return yl(t,e.child,null,n),e=tr(t,t.pendingProps),e.flags|=2,En(t),t.memoizedState=null,e}function ng(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(at){if(a.mode==="hidden")return e=tr(t,a),t.lanes=536870912,Xo(null,e);if(Os(t),(e=Et)?(e=Lh(e,Xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:La!==null?{id:Pn,overflow:ea}:null,retryLane:536870912,hydrationErrors:null},n=nd(e),n.return=t,t.child=n,an=t,Et=null)):e=null,e===null)throw _a(t);return t.lanes=536870912,null}return tr(t,a)}var o=e.memoizedState;if(o!==null){var u=o.dehydrated;if(Os(t),l)if(t.flags&256)t.flags&=-257,t=xf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(d(558));else if(Jt||ql(e,t,n,!1),l=(n&e.childLanes)!==0,Jt||l){if(a=Dt,a!==null&&(u=mo(a,n),u!==0&&u!==o.retryLane))throw o.retryLane=u,cl(e,u),wn(a,e,u),ec;fr(),t=xf(e,t,n)}else e=o.treeContext,Et=Fn(u.nextSibling),an=t,at=!0,Oa=null,Xn=!1,e!==null&&od(t,e),t=tr(t,a),t.flags|=4096;return t}return e=ha(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function nr(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(d(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function tc(e,t,n,a,l){return hl(t),n=Hs(e,t,n,a,void 0,l),a=Bs(),e!==null&&!Jt?(Us(e,t,l),va(e,t,l)):(at&&a&&ms(t),t.flags|=1,on(e,t,n,l),t.child)}function Sf(e,t,n,a,l,o){return hl(t),t.updateQueue=null,n=Cd(t,a,n,l),wd(e),a=Bs(),e!==null&&!Jt?(Us(e,t,o),va(e,t,o)):(at&&a&&ms(t),t.flags|=1,on(e,t,n,o),t.child)}function wf(e,t,n,a,l){if(hl(t),t.stateNode===null){var o=Bl,u=n.contextType;typeof u=="object"&&u!==null&&(o=ln(u)),o=new n(a,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Is,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=a,o.state=t.memoizedState,o.refs={},Ds(t),u=n.contextType,o.context=typeof u=="object"&&u!==null?ln(u):Bl,o.state=t.memoizedState,u=n.getDerivedStateFromProps,typeof u=="function"&&($s(t,n,u,a),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(u=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),u!==o.state&&Is.enqueueReplaceState(o,o.state,null),No(t,a,o,l),Uo(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){o=t.stateNode;var g=t.memoizedProps,w=vl(n,g);o.props=w;var R=o.context,Y=n.contextType;u=Bl,typeof Y=="object"&&Y!==null&&(u=ln(Y));var K=n.getDerivedStateFromProps;Y=typeof K=="function"||typeof o.getSnapshotBeforeUpdate=="function",g=t.pendingProps!==g,Y||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(g||R!==u)&&sf(t,o,a,u),Ba=!1;var L=t.memoizedState;o.state=L,No(t,a,o,l),Uo(),R=t.memoizedState,g||L!==R||Ba?(typeof K=="function"&&($s(t,n,K,a),R=t.memoizedState),(w=Ba||rf(t,n,w,a,L,R,u))?(Y||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=R),o.props=a,o.state=R,o.context=u,a=w):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{o=t.stateNode,As(e,t),u=t.memoizedProps,Y=vl(n,u),o.props=Y,K=t.pendingProps,L=o.context,R=n.contextType,w=Bl,typeof R=="object"&&R!==null&&(w=ln(R)),g=n.getDerivedStateFromProps,(R=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==K||L!==w)&&sf(t,o,a,w),Ba=!1,L=t.memoizedState,o.state=L,No(t,a,o,l),Uo();var U=t.memoizedState;u!==K||L!==U||Ba||e!==null&&e.dependencies!==null&&Ui(e.dependencies)?(typeof g=="function"&&($s(t,n,g,a),U=t.memoizedState),(Y=Ba||rf(t,n,Y,a,L,U,w)||e!==null&&e.dependencies!==null&&Ui(e.dependencies))?(R||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(a,U,w),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(a,U,w)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=U),o.props=a,o.state=U,o.context=w,a=Y):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),a=!1)}return o=a,nr(e,t),a=(t.flags&128)!==0,o||a?(o=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&a?(t.child=yl(t,e.child,null,l),t.child=yl(t,null,n,l)):on(e,t,n,l),t.memoizedState=o.state,e=t.child):e=va(e,t,l),e}function Cf(e,t,n,a){return dl(),t.flags|=256,on(e,t,n,a),t.child}var nc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ac(e){return{baseLanes:e,cachePool:dd()}}function lc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ln),e}function kf(e,t,n){var a=t.pendingProps,l=!1,o=(t.flags&128)!==0,u;if((u=o)||(u=e!==null&&e.memoizedState===null?!1:(Xt.current&2)!==0),u&&(l=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(at){if(l?ja(t):qa(),(e=Et)?(e=Lh(e,Xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:La!==null?{id:Pn,overflow:ea}:null,retryLane:536870912,hydrationErrors:null},n=nd(e),n.return=t,t.child=n,an=t,Et=null)):e=null,e===null)throw _a(t);return qc(e)?t.lanes=32:t.lanes=536870912,null}var g=a.children;return a=a.fallback,l?(qa(),l=t.mode,g=ar({mode:"hidden",children:g},l),a=ul(a,l,n,null),g.return=t,a.return=t,g.sibling=a,t.child=g,a=t.child,a.memoizedState=ac(n),a.childLanes=lc(e,u,n),t.memoizedState=nc,Xo(null,a)):(ja(t),oc(t,g))}var w=e.memoizedState;if(w!==null&&(g=w.dehydrated,g!==null)){if(o)t.flags&256?(ja(t),t.flags&=-257,t=ic(e,t,n)):t.memoizedState!==null?(qa(),t.child=e.child,t.flags|=128,t=null):(qa(),g=a.fallback,l=t.mode,a=ar({mode:"visible",children:a.children},l),g=ul(g,l,n,null),g.flags|=2,a.return=t,g.return=t,a.sibling=g,t.child=a,yl(t,e.child,null,n),a=t.child,a.memoizedState=ac(n),a.childLanes=lc(e,u,n),t.memoizedState=nc,t=Xo(null,a));else if(ja(t),qc(g)){if(u=g.nextSibling&&g.nextSibling.dataset,u)var R=u.dgst;u=R,a=Error(d(419)),a.stack="",a.digest=u,Ro({value:a,source:null,stack:null}),t=ic(e,t,n)}else if(Jt||ql(e,t,n,!1),u=(n&e.childLanes)!==0,Jt||u){if(u=Dt,u!==null&&(a=mo(u,n),a!==0&&a!==w.retryLane))throw w.retryLane=a,cl(e,a),wn(u,e,a),ec;jc(g)||fr(),t=ic(e,t,n)}else jc(g)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,Et=Fn(g.nextSibling),an=t,at=!0,Oa=null,Xn=!1,e!==null&&od(t,e),t=oc(t,a.children),t.flags|=4096);return t}return l?(qa(),g=a.fallback,l=t.mode,w=e.child,R=w.sibling,a=ha(w,{mode:"hidden",children:a.children}),a.subtreeFlags=w.subtreeFlags&65011712,R!==null?g=ha(R,g):(g=ul(g,l,n,null),g.flags|=2),g.return=t,a.return=t,a.sibling=g,t.child=a,Xo(null,a),a=t.child,g=e.child.memoizedState,g===null?g=ac(n):(l=g.cachePool,l!==null?(w=Kt._currentValue,l=l.parent!==w?{parent:w,pool:w}:l):l=dd(),g={baseLanes:g.baseLanes|n,cachePool:l}),a.memoizedState=g,a.childLanes=lc(e,u,n),t.memoizedState=nc,Xo(e.child,a)):(ja(t),n=e.child,e=n.sibling,n=ha(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=n,t.memoizedState=null,n)}function oc(e,t){return t=ar({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ar(e,t){return e=An(22,e,null,t),e.lanes=0,e}function ic(e,t,n){return yl(t,e.child,null,n),e=oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Ss(e.return,t,n)}function rc(e,t,n,a,l,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=n,u.tailMode=l,u.treeForkCount=o)}function Mf(e,t,n){var a=t.pendingProps,l=a.revealOrder,o=a.tail;a=a.children;var u=Xt.current,g=(u&2)!==0;if(g?(u=u&1|2,t.flags|=128):u&=1,ne(Xt,u),on(e,t,a,n),a=at?Eo:0,!g&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zf(e,n,t);else if(e.tag===19)zf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Fi(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),rc(t,!1,l,n,o,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Fi(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}rc(t,!0,n,null,o,a);break;case"together":rc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function va(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ql(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(d(153));if(t.child!==null){for(e=t.child,n=ha(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ha(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function sc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ui(e)))}function ag(e,t,n){switch(t.tag){case 3:St(t,t.stateNode.containerInfo),Ha(t,Kt,e.memoizedState.cache),dl();break;case 27:case 5:Pt(t);break;case 4:St(t,t.stateNode.containerInfo);break;case 10:Ha(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Os(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ja(t),t.flags|=128,null):(n&t.child.childLanes)!==0?kf(e,t,n):(ja(t),e=va(e,t,n),e!==null?e.sibling:null);ja(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(ql(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return Mf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ne(Xt,Xt.current),a)break;return null;case 22:return t.lanes=0,bf(e,t,n,t.pendingProps);case 24:Ha(t,Kt,e.memoizedState.cache)}return va(e,t,n)}function Df(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Jt=!0;else{if(!sc(e,n)&&(t.flags&128)===0)return Jt=!1,ag(e,t,n);Jt=(e.flags&131072)!==0}else Jt=!1,at&&(t.flags&1048576)!==0&&ld(t,Eo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=gl(t.elementType),t.type=e,typeof e=="function")hs(e)?(a=vl(e,a),t.tag=1,t=wf(null,t,e,a,n)):(t.tag=0,t=tc(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===le){t.tag=11,t=gf(null,t,e,a,n);break e}else if(l===te){t.tag=14,t=mf(null,t,e,a,n);break e}}throw t=ie(e)||e,Error(d(306,t,""))}}return t;case 0:return tc(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=vl(a,t.pendingProps),wf(e,t,a,l,n);case 3:e:{if(St(t,t.stateNode.containerInfo),e===null)throw Error(d(387));a=t.pendingProps;var o=t.memoizedState;l=o.element,As(e,t),No(t,a,null,n);var u=t.memoizedState;if(a=u.cache,Ha(t,Kt,a),a!==o.cache&&ws(t,[Kt],n,!0),Uo(),a=u.element,o.isDehydrated)if(o={element:a,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Cf(e,t,a,n);break e}else if(a!==l){l=qn(Error(d(424)),t),Ro(l),t=Cf(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Et=Fn(e.firstChild),an=t,at=!0,Oa=null,Xn=!0,n=yd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(dl(),a===l){t=va(e,t,n);break e}on(e,t,a,n)}t=t.child}return t;case 26:return nr(e,t),e===null?(n=Nh(t.type,null,t.pendingProps,null))?t.memoizedState=n:at||(n=t.type,e=t.pendingProps,a=vr(Me.current).createElement(n),a[Lt]=t,a[Gt]=e,rn(a,n,e),ve(a),t.stateNode=a):t.memoizedState=Nh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pt(t),e===null&&at&&(a=t.stateNode=Hh(t.type,t.pendingProps,Me.current),an=t,Xn=!0,l=Et,Za(t.type)?(Yc=l,Et=Fn(a.firstChild)):Et=l),on(e,t,t.pendingProps.children,n),nr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&at&&((l=a=Et)&&(a=Og(a,t.type,t.pendingProps,Xn),a!==null?(t.stateNode=a,an=t,Et=Fn(a.firstChild),Xn=!1,l=!0):l=!1),l||_a(t)),Pt(t),l=t.type,o=t.pendingProps,u=e!==null?e.memoizedProps:null,a=o.children,Bc(l,o)?a=null:u!==null&&Bc(l,u)&&(t.flags|=32),t.memoizedState!==null&&(l=Hs(e,t,Z0,null,null,n),li._currentValue=l),nr(e,t),on(e,t,a,n),t.child;case 6:return e===null&&at&&((e=n=Et)&&(n=_g(n,t.pendingProps,Xn),n!==null?(t.stateNode=n,an=t,Et=null,e=!0):e=!1),e||_a(t)),null;case 13:return kf(e,t,n);case 4:return St(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=yl(t,null,a,n):on(e,t,a,n),t.child;case 11:return gf(e,t,t.type,t.pendingProps,n);case 7:return on(e,t,t.pendingProps,n),t.child;case 8:return on(e,t,t.pendingProps.children,n),t.child;case 12:return on(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Ha(t,t.type,a.value),on(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,hl(t),l=ln(l),a=a(l),t.flags|=1,on(e,t,a,n),t.child;case 14:return mf(e,t,t.type,t.pendingProps,n);case 15:return yf(e,t,t.type,t.pendingProps,n);case 19:return Mf(e,t,n);case 31:return ng(e,t,n);case 22:return bf(e,t,n,t.pendingProps);case 24:return hl(t),a=ln(Kt),e===null?(l=zs(),l===null&&(l=Dt,o=Cs(),l.pooledCache=o,o.refCount++,o!==null&&(l.pooledCacheLanes|=n),l=o),t.memoizedState={parent:a,cache:l},Ds(t),Ha(t,Kt,l)):((e.lanes&n)!==0&&(As(e,t),No(t,null,null,n),Uo()),l=e.memoizedState,o=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),Ha(t,Kt,a)):(a=o.cache,Ha(t,Kt,a),a!==l.cache&&ws(t,[Kt],n,!0))),on(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function xa(e){e.flags|=4}function cc(e,t,n,a,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(eh())e.flags|=8192;else throw ml=Yi,Ms}else e.flags&=-16777217}function Af(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Xh(t))if(eh())e.flags|=8192;else throw ml=Yi,Ms}function lr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ra():536870912,e.lanes|=t,Il|=t)}function Vo(e,t){if(!at)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags&65011712,a|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function lg(e,t,n){var a=t.pendingProps;switch(ys(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rt(t),null;case 1:return Rt(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ma(Kt),Re(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(jl(t)?xa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vs())),Rt(t),null;case 26:var l=t.type,o=t.memoizedState;return e===null?(xa(t),o!==null?(Rt(t),Af(t,o)):(Rt(t),cc(t,l,null,a,n))):o?o!==e.memoizedState?(xa(t),Rt(t),Af(t,o)):(Rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&xa(t),Rt(t),cc(t,l,e,a,n)),null;case 27:if(Je(t),n=Me.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&xa(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return Rt(t),null}e=re.current,jl(t)?id(t):(e=Hh(l,a,n),t.stateNode=e,xa(t))}return Rt(t),null;case 5:if(Je(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&xa(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return Rt(t),null}if(o=re.current,jl(t))id(t);else{var u=vr(Me.current);switch(o){case 1:o=u.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:o=u.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":o=u.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":o=u.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":o=u.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?o.multiple=!0:a.size&&(o.size=a.size);break;default:o=typeof a.is=="string"?u.createElement(l,{is:a.is}):u.createElement(l)}}o[Lt]=t,o[Gt]=a;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)o.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=o;e:switch(rn(o,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&xa(t)}}return Rt(t),cc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&xa(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(e=Me.current,jl(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=an,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[Lt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||kh(e.nodeValue,n)),e||_a(t,!0)}else e=vr(e).createTextNode(a),e[Lt]=t,t.stateNode=e}return Rt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=jl(t),n!==null){if(e===null){if(!a)throw Error(d(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(557));e[Lt]=t}else dl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Rt(t),e=!1}else n=vs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(En(t),t):(En(t),null);if((t.flags&128)!==0)throw Error(d(558))}return Rt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=jl(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(d(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(d(317));l[Lt]=t}else dl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Rt(t),l=!1}else l=vs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(En(t),t):(En(t),null)}return En(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),lr(t,t.updateQueue),Rt(t),null);case 4:return Re(),e===null&&Rc(t.stateNode.containerInfo),Rt(t),null;case 10:return ma(t.type),Rt(t),null;case 19:if(O(Xt),a=t.memoizedState,a===null)return Rt(t),null;if(l=(t.flags&128)!==0,o=a.rendering,o===null)if(l)Vo(a,!1);else{if(jt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Fi(e),o!==null){for(t.flags|=128,Vo(a,!1),e=o.updateQueue,t.updateQueue=e,lr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)td(n,e),n=n.sibling;return ne(Xt,Xt.current&1|2),at&&pa(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&yt()>cr&&(t.flags|=128,l=!0,Vo(a,!1),t.lanes=4194304)}else{if(!l)if(e=Fi(o),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,lr(t,e),Vo(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!at)return Rt(t),null}else 2*yt()-a.renderingStartTime>cr&&n!==536870912&&(t.flags|=128,l=!0,Vo(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(e=a.last,e!==null?e.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=yt(),e.sibling=null,n=Xt.current,ne(Xt,l?n&1|2:n&1),at&&pa(t,a.treeForkCount),e):(Rt(t),null);case 22:case 23:return En(t),Ls(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Rt(t),t.subtreeFlags&6&&(t.flags|=8192)):Rt(t),n=t.updateQueue,n!==null&&lr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&O(pl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ma(Kt),Rt(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function og(e,t){switch(ys(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ma(Kt),Re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Je(t),null;case 31:if(t.memoizedState!==null){if(En(t),t.alternate===null)throw Error(d(340));dl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(En(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));dl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(Xt),null;case 4:return Re(),null;case 10:return ma(t.type),null;case 22:case 23:return En(t),Ls(),e!==null&&O(pl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ma(Kt),null;case 25:return null;default:return null}}function Tf(e,t){switch(ys(t),t.tag){case 3:ma(Kt),Re();break;case 26:case 27:case 5:Je(t);break;case 4:Re();break;case 31:t.memoizedState!==null&&En(t);break;case 13:En(t);break;case 19:O(Xt);break;case 10:ma(t.type);break;case 22:case 23:En(t),Ls(),e!==null&&O(pl);break;case 24:ma(Kt)}}function Fo(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&e)===e){a=void 0;var o=n.create,u=n.inst;a=o(),u.destroy=a}n=n.next}while(n!==l)}}catch(g){xt(t,t.return,g)}}function Ya(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){var u=a.inst,g=u.destroy;if(g!==void 0){u.destroy=void 0,l=t;var w=n,R=g;try{R()}catch(Y){xt(l,w,Y)}}}a=a.next}while(a!==o)}}catch(Y){xt(t,t.return,Y)}}function Ef(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{vd(t,n)}catch(a){xt(e,e.return,a)}}}function Rf(e,t,n){n.props=vl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){xt(e,t,a)}}function Qo(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(l){xt(e,t,l)}}function ta(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){xt(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){xt(e,t,l)}else n.current=null}function Lf(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){xt(e,e.return,l)}}function uc(e,t,n){try{var a=e.stateNode;Dg(a,e.type,n,t),a[Gt]=t}catch(l){xt(e,e.return,l)}}function Of(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Za(e.type)||e.tag===4}function dc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Of(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&&Za(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 fc(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=da));else if(a!==4&&(a===27&&Za(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(fc(e,t,n),e=e.sibling;e!==null;)fc(e,t,n),e=e.sibling}function or(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Za(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(or(e,t,n),e=e.sibling;e!==null;)or(e,t,n),e=e.sibling}function _f(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);rn(t,a,n),t[Lt]=e,t[Gt]=n}catch(o){xt(e,e.return,o)}}var Sa=!1,Wt=!1,hc=!1,Hf=typeof WeakSet=="function"?WeakSet:Set,nn=null;function ig(e,t){if(e=e.containerInfo,_c=Mr,e=Qu(e),is(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var l=a.anchorOffset,o=a.focusNode;a=a.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var u=0,g=-1,w=-1,R=0,Y=0,K=e,L=null;t:for(;;){for(var U;K!==n||l!==0&&K.nodeType!==3||(g=u+l),K!==o||a!==0&&K.nodeType!==3||(w=u+a),K.nodeType===3&&(u+=K.nodeValue.length),(U=K.firstChild)!==null;)L=K,K=U;for(;;){if(K===e)break t;if(L===n&&++R===l&&(g=u),L===o&&++Y===a&&(w=u),(U=K.nextSibling)!==null)break;K=L,L=K.parentNode}K=U}n=g===-1||w===-1?null:{start:g,end:w}}else n=null}n=n||{start:0,end:0}}else n=null;for(Hc={focusedElem:e,selectionRange:n},Mr=!1,nn=t;nn!==null;)if(t=nn,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nn=e;else for(;nn!==null;){switch(t=nn,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,n=t,l=o.memoizedProps,o=o.memoizedState,a=n.stateNode;try{var ye=vl(n.type,l);e=a.getSnapshotBeforeUpdate(ye,o),a.__reactInternalSnapshotBeforeUpdate=e}catch(Le){xt(n,n.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Nc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Nc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(d(163))}if(e=t.sibling,e!==null){e.return=t.return,nn=e;break}nn=t.return}}function Bf(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Ca(e,n),a&4&&Fo(5,n);break;case 1:if(Ca(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(u){xt(n,n.return,u)}else{var l=vl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){xt(n,n.return,u)}}a&64&&Ef(n),a&512&&Qo(n,n.return);break;case 3:if(Ca(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{vd(e,t)}catch(u){xt(n,n.return,u)}}break;case 27:t===null&&a&4&&_f(n);case 26:case 5:Ca(e,n),t===null&&a&4&&Lf(n),a&512&&Qo(n,n.return);break;case 12:Ca(e,n);break;case 31:Ca(e,n),a&4&&jf(e,n);break;case 13:Ca(e,n),a&4&&qf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=gg.bind(null,n),Hg(e,n))));break;case 22:if(a=n.memoizedState!==null||Sa,!a){t=t!==null&&t.memoizedState!==null||Wt,l=Sa;var o=Wt;Sa=a,(Wt=t)&&!o?ka(e,n,(n.subtreeFlags&8772)!==0):Ca(e,n),Sa=l,Wt=o}break;case 30:break;default:Ca(e,n)}}function Uf(e){var t=e.alternate;t!==null&&(e.alternate=null,Uf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&vo(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 Ot=null,bn=!1;function wa(e,t,n){for(n=n.child;n!==null;)Nf(e,t,n),n=n.sibling}function Nf(e,t,n){if(De&&typeof De.onCommitFiberUnmount=="function")try{De.onCommitFiberUnmount(Ue,n)}catch{}switch(n.tag){case 26:Wt||ta(n,t),wa(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Wt||ta(n,t);var a=Ot,l=bn;Za(n.type)&&(Ot=n.stateNode,bn=!1),wa(e,t,n),ti(n.stateNode),Ot=a,bn=l;break;case 5:Wt||ta(n,t);case 6:if(a=Ot,l=bn,Ot=null,wa(e,t,n),Ot=a,bn=l,Ot!==null)if(bn)try{(Ot.nodeType===9?Ot.body:Ot.nodeName==="HTML"?Ot.ownerDocument.body:Ot).removeChild(n.stateNode)}catch(o){xt(n,t,o)}else try{Ot.removeChild(n.stateNode)}catch(o){xt(n,t,o)}break;case 18:Ot!==null&&(bn?(e=Ot,Eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),io(e)):Eh(Ot,n.stateNode));break;case 4:a=Ot,l=bn,Ot=n.stateNode.containerInfo,bn=!0,wa(e,t,n),Ot=a,bn=l;break;case 0:case 11:case 14:case 15:Ya(2,n,t),Wt||Ya(4,n,t),wa(e,t,n);break;case 1:Wt||(ta(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Rf(n,t,a)),wa(e,t,n);break;case 21:wa(e,t,n);break;case 22:Wt=(a=Wt)||n.memoizedState!==null,wa(e,t,n),Wt=a;break;default:wa(e,t,n)}}function jf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{io(e)}catch(n){xt(t,t.return,n)}}}function qf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{io(e)}catch(n){xt(t,t.return,n)}}function rg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Hf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Hf),t;default:throw Error(d(435,e.tag))}}function ir(e,t){var n=rg(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=mg.bind(null,e,a);a.then(l,l)}})}function vn(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],o=e,u=t,g=u;e:for(;g!==null;){switch(g.tag){case 27:if(Za(g.type)){Ot=g.stateNode,bn=!1;break e}break;case 5:Ot=g.stateNode,bn=!1;break e;case 3:case 4:Ot=g.stateNode.containerInfo,bn=!0;break e}g=g.return}if(Ot===null)throw Error(d(160));Nf(o,u,l),Ot=null,bn=!1,o=l.alternate,o!==null&&(o.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Yf(t,e),t=t.sibling}var Jn=null;function Yf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:vn(t,e),xn(e),a&4&&(Ya(3,e,e.return),Fo(3,e),Ya(5,e,e.return));break;case 1:vn(t,e),xn(e),a&512&&(Wt||n===null||ta(n,n.return)),a&64&&Sa&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var l=Jn;if(vn(t,e),xn(e),a&512&&(Wt||n===null||ta(n,n.return)),a&4){var o=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,l=l.ownerDocument||l;t:switch(a){case"title":o=l.getElementsByTagName("title")[0],(!o||o[ol]||o[Lt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=l.createElement(a),l.head.insertBefore(o,l.querySelector("head > title"))),rn(o,a,n),o[Lt]=e,ve(o),a=o;break e;case"link":var u=Yh("link","href",l).get(a+(n.href||""));if(u){for(var g=0;g<u.length;g++)if(o=u[g],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){u.splice(g,1);break t}}o=l.createElement(a),rn(o,a,n),l.head.appendChild(o);break;case"meta":if(u=Yh("meta","content",l).get(a+(n.content||""))){for(g=0;g<u.length;g++)if(o=u[g],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){u.splice(g,1);break t}}o=l.createElement(a),rn(o,a,n),l.head.appendChild(o);break;default:throw Error(d(468,a))}o[Lt]=e,ve(o),a=o}e.stateNode=a}else Gh(l,e.type,e.stateNode);else e.stateNode=qh(l,a,e.memoizedProps);else o!==a?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,a===null?Gh(l,e.type,e.stateNode):qh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&uc(e,e.memoizedProps,n.memoizedProps)}break;case 27:vn(t,e),xn(e),a&512&&(Wt||n===null||ta(n,n.return)),n!==null&&a&4&&uc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(vn(t,e),xn(e),a&512&&(Wt||n===null||ta(n,n.return)),e.flags&32){l=e.stateNode;try{Tl(l,"")}catch(ye){xt(e,e.return,ye)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,uc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(hc=!0);break;case 6:if(vn(t,e),xn(e),a&4){if(e.stateNode===null)throw Error(d(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ye){xt(e,e.return,ye)}}break;case 3:if(wr=null,l=Jn,Jn=xr(t.containerInfo),vn(t,e),Jn=l,xn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{io(t.containerInfo)}catch(ye){xt(e,e.return,ye)}hc&&(hc=!1,Gf(e));break;case 4:a=Jn,Jn=xr(e.stateNode.containerInfo),vn(t,e),xn(e),Jn=a;break;case 12:vn(t,e),xn(e);break;case 31:vn(t,e),xn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ir(e,a)));break;case 13:vn(t,e),xn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(sr=yt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ir(e,a)));break;case 22:l=e.memoizedState!==null;var w=n!==null&&n.memoizedState!==null,R=Sa,Y=Wt;if(Sa=R||l,Wt=Y||w,vn(t,e),Wt=Y,Sa=R,xn(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||w||Sa||Wt||xl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){w=n=t;try{if(o=w.stateNode,l)u=o.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{g=w.stateNode;var K=w.memoizedProps.style,L=K!=null&&K.hasOwnProperty("display")?K.display:null;g.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(ye){xt(w,w.return,ye)}}}else if(t.tag===6){if(n===null){w=t;try{w.stateNode.nodeValue=l?"":w.memoizedProps}catch(ye){xt(w,w.return,ye)}}}else if(t.tag===18){if(n===null){w=t;try{var U=w.stateNode;l?Rh(U,!0):Rh(w.stateNode,!1)}catch(ye){xt(w,w.return,ye)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,ir(e,n))));break;case 19:vn(t,e),xn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ir(e,a)));break;case 30:break;case 21:break;default:vn(t,e),xn(e)}}function xn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Of(a)){n=a;break}a=a.return}if(n==null)throw Error(d(160));switch(n.tag){case 27:var l=n.stateNode,o=dc(e);or(e,o,l);break;case 5:var u=n.stateNode;n.flags&32&&(Tl(u,""),n.flags&=-33);var g=dc(e);or(e,g,u);break;case 3:case 4:var w=n.stateNode.containerInfo,R=dc(e);fc(e,R,w);break;default:throw Error(d(161))}}catch(Y){xt(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Gf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ca(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Bf(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ya(4,t,t.return),xl(t);break;case 1:ta(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Rf(t,t.return,n),xl(t);break;case 27:ti(t.stateNode);case 26:case 5:ta(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function ka(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,o=t,u=o.flags;switch(o.tag){case 0:case 11:case 15:ka(l,o,n),Fo(4,o);break;case 1:if(ka(l,o,n),a=o,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(R){xt(a,a.return,R)}if(a=o,l=a.updateQueue,l!==null){var g=a.stateNode;try{var w=l.shared.hiddenCallbacks;if(w!==null)for(l.shared.hiddenCallbacks=null,l=0;l<w.length;l++)bd(w[l],g)}catch(R){xt(a,a.return,R)}}n&&u&64&&Ef(o),Qo(o,o.return);break;case 27:_f(o);case 26:case 5:ka(l,o,n),n&&a===null&&u&4&&Lf(o),Qo(o,o.return);break;case 12:ka(l,o,n);break;case 31:ka(l,o,n),n&&u&4&&jf(l,o);break;case 13:ka(l,o,n),n&&u&4&&qf(l,o);break;case 22:o.memoizedState===null&&ka(l,o,n),Qo(o,o.return);break;case 30:break;default:ka(l,o,n)}t=t.sibling}}function pc(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&&Lo(n))}function gc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Lo(e))}function Wn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Xf(e,t,n,a),t=t.sibling}function Xf(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Wn(e,t,n,a),l&2048&&Fo(9,t);break;case 1:Wn(e,t,n,a);break;case 3:Wn(e,t,n,a),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Lo(e)));break;case 12:if(l&2048){Wn(e,t,n,a),e=t.stateNode;try{var o=t.memoizedProps,u=o.id,g=o.onPostCommit;typeof g=="function"&&g(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){xt(t,t.return,w)}}else Wn(e,t,n,a);break;case 31:Wn(e,t,n,a);break;case 13:Wn(e,t,n,a);break;case 23:break;case 22:o=t.stateNode,u=t.alternate,t.memoizedState!==null?o._visibility&2?Wn(e,t,n,a):Ko(e,t):o._visibility&2?Wn(e,t,n,a):(o._visibility|=2,Jl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&pc(u,t);break;case 24:Wn(e,t,n,a),l&2048&&gc(t.alternate,t);break;default:Wn(e,t,n,a)}}function Jl(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,u=t,g=n,w=a,R=u.flags;switch(u.tag){case 0:case 11:case 15:Jl(o,u,g,w,l),Fo(8,u);break;case 23:break;case 22:var Y=u.stateNode;u.memoizedState!==null?Y._visibility&2?Jl(o,u,g,w,l):Ko(o,u):(Y._visibility|=2,Jl(o,u,g,w,l)),l&&R&2048&&pc(u.alternate,u);break;case 24:Jl(o,u,g,w,l),l&&R&2048&&gc(u.alternate,u);break;default:Jl(o,u,g,w,l)}t=t.sibling}}function Ko(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,l=a.flags;switch(a.tag){case 22:Ko(n,a),l&2048&&pc(a.alternate,a);break;case 24:Ko(n,a),l&2048&&gc(a.alternate,a);break;default:Ko(n,a)}t=t.sibling}}var Zo=8192;function Wl(e,t,n){if(e.subtreeFlags&Zo)for(e=e.child;e!==null;)Vf(e,t,n),e=e.sibling}function Vf(e,t,n){switch(e.tag){case 26:Wl(e,t,n),e.flags&Zo&&e.memoizedState!==null&&Kg(n,Jn,e.memoizedState,e.memoizedProps);break;case 5:Wl(e,t,n);break;case 3:case 4:var a=Jn;Jn=xr(e.stateNode.containerInfo),Wl(e,t,n),Jn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Zo,Zo=16777216,Wl(e,t,n),Zo=a):Wl(e,t,n));break;default:Wl(e,t,n)}}function Ff(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 Jo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];nn=a,Kf(a,e)}Ff(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qf(e),e=e.sibling}function Qf(e){switch(e.tag){case 0:case 11:case 15:Jo(e),e.flags&2048&&Ya(9,e,e.return);break;case 3:Jo(e);break;case 12:Jo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,rr(e)):Jo(e);break;default:Jo(e)}}function rr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];nn=a,Kf(a,e)}Ff(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ya(8,t,t.return),rr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,rr(t));break;default:rr(t)}e=e.sibling}}function Kf(e,t){for(;nn!==null;){var n=nn;switch(n.tag){case 0:case 11:case 15:Ya(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Lo(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,nn=a;else e:for(n=e;nn!==null;){a=nn;var l=a.sibling,o=a.return;if(Uf(a),a===n){nn=null;break e}if(l!==null){l.return=o,nn=l;break e}nn=o}}}var sg={getCacheForType:function(e){var t=ln(Kt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ln(Kt).controller.signal}},cg=typeof WeakMap=="function"?WeakMap:Map,dt=0,Dt=null,Ie=null,et=0,vt=0,Rn=null,Ga=!1,$l=!1,mc=!1,za=0,jt=0,Xa=0,Sl=0,yc=0,Ln=0,Il=0,Wo=null,Sn=null,bc=!1,sr=0,Zf=0,cr=1/0,ur=null,Va=null,en=0,Fa=null,Pl=null,Ma=0,vc=0,xc=null,Jf=null,$o=0,Sc=null;function On(){return(dt&2)!==0&&et!==0?et&-et:T.T!==null?Dc():xi()}function Wf(){if(Ln===0)if((et&536870912)===0||at){var e=_e;_e<<=1,(_e&3932160)===0&&(_e=262144),Ln=e}else Ln=536870912;return e=Tn.current,e!==null&&(e.flags|=32),Ln}function wn(e,t,n){(e===Dt&&(vt===2||vt===9)||e.cancelPendingCommit!==null)&&(eo(e,0),Qa(e,et,Ln,!1)),Ut(e,n),((dt&2)===0||e!==Dt)&&(e===Dt&&((dt&2)===0&&(Sl|=n),jt===4&&Qa(e,et,Ln,!1)),na(e))}function $f(e,t,n){if((dt&6)!==0)throw Error(d(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||zn(e,t),l=a?fg(e,t):Cc(e,t,!0),o=a;do{if(l===0){$l&&!a&&Qa(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!ug(n)){l=Cc(e,t,!1),o=!1;continue}if(l===2){if(o=t,e.errorRecoveryDisabledLanes&o)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var g=e;l=Wo;var w=g.current.memoizedState.isDehydrated;if(w&&(eo(g,u).flags|=256),u=Cc(g,u,!1),u!==2){if(mc&&!w){g.errorRecoveryDisabledLanes|=o,Sl|=o,l=4;break e}o=Sn,Sn=l,o!==null&&(Sn===null?Sn=o:Sn.push.apply(Sn,o))}l=u}if(o=!1,l!==2)continue}}if(l===1){eo(e,0),Qa(e,t,0,!0);break}e:{switch(a=e,o=l,o){case 0:case 1:throw Error(d(345));case 4:if((t&4194048)!==t)break;case 6:Qa(a,t,Ln,!Ga);break e;case 2:Sn=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(l=sr+300-yt(),10<l)){if(Qa(a,t,Ln,!Ga),st(a,0,!0)!==0)break e;Ma=t,a.timeoutHandle=Ah(If.bind(null,a,n,Sn,ur,bc,t,Ln,Sl,Il,Ga,o,"Throttled",-0,0),l);break e}If(a,n,Sn,ur,bc,t,Ln,Sl,Il,Ga,o,null,-0,0)}}break}while(!0);na(e)}function If(e,t,n,a,l,o,u,g,w,R,Y,K,L,U){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:da},Vf(t,o,K);var ye=(o&62914560)===o?sr-yt():(o&4194048)===o?Zf-yt():0;if(ye=Zg(K,ye),ye!==null){Ma=o,e.cancelPendingCommit=ye(ih.bind(null,e,t,o,n,a,l,u,g,w,Y,K,null,L,U)),Qa(e,o,u,!R);return}}ih(e,t,o,n,a,l,u,g,w)}function ug(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var l=n[a],o=l.getSnapshot;l=l.value;try{if(!Dn(o(),l))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qa(e,t,n,a){t&=~yc,t&=~Sl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var o=31-bt(l),u=1<<o;a[o]=-1,l&=~u}n!==0&&bi(e,n,t)}function dr(){return(dt&6)===0?(Io(0),!1):!0}function wc(){if(Ie!==null){if(vt===0)var e=Ie.return;else e=Ie,ga=fl=null,Ns(e),Vl=null,_o=0,e=Ie;for(;e!==null;)Tf(e.alternate,e),e=e.return;Ie=null}}function eo(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Eg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ma=0,wc(),Dt=e,Ie=n=ha(e.current,null),et=t,vt=0,Rn=null,Ga=!1,$l=zn(e,t),mc=!1,Il=Ln=yc=Sl=Xa=jt=0,Sn=Wo=null,bc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-bt(a),o=1<<l;t|=e[l],a&=~o}return za=t,Li(),n}function Pf(e,t){Ke=null,T.H=Go,t===Xl||t===qi?(t=pd(),vt=3):t===Ms?(t=pd(),vt=4):vt=t===ec?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Rn=t,Ie===null&&(jt=1,er(e,qn(t,e.current)))}function eh(){var e=Tn.current;return e===null?!0:(et&4194048)===et?Vn===null:(et&62914560)===et||(et&536870912)!==0?e===Vn:!1}function th(){var e=T.H;return T.H=Go,e===null?Go:e}function nh(){var e=T.A;return T.A=sg,e}function fr(){jt=4,Ga||(et&4194048)!==et&&Tn.current!==null||($l=!0),(Xa&134217727)===0&&(Sl&134217727)===0||Dt===null||Qa(Dt,et,Ln,!1)}function Cc(e,t,n){var a=dt;dt|=2;var l=th(),o=nh();(Dt!==e||et!==t)&&(ur=null,eo(e,t)),t=!1;var u=jt;e:do try{if(vt!==0&&Ie!==null){var g=Ie,w=Rn;switch(vt){case 8:wc(),u=6;break e;case 3:case 2:case 9:case 6:Tn.current===null&&(t=!0);var R=vt;if(vt=0,Rn=null,to(e,g,w,R),n&&$l){u=0;break e}break;default:R=vt,vt=0,Rn=null,to(e,g,w,R)}}dg(),u=jt;break}catch(Y){Pf(e,Y)}while(!0);return t&&e.shellSuspendCounter++,ga=fl=null,dt=a,T.H=l,T.A=o,Ie===null&&(Dt=null,et=0,Li()),u}function dg(){for(;Ie!==null;)ah(Ie)}function fg(e,t){var n=dt;dt|=2;var a=th(),l=nh();Dt!==e||et!==t?(ur=null,cr=yt()+500,eo(e,t)):$l=zn(e,t);e:do try{if(vt!==0&&Ie!==null){t=Ie;var o=Rn;t:switch(vt){case 1:vt=0,Rn=null,to(e,t,o,1);break;case 2:case 9:if(fd(o)){vt=0,Rn=null,lh(t);break}t=function(){vt!==2&&vt!==9||Dt!==e||(vt=7),na(e)},o.then(t,t);break e;case 3:vt=7;break e;case 4:vt=5;break e;case 7:fd(o)?(vt=0,Rn=null,lh(t)):(vt=0,Rn=null,to(e,t,o,7));break;case 5:var u=null;switch(Ie.tag){case 26:u=Ie.memoizedState;case 5:case 27:var g=Ie;if(u?Xh(u):g.stateNode.complete){vt=0,Rn=null;var w=g.sibling;if(w!==null)Ie=w;else{var R=g.return;R!==null?(Ie=R,hr(R)):Ie=null}break t}}vt=0,Rn=null,to(e,t,o,5);break;case 6:vt=0,Rn=null,to(e,t,o,6);break;case 8:wc(),jt=6;break e;default:throw Error(d(462))}}hg();break}catch(Y){Pf(e,Y)}while(!0);return ga=fl=null,T.H=a,T.A=l,dt=n,Ie!==null?0:(Dt=null,et=0,Li(),jt)}function hg(){for(;Ie!==null&&!zt();)ah(Ie)}function ah(e){var t=Df(e.alternate,e,za);e.memoizedProps=e.pendingProps,t===null?hr(e):Ie=t}function lh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Sf(n,t,t.pendingProps,t.type,void 0,et);break;case 11:t=Sf(n,t,t.pendingProps,t.type.render,t.ref,et);break;case 5:Ns(t);default:Tf(n,t),t=Ie=td(t,za),t=Df(n,t,za)}e.memoizedProps=e.pendingProps,t===null?hr(e):Ie=t}function to(e,t,n,a){ga=fl=null,Ns(t),Vl=null,_o=0;var l=t.return;try{if(tg(e,l,t,n,et)){jt=1,er(e,qn(n,e.current)),Ie=null;return}}catch(o){if(l!==null)throw Ie=l,o;jt=1,er(e,qn(n,e.current)),Ie=null;return}t.flags&32768?(at||a===1?e=!0:$l||(et&536870912)!==0?e=!1:(Ga=e=!0,(a===2||a===9||a===3||a===6)&&(a=Tn.current,a!==null&&a.tag===13&&(a.flags|=16384))),oh(t,e)):hr(t)}function hr(e){var t=e;do{if((t.flags&32768)!==0){oh(t,Ga);return}e=t.return;var n=lg(t.alternate,t,za);if(n!==null){Ie=n;return}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);jt===0&&(jt=5)}function oh(e,t){do{var n=og(e.alternate,e);if(n!==null){n.flags&=32767,Ie=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ie=e;return}Ie=e=n}while(e!==null);jt=6,Ie=null}function ih(e,t,n,a,l,o,u,g,w){e.cancelPendingCommit=null;do pr();while(en!==0);if((dt&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(o=t.lanes|t.childLanes,o|=ds,Xr(e,n,o,u,g,w),e===Dt&&(Ie=Dt=null,et=0),Pl=t,Fa=e,Ma=n,vc=o,xc=l,Jf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,yg(mn,function(){return dh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=T.T,T.T=null,l=Z.p,Z.p=2,u=dt,dt|=4;try{ig(e,t,n)}finally{dt=u,Z.p=l,T.T=a}}en=1,rh(),sh(),ch()}}function rh(){if(en===1){en=0;var e=Fa,t=Pl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=T.T,T.T=null;var a=Z.p;Z.p=2;var l=dt;dt|=4;try{Yf(t,e);var o=Hc,u=Qu(e.containerInfo),g=o.focusedElem,w=o.selectionRange;if(u!==g&&g&&g.ownerDocument&&Fu(g.ownerDocument.documentElement,g)){if(w!==null&&is(g)){var R=w.start,Y=w.end;if(Y===void 0&&(Y=R),"selectionStart"in g)g.selectionStart=R,g.selectionEnd=Math.min(Y,g.value.length);else{var K=g.ownerDocument||document,L=K&&K.defaultView||window;if(L.getSelection){var U=L.getSelection(),ye=g.textContent.length,Le=Math.min(w.start,ye),kt=w.end===void 0?Le:Math.min(w.end,ye);!U.extend&&Le>kt&&(u=kt,kt=Le,Le=u);var M=Vu(g,Le),k=Vu(g,kt);if(M&&k&&(U.rangeCount!==1||U.anchorNode!==M.node||U.anchorOffset!==M.offset||U.focusNode!==k.node||U.focusOffset!==k.offset)){var E=K.createRange();E.setStart(M.node,M.offset),U.removeAllRanges(),Le>kt?(U.addRange(E),U.extend(k.node,k.offset)):(E.setEnd(k.node,k.offset),U.addRange(E))}}}}for(K=[],U=g;U=U.parentNode;)U.nodeType===1&&K.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<K.length;g++){var V=K[g];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Mr=!!_c,Hc=_c=null}finally{dt=l,Z.p=a,T.T=n}}e.current=t,en=2}}function sh(){if(en===2){en=0;var e=Fa,t=Pl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=T.T,T.T=null;var a=Z.p;Z.p=2;var l=dt;dt|=4;try{Bf(e,t.alternate,t)}finally{dt=l,Z.p=a,T.T=n}}en=3}}function ch(){if(en===4||en===3){en=0,Te();var e=Fa,t=Pl,n=Ma,a=Jf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?en=5:(en=0,Pl=Fa=null,uh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(Va=null),yo(n),t=t.stateNode,De&&typeof De.onCommitFiberRoot=="function")try{De.onCommitFiberRoot(Ue,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=T.T,l=Z.p,Z.p=2,T.T=null;try{for(var o=e.onRecoverableError,u=0;u<a.length;u++){var g=a[u];o(g.value,{componentStack:g.stack})}}finally{T.T=t,Z.p=l}}(Ma&3)!==0&&pr(),na(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===Sc?$o++:($o=0,Sc=e):$o=0,Io(0)}}function uh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Lo(t)))}function pr(){return rh(),sh(),ch(),dh()}function dh(){if(en!==5)return!1;var e=Fa,t=vc;vc=0;var n=yo(Ma),a=T.T,l=Z.p;try{Z.p=32>n?32:n,T.T=null,n=xc,xc=null;var o=Fa,u=Ma;if(en=0,Pl=Fa=null,Ma=0,(dt&6)!==0)throw Error(d(331));var g=dt;if(dt|=4,Qf(o.current),Xf(o,o.current,u,n),dt=g,Io(0,!1),De&&typeof De.onPostCommitFiberRoot=="function")try{De.onPostCommitFiberRoot(Ue,o)}catch{}return!0}finally{Z.p=l,T.T=a,uh(e,t)}}function fh(e,t,n){t=qn(n,t),t=Ps(e.stateNode,t,2),e=Na(e,t,2),e!==null&&(Ut(e,2),na(e))}function xt(e,t,n){if(e.tag===3)fh(e,e,n);else for(;t!==null;){if(t.tag===3){fh(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Va===null||!Va.has(a))){e=qn(n,e),n=hf(2),a=Na(t,n,2),a!==null&&(pf(n,a,t,e),Ut(a,2),na(a));break}}t=t.return}}function kc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new cg;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(mc=!0,l.add(n),e=pg.bind(null,e,t,n),t.then(e,e))}function pg(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Dt===e&&(et&n)===n&&(jt===4||jt===3&&(et&62914560)===et&&300>yt()-sr?(dt&2)===0&&eo(e,0):yc|=n,Il===et&&(Il=0)),na(e)}function hh(e,t){t===0&&(t=ra()),e=cl(e,t),e!==null&&(Ut(e,t),na(e))}function gg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hh(e,n)}function mg(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(t),hh(e,n)}function yg(e,t){return $e(e,t)}var gr=null,no=null,zc=!1,mr=!1,Mc=!1,Ka=0;function na(e){e!==no&&e.next===null&&(no===null?gr=no=e:no=no.next=e),mr=!0,zc||(zc=!0,vg())}function Io(e,t){if(!Mc&&mr){Mc=!0;do for(var n=!1,a=gr;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var o=0;else{var u=a.suspendedLanes,g=a.pingedLanes;o=(1<<31-bt(42|e)+1)-1,o&=l&~(u&~g),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,yh(a,o))}else o=et,o=st(a,a===Dt?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(o&3)===0||zn(a,o)||(n=!0,yh(a,o));a=a.next}while(n);Mc=!1}}function bg(){ph()}function ph(){mr=zc=!1;var e=0;Ka!==0&&Tg()&&(e=Ka);for(var t=yt(),n=null,a=gr;a!==null;){var l=a.next,o=gh(a,t);o===0?(a.next=null,n===null?gr=l:n.next=l,l===null&&(no=n)):(n=a,(e!==0||(o&3)!==0)&&(mr=!0)),a=l}en!==0&&en!==5||Io(e),Ka!==0&&(Ka=0)}function gh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var u=31-bt(o),g=1<<u,w=l[u];w===-1?((g&n)===0||(g&a)!==0)&&(l[u]=Ml(g,t)):w<=t&&(e.expiredLanes|=g),o&=~g}if(t=Dt,n=et,n=st(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(vt===2||vt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&mt(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||zn(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&mt(a),yo(n)){case 2:case 8:n=kn;break;case 32:n=mn;break;case 268435456:n=ue;break;default:n=mn}return a=mh.bind(null,e),n=$e(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&mt(a),e.callbackPriority=2,e.callbackNode=null,2}function mh(e,t){if(en!==0&&en!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(pr()&&e.callbackNode!==n)return null;var a=et;return a=st(e,e===Dt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:($f(e,a,t),gh(e,yt()),e.callbackNode!=null&&e.callbackNode===n?mh.bind(null,e):null)}function yh(e,t){if(pr())return null;$f(e,t,!0)}function vg(){Rg(function(){(dt&6)!==0?$e(Hn,bg):ph()})}function Dc(){if(Ka===0){var e=Yl;e===0&&(e=B,B<<=1,(B&261888)===0&&(B=256)),Ka=e}return Ka}function bh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ki(""+e)}function vh(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 xg(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var o=bh((l[Gt]||null).action),u=a.submitter;u&&(t=(t=u[Gt]||null)?bh(t.formAction):u.getAttribute("formAction"),t!==null&&(o=t,u=null));var g=new Ai("action","action",null,a,l);e.push({event:g,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ka!==0){var w=u?vh(l,u):new FormData(l);Ks(n,{pending:!0,data:w,method:l.method,action:o},null,w)}}else typeof o=="function"&&(g.preventDefault(),w=u?vh(l,u):new FormData(l),Ks(n,{pending:!0,data:w,method:l.method,action:o},o,w))},currentTarget:l}]})}}for(var Ac=0;Ac<us.length;Ac++){var Tc=us[Ac],Sg=Tc.toLowerCase(),wg=Tc[0].toUpperCase()+Tc.slice(1);Zn(Sg,"on"+wg)}Zn(Ju,"onAnimationEnd"),Zn(Wu,"onAnimationIteration"),Zn($u,"onAnimationStart"),Zn("dblclick","onDoubleClick"),Zn("focusin","onFocus"),Zn("focusout","onBlur"),Zn(N0,"onTransitionRun"),Zn(j0,"onTransitionStart"),Zn(q0,"onTransitionCancel"),Zn(Iu,"onTransitionEnd"),it("onMouseEnter",["mouseout","mouseover"]),it("onMouseLeave",["mouseout","mouseover"]),it("onPointerEnter",["pointerout","pointerover"]),it("onPointerLeave",["pointerout","pointerover"]),ot("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ot("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ot("onBeforeInput",["compositionend","keypress","textInput","paste"]),ot("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ot("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ot("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Po="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(" "),Cg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Po));function xh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var o=void 0;if(t)for(var u=a.length-1;0<=u;u--){var g=a[u],w=g.instance,R=g.currentTarget;if(g=g.listener,w!==o&&l.isPropagationStopped())break e;o=g,l.currentTarget=R;try{o(l)}catch(Y){Ri(Y)}l.currentTarget=null,o=w}else for(u=0;u<a.length;u++){if(g=a[u],w=g.instance,R=g.currentTarget,g=g.listener,w!==o&&l.isPropagationStopped())break e;o=g,l.currentTarget=R;try{o(l)}catch(Y){Ri(Y)}l.currentTarget=null,o=w}}}}function Pe(e,t){var n=t[Dl];n===void 0&&(n=t[Dl]=new Set);var a=e+"__bubble";n.has(a)||(Sh(t,e,2,!1),n.add(a))}function Ec(e,t,n){var a=0;t&&(a|=4),Sh(n,e,a,t)}var yr="_reactListening"+Math.random().toString(36).slice(2);function Rc(e){if(!e[yr]){e[yr]=!0,He.forEach(function(n){n!=="selectionchange"&&(Cg.has(n)||Ec(n,!1,e),Ec(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yr]||(t[yr]=!0,Ec("selectionchange",!1,t))}}function Sh(e,t,n,a){switch(Wh(t)){case 2:var l=$g;break;case 8:l=Ig;break;default:l=Qc}n=l.bind(null,t,n,e),l=void 0,!$r||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Lc(e,t,n,a,l){var o=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var g=a.stateNode.containerInfo;if(g===l)break;if(u===4)for(u=a.return;u!==null;){var w=u.tag;if((w===3||w===4)&&u.stateNode.containerInfo===l)return;u=u.return}for(;g!==null;){if(u=ca(g),u===null)return;if(w=u.tag,w===5||w===6||w===26||w===27){a=o=u;continue e}g=g.parentNode}}a=a.return}zu(function(){var R=o,Y=Jr(n),K=[];e:{var L=Pu.get(e);if(L!==void 0){var U=Ai,ye=e;switch(e){case"keypress":if(Mi(n)===0)break e;case"keydown":case"keyup":U=m0;break;case"focusin":ye="focus",U=ts;break;case"focusout":ye="blur",U=ts;break;case"beforeblur":case"afterblur":U=ts;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":U=Au;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=l0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=v0;break;case Ju:case Wu:case $u:U=r0;break;case Iu:U=S0;break;case"scroll":case"scrollend":U=n0;break;case"wheel":U=C0;break;case"copy":case"cut":case"paste":U=c0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Eu;break;case"toggle":case"beforetoggle":U=z0}var Le=(t&4)!==0,kt=!Le&&(e==="scroll"||e==="scrollend"),M=Le?L!==null?L+"Capture":null:L;Le=[];for(var k=R,E;k!==null;){var V=k;if(E=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||E===null||M===null||(V=So(k,M),V!=null&&Le.push(ei(k,V,E))),kt)break;k=k.return}0<Le.length&&(L=new U(L,ye,null,n,Y),K.push({event:L,listeners:Le}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",L&&n!==Zr&&(ye=n.relatedTarget||n.fromElement)&&(ca(ye)||ye[Mn]))break e;if((U||L)&&(L=Y.window===Y?Y:(L=Y.ownerDocument)?L.defaultView||L.parentWindow:window,U?(ye=n.relatedTarget||n.toElement,U=R,ye=ye?ca(ye):null,ye!==null&&(kt=p(ye),Le=ye.tag,ye!==kt||Le!==5&&Le!==27&&Le!==6)&&(ye=null)):(U=null,ye=R),U!==ye)){if(Le=Au,V="onMouseLeave",M="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(Le=Eu,V="onPointerLeave",M="onPointerEnter",k="pointer"),kt=U==null?L:se(U),E=ye==null?L:se(ye),L=new Le(V,k+"leave",U,n,Y),L.target=kt,L.relatedTarget=E,V=null,ca(Y)===R&&(Le=new Le(M,k+"enter",ye,n,Y),Le.target=E,Le.relatedTarget=kt,V=Le),kt=V,U&&ye)t:{for(Le=kg,M=U,k=ye,E=0,V=M;V;V=Le(V))E++;V=0;for(var Ae=k;Ae;Ae=Le(Ae))V++;for(;0<E-V;)M=Le(M),E--;for(;0<V-E;)k=Le(k),V--;for(;E--;){if(M===k||k!==null&&M===k.alternate){Le=M;break t}M=Le(M),k=Le(k)}Le=null}else Le=null;U!==null&&wh(K,L,U,Le,!1),ye!==null&&kt!==null&&wh(K,kt,ye,Le,!0)}}e:{if(L=R?se(R):window,U=L.nodeName&&L.nodeName.toLowerCase(),U==="select"||U==="input"&&L.type==="file")var ct=Nu;else if(Bu(L))if(ju)ct=H0;else{ct=O0;var Ce=L0}else U=L.nodeName,!U||U.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?R&&Kr(R.elementType)&&(ct=Nu):ct=_0;if(ct&&(ct=ct(e,R))){Uu(K,ct,n,Y);break e}Ce&&Ce(e,L,R),e==="focusout"&&R&&L.type==="number"&&R.memoizedProps.value!=null&&Qr(L,"number",L.value)}switch(Ce=R?se(R):window,e){case"focusin":(Bu(Ce)||Ce.contentEditable==="true")&&(Ol=Ce,rs=R,To=null);break;case"focusout":To=rs=Ol=null;break;case"mousedown":ss=!0;break;case"contextmenu":case"mouseup":case"dragend":ss=!1,Ku(K,n,Y);break;case"selectionchange":if(U0)break;case"keydown":case"keyup":Ku(K,n,Y)}var Ze;if(as)e:{switch(e){case"compositionstart":var tt="onCompositionStart";break e;case"compositionend":tt="onCompositionEnd";break e;case"compositionupdate":tt="onCompositionUpdate";break e}tt=void 0}else Ll?_u(e,n)&&(tt="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(tt="onCompositionStart");tt&&(Ru&&n.locale!=="ko"&&(Ll||tt!=="onCompositionStart"?tt==="onCompositionEnd"&&Ll&&(Ze=Mu()):(Ra=Y,Ir="value"in Ra?Ra.value:Ra.textContent,Ll=!0)),Ce=br(R,tt),0<Ce.length&&(tt=new Tu(tt,e,null,n,Y),K.push({event:tt,listeners:Ce}),Ze?tt.data=Ze:(Ze=Hu(n),Ze!==null&&(tt.data=Ze)))),(Ze=D0?A0(e,n):T0(e,n))&&(tt=br(R,"onBeforeInput"),0<tt.length&&(Ce=new Tu("onBeforeInput","beforeinput",null,n,Y),K.push({event:Ce,listeners:tt}),Ce.data=Ze)),xg(K,e,R,n,Y)}xh(K,t)})}function ei(e,t,n){return{instance:e,listener:t,currentTarget:n}}function br(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,o=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||o===null||(l=So(e,n),l!=null&&a.unshift(ei(e,l,o)),l=So(e,t),l!=null&&a.push(ei(e,l,o))),e.tag===3)return a;e=e.return}return[]}function kg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function wh(e,t,n,a,l){for(var o=t._reactName,u=[];n!==null&&n!==a;){var g=n,w=g.alternate,R=g.stateNode;if(g=g.tag,w!==null&&w===a)break;g!==5&&g!==26&&g!==27||R===null||(w=R,l?(R=So(n,o),R!=null&&u.unshift(ei(n,R,w))):l||(R=So(n,o),R!=null&&u.push(ei(n,R,w)))),n=n.return}u.length!==0&&e.push({event:t,listeners:u})}var zg=/\r\n?/g,Mg=/\u0000|\uFFFD/g;function Ch(e){return(typeof e=="string"?e:""+e).replace(zg,`
9
+ `).replace(Mg,"")}function kh(e,t){return t=Ch(t),Ch(e)===t}function Ct(e,t,n,a,l,o){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Tl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Tl(e,""+a);break;case"className":wi(e,"class",a);break;case"tabIndex":wi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":wi(e,n,a);break;case"style":Cu(e,a,o);break;case"data":if(t!=="object"){wi(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ki(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(n==="formAction"?(t!=="input"&&Ct(e,t,"name",l.name,l,null),Ct(e,t,"formEncType",l.formEncType,l,null),Ct(e,t,"formMethod",l.formMethod,l,null),Ct(e,t,"formTarget",l.formTarget,l,null)):(Ct(e,t,"encType",l.encType,l,null),Ct(e,t,"method",l.method,l,null),Ct(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ki(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=da);break;case"onScroll":a!=null&&Pe("scroll",e);break;case"onScrollEnd":a!=null&&Pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=ki(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Pe("beforetoggle",e),Pe("toggle",e),Si(e,"popover",a);break;case"xlinkActuate":ua(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ua(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ua(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ua(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ua(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ua(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ua(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ua(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ua(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Si(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=e0.get(n)||n,Si(e,n,a))}}function Oc(e,t,n,a,l,o){switch(n){case"style":Cu(e,a,o);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Tl(e,a):(typeof a=="number"||typeof a=="bigint")&&Tl(e,""+a);break;case"onScroll":a!=null&&Pe("scroll",e);break;case"onScrollEnd":a!=null&&Pe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ne.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),o=e[Gt]||null,o=o!=null?o[n]:null,typeof o=="function"&&e.removeEventListener(t,o,l),typeof a=="function")){typeof o!="function"&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,l);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):Si(e,n,a)}}}function rn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pe("error",e),Pe("load",e);var a=!1,l=!1,o;for(o in n)if(n.hasOwnProperty(o)){var u=n[o];if(u!=null)switch(o){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:Ct(e,t,o,u,n,null)}}l&&Ct(e,t,"srcSet",n.srcSet,n,null),a&&Ct(e,t,"src",n.src,n,null);return;case"input":Pe("invalid",e);var g=o=u=l=null,w=null,R=null;for(a in n)if(n.hasOwnProperty(a)){var Y=n[a];if(Y!=null)switch(a){case"name":l=Y;break;case"type":u=Y;break;case"checked":w=Y;break;case"defaultChecked":R=Y;break;case"value":o=Y;break;case"defaultValue":g=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(d(137,t));break;default:Ct(e,t,a,Y,n,null)}}vu(e,o,g,w,R,u,l,!1);return;case"select":Pe("invalid",e),a=u=o=null;for(l in n)if(n.hasOwnProperty(l)&&(g=n[l],g!=null))switch(l){case"value":o=g;break;case"defaultValue":u=g;break;case"multiple":a=g;default:Ct(e,t,l,g,n,null)}t=o,n=u,e.multiple=!!a,t!=null?Al(e,!!a,t,!1):n!=null&&Al(e,!!a,n,!0);return;case"textarea":Pe("invalid",e),o=l=a=null;for(u in n)if(n.hasOwnProperty(u)&&(g=n[u],g!=null))switch(u){case"value":a=g;break;case"defaultValue":l=g;break;case"children":o=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(d(91));break;default:Ct(e,t,u,g,n,null)}Su(e,a,l,o);return;case"option":for(w in n)n.hasOwnProperty(w)&&(a=n[w],a!=null)&&(w==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ct(e,t,w,a,n,null));return;case"dialog":Pe("beforetoggle",e),Pe("toggle",e),Pe("cancel",e),Pe("close",e);break;case"iframe":case"object":Pe("load",e);break;case"video":case"audio":for(a=0;a<Po.length;a++)Pe(Po[a],e);break;case"image":Pe("error",e),Pe("load",e);break;case"details":Pe("toggle",e);break;case"embed":case"source":case"link":Pe("error",e),Pe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in n)if(n.hasOwnProperty(R)&&(a=n[R],a!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:Ct(e,t,R,a,n,null)}return;default:if(Kr(t)){for(Y in n)n.hasOwnProperty(Y)&&(a=n[Y],a!==void 0&&Oc(e,t,Y,a,n,void 0));return}}for(g in n)n.hasOwnProperty(g)&&(a=n[g],a!=null&&Ct(e,t,g,a,n,null))}function Dg(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,o=null,u=null,g=null,w=null,R=null,Y=null;for(U in n){var K=n[U];if(n.hasOwnProperty(U)&&K!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":w=K;default:a.hasOwnProperty(U)||Ct(e,t,U,null,a,K)}}for(var L in a){var U=a[L];if(K=n[L],a.hasOwnProperty(L)&&(U!=null||K!=null))switch(L){case"type":o=U;break;case"name":l=U;break;case"checked":R=U;break;case"defaultChecked":Y=U;break;case"value":u=U;break;case"defaultValue":g=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(d(137,t));break;default:U!==K&&Ct(e,t,L,U,a,K)}}Fr(e,u,g,w,R,Y,o,l);return;case"select":U=u=g=L=null;for(o in n)if(w=n[o],n.hasOwnProperty(o)&&w!=null)switch(o){case"value":break;case"multiple":U=w;default:a.hasOwnProperty(o)||Ct(e,t,o,null,a,w)}for(l in a)if(o=a[l],w=n[l],a.hasOwnProperty(l)&&(o!=null||w!=null))switch(l){case"value":L=o;break;case"defaultValue":g=o;break;case"multiple":u=o;default:o!==w&&Ct(e,t,l,o,a,w)}t=g,n=u,a=U,L!=null?Al(e,!!n,L,!1):!!a!=!!n&&(t!=null?Al(e,!!n,t,!0):Al(e,!!n,n?[]:"",!1));return;case"textarea":U=L=null;for(g in n)if(l=n[g],n.hasOwnProperty(g)&&l!=null&&!a.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:Ct(e,t,g,null,a,l)}for(u in a)if(l=a[u],o=n[u],a.hasOwnProperty(u)&&(l!=null||o!=null))switch(u){case"value":L=l;break;case"defaultValue":U=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(d(91));break;default:l!==o&&Ct(e,t,u,l,a,o)}xu(e,L,U);return;case"option":for(var ye in n)L=n[ye],n.hasOwnProperty(ye)&&L!=null&&!a.hasOwnProperty(ye)&&(ye==="selected"?e.selected=!1:Ct(e,t,ye,null,a,L));for(w in a)L=a[w],U=n[w],a.hasOwnProperty(w)&&L!==U&&(L!=null||U!=null)&&(w==="selected"?e.selected=L&&typeof L!="function"&&typeof L!="symbol":Ct(e,t,w,L,a,U));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 Le in n)L=n[Le],n.hasOwnProperty(Le)&&L!=null&&!a.hasOwnProperty(Le)&&Ct(e,t,Le,null,a,L);for(R in a)if(L=a[R],U=n[R],a.hasOwnProperty(R)&&L!==U&&(L!=null||U!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(d(137,t));break;default:Ct(e,t,R,L,a,U)}return;default:if(Kr(t)){for(var kt in n)L=n[kt],n.hasOwnProperty(kt)&&L!==void 0&&!a.hasOwnProperty(kt)&&Oc(e,t,kt,void 0,a,L);for(Y in a)L=a[Y],U=n[Y],!a.hasOwnProperty(Y)||L===U||L===void 0&&U===void 0||Oc(e,t,Y,L,a,U);return}}for(var M in n)L=n[M],n.hasOwnProperty(M)&&L!=null&&!a.hasOwnProperty(M)&&Ct(e,t,M,null,a,L);for(K in a)L=a[K],U=n[K],!a.hasOwnProperty(K)||L===U||L==null&&U==null||Ct(e,t,K,L,a,U)}function zh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ag(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var l=n[a],o=l.transferSize,u=l.initiatorType,g=l.duration;if(o&&g&&zh(u)){for(u=0,g=l.responseEnd,a+=1;a<n.length;a++){var w=n[a],R=w.startTime;if(R>g)break;var Y=w.transferSize,K=w.initiatorType;Y&&zh(K)&&(w=w.responseEnd,u+=Y*(w<g?1:(g-R)/(w-R)))}if(--a,t+=8*(o+u)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var _c=null,Hc=null;function vr(e){return e.nodeType===9?e:e.ownerDocument}function Mh(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 Dh(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 Bc(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 Uc=null;function Tg(){var e=window.event;return e&&e.type==="popstate"?e===Uc?!1:(Uc=e,!0):(Uc=null,!1)}var Ah=typeof setTimeout=="function"?setTimeout:void 0,Eg=typeof clearTimeout=="function"?clearTimeout:void 0,Th=typeof Promise=="function"?Promise:void 0,Rg=typeof queueMicrotask=="function"?queueMicrotask:typeof Th<"u"?function(e){return Th.resolve(null).then(e).catch(Lg)}:Ah;function Lg(e){setTimeout(function(){throw e})}function Za(e){return e==="head"}function Eh(e,t){var n=t,a=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(l),io(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")ti(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ti(n);for(var o=n.firstChild;o;){var u=o.nextSibling,g=o.nodeName;o[ol]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=u}}else n==="body"&&ti(e.ownerDocument.body);n=l}while(n);io(t)}function Rh(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Nc(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":Nc(n),vo(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Og(e,t,n,a){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[ol])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=Fn(e.nextSibling),e===null)break}return null}function _g(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Fn(e.nextSibling),e===null))return null;return e}function Lh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Fn(e.nextSibling),e===null))return null;return e}function jc(e){return e.data==="$?"||e.data==="$~"}function qc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Hg(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Fn(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 Yc=null;function Oh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Fn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function _h(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Hh(e,t,n){switch(t=vr(n),e){case"html":if(e=t.documentElement,!e)throw Error(d(452));return e;case"head":if(e=t.head,!e)throw Error(d(453));return e;case"body":if(e=t.body,!e)throw Error(d(454));return e;default:throw Error(d(451))}}function ti(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);vo(e)}var Qn=new Map,Bh=new Set;function xr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Da=Z.d;Z.d={f:Bg,r:Ug,D:Ng,C:jg,L:qg,m:Yg,X:Xg,S:Gg,M:Vg};function Bg(){var e=Da.f(),t=dr();return e||t}function Ug(e){var t=pe(e);t!==null&&t.tag===5&&t.type==="form"?Id(t):Da.r(e)}var ao=typeof document>"u"?null:document;function Uh(e,t,n){var a=ao;if(a&&typeof t=="string"&&t){var l=Nn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Bh.has(l)||(Bh.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),rn(t,"link",e),ve(t),a.head.appendChild(t)))}}function Ng(e){Da.D(e),Uh("dns-prefetch",e,null)}function jg(e,t){Da.C(e,t),Uh("preconnect",e,t)}function qg(e,t,n){Da.L(e,t,n);var a=ao;if(a&&e&&t){var l='link[rel="preload"][as="'+Nn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Nn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Nn(n.imageSizes)+'"]')):l+='[href="'+Nn(e)+'"]';var o=l;switch(t){case"style":o=lo(e);break;case"script":o=oo(e)}Qn.has(o)||(e=z({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Qn.set(o,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(ni(o))||t==="script"&&a.querySelector(ai(o))||(t=a.createElement("link"),rn(t,"link",e),ve(t),a.head.appendChild(t)))}}function Yg(e,t){Da.m(e,t);var n=ao;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Nn(a)+'"][href="'+Nn(e)+'"]',o=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=oo(e)}if(!Qn.has(o)&&(e=z({rel:"modulepreload",href:e},t),Qn.set(o,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ai(o)))return}a=n.createElement("link"),rn(a,"link",e),ve(a),n.head.appendChild(a)}}}function Gg(e,t,n){Da.S(e,t,n);var a=ao;if(a&&e){var l=be(a).hoistableStyles,o=lo(e);t=t||"default";var u=l.get(o);if(!u){var g={loading:0,preload:null};if(u=a.querySelector(ni(o)))g.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Qn.get(o))&&Gc(e,n);var w=u=a.createElement("link");ve(w),rn(w,"link",e),w._p=new Promise(function(R,Y){w.onload=R,w.onerror=Y}),w.addEventListener("load",function(){g.loading|=1}),w.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Sr(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:g},l.set(o,u)}}}function Xg(e,t){Da.X(e,t);var n=ao;if(n&&e){var a=be(n).hoistableScripts,l=oo(e),o=a.get(l);o||(o=n.querySelector(ai(l)),o||(e=z({src:e,async:!0},t),(t=Qn.get(l))&&Xc(e,t),o=n.createElement("script"),ve(o),rn(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Vg(e,t){Da.M(e,t);var n=ao;if(n&&e){var a=be(n).hoistableScripts,l=oo(e),o=a.get(l);o||(o=n.querySelector(ai(l)),o||(e=z({src:e,async:!0,type:"module"},t),(t=Qn.get(l))&&Xc(e,t),o=n.createElement("script"),ve(o),rn(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Nh(e,t,n,a){var l=(l=Me.current)?xr(l):null;if(!l)throw Error(d(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=lo(n.href),n=be(l).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=lo(n.href);var o=be(l).hoistableStyles,u=o.get(e);if(u||(l=l.ownerDocument||l,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,u),(o=l.querySelector(ni(e)))&&!o._p&&(u.instance=o,u.state.loading=5),Qn.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},Qn.set(e,n),o||Fg(l,e,n,u.state))),t&&a===null)throw Error(d(528,""));return u}if(t&&a!==null)throw Error(d(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=oo(n),n=be(l).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,e))}}function lo(e){return'href="'+Nn(e)+'"'}function ni(e){return'link[rel="stylesheet"]['+e+"]"}function jh(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function Fg(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),rn(t,"link",n),ve(t),e.head.appendChild(t))}function oo(e){return'[src="'+Nn(e)+'"]'}function ai(e){return"script[async]"+e}function qh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Nn(n.href)+'"]');if(a)return t.instance=a,ve(a),a;var l=z({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ve(a),rn(a,"style",l),Sr(a,n.precedence,e),t.instance=a;case"stylesheet":l=lo(n.href);var o=e.querySelector(ni(l));if(o)return t.state.loading|=4,t.instance=o,ve(o),o;a=jh(n),(l=Qn.get(l))&&Gc(a,l),o=(e.ownerDocument||e).createElement("link"),ve(o);var u=o;return u._p=new Promise(function(g,w){u.onload=g,u.onerror=w}),rn(o,"link",a),t.state.loading|=4,Sr(o,n.precedence,e),t.instance=o;case"script":return o=oo(n.src),(l=e.querySelector(ai(o)))?(t.instance=l,ve(l),l):(a=n,(l=Qn.get(o))&&(a=z({},n),Xc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),ve(l),rn(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(d(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Sr(a,n.precedence,e));return t.instance}function Sr(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,o=l,u=0;u<a.length;u++){var g=a[u];if(g.dataset.precedence===t)o=g;else if(o!==l)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Gc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var wr=null;function Yh(e,t,n){if(wr===null){var a=new Map,l=wr=new Map;l.set(n,a)}else l=wr,a=l.get(n),a||(a=new Map,l.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var o=n[l];if(!(o[ol]||o[Lt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var u=o.getAttribute(t)||"";u=e+u;var g=a.get(u);g?g.push(o):a.set(u,[o])}}return a}function Gh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Qg(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 Xh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Kg(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=lo(a.href),o=t.querySelector(ni(l));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Cr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,ve(o);return}o=t.ownerDocument||t,a=jh(a),(l=Qn.get(l))&&Gc(a,l),o=o.createElement("link"),ve(o);var u=o;u._p=new Promise(function(g,w){u.onload=g,u.onerror=w}),rn(o,"link",a),n.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Cr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Vc=0;function Zg(e,t){return e.stylesheets&&e.count===0&&zr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&zr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Vc===0&&(Vc=62500*Ag());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&zr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Vc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function Cr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var kr=null;function zr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,kr=new Map,t.forEach(Jg,e),kr=null,Cr.call(e))}function Jg(e,t){if(!(t.state.loading&4)){var n=kr.get(e);if(n)var a=n.get(null);else{n=new Map,kr.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<l.length;o++){var u=l[o];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(n.set(u.dataset.precedence,u),a=u)}a&&n.set(null,a)}l=t.instance,u=l.getAttribute("data-precedence"),o=n.get(u)||a,o===a&&n.set(null,l),n.set(u,l),this.count++,a=Cr.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),o?o.parentNode.insertBefore(l,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var li={$$typeof:Q,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Wg(e,t,n,a,l,o,u,g,w){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=Bn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bn(0),this.hiddenUpdates=Bn(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=o,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function Vh(e,t,n,a,l,o,u,g,w,R,Y,K){return e=new Wg(e,t,n,u,w,R,Y,K,g),t=1,o===!0&&(t|=24),o=An(3,null,null,t),e.current=o,o.stateNode=e,t=Cs(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:a,isDehydrated:n,cache:t},Ds(o),e}function Fh(e){return e?(e=Bl,e):Bl}function Qh(e,t,n,a,l,o){l=Fh(l),a.context===null?a.context=l:a.pendingContext=l,a=Ua(t),a.payload={element:n},o=o===void 0?null:o,o!==null&&(a.callback=o),n=Na(e,a,t),n!==null&&(wn(n,e,t),Bo(n,e,t))}function Kh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Fc(e,t){Kh(e,t),(e=e.alternate)&&Kh(e,t)}function Zh(e){if(e.tag===13||e.tag===31){var t=cl(e,67108864);t!==null&&wn(t,e,67108864),Fc(e,67108864)}}function Jh(e){if(e.tag===13||e.tag===31){var t=On();t=sa(t);var n=cl(e,t);n!==null&&wn(n,e,t),Fc(e,t)}}var Mr=!0;function $g(e,t,n,a){var l=T.T;T.T=null;var o=Z.p;try{Z.p=2,Qc(e,t,n,a)}finally{Z.p=o,T.T=l}}function Ig(e,t,n,a){var l=T.T;T.T=null;var o=Z.p;try{Z.p=8,Qc(e,t,n,a)}finally{Z.p=o,T.T=l}}function Qc(e,t,n,a){if(Mr){var l=Kc(a);if(l===null)Lc(e,t,a,Dr,n),$h(e,a);else if(em(l,e,t,n,a))a.stopPropagation();else if($h(e,a),t&4&&-1<Pg.indexOf(e)){for(;l!==null;){var o=pe(l);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var u=Qe(o.pendingLanes);if(u!==0){var g=o;for(g.pendingLanes|=2,g.entangledLanes|=2;u;){var w=1<<31-bt(u);g.entanglements[1]|=w,u&=~w}na(o),(dt&6)===0&&(cr=yt()+500,Io(0))}}break;case 31:case 13:g=cl(o,2),g!==null&&wn(g,o,2),dr(),Fc(o,2)}if(o=Kc(a),o===null&&Lc(e,t,a,Dr,n),o===l)break;l=o}l!==null&&a.stopPropagation()}else Lc(e,t,a,null,n)}}function Kc(e){return e=Jr(e),Zc(e)}var Dr=null;function Zc(e){if(Dr=null,e=ca(e),e!==null){var t=p(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=C(t),e!==null)return e;e=null}else if(n===31){if(e=D(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Dr=e,null}function Wh(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(hn()){case Hn:return 2;case kn:return 8;case mn:case W:return 32;case ue:return 268435456;default:return 32}default:return 32}}var Jc=!1,Ja=null,Wa=null,$a=null,oi=new Map,ii=new Map,Ia=[],Pg="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 $h(e,t){switch(e){case"focusin":case"focusout":Ja=null;break;case"dragenter":case"dragleave":Wa=null;break;case"mouseover":case"mouseout":$a=null;break;case"pointerover":case"pointerout":oi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ii.delete(t.pointerId)}}function ri(e,t,n,a,l,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:o,targetContainers:[l]},t!==null&&(t=pe(t),t!==null&&Zh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function em(e,t,n,a,l){switch(t){case"focusin":return Ja=ri(Ja,e,t,n,a,l),!0;case"dragenter":return Wa=ri(Wa,e,t,n,a,l),!0;case"mouseover":return $a=ri($a,e,t,n,a,l),!0;case"pointerover":var o=l.pointerId;return oi.set(o,ri(oi.get(o)||null,e,t,n,a,l)),!0;case"gotpointercapture":return o=l.pointerId,ii.set(o,ri(ii.get(o)||null,e,t,n,a,l)),!0}return!1}function Ih(e){var t=ca(e.target);if(t!==null){var n=p(t);if(n!==null){if(t=n.tag,t===13){if(t=C(n),t!==null){e.blockedOn=t,Kn(e.priority,function(){Jh(n)});return}}else if(t===31){if(t=D(n),t!==null){e.blockedOn=t,Kn(e.priority,function(){Jh(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 Ar(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Zr=a,n.target.dispatchEvent(a),Zr=null}else return t=pe(n),t!==null&&Zh(t),e.blockedOn=n,!1;t.shift()}return!0}function Ph(e,t,n){Ar(e)&&n.delete(t)}function tm(){Jc=!1,Ja!==null&&Ar(Ja)&&(Ja=null),Wa!==null&&Ar(Wa)&&(Wa=null),$a!==null&&Ar($a)&&($a=null),oi.forEach(Ph),ii.forEach(Ph)}function Tr(e,t){e.blockedOn===t&&(e.blockedOn=null,Jc||(Jc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,tm)))}var Er=null;function ep(e){Er!==e&&(Er=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Er===e&&(Er=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(Zc(a||n)===null)continue;break}var o=pe(n);o!==null&&(e.splice(t,3),t-=3,Ks(o,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function io(e){function t(w){return Tr(w,e)}Ja!==null&&Tr(Ja,e),Wa!==null&&Tr(Wa,e),$a!==null&&Tr($a,e),oi.forEach(t),ii.forEach(t);for(var n=0;n<Ia.length;n++){var a=Ia[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ia.length&&(n=Ia[0],n.blockedOn===null);)Ih(n),n.blockedOn===null&&Ia.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],o=n[a+1],u=l[Gt]||null;if(typeof o=="function")u||ep(n);else if(u){var g=null;if(o&&o.hasAttribute("formAction")){if(l=o,u=o[Gt]||null)g=u.formAction;else if(Zc(l)!==null)continue}else g=u.action;typeof g=="function"?n[a+1]=g:(n.splice(a,3),a-=3),ep(n)}}}function tp(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(u){return l=u})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function Wc(e){this._internalRoot=e}Rr.prototype.render=Wc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var n=t.current,a=On();Qh(n,a,e,t,null,null)},Rr.prototype.unmount=Wc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qh(e.current,2,null,e,null,null),dr(),t[Mn]=null}};function Rr(e){this._internalRoot=e}Rr.prototype.unstable_scheduleHydration=function(e){if(e){var t=xi();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ia.length&&t!==0&&t<Ia[n].priority;n++);Ia.splice(n,0,e),n===0&&Ih(e)}};var np=c.version;if(np!=="19.2.4")throw Error(d(527,np,"19.2.4"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(d(188)):(e=Object.keys(e).join(","),Error(d(268,e)));return e=y(t),e=e!==null?A(e):null,e=e===null?null:e.stateNode,e};var nm={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lr.isDisabled&&Lr.supportsFiber)try{Ue=Lr.inject(nm),De=Lr}catch{}}return ui.createRoot=function(e,t){if(!h(e))throw Error(d(299));var n=!1,a="",l=cf,o=uf,u=df;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Vh(e,1,!1,null,null,n,a,null,l,o,u,tp),e[Mn]=t.current,Rc(e),new Wc(t)},ui.hydrateRoot=function(e,t,n){if(!h(e))throw Error(d(299));var a=!1,l="",o=cf,u=uf,g=df,w=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(u=n.onCaughtError),n.onRecoverableError!==void 0&&(g=n.onRecoverableError),n.formState!==void 0&&(w=n.formState)),t=Vh(e,1,!0,t,n??null,a,l,w,o,u,g,tp),t.context=Fh(null),n=t.current,a=On(),a=sa(a),l=Ua(a),l.callback=null,Na(n,l,a),n=a,t.current.lanes=n,Ut(t,n),na(t),e[Mn]=t.current,Rc(e),new Rr(t)},ui.version="19.2.4",ui}var wp;function s1(){if(wp)return nu.exports;wp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),nu.exports=r1(),nu.exports}var c1=s1(),Cp=function(c,f){var d=arguments;if(f==null||!yi.call(f,"css"))return v.createElement.apply(void 0,d);var h=d.length,p=new Array(h);p[0]=mu,p[1]=gu(c,f);for(var C=2;C<h;C++)p[C]=d[C];return v.createElement.apply(null,p)};(function(i){var c;c||(c=i.JSX||(i.JSX={}))})(Cp||(Cp={}));function m(){for(var i=arguments.length,c=new Array(i),f=0;f<i;f++)c[f]=arguments[f];return Yp(c)}function Ft(){var i=m.apply(void 0,arguments),c="animation-"+i.name;return{name:c,styles:"@keyframes "+c+"{"+i.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const u1={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0},d1={isOpen:!1,openStudio:()=>{},closeStudio:()=>{},toggleStudio:()=>{},currentPath:"public",setCurrentPath:()=>{},navigateUp:()=>{},selectedItems:new Set,toggleSelection:()=>{},selectRange:()=>{},selectAll:()=>{},clearSelection:()=>{},lastSelectedPath:null,viewMode:"grid",setViewMode:()=>{},focusedItem:null,setFocusedItem:()=>{},meta:null,setMeta:()=>{},isLoading:!1,setIsLoading:()=>{},refreshKey:0,triggerRefresh:()=>{},editedImageKey:null,setEditedImageKey:()=>{},scanRequested:!1,triggerScan:()=>{},clearScanRequest:()=>{},searchQuery:"",setSearchQuery:()=>{},error:null,showError:()=>{},clearError:()=>{},fileItems:[],setFileItems:()=>{},actionState:u1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Xp=v.createContext(d1);function po(){return v.useContext(Xp)}const kl="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",s={primary:"#635bff",primaryHover:"#5851e5",primaryLight:"#f0f0ff",background:"#f6f9fc",surface:"#ffffff",surfaceHover:"#f6f9fc",border:"#d8dee4",borderLight:"#e3e8ee",borderHover:"#c1c9d2",text:"#1a1f36",textSecondary:"#697386",textMuted:"#8792a2",success:"#0d7d4d",successLight:"#e6f7ef",danger:"#df1b41",dangerHover:"#c41535",dangerLight:"#fff5f7",imagesFolder:"#8b5cf6",hover:"#e8ecf0"},N={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},ll=m("font-family:",kl,";font-size:",N.base,";line-height:1.5;color:",s.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;}",""),f1=Ft`
10
10
  from { opacity: 0; }
11
11
  to { opacity: 1; }
12
12
  `,h1=Ft`
@@ -21,9 +21,9 @@ Error generating stack: `+a.message+`
21
21
  `,p1=Ft`
22
22
  from { transform: rotate(0deg); }
23
23
  to { transform: rotate(360deg); }
24
- `,He={overlay:m("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:",f1," 0.15s ease-out;font-family:",kl,";",""),modal:m(ll," background-color:",s.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:",h1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:m("font-size:",N.base,";color:",s.textSecondary,";margin:0;line-height:1.6;",""),footer:m("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:m("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:m("background-color:",s.surface,";border:1px solid ",s.border,";color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),btnConfirm:m("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover{background-color:",s.primaryHover,";border-color:",s.primaryHover,";}",""),btnDanger:m("background-color:",s.danger,";border:1px solid ",s.danger,";color:white;&:hover{background-color:",s.dangerHover,";border-color:",s.dangerHover,";}","")};function fo({title:i,message:c,confirmLabel:f="Confirm",cancelLabel:d="Cancel",variant:h="default",onConfirm:p,onCancel:C}){return r("div",{css:He.overlay,onClick:C,children:b("div",{css:He.modal,onClick:D=>D.stopPropagation(),children:[r("div",{css:He.header,children:r("h3",{css:He.title,children:i})}),r("div",{css:He.body,children:r("p",{css:He.message,children:c})}),b("div",{css:He.footer,children:[r("button",{css:[He.btn,He.btnCancel,"",""],onClick:C,children:d}),r("button",{css:[He.btn,h==="danger"?He.btnDanger:He.btnConfirm,"",""],onClick:p,children:f})]})]})})}const g1={input:m("width:100%;padding:10px 12px;font-size:",N.base,";border:1px solid ",s.border,";border-radius:6px;background:",s.surface,";color:",s.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 2px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}","")};function Cl({title:i,message:c,inputLabel:f,defaultValue:d="",placeholder:h,confirmLabel:p="Confirm",cancelLabel:C="Cancel",isLoading:D=!1,loadingLabel:x="Processing...",onConfirm:y,onCancel:A}){const[z,_]=pt.useState(d),q=H=>{H.preventDefault(),z.trim()&&!D&&y(z.trim())};return r("div",{css:He.overlay,onClick:D?void 0:A,children:r("div",{css:He.modal,onClick:H=>H.stopPropagation(),children:b("form",{onSubmit:q,children:[r("div",{css:He.header,children:r("h3",{css:He.title,children:i})}),b("div",{css:He.body,children:[c&&r("p",{css:He.message,children:c}),f&&r("label",{css:He.message,children:f}),r("input",{css:g1.input,type:"text",value:z,onChange:H=>_(H.target.value),placeholder:h,autoFocus:!0,disabled:D})]}),b("div",{css:He.footer,children:[r("button",{type:"button",css:[He.btn,He.btnCancel,"",""],onClick:A,disabled:D,children:C}),r("button",{type:"submit",css:[He.btn,He.btnConfirm,"",""],disabled:!z.trim()||D,children:D?b(tt,{children:[r("span",{css:m("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",p1," 0.75s linear infinite;margin-right:6px;","")}),x]}):p})]})]})})})}function Gr({title:i,message:c,buttonLabel:f="OK",onClose:d}){return r("div",{css:He.overlay,onClick:d,children:b("div",{css:He.modal,onClick:h=>h.stopPropagation(),children:[r("div",{css:He.header,children:r("h3",{css:He.title,children:i})}),r("div",{css:He.body,children:r("p",{css:He.message,children:c})}),r("div",{css:He.footer,children:r("button",{css:[He.btn,He.btnConfirm,"",""],onClick:d,children:f})})]})})}const el={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:m("width:100%;height:8px;background-color:",s.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:m("height:100%;background:linear-gradient(90deg, ",s.primary,", ",s.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:m("font-size:",N.sm,";color:",s.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:m("font-size:",N.xs,";color:",s.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:m("font-size:",N.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function al({title:i,progress:c,onClose:f,onDeleteOrphans:d,onStop:h}){const p=c.status==="complete",C=c.status==="error",D=c.status==="stopped",x=c.status==="stopping",y=p||C||D,A=!y||x;return r("div",{css:He.overlay,children:b("div",{css:He.modal,onClick:z=>z.stopPropagation(),children:[r("div",{css:He.header,children:r("h3",{css:He.title,children:i})}),r("div",{css:He.body,children:C?r("p",{css:He.message,children:c.message||"An error occurred"}):D?b("p",{css:He.message,children:["Processing stopped. Processed ",c.processed??c.current," image",(c.processed??c.current)!==1?"s":""," before stopping."]}):p?b(tt,{children:[b("p",{css:He.message,children:[c.message?c.message:c.isDelete?b(tt,{children:["Deleted ",c.processed," file",c.processed!==1?"s":"",".",c.errors!==void 0&&c.errors>0?b(tt,{children:[" ",c.errors," error",c.errors!==1?"s":""," occurred."]}):null]}):c.isMove?b(tt,{children:["Moved ",c.processed," file",c.processed!==1?"s":"",".",c.errors!==void 0&&c.errors>0?b(tt,{children:[" ",c.errors," error",c.errors!==1?"s":""," occurred."]}):null]}):c.isScan?b(tt,{children:[c.alreadyProcessed!==void 0&&c.alreadyProcessed>0?b(tt,{children:[c.alreadyProcessed," image",c.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",c.processed," new image",c.processed!==1?"s":"",".",c.orphanedEntries!==void 0&&c.orphanedEntries>0?b(tt,{children:[" Removed ",c.orphanedEntries," orphaned entr",c.orphanedEntries!==1?"ies":"y","."]}):null,c.pendingUpdates!==void 0&&c.pendingUpdates>0?b(tt,{children:[" ",c.pendingUpdates," file",c.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):b(tt,{children:["Processed ",c.processed," new image",c.processed!==1?"s":"",".",c.alreadyProcessed!==void 0&&c.alreadyProcessed>0?b(tt,{children:[" ",c.alreadyProcessed," already processed."]}):null]}),c.orphansRemoved!==void 0&&c.orphansRemoved>0?b(tt,{children:[" Removed ",c.orphansRemoved," orphaned thumbnail",c.orphansRemoved!==1?"s":"","."]}):null]}),c.errorMessages&&c.errorMessages.length>0&&b("div",{css:el.errorList,children:[c.errorMessages.slice(0,10).map((z,_)=>r("p",{css:el.errorItem,children:z},_)),c.errorMessages.length>10&&b("p",{css:el.errorItem,children:["...and ",c.errorMessages.length-10," more"]})]})]}):b(tt,{children:[r("p",{css:He.message,children:c.status==="cleanup"?c.message||"Cleaning up...":c.message||"Processing..."}),b("div",{css:el.progressContainer,children:[r("div",{css:el.progressBar,children:r("div",{css:el.progressFill,style:{width:`${c.percent}%`}})}),b("div",{css:el.progressText,children:[b("span",{children:[c.current," of ",c.total]}),b("span",{children:[c.percent,"%"]})]}),c.currentFile&&r("p",{css:el.currentFile,title:c.currentFile,children:c.currentFile})]})]})}),b("div",{css:He.footer,children:[A&&h&&r("button",{css:[He.btn,He.btnDanger,"",""],onClick:h,disabled:c.status==="stopping",children:c.status==="stopping"?"Stopping...":"Stop"}),y&&c.orphanedFiles&&c.orphanedFiles.length>0&&d&&b("button",{css:[He.btn,He.btnDanger,"",""],onClick:d,children:["Delete ",c.orphanedFiles.length," Orphan",c.orphanedFiles.length!==1?"s":""]}),y&&r("button",{css:[He.btn,He.btnConfirm,"",""],onClick:f,children:"Done"})]})]})})}function Vp(i){const{setShowProgress:c,setProgressTitle:f,setProgressState:d,triggerRefresh:h}=i,p=v.useRef(null),C=v.useRef(!1),D=v.useRef(!1),x=v.useRef(null),y=v.useCallback(()=>{p.current&&p.current.abort()},[]);return{execute:v.useCallback(async z=>{const{endpoint:_,body:q,title:H,operationType:G,onComplete:oe,onError:J}=z;if(C.current){console.warn("Streaming operation already in progress");return}C.current=!0,D.current=!1;const Q=`${_.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;x.current=Q;const le=new AbortController;p.current=le;const X=async()=>{D.current=!0,d(P=>({...P,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:Q})})}catch{}};le.signal.addEventListener("abort",X),f(H),c(!0),d({current:0,total:0,percent:0,status:"processing",message:`Starting ${H.toLowerCase()}...`});try{const P=await fetch(_,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...q,operationId:Q})});if(!P.ok){const W=await P.json().catch(()=>({}));throw new Error(W.error||`Request failed: ${P.status}`)}if(!P.body)throw new Error("No response body");const te=P.body.getReader(),ae=new TextDecoder;let j="";try{for(;;){const{done:W,value:he}=await te.read();if(W)break;j+=ae.decode(he,{stream:!0});const me=j.split(`
24
+ `,Be={overlay:m("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:",f1," 0.15s ease-out;font-family:",kl,";",""),modal:m(ll," background-color:",s.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:",h1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:m("font-size:",N.base,";color:",s.textSecondary,";margin:0;line-height:1.6;",""),footer:m("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:m("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:m("background-color:",s.surface,";border:1px solid ",s.border,";color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),btnConfirm:m("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover{background-color:",s.primaryHover,";border-color:",s.primaryHover,";}",""),btnDanger:m("background-color:",s.danger,";border:1px solid ",s.danger,";color:white;&:hover{background-color:",s.dangerHover,";border-color:",s.dangerHover,";}","")};function fo({title:i,message:c,confirmLabel:f="Confirm",cancelLabel:d="Cancel",variant:h="default",onConfirm:p,onCancel:C}){return r("div",{css:Be.overlay,onClick:C,children:b("div",{css:Be.modal,onClick:D=>D.stopPropagation(),children:[r("div",{css:Be.header,children:r("h3",{css:Be.title,children:i})}),r("div",{css:Be.body,children:r("p",{css:Be.message,children:c})}),b("div",{css:Be.footer,children:[r("button",{css:[Be.btn,Be.btnCancel,"",""],onClick:C,children:d}),r("button",{css:[Be.btn,h==="danger"?Be.btnDanger:Be.btnConfirm,"",""],onClick:p,children:f})]})]})})}const g1={input:m("width:100%;padding:10px 12px;font-size:",N.base,";border:1px solid ",s.border,";border-radius:6px;background:",s.surface,";color:",s.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 2px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}","")};function Cl({title:i,message:c,inputLabel:f,defaultValue:d="",placeholder:h,confirmLabel:p="Confirm",cancelLabel:C="Cancel",isLoading:D=!1,loadingLabel:x="Processing...",onConfirm:y,onCancel:A}){const[z,_]=gt.useState(d),q=H=>{H.preventDefault(),z.trim()&&!D&&y(z.trim())};return r("div",{css:Be.overlay,onClick:D?void 0:A,children:r("div",{css:Be.modal,onClick:H=>H.stopPropagation(),children:b("form",{onSubmit:q,children:[r("div",{css:Be.header,children:r("h3",{css:Be.title,children:i})}),b("div",{css:Be.body,children:[c&&r("p",{css:Be.message,children:c}),f&&r("label",{css:Be.message,children:f}),r("input",{css:g1.input,type:"text",value:z,onChange:H=>_(H.target.value),placeholder:h,autoFocus:!0,disabled:D})]}),b("div",{css:Be.footer,children:[r("button",{type:"button",css:[Be.btn,Be.btnCancel,"",""],onClick:A,disabled:D,children:C}),r("button",{type:"submit",css:[Be.btn,Be.btnConfirm,"",""],disabled:!z.trim()||D,children:D?b(nt,{children:[r("span",{css:m("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",p1," 0.75s linear infinite;margin-right:6px;","")}),x]}):p})]})]})})})}function Gr({title:i,message:c,buttonLabel:f="OK",onClose:d}){return r("div",{css:Be.overlay,onClick:d,children:b("div",{css:Be.modal,onClick:h=>h.stopPropagation(),children:[r("div",{css:Be.header,children:r("h3",{css:Be.title,children:i})}),r("div",{css:Be.body,children:r("p",{css:Be.message,children:c})}),r("div",{css:Be.footer,children:r("button",{css:[Be.btn,Be.btnConfirm,"",""],onClick:d,children:f})})]})})}const el={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:m("width:100%;height:8px;background-color:",s.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:m("height:100%;background:linear-gradient(90deg, ",s.primary,", ",s.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:m("font-size:",N.sm,";color:",s.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:m("font-size:",N.xs,";color:",s.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:m("font-size:",N.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function al({title:i,progress:c,onClose:f,onDeleteOrphans:d,onStop:h}){const p=c.status==="complete",C=c.status==="error",D=c.status==="stopped",x=c.status==="stopping",y=p||C||D,A=!y||x;return r("div",{css:Be.overlay,children:b("div",{css:Be.modal,onClick:z=>z.stopPropagation(),children:[r("div",{css:Be.header,children:r("h3",{css:Be.title,children:i})}),r("div",{css:Be.body,children:C?r("p",{css:Be.message,children:c.message||"An error occurred"}):D?b("p",{css:Be.message,children:["Processing stopped. Processed ",c.processed??c.current," image",(c.processed??c.current)!==1?"s":""," before stopping."]}):p?b(nt,{children:[b("p",{css:Be.message,children:[c.message?c.message:c.isDelete?b(nt,{children:["Deleted ",c.processed," file",c.processed!==1?"s":"",".",c.errors!==void 0&&c.errors>0?b(nt,{children:[" ",c.errors," error",c.errors!==1?"s":""," occurred."]}):null]}):c.isMove?b(nt,{children:["Moved ",c.processed," file",c.processed!==1?"s":"",".",c.errors!==void 0&&c.errors>0?b(nt,{children:[" ",c.errors," error",c.errors!==1?"s":""," occurred."]}):null]}):c.isScan?b(nt,{children:[c.alreadyProcessed!==void 0&&c.alreadyProcessed>0?b(nt,{children:[c.alreadyProcessed," image",c.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",c.processed," new image",c.processed!==1?"s":"",".",c.orphanedEntries!==void 0&&c.orphanedEntries>0?b(nt,{children:[" Removed ",c.orphanedEntries," orphaned entr",c.orphanedEntries!==1?"ies":"y","."]}):null,c.pendingUpdates!==void 0&&c.pendingUpdates>0?b(nt,{children:[" ",c.pendingUpdates," file",c.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):b(nt,{children:["Processed ",c.processed," new image",c.processed!==1?"s":"",".",c.alreadyProcessed!==void 0&&c.alreadyProcessed>0?b(nt,{children:[" ",c.alreadyProcessed," already processed."]}):null]}),c.orphansRemoved!==void 0&&c.orphansRemoved>0?b(nt,{children:[" Removed ",c.orphansRemoved," orphaned thumbnail",c.orphansRemoved!==1?"s":"","."]}):null]}),c.errorMessages&&c.errorMessages.length>0&&b("div",{css:el.errorList,children:[c.errorMessages.slice(0,10).map((z,_)=>r("p",{css:el.errorItem,children:z},_)),c.errorMessages.length>10&&b("p",{css:el.errorItem,children:["...and ",c.errorMessages.length-10," more"]})]})]}):b(nt,{children:[r("p",{css:Be.message,children:c.status==="cleanup"?c.message||"Cleaning up...":c.message||"Processing..."}),b("div",{css:el.progressContainer,children:[r("div",{css:el.progressBar,children:r("div",{css:el.progressFill,style:{width:`${c.percent}%`}})}),b("div",{css:el.progressText,children:[b("span",{children:[c.current," of ",c.total]}),b("span",{children:[c.percent,"%"]})]}),c.currentFile&&r("p",{css:el.currentFile,title:c.currentFile,children:c.currentFile})]})]})}),b("div",{css:Be.footer,children:[A&&h&&r("button",{css:[Be.btn,Be.btnDanger,"",""],onClick:h,disabled:c.status==="stopping",children:c.status==="stopping"?"Stopping...":"Stop"}),y&&c.orphanedFiles&&c.orphanedFiles.length>0&&d&&b("button",{css:[Be.btn,Be.btnDanger,"",""],onClick:d,children:["Delete ",c.orphanedFiles.length," Orphan",c.orphanedFiles.length!==1?"s":""]}),y&&r("button",{css:[Be.btn,Be.btnConfirm,"",""],onClick:f,children:"Done"})]})]})})}function Vp(i){const{setShowProgress:c,setProgressTitle:f,setProgressState:d,triggerRefresh:h}=i,p=v.useRef(null),C=v.useRef(!1),D=v.useRef(!1),x=v.useRef(null),y=v.useCallback(()=>{p.current&&p.current.abort()},[]);return{execute:v.useCallback(async z=>{const{endpoint:_,body:q,title:H,operationType:G,onComplete:oe,onError:J}=z;if(C.current){console.warn("Streaming operation already in progress");return}C.current=!0,D.current=!1;const Q=`${_.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;x.current=Q;const le=new AbortController;p.current=le;const X=async()=>{D.current=!0,d(P=>({...P,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:Q})})}catch{}};le.signal.addEventListener("abort",X),f(H),c(!0),d({current:0,total:0,percent:0,status:"processing",message:`Starting ${H.toLowerCase()}...`});try{const P=await fetch(_,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...q,operationId:Q})});if(!P.ok){const $=await P.json().catch(()=>({}));throw new Error($.error||`Request failed: ${P.status}`)}if(!P.body)throw new Error("No response body");const te=P.body.getReader(),ae=new TextDecoder;let j="";try{for(;;){const{done:$,value:he}=await te.read();if($)break;j+=ae.decode(he,{stream:!0});const me=j.split(`
25
25
 
26
- `);j=me.pop()||"";for(const ge of me)if(ge.startsWith("data: "))try{const ie=JSON.parse(ge.slice(6));if(ie.type==="start")d(Oe=>({...Oe,total:ie.total||Oe.total}));else if(ie.type==="progress")d({current:ie.current||0,total:ie.total||0,percent:ie.percent||Math.round((ie.current||0)/(ie.total||1)*100),status:"processing",currentFile:ie.currentFile,message:ie.message});else if(ie.type==="cleanup")d(Oe=>({...Oe,status:"cleanup",message:ie.message}));else if(ie.type==="complete"){const Oe=ie.cancelled===!0,T=ie.processed??ie.moved??ie.renamed??ie.pushed??ie.downloaded??ie.added??ie.imported??ie.deleted??ie.current??0;d({current:T,total:T,percent:100,status:Oe?"stopped":ie.errors&&ie.errors>0?"error":"complete",message:ie.message,processed:T,errors:ie.errors,orphanedFiles:ie.orphanedFiles,isDelete:G==="delete",isMove:G==="move",isScan:G==="scan"}),h(),oe?.(ie)}else ie.type==="error"&&(d(Oe=>({...Oe,status:"error",message:ie.message})),J?.(ie.message||"Unknown error"))}catch{}}}catch(W){if(!D.current)throw W}finally{le.signal.removeEventListener("abort",X)}}catch(P){if(!D.current){const te=P instanceof Error?P.message:"Operation failed";console.error(`${H} error:`,P),d({current:0,total:0,percent:0,status:"error",message:te}),J?.(te)}}finally{C.current=!1,p.current=null,x.current=null}},[c,f,d,h]),stop:y,get isRunning(){return C.current}}}const m1=Ft`
26
+ `);j=me.pop()||"";for(const ge of me)if(ge.startsWith("data: "))try{const ie=JSON.parse(ge.slice(6));if(ie.type==="start")d(Oe=>({...Oe,total:ie.total||Oe.total}));else if(ie.type==="progress")d({current:ie.current||0,total:ie.total||0,percent:ie.percent||Math.round((ie.current||0)/(ie.total||1)*100),status:"processing",currentFile:ie.currentFile,message:ie.message});else if(ie.type==="cleanup")d(Oe=>({...Oe,status:"cleanup",message:ie.message}));else if(ie.type==="complete"){const Oe=ie.cancelled===!0,T=ie.processed??ie.moved??ie.renamed??ie.pushed??ie.downloaded??ie.added??ie.imported??ie.deleted??ie.current??0;d({current:T,total:T,percent:100,status:Oe?"stopped":ie.errors&&ie.errors>0?"error":"complete",message:ie.message,processed:T,errors:ie.errors,orphanedFiles:ie.orphanedFiles,isDelete:G==="delete",isMove:G==="move",isScan:G==="scan"}),h(),oe?.(ie)}else ie.type==="error"&&(d(Oe=>({...Oe,status:"error",message:ie.message})),J?.(ie.message||"Unknown error"))}catch{}}}catch($){if(!D.current)throw $}finally{le.signal.removeEventListener("abort",X)}}catch(P){if(!D.current){const te=P instanceof Error?P.message:"Operation failed";console.error(`${H} error:`,P),d({current:0,total:0,percent:0,status:"error",message:te}),J?.(te)}}finally{C.current=!1,p.current=null,x.current=null}},[c,f,d,h]),stop:y,get isRunning(){return C.current}}}const m1=Ft`
27
27
  from { opacity: 0; }
28
28
  to { opacity: 1; }
29
29
  `,y1=Ft`
@@ -52,11 +52,11 @@ NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev`,xe={overlay:{name:"
52
52
  opacity: 1;
53
53
  transform: translateY(0) scale(1);
54
54
  }
55
- `,Dt={overlay:m("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:",v1," 0.15s ease-out;font-family:",kl,";",""),modal:m(ll," background-color:",s.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:",x1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),tabs:m("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",s.border,";",""),tab:m("padding:12px 20px;font-size:",N.base,";font-weight:500;color:",s.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",s.text,";}",""),tabActive:m("color:",s.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",s.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:m("border:2px dashed ",s.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",s.primary,";background-color:",s.primaryLight,";}",""),dropzoneActive:m("border-color:",s.primary,";background-color:",s.primaryLight,";",""),dropzoneIcon:m("width:48px;height:48px;margin:0 auto 16px;color:",s.textMuted,";",""),dropzoneText:m("font-size:",N.base,";color:",s.text,";margin:0 0 4px;",""),dropzoneHint:m("font-size:",N.sm,";color:",s.textSecondary,";margin:0;",""),textarea:m("width:100%;min-height:150px;padding:12px;font-size:",N.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",s.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 3px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),textareaLabel:m("font-size:",N.sm,";color:",s.textSecondary,";margin:0 0 8px;",""),footer:m("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:m("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:m("background-color:",s.surface,";border:1px solid ",s.border,";color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),btnConfirm:m("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover:not(:disabled){background-color:",s.primaryHover,";border-color:",s.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:m("margin-top:16px;padding:12px;background-color:",s.background,";border-radius:6px;font-size:",N.sm,";color:",s.text,";","")};function S1({currentPath:i,onClose:c,onUploadComplete:f,streamingOperation:d,setShowProgress:h,setProgressTitle:p,setProgressState:C}){const[D,x]=v.useState("upload"),[y,A]=v.useState([]),[z,_]=v.useState(""),[q,H]=v.useState(!1),[G,oe]=v.useState(!1),[J,ce]=v.useState(!1),Q=v.useRef(null),le=v.useCallback(j=>{j&&A(Array.from(j))},[]),X=v.useCallback(j=>{j.preventDefault(),H(!1),le(j.dataTransfer.files)},[le]),P=v.useRef(!1),te=v.useCallback(async()=>{if(y.length!==0){if(h&&p&&C){c(),P.current=!1,p("Uploading Files"),h(!0),C({current:0,total:y.length,percent:0,status:"processing",message:"Uploading..."});let j=0;const W=[];for(let he=0;he<y.length;he++){if(P.current){C(ie=>({...ie,status:"stopped",message:`Stopped. Uploaded ${j} file${j!==1?"s":""}.`})),f();return}const me=y[he],ge=new FormData;ge.append("file",me),ge.append("path",i);try{(await fetch("/api/studio/upload",{method:"POST",body:ge})).ok?j++:W.push(me.name)}catch{W.push(me.name)}C({current:he+1,total:y.length,percent:Math.round((he+1)/y.length*100),status:"processing",currentFile:me.name})}C({current:y.length,total:y.length,percent:100,status:"complete",message:`Uploaded ${j} file${j!==1?"s":""}.${W.length>0?` ${W.length} failed.`:""}`}),f();return}oe(!0);try{for(const j of y){const W=new FormData;W.append("file",j),W.append("path",i),await fetch("/api/studio/upload",{method:"POST",body:W})}f(),c()}catch(j){console.error("Upload failed:",j)}finally{oe(!1)}}},[y,i,f,c,h,p,C]),ae=v.useCallback(async()=>{const j=z.split(`
56
- `).map(W=>W.trim()).filter(W=>W.length>0);if(j.length!==0){if(d){c(),await d.execute({endpoint:"/api/studio/import",body:{urls:j},title:"Importing URLs",onComplete:()=>{f()}});return}ce(!0);try{const he=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:j})})).body?.getReader();if(!he)throw new Error("No reader");const me=new TextDecoder;for(;;){const{done:ge,value:ie}=await he.read();if(ge)break;const T=me.decode(ie).split(`
55
+ `,At={overlay:m("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:",v1," 0.15s ease-out;font-family:",kl,";",""),modal:m(ll," background-color:",s.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:",x1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),tabs:m("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",s.border,";",""),tab:m("padding:12px 20px;font-size:",N.base,";font-weight:500;color:",s.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",s.text,";}",""),tabActive:m("color:",s.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",s.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:m("border:2px dashed ",s.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",s.primary,";background-color:",s.primaryLight,";}",""),dropzoneActive:m("border-color:",s.primary,";background-color:",s.primaryLight,";",""),dropzoneIcon:m("width:48px;height:48px;margin:0 auto 16px;color:",s.textMuted,";",""),dropzoneText:m("font-size:",N.base,";color:",s.text,";margin:0 0 4px;",""),dropzoneHint:m("font-size:",N.sm,";color:",s.textSecondary,";margin:0;",""),textarea:m("width:100%;min-height:150px;padding:12px;font-size:",N.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",s.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 3px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),textareaLabel:m("font-size:",N.sm,";color:",s.textSecondary,";margin:0 0 8px;",""),footer:m("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:m("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:m("background-color:",s.surface,";border:1px solid ",s.border,";color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),btnConfirm:m("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover:not(:disabled){background-color:",s.primaryHover,";border-color:",s.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:m("margin-top:16px;padding:12px;background-color:",s.background,";border-radius:6px;font-size:",N.sm,";color:",s.text,";","")};function S1({currentPath:i,onClose:c,onUploadComplete:f,streamingOperation:d,setShowProgress:h,setProgressTitle:p,setProgressState:C}){const[D,x]=v.useState("upload"),[y,A]=v.useState([]),[z,_]=v.useState(""),[q,H]=v.useState(!1),[G,oe]=v.useState(!1),[J,ce]=v.useState(!1),Q=v.useRef(null),le=v.useCallback(j=>{j&&A(Array.from(j))},[]),X=v.useCallback(j=>{j.preventDefault(),H(!1),le(j.dataTransfer.files)},[le]),P=v.useRef(!1),te=v.useCallback(async()=>{if(y.length!==0){if(h&&p&&C){c(),P.current=!1,p("Uploading Files"),h(!0),C({current:0,total:y.length,percent:0,status:"processing",message:"Uploading..."});let j=0;const $=[];for(let he=0;he<y.length;he++){if(P.current){C(ie=>({...ie,status:"stopped",message:`Stopped. Uploaded ${j} file${j!==1?"s":""}.`})),f();return}const me=y[he],ge=new FormData;ge.append("file",me),ge.append("path",i);try{(await fetch("/api/studio/upload",{method:"POST",body:ge})).ok?j++:$.push(me.name)}catch{$.push(me.name)}C({current:he+1,total:y.length,percent:Math.round((he+1)/y.length*100),status:"processing",currentFile:me.name})}C({current:y.length,total:y.length,percent:100,status:"complete",message:`Uploaded ${j} file${j!==1?"s":""}.${$.length>0?` ${$.length} failed.`:""}`}),f();return}oe(!0);try{for(const j of y){const $=new FormData;$.append("file",j),$.append("path",i),await fetch("/api/studio/upload",{method:"POST",body:$})}f(),c()}catch(j){console.error("Upload failed:",j)}finally{oe(!1)}}},[y,i,f,c,h,p,C]),ae=v.useCallback(async()=>{const j=z.split(`
56
+ `).map($=>$.trim()).filter($=>$.length>0);if(j.length!==0){if(d){c(),await d.execute({endpoint:"/api/studio/import",body:{urls:j},title:"Importing URLs",onComplete:()=>{f()}});return}ce(!0);try{const he=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:j})})).body?.getReader();if(!he)throw new Error("No reader");const me=new TextDecoder;for(;;){const{done:ge,value:ie}=await he.read();if(ge)break;const T=me.decode(ie).split(`
57
57
 
58
- `).filter(Z=>Z.startsWith("data: "));for(const Z of T)JSON.parse(Z.replace("data: ","")).type==="complete"&&(f(),c())}}catch(W){console.error("Import failed:",W)}finally{ce(!1)}}},[z,f,c,d]);return r("div",{css:Dt.overlay,onClick:c,children:b("div",{css:Dt.modal,onClick:j=>j.stopPropagation(),children:[b("div",{css:Dt.header,children:[r("h3",{css:Dt.title,children:"Add New"}),b("div",{css:Dt.tabs,children:[r("button",{css:[Dt.tab,D==="upload"&&Dt.tabActive,"",""],onClick:()=>x("upload"),children:"Upload Files"}),r("button",{css:[Dt.tab,D==="import"&&Dt.tabActive,"",""],onClick:()=>x("import"),children:"Import URLs"})]})]}),r("div",{css:Dt.body,children:D==="upload"?b(tt,{children:[b("div",{css:[Dt.dropzone,q&&Dt.dropzoneActive,"",""],onClick:()=>Q.current?.click(),onDragOver:j=>{j.preventDefault(),H(!0)},onDragLeave:()=>H(!1),onDrop:X,children:[r("svg",{css:Dt.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),r("p",{css:Dt.dropzoneText,children:"Drop files here or click to browse"}),r("p",{css:Dt.dropzoneHint,children:"Supports images and other media files"})]}),r("input",{ref:Q,type:"file",multiple:!0,css:Dt.fileInput,onChange:j=>le(j.target.files)}),y.length>0&&b("div",{css:Dt.selectedFiles,children:[y.length," file",y.length!==1?"s":""," selected"]})]}):b(tt,{children:[r("p",{css:Dt.textareaLabel,children:"Paste image URLs (one per line)"}),r("textarea",{css:Dt.textarea,value:z,onChange:j=>_(j.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
59
- https://cdn.example.com/photos/image2.jpg`})]})}),b("div",{css:Dt.footer,children:[r("button",{css:[Dt.btn,Dt.btnCancel,"",""],onClick:c,children:"Cancel"}),D==="upload"?r("button",{css:[Dt.btn,Dt.btnConfirm,"",""],onClick:te,disabled:y.length===0||G,children:G?"Uploading...":"Upload"}):r("button",{css:[Dt.btn,Dt.btnConfirm,"",""],onClick:ae,disabled:!z.trim()||J,children:J?"Importing...":"Import"})]})]})})}const w1="36px",Ye={btn:m("height:",w1,";padding:0 12px;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),icon:m("width:16px;height:16px;color:",s.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:m(ll," position:relative;background-color:",s.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:m("font-size:",N.xl,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:m("padding:6px;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:m("font-size:",N.base,";font-weight:600;color:",s.text,";margin:0 0 12px 0;",""),description:m("font-size:",N.sm,";color:",s.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:m("background-color:",s.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",N.xs,";color:",s.textSecondary,";border:1px solid ",s.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:m("position:absolute;top:8px;right:8px;padding:4px;background:",s.surface,";border:1px solid ",s.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",s.surfaceHover,";border-color:",s.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:m("width:14px;height:14px;color:",s.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:m("width:100%;padding:10px 14px;border:1px solid ",s.border,";border-radius:6px;font-size:",N.base,";color:",s.text,";background:",s.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 3px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:m("font-size:",N.xs,";font-weight:500;color:",s.textSecondary,";display:block;margin-bottom:6px;",""),footer:m("margin-top:24px;padding-top:20px;border-top:1px solid ",s.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:m("padding:10px 18px;font-size:",N.base,";font-weight:500;color:",s.text,";background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),saveBtn:m("padding:10px 18px;font-size:",N.base,";font-weight:500;color:white;background-color:",s.primary,";border:1px solid ",s.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",s.primaryHover,";border-color:",s.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:m("flex:1;padding:8px 12px;border:1px solid ",s.border,";border-radius:6px;font-size:",N.sm,";color:",s.text,";background:",s.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 3px ",s.primaryLight,";}",""),cdnIndex:m("font-size:",N.xs,";color:",s.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:m("padding:6px;background:none;border:none;cursor:pointer;color:",s.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",s.danger,";}",""),cdnAddBtn:m("padding:8px 12px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.primaryLight,";border:1px dashed ",s.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:",s.surface,";}",""),warning:m("font-size:",N.xs,";color:",s.danger,";margin-top:8px;padding:8px 12px;background:",s.dangerLight,";border-radius:6px;","")};function C1(){const[i,c]=v.useState(!1);return b(tt,{children:[r("button",{css:Ye.btn,onClick:()=>c(!0),"aria-label":"Settings",children:b("svg",{css:Ye.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"3"}),r("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})}),i&&r(z1,{onClose:()=>c(!1)})]})}const k1=`# Dev site link (opens from Studio header)
58
+ `).filter(Z=>Z.startsWith("data: "));for(const Z of T)JSON.parse(Z.replace("data: ","")).type==="complete"&&(f(),c())}}catch($){console.error("Import failed:",$)}finally{ce(!1)}}},[z,f,c,d]);return r("div",{css:At.overlay,onClick:c,children:b("div",{css:At.modal,onClick:j=>j.stopPropagation(),children:[b("div",{css:At.header,children:[r("h3",{css:At.title,children:"Add New"}),b("div",{css:At.tabs,children:[r("button",{css:[At.tab,D==="upload"&&At.tabActive,"",""],onClick:()=>x("upload"),children:"Upload Files"}),r("button",{css:[At.tab,D==="import"&&At.tabActive,"",""],onClick:()=>x("import"),children:"Import URLs"})]})]}),r("div",{css:At.body,children:D==="upload"?b(nt,{children:[b("div",{css:[At.dropzone,q&&At.dropzoneActive,"",""],onClick:()=>Q.current?.click(),onDragOver:j=>{j.preventDefault(),H(!0)},onDragLeave:()=>H(!1),onDrop:X,children:[r("svg",{css:At.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),r("p",{css:At.dropzoneText,children:"Drop files here or click to browse"}),r("p",{css:At.dropzoneHint,children:"Supports images and other media files"})]}),r("input",{ref:Q,type:"file",multiple:!0,css:At.fileInput,onChange:j=>le(j.target.files)}),y.length>0&&b("div",{css:At.selectedFiles,children:[y.length," file",y.length!==1?"s":""," selected"]})]}):b(nt,{children:[r("p",{css:At.textareaLabel,children:"Paste image URLs (one per line)"}),r("textarea",{css:At.textarea,value:z,onChange:j=>_(j.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
59
+ https://cdn.example.com/photos/image2.jpg`})]})}),b("div",{css:At.footer,children:[r("button",{css:[At.btn,At.btnCancel,"",""],onClick:c,children:"Cancel"}),D==="upload"?r("button",{css:[At.btn,At.btnConfirm,"",""],onClick:te,disabled:y.length===0||G,children:G?"Uploading...":"Upload"}):r("button",{css:[At.btn,At.btnConfirm,"",""],onClick:ae,disabled:!z.trim()||J,children:J?"Importing...":"Import"})]})]})})}const w1="36px",Ge={btn:m("height:",w1,";padding:0 12px;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),icon:m("width:16px;height:16px;color:",s.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:m(ll," position:relative;background-color:",s.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:m("font-size:",N.xl,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:m("padding:6px;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:m("font-size:",N.base,";font-weight:600;color:",s.text,";margin:0 0 12px 0;",""),description:m("font-size:",N.sm,";color:",s.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:m("background-color:",s.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",N.xs,";color:",s.textSecondary,";border:1px solid ",s.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:m("position:absolute;top:8px;right:8px;padding:4px;background:",s.surface,";border:1px solid ",s.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",s.surfaceHover,";border-color:",s.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:m("width:14px;height:14px;color:",s.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:m("width:100%;padding:10px 14px;border:1px solid ",s.border,";border-radius:6px;font-size:",N.base,";color:",s.text,";background:",s.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 3px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:m("font-size:",N.xs,";font-weight:500;color:",s.textSecondary,";display:block;margin-bottom:6px;",""),footer:m("margin-top:24px;padding-top:20px;border-top:1px solid ",s.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:m("padding:10px 18px;font-size:",N.base,";font-weight:500;color:",s.text,";background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),saveBtn:m("padding:10px 18px;font-size:",N.base,";font-weight:500;color:white;background-color:",s.primary,";border:1px solid ",s.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",s.primaryHover,";border-color:",s.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:m("flex:1;padding:8px 12px;border:1px solid ",s.border,";border-radius:6px;font-size:",N.sm,";color:",s.text,";background:",s.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 3px ",s.primaryLight,";}",""),cdnIndex:m("font-size:",N.xs,";color:",s.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:m("padding:6px;background:none;border:none;cursor:pointer;color:",s.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",s.danger,";}",""),cdnAddBtn:m("padding:8px 12px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.primaryLight,";border:1px dashed ",s.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:",s.surface,";}",""),warning:m("font-size:",N.xs,";color:",s.danger,";margin-top:8px;padding:8px 12px;background:",s.dangerLight,";border-radius:6px;","")};function C1(){const[i,c]=v.useState(!1);return b(nt,{children:[r("button",{css:Ge.btn,onClick:()=>c(!0),"aria-label":"Settings",children:b("svg",{css:Ge.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"3"}),r("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})}),i&&r(z1,{onClose:()=>c(!1)})]})}const k1=`# Dev site link (opens from Studio header)
60
60
  STUDIO_DEV_SITE_URL=http://localhost:3000
61
61
 
62
62
  # Cloudflare R2 Storage
@@ -64,11 +64,11 @@ CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
64
64
  CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id
65
65
  CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key
66
66
  CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
67
- CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function z1({onClose:i}){const{triggerRefresh:c}=po(),[f,d]=v.useState(!1),[h,p]=v.useState([]),[C,D]=v.useState(!0),[x,y]=v.useState(!1),[A,z]=v.useState(!1);v.useEffect(()=>{async function J(){try{const Q=await(await fetch("/api/studio/cdns")).json();p(Q.cdns||[])}catch(ce){console.error("Failed to load CDN URLs:",ce)}finally{D(!1)}}J()},[]);const _=()=>{navigator.clipboard.writeText(k1),d(!0),setTimeout(()=>d(!1),2e3)},q=v.useCallback((J,ce)=>{p(Q=>{const le=[...Q];return le[J]=ce,le}),z(!0)},[]),H=v.useCallback(()=>{p(J=>[...J,""]),z(!0)},[]),G=v.useCallback(J=>{p(ce=>ce.filter((Q,le)=>le!==J)),z(!0)},[]),oe=v.useCallback(async()=>{y(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:h})})).ok&&(z(!1),c(),i())}catch(J){console.error("Failed to save CDN URLs:",J)}finally{y(!1)}},[h,c,i]);return r("div",{css:Ye.overlay,onClick:i,children:b("div",{css:Ye.panel,onClick:J=>J.stopPropagation(),children:[b("div",{css:Ye.header,children:[r("h2",{css:Ye.title,children:"Settings"}),r("button",{css:Ye.closeBtn,onClick:i,children:r("svg",{css:Ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:Ye.sections,children:[b("section",{children:[r("h3",{css:Ye.sectionTitle,children:"CDN URLs"}),r("p",{css:Ye.description,children:"Manage CDN base URLs used by your images:"}),C?r("p",{css:Ye.description,children:"Loading..."}):b(tt,{children:[r("div",{css:Ye.cdnList,children:h.map((J,ce)=>b("div",{css:Ye.cdnRow,children:[r("span",{css:Ye.cdnIndex,children:ce}),r("input",{css:Ye.cdnInput,type:"text",value:J,onChange:Q=>q(ce,Q.target.value),placeholder:"https://cdn.example.com"}),r("button",{css:Ye.cdnDeleteBtn,onClick:()=>G(ce),title:"Delete CDN URL",children:r("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},ce))}),b("button",{css:Ye.cdnAddBtn,onClick:H,children:[r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),h.length>0&&r("p",{css:Ye.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),b("section",{children:[r("h3",{css:Ye.sectionTitle,children:"Environment Variables"}),b("p",{css:Ye.description,children:["Configure in ",r("code",{children:".env.local"})," file (local development only, not needed in production):"]}),b("div",{css:Ye.codeWrapper,children:[b("button",{css:Ye.copyBtn,onClick:_,title:"Copy to clipboard",children:[f&&r("span",{css:Ye.tooltip,children:"Copied!"}),r("svg",{css:Ye.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),b("div",{css:Ye.code,children:[r("p",{css:Ye.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),r("p",{css:Ye.codeLine,children:" "}),r("p",{css:Ye.codeLine,children:"# Cloudflare R2 Storage"}),r("p",{css:Ye.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),r("p",{css:Ye.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),r("p",{css:Ye.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),r("p",{css:Ye.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),r("p",{css:Ye.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),b("section",{children:[r("h3",{css:Ye.sectionTitle,children:"Thumbnail Sizes"}),b("div",{css:Ye.grid,children:[b("div",{children:[r("label",{css:Ye.label,children:"Small"}),r("input",{css:Ye.input,type:"number",defaultValue:300})]}),b("div",{children:[r("label",{css:Ye.label,children:"Medium"}),r("input",{css:Ye.input,type:"number",defaultValue:700})]}),b("div",{children:[r("label",{css:Ye.label,children:"Large"}),r("input",{css:Ye.input,type:"number",defaultValue:1400})]})]})]})]}),b("div",{css:Ye.footer,children:[r("button",{css:Ye.cancelBtn,onClick:i,children:"Cancel"}),r("button",{css:Ye.saveBtn,onClick:oe,disabled:x||!A,children:x?"Saving...":"Save Changes"})]})]})})}const iu="36px",M1=Ft`
67
+ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function z1({onClose:i}){const{triggerRefresh:c}=po(),[f,d]=v.useState(!1),[h,p]=v.useState([]),[C,D]=v.useState(!0),[x,y]=v.useState(!1),[A,z]=v.useState(!1);v.useEffect(()=>{async function J(){try{const Q=await(await fetch("/api/studio/cdns")).json();p(Q.cdns||[])}catch(ce){console.error("Failed to load CDN URLs:",ce)}finally{D(!1)}}J()},[]);const _=()=>{navigator.clipboard.writeText(k1),d(!0),setTimeout(()=>d(!1),2e3)},q=v.useCallback((J,ce)=>{p(Q=>{const le=[...Q];return le[J]=ce,le}),z(!0)},[]),H=v.useCallback(()=>{p(J=>[...J,""]),z(!0)},[]),G=v.useCallback(J=>{p(ce=>ce.filter((Q,le)=>le!==J)),z(!0)},[]),oe=v.useCallback(async()=>{y(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:h})})).ok&&(z(!1),c(),i())}catch(J){console.error("Failed to save CDN URLs:",J)}finally{y(!1)}},[h,c,i]);return r("div",{css:Ge.overlay,onClick:i,children:b("div",{css:Ge.panel,onClick:J=>J.stopPropagation(),children:[b("div",{css:Ge.header,children:[r("h2",{css:Ge.title,children:"Settings"}),r("button",{css:Ge.closeBtn,onClick:i,children:r("svg",{css:Ge.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:Ge.sections,children:[b("section",{children:[r("h3",{css:Ge.sectionTitle,children:"CDN URLs"}),r("p",{css:Ge.description,children:"Manage CDN base URLs used by your images:"}),C?r("p",{css:Ge.description,children:"Loading..."}):b(nt,{children:[r("div",{css:Ge.cdnList,children:h.map((J,ce)=>b("div",{css:Ge.cdnRow,children:[r("span",{css:Ge.cdnIndex,children:ce}),r("input",{css:Ge.cdnInput,type:"text",value:J,onChange:Q=>q(ce,Q.target.value),placeholder:"https://cdn.example.com"}),r("button",{css:Ge.cdnDeleteBtn,onClick:()=>G(ce),title:"Delete CDN URL",children:r("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},ce))}),b("button",{css:Ge.cdnAddBtn,onClick:H,children:[r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),h.length>0&&r("p",{css:Ge.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),b("section",{children:[r("h3",{css:Ge.sectionTitle,children:"Environment Variables"}),b("p",{css:Ge.description,children:["Configure in ",r("code",{children:".env.local"})," file (local development only, not needed in production):"]}),b("div",{css:Ge.codeWrapper,children:[b("button",{css:Ge.copyBtn,onClick:_,title:"Copy to clipboard",children:[f&&r("span",{css:Ge.tooltip,children:"Copied!"}),r("svg",{css:Ge.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),b("div",{css:Ge.code,children:[r("p",{css:Ge.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),r("p",{css:Ge.codeLine,children:" "}),r("p",{css:Ge.codeLine,children:"# Cloudflare R2 Storage"}),r("p",{css:Ge.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),r("p",{css:Ge.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),r("p",{css:Ge.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),r("p",{css:Ge.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),r("p",{css:Ge.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),b("section",{children:[r("h3",{css:Ge.sectionTitle,children:"Thumbnail Sizes"}),b("div",{css:Ge.grid,children:[b("div",{children:[r("label",{css:Ge.label,children:"Small"}),r("input",{css:Ge.input,type:"number",defaultValue:300})]}),b("div",{children:[r("label",{css:Ge.label,children:"Medium"}),r("input",{css:Ge.input,type:"number",defaultValue:700})]}),b("div",{children:[r("label",{css:Ge.label,children:"Large"}),r("input",{css:Ge.input,type:"number",defaultValue:1400})]})]})]})]}),b("div",{css:Ge.footer,children:[r("button",{css:Ge.cancelBtn,onClick:i,children:"Cancel"}),r("button",{css:Ge.saveBtn,onClick:oe,disabled:x||!A,children:x?"Saving...":"Save Changes"})]})]})})}const iu="36px",M1=Ft`
68
68
  to { transform: rotate(360deg); }
69
- `,ke={toolbar:m("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",s.surface,";border-bottom:1px solid ",s.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:m("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",iu,";padding:0 14px;border-radius:6px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";cursor:pointer;transition:all 0.15s ease;color:",s.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:m("background:",s.primary,";border-color:",s.primary,";color:white;&:hover:not(:disabled){background:",s.primaryHover,";border-color:",s.primaryHover,";}",""),btnDanger:m("color:",s.danger,";&:hover:not(:disabled){background-color:",s.dangerLight,";border-color:",s.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:m("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",s.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:m("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",N.sm,";color:",s.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",s.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:m("svg{color:",s.text,";}",""),cloudDropdownItemDanger:m("color:",s.danger,";svg{color:",s.danger,";}",""),cloudDropdownDivider:m("height:1px;background-color:",s.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:m("animation:",M1," 1s linear infinite;",""),selectionCount:m("font-size:",N.base,";color:",s.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:m("color:",s.primary,";background:none;border:none;cursor:pointer;font-size:",N.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:m("width:1px;height:24px;background:",s.border,";margin:0 4px;",""),viewToggle:m("display:flex;align-items:center;height:",iu,";background-color:",s.surface,";border:1px solid ",s.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:m("height:",iu,";padding:0 32px 0 12px;border:1px solid ",s.border,";border-radius:6px;font-size:",N.base,";background:",s.surface,";color:",s.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 2px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),searchClearBtn:m("position:absolute;right:5px;top:5px;bottom:5px;background:",s.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:",s.primaryHover,";}",""),viewBtn:m("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",s.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",s.text,";background-color:",s.surfaceHover,";}",""),viewBtnActive:m("background-color:",s.primaryLight,";color:",s.primary,";&:hover{background-color:",s.primaryLight,";color:",s.primary,";}","")};function D1(){const{selectedItems:i,viewMode:c,setViewMode:f,clearSelection:d,currentPath:h,triggerRefresh:p,focusedItem:C,scanRequested:D,clearScanRequest:x,fileItems:y,requestProcess:A,setProcessMode:z,actionState:_,cancelAction:q}=po(),H=v.useRef(null),G=v.useRef(null),[oe,J]=v.useState(!1),[ce,Q]=v.useState(!1),[le,X]=v.useState(!1),[P,te]=v.useState(!1),[ae,j]=v.useState(!1),[W,he]=v.useState(0),[me,ge]=v.useState(!1),[ie,Oe]=v.useState(0),[T,Z]=v.useState(!1),[ee,Ee]=v.useState(!1),[qe,S]=v.useState(!1),[O,ne]=v.useState(0),[re,we]=v.useState(!1),[ze,Ge]=v.useState("Processing Images"),[xt,Re]=v.useState({current:0,total:0,percent:0,status:"processing"}),[Pt,Ze]=v.useState(null),[Je,it]=v.useState(!1),[Ht,Yt]=v.useState(!1),[tn,Qt]=v.useState(!1),[fn,Bt]=v.useState(!1),[$e,gt]=v.useState(!1),[kt,Te]=v.useState(!1),[mt,hn]=v.useState(!1),[Hn,kn]=v.useState(!1),mn=v.useRef(null),$=v.useRef(null),ue=Vp({setShowProgress:we,setProgressTitle:Ge,setProgressState:Re,triggerRefresh:p}),Xe=h==="public/images"||h.startsWith("public/images/");v.useCallback(()=>{H.current?.click()},[]);const at=v.useCallback(()=>{te(!0),p(),setTimeout(()=>te(!1),600)},[p]),Be=v.useCallback(async()=>{X(!0),Ge("Scanning Files"),we(!0),Re({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const se=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!se)throw new Error("No reader");const be=new TextDecoder;let ve="";for(;;){const{done:_e,value:Ue}=await se.read();if(_e)break;ve+=be.decode(Ue,{stream:!0});const lt=ve.split(`
69
+ `,ke={toolbar:m("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",s.surface,";border-bottom:1px solid ",s.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:m("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",iu,";padding:0 14px;border-radius:6px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";cursor:pointer;transition:all 0.15s ease;color:",s.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:m("background:",s.primary,";border-color:",s.primary,";color:white;&:hover:not(:disabled){background:",s.primaryHover,";border-color:",s.primaryHover,";}",""),btnDanger:m("color:",s.danger,";&:hover:not(:disabled){background-color:",s.dangerLight,";border-color:",s.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:m("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",s.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:m("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",N.sm,";color:",s.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",s.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:m("svg{color:",s.text,";}",""),cloudDropdownItemDanger:m("color:",s.danger,";svg{color:",s.danger,";}",""),cloudDropdownDivider:m("height:1px;background-color:",s.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:m("animation:",M1," 1s linear infinite;",""),selectionCount:m("font-size:",N.base,";color:",s.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:m("color:",s.primary,";background:none;border:none;cursor:pointer;font-size:",N.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:m("width:1px;height:24px;background:",s.border,";margin:0 4px;",""),viewToggle:m("display:flex;align-items:center;height:",iu,";background-color:",s.surface,";border:1px solid ",s.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:m("height:",iu,";padding:0 32px 0 12px;border:1px solid ",s.border,";border-radius:6px;font-size:",N.base,";background:",s.surface,";color:",s.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 2px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),searchClearBtn:m("position:absolute;right:5px;top:5px;bottom:5px;background:",s.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:",s.primaryHover,";}",""),viewBtn:m("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",s.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",s.text,";background-color:",s.surfaceHover,";}",""),viewBtnActive:m("background-color:",s.primaryLight,";color:",s.primary,";&:hover{background-color:",s.primaryLight,";color:",s.primary,";}","")};function D1(){const{selectedItems:i,viewMode:c,setViewMode:f,clearSelection:d,currentPath:h,triggerRefresh:p,focusedItem:C,scanRequested:D,clearScanRequest:x,fileItems:y,requestProcess:A,setProcessMode:z,actionState:_,cancelAction:q}=po(),H=v.useRef(null),G=v.useRef(null),[oe,J]=v.useState(!1),[ce,Q]=v.useState(!1),[le,X]=v.useState(!1),[P,te]=v.useState(!1),[ae,j]=v.useState(!1),[$,he]=v.useState(0),[me,ge]=v.useState(!1),[ie,Oe]=v.useState(0),[T,Z]=v.useState(!1),[ee,Ee]=v.useState(!1),[Ye,S]=v.useState(!1),[O,ne]=v.useState(0),[re,we]=v.useState(!1),[Me,Xe]=v.useState("Processing Images"),[St,Re]=v.useState({current:0,total:0,percent:0,status:"processing"}),[Pt,Je]=v.useState(null),[We,rt]=v.useState(!1),[Ht,Yt]=v.useState(!1),[tn,Qt]=v.useState(!1),[fn,Bt]=v.useState(!1),[$e,mt]=v.useState(!1),[zt,Te]=v.useState(!1),[yt,hn]=v.useState(!1),[Hn,kn]=v.useState(!1),mn=v.useRef(null),W=v.useRef(null),ue=Vp({setShowProgress:we,setProgressTitle:Xe,setProgressState:Re,triggerRefresh:p}),Ve=h==="public/images"||h.startsWith("public/images/");v.useCallback(()=>{H.current?.click()},[]);const lt=v.useCallback(()=>{te(!0),p(),setTimeout(()=>te(!1),600)},[p]),Ue=v.useCallback(async()=>{X(!0),Xe("Scanning Files"),we(!0),Re({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const se=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!se)throw new Error("No reader");const be=new TextDecoder;let ve="";for(;;){const{done:He,value:Ne}=await se.read();if(He)break;ve+=be.decode(Ne,{stream:!0});const ot=ve.split(`
70
70
 
71
- `);ve=lt.pop()||"";for(const ot of lt){if(!ot.startsWith("data: "))continue;const Ne=JSON.parse(ot.slice(6));if(Ne.type==="start")Re({current:0,total:Ne.total,percent:0,status:"processing",message:`Scanning ${Ne.total} files...`});else if(Ne.type==="progress")Re({current:Ne.current,total:Ne.total,percent:Ne.percent,status:"processing",currentFile:Ne.currentFile});else if(Ne.type==="cleanup")Re(pn=>({...pn,message:Ne.message}));else if(Ne.type==="complete"){let pn=Ne.renamed>0?`${Ne.renamed} file(s) renamed due to conflicts. `:"";Ne.orphanedFiles&&Ne.orphanedFiles.length>0&&(pn+=`Found ${Ne.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Re({current:Ne.total||0,total:Ne.total||0,percent:100,status:"complete",processed:Ne.added,alreadyProcessed:Ne.existingCount,errors:Ne.errors,orphanedFiles:Ne.orphanedFiles,pendingUpdates:Ne.pendingUpdates,orphanedEntries:Ne.orphanedEntries,message:pn||void 0,isScan:!0}),p()}else Ne.type==="error"&&Re({current:0,total:0,percent:0,status:"error",message:Ne.message||"Scan failed"})}}}catch(pe){console.error("Scan error:",pe),Re({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{X(!1)}},[p]);v.useEffect(()=>{const pe=se=>{mn.current&&!mn.current.contains(se.target)&&hn(!1),$.current&&!$.current.contains(se.target)&&kn(!1)};return document.addEventListener("mousedown",pe),()=>document.removeEventListener("mousedown",pe)},[]),v.useEffect(()=>{D&&!le&&(x(),Be())},[D,le,x,Be]);const Me=v.useCallback(async pe=>{const se=pe.target.files;if(!se||se.length===0)return;const be=Array.from(se);be.length>1?(Re({current:0,total:be.length,percent:0,status:"processing",message:"Uploading files..."}),we(!0)):Q(!0);let ve=0,_e=0;try{for(let Ue=0;Ue<be.length;Ue++){const lt=be[Ue],ot=new FormData;ot.append("file",lt),ot.append("path",h);try{const Ne=await fetch("/api/studio/upload",{method:"POST",body:ot});if(Ne.ok)ve++;else{const pn=await Ne.json();_e++,be.length===1&&(Ne.status>=500?(console.error("Upload error:",pn),Ze({title:"Upload Failed",message:`Failed to upload ${lt.name}: ${pn.error||"Unknown error"}`})):Ze({title:"Cannot Upload Here",message:pn.error||"Upload not allowed in this location."}))}}catch{_e++}be.length>1&&Re({current:Ue+1,total:be.length,percent:Math.round((Ue+1)/be.length*100),status:"processing",currentFile:lt.name})}be.length>1&&Re({current:be.length,total:be.length,percent:100,status:"complete",processed:ve,errors:_e}),p()}catch(Ue){console.error("Upload error:",Ue),be.length>1?Re({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):Ze({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{Q(!1),H.current&&(H.current.value="")}},[h,p]),zt=v.useCallback(async pe=>{if(i.size>0){const be=Array.from(i),ve=be.filter(Ue=>(Ue.split("/").pop()||"").includes(".")&&!Ue.endsWith("/")),_e=be.filter(Ue=>!(Ue.split("/").pop()||"").includes(".")||Ue.endsWith("/"));if(_e.length>0)try{const lt=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(_e.join(","))}`)).json();if(lt.images)for(const ot of lt.images){const Ne=`public/${ot}`;ve.includes(Ne)||ve.push(Ne)}}catch(Ue){console.error("Failed to get folder files:",Ue)}if(ve.length===0){Ze({title:"No Files Found",message:"No files found in the selected items."});return}z(pe),A(ve)}else try{const ve=await(await fetch("/api/studio/count-images")).json();if(!ve.images||ve.images.length===0){Ze({title:"No Images Found",message:"No images found in the public folder to process."});return}const _e=ve.images.map(Ue=>`public/${Ue}`);z(pe),A(_e)}catch(be){console.error("Failed to get images:",be),Ze({title:"Error",message:"Failed to get images."})}},[i,A,z]),yt=v.useCallback(()=>{ue.stop(),G.current&&(Re(pe=>({...pe,status:"stopping"})),G.current.abort())},[ue]),Aa=v.useCallback(async()=>{const pe=xt.orphanedFiles;if(!(!pe||pe.length===0))try{const se=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:pe})}),be=await se.json();se.ok?(Re(ve=>({...ve,orphanedFiles:void 0,orphansRemoved:be.deleted,message:`Deleted ${be.deleted} orphaned thumbnail${be.deleted!==1?"s":""}.`})),p()):Ze({title:"Delete Failed",message:be.error||"Failed to delete orphaned files."})}catch(se){console.error("Delete orphans error:",se),Ze({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[xt.orphanedFiles,p]),ia=v.useCallback(async()=>{if(i.size===0)return;const pe=Array.from(i),se=pe.filter(_e=>(_e.split("/").pop()||"").includes(".")&&!_e.endsWith("/")),be=pe.filter(_e=>!(_e.split("/").pop()||"").includes(".")||_e.endsWith("/"));let ve=se.length;if(be.length>0)try{const Ue=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(be.join(","))}`)).json();Ue.images&&(ve+=Ue.images.length)}catch(_e){console.error("Failed to get folder files:",_e)}he(ve),j(!0)},[i]),zl=v.useCallback(async()=>{j(!1);const pe=Array.from(i);pe.length!==0&&await ue.execute({endpoint:"/api/studio/delete-stream",body:{paths:pe},title:"Deleting Files",operationType:"delete",onComplete:()=>{d()}})},[i,d,ue]),U=v.useCallback(async()=>{if(i.size===0)return;const pe=Array.from(i),se=pe.filter(ot=>(ot.split("/").pop()||"").includes(".")&&!ot.endsWith("/")),be=pe.filter(ot=>!(ot.split("/").pop()||"").includes(".")||ot.endsWith("/")),ve=be.length>0;if(ve)try{const Ne=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(be.join(","))}`)).json();if(Ne.images)for(const pn of Ne.images){const xo=`public/${pn}`;se.includes(xo)||se.push(xo)}}catch(ot){console.error("Failed to get folder files:",ot)}if(se.length===0){Ze({title:"No Files Found",message:"No files found in the selected items."});return}let _e=!1,Ue=!1,lt=0;for(const ot of se){const Ne=y.find(pn=>pn.path===ot);Ne?Ne.isRemote?_e=!0:Ne.cdnPushed?lt++:Ue=!0:ve&&(Ue=!0)}if(!ve&&lt===se.length){Ze({title:"Already Pushed",message:`All ${se.length} file${se.length!==1?"s are":" is"} already on the CDN.`});return}Oe(se.length),Z(_e),Ee(Ue),ge(!0)},[i,y]),De=v.useCallback(async()=>{ge(!1);const pe=Array.from(i),se=pe.filter(_e=>(_e.split("/").pop()||"").includes(".")&&!_e.endsWith("/")),be=pe.filter(_e=>!(_e.split("/").pop()||"").includes(".")||_e.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 lt of Ue.images){const ot=`public/${lt}`;se.includes(ot)||se.push(ot)}}catch(_e){console.error("Failed to get folder files:",_e)}const ve=se.map(_e=>"/"+_e.replace(/^public\//,""));ve.length!==0&&await ue.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:ve},title:"Pushing to CDN",onComplete:()=>{d()},onError:_e=>{(_e.includes("R2 not configured")||_e.includes("CLOUDFLARE_R2"))&&(we(!1),gt(!0))}})},[i,d,ue]),[Ke,ft]=v.useState([]),[Rt,zn]=v.useState(0),Ml=v.useCallback(async()=>{if(i.size===0)return;const pe=Array.from(i),se=pe.filter(Ue=>(Ue.split("/").pop()||"").includes(".")&&!Ue.endsWith("/")),be=pe.filter(Ue=>!(Ue.split("/").pop()||"").includes(".")||Ue.endsWith("/")),ve=be.length>0;if(ve)try{const lt=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(be.join(","))}`)).json();if(lt.images)for(const ot of lt.images){const Ne=`public/${ot}`;se.includes(Ne)||se.push(Ne)}}catch(Ue){console.error("Failed to get folder files:",Ue)}if(se.length===0){Ze({title:"No Files Found",message:"No files found in the selected items."});return}let _e;if(ve)_e=se;else if(_e=se.filter(Ue=>{const lt=y.find(ot=>ot.path===Ue);return lt&&lt.cdnPushed&&!lt.isRemote}),_e.length===0){Ze({title:"No CDN Files",message:`None of the ${se.length} selected file${se.length!==1?"s are":" is"} on the CDN.`});return}ft(_e),zn(se.length),ne(_e.length),S(!0)},[i,y]),ra=v.useCallback(async()=>{S(!1),_.showDownloadConfirm&&q();const se=(_.showDownloadConfirm?_.actionPaths:Ke).map(be=>"/"+be.replace(/^public\//,""));await ue.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:se},title:"Downloading from CDN",onComplete:()=>d()})},[Ke,d,_.showDownloadConfirm,_.actionPaths,q,ue]),Bn=v.useCallback(async()=>{if(i.size===0)return;const se=Array.from(i).filter(be=>{const ve=y.find(_e=>_e.path===be);return ve&&(ve.hasUpdate||ve.type==="folder"&&ve.updateCount&&ve.updateCount>0)});if(se.length===0){Ze({title:"No Updates",message:"No files with pending updates in selection."});return}await ue.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:se},title:"Pushing Updates",onComplete:()=>d()})},[i,y,d,ue]),Ut=v.useCallback(async()=>{if(i.size===0)return;const se=Array.from(i).filter(be=>{const ve=y.find(_e=>_e.path===be);return ve&&(ve.hasUpdate||ve.type==="folder"&&ve.updateCount&&ve.updateCount>0)});if(se.length!==0)try{const be=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:se})});if(be.ok)d(),p();else{const ve=await be.json();Ze({title:"Cancel Failed",message:ve.error||"Unknown error"})}}catch(be){console.error("Cancel updates error:",be),Ze({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[i,y,d,p]),Xr=v.useCallback(async pe=>{it(!1);try{const se=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:pe})});if(se.ok)p();else{const be=await se.json();Ze({title:"Create Folder Failed",message:be.error||"Unknown error"})}}catch(se){console.error("Create folder error:",se),Ze({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,p]),bi=v.useCallback(()=>{i.size!==0&&Bt(!0)},[i]),vi=v.useCallback(async pe=>{const se=Array.from(i);await ue.execute({endpoint:"/api/studio/move",body:{paths:se,destination:pe},title:"Moving Files",onComplete:()=>d()})},[i,d,ue]),{searchQuery:mo,setSearchQuery:sa}=po(),yo=v.useCallback(pe=>{sa(pe.target.value)},[sa]),xi=v.useCallback(pe=>{pe.key==="Escape"&&(pe.stopPropagation(),sa(""),pe.target.blur())},[sa]),Kn=i.size>0;Kn&&Array.from(i).some(pe=>{const se=y.find(be=>be.path===pe);return se&&se.cdnPushed&&!se.isRemote}),Kn&&Array.from(i).every(pe=>{const se=y.find(be=>be.path===pe);return se&&se.type==="file"&&se.cdnPushed&&!se.isRemote});const In=Kn&&Array.from(i).some(pe=>{const se=y.find(be=>be.path===pe);return se&&(se.hasUpdate||se.type==="folder"&&se.updateCount&&se.updateCount>0)}),Lt=Array.from(i),Gt=Lt.length===1&&!Lt[0].includes("."),Mn=Gt?Lt[0]:null,Dl=Mn&&Mn.split("/").pop()||"",Ta=Lt.length===1&&Lt[0].includes("."),Ea=Ta?Lt[0]:null,bo=Ea&&Ea.split("/").pop()||"",ol=v.useCallback(async pe=>{Mn&&(Yt(!1),await ue.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:Mn,newName:pe},title:"Renaming Folder",onComplete:()=>d()}))},[Mn,d,ue]),vo=v.useCallback(async pe=>{Ea&&(Qt(!1),await ue.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:Ea,newName:pe},title:"Renaming File",onComplete:()=>d()}))},[Ea,d,ue]),ca=b(tt,{children:[(qe||_.showDownloadConfirm)&&r(fo,{title:"Download from CDN",message:(()=>{const pe=_.showDownloadConfirm?_.downloadImageCount:O,se=_.showDownloadConfirm?_.downloadTotalSelected:Rt;return se>pe?`Download ${pe} of ${se} selected file${se!==1?"s":""} from Cloudflare R2? (${se-pe} not on CDN)`:`Download ${pe} image${pe!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:ra,onCancel:()=>{S(!1),_.showDownloadConfirm&&q()}}),re&&r(al,{title:ze,progress:xt,onStop:yt,onDeleteOrphans:Aa,onClose:()=>{we(!1),Re({current:0,total:0,percent:0,status:"processing"}),p()}})]});return C?ca:b(tt,{children:[ca,ae&&r(fo,{title:"Delete Items",message:`Are you sure you want to delete ${W} file${W!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:zl,onCancel:()=>j(!1)}),me&&r(fo,{title:"Push to CDN",message:`Push ${ie} image${ie!==1?"s":""} to Cloudflare R2?${T?" Remote images will be downloaded first.":""}${ee?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:De,onCancel:()=>ge(!1)}),Je&&r(Cl,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:Xr,onCancel:()=>it(!1)}),fn&&r(Fp,{selectedItems:i,currentPath:h,onMove:pe=>{Bt(!1),vi(pe)},onCancel:()=>Bt(!1)}),Ht&&Mn&&r(Cl,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:Dl,defaultValue:Dl,confirmLabel:"Rename",onConfirm:ol,onCancel:()=>Yt(!1)}),tn&&Ea&&r(Cl,{title:"Rename File",message:"Enter a new name for the file:",placeholder:bo,defaultValue:bo,confirmLabel:"Rename",onConfirm:vo,onCancel:()=>Qt(!1)}),Pt&&r(Gr,{title:Pt.title,message:Pt.message,onClose:()=>{Ze(null),p()}}),r(Qp,{isOpen:$e,onClose:()=>gt(!1)}),oe&&r(S1,{currentPath:h,onClose:()=>J(!1),onUploadComplete:()=>{J(!1),p()},streamingOperation:ue,setShowProgress:we,setProgressTitle:Ge,setProgressState:Re}),b("div",{css:ke.toolbar,children:[r("input",{ref:H,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:Me,style:{display:"none"}}),b("div",{css:ke.left,children:[b("button",{css:[ke.btn,ke.btnPrimary,"",""],onClick:()=>J(!0),disabled:ce||Xe,children:[r(A1,{}),"Add New"]}),b("button",{css:ke.btn,onClick:()=>{Ta?Qt(!0):Gt?Yt(!0):it(!0)},disabled:Xe&&!Gt&&!Ta,title:Xe&&!Gt&&!Ta?"Cannot create folders in protected images folder":void 0,children:[Ta||Gt?r(O1,{}):r(L1,{}),Ta?"Rename File":Gt?"Rename Folder":"New Folder"]}),r("div",{css:ke.divider}),b("div",{css:ke.cloudDropdownWrapper,ref:$,children:[b("button",{css:ke.btn,onClick:()=>kn(!Hn),disabled:_.showProgress||Xe,title:Xe?"Cannot process images folder":void 0,children:[r(q1,{}),"Thumbnails",r("svg",{css:ke.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Hn&&b("div",{css:ke.cloudDropdown,children:[b("button",{css:[ke.cloudDropdownItem,ke.cloudDropdownItemDefault,"",""],onClick:()=>{kn(!1),zt("generate")},children:[r(Y1,{}),"Generate Thumbnails"]}),b("button",{css:[ke.cloudDropdownItem,ke.cloudDropdownItemDanger,"",""],onClick:()=>{kn(!1),zt("remove")},children:[r(G1,{}),"Remove Thumbnails"]})]})]}),b("button",{css:[ke.btn,ke.btnDanger,"",""],onClick:ia,disabled:!Kn,children:[r(R1,{}),"Delete"]}),b("button",{css:ke.btn,onClick:bi,disabled:!Kn,children:[r(_1,{}),"Move"]}),b("div",{css:ke.cloudDropdownWrapper,ref:mn,children:[b("button",{css:[ke.btn,ke.btnCloud,"",""],onClick:()=>hn(!mt),disabled:!Kn,children:[r(kp,{}),"Cloud",r("svg",{css:ke.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),mt&&Kn&&b("div",{css:ke.cloudDropdown,children:[In&&b(tt,{children:[b("button",{css:ke.cloudDropdownItem,onClick:()=>{hn(!1),Bn()},children:[r(H1,{}),"Push Update"]}),b("button",{css:[ke.cloudDropdownItem,ke.cloudDropdownItemDanger,"",""],onClick:()=>{hn(!1),Ut()},children:[r(B1,{}),"Cancel Update"]}),r("div",{css:ke.cloudDropdownDivider})]}),b("button",{css:ke.cloudDropdownItem,onClick:()=>{hn(!1),U()},children:[r(kp,{}),"Push CDN"]}),b("button",{css:ke.cloudDropdownItem,onClick:()=>{hn(!1),Ml()},children:[r(U1,{}),"Download"]})]})]}),b("div",{css:ke.searchWrapper,children:[r("input",{css:ke.searchInput,type:"text",placeholder:"Search images...",value:mo,onChange:yo,onKeyDown:xi}),mo&&r("button",{css:ke.searchClearBtn,onClick:()=>sa(""),title:"Clear search",children:r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),b("div",{css:ke.right,children:[Kn&&b("span",{css:ke.selectionCount,children:[i.size," selected",r("button",{css:ke.clearBtn,onClick:d,children:"Clear"})]}),b("button",{css:ke.btn,onClick:Be,disabled:le,children:[r(T1,{spinning:le}),"Scan"]}),r("button",{css:ke.btn,onClick:at,title:"Refresh view",disabled:P,children:r(E1,{spinning:P})}),b("div",{css:ke.viewToggle,children:[r("button",{css:[ke.viewBtn,c==="grid"&&ke.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:r(N1,{})}),r("button",{css:[ke.viewBtn,c==="list"&&ke.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:r(j1,{})})]}),r(C1,{})]})]})]})}function A1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function T1({spinning:i}){return r("svg",{css:[ke.icon,i&&ke.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function E1({spinning:i}){return r("svg",{css:[ke.icon,i&&ke.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function R1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 L1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 O1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 _1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function kp(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}function H1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 B1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function U1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 N1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 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 j1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function q1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 Y1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function G1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}class X1{async get(c){const f=await fetch(c,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!f.ok){const d=await f.json().catch(()=>({}));throw new Error(d.error||`Request failed: ${f.status}`)}return f.json()}async post(c,f){const d=await fetch(c,{method:"POST",headers:f?{"Content-Type":"application/json"}:void 0,body:f?JSON.stringify(f):void 0});if(!d.ok){const h=await d.json().catch(()=>({}));throw new Error(h.error||`Request failed: ${d.status}`)}return d.json()}async list(c="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(c)}`)}async search(c,f="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(c)}&path=${encodeURIComponent(f)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(c){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(c.join(","))}`)}async upload(c,f="public"){const d=new FormData;d.append("file",c),d.append("path",f);const h=await fetch("/api/studio/upload",{method:"POST",body:d});if(!h.ok){const p=await h.json().catch(()=>({}));throw new Error(p.error||`Upload failed: ${h.status}`)}return h.json()}async delete(c){return this.post("/api/studio/delete",{paths:c})}async createFolder(c,f){return this.post("/api/studio/create-folder",{parentPath:c,name:f})}async rename(c,f){return this.post("/api/studio/rename",{oldPath:c,newName:f})}async move(c,f){return this.post("/api/studio/move",{paths:c,destination:f})}async push(c){return this.post("/api/studio/sync",{imageKeys:c})}async reprocess(c){return this.post("/api/studio/reprocess",{imageKeys:c})}processAllStream(){return new EventSource("/api/studio/process-all")}async checkFeaturedImage(){return this.get("/api/studio/check-featured-image")}async getFeaturedImageOptions(){return this.get("/api/studio/featured-image-options")}}const di=new X1;function Kp(){const{currentPath:i,setCurrentPath:c,navigateUp:f,selectedItems:d,toggleSelection:h,selectRange:p,lastSelectedPath:C,selectAll:D,clearSelection:x,refreshKey:y,setFocusedItem:A,triggerRefresh:z,triggerScan:_,searchQuery:q,showError:H,setFileItems:G,editedImageKey:oe}=po(),[J,ce]=v.useState([]),[Q,le]=v.useState(!0),[X,P]=v.useState(!1),[te,ae]=v.useState(null),j=v.useRef(!0),W=v.useRef(i);v.useEffect(()=>{async function S(){const O=W.current!==i;(j.current||O)&&le(!0),W.current=i;try{const ne=q&&q.length>=2?await di.search(q,i):await di.list(i),re=ne.items||[];ce(re),G(re),P(ne.isEmpty===!0)}catch(ne){const re=ne instanceof Error?ne.message:"Failed to load items";H("Load Error",re),ce([]),G([]),P(!1)}le(!1),j.current=!1}S()},[i,y,q,H,G]),v.useEffect(()=>{async function S(){if(i!=="public"){ae(null);return}try{const O=await di.checkFeaturedImage();ae(O)}catch{ae(null)}}S()},[i,y]);const he=i==="public",me=q&&q.length>=2,ge=[...J].sort((S,O)=>S.type==="folder"&&O.type!=="folder"?-1:S.type!=="folder"&&O.type==="folder"?1:S.name.localeCompare(O.name)),ie=ge.length>0&&ge.every(S=>d.has(S.path)),Oe=ge.some(S=>d.has(S.path)),T=v.useCallback((S,O)=>{O.shiftKey&&C?p(C,S.path,ge):h(S.path)},[C,p,ge,h]),Z=v.useCallback(S=>{S.type==="folder"?c(S.path):A(S)},[c,A]),ee=v.useCallback(async S=>{try{const O="/"+S.path.replace(/^public\//,"");await di.reprocess([O]),z()}catch(O){const ne=O instanceof Error?O.message:"Failed to generate thumbnail";H("Processing Error",ne)}},[z,H]),Ee=v.useCallback(()=>{ie?x():D(ge)},[ie,x,D,ge]),qe=te&&!te.exists?te:null;return{items:J,loading:Q,sortedItems:ge,metaEmpty:X,missingFeaturedImage:qe,isAtRoot:he,isSearching:me,allItemsSelected:ie,someItemsSelected:Oe,currentPath:i,selectedItems:d,navigateUp:f,editedImageKey:oe,handleItemClick:T,handleOpen:Z,handleGenerateThumbnail:ee,handleSelectAll:Ee,triggerScan:_,triggerRefresh:z}}const V1=Ft`
71
+ `);ve=ot.pop()||"";for(const it of ot){if(!it.startsWith("data: "))continue;const je=JSON.parse(it.slice(6));if(je.type==="start")Re({current:0,total:je.total,percent:0,status:"processing",message:`Scanning ${je.total} files...`});else if(je.type==="progress")Re({current:je.current,total:je.total,percent:je.percent,status:"processing",currentFile:je.currentFile});else if(je.type==="cleanup")Re(pn=>({...pn,message:je.message}));else if(je.type==="complete"){let pn=je.renamed>0?`${je.renamed} file(s) renamed due to conflicts. `:"";je.orphanedFiles&&je.orphanedFiles.length>0&&(pn+=`Found ${je.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Re({current:je.total||0,total:je.total||0,percent:100,status:"complete",processed:je.added,alreadyProcessed:je.existingCount,errors:je.errors,orphanedFiles:je.orphanedFiles,pendingUpdates:je.pendingUpdates,orphanedEntries:je.orphanedEntries,message:pn||void 0,isScan:!0}),p()}else je.type==="error"&&Re({current:0,total:0,percent:0,status:"error",message:je.message||"Scan failed"})}}}catch(pe){console.error("Scan error:",pe),Re({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{X(!1)}},[p]);v.useEffect(()=>{const pe=se=>{mn.current&&!mn.current.contains(se.target)&&hn(!1),W.current&&!W.current.contains(se.target)&&kn(!1)};return document.addEventListener("mousedown",pe),()=>document.removeEventListener("mousedown",pe)},[]),v.useEffect(()=>{D&&!le&&(x(),Ue())},[D,le,x,Ue]);const De=v.useCallback(async pe=>{const se=pe.target.files;if(!se||se.length===0)return;const be=Array.from(se);be.length>1?(Re({current:0,total:be.length,percent:0,status:"processing",message:"Uploading files..."}),we(!0)):Q(!0);let ve=0,He=0;try{for(let Ne=0;Ne<be.length;Ne++){const ot=be[Ne],it=new FormData;it.append("file",ot),it.append("path",h);try{const je=await fetch("/api/studio/upload",{method:"POST",body:it});if(je.ok)ve++;else{const pn=await je.json();He++,be.length===1&&(je.status>=500?(console.error("Upload error:",pn),Je({title:"Upload Failed",message:`Failed to upload ${ot.name}: ${pn.error||"Unknown error"}`})):Je({title:"Cannot Upload Here",message:pn.error||"Upload not allowed in this location."}))}}catch{He++}be.length>1&&Re({current:Ne+1,total:be.length,percent:Math.round((Ne+1)/be.length*100),status:"processing",currentFile:ot.name})}be.length>1&&Re({current:be.length,total:be.length,percent:100,status:"complete",processed:ve,errors:He}),p()}catch(Ne){console.error("Upload error:",Ne),be.length>1?Re({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):Je({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{Q(!1),H.current&&(H.current.value="")}},[h,p]),Mt=v.useCallback(async pe=>{if(i.size>0){const be=Array.from(i),ve=be.filter(Ne=>(Ne.split("/").pop()||"").includes(".")&&!Ne.endsWith("/")),He=be.filter(Ne=>!(Ne.split("/").pop()||"").includes(".")||Ne.endsWith("/"));if(He.length>0)try{const ot=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(He.join(","))}`)).json();if(ot.images)for(const it of ot.images){const je=`public/${it}`;ve.includes(je)||ve.push(je)}}catch(Ne){console.error("Failed to get folder files:",Ne)}if(ve.length===0){Je({title:"No Files Found",message:"No files found in the selected items."});return}z(pe),A(ve)}else try{const ve=await(await fetch("/api/studio/count-images")).json();if(!ve.images||ve.images.length===0){Je({title:"No Images Found",message:"No images found in the public folder to process."});return}const He=ve.images.map(Ne=>`public/${Ne}`);z(pe),A(He)}catch(be){console.error("Failed to get images:",be),Je({title:"Error",message:"Failed to get images."})}},[i,A,z]),bt=v.useCallback(()=>{ue.stop(),G.current&&(Re(pe=>({...pe,status:"stopping"})),G.current.abort())},[ue]),Aa=v.useCallback(async()=>{const pe=St.orphanedFiles;if(!(!pe||pe.length===0))try{const se=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:pe})}),be=await se.json();se.ok?(Re(ve=>({...ve,orphanedFiles:void 0,orphansRemoved:be.deleted,message:`Deleted ${be.deleted} orphaned thumbnail${be.deleted!==1?"s":""}.`})),p()):Je({title:"Delete Failed",message:be.error||"Failed to delete orphaned files."})}catch(se){console.error("Delete orphans error:",se),Je({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[St.orphanedFiles,p]),ia=v.useCallback(async()=>{if(i.size===0)return;const pe=Array.from(i),se=pe.filter(He=>(He.split("/").pop()||"").includes(".")&&!He.endsWith("/")),be=pe.filter(He=>!(He.split("/").pop()||"").includes(".")||He.endsWith("/"));let ve=se.length;if(be.length>0)try{const Ne=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(be.join(","))}`)).json();Ne.images&&(ve+=Ne.images.length)}catch(He){console.error("Failed to get folder files:",He)}he(ve),j(!0)},[i]),zl=v.useCallback(async()=>{j(!1);const pe=Array.from(i);pe.length!==0&&await ue.execute({endpoint:"/api/studio/delete-stream",body:{paths:pe},title:"Deleting Files",operationType:"delete",onComplete:()=>{d()}})},[i,d,ue]),B=v.useCallback(async()=>{if(i.size===0)return;const pe=Array.from(i),se=pe.filter(it=>(it.split("/").pop()||"").includes(".")&&!it.endsWith("/")),be=pe.filter(it=>!(it.split("/").pop()||"").includes(".")||it.endsWith("/")),ve=be.length>0;if(ve)try{const je=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(be.join(","))}`)).json();if(je.images)for(const pn of je.images){const xo=`public/${pn}`;se.includes(xo)||se.push(xo)}}catch(it){console.error("Failed to get folder files:",it)}if(se.length===0){Je({title:"No Files Found",message:"No files found in the selected items."});return}let He=!1,Ne=!1,ot=0;for(const it of se){const je=y.find(pn=>pn.path===it);je?je.isRemote?He=!0:je.cdnPushed?ot++:Ne=!0:ve&&(Ne=!0)}if(!ve&&ot===se.length){Je({title:"Already Pushed",message:`All ${se.length} file${se.length!==1?"s are":" is"} already on the CDN.`});return}Oe(se.length),Z(He),Ee(Ne),ge(!0)},[i,y]),_e=v.useCallback(async()=>{ge(!1);const pe=Array.from(i),se=pe.filter(He=>(He.split("/").pop()||"").includes(".")&&!He.endsWith("/")),be=pe.filter(He=>!(He.split("/").pop()||"").includes(".")||He.endsWith("/"));if(be.length>0)try{const Ne=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(be.join(","))}`)).json();if(Ne.images)for(const ot of Ne.images){const it=`public/${ot}`;se.includes(it)||se.push(it)}}catch(He){console.error("Failed to get folder files:",He)}const ve=se.map(He=>"/"+He.replace(/^public\//,""));ve.length!==0&&await ue.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:ve},title:"Pushing to CDN",onComplete:()=>{d()},onError:He=>{(He.includes("R2 not configured")||He.includes("CLOUDFLARE_R2"))&&(we(!1),mt(!0))}})},[i,d,ue]),[ze,Qe]=v.useState([]),[st,zn]=v.useState(0),Ml=v.useCallback(async()=>{if(i.size===0)return;const pe=Array.from(i),se=pe.filter(Ne=>(Ne.split("/").pop()||"").includes(".")&&!Ne.endsWith("/")),be=pe.filter(Ne=>!(Ne.split("/").pop()||"").includes(".")||Ne.endsWith("/")),ve=be.length>0;if(ve)try{const ot=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(be.join(","))}`)).json();if(ot.images)for(const it of ot.images){const je=`public/${it}`;se.includes(je)||se.push(je)}}catch(Ne){console.error("Failed to get folder files:",Ne)}if(se.length===0){Je({title:"No Files Found",message:"No files found in the selected items."});return}let He;if(ve)He=se;else if(He=se.filter(Ne=>{const ot=y.find(it=>it.path===Ne);return ot&&ot.cdnPushed&&!ot.isRemote}),He.length===0){Je({title:"No CDN Files",message:`None of the ${se.length} selected file${se.length!==1?"s are":" is"} on the CDN.`});return}Qe(He),zn(se.length),ne(He.length),S(!0)},[i,y]),ra=v.useCallback(async()=>{S(!1),_.showDownloadConfirm&&q();const se=(_.showDownloadConfirm?_.actionPaths:ze).map(be=>"/"+be.replace(/^public\//,""));await ue.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:se},title:"Downloading from CDN",onComplete:()=>d()})},[ze,d,_.showDownloadConfirm,_.actionPaths,q,ue]),Bn=v.useCallback(async()=>{if(i.size===0)return;const se=Array.from(i).filter(be=>{const ve=y.find(He=>He.path===be);return ve&&(ve.hasUpdate||ve.type==="folder"&&ve.updateCount&&ve.updateCount>0)});if(se.length===0){Je({title:"No Updates",message:"No files with pending updates in selection."});return}await ue.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:se},title:"Pushing Updates",onComplete:()=>d()})},[i,y,d,ue]),Ut=v.useCallback(async()=>{if(i.size===0)return;const se=Array.from(i).filter(be=>{const ve=y.find(He=>He.path===be);return ve&&(ve.hasUpdate||ve.type==="folder"&&ve.updateCount&&ve.updateCount>0)});if(se.length!==0)try{const be=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:se})});if(be.ok)d(),p();else{const ve=await be.json();Je({title:"Cancel Failed",message:ve.error||"Unknown error"})}}catch(be){console.error("Cancel updates error:",be),Je({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[i,y,d,p]),Xr=v.useCallback(async pe=>{rt(!1);try{const se=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:pe})});if(se.ok)p();else{const be=await se.json();Je({title:"Create Folder Failed",message:be.error||"Unknown error"})}}catch(se){console.error("Create folder error:",se),Je({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,p]),bi=v.useCallback(()=>{i.size!==0&&Bt(!0)},[i]),vi=v.useCallback(async pe=>{const se=Array.from(i);await ue.execute({endpoint:"/api/studio/move",body:{paths:se,destination:pe},title:"Moving Files",onComplete:()=>d()})},[i,d,ue]),{searchQuery:mo,setSearchQuery:sa}=po(),yo=v.useCallback(pe=>{sa(pe.target.value)},[sa]),xi=v.useCallback(pe=>{pe.key==="Escape"&&(pe.stopPropagation(),sa(""),pe.target.blur())},[sa]),Kn=i.size>0;Kn&&Array.from(i).some(pe=>{const se=y.find(be=>be.path===pe);return se&&se.cdnPushed&&!se.isRemote}),Kn&&Array.from(i).every(pe=>{const se=y.find(be=>be.path===pe);return se&&se.type==="file"&&se.cdnPushed&&!se.isRemote});const In=Kn&&Array.from(i).some(pe=>{const se=y.find(be=>be.path===pe);return se&&(se.hasUpdate||se.type==="folder"&&se.updateCount&&se.updateCount>0)}),Lt=Array.from(i),Gt=Lt.length===1&&!Lt[0].includes("."),Mn=Gt?Lt[0]:null,Dl=Mn&&Mn.split("/").pop()||"",Ta=Lt.length===1&&Lt[0].includes("."),Ea=Ta?Lt[0]:null,bo=Ea&&Ea.split("/").pop()||"",ol=v.useCallback(async pe=>{Mn&&(Yt(!1),await ue.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:Mn,newName:pe},title:"Renaming Folder",onComplete:()=>d()}))},[Mn,d,ue]),vo=v.useCallback(async pe=>{Ea&&(Qt(!1),await ue.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:Ea,newName:pe},title:"Renaming File",onComplete:()=>d()}))},[Ea,d,ue]),ca=b(nt,{children:[(Ye||_.showDownloadConfirm)&&r(fo,{title:"Download from CDN",message:(()=>{const pe=_.showDownloadConfirm?_.downloadImageCount:O,se=_.showDownloadConfirm?_.downloadTotalSelected:st;return se>pe?`Download ${pe} of ${se} selected file${se!==1?"s":""} from Cloudflare R2? (${se-pe} not on CDN)`:`Download ${pe} image${pe!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:ra,onCancel:()=>{S(!1),_.showDownloadConfirm&&q()}}),re&&r(al,{title:Me,progress:St,onStop:bt,onDeleteOrphans:Aa,onClose:()=>{we(!1),Re({current:0,total:0,percent:0,status:"processing"}),p()}})]});return C?ca:b(nt,{children:[ca,ae&&r(fo,{title:"Delete Items",message:`Are you sure you want to delete ${$} file${$!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:zl,onCancel:()=>j(!1)}),me&&r(fo,{title:"Push to CDN",message:`Push ${ie} image${ie!==1?"s":""} to Cloudflare R2?${T?" Remote images will be downloaded first.":""}${ee?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:_e,onCancel:()=>ge(!1)}),We&&r(Cl,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:Xr,onCancel:()=>rt(!1)}),fn&&r(Fp,{selectedItems:i,currentPath:h,onMove:pe=>{Bt(!1),vi(pe)},onCancel:()=>Bt(!1)}),Ht&&Mn&&r(Cl,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:Dl,defaultValue:Dl,confirmLabel:"Rename",onConfirm:ol,onCancel:()=>Yt(!1)}),tn&&Ea&&r(Cl,{title:"Rename File",message:"Enter a new name for the file:",placeholder:bo,defaultValue:bo,confirmLabel:"Rename",onConfirm:vo,onCancel:()=>Qt(!1)}),Pt&&r(Gr,{title:Pt.title,message:Pt.message,onClose:()=>{Je(null),p()}}),r(Qp,{isOpen:$e,onClose:()=>mt(!1)}),oe&&r(S1,{currentPath:h,onClose:()=>J(!1),onUploadComplete:()=>{J(!1),p()},streamingOperation:ue,setShowProgress:we,setProgressTitle:Xe,setProgressState:Re}),b("div",{css:ke.toolbar,children:[r("input",{ref:H,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:De,style:{display:"none"}}),b("div",{css:ke.left,children:[b("button",{css:[ke.btn,ke.btnPrimary,"",""],onClick:()=>J(!0),disabled:ce||Ve,children:[r(A1,{}),"Add New"]}),b("button",{css:ke.btn,onClick:()=>{Ta?Qt(!0):Gt?Yt(!0):rt(!0)},disabled:Ve&&!Gt&&!Ta,title:Ve&&!Gt&&!Ta?"Cannot create folders in protected images folder":void 0,children:[Ta||Gt?r(O1,{}):r(L1,{}),Ta?"Rename File":Gt?"Rename Folder":"New Folder"]}),r("div",{css:ke.divider}),b("div",{css:ke.cloudDropdownWrapper,ref:W,children:[b("button",{css:ke.btn,onClick:()=>kn(!Hn),disabled:_.showProgress||Ve,title:Ve?"Cannot process images folder":void 0,children:[r(q1,{}),"Thumbnails",r("svg",{css:ke.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Hn&&b("div",{css:ke.cloudDropdown,children:[b("button",{css:[ke.cloudDropdownItem,ke.cloudDropdownItemDefault,"",""],onClick:()=>{kn(!1),Mt("generate")},children:[r(Y1,{}),"Generate Thumbnails"]}),b("button",{css:[ke.cloudDropdownItem,ke.cloudDropdownItemDanger,"",""],onClick:()=>{kn(!1),Mt("remove")},children:[r(G1,{}),"Remove Thumbnails"]})]})]}),b("button",{css:[ke.btn,ke.btnDanger,"",""],onClick:ia,disabled:!Kn,children:[r(R1,{}),"Delete"]}),b("button",{css:ke.btn,onClick:bi,disabled:!Kn,children:[r(_1,{}),"Move"]}),b("div",{css:ke.cloudDropdownWrapper,ref:mn,children:[b("button",{css:[ke.btn,ke.btnCloud,"",""],onClick:()=>hn(!yt),disabled:!Kn,children:[r(kp,{}),"Cloud",r("svg",{css:ke.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),yt&&Kn&&b("div",{css:ke.cloudDropdown,children:[In&&b(nt,{children:[b("button",{css:ke.cloudDropdownItem,onClick:()=>{hn(!1),Bn()},children:[r(H1,{}),"Push Update"]}),b("button",{css:[ke.cloudDropdownItem,ke.cloudDropdownItemDanger,"",""],onClick:()=>{hn(!1),Ut()},children:[r(B1,{}),"Cancel Update"]}),r("div",{css:ke.cloudDropdownDivider})]}),b("button",{css:ke.cloudDropdownItem,onClick:()=>{hn(!1),B()},children:[r(kp,{}),"Push CDN"]}),b("button",{css:ke.cloudDropdownItem,onClick:()=>{hn(!1),Ml()},children:[r(U1,{}),"Download"]})]})]}),b("div",{css:ke.searchWrapper,children:[r("input",{css:ke.searchInput,type:"text",placeholder:"Search images...",value:mo,onChange:yo,onKeyDown:xi}),mo&&r("button",{css:ke.searchClearBtn,onClick:()=>sa(""),title:"Clear search",children:r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),b("div",{css:ke.right,children:[Kn&&b("span",{css:ke.selectionCount,children:[i.size," selected",r("button",{css:ke.clearBtn,onClick:d,children:"Clear"})]}),b("button",{css:ke.btn,onClick:Ue,disabled:le,children:[r(T1,{spinning:le}),"Scan"]}),r("button",{css:ke.btn,onClick:lt,title:"Refresh view",disabled:P,children:r(E1,{spinning:P})}),b("div",{css:ke.viewToggle,children:[r("button",{css:[ke.viewBtn,c==="grid"&&ke.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:r(N1,{})}),r("button",{css:[ke.viewBtn,c==="list"&&ke.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:r(j1,{})})]}),r(C1,{})]})]})]})}function A1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function T1({spinning:i}){return r("svg",{css:[ke.icon,i&&ke.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function E1({spinning:i}){return r("svg",{css:[ke.icon,i&&ke.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function R1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 L1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 O1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 _1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function kp(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}function H1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 B1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function U1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 N1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 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 j1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function q1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 Y1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function G1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}class X1{async get(c){const f=await fetch(c,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!f.ok){const d=await f.json().catch(()=>({}));throw new Error(d.error||`Request failed: ${f.status}`)}return f.json()}async post(c,f){const d=await fetch(c,{method:"POST",headers:f?{"Content-Type":"application/json"}:void 0,body:f?JSON.stringify(f):void 0});if(!d.ok){const h=await d.json().catch(()=>({}));throw new Error(h.error||`Request failed: ${d.status}`)}return d.json()}async list(c="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(c)}`)}async search(c,f="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(c)}&path=${encodeURIComponent(f)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(c){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(c.join(","))}`)}async upload(c,f="public"){const d=new FormData;d.append("file",c),d.append("path",f);const h=await fetch("/api/studio/upload",{method:"POST",body:d});if(!h.ok){const p=await h.json().catch(()=>({}));throw new Error(p.error||`Upload failed: ${h.status}`)}return h.json()}async delete(c){return this.post("/api/studio/delete",{paths:c})}async createFolder(c,f){return this.post("/api/studio/create-folder",{parentPath:c,name:f})}async rename(c,f){return this.post("/api/studio/rename",{oldPath:c,newName:f})}async move(c,f){return this.post("/api/studio/move",{paths:c,destination:f})}async push(c){return this.post("/api/studio/sync",{imageKeys:c})}async reprocess(c){return this.post("/api/studio/reprocess",{imageKeys:c})}processAllStream(){return new EventSource("/api/studio/process-all")}async checkFeaturedImage(){return this.get("/api/studio/check-featured-image")}async getFeaturedImageOptions(){return this.get("/api/studio/featured-image-options")}}const di=new X1;function Kp(){const{currentPath:i,setCurrentPath:c,navigateUp:f,selectedItems:d,toggleSelection:h,selectRange:p,lastSelectedPath:C,selectAll:D,clearSelection:x,refreshKey:y,setFocusedItem:A,triggerRefresh:z,triggerScan:_,searchQuery:q,showError:H,setFileItems:G,editedImageKey:oe}=po(),[J,ce]=v.useState([]),[Q,le]=v.useState(!0),[X,P]=v.useState(!1),[te,ae]=v.useState(null),j=v.useRef(!0),$=v.useRef(i);v.useEffect(()=>{async function S(){const O=$.current!==i;(j.current||O)&&le(!0),$.current=i;try{const ne=q&&q.length>=2?await di.search(q,i):await di.list(i),re=ne.items||[];ce(re),G(re),P(ne.isEmpty===!0)}catch(ne){const re=ne instanceof Error?ne.message:"Failed to load items";H("Load Error",re),ce([]),G([]),P(!1)}le(!1),j.current=!1}S()},[i,y,q,H,G]),v.useEffect(()=>{async function S(){if(i!=="public"){ae(null);return}try{const O=await di.checkFeaturedImage();ae(O)}catch{ae(null)}}S()},[i,y]);const he=i==="public",me=q&&q.length>=2,ge=[...J].sort((S,O)=>S.type==="folder"&&O.type!=="folder"?-1:S.type!=="folder"&&O.type==="folder"?1:S.name.localeCompare(O.name)),ie=ge.length>0&&ge.every(S=>d.has(S.path)),Oe=ge.some(S=>d.has(S.path)),T=v.useCallback((S,O)=>{O.shiftKey&&C?p(C,S.path,ge):h(S.path)},[C,p,ge,h]),Z=v.useCallback(S=>{S.type==="folder"?c(S.path):A(S)},[c,A]),ee=v.useCallback(async S=>{try{const O="/"+S.path.replace(/^public\//,"");await di.reprocess([O]),z()}catch(O){const ne=O instanceof Error?O.message:"Failed to generate thumbnail";H("Processing Error",ne)}},[z,H]),Ee=v.useCallback(()=>{ie?x():D(ge)},[ie,x,D,ge]),Ye=te&&!te.exists?te:null;return{items:J,loading:Q,sortedItems:ge,metaEmpty:X,missingFeaturedImage:Ye,isAtRoot:he,isSearching:me,allItemsSelected:ie,someItemsSelected:Oe,currentPath:i,selectedItems:d,navigateUp:f,editedImageKey:oe,handleItemClick:T,handleOpen:Z,handleGenerateThumbnail:ee,handleSelectAll:Ee,triggerScan:_,triggerRefresh:z}}const V1=Ft`
72
72
  from { opacity: 0; }
73
73
  to { opacity: 1; }
74
74
  `,F1=Ft`
@@ -76,20 +76,20 @@ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function z1({onClose:i}){
76
76
  to { transform: translateY(0); opacity: 1; }
77
77
  `,Q1=Ft`
78
78
  to { transform: rotate(360deg); }
79
- `,sn={overlay:m("position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.5);animation:",V1," 0.15s ease;",""),modal:m("background:",s.surface,";border-radius:12px;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);width:100%;max-width:440px;animation:",F1," 0.2s ease;overflow:hidden;",""),header:m("padding:20px 24px;border-bottom:1px solid ",s.border,";",""),title:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;",""),subtitle:m("font-size:",N.sm,";color:",s.textSecondary,";margin:4px 0 0 0;",""),body:{name:"1a7zdz",styles:"padding:24px;display:flex;flex-direction:column;gap:12px"},loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},spinner:m("width:24px;height:24px;border-radius:50%;border:2px solid ",s.border,";border-top-color:",s.primary,";animation:",Q1," 0.8s linear infinite;",""),urlButton:m("display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px 20px;background:",s.background,";border:1px solid ",s.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover:not(:disabled){background:",s.surfaceHover,";border-color:",s.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),urlLabel:m("font-size:",N.xs,";font-weight:600;color:",s.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:m("font-size:",N.base,";font-weight:500;color:",s.text,";word-break:break-all;",""),noOptions:m("padding:20px;text-align:center;color:",s.textSecondary,";font-size:",N.sm,";",""),footer:m("padding:16px 24px;border-top:1px solid ",s.border,";display:flex;justify-content:flex-end;",""),cancelBtn:m("padding:10px 20px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",s.text,";&:hover{background:",s.surfaceHover,";border-color:",s.borderHover,";}","")};function Zp({isOpen:i,onClose:c,onSelect:f}){const[d,h]=v.useState(!0),[p,C]=v.useState(null),[D,x]=v.useState(null);if(v.useEffect(()=>{if(!i)return;async function A(){h(!0);try{const z=await di.getFeaturedImageOptions();C(z.devUrl),x(z.productionUrl)}catch(z){console.error("Failed to load featured image options:",z)}h(!1)}A()},[i]),!i)return null;const y=p||D;return r("div",{css:sn.overlay,onClick:c,children:b("div",{css:sn.modal,onClick:A=>A.stopPropagation(),children:[b("div",{css:sn.header,children:[r("h2",{css:sn.title,children:"Generate Screenshot"}),r("p",{css:sn.subtitle,children:"Choose which URL to screenshot"})]}),r("div",{css:sn.body,children:d?r("div",{css:sn.loading,children:r("div",{css:sn.spinner})}):y?b(tt,{children:[p&&b("button",{css:sn.urlButton,onClick:()=>f(p),children:[r("span",{css:sn.urlLabel,children:"Development"}),r("span",{css:sn.urlValue,children:p})]}),D&&b("button",{css:sn.urlButton,onClick:()=>f(D),children:[r("span",{css:sn.urlLabel,children:"Production"}),r("span",{css:sn.urlValue,children:D})]})]}):b("div",{css:sn.noOptions,children:["No URLs configured. Set ",r("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),r("div",{css:sn.footer,children:r("button",{css:sn.cancelBtn,onClick:c,children:"Cancel"})})]})})}const K1=Ft`
79
+ `,sn={overlay:m("position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.5);animation:",V1," 0.15s ease;",""),modal:m("background:",s.surface,";border-radius:12px;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);width:100%;max-width:440px;animation:",F1," 0.2s ease;overflow:hidden;",""),header:m("padding:20px 24px;border-bottom:1px solid ",s.border,";",""),title:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;",""),subtitle:m("font-size:",N.sm,";color:",s.textSecondary,";margin:4px 0 0 0;",""),body:{name:"1a7zdz",styles:"padding:24px;display:flex;flex-direction:column;gap:12px"},loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},spinner:m("width:24px;height:24px;border-radius:50%;border:2px solid ",s.border,";border-top-color:",s.primary,";animation:",Q1," 0.8s linear infinite;",""),urlButton:m("display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px 20px;background:",s.background,";border:1px solid ",s.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover:not(:disabled){background:",s.surfaceHover,";border-color:",s.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),urlLabel:m("font-size:",N.xs,";font-weight:600;color:",s.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:m("font-size:",N.base,";font-weight:500;color:",s.text,";word-break:break-all;",""),noOptions:m("padding:20px;text-align:center;color:",s.textSecondary,";font-size:",N.sm,";",""),footer:m("padding:16px 24px;border-top:1px solid ",s.border,";display:flex;justify-content:flex-end;",""),cancelBtn:m("padding:10px 20px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",s.text,";&:hover{background:",s.surfaceHover,";border-color:",s.borderHover,";}","")};function Zp({isOpen:i,onClose:c,onSelect:f}){const[d,h]=v.useState(!0),[p,C]=v.useState(null),[D,x]=v.useState(null);if(v.useEffect(()=>{if(!i)return;async function A(){h(!0);try{const z=await di.getFeaturedImageOptions();C(z.devUrl),x(z.productionUrl)}catch(z){console.error("Failed to load featured image options:",z)}h(!1)}A()},[i]),!i)return null;const y=p||D;return r("div",{css:sn.overlay,onClick:c,children:b("div",{css:sn.modal,onClick:A=>A.stopPropagation(),children:[b("div",{css:sn.header,children:[r("h2",{css:sn.title,children:"Generate Screenshot"}),r("p",{css:sn.subtitle,children:"Choose which URL to screenshot"})]}),r("div",{css:sn.body,children:d?r("div",{css:sn.loading,children:r("div",{css:sn.spinner})}):y?b(nt,{children:[p&&b("button",{css:sn.urlButton,onClick:()=>f(p),children:[r("span",{css:sn.urlLabel,children:"Development"}),r("span",{css:sn.urlValue,children:p})]}),D&&b("button",{css:sn.urlButton,onClick:()=>f(D),children:[r("span",{css:sn.urlLabel,children:"Production"}),r("span",{css:sn.urlValue,children:D})]})]}):b("div",{css:sn.noOptions,children:["No URLs configured. Set ",r("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),r("div",{css:sn.footer,children:r("button",{css:sn.cancelBtn,onClick:c,children:"Cancel"})})]})})}const K1=Ft`
80
80
  to { transform: rotate(360deg); }
81
- `,de={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:m("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",K1," 0.8s linear infinite;",""),empty:m("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",s.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:m("font-size:",N.base,";margin:0 0 4px 0;&:last-child{color:",s.textMuted,";font-size:",N.sm,";}",""),scanButton:m("margin-top:16px;padding:10px 24px;font-size:",N.base,";font-weight:500;background:",s.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",s.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:m("position:relative;border-radius:8px;border:1px solid ",s.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",s.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:m("border-color:",s.primary,";box-shadow:0 0 0 1px ",s.primary,";&:hover{border-color:",s.primary,";box-shadow:0 0 0 1px ",s.primary,";}",""),parentItem:m("cursor:pointer;&:hover{border-color:",s.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:m("width:18px;height:18px;accent-color:",s.primary,";cursor:pointer;",""),content:m("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",s.background,";",""),contentCloud:m("",""),contentRemote:m("",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:m("width:56px;height:56px;color:",s.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:m("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",s.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:m("width:56px;height:56px;color:",s.textMuted,";",""),fileIcon:m("width:40px;height:40px;color:",s.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:m("padding:10px 12px;background-color:",s.surface,";border-top:1px solid ",s.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:m("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",s.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:",s.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:m("display:flex;align-items:center;gap:3px;font-size:",N.xs,";",""),folderStatLocal:m("color:",s.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:m("width:14px;height:14px;color:",s.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:m("color:#f59e0b;font-size:",N.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:m("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:",s.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:m("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.surface,";border:1px solid ",s.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:",s.primaryLight,";border-color:",s.primary,";}",""),featuredPlaceholder:m("position:relative;border-radius:8px;border:2px dashed ",s.success,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",s.background,";&:hover{border-color:",s.success,";background-color:",s.successLight,";}",""),featuredContent:{name:"y8o17o",styles:"position:relative;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:8px"},featuredIcon:m("width:40px;height:40px;color:",s.success,";",""),featuredText:m("font-size:",N.sm,";color:",s.success,";text-align:center;font-weight:500;",""),featuredLabel:m("padding:10px 12px;background-color:",s.surface,";border-top:1px solid ",s.borderLight,";",""),name:m("font-size:",N.sm,";font-weight:500;color:",s.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:m("font-size:",N.xs,";color:",s.textMuted,";margin:2px 0 0 0;",""),selectAllRow:m("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",s.surface,";border-radius:8px;border:1px solid ",s.border,";",""),selectAllLabel:m("display:flex;align-items:center;gap:10px;font-size:",N.base,";font-weight:500;color:",s.textSecondary,";cursor:pointer;&:hover{color:",s.text,";}",""),selectAllCheckbox:m("width:16px;height:16px;accent-color:",s.primary,";","")};function Z1(){const{loading:i,sortedItems:c,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:p,allItemsSelected:C,someItemsSelected:D,selectedItems:x,navigateUp:y,handleItemClick:A,handleOpen:z,handleGenerateThumbnail:_,handleSelectAll:q,triggerScan:H,triggerRefresh:G,editedImageKey:oe}=Kp(),[J,ce]=v.useState(!1),[Q,le]=v.useState(!1),[X,P]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),te=()=>{ce(!0)},ae=async j=>{ce(!1),le(!0),P({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const W=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:j})});if(!W.ok){const ge=await W.json();P({current:0,total:4,percent:0,status:"error",message:ge.error||"Failed to generate screenshot"});return}const he=W.body?.getReader(),me=new TextDecoder;if(he){let ge="";for(;;){const{done:ie,value:Oe}=await he.read();if(ie)break;ge+=me.decode(Oe,{stream:!0});const T=ge.split(`
82
- `);ge=T.pop()||"";for(const Z of T)if(Z.startsWith("data: "))try{const ee=JSON.parse(Z.slice(6));ee.type==="start"?P(Ee=>({...Ee,total:ee.total,message:`Screenshotting ${ee.url}...`})):ee.type==="progress"?P({current:ee.current,total:ee.total,percent:ee.percent,status:"processing",message:ee.message}):ee.type==="complete"?(P({current:ee.processed,total:ee.processed,percent:100,status:ee.errors>0?"error":"complete",message:ee.message}),G()):ee.type==="error"&&P(Ee=>({...Ee,status:"error",message:ee.message}))}catch{}}}}catch(W){console.error("Featured image generation error:",W),P({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?b(tt,{children:[Q&&r(al,{title:"Generating Screenshot",progress:X,onClose:()=>le(!1)}),r("div",{css:de.loading,children:r("div",{css:de.spinner})})]}):f&&h?b("div",{css:de.empty,children:[r("svg",{css:de.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),r("p",{css:de.emptyText,children:"No files tracked yet"}),r("p",{css:de.emptyText,children:"Click Scan to discover files in your public folder"}),r("button",{css:de.scanButton,onClick:H,children:"Scan for Files"})]}):c.length===0&&h?b("div",{css:de.empty,children:[r("svg",{css:de.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r("p",{css:de.emptyText,children:"No files in this folder"}),r("p",{css:de.emptyText,children:"Upload images or click Scan in the toolbar"})]}):b(tt,{children:[r(Zp,{isOpen:J,onClose:()=>ce(!1),onSelect:ae}),Q&&r(al,{title:"Generating Screenshot",progress:X,onClose:()=>le(!1)}),b("div",{children:[c.length>0&&r("div",{css:de.selectAllRow,children:b("label",{css:de.selectAllLabel,children:[r("input",{type:"checkbox",css:de.selectAllCheckbox,checked:C,ref:j=>{j&&(j.indeterminate=D&&!C)},onChange:q}),"Select all (",c.length,")"]})}),b("div",{css:de.grid,children:[!h&&!p&&b("div",{css:[de.item,de.parentItem,"",""],onClick:y,children:[r("div",{css:de.content,children:r("svg",{css:de.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),b("div",{css:de.label,children:[r("p",{css:de.name,children:".."}),r("p",{css:de.size,children:"Parent folder"})]})]}),c.map(j=>r($1,{item:j,isSelected:x.has(j.path),onClick:W=>A(j,W),onOpen:()=>z(j),onGenerateThumbnail:()=>_(j),editedImageKey:oe},j.path)),h&&d&&!p&&b("div",{css:de.featuredPlaceholder,onClick:te,title:`Generate ${d.filename}`,children:[b("div",{css:de.featuredContent,children:[r("svg",{css:de.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r("span",{css:de.featuredText,children:"Generate Screenshot"})]}),b("div",{css:de.featuredLabel,children:[r("p",{css:de.name,children:d.filename}),r("p",{css:de.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function J1(i){return i.includes("/images/sm/")?"SM":i.includes("/images/md/")?"MD":i.includes("/images/lg/")?"LG":i.includes("/images/full/")?"FULL":null}function $1({item:i,isSelected:c,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:p}){const[C,D]=v.useState(!1),x=i.type==="folder",y=!x&&i.thumbnail!==void 0,A=i.thumbnail&&p&&p.path===i.path?`${i.thumbnail}?v=${p.key}`:i.thumbnail,z=i.isProtected||x&&i.name==="images"&&i.path==="public/images",_=J1(i.path),q=!x&&(i.hasSm||i.hasMd||i.hasLg||i.hasFull||_),H=oe=>{oe.stopPropagation();const J="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(J),D(!0),setTimeout(()=>D(!1),1500)},G=oe=>{if(z){oe.stopPropagation(),d();return}f(oe)};return b("div",{css:[de.item,c&&!z&&de.itemSelected,"",""],onClick:G,children:[!z&&r("div",{css:de.checkboxWrapper,onClick:oe=>oe.stopPropagation(),children:r("input",{type:"checkbox",css:de.checkbox,checked:c,onChange:()=>f({})})}),b("div",{css:[de.content,i.isCloud&&de.contentCloud,i.isRemote&&de.contentRemote,"",""],children:[b("button",{css:de.copyBtn,onClick:H,title:"Copy file path",children:[C&&r("span",{css:de.tooltip,children:"Copied!"}),r("svg",{css:de.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:de.openBtn,onClick:oe=>{oe.stopPropagation(),d()},children:"Open"}),x?z?b("div",{css:de.imagesFolderWrapper,children:[r("svg",{css:de.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),r("svg",{css:de.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):r("svg",{css:de.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}):y&&A?r("img",{css:de.image,src:A,alt:i.name,loading:"lazy"}):r("svg",{css:de.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})]}),r("div",{css:de.label,children:r("div",{css:de.labelRow,children:b("div",{css:de.labelText,children:[r("p",{css:de.name,title:i.name,children:i.name}),x?b("div",{css:de.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[de.folderStat,de.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:de.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),i.localCount]}),i.cloudCount!==void 0&&i.cloudCount>0&&b("span",{css:[de.folderStat,de.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:de.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),i.cloudCount]}),i.remoteCount!==void 0&&i.remoteCount>0&&b("span",{css:[de.folderStat,de.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:de.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),i.remoteCount]}),i.updateCount!==void 0&&i.updateCount>0&&b("span",{css:[de.folderStat,de.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:de.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),i.updateCount]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount!==void 0&&b("span",{css:de.size,children:[i.fileCount," files"]})]}):b("div",{css:de.statusRow,children:[r("div",{css:de.statusLeft,children:i.hasUpdate?b(tt,{children:[r("svg",{css:de.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("svg",{css:de.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),r("span",{css:de.updateLabel,children:"update"})]}):i.cdnPushed?r("svg",{css:i.isRemote?de.storedIconRemote:de.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}):i.size!==void 0?r("span",{css:de.size,children:W1(i.size)}):null}),q&&r("span",{css:de.thumbChips,children:_?r("span",{css:de.thumbChip,children:_}):b(tt,{children:[i.hasSm&&r("span",{css:de.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:de.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:de.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:de.thumbChip,children:"FULL"})]})})]})]})})})]})}function W1(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const I1=Ft`
81
+ `,de={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:m("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",K1," 0.8s linear infinite;",""),empty:m("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",s.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:m("font-size:",N.base,";margin:0 0 4px 0;&:last-child{color:",s.textMuted,";font-size:",N.sm,";}",""),scanButton:m("margin-top:16px;padding:10px 24px;font-size:",N.base,";font-weight:500;background:",s.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",s.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:m("position:relative;border-radius:8px;border:1px solid ",s.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",s.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:m("border-color:",s.primary,";box-shadow:0 0 0 1px ",s.primary,";&:hover{border-color:",s.primary,";box-shadow:0 0 0 1px ",s.primary,";}",""),parentItem:m("cursor:pointer;&:hover{border-color:",s.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:m("width:18px;height:18px;accent-color:",s.primary,";cursor:pointer;",""),content:m("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",s.background,";",""),contentCloud:m("",""),contentRemote:m("",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:m("width:56px;height:56px;color:",s.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:m("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",s.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:m("width:56px;height:56px;color:",s.textMuted,";",""),fileIcon:m("width:40px;height:40px;color:",s.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:m("padding:10px 12px;background-color:",s.surface,";border-top:1px solid ",s.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:m("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",s.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:",s.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:m("display:flex;align-items:center;gap:3px;font-size:",N.xs,";",""),folderStatLocal:m("color:",s.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:m("width:14px;height:14px;color:",s.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:m("color:#f59e0b;font-size:",N.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:m("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:",s.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:m("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.surface,";border:1px solid ",s.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:",s.primaryLight,";border-color:",s.primary,";}",""),featuredPlaceholder:m("position:relative;border-radius:8px;border:2px dashed ",s.success,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",s.background,";&:hover{border-color:",s.success,";background-color:",s.successLight,";}",""),featuredContent:{name:"y8o17o",styles:"position:relative;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:8px"},featuredIcon:m("width:40px;height:40px;color:",s.success,";",""),featuredText:m("font-size:",N.sm,";color:",s.success,";text-align:center;font-weight:500;",""),featuredLabel:m("padding:10px 12px;background-color:",s.surface,";border-top:1px solid ",s.borderLight,";",""),name:m("font-size:",N.sm,";font-weight:500;color:",s.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:m("font-size:",N.xs,";color:",s.textMuted,";margin:2px 0 0 0;",""),selectAllRow:m("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",s.surface,";border-radius:8px;border:1px solid ",s.border,";",""),selectAllLabel:m("display:flex;align-items:center;gap:10px;font-size:",N.base,";font-weight:500;color:",s.textSecondary,";cursor:pointer;&:hover{color:",s.text,";}",""),selectAllCheckbox:m("width:16px;height:16px;accent-color:",s.primary,";","")};function Z1(){const{loading:i,sortedItems:c,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:p,allItemsSelected:C,someItemsSelected:D,selectedItems:x,navigateUp:y,handleItemClick:A,handleOpen:z,handleGenerateThumbnail:_,handleSelectAll:q,triggerScan:H,triggerRefresh:G,editedImageKey:oe}=Kp(),[J,ce]=v.useState(!1),[Q,le]=v.useState(!1),[X,P]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),te=()=>{ce(!0)},ae=async j=>{ce(!1),le(!0),P({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const $=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:j})});if(!$.ok){const ge=await $.json();P({current:0,total:4,percent:0,status:"error",message:ge.error||"Failed to generate screenshot"});return}const he=$.body?.getReader(),me=new TextDecoder;if(he){let ge="";for(;;){const{done:ie,value:Oe}=await he.read();if(ie)break;ge+=me.decode(Oe,{stream:!0});const T=ge.split(`
82
+ `);ge=T.pop()||"";for(const Z of T)if(Z.startsWith("data: "))try{const ee=JSON.parse(Z.slice(6));ee.type==="start"?P(Ee=>({...Ee,total:ee.total,message:`Screenshotting ${ee.url}...`})):ee.type==="progress"?P({current:ee.current,total:ee.total,percent:ee.percent,status:"processing",message:ee.message}):ee.type==="complete"?(P({current:ee.processed,total:ee.processed,percent:100,status:ee.errors>0?"error":"complete",message:ee.message}),G()):ee.type==="error"&&P(Ee=>({...Ee,status:"error",message:ee.message}))}catch{}}}}catch($){console.error("Featured image generation error:",$),P({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?b(nt,{children:[Q&&r(al,{title:"Generating Screenshot",progress:X,onClose:()=>le(!1)}),r("div",{css:de.loading,children:r("div",{css:de.spinner})})]}):f&&h?b("div",{css:de.empty,children:[r("svg",{css:de.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),r("p",{css:de.emptyText,children:"No files tracked yet"}),r("p",{css:de.emptyText,children:"Click Scan to discover files in your public folder"}),r("button",{css:de.scanButton,onClick:H,children:"Scan for Files"})]}):c.length===0&&h?b("div",{css:de.empty,children:[r("svg",{css:de.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r("p",{css:de.emptyText,children:"No files in this folder"}),r("p",{css:de.emptyText,children:"Upload images or click Scan in the toolbar"})]}):b(nt,{children:[r(Zp,{isOpen:J,onClose:()=>ce(!1),onSelect:ae}),Q&&r(al,{title:"Generating Screenshot",progress:X,onClose:()=>le(!1)}),b("div",{children:[c.length>0&&r("div",{css:de.selectAllRow,children:b("label",{css:de.selectAllLabel,children:[r("input",{type:"checkbox",css:de.selectAllCheckbox,checked:C,ref:j=>{j&&(j.indeterminate=D&&!C)},onChange:q}),"Select all (",c.length,")"]})}),b("div",{css:de.grid,children:[!h&&!p&&b("div",{css:[de.item,de.parentItem,"",""],onClick:y,children:[r("div",{css:de.content,children:r("svg",{css:de.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),b("div",{css:de.label,children:[r("p",{css:de.name,children:".."}),r("p",{css:de.size,children:"Parent folder"})]})]}),c.map(j=>r(W1,{item:j,isSelected:x.has(j.path),onClick:$=>A(j,$),onOpen:()=>z(j),onGenerateThumbnail:()=>_(j),editedImageKey:oe},j.path)),h&&d&&!p&&b("div",{css:de.featuredPlaceholder,onClick:te,title:`Generate ${d.filename}`,children:[b("div",{css:de.featuredContent,children:[r("svg",{css:de.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r("span",{css:de.featuredText,children:"Generate Screenshot"})]}),b("div",{css:de.featuredLabel,children:[r("p",{css:de.name,children:d.filename}),r("p",{css:de.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function J1(i){return i.includes("/images/sm/")?"SM":i.includes("/images/md/")?"MD":i.includes("/images/lg/")?"LG":i.includes("/images/full/")?"FULL":null}function W1({item:i,isSelected:c,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:p}){const[C,D]=v.useState(!1),x=i.type==="folder",y=!x&&i.thumbnail!==void 0,A=i.thumbnail&&p&&p.path===i.path?`${i.thumbnail}?v=${p.key}`:i.thumbnail,z=i.isProtected||x&&i.name==="images"&&i.path==="public/images",_=J1(i.path),q=!x&&(i.hasSm||i.hasMd||i.hasLg||i.hasFull||_),H=oe=>{oe.stopPropagation();const J="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(J),D(!0),setTimeout(()=>D(!1),1500)},G=oe=>{if(z){oe.stopPropagation(),d();return}f(oe)};return b("div",{css:[de.item,c&&!z&&de.itemSelected,"",""],onClick:G,children:[!z&&r("div",{css:de.checkboxWrapper,onClick:oe=>oe.stopPropagation(),children:r("input",{type:"checkbox",css:de.checkbox,checked:c,onChange:()=>f({})})}),b("div",{css:[de.content,i.isCloud&&de.contentCloud,i.isRemote&&de.contentRemote,"",""],children:[b("button",{css:de.copyBtn,onClick:H,title:"Copy file path",children:[C&&r("span",{css:de.tooltip,children:"Copied!"}),r("svg",{css:de.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:de.openBtn,onClick:oe=>{oe.stopPropagation(),d()},children:"Open"}),x?z?b("div",{css:de.imagesFolderWrapper,children:[r("svg",{css:de.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),r("svg",{css:de.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):r("svg",{css:de.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}):y&&A?r("img",{css:de.image,src:A,alt:i.name,loading:"lazy"}):r("svg",{css:de.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})]}),r("div",{css:de.label,children:r("div",{css:de.labelRow,children:b("div",{css:de.labelText,children:[r("p",{css:de.name,title:i.name,children:i.name}),x?b("div",{css:de.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[de.folderStat,de.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:de.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),i.localCount]}),i.cloudCount!==void 0&&i.cloudCount>0&&b("span",{css:[de.folderStat,de.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:de.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),i.cloudCount]}),i.remoteCount!==void 0&&i.remoteCount>0&&b("span",{css:[de.folderStat,de.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:de.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),i.remoteCount]}),i.updateCount!==void 0&&i.updateCount>0&&b("span",{css:[de.folderStat,de.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:de.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),i.updateCount]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount!==void 0&&b("span",{css:de.size,children:[i.fileCount," files"]})]}):b("div",{css:de.statusRow,children:[r("div",{css:de.statusLeft,children:i.hasUpdate?b(nt,{children:[r("svg",{css:de.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("svg",{css:de.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),r("span",{css:de.updateLabel,children:"update"})]}):i.cdnPushed?r("svg",{css:i.isRemote?de.storedIconRemote:de.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}):i.size!==void 0?r("span",{css:de.size,children:$1(i.size)}):null}),q&&r("span",{css:de.thumbChips,children:_?r("span",{css:de.thumbChip,children:_}):b(nt,{children:[i.hasSm&&r("span",{css:de.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:de.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:de.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:de.thumbChip,children:"FULL"})]})})]})]})})})]})}function $1(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const I1=Ft`
83
83
  to { transform: rotate(360deg); }
84
- `,I={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:m("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",I1," 0.8s linear infinite;",""),empty:m("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",s.textSecondary,";",""),emptyHint:m("font-size:",N.sm,";color:",s.textMuted,";margin-top:4px;",""),scanButton:m("margin-top:16px;padding:10px 24px;font-size:",N.base,";font-weight:500;background:",s.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",s.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:m("background:",s.surface,";border-radius:8px;border:1px solid ",s.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:m("text-align:left;font-size:11px;color:",s.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",s.background,";border-bottom:1px solid ",s.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:m("",""),row:m("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",s.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",s.borderLight,";}",""),rowSelected:m("background-color:",s.primaryLight,";&:hover{background-color:",s.primaryLight,";}",""),parentRow:m("cursor:pointer;border-bottom:1px solid ",s.border,";&:hover{background-color:",s.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:m("width:18px;height:18px;accent-color:",s.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:m("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",N.xs,";color:",s.textSecondary,";background:",s.surface,";border:1px solid ",s.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",s.surfaceHover,";border-color:",s.borderHover,";color:",s.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:m("display:flex;align-items:center;gap:3px;font-size:",N.xs,";",""),folderStatLocal:m("color:",s.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:m("width:14px;height:14px;color:",s.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:m("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",N.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},storedLabel:{name:"s5xdrg",styles:"display:flex;align-items:center"},storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"1bu1odp",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},thumbnailWrapper:{name:"f01c4l",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:4px"},thumbnailCloud:m("",""),thumbnailRemote:m("",""),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:m("width:24px;height:24px;color:",s.imagesFolder,";",""),lockIcon:m("width:10px;height:10px;color:",s.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:m("width:20px;height:20px;color:",s.textMuted,";flex-shrink:0;",""),fileIcon:m("width:20px;height:20px;color:",s.textMuted,";flex-shrink:0;",""),thumbnail:m("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",s.borderLight,";",""),name:m("font-size:",N.base,";font-weight:500;color:",s.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:m("font-size:",N.sm,";color:",s.textSecondary,";",""),cdnBadge:m("display:inline-flex;align-items:center;gap:4px;font-size:",N.xs,";font-weight:500;color:",s.success,";",""),cdnBadgeRemote:m("display:inline-flex;align-items:center;font-size:",N.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:m("font-size:",N.sm,";color:",s.textMuted,";",""),featuredRow:m("cursor:pointer;transition:background-color 0.15s ease;border:2px dashed ",s.success,";&:hover{background-color:",s.successLight,";}td{border-bottom:none!important;}",""),featuredIcon:m("width:24px;height:24px;color:",s.success,";",""),featuredText:m("color:",s.success,";font-weight:500;",""),openBtn:m("height:32px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.surface,";border:1px solid ",s.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",s.primaryLight,";border-color:",s.primary,";}","")};function P1(){const{loading:i,sortedItems:c,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:p,allItemsSelected:C,someItemsSelected:D,selectedItems:x,navigateUp:y,handleItemClick:A,handleOpen:z,handleGenerateThumbnail:_,handleSelectAll:q,triggerScan:H,triggerRefresh:G,editedImageKey:oe}=Kp(),[J,ce]=v.useState(!1),[Q,le]=v.useState(!1),[X,P]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),te=()=>{ce(!0)},ae=async j=>{ce(!1),le(!0),P({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const W=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:j})});if(!W.ok){const ge=await W.json();P({current:0,total:4,percent:0,status:"error",message:ge.error||"Failed to generate screenshot"});return}const he=W.body?.getReader(),me=new TextDecoder;if(he){let ge="";for(;;){const{done:ie,value:Oe}=await he.read();if(ie)break;ge+=me.decode(Oe,{stream:!0});const T=ge.split(`
85
- `);ge=T.pop()||"";for(const Z of T)if(Z.startsWith("data: "))try{const ee=JSON.parse(Z.slice(6));ee.type==="start"?P(Ee=>({...Ee,total:ee.total,message:`Screenshotting ${ee.url}...`})):ee.type==="progress"?P({current:ee.current,total:ee.total,percent:ee.percent,status:"processing",message:ee.message}):ee.type==="complete"?(P({current:ee.processed,total:ee.processed,percent:100,status:ee.errors>0?"error":"complete",message:ee.message}),G()):ee.type==="error"&&P(Ee=>({...Ee,status:"error",message:ee.message}))}catch{}}}}catch(W){console.error("Featured image generation error:",W),P({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?r("div",{css:I.loading,children:r("div",{css:I.spinner})}):f&&h?b("div",{css:I.empty,children:[r("p",{children:"No files tracked yet"}),r("p",{css:I.emptyHint,children:"Click Scan to discover files in your public folder"}),r("button",{css:I.scanButton,onClick:H,children:"Scan for Files"})]}):c.length===0&&h?b("div",{css:I.empty,children:[r("p",{children:"No files in this folder"}),r("p",{css:I.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):b(tt,{children:[r(Zp,{isOpen:J,onClose:()=>ce(!1),onSelect:ae}),Q&&r(al,{title:"Generating Screenshot",progress:X,onClose:()=>le(!1)}),r("div",{css:I.tableWrapper,children:b("table",{css:I.table,children:[r("thead",{children:b("tr",{children:[r("th",{css:[I.th,I.thCheckbox,"",""],children:c.length>0&&r("input",{type:"checkbox",css:I.checkbox,checked:C,ref:j=>{j&&(j.indeterminate=D&&!C)},onChange:q})}),r("th",{css:I.th,children:"Name"}),r("th",{css:[I.th,I.thSize,"",""],children:"Size"}),r("th",{css:[I.th,I.thDimensions,"",""],children:"Dimensions"}),r("th",{css:[I.th,I.thCdn,"",""],children:"CDN"})]})}),b("tbody",{css:I.tbody,children:[!h&&!p&&b("tr",{css:I.parentRow,onClick:y,children:[r("td",{css:I.td}),r("td",{css:I.td,children:b("div",{css:I.nameCell,children:[r("svg",{css:I.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),r("span",{css:I.name,children:".."})]})}),r("td",{css:[I.td,I.meta,"",""],children:"--"}),r("td",{css:[I.td,I.meta,"",""],children:"Parent folder"}),r("td",{css:I.td,children:"--"})]}),c.map(j=>r(e2,{item:j,isSelected:x.has(j.path),onClick:W=>A(j,W),onOpen:()=>z(j),onGenerateThumbnail:()=>_(j),editedImageKey:oe},j.path)),h&&d&&!p&&b("tr",{css:I.featuredRow,onClick:te,title:`Generate ${d.filename}`,children:[r("td",{css:I.td}),r("td",{css:I.td,children:b("div",{css:I.nameCell,children:[r("div",{css:I.folderIconWrapper,children:r("svg",{css:I.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),r("span",{css:[I.name,I.featuredText,"",""],children:d.filename})]})}),r("td",{css:[I.td,I.meta,I.featuredText,"",""],children:"--"}),r("td",{css:[I.td,I.meta,I.featuredText,"",""],children:"Click to generate"}),r("td",{css:[I.td,I.featuredText,"",""],children:"--"})]})]})]})})]})}function e2({item:i,isSelected:c,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:p}){const[C,D]=v.useState(!1),x=i.type==="folder",y=!x&&i.thumbnail!==void 0,A=i.thumbnail&&p&&p.path===i.path?`${i.thumbnail}?v=${p.key}`:i.thumbnail,z=i.isProtected||x&&i.name==="images"&&i.path==="public/images",_=H=>{H.stopPropagation();const G="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(G),D(!0),setTimeout(()=>D(!1),1500)},q=H=>{if(z){H.stopPropagation(),d();return}f(H)};return b("tr",{css:[I.row,c&&!z&&I.rowSelected,"",""],onClick:q,children:[r("td",{css:[I.td,I.checkboxCell,"",""],onClick:H=>H.stopPropagation(),children:!z&&r("input",{type:"checkbox",css:I.checkbox,checked:c,onChange:()=>f({})})}),r("td",{css:I.td,children:b("div",{css:I.nameCell,children:[x?z?b("div",{css:I.imagesFolderWrapper,children:[r("svg",{css:I.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),r("svg",{css:I.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):r("div",{css:I.folderIconWrapper,children:r("svg",{css:I.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):y&&A?r("div",{css:[I.thumbnailWrapper,i.isCloud&&I.thumbnailCloud,i.isRemote&&I.thumbnailRemote,"",""],children:r("img",{css:I.thumbnail,src:A,alt:i.name,loading:"lazy"})}):r("div",{css:[I.thumbnailWrapper,i.isCloud&&I.thumbnailCloud,i.isRemote&&I.thumbnailRemote,"",""],children:r("svg",{css:I.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),r("span",{css:I.name,title:i.name,children:t2(i.name)}),b("div",{css:I.actionsCell,children:[b("button",{css:I.copyBtn,onClick:_,title:"Copy file path",children:[C&&r("span",{css:I.tooltip,children:"Copied!"}),r("svg",{css:I.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:I.openBtn,onClick:H=>{H.stopPropagation(),d()},children:"Open"})]})]})}),r("td",{css:[I.td,I.meta,"",""],children:x?b("div",{css:I.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[I.folderStat,I.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:I.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),i.localCount]}),i.cloudCount!==void 0&&i.cloudCount>0&&b("span",{css:[I.folderStat,I.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:I.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),i.cloudCount]}),i.remoteCount!==void 0&&i.remoteCount>0&&b("span",{css:[I.folderStat,I.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:I.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),i.remoteCount]}),i.updateCount!==void 0&&i.updateCount>0&&b("span",{css:[I.folderStat,I.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:I.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),i.updateCount]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount!==void 0&&b("span",{children:[i.fileCount," files"]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount===void 0&&"--"]}):i.hasUpdate?b("span",{css:I.updateLabel,children:[r("svg",{css:I.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("svg",{css:I.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"update"]}):i.cdnPushed?r("span",{css:I.storedLabel,children:r("svg",{css:i.isRemote?I.storedIconRemote:I.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}):i.size!==void 0?zp(i.size):"--"}),r("td",{css:[I.td,I.meta,"",""],children:x?i.totalSize!==void 0?zp(i.totalSize):"--":i.dimensions?`${i.dimensions.width}x${i.dimensions.height}`:"--"}),r("td",{css:I.td,children:i.cdnPushed?i.isRemote?r("span",{css:I.cdnBadgeRemote,children:"Remote"}):b("span",{css:I.cdnBadge,children:[r("svg",{css:I.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Pushed"]}):r("span",{css:I.cdnEmpty,children:"--"})})]})}function zp(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function t2(i,c=32){if(i.length<=c)return i;const f=i.lastIndexOf("."),d=f>0?i.substring(f):"",h=f>0?i.substring(0,f):i,p=c-d.length-3;if(p<6)return i.substring(0,c-3)+"...";const C=Math.ceil(p/2),D=Math.floor(p/2);return h.substring(0,C)+"..."+h.substring(h.length-D)+d}var n2=Object.defineProperty,a2=(i,c,f)=>c in i?n2(i,c,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[c]=f,_t=(i,c,f)=>a2(i,typeof c!="symbol"?c+"":c,f);const Nr={x:0,y:0,width:0,height:0,unit:"px"},ro=(i,c,f)=>Math.min(Math.max(i,c),f),l2=(...i)=>i.filter(c=>c&&typeof c=="string").join(" "),Mp=(i,c)=>i===c||i.width===c.width&&i.height===c.height&&i.x===c.x&&i.y===c.y&&i.unit===c.unit;function so(i,c,f){return i.unit==="%"?{...Nr,...i,unit:"%"}:{unit:"%",x:i.x?i.x/c*100:0,y:i.y?i.y/f*100:0,width:i.width?i.width/c*100:0,height:i.height?i.height/f*100:0}}function tl(i,c,f){return i.unit?i.unit==="px"?{...Nr,...i,unit:"px"}:{unit:"px",x:i.x?i.x*c/100:0,y:i.y?i.y*f/100:0,width:i.width?i.width*c/100:0,height:i.height?i.height*f/100:0}:{...Nr,...i,unit:"px"}}function Dp(i,c,f,d,h,p=0,C=0,D=d,x=h){const y={...i};let A=Math.min(p,d),z=Math.min(C,h),_=Math.min(D,d),q=Math.min(x,h);c&&(c>1?(A=C?C*c:A,z=A/c,_=D*c):(z=p?p/c:z,A=z*c,q=x/c)),y.y<0&&(y.height=Math.max(y.height+y.y,z),y.y=0),y.x<0&&(y.width=Math.max(y.width+y.x,A),y.x=0);const H=d-(y.x+y.width);H<0&&(y.x=Math.min(y.x,d-A),y.width+=H);const G=h-(y.y+y.height);if(G<0&&(y.y=Math.min(y.y,h-z),y.height+=G),y.width<A&&((f==="sw"||f=="nw")&&(y.x-=A-y.width),y.width=A),y.height<z&&((f==="nw"||f=="ne")&&(y.y-=z-y.height),y.height=z),y.width>_&&((f==="sw"||f=="nw")&&(y.x-=_-y.width),y.width=_),y.height>q&&((f==="nw"||f=="ne")&&(y.y-=q-y.height),y.height=q),c){const oe=y.width/y.height;if(oe<c){const J=Math.max(y.width/c,z);(f==="nw"||f=="ne")&&(y.y-=J-y.height),y.height=J}else if(oe>c){const J=Math.max(y.height*c,A);(f==="sw"||f=="nw")&&(y.x-=J-y.width),y.width=J}}return y}function o2(i,c,f,d){const h={...i};return c==="ArrowLeft"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="w"?(h.x-=f,h.width+=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="e"?h.width-=f:d==="se"&&(h.width-=f,h.height-=f):c==="ArrowRight"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="w"?(h.x+=f,h.width-=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="e"?h.width+=f:d==="se"&&(h.width+=f,h.height+=f)),c==="ArrowUp"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="n"?(h.y-=f,h.height+=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="s"?h.height-=f:d==="se"&&(h.width-=f,h.height-=f):c==="ArrowDown"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="n"?(h.y+=f,h.height-=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="s"?h.height+=f:d==="se"&&(h.width+=f,h.height+=f)),h}const co={capture:!0,passive:!1};let i2=0;const nl=class Wn extends v.PureComponent{constructor(){super(...arguments),_t(this,"docMoveBound",!1),_t(this,"mouseDownOnCrop",!1),_t(this,"dragStarted",!1),_t(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),_t(this,"componentRef",v.createRef()),_t(this,"mediaRef",v.createRef()),_t(this,"resizeObserver"),_t(this,"initChangeCalled",!1),_t(this,"instanceId",`rc-${i2++}`),_t(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),_t(this,"onCropPointerDown",c=>{const{crop:f,disabled:d}=this.props,h=this.getBox();if(!f)return;const p=tl(f,h.width,h.height);if(d)return;c.cancelable&&c.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const C=c.target.dataset.ord,D=!!C;let x=c.clientX,y=c.clientY,A=p.x,z=p.y;if(C){const _=c.clientX-h.x,q=c.clientY-h.y;let H=0,G=0;C==="ne"||C=="e"?(H=_-(p.x+p.width),G=q-p.y,A=p.x,z=p.y+p.height):C==="se"||C==="s"?(H=_-(p.x+p.width),G=q-(p.y+p.height),A=p.x,z=p.y):C==="sw"||C=="w"?(H=_-p.x,G=q-(p.y+p.height),A=p.x+p.width,z=p.y):(C==="nw"||C=="n")&&(H=_-p.x,G=q-p.y,A=p.x+p.width,z=p.y+p.height),x=A+h.x+H,y=z+h.y+G}this.evData={startClientX:x,startClientY:y,startCropX:A,startCropY:z,clientX:c.clientX,clientY:c.clientY,isResize:D,ord:C},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),_t(this,"onComponentPointerDown",c=>{const{crop:f,disabled:d,locked:h,keepSelection:p,onChange:C}=this.props,D=this.getBox();if(d||h||p&&f)return;c.cancelable&&c.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const x=c.clientX-D.x,y=c.clientY-D.y,A={unit:"px",x,y,width:0,height:0};this.evData={startClientX:c.clientX,startClientY:c.clientY,startCropX:x,startCropY:y,clientX:c.clientX,clientY:c.clientY,isResize:!0},this.mouseDownOnCrop=!0,C(tl(A,D.width,D.height),so(A,D.width,D.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),_t(this,"onDocPointerMove",c=>{const{crop:f,disabled:d,onChange:h,onDragStart:p}=this.props,C=this.getBox();if(d||!f||!this.mouseDownOnCrop)return;c.cancelable&&c.preventDefault(),this.dragStarted||(this.dragStarted=!0,p&&p(c));const{evData:D}=this;D.clientX=c.clientX,D.clientY=c.clientY;let x;D.isResize?x=this.resizeCrop():x=this.dragCrop(),Mp(f,x)||h(tl(x,C.width,C.height),so(x,C.width,C.height))}),_t(this,"onComponentKeyDown",c=>{const{crop:f,disabled:d,onChange:h,onComplete:p}=this.props;if(d)return;const C=c.key;let D=!1;if(!f)return;const x=this.getBox(),y=this.makePixelCrop(x),A=(navigator.platform.match("Mac")?c.metaKey:c.ctrlKey)?Wn.nudgeStepLarge:c.shiftKey?Wn.nudgeStepMedium:Wn.nudgeStep;if(C==="ArrowLeft"?(y.x-=A,D=!0):C==="ArrowRight"?(y.x+=A,D=!0):C==="ArrowUp"?(y.y-=A,D=!0):C==="ArrowDown"&&(y.y+=A,D=!0),D){c.cancelable&&c.preventDefault(),y.x=ro(y.x,0,x.width-y.width),y.y=ro(y.y,0,x.height-y.height);const z=tl(y,x.width,x.height),_=so(y,x.width,x.height);h(z,_),p&&p(z,_)}}),_t(this,"onHandlerKeyDown",(c,f)=>{const{aspect:d=0,crop:h,disabled:p,minWidth:C=0,minHeight:D=0,maxWidth:x,maxHeight:y,onChange:A,onComplete:z}=this.props,_=this.getBox();if(p||!h)return;if(c.key==="ArrowUp"||c.key==="ArrowDown"||c.key==="ArrowLeft"||c.key==="ArrowRight")c.stopPropagation(),c.preventDefault();else return;const q=(navigator.platform.match("Mac")?c.metaKey:c.ctrlKey)?Wn.nudgeStepLarge:c.shiftKey?Wn.nudgeStepMedium:Wn.nudgeStep,H=tl(h,_.width,_.height),G=o2(H,c.key,q,f),oe=Dp(G,d,f,_.width,_.height,C,D,x,y);if(!Mp(h,oe)){const J=so(oe,_.width,_.height);A(oe,J),z&&z(oe,J)}}),_t(this,"onDocPointerDone",c=>{const{crop:f,disabled:d,onComplete:h,onDragEnd:p}=this.props,C=this.getBox();this.unbindDocMove(),!(d||!f)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,p&&p(c),h&&h(tl(f,C.width,C.height),so(f,C.width,C.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),_t(this,"onDragFocus",()=>{var c;(c=this.componentRef.current)==null||c.scrollTo(0,0)})}get document(){return document}getBox(){const c=this.mediaRef.current;if(!c)return{x:0,y:0,width:0,height:0};const{x:f,y:d,width:h,height:p}=c.getBoundingClientRect();return{x:f,y:d,width:h,height:p}}componentDidUpdate(c){const{crop:f,onComplete:d}=this.props;if(d&&!c.crop&&f){const{width:h,height:p}=this.getBox();h&&p&&d(tl(f,h,p),so(f,h,p))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,co),this.document.addEventListener("pointerup",this.onDocPointerDone,co),this.document.addEventListener("pointercancel",this.onDocPointerDone,co),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,co),this.document.removeEventListener("pointerup",this.onDocPointerDone,co),this.document.removeEventListener("pointercancel",this.onDocPointerDone,co),this.docMoveBound=!1)}getCropStyle(){const{crop:c}=this.props;if(c)return{top:`${c.y}${c.unit}`,left:`${c.x}${c.unit}`,width:`${c.width}${c.unit}`,height:`${c.height}${c.unit}`}}dragCrop(){const{evData:c}=this,f=this.getBox(),d=this.makePixelCrop(f),h=c.clientX-c.startClientX,p=c.clientY-c.startClientY;return d.x=ro(c.startCropX+h,0,f.width-d.width),d.y=ro(c.startCropY+p,0,f.height-d.height),d}getPointRegion(c,f,d,h){const{evData:p}=this,C=p.clientX-c.x,D=p.clientY-c.y;let x;h&&f?x=f==="nw"||f==="n"||f==="ne":x=D<p.startCropY;let y;return d&&f?y=f==="nw"||f==="w"||f==="sw":y=C<p.startCropX,y?x?"nw":"sw":x?"ne":"se"}resolveMinDimensions(c,f,d=0,h=0){const p=Math.min(d,c.width),C=Math.min(h,c.height);return!f||!p&&!C?[p,C]:f>1?p?[p,p/f]:[C*f,C]:C?[C*f,C]:[p,p/f]}resizeCrop(){const{evData:c}=this,{aspect:f=0,maxWidth:d,maxHeight:h}=this.props,p=this.getBox(),[C,D]=this.resolveMinDimensions(p,f,this.props.minWidth,this.props.minHeight);let x=this.makePixelCrop(p);const y=this.getPointRegion(p,c.ord,C,D),A=c.ord||y;let z=c.clientX-c.startClientX,_=c.clientY-c.startClientY;(C&&A==="nw"||A==="w"||A==="sw")&&(z=Math.min(z,-C)),(D&&A==="nw"||A==="n"||A==="ne")&&(_=Math.min(_,-D));const q={unit:"px",x:0,y:0,width:0,height:0};y==="ne"?(q.x=c.startCropX,q.width=z,f?(q.height=q.width/f,q.y=c.startCropY-q.height):(q.height=Math.abs(_),q.y=c.startCropY-q.height)):y==="se"?(q.x=c.startCropX,q.y=c.startCropY,q.width=z,f?q.height=q.width/f:q.height=_):y==="sw"?(q.x=c.startCropX+z,q.y=c.startCropY,q.width=Math.abs(z),f?q.height=q.width/f:q.height=_):y==="nw"&&(q.x=c.startCropX+z,q.width=Math.abs(z),f?(q.height=q.width/f,q.y=c.startCropY-q.height):(q.height=Math.abs(_),q.y=c.startCropY+_));const H=Dp(q,f,y,p.width,p.height,C,D,d,h);return f||Wn.xyOrds.indexOf(A)>-1?x=H:Wn.xOrds.indexOf(A)>-1?(x.x=H.x,x.width=H.width):Wn.yOrds.indexOf(A)>-1&&(x.y=H.y,x.height=H.height),x.x=ro(x.x,0,p.width-x.width),x.y=ro(x.y,0,p.height-x.height),x}renderCropSelection(){const{ariaLabels:c=Wn.defaultProps.ariaLabels,disabled:f,locked:d,renderSelectionAddon:h,ruleOfThirds:p,crop:C}=this.props,D=this.getCropStyle();if(C)return pt.createElement("div",{style:D,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":c.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!d&&pt.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},pt.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),pt.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),pt.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),pt.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),pt.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":c.nwDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"nw"),role:"button"}),pt.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":c.nDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"n"),role:"button"}),pt.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":c.neDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"ne"),role:"button"}),pt.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":c.eDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"e"),role:"button"}),pt.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":c.seDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"se"),role:"button"}),pt.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":c.sDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"s"),role:"button"}),pt.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":c.swDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"sw"),role:"button"}),pt.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":c.wDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"w"),role:"button"})),h&&pt.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:x=>x.stopPropagation()},h(this.state)),p&&pt.createElement(pt.Fragment,null,pt.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),pt.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(c){const f={...Nr,...this.props.crop||{}};return tl(f,c.width,c.height)}render(){const{aspect:c,children:f,circularCrop:d,className:h,crop:p,disabled:C,locked:D,style:x,ruleOfThirds:y}=this.props,{cropIsActive:A,newCropIsBeingDrawn:z}=this.state,_=p?this.renderCropSelection():null,q=l2("ReactCrop",h,A&&"ReactCrop--active",C&&"ReactCrop--disabled",D&&"ReactCrop--locked",z&&"ReactCrop--new-crop",p&&c&&"ReactCrop--fixed-aspect",p&&d&&"ReactCrop--circular-crop",p&&y&&"ReactCrop--rule-of-thirds",!this.dragStarted&&p&&!p.width&&!p.height&&"ReactCrop--invisible-crop",d&&"ReactCrop--no-animate");return pt.createElement("div",{ref:this.componentRef,className:q,style:x},pt.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),p?pt.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},pt.createElement("defs",null,pt.createElement("mask",{id:`hole-${this.instanceId}`},pt.createElement("rect",{width:"100%",height:"100%",fill:"white"}),d?pt.createElement("ellipse",{cx:`${p.x+p.width/2}${p.unit}`,cy:`${p.y+p.height/2}${p.unit}`,rx:`${p.width/2}${p.unit}`,ry:`${p.height/2}${p.unit}`,fill:"black"}):pt.createElement("rect",{x:`${p.x}${p.unit}`,y:`${p.y}${p.unit}`,width:`${p.width}${p.unit}`,height:`${p.height}${p.unit}`,fill:"black"}))),pt.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,_)}};_t(nl,"xOrds",["e","w"]),_t(nl,"yOrds",["n","s"]),_t(nl,"xyOrds",["nw","ne","se","sw"]),_t(nl,"nudgeStep",1),_t(nl,"nudgeStepMedium",10),_t(nl,"nudgeStepLarge",100),_t(nl,"defaultProps",{ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}});let r2=nl;const s2=Ft`
84
+ `,I={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:m("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",I1," 0.8s linear infinite;",""),empty:m("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",s.textSecondary,";",""),emptyHint:m("font-size:",N.sm,";color:",s.textMuted,";margin-top:4px;",""),scanButton:m("margin-top:16px;padding:10px 24px;font-size:",N.base,";font-weight:500;background:",s.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",s.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:m("background:",s.surface,";border-radius:8px;border:1px solid ",s.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:m("text-align:left;font-size:11px;color:",s.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",s.background,";border-bottom:1px solid ",s.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:m("",""),row:m("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",s.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",s.borderLight,";}",""),rowSelected:m("background-color:",s.primaryLight,";&:hover{background-color:",s.primaryLight,";}",""),parentRow:m("cursor:pointer;border-bottom:1px solid ",s.border,";&:hover{background-color:",s.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:m("width:18px;height:18px;accent-color:",s.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:m("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",N.xs,";color:",s.textSecondary,";background:",s.surface,";border:1px solid ",s.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",s.surfaceHover,";border-color:",s.borderHover,";color:",s.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:m("display:flex;align-items:center;gap:3px;font-size:",N.xs,";",""),folderStatLocal:m("color:",s.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:m("width:14px;height:14px;color:",s.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:m("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",N.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},storedLabel:{name:"s5xdrg",styles:"display:flex;align-items:center"},storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"1bu1odp",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},thumbnailWrapper:{name:"f01c4l",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:4px"},thumbnailCloud:m("",""),thumbnailRemote:m("",""),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:m("width:24px;height:24px;color:",s.imagesFolder,";",""),lockIcon:m("width:10px;height:10px;color:",s.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:m("width:20px;height:20px;color:",s.textMuted,";flex-shrink:0;",""),fileIcon:m("width:20px;height:20px;color:",s.textMuted,";flex-shrink:0;",""),thumbnail:m("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",s.borderLight,";",""),name:m("font-size:",N.base,";font-weight:500;color:",s.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:m("font-size:",N.sm,";color:",s.textSecondary,";",""),cdnBadge:m("display:inline-flex;align-items:center;gap:4px;font-size:",N.xs,";font-weight:500;color:",s.success,";",""),cdnBadgeRemote:m("display:inline-flex;align-items:center;font-size:",N.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:m("font-size:",N.sm,";color:",s.textMuted,";",""),featuredRow:m("cursor:pointer;transition:background-color 0.15s ease;border:2px dashed ",s.success,";&:hover{background-color:",s.successLight,";}td{border-bottom:none!important;}",""),featuredIcon:m("width:24px;height:24px;color:",s.success,";",""),featuredText:m("color:",s.success,";font-weight:500;",""),openBtn:m("height:32px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.surface,";border:1px solid ",s.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",s.primaryLight,";border-color:",s.primary,";}","")};function P1(){const{loading:i,sortedItems:c,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:p,allItemsSelected:C,someItemsSelected:D,selectedItems:x,navigateUp:y,handleItemClick:A,handleOpen:z,handleGenerateThumbnail:_,handleSelectAll:q,triggerScan:H,triggerRefresh:G,editedImageKey:oe}=Kp(),[J,ce]=v.useState(!1),[Q,le]=v.useState(!1),[X,P]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),te=()=>{ce(!0)},ae=async j=>{ce(!1),le(!0),P({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const $=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:j})});if(!$.ok){const ge=await $.json();P({current:0,total:4,percent:0,status:"error",message:ge.error||"Failed to generate screenshot"});return}const he=$.body?.getReader(),me=new TextDecoder;if(he){let ge="";for(;;){const{done:ie,value:Oe}=await he.read();if(ie)break;ge+=me.decode(Oe,{stream:!0});const T=ge.split(`
85
+ `);ge=T.pop()||"";for(const Z of T)if(Z.startsWith("data: "))try{const ee=JSON.parse(Z.slice(6));ee.type==="start"?P(Ee=>({...Ee,total:ee.total,message:`Screenshotting ${ee.url}...`})):ee.type==="progress"?P({current:ee.current,total:ee.total,percent:ee.percent,status:"processing",message:ee.message}):ee.type==="complete"?(P({current:ee.processed,total:ee.processed,percent:100,status:ee.errors>0?"error":"complete",message:ee.message}),G()):ee.type==="error"&&P(Ee=>({...Ee,status:"error",message:ee.message}))}catch{}}}}catch($){console.error("Featured image generation error:",$),P({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?r("div",{css:I.loading,children:r("div",{css:I.spinner})}):f&&h?b("div",{css:I.empty,children:[r("p",{children:"No files tracked yet"}),r("p",{css:I.emptyHint,children:"Click Scan to discover files in your public folder"}),r("button",{css:I.scanButton,onClick:H,children:"Scan for Files"})]}):c.length===0&&h?b("div",{css:I.empty,children:[r("p",{children:"No files in this folder"}),r("p",{css:I.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):b(nt,{children:[r(Zp,{isOpen:J,onClose:()=>ce(!1),onSelect:ae}),Q&&r(al,{title:"Generating Screenshot",progress:X,onClose:()=>le(!1)}),r("div",{css:I.tableWrapper,children:b("table",{css:I.table,children:[r("thead",{children:b("tr",{children:[r("th",{css:[I.th,I.thCheckbox,"",""],children:c.length>0&&r("input",{type:"checkbox",css:I.checkbox,checked:C,ref:j=>{j&&(j.indeterminate=D&&!C)},onChange:q})}),r("th",{css:I.th,children:"Name"}),r("th",{css:[I.th,I.thSize,"",""],children:"Size"}),r("th",{css:[I.th,I.thDimensions,"",""],children:"Dimensions"}),r("th",{css:[I.th,I.thCdn,"",""],children:"CDN"})]})}),b("tbody",{css:I.tbody,children:[!h&&!p&&b("tr",{css:I.parentRow,onClick:y,children:[r("td",{css:I.td}),r("td",{css:I.td,children:b("div",{css:I.nameCell,children:[r("svg",{css:I.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),r("span",{css:I.name,children:".."})]})}),r("td",{css:[I.td,I.meta,"",""],children:"--"}),r("td",{css:[I.td,I.meta,"",""],children:"Parent folder"}),r("td",{css:I.td,children:"--"})]}),c.map(j=>r(e2,{item:j,isSelected:x.has(j.path),onClick:$=>A(j,$),onOpen:()=>z(j),onGenerateThumbnail:()=>_(j),editedImageKey:oe},j.path)),h&&d&&!p&&b("tr",{css:I.featuredRow,onClick:te,title:`Generate ${d.filename}`,children:[r("td",{css:I.td}),r("td",{css:I.td,children:b("div",{css:I.nameCell,children:[r("div",{css:I.folderIconWrapper,children:r("svg",{css:I.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),r("span",{css:[I.name,I.featuredText,"",""],children:d.filename})]})}),r("td",{css:[I.td,I.meta,I.featuredText,"",""],children:"--"}),r("td",{css:[I.td,I.meta,I.featuredText,"",""],children:"Click to generate"}),r("td",{css:[I.td,I.featuredText,"",""],children:"--"})]})]})]})})]})}function e2({item:i,isSelected:c,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:p}){const[C,D]=v.useState(!1),x=i.type==="folder",y=!x&&i.thumbnail!==void 0,A=i.thumbnail&&p&&p.path===i.path?`${i.thumbnail}?v=${p.key}`:i.thumbnail,z=i.isProtected||x&&i.name==="images"&&i.path==="public/images",_=H=>{H.stopPropagation();const G="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(G),D(!0),setTimeout(()=>D(!1),1500)},q=H=>{if(z){H.stopPropagation(),d();return}f(H)};return b("tr",{css:[I.row,c&&!z&&I.rowSelected,"",""],onClick:q,children:[r("td",{css:[I.td,I.checkboxCell,"",""],onClick:H=>H.stopPropagation(),children:!z&&r("input",{type:"checkbox",css:I.checkbox,checked:c,onChange:()=>f({})})}),r("td",{css:I.td,children:b("div",{css:I.nameCell,children:[x?z?b("div",{css:I.imagesFolderWrapper,children:[r("svg",{css:I.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),r("svg",{css:I.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):r("div",{css:I.folderIconWrapper,children:r("svg",{css:I.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):y&&A?r("div",{css:[I.thumbnailWrapper,i.isCloud&&I.thumbnailCloud,i.isRemote&&I.thumbnailRemote,"",""],children:r("img",{css:I.thumbnail,src:A,alt:i.name,loading:"lazy"})}):r("div",{css:[I.thumbnailWrapper,i.isCloud&&I.thumbnailCloud,i.isRemote&&I.thumbnailRemote,"",""],children:r("svg",{css:I.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),r("span",{css:I.name,title:i.name,children:t2(i.name)}),b("div",{css:I.actionsCell,children:[b("button",{css:I.copyBtn,onClick:_,title:"Copy file path",children:[C&&r("span",{css:I.tooltip,children:"Copied!"}),r("svg",{css:I.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:I.openBtn,onClick:H=>{H.stopPropagation(),d()},children:"Open"})]})]})}),r("td",{css:[I.td,I.meta,"",""],children:x?b("div",{css:I.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[I.folderStat,I.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:I.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),i.localCount]}),i.cloudCount!==void 0&&i.cloudCount>0&&b("span",{css:[I.folderStat,I.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:I.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),i.cloudCount]}),i.remoteCount!==void 0&&i.remoteCount>0&&b("span",{css:[I.folderStat,I.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:I.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),i.remoteCount]}),i.updateCount!==void 0&&i.updateCount>0&&b("span",{css:[I.folderStat,I.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:I.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),i.updateCount]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount!==void 0&&b("span",{children:[i.fileCount," files"]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount===void 0&&"--"]}):i.hasUpdate?b("span",{css:I.updateLabel,children:[r("svg",{css:I.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("svg",{css:I.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"update"]}):i.cdnPushed?r("span",{css:I.storedLabel,children:r("svg",{css:i.isRemote?I.storedIconRemote:I.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}):i.size!==void 0?zp(i.size):"--"}),r("td",{css:[I.td,I.meta,"",""],children:x?i.totalSize!==void 0?zp(i.totalSize):"--":i.dimensions?`${i.dimensions.width}x${i.dimensions.height}`:"--"}),r("td",{css:I.td,children:i.cdnPushed?i.isRemote?r("span",{css:I.cdnBadgeRemote,children:"Remote"}):b("span",{css:I.cdnBadge,children:[r("svg",{css:I.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Pushed"]}):r("span",{css:I.cdnEmpty,children:"--"})})]})}function zp(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function t2(i,c=32){if(i.length<=c)return i;const f=i.lastIndexOf("."),d=f>0?i.substring(f):"",h=f>0?i.substring(0,f):i,p=c-d.length-3;if(p<6)return i.substring(0,c-3)+"...";const C=Math.ceil(p/2),D=Math.floor(p/2);return h.substring(0,C)+"..."+h.substring(h.length-D)+d}var n2=Object.defineProperty,a2=(i,c,f)=>c in i?n2(i,c,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[c]=f,_t=(i,c,f)=>a2(i,typeof c!="symbol"?c+"":c,f);const Nr={x:0,y:0,width:0,height:0,unit:"px"},ro=(i,c,f)=>Math.min(Math.max(i,c),f),l2=(...i)=>i.filter(c=>c&&typeof c=="string").join(" "),Mp=(i,c)=>i===c||i.width===c.width&&i.height===c.height&&i.x===c.x&&i.y===c.y&&i.unit===c.unit;function so(i,c,f){return i.unit==="%"?{...Nr,...i,unit:"%"}:{unit:"%",x:i.x?i.x/c*100:0,y:i.y?i.y/f*100:0,width:i.width?i.width/c*100:0,height:i.height?i.height/f*100:0}}function tl(i,c,f){return i.unit?i.unit==="px"?{...Nr,...i,unit:"px"}:{unit:"px",x:i.x?i.x*c/100:0,y:i.y?i.y*f/100:0,width:i.width?i.width*c/100:0,height:i.height?i.height*f/100:0}:{...Nr,...i,unit:"px"}}function Dp(i,c,f,d,h,p=0,C=0,D=d,x=h){const y={...i};let A=Math.min(p,d),z=Math.min(C,h),_=Math.min(D,d),q=Math.min(x,h);c&&(c>1?(A=C?C*c:A,z=A/c,_=D*c):(z=p?p/c:z,A=z*c,q=x/c)),y.y<0&&(y.height=Math.max(y.height+y.y,z),y.y=0),y.x<0&&(y.width=Math.max(y.width+y.x,A),y.x=0);const H=d-(y.x+y.width);H<0&&(y.x=Math.min(y.x,d-A),y.width+=H);const G=h-(y.y+y.height);if(G<0&&(y.y=Math.min(y.y,h-z),y.height+=G),y.width<A&&((f==="sw"||f=="nw")&&(y.x-=A-y.width),y.width=A),y.height<z&&((f==="nw"||f=="ne")&&(y.y-=z-y.height),y.height=z),y.width>_&&((f==="sw"||f=="nw")&&(y.x-=_-y.width),y.width=_),y.height>q&&((f==="nw"||f=="ne")&&(y.y-=q-y.height),y.height=q),c){const oe=y.width/y.height;if(oe<c){const J=Math.max(y.width/c,z);(f==="nw"||f=="ne")&&(y.y-=J-y.height),y.height=J}else if(oe>c){const J=Math.max(y.height*c,A);(f==="sw"||f=="nw")&&(y.x-=J-y.width),y.width=J}}return y}function o2(i,c,f,d){const h={...i};return c==="ArrowLeft"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="w"?(h.x-=f,h.width+=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="e"?h.width-=f:d==="se"&&(h.width-=f,h.height-=f):c==="ArrowRight"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="w"?(h.x+=f,h.width-=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="e"?h.width+=f:d==="se"&&(h.width+=f,h.height+=f)),c==="ArrowUp"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="n"?(h.y-=f,h.height+=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="s"?h.height-=f:d==="se"&&(h.width-=f,h.height-=f):c==="ArrowDown"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="n"?(h.y+=f,h.height-=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="s"?h.height+=f:d==="se"&&(h.width+=f,h.height+=f)),h}const co={capture:!0,passive:!1};let i2=0;const nl=class $n extends v.PureComponent{constructor(){super(...arguments),_t(this,"docMoveBound",!1),_t(this,"mouseDownOnCrop",!1),_t(this,"dragStarted",!1),_t(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),_t(this,"componentRef",v.createRef()),_t(this,"mediaRef",v.createRef()),_t(this,"resizeObserver"),_t(this,"initChangeCalled",!1),_t(this,"instanceId",`rc-${i2++}`),_t(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),_t(this,"onCropPointerDown",c=>{const{crop:f,disabled:d}=this.props,h=this.getBox();if(!f)return;const p=tl(f,h.width,h.height);if(d)return;c.cancelable&&c.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const C=c.target.dataset.ord,D=!!C;let x=c.clientX,y=c.clientY,A=p.x,z=p.y;if(C){const _=c.clientX-h.x,q=c.clientY-h.y;let H=0,G=0;C==="ne"||C=="e"?(H=_-(p.x+p.width),G=q-p.y,A=p.x,z=p.y+p.height):C==="se"||C==="s"?(H=_-(p.x+p.width),G=q-(p.y+p.height),A=p.x,z=p.y):C==="sw"||C=="w"?(H=_-p.x,G=q-(p.y+p.height),A=p.x+p.width,z=p.y):(C==="nw"||C=="n")&&(H=_-p.x,G=q-p.y,A=p.x+p.width,z=p.y+p.height),x=A+h.x+H,y=z+h.y+G}this.evData={startClientX:x,startClientY:y,startCropX:A,startCropY:z,clientX:c.clientX,clientY:c.clientY,isResize:D,ord:C},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),_t(this,"onComponentPointerDown",c=>{const{crop:f,disabled:d,locked:h,keepSelection:p,onChange:C}=this.props,D=this.getBox();if(d||h||p&&f)return;c.cancelable&&c.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const x=c.clientX-D.x,y=c.clientY-D.y,A={unit:"px",x,y,width:0,height:0};this.evData={startClientX:c.clientX,startClientY:c.clientY,startCropX:x,startCropY:y,clientX:c.clientX,clientY:c.clientY,isResize:!0},this.mouseDownOnCrop=!0,C(tl(A,D.width,D.height),so(A,D.width,D.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),_t(this,"onDocPointerMove",c=>{const{crop:f,disabled:d,onChange:h,onDragStart:p}=this.props,C=this.getBox();if(d||!f||!this.mouseDownOnCrop)return;c.cancelable&&c.preventDefault(),this.dragStarted||(this.dragStarted=!0,p&&p(c));const{evData:D}=this;D.clientX=c.clientX,D.clientY=c.clientY;let x;D.isResize?x=this.resizeCrop():x=this.dragCrop(),Mp(f,x)||h(tl(x,C.width,C.height),so(x,C.width,C.height))}),_t(this,"onComponentKeyDown",c=>{const{crop:f,disabled:d,onChange:h,onComplete:p}=this.props;if(d)return;const C=c.key;let D=!1;if(!f)return;const x=this.getBox(),y=this.makePixelCrop(x),A=(navigator.platform.match("Mac")?c.metaKey:c.ctrlKey)?$n.nudgeStepLarge:c.shiftKey?$n.nudgeStepMedium:$n.nudgeStep;if(C==="ArrowLeft"?(y.x-=A,D=!0):C==="ArrowRight"?(y.x+=A,D=!0):C==="ArrowUp"?(y.y-=A,D=!0):C==="ArrowDown"&&(y.y+=A,D=!0),D){c.cancelable&&c.preventDefault(),y.x=ro(y.x,0,x.width-y.width),y.y=ro(y.y,0,x.height-y.height);const z=tl(y,x.width,x.height),_=so(y,x.width,x.height);h(z,_),p&&p(z,_)}}),_t(this,"onHandlerKeyDown",(c,f)=>{const{aspect:d=0,crop:h,disabled:p,minWidth:C=0,minHeight:D=0,maxWidth:x,maxHeight:y,onChange:A,onComplete:z}=this.props,_=this.getBox();if(p||!h)return;if(c.key==="ArrowUp"||c.key==="ArrowDown"||c.key==="ArrowLeft"||c.key==="ArrowRight")c.stopPropagation(),c.preventDefault();else return;const q=(navigator.platform.match("Mac")?c.metaKey:c.ctrlKey)?$n.nudgeStepLarge:c.shiftKey?$n.nudgeStepMedium:$n.nudgeStep,H=tl(h,_.width,_.height),G=o2(H,c.key,q,f),oe=Dp(G,d,f,_.width,_.height,C,D,x,y);if(!Mp(h,oe)){const J=so(oe,_.width,_.height);A(oe,J),z&&z(oe,J)}}),_t(this,"onDocPointerDone",c=>{const{crop:f,disabled:d,onComplete:h,onDragEnd:p}=this.props,C=this.getBox();this.unbindDocMove(),!(d||!f)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,p&&p(c),h&&h(tl(f,C.width,C.height),so(f,C.width,C.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),_t(this,"onDragFocus",()=>{var c;(c=this.componentRef.current)==null||c.scrollTo(0,0)})}get document(){return document}getBox(){const c=this.mediaRef.current;if(!c)return{x:0,y:0,width:0,height:0};const{x:f,y:d,width:h,height:p}=c.getBoundingClientRect();return{x:f,y:d,width:h,height:p}}componentDidUpdate(c){const{crop:f,onComplete:d}=this.props;if(d&&!c.crop&&f){const{width:h,height:p}=this.getBox();h&&p&&d(tl(f,h,p),so(f,h,p))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,co),this.document.addEventListener("pointerup",this.onDocPointerDone,co),this.document.addEventListener("pointercancel",this.onDocPointerDone,co),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,co),this.document.removeEventListener("pointerup",this.onDocPointerDone,co),this.document.removeEventListener("pointercancel",this.onDocPointerDone,co),this.docMoveBound=!1)}getCropStyle(){const{crop:c}=this.props;if(c)return{top:`${c.y}${c.unit}`,left:`${c.x}${c.unit}`,width:`${c.width}${c.unit}`,height:`${c.height}${c.unit}`}}dragCrop(){const{evData:c}=this,f=this.getBox(),d=this.makePixelCrop(f),h=c.clientX-c.startClientX,p=c.clientY-c.startClientY;return d.x=ro(c.startCropX+h,0,f.width-d.width),d.y=ro(c.startCropY+p,0,f.height-d.height),d}getPointRegion(c,f,d,h){const{evData:p}=this,C=p.clientX-c.x,D=p.clientY-c.y;let x;h&&f?x=f==="nw"||f==="n"||f==="ne":x=D<p.startCropY;let y;return d&&f?y=f==="nw"||f==="w"||f==="sw":y=C<p.startCropX,y?x?"nw":"sw":x?"ne":"se"}resolveMinDimensions(c,f,d=0,h=0){const p=Math.min(d,c.width),C=Math.min(h,c.height);return!f||!p&&!C?[p,C]:f>1?p?[p,p/f]:[C*f,C]:C?[C*f,C]:[p,p/f]}resizeCrop(){const{evData:c}=this,{aspect:f=0,maxWidth:d,maxHeight:h}=this.props,p=this.getBox(),[C,D]=this.resolveMinDimensions(p,f,this.props.minWidth,this.props.minHeight);let x=this.makePixelCrop(p);const y=this.getPointRegion(p,c.ord,C,D),A=c.ord||y;let z=c.clientX-c.startClientX,_=c.clientY-c.startClientY;(C&&A==="nw"||A==="w"||A==="sw")&&(z=Math.min(z,-C)),(D&&A==="nw"||A==="n"||A==="ne")&&(_=Math.min(_,-D));const q={unit:"px",x:0,y:0,width:0,height:0};y==="ne"?(q.x=c.startCropX,q.width=z,f?(q.height=q.width/f,q.y=c.startCropY-q.height):(q.height=Math.abs(_),q.y=c.startCropY-q.height)):y==="se"?(q.x=c.startCropX,q.y=c.startCropY,q.width=z,f?q.height=q.width/f:q.height=_):y==="sw"?(q.x=c.startCropX+z,q.y=c.startCropY,q.width=Math.abs(z),f?q.height=q.width/f:q.height=_):y==="nw"&&(q.x=c.startCropX+z,q.width=Math.abs(z),f?(q.height=q.width/f,q.y=c.startCropY-q.height):(q.height=Math.abs(_),q.y=c.startCropY+_));const H=Dp(q,f,y,p.width,p.height,C,D,d,h);return f||$n.xyOrds.indexOf(A)>-1?x=H:$n.xOrds.indexOf(A)>-1?(x.x=H.x,x.width=H.width):$n.yOrds.indexOf(A)>-1&&(x.y=H.y,x.height=H.height),x.x=ro(x.x,0,p.width-x.width),x.y=ro(x.y,0,p.height-x.height),x}renderCropSelection(){const{ariaLabels:c=$n.defaultProps.ariaLabels,disabled:f,locked:d,renderSelectionAddon:h,ruleOfThirds:p,crop:C}=this.props,D=this.getCropStyle();if(C)return gt.createElement("div",{style:D,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":c.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!d&&gt.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},gt.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),gt.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),gt.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),gt.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),gt.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":c.nwDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"nw"),role:"button"}),gt.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":c.nDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"n"),role:"button"}),gt.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":c.neDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"ne"),role:"button"}),gt.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":c.eDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"e"),role:"button"}),gt.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":c.seDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"se"),role:"button"}),gt.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":c.sDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"s"),role:"button"}),gt.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":c.swDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"sw"),role:"button"}),gt.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":c.wDragHandle,onKeyDown:x=>this.onHandlerKeyDown(x,"w"),role:"button"})),h&&gt.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:x=>x.stopPropagation()},h(this.state)),p&&gt.createElement(gt.Fragment,null,gt.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),gt.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(c){const f={...Nr,...this.props.crop||{}};return tl(f,c.width,c.height)}render(){const{aspect:c,children:f,circularCrop:d,className:h,crop:p,disabled:C,locked:D,style:x,ruleOfThirds:y}=this.props,{cropIsActive:A,newCropIsBeingDrawn:z}=this.state,_=p?this.renderCropSelection():null,q=l2("ReactCrop",h,A&&"ReactCrop--active",C&&"ReactCrop--disabled",D&&"ReactCrop--locked",z&&"ReactCrop--new-crop",p&&c&&"ReactCrop--fixed-aspect",p&&d&&"ReactCrop--circular-crop",p&&y&&"ReactCrop--rule-of-thirds",!this.dragStarted&&p&&!p.width&&!p.height&&"ReactCrop--invisible-crop",d&&"ReactCrop--no-animate");return gt.createElement("div",{ref:this.componentRef,className:q,style:x},gt.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),p?gt.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},gt.createElement("defs",null,gt.createElement("mask",{id:`hole-${this.instanceId}`},gt.createElement("rect",{width:"100%",height:"100%",fill:"white"}),d?gt.createElement("ellipse",{cx:`${p.x+p.width/2}${p.unit}`,cy:`${p.y+p.height/2}${p.unit}`,rx:`${p.width/2}${p.unit}`,ry:`${p.height/2}${p.unit}`,fill:"black"}):gt.createElement("rect",{x:`${p.x}${p.unit}`,y:`${p.y}${p.unit}`,width:`${p.width}${p.unit}`,height:`${p.height}${p.unit}`,fill:"black"}))),gt.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,_)}};_t(nl,"xOrds",["e","w"]),_t(nl,"yOrds",["n","s"]),_t(nl,"xyOrds",["nw","ne","se","sw"]),_t(nl,"nudgeStep",1),_t(nl,"nudgeStepMedium",10),_t(nl,"nudgeStepLarge",100),_t(nl,"defaultProps",{ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}});let r2=nl;const s2=Ft`
86
86
  from { opacity: 0; }
87
87
  to { opacity: 1; }
88
- `,Se={overlay:m("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",s2," 0.15s ease-out;font-family:",kl,";",""),container:m(ll," display:flex;flex:1;margin:24px;background:",s.surface,";border:1px solid ",s.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:m("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",s.background,";overflow:hidden;.ReactCrop__crop-selection{border:2px solid ",s.primary,";}",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},closeBtn:m("padding:8px;background:",s.surface,";border:1px solid ",s.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:",s.surfaceHover,";border-color:",s.borderHover,";}",""),closeIcon:m("width:20px;height:20px;color:",s.textSecondary,";",""),rotationWrapper:{name:"1xwnw1d",styles:"transition:transform 0.3s ease;position:relative;cursor:pointer"},cropHint:m("position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0, 0, 0, 0.7);color:white;padding:12px 20px;border-radius:8px;font-size:",N.sm,";pointer-events:none;white-space:nowrap;",""),successBanner:m("position:absolute;top:24px;left:50%;transform:translateX(-50%);background:#22c55e;color:#fff;padding:12px 24px;border-radius:8px;font-size:",N.sm,";font-weight:600;pointer-events:none;z-index:10;animation:fadeInOut 3s ease-in-out forwards;@keyframes fadeInOut{0%{opacity:0;transform:translateX(-50%) scale(0.9);}10%{opacity:1;transform:translateX(-50%) scale(1);}90%{opacity:1;transform:translateX(-50%) scale(1);}100%{opacity:0;transform:translateX(-50%) scale(0.9);}}",""),cropWrapper:{name:"12wysvm",styles:"max-width:100%;max-height:calc(100vh - 150px);img{max-width:100%;max-height:calc(100vh - 150px);display:block;}"},sidebar:m("width:280px;background:",s.surface,";border-left:1px solid ",s.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:m("padding:16px 20px;border-bottom:1px solid ",s.border,";",""),sidebarTitle:m("font-size:",N.base,";font-weight:600;color:",s.text,";margin:0;",""),sidebarContent:{name:"1uv1qvv",styles:"flex:1;padding:20px;overflow:auto;display:flex;flex-direction:column;gap:20px"},section:{name:"1c3pogw",styles:"display:flex;flex-direction:column;gap:10px"},sectionLabel:m("font-size:",N.sm,";font-weight:600;color:",s.text,";",""),subSectionLabel:m("font-size:",N.xs,";font-weight:500;color:",s.textMuted,";text-transform:uppercase;letter-spacing:0.5px;",""),aspectButtons:{name:"13l5m7f",styles:"display:flex;gap:6px;flex-wrap:wrap"},aspectBtn:m("padding:6px 10px;font-size:",N.sm,";border:1px solid ",s.border,";background:",s.surface,";color:",s.text,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),aspectBtnActive:m("background-color:",s.primary,";border-color:",s.primary,";color:white;&:hover:not(:disabled){background-color:",s.primary,";border-color:",s.primary,";}",""),rotateButtons:{name:"11jf4ye",styles:"display:flex;gap:8px"},rotateBtn:m("flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;font-size:",N.sm,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",s.text,";&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),rotateIcon:{name:"157xhr7",styles:"width:16px;height:16px"},rotatePreview:m("width:80px;height:80px;border:1px solid ",s.border,";border-radius:6px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:",s.background,";margin:8px auto;img{max-width:100%;max-height:100%;object-fit:contain;transition:transform 0.3s ease;}",""),resizeRow:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},resizeInput:m("width:80px;min-width:0;padding:8px 6px;font-size:",N.sm,";border:1px solid ",s.border,";border-radius:6px;background:",s.surface,";color:",s.text,";text-align:center;&:focus{outline:none;border-color:",s.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;background:",s.surfaceHover,";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}-moz-appearance:textfield;",""),resizeX:m("font-size:",N.sm,";color:",s.textMuted,";",""),qualitySlider:m("width:100%;height:6px;border-radius:3px;background:",s.border,";outline:none;cursor:pointer;&::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:",s.primary,";cursor:pointer;}&::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:",s.primary,";cursor:pointer;border:none;}",""),qualityRow:{name:"uh5xjc",styles:"display:flex;align-items:center;gap:12px"},qualityValue:m("min-width:40px;font-size:",N.sm,";color:",s.text,";text-align:right;",""),fileSize:m("font-size:",N.sm,";color:",s.textMuted,";padding:8px 0;",""),sidebarFooter:m("padding:16px 20px;border-top:1px solid ",s.border,";display:flex;flex-direction:column;gap:8px;",""),actionBtn:m("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",N.base,";font-weight:500;background:",s.primary,";border:1px solid ",s.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:white;&:hover:not(:disabled){background-color:",s.primaryHover,";border-color:",s.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),cancelBtn:m("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),spinner:{name:"1b4712p",styles:"width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin 0.75s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}"},hint:m("font-size:",N.xs,";color:",s.textMuted,";font-style:italic;",""),clearBtn:m("margin-top:8px;padding:6px 12px;font-size:",N.xs,";color:",s.textSecondary,";background:transparent;border:1px solid ",s.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;&:hover{background:",s.surfaceHover,";color:",s.text,";}","")},c2=[{label:"Free",value:void 0},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"2:3",value:2/3},{label:"9:16",value:9/16}];function u2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(2)} MB`}function d2({imagePath:i,imageSrc:c,dimensions:f,fileSize:d,onClose:h,onSaveComplete:p,triggerRefresh:C}){const D=v.useRef(null),[x,y]=v.useState(),[A,z]=v.useState(),[_,q]=v.useState(void 0),[H,G]=v.useState(f.width),[oe,J]=v.useState(f.height),[ce,Q]=v.useState(!1),[le,X]=v.useState(!1),[P,te]=v.useState({width:f.width,height:f.height}),[ae,j]=v.useState(1),[W,he]=v.useState(!1),[me,ge]=v.useState(0),[ie,Oe]=v.useState(!1),T=H!==P.width||oe!==P.height,[Z,ee]=v.useState(0),[Ee,qe]=v.useState(0),[S,O]=v.useState(!1),[ne,re]=v.useState(0),[we,ze]=v.useState(null),[Ge,xt]=v.useState(d),[Re,Pt]=v.useState(95),[Ze,Je]=v.useState(0),it=Ze!==0,Ht=$=>{const ue=$.currentTarget,{naturalWidth:Xe,naturalHeight:at,width:Be,height:Me}=ue;te({width:Xe,height:at}),j(Xe/Be),X(!0),G(Xe),J(at)},Yt=()=>{if(!le||!D.current||W||T||it)return;const $=D.current.width,ue=D.current.height;if(he(!0),_){const Xe=$/ue;let at,Be;_>Xe?(at=100,Be=Xe/_*100):(Be=100,at=_/Xe*100);const Me={unit:"%",x:(100-at)/2,y:(100-Be)/2,width:at,height:Be};y(Me);const zt={unit:"px",x:Math.round(Me.x/100*$),y:Math.round(Me.y/100*ue),width:Math.round(Me.width/100*$),height:Math.round(Me.height/100*ue)};z(zt)}else y({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:$,height:ue})},tn=()=>{he(!1),y(void 0),z(void 0)};v.useEffect(()=>{if(A&&le&&ae>0){const $=Math.round(A.width*ae),ue=Math.round(A.height*ae);ee($),qe(ue)}else W||(ee(0),qe(0))},[A,le,ae,W]);const Qt=()=>{Je($=>($+90)%360)},fn=()=>{Je($=>($-90+360)%360)},Bt=()=>{Je(0)},$e=()=>{ie&&p({name:i.split("/").pop()||"",path:i,type:"file",dimensions:P}),h()},gt=$=>{if(q($),!le||!D.current)return;const ue=D.current.width,Xe=D.current.height;if($){const at=ue/Xe;let Be,Me;$>at?(Be=100,Me=at/$*100):(Me=100,Be=$/at*100);const zt={unit:"%",x:(100-Be)/2,y:(100-Me)/2,width:Be,height:Me};y(zt);const yt={unit:"px",x:Math.round(zt.x/100*ue),y:Math.round(zt.y/100*Xe),width:Math.round(zt.width/100*ue),height:Math.round(zt.height/100*Xe)};z(yt)}else y({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:ue,height:Xe})},kt=P.width/P.height,Te=$=>{if(W)return;const ue=parseInt($.target.value)||0;G(ue),ue>0&&J(Math.round(ue/kt))},mt=$=>{if(W)return;const ue=parseInt($.target.value)||0;J(ue),ue>0&&G(Math.round(ue*kt))},hn=()=>{G(P.width),J(P.height)},Hn=$=>{if(!A||!D.current)return;const ue=parseInt($.target.value)||0;if(ue<=0)return;let Xe=Ee;_&&(Xe=Math.round(ue/_));const at=ue/ae,Be=Xe/ae,Me={unit:"px",x:A.x,y:A.y,width:at,height:Be},zt=D.current.width-Me.x,yt=D.current.height-Me.y;Me.width=Math.min(at,zt),Me.height=Math.min(Be,yt),z(Me),y({unit:"px",x:Me.x,y:Me.y,width:Me.width,height:Me.height})},kn=$=>{if(!A||!D.current)return;const ue=parseInt($.target.value)||0;if(ue<=0)return;let Xe=Z;_&&(Xe=Math.round(ue*_));const at=Xe/ae,Be=ue/ae,Me={unit:"px",x:A.x,y:A.y,width:at,height:Be},zt=D.current.width-Me.x,yt=D.current.height-Me.y;Me.width=Math.min(at,zt),Me.height=Math.min(Be,yt),z(Me),y({unit:"px",x:Me.x,y:Me.y,width:Me.width,height:Me.height})},mn=async()=>{if(le){Q(!0);try{const $=A?{x:Math.round(A.x*ae),y:Math.round(A.y*ae),width:Math.round(A.width*ae),height:Math.round(A.height*ae)}:{x:0,y:0,width:P.width,height:P.height};let ue=W?Z:T?H:P.width,Xe=W?Ee:T?oe:P.height;if(Ze===90||Ze===270){const Me=ue;ue=Xe,Xe=Me}const Be=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:i,crop:$,rotation:Ze,resize:{width:ue,height:Xe},quality:Re})})).json();Be.success?(C(),p(Be.updatedItem),te({width:Be.dimensions.width,height:Be.dimensions.height}),G(Be.dimensions.width),J(Be.dimensions.height),Be.updatedItem?.size&&xt(Be.updatedItem.size),he(!1),y(void 0),z(void 0),Je(0),Oe(!0),ge(Date.now()),re(Me=>Me+1),O(!0),setTimeout(()=>O(!1),3e3)):(console.error("Edit failed:",Be.error),ze(Be.error||"Failed to save image"))}catch($){console.error("Edit error:",$),ze("An error occurred while saving the image")}finally{Q(!1)}}};return b("div",{css:Se.overlay,children:[b("div",{css:Se.container,children:[b("div",{css:Se.main,children:[r("div",{css:Se.headerButtons,children:r("button",{css:Se.closeBtn,onClick:$e,children:r("svg",{css:Se.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})}),b("div",{css:Se.rotationWrapper,onClick:Yt,children:[r(r2,{crop:W?x:void 0,onChange:$=>y($),onComplete:$=>z($),aspect:_,css:Se.cropWrapper,disabled:!W,children:r("img",{ref:D,src:me?`${c}?v=${me}`:c,alt:"Edit",onLoad:Ht,style:{cursor:W?"crosshair":"pointer"}})}),!W&&le&&r("div",{css:Se.cropHint,children:it?"Save rotation first to enable crop":T?"Save resize first to enable crop":"Click to enable crop selection"}),S&&r("div",{css:Se.successBanner,children:"Image updated"},ne)]})]}),b("div",{css:Se.sidebar,children:[r("div",{css:Se.sidebarHeader,children:r("h2",{css:Se.sidebarTitle,children:"Edit Image"})}),b("div",{css:Se.sidebarContent,children:[b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"Crop Selection"}),r("span",{css:Se.subSectionLabel,children:"Aspect Ratio"}),r("div",{css:Se.aspectButtons,children:c2.map($=>r("button",{css:[Se.aspectBtn,_===$.value&&Se.aspectBtnActive,"",""],onClick:()=>gt($.value),disabled:T||it,children:$.label},$.label))}),W&&b(tt,{children:[r("span",{css:Se.subSectionLabel,children:"Selection Size"}),b("div",{css:Se.resizeRow,children:[r("input",{type:"number",css:Se.resizeInput,value:Z,onChange:Hn,min:1}),r("span",{css:Se.resizeX,children:"×"}),r("input",{type:"number",css:Se.resizeInput,value:Ee,onChange:kn,min:1}),r("span",{css:Se.resizeX,children:"px"})]})]}),r("p",{css:Se.hint,children:it?"Save rotation first to enable crop":T?"Save resize first to enable crop":W?"Drag corners to resize crop area":"Click image to enable crop"}),W&&r("button",{css:Se.clearBtn,onClick:tn,children:"Clear Selection"})]}),b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"Rotation"}),r("div",{css:Se.rotatePreview,children:r("img",{src:me?`${c}?v=${me}`:c,alt:"Rotation preview",style:{transform:`rotate(${Ze}deg)`}})}),b("div",{css:Se.rotateButtons,children:[b("button",{css:Se.rotateBtn,onClick:fn,disabled:ce||W||T,children:[r("svg",{css:Se.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),"CCW"]}),b("button",{css:Se.rotateBtn,onClick:Qt,disabled:ce||W||T,children:[r("svg",{css:Se.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 10h-10a8 8 0 00-8 8v2M21 10l-6 6m6-6l-6-6"})}),"CW"]})]}),it&&r("button",{css:Se.clearBtn,onClick:Bt,children:"Reset Rotation"}),r("p",{css:Se.hint,children:W||T?"Save other changes first to rotate":it?"Click Save Changes to apply rotation":"Preview rotation before saving"})]}),b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"Resize Image"}),b("div",{css:Se.resizeRow,children:[r("input",{type:"number",css:Se.resizeInput,value:H,onChange:Te,min:1,disabled:W||it}),r("span",{css:Se.resizeX,children:"×"}),r("input",{type:"number",css:Se.resizeInput,value:oe,onChange:mt,min:1,disabled:W||it}),r("span",{css:Se.resizeX,children:"px"})]}),T&&!W&&!it&&r("button",{css:Se.clearBtn,onClick:hn,children:"Reset to Original"}),it?r("p",{css:Se.hint,children:"Save rotation first to resize"}):W?r("p",{css:Se.hint,children:"Clear crop selection to resize"}):T?r("p",{css:Se.hint,children:"Save to apply resize, then crop"}):r("p",{css:Se.hint,children:"Maintains aspect ratio"})]}),b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"Quality"}),b("div",{css:Se.qualityRow,children:[r("input",{type:"range",css:Se.qualitySlider,min:1,max:100,value:Re,onChange:$=>Pt(parseInt($.target.value))}),b("span",{css:Se.qualityValue,children:[Re,"%"]})]}),r("p",{css:Se.hint,children:"Lower quality = smaller file size"})]}),b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"File Size"}),r("p",{css:Se.fileSize,children:u2(Ge)})]})]}),b("div",{css:Se.sidebarFooter,children:[r("button",{css:Se.actionBtn,onClick:mn,disabled:ce||!le,children:ce?b(tt,{children:[r("span",{css:Se.spinner}),"Saving..."]}):"Save Changes"}),r("button",{css:Se.cancelBtn,onClick:$e,disabled:ce,children:"Close"})]})]})]}),we&&r(Gr,{title:"Error",message:we,onClose:()=>ze(null)})]})}const f2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],h2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function p2(i){const c=i.toLowerCase().substring(i.lastIndexOf("."));return f2.includes(c)}function g2(i){const c=i.toLowerCase().substring(i.lastIndexOf("."));return h2.includes(c)}const fe={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:m("display:flex;flex:1;margin:24px;background:",s.surface,";border:1px solid ",s.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:m("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",s.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:m("position:relative;padding:8px;background:",s.surface,";border:1px solid ",s.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:",s.surfaceHover,";border-color:",s.borderHover,";}",""),copyIcon:m("width:20px;height:20px;color:",s.textSecondary,";",""),statusIcon:m("display:flex;align-items:center;justify-content:center;padding:8px;background:",s.surface,";border:1px solid ",s.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:m("padding:8px;background:",s.surface,";border:1px solid ",s.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:",s.surfaceHover,";border-color:",s.borderHover,";}",""),mainCloseIcon:m("width:20px;height:20px;color:",s.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:m("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",s.surface,";border-radius:12px;border:1px solid ",s.border,";",""),fileIcon:m("width:80px;height:80px;color:",s.textMuted,";margin-bottom:16px;",""),fileName:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;",""),sidebar:m("width:280px;background:",s.surface,";border-left:1px solid ",s.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:m("padding:16px 20px;border-bottom:1px solid ",s.border,";",""),sidebarTitle:m("font-size:",N.base,";font-weight:600;color:",s.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:m("display:flex;justify-content:space-between;font-size:",N.sm,";",""),infoLabel:m("color:",s.textSecondary,";",""),infoValue:m("color:",s.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:m("color:",s.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:m("color:",s.primary,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;text-decoration:none;&:hover{text-decoration:underline;}",""),thumbChips:{name:"1w7hks3",styles:"display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end"},thumbChip:m("font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:",s.primary,";color:white;",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:m("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",s.text,";text-align:left;&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:m("color:",s.danger,";&:hover:not(:disabled){background-color:",s.dangerLight,";border-color:",s.danger,";}",""),actionBtnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},actionIcon:{name:"a4lfw4",styles:"width:16px;height:16px;flex-shrink:0"}};function m2(){const{focusedItem:i,setFocusedItem:c,triggerRefresh:f,fileItems:d,setEditedImageKey:h,requestDelete:p,requestMove:C,requestSync:D,requestDownload:x,requestProcess:y,setProcessMode:A,actionState:z}=po(),[_,q]=v.useState(!1),[H,G]=v.useState(!1),[oe,J]=v.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[ce,Q]=v.useState(!1),[le,X]=v.useState(null),[P,te]=v.useState(!1),[ae,j]=v.useState(!1),[W,he]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[me,ge]=v.useState(!1),[ie,Oe]=v.useState(0),T=z.showProgress,Z=i?i.name.toLowerCase()==="favicon.png"||i.name.toLowerCase()==="favicon.jpg":!1,ee=i&&!i.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(i.name)&&(!i.isCloud||i.hasUpdate),Ee=Je=>{c(Je),Oe(Date.now()),h(Je.path)};if(!i)return null;const qe=p2(i.name),S=g2(i.name),O="/"+i.path.replace(/^public\//,""),ne=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${O}`:O,re=ie?`${ne}?v=${ie}`:ne,we=typeof window<"u"?window.location.origin:"",ze=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${O}`:`${we}${O}`,Ge=()=>{c(null)},xt=()=>{navigator.clipboard.writeText(ze),te(!0),setTimeout(()=>te(!1),1500)},Re=async Je=>{if(Je&&Je!==i.name){q(!1),G(!0),J({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const it=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:i.path,newName:Je})});if(!it.body)throw new Error("No response body");const Ht=it.body.getReader(),Yt=new TextDecoder;let tn="",Qt="";for(;;){const{done:fn,value:Bt}=await Ht.read();if(fn)break;tn+=Yt.decode(Bt,{stream:!0});const $e=tn.split(`
89
- `);tn=$e.pop()||"";for(const gt of $e){if(!gt.startsWith("data: "))continue;const kt=JSON.parse(gt.slice(6));kt.type==="start"?J({current:0,total:kt.total,percent:0,status:"processing",message:kt.message}):kt.type==="progress"?J({current:kt.current,total:kt.total,percent:Math.round(kt.current/kt.total*100),status:"processing",message:kt.message}):kt.type==="complete"?(Qt=kt.newPath,J({current:kt.renamed,total:kt.renamed,percent:100,status:"complete",message:"Renamed successfully"})):kt.type==="error"&&(J(Te=>({...Te,status:"error",message:kt.message})),X({title:"Rename Failed",message:kt.message}))}}Qt&&(c({...i,path:Qt,name:Qt.split("/").pop()||Je}),f())}catch(it){console.error("Rename error:",it),J(Ht=>({...Ht,status:"error",message:"Failed to rename"})),X({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},Pt=async()=>{if(i){j(!0),he({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const Je=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+i.path.replace(/^public\//,"")})});if(!Je.ok){const Yt=await Je.json();he({current:0,total:3,percent:0,status:"error",message:Yt.error||"Failed to generate favicons"});return}const it=Je.body?.getReader(),Ht=new TextDecoder;if(it){let Yt="";for(;;){const{done:tn,value:Qt}=await it.read();if(tn)break;Yt+=Ht.decode(Qt,{stream:!0});const fn=Yt.split(`
90
- `);Yt=fn.pop()||"";for(const Bt of fn)if(Bt.startsWith("data: "))try{const $e=JSON.parse(Bt.slice(6));$e.type==="start"?he(gt=>({...gt,total:$e.total})):$e.type==="progress"?he({current:$e.current,total:$e.total,percent:$e.percent,status:"processing",message:$e.message}):$e.type==="complete"?he({current:$e.processed,total:$e.processed,percent:100,status:$e.errors>0?"error":"complete",message:$e.message}):$e.type==="error"&&he(gt=>({...gt,status:"error",message:$e.message}))}catch{}}}}catch(Je){console.error("Favicon generation error:",Je),he({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},Ze=()=>qe?r("img",{css:fe.image,src:re,alt:i.name}):S?r("video",{css:fe.video,src:re,controls:!0}):b("div",{css:fe.filePlaceholder,children:[r("svg",{css:fe.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),r("p",{css:fe.fileName,children:i.name})]});return b(tt,{children:[le&&r(Gr,{title:le.title,message:le.message,onClose:()=>X(null)}),r(Qp,{isOpen:ce,onClose:()=>Q(!1)}),_&&r(Cl,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:i.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:Re,onCancel:()=>q(!1)}),H&&r(al,{title:"Renaming",progress:oe,onClose:()=>{G(!1),f()}}),ae&&r(al,{title:"Generating Favicons",progress:W,onClose:()=>j(!1)}),r("div",{css:fe.overlay,onClick:Ge,children:b("div",{css:fe.container,onClick:Je=>Je.stopPropagation(),children:[b("div",{css:fe.main,children:[b("div",{css:fe.headerButtons,children:[i.cdnPushed&&!i.isRemote&&r("span",{css:fe.statusIcon,title:"Pushed to CDN",children:r("svg",{css:fe.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}),i.isRemote&&r("span",{css:fe.statusIcon,title:"Remote image",children:r("svg",{css:fe.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})})}),b("button",{css:fe.copyBtn,onClick:xt,title:"Copy file path",children:[P&&r("span",{css:fe.tooltip,children:"Copied!"}),r("svg",{css:fe.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:fe.mainCloseBtn,onClick:Ge,"aria-label":"Close",children:r("svg",{css:fe.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r("div",{css:fe.mediaWrapper,children:Ze()})]}),b("div",{css:fe.sidebar,children:[r("div",{css:fe.sidebarHeader,children:r("h3",{css:fe.sidebarTitle,children:"Details"})}),b("div",{css:fe.sidebarContent,children:[b("div",{css:fe.info,children:[b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Name"}),r("span",{css:fe.infoValueWrap,children:i.name})]}),b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Path"}),r("span",{css:fe.infoValueWrap,children:i.path.replace(/^public\//,"")})]}),i.size!==void 0&&b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Size"}),r("span",{css:fe.infoValue,children:y2(i.size)})]}),i.dimensions&&b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Dimensions"}),b("span",{css:fe.infoValue,children:[i.dimensions.width," × ",i.dimensions.height]})]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Thumbnails"}),r("span",{css:fe.infoValue,children:b("span",{css:fe.thumbChips,children:[i.hasSm&&r("span",{css:fe.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:fe.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:fe.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:fe.thumbChip,children:"FULL"})]})})]}),b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"CDN Status"}),r("span",{css:fe.infoValue,children:i.cdnPushed?i.isRemote?"Remote":"Pushed":"Local"})]}),b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"URL"}),r("a",{href:ze,target:"_blank",rel:"noopener noreferrer",css:fe.infoLink,title:ze,children:ze})]})]}),b("div",{css:fe.actions,children:[b("button",{css:fe.actionBtn,onClick:()=>q(!0),disabled:i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Rename"]}),qe&&b("button",{css:fe.actionBtn,onClick:()=>ge(!0),disabled:T||!ee,title:ee?void 0:"Download image first to edit",children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14M14 8l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2"})}),ee?"Edit Image":"Download to Edit"]}),b("button",{css:fe.actionBtn,onClick:()=>C([i.path]),disabled:T||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"Move"]}),b("button",{css:[fe.actionBtn,fe.actionBtnCloud,"",""],onClick:()=>D([i.path],d),disabled:T||i.isProtected||i.cdnPushed&&!i.isRemote,title:i.cdnPushed&&!i.isRemote?"Already in R2":void 0,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Push to CDN"]}),b("button",{css:[fe.actionBtn,fe.actionBtnCloud,"",""],onClick:()=>x([i.path],d),disabled:T||!i.cdnPushed||i.isRemote,title:i.cdnPushed?i.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})}),"Download from CDN"]}),b("button",{css:fe.actionBtn,onClick:()=>{A("generate"),y([i.path])},disabled:T||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Generate Thumbnails"]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("button",{css:fe.actionBtn,onClick:()=>{A("remove"),y([i.path])},disabled:T||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Remove Thumbnails"]}),Z&&b("button",{css:fe.actionBtn,onClick:Pt,disabled:ae||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),"Generate Favicons"]}),b("button",{css:[fe.actionBtn,fe.actionBtnDanger,"",""],onClick:()=>p([i.path]),disabled:T||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete"]})]})]})]})]})}),me&&i.dimensions&&r(d2,{imagePath:i.path,imageSrc:re,dimensions:i.dimensions,fileSize:i.size||0,onClose:()=>ge(!1),onSaveComplete:Ee,triggerRefresh:f})]})}function y2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const wl={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:m("background:",s.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:m("width:24px;height:24px;color:",s.danger,";flex-shrink:0;",""),title:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;",""),message:m("font-size:",N.base,";color:",s.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:m("width:100%;padding:10px 16px;border-radius:6px;font-size:",N.base,";font-weight:500;border:none;background:",s.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",s.primaryHover,";}","")};function b2(){const{error:i,clearError:c}=po();return i?r("div",{css:wl.overlay,onClick:c,children:b("div",{css:wl.modal,onClick:f=>f.stopPropagation(),children:[b("div",{css:wl.header,children:[r("svg",{css:wl.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),r("h3",{css:wl.title,children:i.title})]}),r("p",{css:wl.message,children:i.message}),r("button",{css:wl.button,onClick:c,children:"OK"})]})}):null}const Ap={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0};function v2({triggerRefresh:i,clearSelection:c,setFocusedItem:f,showError:d}){const[h,p]=v.useState(Ap),C=v.useCallback(ae=>{p(j=>({...j,progressState:typeof ae=="function"?ae(j.progressState):{...j.progressState,...ae}}))},[]),D=v.useCallback(ae=>{p(j=>({...j,showProgress:ae}))},[]),x=v.useCallback(ae=>{p(j=>({...j,progressTitle:ae}))},[]),y=Vp({setShowProgress:D,setProgressTitle:x,setProgressState:C,triggerRefresh:i}),A=v.useCallback(ae=>{p(j=>({...j,actionPaths:ae,showDeleteConfirm:!0}))},[]),z=v.useCallback(ae=>{p(j=>({...j,actionPaths:ae,showMoveModal:!0}))},[]),_=v.useCallback((ae,j)=>{const W=ae.map(ge=>"/"+ge.replace(/^public\//,""));let he=!1,me=!1;for(const ge of ae){const ie=j.find(Oe=>Oe.path===ge);ie&&(ie.isRemote?he=!0:ie.cdnPushed||(me=!0))}p(ge=>({...ge,actionPaths:ae,syncImageCount:W.length,syncHasRemote:he,syncHasLocal:me,showSyncConfirm:!0}))},[]),q=v.useCallback((ae,j)=>{const W=[];for(const he of ae){const me=j.find(ge=>ge.path===he);me&&me.cdnPushed&&!me.isRemote&&W.push(he)}p(he=>({...he,actionPaths:W,downloadImageCount:W.length,downloadTotalSelected:ae.length,showDownloadConfirm:!0}))},[]),H=v.useCallback(ae=>{p(j=>({...j,actionPaths:ae,showProcessConfirm:!0}))},[]),G=v.useCallback(ae=>{p(j=>({...j,processMode:ae}))},[]),oe=v.useCallback(()=>{p(ae=>({...ae,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),J=v.useCallback(()=>{p(Ap)},[]),ce=v.useCallback(()=>{y.stop()},[y]),Q=v.useCallback(async()=>{const ae=h.actionPaths;p(j=>({...j,showDeleteConfirm:!1}));try{const j=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ae})});if(j.ok)c(),f(null),i();else{const W=await j.json();d("Delete Failed",W.error||"Unknown error")}}catch(j){console.error("Delete error:",j),d("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,c,f,i,d]),le=v.useCallback(async ae=>{const j=h.actionPaths;p(W=>({...W,showMoveModal:!1})),await y.execute({endpoint:"/api/studio/move",body:{paths:j,destination:ae},title:"Moving Files",onComplete:W=>{W.errors&&W.errors>0&&W.errorMessages?.length&&d("Move Failed",W.errorMessages.join(`
91
- `)),c(),f(null)}})},[h.actionPaths,c,f,d,y]),X=v.useCallback(async()=>{const j=h.actionPaths.map(me=>"/"+me.replace(/^public\//,""));p(me=>({...me,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:j.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let W=0;const he=[];for(let me=0;me<j.length;me++){const ge=j[me];try{const ie=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[ge]})});if(ie.ok)W++;else{const Oe=await ie.json();he.push(`${ge}: ${Oe.error||"Unknown error"}`)}}catch(ie){he.push(`${ge}: ${ie instanceof Error?ie.message:"Unknown error"}`)}C({current:me+1,total:j.length,percent:Math.round((me+1)/j.length*100),status:"processing",message:`Pushed ${ge}`})}C({current:j.length,total:j.length,percent:100,status:he.length>0?"error":"complete",message:`Pushed ${W} file${W!==1?"s":""}${he.length>0?`, ${he.length} error${he.length!==1?"s":""}`:""}`}),he.length>0&&d("Push Errors",he.join(`
92
- `)),c(),i()},[h.actionPaths,c,i,d,C]),P=v.useCallback(async()=>{const ae=h.actionPaths,j=h.processMode,W=ae.map(ie=>{const Oe=ie.replace(/^public\//,"");return Oe.startsWith("/")?Oe:`/${Oe}`}),he=j==="remove",me=he?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",ge=he?"Removing Thumbnails":"Generating Thumbnails";p(ie=>({...ie,showProcessConfirm:!1})),await y.execute({endpoint:me,body:{imageKeys:W},title:ge})},[h.actionPaths,h.processMode,y]),te=v.useCallback(async()=>{const ae=h.progressState.orphanedFiles;if(!(!ae||ae.length===0))try{const j=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:ae})});if(j.ok)C(W=>({...W,orphanedFiles:void 0,message:W.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),i();else{const W=await j.json();d("Delete Failed",W.error||"Failed to delete orphaned files")}}catch(j){console.error("Delete orphans error:",j),d("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[h.progressState.orphanedFiles,i,d,C]);return{actionState:h,setActionState:p,requestDelete:A,requestMove:z,requestSync:_,requestDownload:q,requestProcess:H,setProcessMode:G,cancelAction:oe,closeProgress:J,stopProcessing:ce,confirmDelete:Q,confirmMove:le,confirmSync:X,confirmProcess:P,deleteOrphans:te}}const x2=Ft`
88
+ `,Se={overlay:m("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",s2," 0.15s ease-out;font-family:",kl,";",""),container:m(ll," display:flex;flex:1;margin:24px;background:",s.surface,";border:1px solid ",s.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:m("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",s.background,";overflow:hidden;.ReactCrop__crop-selection{border:2px solid ",s.primary,";}",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},closeBtn:m("padding:8px;background:",s.surface,";border:1px solid ",s.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:",s.surfaceHover,";border-color:",s.borderHover,";}",""),closeIcon:m("width:20px;height:20px;color:",s.textSecondary,";",""),rotationWrapper:{name:"1xwnw1d",styles:"transition:transform 0.3s ease;position:relative;cursor:pointer"},cropHint:m("position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0, 0, 0, 0.7);color:white;padding:12px 20px;border-radius:8px;font-size:",N.sm,";pointer-events:none;white-space:nowrap;",""),successBanner:m("position:absolute;top:24px;left:50%;transform:translateX(-50%);background:#22c55e;color:#fff;padding:12px 24px;border-radius:8px;font-size:",N.sm,";font-weight:600;pointer-events:none;z-index:10;animation:fadeInOut 3s ease-in-out forwards;@keyframes fadeInOut{0%{opacity:0;transform:translateX(-50%) scale(0.9);}10%{opacity:1;transform:translateX(-50%) scale(1);}90%{opacity:1;transform:translateX(-50%) scale(1);}100%{opacity:0;transform:translateX(-50%) scale(0.9);}}",""),cropWrapper:{name:"12wysvm",styles:"max-width:100%;max-height:calc(100vh - 150px);img{max-width:100%;max-height:calc(100vh - 150px);display:block;}"},sidebar:m("width:280px;background:",s.surface,";border-left:1px solid ",s.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:m("padding:16px 20px;border-bottom:1px solid ",s.border,";",""),sidebarTitle:m("font-size:",N.base,";font-weight:600;color:",s.text,";margin:0;",""),sidebarContent:{name:"1uv1qvv",styles:"flex:1;padding:20px;overflow:auto;display:flex;flex-direction:column;gap:20px"},section:{name:"1c3pogw",styles:"display:flex;flex-direction:column;gap:10px"},sectionLabel:m("font-size:",N.sm,";font-weight:600;color:",s.text,";",""),subSectionLabel:m("font-size:",N.xs,";font-weight:500;color:",s.textMuted,";text-transform:uppercase;letter-spacing:0.5px;",""),aspectButtons:{name:"13l5m7f",styles:"display:flex;gap:6px;flex-wrap:wrap"},aspectBtn:m("padding:6px 10px;font-size:",N.sm,";border:1px solid ",s.border,";background:",s.surface,";color:",s.text,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),aspectBtnActive:m("background-color:",s.primary,";border-color:",s.primary,";color:white;&:hover:not(:disabled){background-color:",s.primary,";border-color:",s.primary,";}",""),rotateButtons:{name:"11jf4ye",styles:"display:flex;gap:8px"},rotateBtn:m("flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;font-size:",N.sm,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",s.text,";&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),rotateIcon:{name:"157xhr7",styles:"width:16px;height:16px"},rotatePreview:m("width:80px;height:80px;border:1px solid ",s.border,";border-radius:6px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:",s.background,";margin:8px auto;img{max-width:100%;max-height:100%;object-fit:contain;transition:transform 0.3s ease;}",""),resizeRow:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},resizeInput:m("width:80px;min-width:0;padding:8px 6px;font-size:",N.sm,";border:1px solid ",s.border,";border-radius:6px;background:",s.surface,";color:",s.text,";text-align:center;&:focus{outline:none;border-color:",s.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;background:",s.surfaceHover,";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}-moz-appearance:textfield;",""),resizeX:m("font-size:",N.sm,";color:",s.textMuted,";",""),qualitySlider:m("width:100%;height:6px;border-radius:3px;background:",s.border,";outline:none;cursor:pointer;&::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:",s.primary,";cursor:pointer;}&::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:",s.primary,";cursor:pointer;border:none;}",""),qualityRow:{name:"uh5xjc",styles:"display:flex;align-items:center;gap:12px"},qualityValue:m("min-width:40px;font-size:",N.sm,";color:",s.text,";text-align:right;",""),fileSize:m("font-size:",N.sm,";color:",s.textMuted,";padding:8px 0;",""),sidebarFooter:m("padding:16px 20px;border-top:1px solid ",s.border,";display:flex;flex-direction:column;gap:8px;",""),actionBtn:m("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",N.base,";font-weight:500;background:",s.primary,";border:1px solid ",s.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:white;&:hover:not(:disabled){background-color:",s.primaryHover,";border-color:",s.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),cancelBtn:m("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),spinner:{name:"1b4712p",styles:"width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin 0.75s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}"},hint:m("font-size:",N.xs,";color:",s.textMuted,";font-style:italic;",""),clearBtn:m("margin-top:8px;padding:6px 12px;font-size:",N.xs,";color:",s.textSecondary,";background:transparent;border:1px solid ",s.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;&:hover{background:",s.surfaceHover,";color:",s.text,";}","")},c2=[{label:"Free",value:void 0},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"2:3",value:2/3},{label:"9:16",value:9/16}];function u2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(2)} MB`}function d2({imagePath:i,imageSrc:c,dimensions:f,fileSize:d,onClose:h,onSaveComplete:p,triggerRefresh:C}){const D=v.useRef(null),[x,y]=v.useState(),[A,z]=v.useState(),[_,q]=v.useState(void 0),[H,G]=v.useState(f.width),[oe,J]=v.useState(f.height),[ce,Q]=v.useState(!1),[le,X]=v.useState(!1),[P,te]=v.useState({width:f.width,height:f.height}),[ae,j]=v.useState(1),[$,he]=v.useState(!1),[me,ge]=v.useState(0),[ie,Oe]=v.useState(!1),T=H!==P.width||oe!==P.height,[Z,ee]=v.useState(0),[Ee,Ye]=v.useState(0),[S,O]=v.useState(!1),[ne,re]=v.useState(0),[we,Me]=v.useState(null),[Xe,St]=v.useState(d),[Re,Pt]=v.useState(95),[Je,We]=v.useState(0),rt=Je!==0,Ht=W=>{const ue=W.currentTarget,{naturalWidth:Ve,naturalHeight:lt,width:Ue,height:De}=ue;te({width:Ve,height:lt}),j(Ve/Ue),X(!0),G(Ve),J(lt)},Yt=()=>{if(!le||!D.current||$||T||rt)return;const W=D.current.width,ue=D.current.height;if(he(!0),_){const Ve=W/ue;let lt,Ue;_>Ve?(lt=100,Ue=Ve/_*100):(Ue=100,lt=_/Ve*100);const De={unit:"%",x:(100-lt)/2,y:(100-Ue)/2,width:lt,height:Ue};y(De);const Mt={unit:"px",x:Math.round(De.x/100*W),y:Math.round(De.y/100*ue),width:Math.round(De.width/100*W),height:Math.round(De.height/100*ue)};z(Mt)}else y({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:W,height:ue})},tn=()=>{he(!1),y(void 0),z(void 0)};v.useEffect(()=>{if(A&&le&&ae>0){const W=Math.round(A.width*ae),ue=Math.round(A.height*ae);ee(W),Ye(ue)}else $||(ee(0),Ye(0))},[A,le,ae,$]);const Qt=()=>{We(W=>(W+90)%360)},fn=()=>{We(W=>(W-90+360)%360)},Bt=()=>{We(0)},$e=()=>{ie&&p({name:i.split("/").pop()||"",path:i,type:"file",dimensions:P}),h()},mt=W=>{if(q(W),!le||!D.current)return;const ue=D.current.width,Ve=D.current.height;if(W){const lt=ue/Ve;let Ue,De;W>lt?(Ue=100,De=lt/W*100):(De=100,Ue=W/lt*100);const Mt={unit:"%",x:(100-Ue)/2,y:(100-De)/2,width:Ue,height:De};y(Mt);const bt={unit:"px",x:Math.round(Mt.x/100*ue),y:Math.round(Mt.y/100*Ve),width:Math.round(Mt.width/100*ue),height:Math.round(Mt.height/100*Ve)};z(bt)}else y({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:ue,height:Ve})},zt=P.width/P.height,Te=W=>{if($)return;const ue=parseInt(W.target.value)||0;G(ue),ue>0&&J(Math.round(ue/zt))},yt=W=>{if($)return;const ue=parseInt(W.target.value)||0;J(ue),ue>0&&G(Math.round(ue*zt))},hn=()=>{G(P.width),J(P.height)},Hn=W=>{if(!A||!D.current)return;const ue=parseInt(W.target.value)||0;if(ue<=0)return;let Ve=Ee;_&&(Ve=Math.round(ue/_));const lt=ue/ae,Ue=Ve/ae,De={unit:"px",x:A.x,y:A.y,width:lt,height:Ue},Mt=D.current.width-De.x,bt=D.current.height-De.y;De.width=Math.min(lt,Mt),De.height=Math.min(Ue,bt),z(De),y({unit:"px",x:De.x,y:De.y,width:De.width,height:De.height})},kn=W=>{if(!A||!D.current)return;const ue=parseInt(W.target.value)||0;if(ue<=0)return;let Ve=Z;_&&(Ve=Math.round(ue*_));const lt=Ve/ae,Ue=ue/ae,De={unit:"px",x:A.x,y:A.y,width:lt,height:Ue},Mt=D.current.width-De.x,bt=D.current.height-De.y;De.width=Math.min(lt,Mt),De.height=Math.min(Ue,bt),z(De),y({unit:"px",x:De.x,y:De.y,width:De.width,height:De.height})},mn=async()=>{if(le){Q(!0);try{const W=A?{x:Math.round(A.x*ae),y:Math.round(A.y*ae),width:Math.round(A.width*ae),height:Math.round(A.height*ae)}:{x:0,y:0,width:P.width,height:P.height};let ue=$?Z:T?H:P.width,Ve=$?Ee:T?oe:P.height;if(Je===90||Je===270){const De=ue;ue=Ve,Ve=De}const Ue=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:i,crop:W,rotation:Je,resize:{width:ue,height:Ve},quality:Re})})).json();Ue.success?(C(),p(Ue.updatedItem),te({width:Ue.dimensions.width,height:Ue.dimensions.height}),G(Ue.dimensions.width),J(Ue.dimensions.height),Ue.updatedItem?.size&&St(Ue.updatedItem.size),he(!1),y(void 0),z(void 0),We(0),Oe(!0),ge(Date.now()),re(De=>De+1),O(!0),setTimeout(()=>O(!1),3e3)):(console.error("Edit failed:",Ue.error),Me(Ue.error||"Failed to save image"))}catch(W){console.error("Edit error:",W),Me("An error occurred while saving the image")}finally{Q(!1)}}};return b("div",{css:Se.overlay,children:[b("div",{css:Se.container,children:[b("div",{css:Se.main,children:[r("div",{css:Se.headerButtons,children:r("button",{css:Se.closeBtn,onClick:$e,children:r("svg",{css:Se.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})}),b("div",{css:Se.rotationWrapper,onClick:Yt,children:[r(r2,{crop:$?x:void 0,onChange:W=>y(W),onComplete:W=>z(W),aspect:_,css:Se.cropWrapper,disabled:!$,children:r("img",{ref:D,src:me?`${c}?v=${me}`:c,alt:"Edit",onLoad:Ht,style:{cursor:$?"crosshair":"pointer"}})}),!$&&le&&r("div",{css:Se.cropHint,children:rt?"Save rotation first to enable crop":T?"Save resize first to enable crop":"Click to enable crop selection"}),S&&r("div",{css:Se.successBanner,children:"Image updated"},ne)]})]}),b("div",{css:Se.sidebar,children:[r("div",{css:Se.sidebarHeader,children:r("h2",{css:Se.sidebarTitle,children:"Edit Image"})}),b("div",{css:Se.sidebarContent,children:[b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"Crop Selection"}),r("span",{css:Se.subSectionLabel,children:"Aspect Ratio"}),r("div",{css:Se.aspectButtons,children:c2.map(W=>r("button",{css:[Se.aspectBtn,_===W.value&&Se.aspectBtnActive,"",""],onClick:()=>mt(W.value),disabled:T||rt,children:W.label},W.label))}),$&&b(nt,{children:[r("span",{css:Se.subSectionLabel,children:"Selection Size"}),b("div",{css:Se.resizeRow,children:[r("input",{type:"number",css:Se.resizeInput,value:Z,onChange:Hn,min:1}),r("span",{css:Se.resizeX,children:"×"}),r("input",{type:"number",css:Se.resizeInput,value:Ee,onChange:kn,min:1}),r("span",{css:Se.resizeX,children:"px"})]})]}),r("p",{css:Se.hint,children:rt?"Save rotation first to enable crop":T?"Save resize first to enable crop":$?"Drag corners to resize crop area":"Click image to enable crop"}),$&&r("button",{css:Se.clearBtn,onClick:tn,children:"Clear Selection"})]}),b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"Rotation"}),r("div",{css:Se.rotatePreview,children:r("img",{src:me?`${c}?v=${me}`:c,alt:"Rotation preview",style:{transform:`rotate(${Je}deg)`}})}),b("div",{css:Se.rotateButtons,children:[b("button",{css:Se.rotateBtn,onClick:fn,disabled:ce||$||T,children:[r("svg",{css:Se.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),"CCW"]}),b("button",{css:Se.rotateBtn,onClick:Qt,disabled:ce||$||T,children:[r("svg",{css:Se.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 10h-10a8 8 0 00-8 8v2M21 10l-6 6m6-6l-6-6"})}),"CW"]})]}),rt&&r("button",{css:Se.clearBtn,onClick:Bt,children:"Reset Rotation"}),r("p",{css:Se.hint,children:$||T?"Save other changes first to rotate":rt?"Click Save Changes to apply rotation":"Preview rotation before saving"})]}),b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"Resize Image"}),b("div",{css:Se.resizeRow,children:[r("input",{type:"number",css:Se.resizeInput,value:H,onChange:Te,min:1,disabled:$||rt}),r("span",{css:Se.resizeX,children:"×"}),r("input",{type:"number",css:Se.resizeInput,value:oe,onChange:yt,min:1,disabled:$||rt}),r("span",{css:Se.resizeX,children:"px"})]}),T&&!$&&!rt&&r("button",{css:Se.clearBtn,onClick:hn,children:"Reset to Original"}),rt?r("p",{css:Se.hint,children:"Save rotation first to resize"}):$?r("p",{css:Se.hint,children:"Clear crop selection to resize"}):T?r("p",{css:Se.hint,children:"Save to apply resize, then crop"}):r("p",{css:Se.hint,children:"Maintains aspect ratio"})]}),b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"Quality"}),b("div",{css:Se.qualityRow,children:[r("input",{type:"range",css:Se.qualitySlider,min:1,max:100,value:Re,onChange:W=>Pt(parseInt(W.target.value))}),b("span",{css:Se.qualityValue,children:[Re,"%"]})]}),r("p",{css:Se.hint,children:"Lower quality = smaller file size"})]}),b("div",{css:Se.section,children:[r("span",{css:Se.sectionLabel,children:"File Size"}),r("p",{css:Se.fileSize,children:u2(Xe)})]})]}),b("div",{css:Se.sidebarFooter,children:[r("button",{css:Se.actionBtn,onClick:mn,disabled:ce||!le,children:ce?b(nt,{children:[r("span",{css:Se.spinner}),"Saving..."]}):"Save Changes"}),r("button",{css:Se.cancelBtn,onClick:$e,disabled:ce,children:"Close"})]})]})]}),we&&r(Gr,{title:"Error",message:we,onClose:()=>Me(null)})]})}const f2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],h2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function p2(i){const c=i.toLowerCase().substring(i.lastIndexOf("."));return f2.includes(c)}function g2(i){const c=i.toLowerCase().substring(i.lastIndexOf("."));return h2.includes(c)}const fe={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:m("display:flex;flex:1;margin:24px;background:",s.surface,";border:1px solid ",s.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:m("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",s.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:m("position:relative;padding:8px;background:",s.surface,";border:1px solid ",s.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:",s.surfaceHover,";border-color:",s.borderHover,";}",""),copyIcon:m("width:20px;height:20px;color:",s.textSecondary,";",""),statusIcon:m("display:flex;align-items:center;justify-content:center;padding:8px;background:",s.surface,";border:1px solid ",s.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:m("padding:8px;background:",s.surface,";border:1px solid ",s.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:",s.surfaceHover,";border-color:",s.borderHover,";}",""),mainCloseIcon:m("width:20px;height:20px;color:",s.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:m("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",s.surface,";border-radius:12px;border:1px solid ",s.border,";",""),fileIcon:m("width:80px;height:80px;color:",s.textMuted,";margin-bottom:16px;",""),fileName:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;",""),sidebar:m("width:280px;background:",s.surface,";border-left:1px solid ",s.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:m("padding:16px 20px;border-bottom:1px solid ",s.border,";",""),sidebarTitle:m("font-size:",N.base,";font-weight:600;color:",s.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:m("display:flex;justify-content:space-between;font-size:",N.sm,";",""),infoLabel:m("color:",s.textSecondary,";",""),infoValue:m("color:",s.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:m("color:",s.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:m("color:",s.primary,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;text-decoration:none;&:hover{text-decoration:underline;}",""),thumbChips:{name:"1w7hks3",styles:"display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end"},thumbChip:m("font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:",s.primary,";color:white;",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:m("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",s.text,";text-align:left;&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:m("color:",s.danger,";&:hover:not(:disabled){background-color:",s.dangerLight,";border-color:",s.danger,";}",""),actionBtnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},actionIcon:{name:"a4lfw4",styles:"width:16px;height:16px;flex-shrink:0"}};function m2(){const{focusedItem:i,setFocusedItem:c,triggerRefresh:f,fileItems:d,setEditedImageKey:h,requestDelete:p,requestMove:C,requestSync:D,requestDownload:x,requestProcess:y,setProcessMode:A,actionState:z}=po(),[_,q]=v.useState(!1),[H,G]=v.useState(!1),[oe,J]=v.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[ce,Q]=v.useState(!1),[le,X]=v.useState(null),[P,te]=v.useState(!1),[ae,j]=v.useState(!1),[$,he]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[me,ge]=v.useState(!1),[ie,Oe]=v.useState(0),T=z.showProgress,Z=i?i.name.toLowerCase()==="favicon.png"||i.name.toLowerCase()==="favicon.jpg":!1,ee=i&&!i.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(i.name)&&(!i.isCloud||i.hasUpdate),Ee=We=>{c(We),Oe(Date.now()),h(We.path)};if(!i)return null;const Ye=p2(i.name),S=g2(i.name),O="/"+i.path.replace(/^public\//,""),ne=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${O}`:O,re=ie?`${ne}?v=${ie}`:ne,we=typeof window<"u"?window.location.origin:"",Me=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${O}`:`${we}${O}`,Xe=()=>{c(null)},St=()=>{navigator.clipboard.writeText(Me),te(!0),setTimeout(()=>te(!1),1500)},Re=async We=>{if(We&&We!==i.name){q(!1),G(!0),J({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const rt=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:i.path,newName:We})});if(!rt.body)throw new Error("No response body");const Ht=rt.body.getReader(),Yt=new TextDecoder;let tn="",Qt="";for(;;){const{done:fn,value:Bt}=await Ht.read();if(fn)break;tn+=Yt.decode(Bt,{stream:!0});const $e=tn.split(`
89
+ `);tn=$e.pop()||"";for(const mt of $e){if(!mt.startsWith("data: "))continue;const zt=JSON.parse(mt.slice(6));zt.type==="start"?J({current:0,total:zt.total,percent:0,status:"processing",message:zt.message}):zt.type==="progress"?J({current:zt.current,total:zt.total,percent:Math.round(zt.current/zt.total*100),status:"processing",message:zt.message}):zt.type==="complete"?(Qt=zt.newPath,J({current:zt.renamed,total:zt.renamed,percent:100,status:"complete",message:"Renamed successfully"})):zt.type==="error"&&(J(Te=>({...Te,status:"error",message:zt.message})),X({title:"Rename Failed",message:zt.message}))}}Qt&&(c({...i,path:Qt,name:Qt.split("/").pop()||We}),f())}catch(rt){console.error("Rename error:",rt),J(Ht=>({...Ht,status:"error",message:"Failed to rename"})),X({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},Pt=async()=>{if(i){j(!0),he({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const We=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+i.path.replace(/^public\//,"")})});if(!We.ok){const Yt=await We.json();he({current:0,total:3,percent:0,status:"error",message:Yt.error||"Failed to generate favicons"});return}const rt=We.body?.getReader(),Ht=new TextDecoder;if(rt){let Yt="";for(;;){const{done:tn,value:Qt}=await rt.read();if(tn)break;Yt+=Ht.decode(Qt,{stream:!0});const fn=Yt.split(`
90
+ `);Yt=fn.pop()||"";for(const Bt of fn)if(Bt.startsWith("data: "))try{const $e=JSON.parse(Bt.slice(6));$e.type==="start"?he(mt=>({...mt,total:$e.total})):$e.type==="progress"?he({current:$e.current,total:$e.total,percent:$e.percent,status:"processing",message:$e.message}):$e.type==="complete"?he({current:$e.processed,total:$e.processed,percent:100,status:$e.errors>0?"error":"complete",message:$e.message}):$e.type==="error"&&he(mt=>({...mt,status:"error",message:$e.message}))}catch{}}}}catch(We){console.error("Favicon generation error:",We),he({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},Je=()=>Ye?r("img",{css:fe.image,src:re,alt:i.name}):S?r("video",{css:fe.video,src:re,controls:!0}):b("div",{css:fe.filePlaceholder,children:[r("svg",{css:fe.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),r("p",{css:fe.fileName,children:i.name})]});return b(nt,{children:[le&&r(Gr,{title:le.title,message:le.message,onClose:()=>X(null)}),r(Qp,{isOpen:ce,onClose:()=>Q(!1)}),_&&r(Cl,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:i.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:Re,onCancel:()=>q(!1)}),H&&r(al,{title:"Renaming",progress:oe,onClose:()=>{G(!1),f()}}),ae&&r(al,{title:"Generating Favicons",progress:$,onClose:()=>j(!1)}),r("div",{css:fe.overlay,onClick:Xe,children:b("div",{css:fe.container,onClick:We=>We.stopPropagation(),children:[b("div",{css:fe.main,children:[b("div",{css:fe.headerButtons,children:[i.cdnPushed&&!i.isRemote&&r("span",{css:fe.statusIcon,title:"Pushed to CDN",children:r("svg",{css:fe.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}),i.isRemote&&r("span",{css:fe.statusIcon,title:"Remote image",children:r("svg",{css:fe.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})})}),b("button",{css:fe.copyBtn,onClick:St,title:"Copy file path",children:[P&&r("span",{css:fe.tooltip,children:"Copied!"}),r("svg",{css:fe.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:fe.mainCloseBtn,onClick:Xe,"aria-label":"Close",children:r("svg",{css:fe.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r("div",{css:fe.mediaWrapper,children:Je()})]}),b("div",{css:fe.sidebar,children:[r("div",{css:fe.sidebarHeader,children:r("h3",{css:fe.sidebarTitle,children:"Details"})}),b("div",{css:fe.sidebarContent,children:[b("div",{css:fe.info,children:[b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Name"}),r("span",{css:fe.infoValueWrap,children:i.name})]}),b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Path"}),r("span",{css:fe.infoValueWrap,children:i.path.replace(/^public\//,"")})]}),i.size!==void 0&&b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Size"}),r("span",{css:fe.infoValue,children:y2(i.size)})]}),i.dimensions&&b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Dimensions"}),b("span",{css:fe.infoValue,children:[i.dimensions.width," × ",i.dimensions.height]})]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Thumbnails"}),r("span",{css:fe.infoValue,children:b("span",{css:fe.thumbChips,children:[i.hasSm&&r("span",{css:fe.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:fe.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:fe.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:fe.thumbChip,children:"FULL"})]})})]}),b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"CDN Status"}),r("span",{css:fe.infoValue,children:i.cdnPushed?i.isRemote?"Remote":"Pushed":"Local"})]}),b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"URL"}),r("a",{href:Me,target:"_blank",rel:"noopener noreferrer",css:fe.infoLink,title:Me,children:Me})]})]}),b("div",{css:fe.actions,children:[b("button",{css:fe.actionBtn,onClick:()=>q(!0),disabled:i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Rename"]}),Ye&&b("button",{css:fe.actionBtn,onClick:()=>ge(!0),disabled:T||!ee,title:ee?void 0:"Download image first to edit",children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14M14 8l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2"})}),ee?"Edit Image":"Download to Edit"]}),b("button",{css:fe.actionBtn,onClick:()=>C([i.path]),disabled:T||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"Move"]}),b("button",{css:[fe.actionBtn,fe.actionBtnCloud,"",""],onClick:()=>D([i.path],d),disabled:T||i.isProtected||i.cdnPushed&&!i.isRemote,title:i.cdnPushed&&!i.isRemote?"Already in R2":void 0,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Push to CDN"]}),b("button",{css:[fe.actionBtn,fe.actionBtnCloud,"",""],onClick:()=>x([i.path],d),disabled:T||!i.cdnPushed||i.isRemote,title:i.cdnPushed?i.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})}),"Download from CDN"]}),b("button",{css:fe.actionBtn,onClick:()=>{A("generate"),y([i.path])},disabled:T||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Generate Thumbnails"]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("button",{css:fe.actionBtn,onClick:()=>{A("remove"),y([i.path])},disabled:T||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Remove Thumbnails"]}),Z&&b("button",{css:fe.actionBtn,onClick:Pt,disabled:ae||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),"Generate Favicons"]}),b("button",{css:[fe.actionBtn,fe.actionBtnDanger,"",""],onClick:()=>p([i.path]),disabled:T||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete"]})]})]})]})]})}),me&&i.dimensions&&r(d2,{imagePath:i.path,imageSrc:re,dimensions:i.dimensions,fileSize:i.size||0,onClose:()=>ge(!1),onSaveComplete:Ee,triggerRefresh:f})]})}function y2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const wl={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:m("background:",s.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:m("width:24px;height:24px;color:",s.danger,";flex-shrink:0;",""),title:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;",""),message:m("font-size:",N.base,";color:",s.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:m("width:100%;padding:10px 16px;border-radius:6px;font-size:",N.base,";font-weight:500;border:none;background:",s.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",s.primaryHover,";}","")};function b2(){const{error:i,clearError:c}=po();return i?r("div",{css:wl.overlay,onClick:c,children:b("div",{css:wl.modal,onClick:f=>f.stopPropagation(),children:[b("div",{css:wl.header,children:[r("svg",{css:wl.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),r("h3",{css:wl.title,children:i.title})]}),r("p",{css:wl.message,children:i.message}),r("button",{css:wl.button,onClick:c,children:"OK"})]})}):null}const Ap={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0};function v2({triggerRefresh:i,clearSelection:c,setFocusedItem:f,showError:d}){const[h,p]=v.useState(Ap),C=v.useCallback(ae=>{p(j=>({...j,progressState:typeof ae=="function"?ae(j.progressState):{...j.progressState,...ae}}))},[]),D=v.useCallback(ae=>{p(j=>({...j,showProgress:ae}))},[]),x=v.useCallback(ae=>{p(j=>({...j,progressTitle:ae}))},[]),y=Vp({setShowProgress:D,setProgressTitle:x,setProgressState:C,triggerRefresh:i}),A=v.useCallback(ae=>{p(j=>({...j,actionPaths:ae,showDeleteConfirm:!0}))},[]),z=v.useCallback(ae=>{p(j=>({...j,actionPaths:ae,showMoveModal:!0}))},[]),_=v.useCallback((ae,j)=>{const $=ae.map(ge=>"/"+ge.replace(/^public\//,""));let he=!1,me=!1;for(const ge of ae){const ie=j.find(Oe=>Oe.path===ge);ie&&(ie.isRemote?he=!0:ie.cdnPushed||(me=!0))}p(ge=>({...ge,actionPaths:ae,syncImageCount:$.length,syncHasRemote:he,syncHasLocal:me,showSyncConfirm:!0}))},[]),q=v.useCallback((ae,j)=>{const $=[];for(const he of ae){const me=j.find(ge=>ge.path===he);me&&me.cdnPushed&&!me.isRemote&&$.push(he)}p(he=>({...he,actionPaths:$,downloadImageCount:$.length,downloadTotalSelected:ae.length,showDownloadConfirm:!0}))},[]),H=v.useCallback(ae=>{p(j=>({...j,actionPaths:ae,showProcessConfirm:!0}))},[]),G=v.useCallback(ae=>{p(j=>({...j,processMode:ae}))},[]),oe=v.useCallback(()=>{p(ae=>({...ae,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),J=v.useCallback(()=>{p(Ap)},[]),ce=v.useCallback(()=>{y.stop()},[y]),Q=v.useCallback(async()=>{const ae=h.actionPaths;p(j=>({...j,showDeleteConfirm:!1}));try{const j=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ae})});if(j.ok)c(),f(null),i();else{const $=await j.json();d("Delete Failed",$.error||"Unknown error")}}catch(j){console.error("Delete error:",j),d("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,c,f,i,d]),le=v.useCallback(async ae=>{const j=h.actionPaths;p($=>({...$,showMoveModal:!1})),await y.execute({endpoint:"/api/studio/move",body:{paths:j,destination:ae},title:"Moving Files",onComplete:$=>{$.errors&&$.errors>0&&$.errorMessages?.length&&d("Move Failed",$.errorMessages.join(`
91
+ `)),c(),f(null)}})},[h.actionPaths,c,f,d,y]),X=v.useCallback(async()=>{const j=h.actionPaths.map(me=>"/"+me.replace(/^public\//,""));p(me=>({...me,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:j.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let $=0;const he=[];for(let me=0;me<j.length;me++){const ge=j[me];try{const ie=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[ge]})});if(ie.ok)$++;else{const Oe=await ie.json();he.push(`${ge}: ${Oe.error||"Unknown error"}`)}}catch(ie){he.push(`${ge}: ${ie instanceof Error?ie.message:"Unknown error"}`)}C({current:me+1,total:j.length,percent:Math.round((me+1)/j.length*100),status:"processing",message:`Pushed ${ge}`})}C({current:j.length,total:j.length,percent:100,status:he.length>0?"error":"complete",message:`Pushed ${$} file${$!==1?"s":""}${he.length>0?`, ${he.length} error${he.length!==1?"s":""}`:""}`}),he.length>0&&d("Push Errors",he.join(`
92
+ `)),c(),i()},[h.actionPaths,c,i,d,C]),P=v.useCallback(async()=>{const ae=h.actionPaths,j=h.processMode,$=ae.map(ie=>{const Oe=ie.replace(/^public\//,"");return Oe.startsWith("/")?Oe:`/${Oe}`}),he=j==="remove",me=he?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",ge=he?"Removing Thumbnails":"Generating Thumbnails";p(ie=>({...ie,showProcessConfirm:!1})),await y.execute({endpoint:me,body:{imageKeys:$},title:ge})},[h.actionPaths,h.processMode,y]),te=v.useCallback(async()=>{const ae=h.progressState.orphanedFiles;if(!(!ae||ae.length===0))try{const j=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:ae})});if(j.ok)C($=>({...$,orphanedFiles:void 0,message:$.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),i();else{const $=await j.json();d("Delete Failed",$.error||"Failed to delete orphaned files")}}catch(j){console.error("Delete orphans error:",j),d("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[h.progressState.orphanedFiles,i,d,C]);return{actionState:h,setActionState:p,requestDelete:A,requestMove:z,requestSync:_,requestDownload:q,requestProcess:H,setProcessMode:G,cancelAction:oe,closeProgress:J,stopProcessing:ce,confirmDelete:Q,confirmMove:le,confirmSync:X,confirmProcess:P,deleteOrphans:te}}const x2=Ft`
93
93
  from { opacity: 0; }
94
94
  to { opacity: 1; }
95
95
  `,S2=Ft`
@@ -104,7 +104,7 @@ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function z1({onClose:i}){
104
104
  `,w2=Ft`
105
105
  from { transform: rotate(0deg); }
106
106
  to { transform: rotate(360deg); }
107
- `,je={overlay:m("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:",x2," 0.15s ease-out;font-family:",kl,";",""),modal:m(ll," background-color:",s.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:90vh;overflow:hidden;animation:",S2," 0.2s ease-out;display:flex;flex-direction:column;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"amghpa",styles:"padding:16px 24px 24px;overflow-y:auto;flex:1"},section:{name:"za8dp",styles:"margin-bottom:20px;&:last-child{margin-bottom:0;}"},sectionLabel:m("font-size:",N.sm,";font-weight:600;color:",s.textSecondary,";margin:0 0 8px 0;text-transform:uppercase;letter-spacing:0.05em;",""),folderName:m("display:inline-flex;align-items:center;gap:8px;padding:8px 12px;background:",s.background,";border-radius:6px;font-size:",N.base,";font-weight:500;color:",s.text,";",""),folderIcon:{name:"8pinfb",styles:"width:18px;height:18px;color:#f9935e"},statusBadge:m("display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:6px;font-size:",N.sm,";margin-top:8px;",""),statusNeedsGen:{name:"1ozqf4e",styles:"background:#fef3c7;color:#92400e"},statusReady:{name:"6zd3sa",styles:"background:#d1fae5;color:#065f46"},fontList:{name:"dj9uva",styles:"display:flex;flex-wrap:wrap;gap:6px;margin-top:8px"},fontChip:m("display:inline-flex;align-items:center;padding:4px 10px;background:",s.background,";border-radius:4px;font-size:",N.sm,";color:",s.text,";",""),checkboxList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},checkboxLabel:m("display:flex;align-items:center;gap:10px;padding:10px 12px;background:",s.background,";border-radius:6px;cursor:pointer;transition:background 0.15s ease;&:hover{background:",s.surfaceHover,";}",""),checkbox:m("width:18px;height:18px;accent-color:",s.primary,";cursor:pointer;",""),checkboxText:m("font-size:",N.base,";color:",s.text,";flex:1;",""),addNewRow:{name:"ap5vte",styles:"display:flex;gap:8px;margin-top:12px"},addNewInput:m("flex:1;padding:10px 12px;font-size:",N.base,";border:1px solid ",s.border,";border-radius:6px;background:",s.surface,";color:",s.text,";&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 2px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),addNewBtn:m("padding:10px 16px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;color:",s.text,";transition:all 0.15s ease;&:hover:not(:disabled){background:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),emptyText:m("font-size:",N.sm,";color:",s.textMuted,";padding:8px 0;",""),errorText:m("font-size:",N.sm,";color:",s.danger,";margin-top:4px;",""),footer:m("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:m("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:m("background-color:",s.surface,";border:1px solid ",s.border,";color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),btnConfirm:m("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover:not(:disabled){background-color:",s.primaryHover,";border-color:",s.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},loadingSpinner:m("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",w2," 0.8s linear infinite;","")};function C2({folderPath:i,onConfirm:c,onCancel:f}){const[d,h]=v.useState(!0),[p,C]=v.useState(null),[D,x]=v.useState([]),[y,A]=v.useState(new Set),[z,_]=v.useState(""),[q,H]=v.useState("");v.useEffect(()=>{async function Q(){try{const[le,X]=await Promise.all([fetch("/api/studio/fonts/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:i})}),fetch("/api/studio/fonts/assignments")]);if(le.ok){const P=await le.json();C(P),A(new Set(P.assignments||[]))}if(X.ok){const P=await X.json();x(P.assignments||[])}}catch(le){console.error("Failed to load data:",le)}finally{h(!1)}}Q()},[i]);const G=Q=>{A(le=>{const X=new Set(le);return X.has(Q)?X.delete(Q):X.add(Q),X})},oe=()=>{const Q=z.trim().toLowerCase();if(Q){if(!/^[a-z][a-z0-9]*$/.test(Q)){H("Name must start with a letter and contain only letters and numbers");return}A(le=>new Set([...le,Q])),_(""),H("")}},J=()=>{const Q=Array.from(y);Q.length!==0&&c(Q)};if(d)return r("div",{css:je.overlay,children:r("div",{css:je.modal,children:r("div",{css:je.loading,children:r("div",{css:je.loadingSpinner})})})});const ce=p&&p.ttfFiles.length===0&&p.woff2Files.length===0;return r("div",{css:je.overlay,onClick:f,children:b("div",{css:je.modal,onClick:Q=>Q.stopPropagation(),children:[r("div",{css:je.header,children:r("h3",{css:je.title,children:"Assign Web Font"})}),b("div",{css:je.body,children:[b("div",{css:je.section,children:[r("p",{css:je.sectionLabel,children:"Font Folder"}),b("div",{css:je.folderName,children:[r("svg",{css:je.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),p?.folderName||i.split("/").pop()]}),p&&r("div",{css:[je.statusBadge,p.needsGeneration?je.statusNeedsGen:je.statusReady,"",""],children:p.needsGeneration?b(tt,{children:[r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 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"})}),"woff2 files will be generated (",p.ttfFiles.length," TTF files)"]}):b(tt,{children:[r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"woff2 files ready (",p.woff2Files.length," files)"]})})]}),p&&p.detectedFonts.length>0&&b("div",{css:je.section,children:[r("p",{css:je.sectionLabel,children:"Detected Fonts"}),r("div",{css:je.fontList,children:p.detectedFonts.map((Q,le)=>b("span",{css:je.fontChip,children:[Q.weightName,Q.style==="italic"?" Italic":""]},le))})]}),p&&p.needsGeneration&&b("div",{css:je.section,children:[r("p",{css:je.sectionLabel,children:"TTF Files to Convert"}),b("div",{css:je.fontList,children:[p.ttfFiles.slice(0,8).map((Q,le)=>r("span",{css:je.fontChip,children:Q},le)),p.ttfFiles.length>8&&b("span",{css:je.fontChip,children:["+",p.ttfFiles.length-8," more"]})]})]}),!ce&&b("div",{css:je.section,children:[r("p",{css:je.sectionLabel,children:"Assign To"}),D.length>0?r("div",{css:je.checkboxList,children:D.map(Q=>b("label",{css:je.checkboxLabel,children:[r("input",{type:"checkbox",css:je.checkbox,checked:y.has(Q.name),onChange:()=>G(Q.name)}),r("span",{css:je.checkboxText,children:Q.name})]},Q.name))}):r("p",{css:je.emptyText,children:"No existing font assignments"}),Array.from(y).filter(Q=>!D.find(le=>le.name===Q)).map(Q=>b("label",{css:[je.checkboxLabel,"margin-top:8px;",""],children:[r("input",{type:"checkbox",css:je.checkbox,checked:!0,onChange:()=>G(Q)}),b("span",{css:je.checkboxText,children:[Q," (new)"]})]},Q)),b("div",{css:je.addNewRow,children:[r("input",{type:"text",css:je.addNewInput,placeholder:"Add new assignment...",value:z,onChange:Q=>{_(Q.target.value),H("")},onKeyDown:Q=>{Q.key==="Enter"&&(Q.preventDefault(),oe())}}),r("button",{css:je.addNewBtn,onClick:oe,disabled:!z.trim(),children:"Add"})]}),q&&r("p",{css:je.errorText,children:q})]}),ce&&r("div",{css:je.section,children:r("p",{css:je.emptyText,children:"This folder does not contain any TTF or woff2 font files."})})]}),b("div",{css:je.footer,children:[r("button",{css:[je.btn,je.btnCancel,"",""],onClick:f,children:"Cancel"}),b("button",{css:[je.btn,je.btnConfirm,"",""],onClick:J,disabled:y.size===0||ce,children:["Assign Font",y.size>1?"s":""]})]})]})})}const k2=Ft`
107
+ `,qe={overlay:m("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:",x2," 0.15s ease-out;font-family:",kl,";",""),modal:m(ll," background-color:",s.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:90vh;overflow:hidden;animation:",S2," 0.2s ease-out;display:flex;flex-direction:column;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"amghpa",styles:"padding:16px 24px 24px;overflow-y:auto;flex:1"},section:{name:"za8dp",styles:"margin-bottom:20px;&:last-child{margin-bottom:0;}"},sectionLabel:m("font-size:",N.sm,";font-weight:600;color:",s.textSecondary,";margin:0 0 8px 0;text-transform:uppercase;letter-spacing:0.05em;",""),folderName:m("display:inline-flex;align-items:center;gap:8px;padding:8px 12px;background:",s.background,";border-radius:6px;font-size:",N.base,";font-weight:500;color:",s.text,";",""),folderIcon:{name:"8pinfb",styles:"width:18px;height:18px;color:#f9935e"},statusBadge:m("display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:6px;font-size:",N.sm,";margin-top:8px;",""),statusNeedsGen:{name:"1ozqf4e",styles:"background:#fef3c7;color:#92400e"},statusReady:{name:"6zd3sa",styles:"background:#d1fae5;color:#065f46"},fontList:{name:"dj9uva",styles:"display:flex;flex-wrap:wrap;gap:6px;margin-top:8px"},fontChip:m("display:inline-flex;align-items:center;padding:4px 10px;background:",s.background,";border-radius:4px;font-size:",N.sm,";color:",s.text,";",""),checkboxList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},checkboxLabel:m("display:flex;align-items:center;gap:10px;padding:10px 12px;background:",s.background,";border-radius:6px;cursor:pointer;transition:background 0.15s ease;&:hover{background:",s.surfaceHover,";}",""),checkbox:m("width:18px;height:18px;accent-color:",s.primary,";cursor:pointer;",""),checkboxText:m("font-size:",N.base,";color:",s.text,";flex:1;",""),addNewRow:{name:"ap5vte",styles:"display:flex;gap:8px;margin-top:12px"},addNewInput:m("flex:1;padding:10px 12px;font-size:",N.base,";border:1px solid ",s.border,";border-radius:6px;background:",s.surface,";color:",s.text,";&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 2px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),addNewBtn:m("padding:10px 16px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;color:",s.text,";transition:all 0.15s ease;&:hover:not(:disabled){background:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),emptyText:m("font-size:",N.sm,";color:",s.textMuted,";padding:8px 0;",""),errorText:m("font-size:",N.sm,";color:",s.danger,";margin-top:4px;",""),footer:m("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:m("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:m("background-color:",s.surface,";border:1px solid ",s.border,";color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),btnConfirm:m("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover:not(:disabled){background-color:",s.primaryHover,";border-color:",s.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},loadingSpinner:m("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",w2," 0.8s linear infinite;","")};function C2({folderPath:i,onConfirm:c,onCancel:f}){const[d,h]=v.useState(!0),[p,C]=v.useState(null),[D,x]=v.useState([]),[y,A]=v.useState(new Set),[z,_]=v.useState(""),[q,H]=v.useState("");v.useEffect(()=>{async function Q(){try{const[le,X]=await Promise.all([fetch("/api/studio/fonts/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:i})}),fetch("/api/studio/fonts/assignments")]);if(le.ok){const P=await le.json();C(P),A(new Set(P.assignments||[]))}if(X.ok){const P=await X.json();x(P.assignments||[])}}catch(le){console.error("Failed to load data:",le)}finally{h(!1)}}Q()},[i]);const G=Q=>{A(le=>{const X=new Set(le);return X.has(Q)?X.delete(Q):X.add(Q),X})},oe=()=>{const Q=z.trim().toLowerCase();if(Q){if(!/^[a-z][a-z0-9]*$/.test(Q)){H("Name must start with a letter and contain only letters and numbers");return}A(le=>new Set([...le,Q])),_(""),H("")}},J=()=>{const Q=Array.from(y);Q.length!==0&&c(Q)};if(d)return r("div",{css:qe.overlay,children:r("div",{css:qe.modal,children:r("div",{css:qe.loading,children:r("div",{css:qe.loadingSpinner})})})});const ce=p&&p.ttfFiles.length===0&&p.woff2Files.length===0;return r("div",{css:qe.overlay,onClick:f,children:b("div",{css:qe.modal,onClick:Q=>Q.stopPropagation(),children:[r("div",{css:qe.header,children:r("h3",{css:qe.title,children:"Assign Web Font"})}),b("div",{css:qe.body,children:[b("div",{css:qe.section,children:[r("p",{css:qe.sectionLabel,children:"Font Folder"}),b("div",{css:qe.folderName,children:[r("svg",{css:qe.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),p?.folderName||i.split("/").pop()]}),p&&r("div",{css:[qe.statusBadge,p.needsGeneration?qe.statusNeedsGen:qe.statusReady,"",""],children:p.needsGeneration?b(nt,{children:[r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 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"})}),"woff2 files will be generated (",p.ttfFiles.length," TTF files)"]}):b(nt,{children:[r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"woff2 files ready (",p.woff2Files.length," files)"]})})]}),p&&p.detectedFonts.length>0&&b("div",{css:qe.section,children:[r("p",{css:qe.sectionLabel,children:"Detected Fonts"}),r("div",{css:qe.fontList,children:p.detectedFonts.map((Q,le)=>b("span",{css:qe.fontChip,children:[Q.weightName,Q.style==="italic"?" Italic":""]},le))})]}),p&&p.needsGeneration&&b("div",{css:qe.section,children:[r("p",{css:qe.sectionLabel,children:"TTF Files to Convert"}),b("div",{css:qe.fontList,children:[p.ttfFiles.slice(0,8).map((Q,le)=>r("span",{css:qe.fontChip,children:Q},le)),p.ttfFiles.length>8&&b("span",{css:qe.fontChip,children:["+",p.ttfFiles.length-8," more"]})]})]}),!ce&&b("div",{css:qe.section,children:[r("p",{css:qe.sectionLabel,children:"Assign To"}),D.length>0?r("div",{css:qe.checkboxList,children:D.map(Q=>b("label",{css:qe.checkboxLabel,children:[r("input",{type:"checkbox",css:qe.checkbox,checked:y.has(Q.name),onChange:()=>G(Q.name)}),r("span",{css:qe.checkboxText,children:Q.name})]},Q.name))}):r("p",{css:qe.emptyText,children:"No existing font assignments"}),Array.from(y).filter(Q=>!D.find(le=>le.name===Q)).map(Q=>b("label",{css:[qe.checkboxLabel,"margin-top:8px;",""],children:[r("input",{type:"checkbox",css:qe.checkbox,checked:!0,onChange:()=>G(Q)}),b("span",{css:qe.checkboxText,children:[Q," (new)"]})]},Q)),b("div",{css:qe.addNewRow,children:[r("input",{type:"text",css:qe.addNewInput,placeholder:"Add new assignment...",value:z,onChange:Q=>{_(Q.target.value),H("")},onKeyDown:Q=>{Q.key==="Enter"&&(Q.preventDefault(),oe())}}),r("button",{css:qe.addNewBtn,onClick:oe,disabled:!z.trim(),children:"Add"})]}),q&&r("p",{css:qe.errorText,children:q})]}),ce&&r("div",{css:qe.section,children:r("p",{css:qe.emptyText,children:"This folder does not contain any TTF or woff2 font files."})})]}),b("div",{css:qe.footer,children:[r("button",{css:[qe.btn,qe.btnCancel,"",""],onClick:f,children:"Cancel"}),b("button",{css:[qe.btn,qe.btnConfirm,"",""],onClick:J,disabled:y.size===0||ce,children:["Assign Font",y.size>1?"s":""]})]})]})})}const k2=Ft`
108
108
  from { opacity: 0; }
109
109
  to { opacity: 1; }
110
110
  `,z2=Ft`
@@ -119,7 +119,7 @@ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function z1({onClose:i}){
119
119
  `,M2=Ft`
120
120
  from { transform: rotate(0deg); }
121
121
  to { transform: rotate(360deg); }
122
- `,Wt={overlay:m("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:",k2," 0.15s ease-out;font-family:",kl,";",""),modal:m(ll," background-color:",s.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;overflow:hidden;animation:",z2," 0.2s ease-out;display:flex;flex-direction:column;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"amghpa",styles:"padding:16px 24px 24px;overflow-y:auto;flex:1"},assignmentList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},assignmentRow:m("display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:",s.background,";border-radius:8px;border:1px solid ",s.border,";",""),assignmentInfo:{name:"nj7tus",styles:"display:flex;align-items:center;gap:8px;flex:1;min-width:0"},assignmentName:m("font-size:",N.base,";font-weight:500;color:",s.text,";",""),assignmentFolder:m("font-size:",N.sm,";color:",s.textMuted,";&::before{content:'→';margin-right:6px;color:",s.textMuted,";}",""),deleteBtn:m("padding:6px 12px;font-size:",N.sm,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:4px;cursor:pointer;color:",s.textSecondary,";transition:all 0.15s ease;&:hover{background:",s.dangerLight,";border-color:",s.danger,";color:",s.danger,";}",""),confirmRow:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},confirmBtn:m("padding:6px 12px;font-size:",N.sm,";font-weight:500;background:",s.danger,";border:1px solid ",s.danger,";border-radius:4px;cursor:pointer;color:white;transition:all 0.15s ease;&:hover{background:",s.dangerHover,";border-color:",s.dangerHover,";}",""),cancelBtn:m("padding:6px 12px;font-size:",N.sm,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:4px;cursor:pointer;color:",s.textSecondary,";transition:all 0.15s ease;&:hover{background:",s.surfaceHover,";border-color:",s.borderHover,";}",""),emptyText:m("font-size:",N.base,";color:",s.textMuted,";text-align:center;padding:32px 0;",""),footer:m("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:m("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnPrimary:m("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover{background-color:",s.primaryHover,";border-color:",s.primaryHover,";}",""),loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},loadingSpinner:m("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",M2," 0.8s linear infinite;","")};function D2({onClose:i,onRefresh:c}){const[f,d]=v.useState(!0),[h,p]=v.useState([]),[C,D]=v.useState(null),x=v.useCallback(async()=>{try{const _=await fetch("/api/studio/fonts/assignments");if(_.ok){const q=await _.json();p(q.assignments||[])}}catch(_){console.error("Failed to load assignments:",_)}finally{d(!1)}},[]);v.useEffect(()=>{x()},[x]);const y=_=>{D(_)},A=()=>{D(null)},z=async _=>{try{(await fetch("/api/studio/fonts/delete-assignment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:_})})).ok&&(p(H=>H.filter(G=>G.name!==_)),D(null),c?.())}catch(q){console.error("Failed to delete assignment:",q)}};return r("div",{css:Wt.overlay,onClick:i,children:b("div",{css:Wt.modal,onClick:_=>_.stopPropagation(),children:[r("div",{css:Wt.header,children:r("h3",{css:Wt.title,children:"Font Assignments"})}),r("div",{css:Wt.body,children:f?r("div",{css:Wt.loading,children:r("div",{css:Wt.loadingSpinner})}):h.length===0?b("p",{css:Wt.emptyText,children:["No font assignments yet.",r("br",{}),'Select a folder and click "Assign Web Font" to create one.']}):r("div",{css:Wt.assignmentList,children:h.map(_=>b("div",{css:Wt.assignmentRow,children:[b("div",{css:Wt.assignmentInfo,children:[r("span",{css:Wt.assignmentName,children:_.name}),r("span",{css:Wt.assignmentFolder,children:_.folder})]}),C===_.name?b("div",{css:Wt.confirmRow,children:[r("button",{css:Wt.confirmBtn,onClick:()=>z(_.name),children:"Delete?"}),r("button",{css:Wt.cancelBtn,onClick:A,children:"Cancel"})]}):r("button",{css:Wt.deleteBtn,onClick:()=>y(_.name),children:"Delete"})]},_.name))})}),r("div",{css:Wt.footer,children:r("button",{css:[Wt.btn,Wt.btnPrimary,"",""],onClick:i,children:"Done"})})]})})}const Tp="36px",Ep=Ft`
122
+ `,$t={overlay:m("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:",k2," 0.15s ease-out;font-family:",kl,";",""),modal:m(ll," background-color:",s.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;overflow:hidden;animation:",z2," 0.2s ease-out;display:flex;flex-direction:column;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"amghpa",styles:"padding:16px 24px 24px;overflow-y:auto;flex:1"},assignmentList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},assignmentRow:m("display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:",s.background,";border-radius:8px;border:1px solid ",s.border,";",""),assignmentInfo:{name:"nj7tus",styles:"display:flex;align-items:center;gap:8px;flex:1;min-width:0"},assignmentName:m("font-size:",N.base,";font-weight:500;color:",s.text,";",""),assignmentFolder:m("font-size:",N.sm,";color:",s.textMuted,";&::before{content:'→';margin-right:6px;color:",s.textMuted,";}",""),deleteBtn:m("padding:6px 12px;font-size:",N.sm,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:4px;cursor:pointer;color:",s.textSecondary,";transition:all 0.15s ease;&:hover{background:",s.dangerLight,";border-color:",s.danger,";color:",s.danger,";}",""),confirmRow:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},confirmBtn:m("padding:6px 12px;font-size:",N.sm,";font-weight:500;background:",s.danger,";border:1px solid ",s.danger,";border-radius:4px;cursor:pointer;color:white;transition:all 0.15s ease;&:hover{background:",s.dangerHover,";border-color:",s.dangerHover,";}",""),cancelBtn:m("padding:6px 12px;font-size:",N.sm,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:4px;cursor:pointer;color:",s.textSecondary,";transition:all 0.15s ease;&:hover{background:",s.surfaceHover,";border-color:",s.borderHover,";}",""),emptyText:m("font-size:",N.base,";color:",s.textMuted,";text-align:center;padding:32px 0;",""),footer:m("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:m("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnPrimary:m("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover{background-color:",s.primaryHover,";border-color:",s.primaryHover,";}",""),loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},loadingSpinner:m("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",M2," 0.8s linear infinite;","")};function D2({onClose:i,onRefresh:c}){const[f,d]=v.useState(!0),[h,p]=v.useState([]),[C,D]=v.useState(null),x=v.useCallback(async()=>{try{const _=await fetch("/api/studio/fonts/assignments");if(_.ok){const q=await _.json();p(q.assignments||[])}}catch(_){console.error("Failed to load assignments:",_)}finally{d(!1)}},[]);v.useEffect(()=>{x()},[x]);const y=_=>{D(_)},A=()=>{D(null)},z=async _=>{try{(await fetch("/api/studio/fonts/delete-assignment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:_})})).ok&&(p(H=>H.filter(G=>G.name!==_)),D(null),c?.())}catch(q){console.error("Failed to delete assignment:",q)}};return r("div",{css:$t.overlay,onClick:i,children:b("div",{css:$t.modal,onClick:_=>_.stopPropagation(),children:[r("div",{css:$t.header,children:r("h3",{css:$t.title,children:"Font Assignments"})}),r("div",{css:$t.body,children:f?r("div",{css:$t.loading,children:r("div",{css:$t.loadingSpinner})}):h.length===0?b("p",{css:$t.emptyText,children:["No font assignments yet.",r("br",{}),'Select a folder and click "Assign Web Font" to create one.']}):r("div",{css:$t.assignmentList,children:h.map(_=>b("div",{css:$t.assignmentRow,children:[b("div",{css:$t.assignmentInfo,children:[r("span",{css:$t.assignmentName,children:_.name}),r("span",{css:$t.assignmentFolder,children:_.folder})]}),C===_.name?b("div",{css:$t.confirmRow,children:[r("button",{css:$t.confirmBtn,onClick:()=>z(_.name),children:"Delete?"}),r("button",{css:$t.cancelBtn,onClick:A,children:"Cancel"})]}):r("button",{css:$t.deleteBtn,onClick:()=>y(_.name),children:"Delete"})]},_.name))})}),r("div",{css:$t.footer,children:r("button",{css:[$t.btn,$t.btnPrimary,"",""],onClick:i,children:"Done"})})]})})}const Tp="36px",Ep=Ft`
123
123
  to { transform: rotate(360deg); }
124
- `,F={container:{name:"xt6tct",styles:"flex:1;display:flex;flex-direction:column;overflow:hidden"},toolbar:m("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",s.surface,";border-bottom:1px solid ",s.border,";@media (min-width: 768px){padding:12px 24px;}",""),toolbarLeft:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},toolbarRight:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},selectionCount:m("font-size:",N.base,";color:",s.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:m("color:",s.primary,";background:none;border:none;cursor:pointer;font-size:",N.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),btn:m("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",Tp,";padding:0 14px;border-radius:6px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";cursor:pointer;transition:all 0.15s ease;color:",s.text,";&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:m("background:",s.primary,";border-color:",s.primary,";color:white;&:hover:not(:disabled){background:",s.primaryHover,";border-color:",s.primaryHover,";}",""),btnDanger:m("color:",s.danger,";&:hover:not(:disabled){background-color:",s.dangerLight,";border-color:",s.danger,";}",""),btnIcon:{name:"157xhr7",styles:"width:16px;height:16px"},content:{name:"1tznmxd",styles:"flex:1;overflow:auto;padding:20px 24px"},loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:m("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",Ep," 0.8s linear infinite;",""),empty:m("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",s.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:m("font-size:",N.base,";margin:0 0 4px 0;&:last-child{color:",s.textMuted,";font-size:",N.sm,";}",""),selectAllRow:m("display:flex;align-items:center;gap:24px;margin-bottom:16px;padding:12px 16px;background:",s.surface,";border-radius:8px;border:1px solid ",s.border,";",""),selectAllLabel:m("display:flex;align-items:center;gap:10px;font-size:",N.base,";font-weight:500;color:",s.textSecondary,";cursor:pointer;&:hover{color:",s.text,";}",""),selectAllCheckbox:m("width:16px;height:16px;accent-color:",s.primary,";",""),grid:{name:"el23hk",styles:"display:grid;grid-template-columns:1fr;gap:12px;@media (min-width: 480px){grid-template-columns:repeat(2, 1fr);}@media (min-width: 768px){grid-template-columns:repeat(3, 1fr);}@media (min-width: 1024px){grid-template-columns:repeat(4, 1fr);}@media (min-width: 1280px){grid-template-columns:repeat(5, 1fr);}"},item:m("position:relative;border-radius:8px;border:1px solid ",s.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",s.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:m("border-color:",s.primary,";box-shadow:0 0 0 1px ",s.primary,";&:hover{border-color:",s.primary,";box-shadow:0 0 0 1px ",s.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:m("width:18px;height:18px;accent-color:",s.primary,";cursor:pointer;",""),itemContent:m("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",s.background,";",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},parentIcon:m("width:56px;height:56px;color:",s.textMuted,";",""),fileIcon:m("width:40px;height:40px;color:",s.textMuted,";",""),openBtn:m("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.surface,";border:1px solid ",s.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:",s.primaryLight,";border-color:",s.primary,";}",""),label:m("padding:10px 12px;background-color:",s.surface,";border-top:1px solid ",s.borderLight,";",""),labelName:m("font-size:",N.sm,";font-weight:500;color:",s.text,";margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),labelMeta:m("font-size:",N.xs,";color:",s.textMuted,";margin:2px 0 0 0;",""),dropOverlay:m("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",s.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:m("display:flex;flex-direction:column;align-items:center;gap:12px;color:",s.primary,";font-size:",N.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"},createBtn:m("margin-top:16px;padding:10px 24px;font-size:",N.base,";font-weight:500;background:",s.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover{background:",s.primaryHover,";}",""),viewToggle:m("display:flex;align-items:center;height:",Tp,";background-color:",s.surface,";border:1px solid ",s.border,";border-radius:6px;overflow:hidden;",""),viewBtn:m("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",s.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",s.text,";background-color:",s.surfaceHover,";}",""),viewBtnActive:m("background-color:",s.primaryLight,";color:",s.primary,";&:hover{background-color:",s.primaryLight,";color:",s.primary,";}",""),iconSpin:m("animation:",Ep," 1s linear infinite;",""),tableWrapper:m("background:",s.surface,";border-radius:8px;border:1px solid ",s.border,";overflow-x:auto;",""),table:{name:"1ceqwkv",styles:"width:100%;min-width:400px;border-collapse:collapse;white-space:nowrap"},th:m("text-align:left;font-size:11px;color:",s.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",s.background,";border-bottom:1px solid ",s.border,";",""),thCheckbox:{name:"5iz1wr",styles:"width:48px"},thSize:{name:"yct5co",styles:"width:96px"},row:m("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",s.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",s.borderLight,";}",""),rowSelected:m("background-color:",s.primaryLight,";&:hover{background-color:",s.primaryLight,";}",""),parentRow:m("cursor:pointer;border-bottom:1px solid ",s.border,";&:hover{background-color:",s.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},folderIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},folderIconSmall:{name:"a45yt2",styles:"width:24px;height:24px;color:#f9935e"},fileIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},fileIconSmall:m("width:20px;height:20px;color:",s.textMuted,";",""),parentIconSmall:m("width:20px;height:20px;color:",s.textMuted,";flex-shrink:0;",""),name:m("font-size:",N.base,";font-weight:500;color:",s.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:m("font-size:",N.sm,";color:",s.textSecondary,";",""),actionsCell:{name:"1w56d5c",styles:"display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-shrink:0"},listOpenBtn:m("height:32px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.surface,";border:1px solid ",s.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",s.primaryLight,";border-color:",s.primary,";}",""),badge:{name:"1ue8xbs",styles:"width:8px;height:8px;border-radius:50%;flex-shrink:0"},badgeGray:{name:"a0o945",styles:"background-color:#9ca3af"},badgeYellow:{name:"yqs32k",styles:"background-color:#eab308"},badgeGreen:{name:"b752gh",styles:"background-color:#10b981"},badgeWrapper:{name:"1pi78hi",styles:"display:flex;align-items:center;gap:6px"}};function Rp(i){return i<1024?i+" B":i<1024*1024?(i/1024).toFixed(1)+" KB":(i/(1024*1024)).toFixed(1)+" MB"}function A2({currentPath:i,setCurrentPath:c,refreshKey:f,triggerRefresh:d}){const[h,p]=v.useState([]),[C,D]=v.useState(!0),[x,y]=v.useState(new Set),[A,z]=v.useState(!1),[_,q]=v.useState(!1),[H,G]=v.useState(!1),[oe,J]=v.useState(!1),[ce,Q]=v.useState(!1),[le,X]=v.useState(!1),[P,te]=v.useState("grid"),[ae,j]=v.useState(!1),[W,he]=v.useState(!1),[me,ge]=v.useState(!1),[ie,Oe]=v.useState(!1),[T,Z]=v.useState({status:"idle",current:0,total:0,percent:0}),[ee,Ee]=v.useState("Processing"),[qe,S]=v.useState(null),[O,ne]=v.useState({}),[re,we]=v.useState(null),ze=v.useCallback(async()=>{try{D(!0);const U=await fetch(`/api/studio/fonts/list?path=${encodeURIComponent(i)}`);if(U.ok){const De=await U.json();p(De.items||[]),z(De.canCreate===!0)}}catch(U){console.error("Failed to fetch fonts:",U),p([])}finally{D(!1)}},[i]);v.useEffect(()=>{ze(),y(new Set)},[ze,f]);const Ge=v.useCallback(async U=>{const De={};for(const Ke of U)if(Ke.type==="folder")try{const ft=await fetch("/api/studio/fonts/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:Ke.path})});if(ft.ok){const Rt=await ft.json();De[Ke.path]={needsGeneration:Rt.needsGeneration,hasWoff2:Rt.woff2Files?.length>0,assignments:Rt.assignments||[]}}}catch{}ne(De)},[]);v.useEffect(()=>{const U=h.filter(De=>De.type==="folder");U.length>0&&i.startsWith("_fonts")&&Ge(U)},[h,i,Ge]);const xt=i==="_fonts";i==="src"||i.startsWith("src/");const Re=v.useCallback((U,De)=>{if(De.stopPropagation(),De.shiftKey&&re){const Ke=h.findIndex(Rt=>Rt.path===re),ft=h.findIndex(Rt=>Rt.path===U.path);if(Ke!==-1&&ft!==-1){const Rt=Math.min(Ke,ft),zn=Math.max(Ke,ft);y(Ml=>{const ra=new Set(Ml);for(let Bn=Rt;Bn<=zn;Bn++)ra.add(h[Bn].path);return ra})}}else y(Ke=>{const ft=new Set(Ke);return ft.has(U.path)?ft.delete(U.path):ft.add(U.path),ft});we(U.path)},[h,re]),Pt=v.useCallback(U=>{U.type==="folder"&&(c(U.path),y(new Set))},[c]),Ze=v.useCallback(()=>{const U=i.split("/");U.pop();const De=U.join("/")||"_fonts";c(De),y(new Set)},[i,c]),Je=h.length>0&&x.size===h.length,it=x.size>0,Ht=v.useCallback(()=>{y(Je?new Set:new Set(h.map(U=>U.path)))},[Je,h]),Yt=v.useCallback(()=>{y(new Set),we(null)},[]),tn=v.useCallback(()=>{const U=h.filter(De=>De.type==="file"&&De.name.toLowerCase().endsWith(".woff2"));y(new Set(U.map(De=>De.path)))},[h]),Qt=v.useCallback(()=>{const U=h.filter(De=>De.type==="file"&&De.name.toLowerCase().endsWith(".ttf"));y(new Set(U.map(De=>De.path)))},[h]),fn=v.useCallback(async()=>{j(!0),await ze(),j(!1)},[ze]),Bt=Array.from(x),$e=Bt.length===1&&h.find(U=>U.path===Bt[0])?.type==="folder",gt=$e?Bt[0]:null,kt=gt&&gt.split("/").pop()||"",Te=Bt.length===1&&h.find(U=>U.path===Bt[0])?.type==="file",mt=Te?Bt[0]:null,hn=mt&&mt.split("/").pop()||"",Hn=v.useCallback(()=>{$e&&he(!0)},[$e]),kn=v.useCallback(async U=>{he(!1),Ee("Assigning Web Font"),Oe(!0),Z({status:"progress",current:0,total:1,percent:0,message:"Starting..."});try{const De=await fetch("/api/studio/fonts/assign-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:gt,assignments:U})});if(!De.ok||!De.body){Z({status:"error",current:0,total:0,percent:0,message:"Failed to start assignment"});return}const Ke=De.body.getReader(),ft=new TextDecoder;for(;;){const{done:Rt,value:zn}=await Ke.read();if(Rt)break;const ra=ft.decode(zn,{stream:!0}).split(`
125
- `);for(const Bn of ra)if(Bn.startsWith("data: "))try{const Ut=JSON.parse(Bn.slice(6));Ut.status==="progress"?Z({status:"progress",current:Ut.current||0,total:Ut.total||1,percent:Ut.total?Math.round(Ut.current/Ut.total*100):0,message:Ut.message,currentFile:Ut.currentFile}):Ut.status==="complete"?(Z({status:"complete",current:Ut.created?.length||0,total:Ut.created?.length||0,percent:100,message:Ut.message,processed:Ut.created?.length||0}),d()):Ut.status==="error"&&Z({status:"error",current:0,total:0,percent:0,message:Ut.message})}catch{}}}catch(De){Z({status:"error",current:0,total:0,percent:0,message:String(De)})}},[gt,d]),mn=v.useCallback(()=>{Oe(!1),Z({status:"idle",current:0,total:0,percent:0})},[]),$=v.useCallback(async U=>{if(gt){G(!1);try{(await fetch("/api/studio/fonts/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:gt,newName:U})})).ok&&(y(new Set),d())}catch(De){console.error("Rename failed:",De)}}},[gt,d]),ue=v.useCallback(async U=>{if(mt){J(!1);try{(await fetch("/api/studio/fonts/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:mt,newName:U})})).ok&&(y(new Set),d())}catch(De){console.error("Rename file failed:",De)}}},[mt,d]),Xe=v.useCallback(()=>{x.size!==0&&X(!0)},[x.size]),at=v.useCallback(async()=>{X(!1),Ee("Deleting Files"),Oe(!0),Z({status:"progress",current:0,total:x.size,percent:0,message:"Deleting..."});try{(await fetch("/api/studio/fonts/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Array.from(x)})})).ok?(Z({status:"complete",current:x.size,total:x.size,percent:100,message:`Deleted ${x.size} item${x.size!==1?"s":""}`}),y(new Set),d()):Z({status:"error",current:0,total:0,percent:0,message:"Delete failed"})}catch(U){console.error("Delete failed:",U),Z({status:"error",current:0,total:0,percent:0,message:"Delete failed"})}},[x,d]),Be=v.useCallback(()=>{Q(!0)},[]),Me=v.useCallback(async U=>{Q(!1);try{(await fetch("/api/studio/fonts/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:i,name:U})})).ok&&d()}catch(De){console.error("Create folder failed:",De)}},[i,d]),zt=v.useCallback(U=>{U.preventDefault(),U.stopPropagation(),i.startsWith("_fonts")&&q(!0)},[i]),yt=v.useCallback(U=>{U.preventDefault(),U.stopPropagation(),q(!1)},[]),Aa=v.useCallback(async U=>{if(U.preventDefault(),U.stopPropagation(),q(!1),!i.startsWith("_fonts"))return;const De=Array.from(U.dataTransfer.files).filter(Ke=>Ke.name.toLowerCase().endsWith(".ttf"));if(De.length!==0){for(const Ke of De){const ft=new FormData;ft.append("file",Ke),ft.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:ft})}catch(Rt){console.error("Upload failed:",Rt)}}d()}},[i,d]),ia=v.useCallback(U=>{U&&U.addEventListener("change",async De=>{const Ke=De.target.files;if(!(!Ke||Ke.length===0)){for(const ft of Array.from(Ke)){if(!ft.name.toLowerCase().endsWith(".ttf"))continue;const Rt=new FormData;Rt.append("file",ft),Rt.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:Rt})}catch(zn){console.error("Upload failed:",zn)}}d(),U.value=""}})},[i,d]);if(C)return b("div",{css:F.container,children:[r("div",{css:F.toolbar}),r("div",{css:F.loading,children:r("div",{css:F.spinner})})]});const zl=i.startsWith("_fonts");return b("div",{css:F.container,children:[b("div",{css:F.toolbar,children:[b("div",{css:F.toolbarLeft,children:[zl&&b(tt,{children:[b("button",{css:[F.btn,F.btnPrimary,"",""],onClick:()=>document.getElementById("font-file-input")?.click(),children:[r(T2,{}),"Add New"]}),r("input",{id:"font-file-input",type:"file",accept:".ttf",multiple:!0,style:{display:"none"},ref:ia})]}),b("button",{css:F.btn,onClick:()=>{Te?J(!0):$e?G(!0):Be()},children:[Te||$e?r(L2,{}):r(E2,{}),Te?"Rename File":$e?"Rename Folder":"New Folder"]}),b("button",{css:[F.btn,F.btnDanger,"",""],onClick:Xe,disabled:x.size===0,children:[r(R2,{}),"Delete"]}),b("button",{css:F.btn,onClick:Hn,disabled:!$e,title:$e?"Assign web font":"Select a folder to assign",children:[r(j2,{}),"Assign Web Font"]})]}),b("div",{css:F.toolbarRight,children:[it&&b("span",{css:F.selectionCount,children:[x.size," selected",r("button",{css:F.clearBtn,onClick:Yt,children:"Clear"})]}),r("button",{css:F.btn,onClick:fn,title:"Refresh view",disabled:ae,children:r(B2,{spinning:ae})}),b("div",{css:F.viewToggle,children:[r("button",{css:[F.viewBtn,P==="grid"&&F.viewBtnActive,"",""],onClick:()=>te("grid"),"aria-label":"Grid view",children:r(U2,{})}),r("button",{css:[F.viewBtn,P==="list"&&F.viewBtnActive,"",""],onClick:()=>te("list"),"aria-label":"List view",children:r(N2,{})})]}),r("button",{css:F.btn,onClick:()=>ge(!0),title:"Font assignments settings",children:r(q2,{})})]})]}),b("div",{css:F.content,onDragOver:zt,onDragLeave:yt,onDrop:Aa,style:{position:"relative"},children:[_&&r("div",{css:F.dropOverlay,children:b("div",{css:F.dropMessage,children:[r(O2,{}),r("span",{children:"Drop TTF files to upload"})]})}),h.length===0&&!A?b("div",{css:F.empty,children:[r(ru,{css:F.emptyIcon}),r("p",{css:F.emptyText,children:"No files yet"}),r("p",{css:F.emptyText,children:zl?'Drop TTF files here or click "Add New"':"This folder is empty"})]}):h.length===0&&A?b("div",{css:F.empty,children:[r(ru,{css:F.emptyIcon}),r("p",{css:F.emptyText,children:"Folder doesn't exist"}),r("button",{css:F.createBtn,onClick:Be,children:"Create Folder"})]}):P==="grid"?b(tt,{children:[h.length>0&&b("div",{css:F.selectAllRow,children:[b("label",{css:F.selectAllLabel,children:[r("input",{type:"checkbox",css:F.selectAllCheckbox,checked:Je,ref:U=>{U&&(U.indeterminate=it&&!Je)},onChange:Ht}),"Select all (",h.length,")"]}),h.some(U=>U.name.toLowerCase().endsWith(".woff2"))&&b("label",{css:F.selectAllLabel,children:[r("input",{type:"checkbox",css:F.selectAllCheckbox,checked:h.filter(U=>U.name.toLowerCase().endsWith(".woff2")).every(U=>x.has(U.path)),onChange:tn}),"WOFF2"]}),h.some(U=>U.name.toLowerCase().endsWith(".ttf"))&&b("label",{css:F.selectAllLabel,children:[r("input",{type:"checkbox",css:F.selectAllCheckbox,checked:h.filter(U=>U.name.toLowerCase().endsWith(".ttf")).every(U=>x.has(U.path)),onChange:Qt}),"TTF"]})]}),b("div",{css:F.grid,children:[!xt&&b("div",{css:F.item,onClick:Ze,onDoubleClick:Ze,children:[r("div",{css:F.itemContent,children:r(_2,{})}),b("div",{css:F.label,children:[r("p",{css:F.labelName,children:".."}),r("p",{css:F.labelMeta,children:"Parent folder"})]})]}),h.map(U=>{const De=x.has(U.path);return b("div",{css:[F.item,De&&F.itemSelected,"",""],onClick:Ke=>Re(U,Ke),onDoubleClick:()=>Pt(U),children:[r("div",{css:F.checkboxWrapper,onClick:Ke=>{Ke.stopPropagation(),Re(U,Ke)},children:r("input",{type:"checkbox",css:F.checkbox,checked:De,onChange:()=>{}})}),b("div",{css:F.itemContent,children:[r("button",{css:F.openBtn,onClick:Ke=>{Ke.stopPropagation(),Pt(U)},children:"Open"}),U.type==="folder"?r(ru,{}):r(H2,{})]}),b("div",{css:F.label,children:[r("p",{css:F.labelName,children:b("span",{css:F.badgeWrapper,children:[U.type==="folder"&&O[U.path]&&r("span",{css:[F.badge,O[U.path].assignments.length>0?F.badgeGreen:O[U.path].hasWoff2?F.badgeYellow:F.badgeGray,"",""],title:O[U.path].assignments.length>0?`Assigned to: ${O[U.path].assignments.join(", ")}`:O[U.path].hasWoff2?"woff2 ready":"TTF only"}),U.name]})}),r("p",{css:F.labelMeta,children:U.type==="folder"?`${U.fileCount||0} files`:U.size?Rp(U.size):""})]})]},U.path)})]})]}):b(tt,{children:[h.length>0&&b("div",{css:F.selectAllRow,children:[b("label",{css:F.selectAllLabel,children:[r("input",{type:"checkbox",css:F.selectAllCheckbox,checked:Je,ref:U=>{U&&(U.indeterminate=it&&!Je)},onChange:Ht}),"Select all (",h.length,")"]}),h.some(U=>U.name.toLowerCase().endsWith(".woff2"))&&b("label",{css:F.selectAllLabel,children:[r("input",{type:"checkbox",css:F.selectAllCheckbox,checked:h.filter(U=>U.name.toLowerCase().endsWith(".woff2")).every(U=>x.has(U.path)),onChange:tn}),"WOFF2"]}),h.some(U=>U.name.toLowerCase().endsWith(".ttf"))&&b("label",{css:F.selectAllLabel,children:[r("input",{type:"checkbox",css:F.selectAllCheckbox,checked:h.filter(U=>U.name.toLowerCase().endsWith(".ttf")).every(U=>x.has(U.path)),onChange:Qt}),"TTF"]})]}),r("div",{css:F.tableWrapper,children:b("table",{css:F.table,children:[r("thead",{children:b("tr",{children:[r("th",{css:[F.th,F.thCheckbox,"",""],children:h.length>0&&r("input",{type:"checkbox",css:F.checkbox,checked:Je,ref:U=>{U&&(U.indeterminate=it&&!Je)},onChange:Ht})}),r("th",{css:F.th,children:"Name"}),r("th",{css:[F.th,F.thSize,"",""],children:"Size"})]})}),b("tbody",{children:[!xt&&b("tr",{css:F.parentRow,onClick:Ze,children:[r("td",{css:F.td}),r("td",{css:F.td,children:b("div",{css:F.nameCell,children:[r("svg",{css:F.parentIconSmall,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),r("span",{css:F.name,children:".."})]})}),r("td",{css:[F.td,F.meta,"",""],children:"Parent folder"})]}),h.map(U=>{const De=x.has(U.path);return b("tr",{css:[F.row,De&&F.rowSelected,"",""],onClick:Ke=>Re(U,Ke),children:[r("td",{css:[F.td,F.checkboxCell,"",""],onClick:Ke=>Ke.stopPropagation(),children:r("input",{type:"checkbox",css:F.checkbox,checked:De,onChange:()=>Re(U,{})})}),r("td",{css:F.td,children:b("div",{css:F.nameCell,children:[U.type==="folder"?r("div",{css:F.folderIconWrapper,children:r("svg",{css:F.folderIconSmall,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):r("div",{css:F.fileIconWrapper,children:r("svg",{css:F.fileIconSmall,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),b("span",{css:F.badgeWrapper,children:[U.type==="folder"&&O[U.path]&&r("span",{css:[F.badge,O[U.path].assignments.length>0?F.badgeGreen:O[U.path].hasWoff2?F.badgeYellow:F.badgeGray,"",""],title:O[U.path].assignments.length>0?`Assigned to: ${O[U.path].assignments.join(", ")}`:O[U.path].hasWoff2?"woff2 ready":"TTF only"}),r("span",{css:F.name,title:U.name,children:U.name})]}),r("div",{css:F.actionsCell,children:r("button",{css:F.listOpenBtn,onClick:Ke=>{Ke.stopPropagation(),Pt(U)},children:"Open"})})]})}),r("td",{css:[F.td,F.meta,"",""],children:U.type==="folder"?`${U.fileCount||0} files`:U.size?Rp(U.size):"--"})]},U.path)})]})]})})]})]}),ce&&r(Cl,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:Me,onCancel:()=>Q(!1)}),H&&gt&&r(Cl,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:kt,defaultValue:kt,confirmLabel:"Rename",onConfirm:$,onCancel:()=>G(!1)}),oe&&mt&&r(Cl,{title:"Rename File",message:"Enter a new name for the file:",placeholder:hn,defaultValue:hn,confirmLabel:"Rename",onConfirm:ue,onCancel:()=>J(!1)}),le&&r(fo,{title:"Delete Items",message:`Are you sure you want to delete ${x.size} item${x.size!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:at,onCancel:()=>X(!1)}),W&&gt&&r(C2,{folderPath:gt,onConfirm:kn,onCancel:()=>he(!1)}),ie&&r(al,{title:ee,progress:T,onClose:mn}),me&&r(D2,{onClose:()=>ge(!1),onRefresh:d}),qe&&r(Gr,{title:qe.title,message:qe.message,onClose:()=>S(null)})]})}function T2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}function E2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})})}function R2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}function L2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function O2(){return r("svg",{css:F.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function ru(){return r("svg",{css:F.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}function _2(){return r("svg",{css:F.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}function H2(){return r("svg",{css:F.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}function B2({spinning:i}){return r("svg",{css:[F.btnIcon,i&&F.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function U2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})})}function N2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function j2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h7"})})}function q2(){return b("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}const Y2="36px",At={container:m(ll," display:flex;flex-direction:column;height:100%;background:",s.background,";",""),header:m("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",s.surface,";border-bottom:1px solid ",s.border,";position:relative;",""),titleDropdown:{name:"bjn8wh",styles:"position:relative"},titleButton:m("display:flex;align-items:center;gap:6px;font-size:19px!important;font-weight:600;color:",s.text,";background:transparent;border:none;padding:4px 8px;margin:-4px -8px;border-radius:6px;cursor:pointer;letter-spacing:-0.02em;transition:background 0.15s ease;&:hover{background:",s.surfaceHover,";}",""),titleChevron:m("width:18px;height:18px;color:",s.textSecondary,";transition:transform 0.15s ease;margin-top:2px;stroke-width:2.5;",""),titleChevronOpen:{name:"21xn5r",styles:"transform:rotate(180deg)"},dropdownMenu:m("position:absolute;top:calc(100% + 8px);left:0;background:",s.surface,";border:1px solid ",s.border,";border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);padding:4px;z-index:100;",""),dropdownItem:m("display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;white-space:nowrap;position:relative;top:1px;font-size:19px!important;font-weight:600;letter-spacing:-0.02em;color:",s.text,";cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover{background:",s.surfaceHover,";}",""),dropdownItemActive:m("&::after{content:'';display:inline-block;width:8px;height:8px;background:",s.primary,";border-radius:50%;position:relative;top:1px;}",""),headerLeft:{name:"16ur2v6",styles:"display:flex;align-items:center;gap:12px;flex:1;min-width:0"},headerCenter:{name:"1fsejhz",styles:"position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;max-width:50%"},breadcrumbs:m("display:flex;align-items:center;gap:6px;font-size:",N.base,";color:",s.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:m("color:",s.border,";flex-shrink:0;",""),breadcrumbItem:m("color:",s.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",s.primary,";}",""),breadcrumbCurrent:m("color:",s.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:m("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",s.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",s.text,";background:",s.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:m("height:",Y2,";padding:0 12px;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),headerIcon:m("width:16px;height:16px;color:",s.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:m("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",s.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:m("display:flex;flex-direction:column;align-items:center;gap:12px;color:",s.primary,";font-size:",N.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function G2({onClose:i,isVisible:c=!0,standaloneMode:f=!1,workspacePath:d,siteUrl:h}){const p=i||(()=>{}),[C,D]=v.useState("public"),[x,y]=v.useState(new Set),[A,z]=v.useState(null),[_,q]=v.useState("grid"),[H,G]=v.useState(null),[oe,J]=v.useState(null),[ce,Q]=v.useState(!1),[le,X]=v.useState(0),[P,te]=v.useState(!1),[ae,j]=v.useState(""),[W,he]=v.useState(null),[me,ge]=v.useState([]),[ie,Oe]=v.useState(!1),[T,Z]=v.useState(()=>{if(typeof window<"u"){const $=window.location.hash.slice(1);if($==="fonts")return"fonts";if($==="media")return"media"}return"media"}),[ee,Ee]=v.useState(!1),qe=v.useRef(null);v.useEffect(()=>{const $=()=>{const ue=window.location.hash.slice(1);ue==="fonts"?Z("fonts"):ue==="media"&&Z("media")};return window.addEventListener("hashchange",$),()=>window.removeEventListener("hashchange",$)},[]);const[S,O]=v.useState("_fonts"),[ne,re]=v.useState(0),we=v.useCallback(()=>{X($=>$+1)},[]),[ze,Ge]=v.useState(null),xt=v.useCallback($=>{Ge({path:$,key:Date.now()})},[]);v.useEffect(()=>{if(H&&me.length>0){const $=me.find(ue=>ue.path===H.path);$&&JSON.stringify($)!==JSON.stringify(H)&&G($)}},[me,H]);const Re=v.useCallback(()=>{te(!0)},[]),Pt=v.useCallback(()=>{te(!1)},[]),Ze=v.useCallback(($,ue)=>{he({title:$,message:ue})},[]),Je=v.useCallback(()=>{he(null)},[]),it=v.useCallback($=>{$.preventDefault(),$.stopPropagation(),Oe(!0)},[]),Ht=v.useCallback($=>{$.preventDefault(),$.stopPropagation(),Oe(!1)},[]),Yt=v.useCallback(async $=>{$.preventDefault(),$.stopPropagation(),Oe(!1);const ue=Array.from($.dataTransfer.files);if(ue.length!==0&&!(C==="public/images"||C.startsWith("public/images/"))){for(const Xe of ue){const at=new FormData;at.append("file",Xe),at.append("path",C);try{await fetch("/api/studio/upload",{method:"POST",body:at})}catch(Be){console.error("Upload error:",Be)}}we()}},[C,we]),tn=v.useCallback(()=>{if(C==="public")return;const $=C.split("/");$.pop(),D($.join("/")||"public"),y(new Set)},[C]),Qt=v.useCallback($=>{D($),y(new Set),G(null)},[]),fn=v.useCallback($=>{y(ue=>{const Xe=new Set(ue);return Xe.has($)?Xe.delete($):Xe.add($),Xe}),z($)},[]),Bt=v.useCallback(($,ue,Xe)=>{const at=Xe.findIndex(yt=>yt.path===$),Be=Xe.findIndex(yt=>yt.path===ue);if(at===-1||Be===-1)return;const Me=Math.min(at,Be),zt=Math.max(at,Be);y(yt=>{const Aa=new Set(yt);for(let ia=Me;ia<=zt;ia++)Aa.add(Xe[ia].path);return Aa}),z(ue)},[]),$e=v.useCallback($=>{y(new Set($.map(ue=>ue.path)))},[]),gt=v.useCallback(()=>{y(new Set)},[]),kt=v.useCallback($=>{G($)},[]),Te=v2({triggerRefresh:we,clearSelection:gt,setFocusedItem:kt,showError:Ze}),mt=v.useCallback($=>{if($.key==="Escape"){const ue=$.target;if(ue.tagName==="INPUT"||ue.tagName==="TEXTAREA")return;H?G(null):f||p()}},[p,H,f]);v.useEffect(()=>(c&&(document.addEventListener("keydown",mt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",mt),document.body.style.overflow=""}),[mt,c]),v.useEffect(()=>{const $=ue=>{qe.current&&!qe.current.contains(ue.target)&&Ee(!1)};return ee&&document.addEventListener("mousedown",$),()=>{document.removeEventListener("mousedown",$)}},[ee]);const hn=v.useCallback(()=>{Ee($=>!$)},[]),Hn=v.useCallback($=>{Z($),Ee(!1),window.location.hash=$},[]),kn=v.useCallback(()=>{re($=>$+1)},[]),mn={isOpen:!0,openStudio:()=>{},closeStudio:p,toggleStudio:p,currentPath:C,setCurrentPath:Qt,navigateUp:tn,selectedItems:x,toggleSelection:fn,selectRange:Bt,selectAll:$e,clearSelection:gt,lastSelectedPath:A,viewMode:_,setViewMode:q,focusedItem:H,setFocusedItem:G,meta:oe,setMeta:J,isLoading:ce,setIsLoading:Q,refreshKey:le,triggerRefresh:we,editedImageKey:ze,setEditedImageKey:xt,scanRequested:P,triggerScan:Re,clearScanRequest:Pt,searchQuery:ae,setSearchQuery:j,error:W,showError:Ze,clearError:Je,fileItems:me,setFileItems:ge,actionState:Te.actionState,requestDelete:Te.requestDelete,requestMove:Te.requestMove,requestSync:Te.requestSync,requestDownload:Te.requestDownload,requestProcess:Te.requestProcess,setProcessMode:Te.setProcessMode,confirmDelete:Te.confirmDelete,confirmMove:Te.confirmMove,confirmSync:Te.confirmSync,confirmProcess:Te.confirmProcess,cancelAction:Te.cancelAction,closeProgress:Te.closeProgress,stopProcessing:Te.stopProcessing,deleteOrphans:Te.deleteOrphans};return r(Xp.Provider,{value:mn,children:b("div",{css:At.container,children:[b("div",{css:At.header,children:[r("div",{css:At.headerLeft,children:b("div",{css:At.titleDropdown,ref:qe,children:[b("button",{css:At.titleButton,onClick:hn,children:[r("span",{children:"gallop.studio"}),r(J2,{isOpen:ee})]}),ee&&b("div",{css:At.dropdownMenu,children:[r("button",{css:[At.dropdownItem,T==="media"&&At.dropdownItemActive,"",""],onClick:()=>Hn("media"),children:"media & files"}),r("button",{css:[At.dropdownItem,T==="fonts"&&At.dropdownItemActive,"",""],onClick:()=>Hn("fonts"),children:"fonts"})]})]})}),r("div",{css:At.headerCenter,children:r(Q2,{currentPath:C,onNavigate:Qt,projectName:d?d.split("/").pop():void 0})}),b("div",{css:At.headerActions,children:[h&&r("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:At.headerIconBtn,title:`Open ${h}`,children:r(K2,{})}),!f&&r("button",{css:At.headerBtn,onClick:p,"aria-label":"Close Studio",children:r(Z2,{})})]})]}),T==="media"?b(tt,{children:[r(D1,{}),b("div",{css:At.content,onDragOver:it,onDragLeave:Ht,onDrop:Yt,children:[ie&&r("div",{css:At.dropOverlay,children:b("div",{css:At.dropMessage,children:[r("svg",{css:At.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})}),r("span",{children:"Drop files to upload"})]})}),r("div",{css:At.fileBrowser,children:_==="grid"?r(Z1,{}):r(P1,{})})]}),H&&r(m2,{}),r(b2,{}),Te.actionState.showDeleteConfirm&&r(fo,{title:"Delete Files",message:`Are you sure you want to delete ${Te.actionState.actionPaths.length} item${Te.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Te.confirmDelete,onCancel:Te.cancelAction}),Te.actionState.showSyncConfirm&&r(fo,{title:"Push to CDN",message:`Push ${Te.actionState.syncImageCount} image${Te.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${Te.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${Te.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:Te.confirmSync,onCancel:Te.cancelAction}),Te.actionState.showProcessConfirm&&r(F2,{imageCount:Te.actionState.actionPaths.length,mode:Te.actionState.processMode,onConfirm:Te.confirmProcess,onCancel:Te.cancelAction}),Te.actionState.showMoveModal&&r(Fp,{selectedItems:new Set(Te.actionState.actionPaths),currentPath:C,onMove:$=>Te.confirmMove($),onCancel:Te.cancelAction}),Te.actionState.showProgress&&r(al,{title:Te.actionState.progressTitle,progress:Te.actionState.progressState,onStop:Te.stopProcessing,onDeleteOrphans:Te.deleteOrphans,onClose:Te.closeProgress})]}):r(A2,{currentPath:S,setCurrentPath:O,refreshKey:ne,triggerRefresh:kn})]})})}var X2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},V2={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 F2({imageCount:i,mode:c,onConfirm:f,onCancel:d}){const h={overlay:V2,container:m("background:",s.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:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0 0 16px;",""),message:m("font-size:",N.base,";color:",s.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:X2,cancelBtn:m("padding:10px 20px;border:1px solid ",s.border,";border-radius:8px;background:",s.background,";color:",s.text,";font-size:",N.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",s.surfaceHover,";border-color:",s.borderHover,";}",""),confirmBtn:m("padding:10px 20px;border:none;border-radius:8px;background:",s.primary,";color:white;font-size:",N.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",s.primaryHover,";}",""),confirmBtnDanger:m("background:",s.danger,";&:hover{background:#dc2626;}","")},p=c==="remove",C=p?"Remove Thumbnails":"Generate Thumbnails",D=p?`Remove generated thumbnails for ${i} image${i!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${i} image${i!==1?"s":""}?`,x=p?"Remove":"Generate";return r("div",{css:h.overlay,onClick:d,children:b("div",{css:h.container,onClick:y=>y.stopPropagation(),children:[r("h2",{css:h.title,children:C}),r("p",{css:h.message,children:D}),b("div",{css:h.actions,children:[r("button",{css:h.cancelBtn,onClick:d,children:"Cancel"}),r("button",{css:[h.confirmBtn,p&&h.confirmBtnDanger,"",""],onClick:f,children:x})]})]})})}function Q2({currentPath:i,onNavigate:c,projectName:f}){const d=i.split("/").filter(Boolean),h=d.map((p,C)=>({name:C===0&&p==="public"&&f?f:p,path:d.slice(0,C+1).join("/")}));return r("div",{css:At.breadcrumbs,children:h.map((p,C)=>b("span",{style:{display:"flex",alignItems:"center",gap:6},children:[C>0&&r("span",{css:At.breadcrumbSeparator,children:"/"}),C===h.length-1?r("span",{css:At.breadcrumbCurrent,children:p.name}):r("span",{css:At.breadcrumbItem,onClick:()=>c(p.path),children:p.name})]},p.path))})}function K2(){return b("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"10"}),r("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),r("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function Z2(){return b("svg",{css:At.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function J2({isOpen:i}){return r("svg",{css:[At.titleChevron,i&&At.titleChevronOpen,"",""],viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r("polyline",{points:"6 9 12 15 18 9"})})}const Jp=document.getElementById("root");if(!Jp)throw new Error("Root element not found");const $2=window.__STUDIO_WORKSPACE__||"Unknown",W2=window.__STUDIO_SITE_URL__||"";c1.createRoot(Jp).render(r(v.StrictMode,{children:r("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:r(G2,{isVisible:!0,standaloneMode:!0,workspacePath:$2,siteUrl:W2})})}));
124
+ `,F={container:{name:"xt6tct",styles:"flex:1;display:flex;flex-direction:column;overflow:hidden"},toolbar:m("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",s.surface,";border-bottom:1px solid ",s.border,";@media (min-width: 768px){padding:12px 24px;}",""),toolbarLeft:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},toolbarRight:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},selectionCount:m("font-size:",N.base,";color:",s.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:m("color:",s.primary,";background:none;border:none;cursor:pointer;font-size:",N.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),btn:m("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",Tp,";padding:0 14px;border-radius:6px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";cursor:pointer;transition:all 0.15s ease;color:",s.text,";&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:m("background:",s.primary,";border-color:",s.primary,";color:white;&:hover:not(:disabled){background:",s.primaryHover,";border-color:",s.primaryHover,";}",""),btnDanger:m("color:",s.danger,";&:hover:not(:disabled){background-color:",s.dangerLight,";border-color:",s.danger,";}",""),btnIcon:{name:"157xhr7",styles:"width:16px;height:16px"},content:{name:"1tznmxd",styles:"flex:1;overflow:auto;padding:20px 24px"},loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:m("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",Ep," 0.8s linear infinite;",""),empty:m("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",s.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:m("font-size:",N.base,";margin:0 0 4px 0;&:last-child{color:",s.textMuted,";font-size:",N.sm,";}",""),selectAllRow:m("display:flex;align-items:center;gap:24px;margin-bottom:16px;padding:12px 16px;background:",s.surface,";border-radius:8px;border:1px solid ",s.border,";",""),selectAllLabel:m("display:flex;align-items:center;gap:10px;font-size:",N.base,";font-weight:500;color:",s.textSecondary,";cursor:pointer;&:hover{color:",s.text,";}",""),selectAllCheckbox:m("width:16px;height:16px;accent-color:",s.primary,";",""),grid:{name:"el23hk",styles:"display:grid;grid-template-columns:1fr;gap:12px;@media (min-width: 480px){grid-template-columns:repeat(2, 1fr);}@media (min-width: 768px){grid-template-columns:repeat(3, 1fr);}@media (min-width: 1024px){grid-template-columns:repeat(4, 1fr);}@media (min-width: 1280px){grid-template-columns:repeat(5, 1fr);}"},item:m("position:relative;border-radius:8px;border:1px solid ",s.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",s.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:m("border-color:",s.primary,";box-shadow:0 0 0 1px ",s.primary,";&:hover{border-color:",s.primary,";box-shadow:0 0 0 1px ",s.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:m("width:18px;height:18px;accent-color:",s.primary,";cursor:pointer;",""),itemContent:m("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",s.background,";",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},parentIcon:m("width:56px;height:56px;color:",s.textMuted,";",""),fileIcon:m("width:40px;height:40px;color:",s.textMuted,";",""),openBtn:m("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.surface,";border:1px solid ",s.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:",s.primaryLight,";border-color:",s.primary,";}",""),label:m("padding:10px 12px;background-color:",s.surface,";border-top:1px solid ",s.borderLight,";",""),labelName:m("font-size:",N.sm,";font-weight:500;color:",s.text,";margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),labelMeta:m("font-size:",N.xs,";color:",s.textMuted,";margin:2px 0 0 0;",""),dropOverlay:m("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",s.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:m("display:flex;flex-direction:column;align-items:center;gap:12px;color:",s.primary,";font-size:",N.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"},createBtn:m("margin-top:16px;padding:10px 24px;font-size:",N.base,";font-weight:500;background:",s.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover{background:",s.primaryHover,";}",""),viewToggle:m("display:flex;align-items:center;height:",Tp,";background-color:",s.surface,";border:1px solid ",s.border,";border-radius:6px;overflow:hidden;",""),viewBtn:m("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",s.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",s.text,";background-color:",s.surfaceHover,";}",""),viewBtnActive:m("background-color:",s.primaryLight,";color:",s.primary,";&:hover{background-color:",s.primaryLight,";color:",s.primary,";}",""),iconSpin:m("animation:",Ep," 1s linear infinite;",""),tableWrapper:m("background:",s.surface,";border-radius:8px;border:1px solid ",s.border,";overflow-x:auto;",""),table:{name:"1ceqwkv",styles:"width:100%;min-width:400px;border-collapse:collapse;white-space:nowrap"},th:m("text-align:left;font-size:11px;color:",s.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",s.background,";border-bottom:1px solid ",s.border,";",""),thCheckbox:{name:"5iz1wr",styles:"width:48px"},thSize:{name:"yct5co",styles:"width:96px"},row:m("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",s.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",s.borderLight,";}",""),rowSelected:m("background-color:",s.primaryLight,";&:hover{background-color:",s.primaryLight,";}",""),parentRow:m("cursor:pointer;border-bottom:1px solid ",s.border,";&:hover{background-color:",s.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},folderIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},folderIconSmall:{name:"a45yt2",styles:"width:24px;height:24px;color:#f9935e"},fileIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},fileIconSmall:m("width:20px;height:20px;color:",s.textMuted,";",""),parentIconSmall:m("width:20px;height:20px;color:",s.textMuted,";flex-shrink:0;",""),name:m("font-size:",N.base,";font-weight:500;color:",s.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:m("font-size:",N.sm,";color:",s.textSecondary,";",""),actionsCell:{name:"1w56d5c",styles:"display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-shrink:0"},listOpenBtn:m("height:32px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.surface,";border:1px solid ",s.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",s.primaryLight,";border-color:",s.primary,";}",""),badge:{name:"1ue8xbs",styles:"width:8px;height:8px;border-radius:50%;flex-shrink:0"},badgeGray:{name:"a0o945",styles:"background-color:#9ca3af"},badgeYellow:{name:"yqs32k",styles:"background-color:#eab308"},badgeGreen:{name:"b752gh",styles:"background-color:#10b981"},badgeWrapper:{name:"1pi78hi",styles:"display:flex;align-items:center;gap:6px"}};function Rp(i){return i<1024?i+" B":i<1024*1024?(i/1024).toFixed(1)+" KB":(i/(1024*1024)).toFixed(1)+" MB"}function A2({currentPath:i,setCurrentPath:c,refreshKey:f,triggerRefresh:d}){const[h,p]=v.useState([]),[C,D]=v.useState(!0),[x,y]=v.useState(new Set),[A,z]=v.useState(!1),[_,q]=v.useState(!1),[H,G]=v.useState(!1),[oe,J]=v.useState(!1),[ce,Q]=v.useState(!1),[le,X]=v.useState(!1),[P,te]=v.useState("grid"),[ae,j]=v.useState(!1),[$,he]=v.useState(!1),[me,ge]=v.useState(!1),[ie,Oe]=v.useState(!1),[T,Z]=v.useState({status:"idle",current:0,total:0,percent:0}),[ee,Ee]=v.useState("Processing"),[Ye,S]=v.useState(null),[O,ne]=v.useState({}),[re,we]=v.useState(null),Me=v.useCallback(async()=>{try{D(!0);const B=await fetch(`/api/studio/fonts/list?path=${encodeURIComponent(i)}`);if(B.ok){const _e=await B.json();p(_e.items||[]),z(_e.canCreate===!0)}}catch(B){console.error("Failed to fetch fonts:",B),p([])}finally{D(!1)}},[i]);v.useEffect(()=>{Me(),y(new Set)},[Me,f]);const Xe=v.useCallback(async B=>{const _e={};for(const ze of B)if(ze.type==="folder")try{const Qe=await fetch("/api/studio/fonts/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:ze.path})});if(Qe.ok){const st=await Qe.json();_e[ze.path]={needsGeneration:st.needsGeneration,hasWoff2:st.woff2Files?.length>0,assignments:st.assignments||[]}}}catch{}ne(_e)},[]);v.useEffect(()=>{const B=h.filter(_e=>_e.type==="folder");B.length>0&&i.startsWith("_fonts")&&Xe(B)},[h,i,Xe]);const St=i==="_fonts";i==="src"||i.startsWith("src/");const Re=v.useCallback((B,_e)=>{if(_e.stopPropagation(),_e.shiftKey&&re){const ze=h.findIndex(st=>st.path===re),Qe=h.findIndex(st=>st.path===B.path);if(ze!==-1&&Qe!==-1){const st=Math.min(ze,Qe),zn=Math.max(ze,Qe);y(Ml=>{const ra=new Set(Ml);for(let Bn=st;Bn<=zn;Bn++)ra.add(h[Bn].path);return ra})}}else y(ze=>{const Qe=new Set(ze);return Qe.has(B.path)?Qe.delete(B.path):Qe.add(B.path),Qe});we(B.path)},[h,re]),Pt=v.useCallback(B=>{B.type==="folder"&&(c(B.path),y(new Set))},[c]),Je=v.useCallback(()=>{const B=i.split("/");B.pop();const _e=B.join("/")||"_fonts";c(_e),y(new Set)},[i,c]),We=h.length>0&&x.size===h.length,rt=x.size>0,Ht=v.useCallback(()=>{y(We?new Set:new Set(h.map(B=>B.path)))},[We,h]),Yt=v.useCallback(()=>{y(new Set),we(null)},[]),tn=v.useCallback(()=>{const B=h.filter(ze=>ze.type==="file"&&ze.name.toLowerCase().endsWith(".woff2")),_e=B.every(ze=>x.has(ze.path));y(_e?ze=>{const Qe=new Set(ze);return B.forEach(st=>Qe.delete(st.path)),Qe}:ze=>{const Qe=new Set(ze);return B.forEach(st=>Qe.add(st.path)),Qe})},[h,x]),Qt=v.useCallback(()=>{const B=h.filter(ze=>ze.type==="file"&&ze.name.toLowerCase().endsWith(".ttf")),_e=B.every(ze=>x.has(ze.path));y(_e?ze=>{const Qe=new Set(ze);return B.forEach(st=>Qe.delete(st.path)),Qe}:ze=>{const Qe=new Set(ze);return B.forEach(st=>Qe.add(st.path)),Qe})},[h,x]),fn=v.useCallback(async()=>{j(!0),await Me(),j(!1)},[Me]),Bt=Array.from(x),$e=Bt.length===1&&h.find(B=>B.path===Bt[0])?.type==="folder",mt=$e?Bt[0]:null,zt=mt&&mt.split("/").pop()||"",Te=Bt.length===1&&h.find(B=>B.path===Bt[0])?.type==="file",yt=Te?Bt[0]:null,hn=yt&&yt.split("/").pop()||"",Hn=v.useCallback(()=>{$e&&he(!0)},[$e]),kn=v.useCallback(async B=>{he(!1),Ee("Assigning Web Font"),Oe(!0),Z({status:"progress",current:0,total:1,percent:0,message:"Starting..."});try{const _e=await fetch("/api/studio/fonts/assign-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:mt,assignments:B})});if(!_e.ok||!_e.body){Z({status:"error",current:0,total:0,percent:0,message:"Failed to start assignment"});return}const ze=_e.body.getReader(),Qe=new TextDecoder;for(;;){const{done:st,value:zn}=await ze.read();if(st)break;const ra=Qe.decode(zn,{stream:!0}).split(`
125
+ `);for(const Bn of ra)if(Bn.startsWith("data: "))try{const Ut=JSON.parse(Bn.slice(6));Ut.status==="progress"?Z({status:"progress",current:Ut.current||0,total:Ut.total||1,percent:Ut.total?Math.round(Ut.current/Ut.total*100):0,message:Ut.message,currentFile:Ut.currentFile}):Ut.status==="complete"?(Z({status:"complete",current:Ut.created?.length||0,total:Ut.created?.length||0,percent:100,message:Ut.message,processed:Ut.created?.length||0}),d()):Ut.status==="error"&&Z({status:"error",current:0,total:0,percent:0,message:Ut.message})}catch{}}}catch(_e){Z({status:"error",current:0,total:0,percent:0,message:String(_e)})}},[mt,d]),mn=v.useCallback(()=>{Oe(!1),Z({status:"idle",current:0,total:0,percent:0})},[]),W=v.useCallback(async B=>{if(mt){G(!1);try{(await fetch("/api/studio/fonts/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:mt,newName:B})})).ok&&(y(new Set),d())}catch(_e){console.error("Rename failed:",_e)}}},[mt,d]),ue=v.useCallback(async B=>{if(yt){J(!1);try{(await fetch("/api/studio/fonts/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:yt,newName:B})})).ok&&(y(new Set),d())}catch(_e){console.error("Rename file failed:",_e)}}},[yt,d]),Ve=v.useCallback(()=>{x.size!==0&&X(!0)},[x.size]),lt=v.useCallback(async()=>{X(!1),Ee("Deleting Files"),Oe(!0),Z({status:"progress",current:0,total:x.size,percent:0,message:"Deleting..."});try{(await fetch("/api/studio/fonts/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Array.from(x)})})).ok?(Z({status:"complete",current:x.size,total:x.size,percent:100,message:`Deleted ${x.size} item${x.size!==1?"s":""}`}),y(new Set),d()):Z({status:"error",current:0,total:0,percent:0,message:"Delete failed"})}catch(B){console.error("Delete failed:",B),Z({status:"error",current:0,total:0,percent:0,message:"Delete failed"})}},[x,d]),Ue=v.useCallback(()=>{Q(!0)},[]),De=v.useCallback(async B=>{Q(!1);try{(await fetch("/api/studio/fonts/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:i,name:B})})).ok&&d()}catch(_e){console.error("Create folder failed:",_e)}},[i,d]),Mt=v.useCallback(B=>{B.preventDefault(),B.stopPropagation(),i.startsWith("_fonts")&&q(!0)},[i]),bt=v.useCallback(B=>{B.preventDefault(),B.stopPropagation(),q(!1)},[]),Aa=v.useCallback(async B=>{if(B.preventDefault(),B.stopPropagation(),q(!1),!i.startsWith("_fonts"))return;const _e=Array.from(B.dataTransfer.files).filter(ze=>ze.name.toLowerCase().endsWith(".ttf"));if(_e.length!==0){for(const ze of _e){const Qe=new FormData;Qe.append("file",ze),Qe.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:Qe})}catch(st){console.error("Upload failed:",st)}}d()}},[i,d]),ia=v.useCallback(B=>{B&&B.addEventListener("change",async _e=>{const ze=_e.target.files;if(!(!ze||ze.length===0)){for(const Qe of Array.from(ze)){if(!Qe.name.toLowerCase().endsWith(".ttf"))continue;const st=new FormData;st.append("file",Qe),st.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:st})}catch(zn){console.error("Upload failed:",zn)}}d(),B.value=""}})},[i,d]);if(C)return b("div",{css:F.container,children:[r("div",{css:F.toolbar}),r("div",{css:F.loading,children:r("div",{css:F.spinner})})]});const zl=i.startsWith("_fonts");return b("div",{css:F.container,children:[b("div",{css:F.toolbar,children:[b("div",{css:F.toolbarLeft,children:[zl&&b(nt,{children:[b("button",{css:[F.btn,F.btnPrimary,"",""],onClick:()=>document.getElementById("font-file-input")?.click(),children:[r(T2,{}),"Add New"]}),r("input",{id:"font-file-input",type:"file",accept:".ttf",multiple:!0,style:{display:"none"},ref:ia})]}),b("button",{css:F.btn,onClick:()=>{Te?J(!0):$e?G(!0):Ue()},children:[Te||$e?r(L2,{}):r(E2,{}),Te?"Rename File":$e?"Rename Folder":"New Folder"]}),b("button",{css:[F.btn,F.btnDanger,"",""],onClick:Ve,disabled:x.size===0,children:[r(R2,{}),"Delete"]}),b("button",{css:F.btn,onClick:Hn,disabled:!$e,title:$e?"Assign web font":"Select a folder to assign",children:[r(j2,{}),"Assign Web Font"]})]}),b("div",{css:F.toolbarRight,children:[rt&&b("span",{css:F.selectionCount,children:[x.size," selected",r("button",{css:F.clearBtn,onClick:Yt,children:"Clear"})]}),r("button",{css:F.btn,onClick:fn,title:"Refresh view",disabled:ae,children:r(B2,{spinning:ae})}),b("div",{css:F.viewToggle,children:[r("button",{css:[F.viewBtn,P==="grid"&&F.viewBtnActive,"",""],onClick:()=>te("grid"),"aria-label":"Grid view",children:r(U2,{})}),r("button",{css:[F.viewBtn,P==="list"&&F.viewBtnActive,"",""],onClick:()=>te("list"),"aria-label":"List view",children:r(N2,{})})]}),r("button",{css:F.btn,onClick:()=>ge(!0),title:"Font assignments settings",children:r(q2,{})})]})]}),b("div",{css:F.content,onDragOver:Mt,onDragLeave:bt,onDrop:Aa,style:{position:"relative"},children:[_&&r("div",{css:F.dropOverlay,children:b("div",{css:F.dropMessage,children:[r(O2,{}),r("span",{children:"Drop TTF files to upload"})]})}),h.length===0&&!A?b("div",{css:F.empty,children:[r(ru,{css:F.emptyIcon}),r("p",{css:F.emptyText,children:"No files yet"}),r("p",{css:F.emptyText,children:zl?'Drop TTF files here or click "Add New"':"This folder is empty"})]}):h.length===0&&A?b("div",{css:F.empty,children:[r(ru,{css:F.emptyIcon}),r("p",{css:F.emptyText,children:"Folder doesn't exist"}),r("button",{css:F.createBtn,onClick:Ue,children:"Create Folder"})]}):P==="grid"?b(nt,{children:[h.length>0&&b("div",{css:F.selectAllRow,children:[b("label",{css:F.selectAllLabel,children:[r("input",{type:"checkbox",css:F.selectAllCheckbox,checked:We,ref:B=>{B&&(B.indeterminate=rt&&!We)},onChange:Ht}),"Select all (",h.length,")"]}),h.some(B=>B.name.toLowerCase().endsWith(".woff2"))&&b("label",{css:F.selectAllLabel,children:[r("input",{type:"checkbox",css:F.selectAllCheckbox,checked:h.filter(B=>B.name.toLowerCase().endsWith(".woff2")).every(B=>x.has(B.path)),onChange:tn}),"WOFF2"]}),h.some(B=>B.name.toLowerCase().endsWith(".ttf"))&&b("label",{css:F.selectAllLabel,children:[r("input",{type:"checkbox",css:F.selectAllCheckbox,checked:h.filter(B=>B.name.toLowerCase().endsWith(".ttf")).every(B=>x.has(B.path)),onChange:Qt}),"TTF"]})]}),b("div",{css:F.grid,children:[!St&&b("div",{css:F.item,onClick:Je,onDoubleClick:Je,children:[r("div",{css:F.itemContent,children:r(_2,{})}),b("div",{css:F.label,children:[r("p",{css:F.labelName,children:".."}),r("p",{css:F.labelMeta,children:"Parent folder"})]})]}),h.map(B=>{const _e=x.has(B.path);return b("div",{css:[F.item,_e&&F.itemSelected,"",""],onClick:ze=>Re(B,ze),onDoubleClick:()=>Pt(B),children:[r("div",{css:F.checkboxWrapper,onClick:ze=>{ze.stopPropagation(),Re(B,ze)},children:r("input",{type:"checkbox",css:F.checkbox,checked:_e,onChange:()=>{}})}),b("div",{css:F.itemContent,children:[r("button",{css:F.openBtn,onClick:ze=>{ze.stopPropagation(),Pt(B)},children:"Open"}),B.type==="folder"?r(ru,{}):r(H2,{})]}),b("div",{css:F.label,children:[r("p",{css:F.labelName,children:b("span",{css:F.badgeWrapper,children:[B.type==="folder"&&O[B.path]&&r("span",{css:[F.badge,O[B.path].assignments.length>0?F.badgeGreen:O[B.path].hasWoff2?F.badgeYellow:F.badgeGray,"",""],title:O[B.path].assignments.length>0?`Assigned to: ${O[B.path].assignments.join(", ")}`:O[B.path].hasWoff2?"woff2 ready":"TTF only"}),B.name]})}),r("p",{css:F.labelMeta,children:B.type==="folder"?`${B.fileCount||0} files`:B.size?Rp(B.size):""})]})]},B.path)})]})]}):b(nt,{children:[h.length>0&&b("div",{css:F.selectAllRow,children:[b("label",{css:F.selectAllLabel,children:[r("input",{type:"checkbox",css:F.selectAllCheckbox,checked:We,ref:B=>{B&&(B.indeterminate=rt&&!We)},onChange:Ht}),"Select all (",h.length,")"]}),h.some(B=>B.name.toLowerCase().endsWith(".woff2"))&&b("label",{css:F.selectAllLabel,children:[r("input",{type:"checkbox",css:F.selectAllCheckbox,checked:h.filter(B=>B.name.toLowerCase().endsWith(".woff2")).every(B=>x.has(B.path)),onChange:tn}),"WOFF2"]}),h.some(B=>B.name.toLowerCase().endsWith(".ttf"))&&b("label",{css:F.selectAllLabel,children:[r("input",{type:"checkbox",css:F.selectAllCheckbox,checked:h.filter(B=>B.name.toLowerCase().endsWith(".ttf")).every(B=>x.has(B.path)),onChange:Qt}),"TTF"]})]}),r("div",{css:F.tableWrapper,children:b("table",{css:F.table,children:[r("thead",{children:b("tr",{children:[r("th",{css:[F.th,F.thCheckbox,"",""],children:h.length>0&&r("input",{type:"checkbox",css:F.checkbox,checked:We,ref:B=>{B&&(B.indeterminate=rt&&!We)},onChange:Ht})}),r("th",{css:F.th,children:"Name"}),r("th",{css:[F.th,F.thSize,"",""],children:"Size"})]})}),b("tbody",{children:[!St&&b("tr",{css:F.parentRow,onClick:Je,children:[r("td",{css:F.td}),r("td",{css:F.td,children:b("div",{css:F.nameCell,children:[r("svg",{css:F.parentIconSmall,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),r("span",{css:F.name,children:".."})]})}),r("td",{css:[F.td,F.meta,"",""],children:"Parent folder"})]}),h.map(B=>{const _e=x.has(B.path);return b("tr",{css:[F.row,_e&&F.rowSelected,"",""],onClick:ze=>Re(B,ze),children:[r("td",{css:[F.td,F.checkboxCell,"",""],onClick:ze=>ze.stopPropagation(),children:r("input",{type:"checkbox",css:F.checkbox,checked:_e,onChange:()=>Re(B,{})})}),r("td",{css:F.td,children:b("div",{css:F.nameCell,children:[B.type==="folder"?r("div",{css:F.folderIconWrapper,children:r("svg",{css:F.folderIconSmall,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):r("div",{css:F.fileIconWrapper,children:r("svg",{css:F.fileIconSmall,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),b("span",{css:F.badgeWrapper,children:[B.type==="folder"&&O[B.path]&&r("span",{css:[F.badge,O[B.path].assignments.length>0?F.badgeGreen:O[B.path].hasWoff2?F.badgeYellow:F.badgeGray,"",""],title:O[B.path].assignments.length>0?`Assigned to: ${O[B.path].assignments.join(", ")}`:O[B.path].hasWoff2?"woff2 ready":"TTF only"}),r("span",{css:F.name,title:B.name,children:B.name})]}),r("div",{css:F.actionsCell,children:r("button",{css:F.listOpenBtn,onClick:ze=>{ze.stopPropagation(),Pt(B)},children:"Open"})})]})}),r("td",{css:[F.td,F.meta,"",""],children:B.type==="folder"?`${B.fileCount||0} files`:B.size?Rp(B.size):"--"})]},B.path)})]})]})})]})]}),ce&&r(Cl,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:De,onCancel:()=>Q(!1)}),H&&mt&&r(Cl,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:zt,defaultValue:zt,confirmLabel:"Rename",onConfirm:W,onCancel:()=>G(!1)}),oe&&yt&&r(Cl,{title:"Rename File",message:"Enter a new name for the file:",placeholder:hn,defaultValue:hn,confirmLabel:"Rename",onConfirm:ue,onCancel:()=>J(!1)}),le&&r(fo,{title:"Delete Items",message:`Are you sure you want to delete ${x.size} item${x.size!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:lt,onCancel:()=>X(!1)}),$&&mt&&r(C2,{folderPath:mt,onConfirm:kn,onCancel:()=>he(!1)}),ie&&r(al,{title:ee,progress:T,onClose:mn}),me&&r(D2,{onClose:()=>ge(!1),onRefresh:d}),Ye&&r(Gr,{title:Ye.title,message:Ye.message,onClose:()=>S(null)})]})}function T2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}function E2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})})}function R2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}function L2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function O2(){return r("svg",{css:F.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function ru(){return r("svg",{css:F.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}function _2(){return r("svg",{css:F.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}function H2(){return r("svg",{css:F.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}function B2({spinning:i}){return r("svg",{css:[F.btnIcon,i&&F.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function U2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})})}function N2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function j2(){return r("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h7"})})}function q2(){return b("svg",{css:F.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}const Y2="36px",Tt={container:m(ll," display:flex;flex-direction:column;height:100%;background:",s.background,";",""),header:m("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",s.surface,";border-bottom:1px solid ",s.border,";position:relative;",""),titleDropdown:{name:"bjn8wh",styles:"position:relative"},titleButton:m("display:flex;align-items:center;gap:6px;font-size:19px!important;font-weight:600;color:",s.text,";background:transparent;border:none;padding:4px 8px;margin:-4px -8px;border-radius:6px;cursor:pointer;letter-spacing:-0.02em;transition:background 0.15s ease;&:hover{background:",s.surfaceHover,";}",""),titleChevron:m("width:18px;height:18px;color:",s.textSecondary,";transition:transform 0.15s ease;margin-top:2px;stroke-width:2.5;",""),titleChevronOpen:{name:"21xn5r",styles:"transform:rotate(180deg)"},dropdownMenu:m("position:absolute;top:calc(100% + 8px);left:0;background:",s.surface,";border:1px solid ",s.border,";border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);padding:4px;z-index:100;",""),dropdownItem:m("display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;white-space:nowrap;position:relative;top:1px;font-size:19px!important;font-weight:600;letter-spacing:-0.02em;color:",s.text,";cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover{background:",s.surfaceHover,";}",""),dropdownItemActive:m("&::after{content:'';display:inline-block;width:8px;height:8px;background:",s.primary,";border-radius:50%;position:relative;top:1px;}",""),headerLeft:{name:"16ur2v6",styles:"display:flex;align-items:center;gap:12px;flex:1;min-width:0"},headerCenter:{name:"1fsejhz",styles:"position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;max-width:50%"},breadcrumbs:m("display:flex;align-items:center;gap:6px;font-size:",N.base,";color:",s.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:m("color:",s.border,";flex-shrink:0;",""),breadcrumbItem:m("color:",s.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",s.primary,";}",""),breadcrumbCurrent:m("color:",s.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:m("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",s.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",s.text,";background:",s.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:m("height:",Y2,";padding:0 12px;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),headerIcon:m("width:16px;height:16px;color:",s.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:m("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",s.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:m("display:flex;flex-direction:column;align-items:center;gap:12px;color:",s.primary,";font-size:",N.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function G2({onClose:i,isVisible:c=!0,standaloneMode:f=!1,workspacePath:d,siteUrl:h}){const p=i||(()=>{}),[C,D]=v.useState("public"),[x,y]=v.useState(new Set),[A,z]=v.useState(null),[_,q]=v.useState("grid"),[H,G]=v.useState(null),[oe,J]=v.useState(null),[ce,Q]=v.useState(!1),[le,X]=v.useState(0),[P,te]=v.useState(!1),[ae,j]=v.useState(""),[$,he]=v.useState(null),[me,ge]=v.useState([]),[ie,Oe]=v.useState(!1),[T,Z]=v.useState(()=>{if(typeof window<"u"){const W=window.location.hash.slice(1);if(W==="fonts")return"fonts";if(W==="media")return"media"}return"media"}),[ee,Ee]=v.useState(!1),Ye=v.useRef(null);v.useEffect(()=>{const W=()=>{const ue=window.location.hash.slice(1);ue==="fonts"?Z("fonts"):ue==="media"&&Z("media")};return window.addEventListener("hashchange",W),()=>window.removeEventListener("hashchange",W)},[]);const[S,O]=v.useState("_fonts"),[ne,re]=v.useState(0),we=v.useCallback(()=>{X(W=>W+1)},[]),[Me,Xe]=v.useState(null),St=v.useCallback(W=>{Xe({path:W,key:Date.now()})},[]);v.useEffect(()=>{if(H&&me.length>0){const W=me.find(ue=>ue.path===H.path);W&&JSON.stringify(W)!==JSON.stringify(H)&&G(W)}},[me,H]);const Re=v.useCallback(()=>{te(!0)},[]),Pt=v.useCallback(()=>{te(!1)},[]),Je=v.useCallback((W,ue)=>{he({title:W,message:ue})},[]),We=v.useCallback(()=>{he(null)},[]),rt=v.useCallback(W=>{W.preventDefault(),W.stopPropagation(),Oe(!0)},[]),Ht=v.useCallback(W=>{W.preventDefault(),W.stopPropagation(),Oe(!1)},[]),Yt=v.useCallback(async W=>{W.preventDefault(),W.stopPropagation(),Oe(!1);const ue=Array.from(W.dataTransfer.files);if(ue.length!==0&&!(C==="public/images"||C.startsWith("public/images/"))){for(const Ve of ue){const lt=new FormData;lt.append("file",Ve),lt.append("path",C);try{await fetch("/api/studio/upload",{method:"POST",body:lt})}catch(Ue){console.error("Upload error:",Ue)}}we()}},[C,we]),tn=v.useCallback(()=>{if(C==="public")return;const W=C.split("/");W.pop(),D(W.join("/")||"public"),y(new Set)},[C]),Qt=v.useCallback(W=>{D(W),y(new Set),G(null)},[]),fn=v.useCallback(W=>{y(ue=>{const Ve=new Set(ue);return Ve.has(W)?Ve.delete(W):Ve.add(W),Ve}),z(W)},[]),Bt=v.useCallback((W,ue,Ve)=>{const lt=Ve.findIndex(bt=>bt.path===W),Ue=Ve.findIndex(bt=>bt.path===ue);if(lt===-1||Ue===-1)return;const De=Math.min(lt,Ue),Mt=Math.max(lt,Ue);y(bt=>{const Aa=new Set(bt);for(let ia=De;ia<=Mt;ia++)Aa.add(Ve[ia].path);return Aa}),z(ue)},[]),$e=v.useCallback(W=>{y(new Set(W.map(ue=>ue.path)))},[]),mt=v.useCallback(()=>{y(new Set)},[]),zt=v.useCallback(W=>{G(W)},[]),Te=v2({triggerRefresh:we,clearSelection:mt,setFocusedItem:zt,showError:Je}),yt=v.useCallback(W=>{if(W.key==="Escape"){const ue=W.target;if(ue.tagName==="INPUT"||ue.tagName==="TEXTAREA")return;H?G(null):f||p()}},[p,H,f]);v.useEffect(()=>(c&&(document.addEventListener("keydown",yt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",yt),document.body.style.overflow=""}),[yt,c]),v.useEffect(()=>{const W=ue=>{Ye.current&&!Ye.current.contains(ue.target)&&Ee(!1)};return ee&&document.addEventListener("mousedown",W),()=>{document.removeEventListener("mousedown",W)}},[ee]);const hn=v.useCallback(()=>{Ee(W=>!W)},[]),Hn=v.useCallback(W=>{Z(W),Ee(!1),window.location.hash=W},[]),kn=v.useCallback(()=>{re(W=>W+1)},[]),mn={isOpen:!0,openStudio:()=>{},closeStudio:p,toggleStudio:p,currentPath:C,setCurrentPath:Qt,navigateUp:tn,selectedItems:x,toggleSelection:fn,selectRange:Bt,selectAll:$e,clearSelection:mt,lastSelectedPath:A,viewMode:_,setViewMode:q,focusedItem:H,setFocusedItem:G,meta:oe,setMeta:J,isLoading:ce,setIsLoading:Q,refreshKey:le,triggerRefresh:we,editedImageKey:Me,setEditedImageKey:St,scanRequested:P,triggerScan:Re,clearScanRequest:Pt,searchQuery:ae,setSearchQuery:j,error:$,showError:Je,clearError:We,fileItems:me,setFileItems:ge,actionState:Te.actionState,requestDelete:Te.requestDelete,requestMove:Te.requestMove,requestSync:Te.requestSync,requestDownload:Te.requestDownload,requestProcess:Te.requestProcess,setProcessMode:Te.setProcessMode,confirmDelete:Te.confirmDelete,confirmMove:Te.confirmMove,confirmSync:Te.confirmSync,confirmProcess:Te.confirmProcess,cancelAction:Te.cancelAction,closeProgress:Te.closeProgress,stopProcessing:Te.stopProcessing,deleteOrphans:Te.deleteOrphans};return r(Xp.Provider,{value:mn,children:b("div",{css:Tt.container,children:[b("div",{css:Tt.header,children:[r("div",{css:Tt.headerLeft,children:b("div",{css:Tt.titleDropdown,ref:Ye,children:[b("button",{css:Tt.titleButton,onClick:hn,children:[r("span",{children:"gallop.studio"}),r(J2,{isOpen:ee})]}),ee&&b("div",{css:Tt.dropdownMenu,children:[r("button",{css:[Tt.dropdownItem,T==="media"&&Tt.dropdownItemActive,"",""],onClick:()=>Hn("media"),children:"media & files"}),r("button",{css:[Tt.dropdownItem,T==="fonts"&&Tt.dropdownItemActive,"",""],onClick:()=>Hn("fonts"),children:"fonts"})]})]})}),r("div",{css:Tt.headerCenter,children:r(Q2,{currentPath:C,onNavigate:Qt,projectName:d?d.split("/").pop():void 0})}),b("div",{css:Tt.headerActions,children:[h&&r("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:Tt.headerIconBtn,title:`Open ${h}`,children:r(K2,{})}),!f&&r("button",{css:Tt.headerBtn,onClick:p,"aria-label":"Close Studio",children:r(Z2,{})})]})]}),T==="media"?b(nt,{children:[r(D1,{}),b("div",{css:Tt.content,onDragOver:rt,onDragLeave:Ht,onDrop:Yt,children:[ie&&r("div",{css:Tt.dropOverlay,children:b("div",{css:Tt.dropMessage,children:[r("svg",{css:Tt.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})}),r("span",{children:"Drop files to upload"})]})}),r("div",{css:Tt.fileBrowser,children:_==="grid"?r(Z1,{}):r(P1,{})})]}),H&&r(m2,{}),r(b2,{}),Te.actionState.showDeleteConfirm&&r(fo,{title:"Delete Files",message:`Are you sure you want to delete ${Te.actionState.actionPaths.length} item${Te.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Te.confirmDelete,onCancel:Te.cancelAction}),Te.actionState.showSyncConfirm&&r(fo,{title:"Push to CDN",message:`Push ${Te.actionState.syncImageCount} image${Te.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${Te.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${Te.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:Te.confirmSync,onCancel:Te.cancelAction}),Te.actionState.showProcessConfirm&&r(F2,{imageCount:Te.actionState.actionPaths.length,mode:Te.actionState.processMode,onConfirm:Te.confirmProcess,onCancel:Te.cancelAction}),Te.actionState.showMoveModal&&r(Fp,{selectedItems:new Set(Te.actionState.actionPaths),currentPath:C,onMove:W=>Te.confirmMove(W),onCancel:Te.cancelAction}),Te.actionState.showProgress&&r(al,{title:Te.actionState.progressTitle,progress:Te.actionState.progressState,onStop:Te.stopProcessing,onDeleteOrphans:Te.deleteOrphans,onClose:Te.closeProgress})]}):r(A2,{currentPath:S,setCurrentPath:O,refreshKey:ne,triggerRefresh:kn})]})})}var X2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},V2={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 F2({imageCount:i,mode:c,onConfirm:f,onCancel:d}){const h={overlay:V2,container:m("background:",s.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:m("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0 0 16px;",""),message:m("font-size:",N.base,";color:",s.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:X2,cancelBtn:m("padding:10px 20px;border:1px solid ",s.border,";border-radius:8px;background:",s.background,";color:",s.text,";font-size:",N.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",s.surfaceHover,";border-color:",s.borderHover,";}",""),confirmBtn:m("padding:10px 20px;border:none;border-radius:8px;background:",s.primary,";color:white;font-size:",N.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",s.primaryHover,";}",""),confirmBtnDanger:m("background:",s.danger,";&:hover{background:#dc2626;}","")},p=c==="remove",C=p?"Remove Thumbnails":"Generate Thumbnails",D=p?`Remove generated thumbnails for ${i} image${i!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${i} image${i!==1?"s":""}?`,x=p?"Remove":"Generate";return r("div",{css:h.overlay,onClick:d,children:b("div",{css:h.container,onClick:y=>y.stopPropagation(),children:[r("h2",{css:h.title,children:C}),r("p",{css:h.message,children:D}),b("div",{css:h.actions,children:[r("button",{css:h.cancelBtn,onClick:d,children:"Cancel"}),r("button",{css:[h.confirmBtn,p&&h.confirmBtnDanger,"",""],onClick:f,children:x})]})]})})}function Q2({currentPath:i,onNavigate:c,projectName:f}){const d=i.split("/").filter(Boolean),h=d.map((p,C)=>({name:C===0&&p==="public"&&f?f:p,path:d.slice(0,C+1).join("/")}));return r("div",{css:Tt.breadcrumbs,children:h.map((p,C)=>b("span",{style:{display:"flex",alignItems:"center",gap:6},children:[C>0&&r("span",{css:Tt.breadcrumbSeparator,children:"/"}),C===h.length-1?r("span",{css:Tt.breadcrumbCurrent,children:p.name}):r("span",{css:Tt.breadcrumbItem,onClick:()=>c(p.path),children:p.name})]},p.path))})}function K2(){return b("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"10"}),r("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),r("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function Z2(){return b("svg",{css:Tt.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function J2({isOpen:i}){return r("svg",{css:[Tt.titleChevron,i&&Tt.titleChevronOpen,"",""],viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r("polyline",{points:"6 9 12 15 18 9"})})}const Jp=document.getElementById("root");if(!Jp)throw new Error("Root element not found");const W2=window.__STUDIO_WORKSPACE__||"Unknown",$2=window.__STUDIO_SITE_URL__||"";c1.createRoot(Jp).render(r(v.StrictMode,{children:r("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:r(G2,{isVisible:!0,standaloneMode:!0,workspacePath:W2,siteUrl:$2})})}));