@gallop.software/studio 2.3.160 → 2.3.161
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 om(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 im(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Ic={exports:{}},ui={};var lp;function rm(){if(lp)return ui;lp=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 ui.Fragment=c,ui.jsx=f,ui.jsxs=f,ui}var op;function sm(){return op||(op=1,Ic.exports=rm()),Ic.exports}var pi=sm(),Pc={exports:{}},Ve={};var ip;function cm(){if(ip)return Ve;ip=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"),b=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),L=Symbol.iterator;function j(S){return S===null||typeof S!="object"?null:(S=L&&S[L]||S["@@iterator"],typeof S=="function"?S:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,$={};function F(S,H,ae){this.props=S,this.context=H,this.refs=$,this.updater=ae||_}F.prototype.isReactComponent={},F.prototype.setState=function(S,H){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,H,"setState")},F.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function le(){}le.prototype=F.prototype;function V(S,H,ae){this.props=S,this.context=H,this.refs=$,this.updater=ae||_}var ie=V.prototype=new le;ie.constructor=V,X(ie,F.prototype),ie.isPureReactComponent=!0;var Y=Array.isArray;function ee(){}var ne={H:null,A:null,T:null,S:null},re=Object.prototype.hasOwnProperty;function q(S,H,ae){var oe=ae.ref;return{$$typeof:i,type:S,key:H,ref:oe!==void 0?oe:null,props:ae}}function W(S,H){return q(S.type,H,S.props)}function pe(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function be(S){var H={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(ae){return H[ae]})}var me=/\/+/g;function se(S,H){return typeof S=="object"&&S!==null&&S.key!=null?be(""+S.key):H.toString(36)}function Be(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(ee,ee):(S.status="pending",S.then(function(H){S.status==="pending"&&(S.status="fulfilled",S.value=H)},function(H){S.status==="pending"&&(S.status="rejected",S.reason=H)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function T(S,H,ae,oe,Ce){var Ee=typeof S;(Ee==="undefined"||Ee==="boolean")&&(S=null);var Ge=!1;if(S===null)Ge=!0;else switch(Ee){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),H,ae,oe,Ce)}}if(Ge)return Ce=Ce(S),Ge=oe===""?"."+se(S,0):oe,Y(Ce)?(ae="",Ge!=null&&(ae=Ge.replace(me,"$&/")+"/"),T(Ce,H,ae,"",function(an){return an})):Ce!=null&&(pe(Ce)&&(Ce=W(Ce,ae+(Ce.key==null||S&&S.key===Ce.key?"":(""+Ce.key).replace(me,"$&/")+"/")+Ge)),H.push(Ce)),1;Ge=0;var mt=oe===""?".":oe+":";if(Y(S))for(var Oe=0;Oe<S.length;Oe++)oe=S[Oe],Ee=mt+se(oe,Oe),Ge+=T(oe,H,ae,Ee,Ce);else if(Oe=j(S),typeof Oe=="function")for(S=Oe.call(S),Oe=0;!(oe=S.next()).done;)oe=oe.value,Ee=mt+se(oe,Oe++),Ge+=T(oe,H,ae,Ee,Ce);else if(Ee==="object"){if(typeof S.then=="function")return T(Be(S),H,ae,oe,Ce);throw H=String(S),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return Ge}function I(S,H,ae){if(S==null)return S;var oe=[],Ce=0;return T(S,oe,"","",function(Ee){return H.call(ae,Ee,Ce++)}),oe}function te(S){if(S._status===-1){var H=S._result;H=H(),H.then(function(ae){(S._status===0||S._status===-1)&&(S._status=1,S._result=ae)},function(ae){(S._status===0||S._status===-1)&&(S._status=2,S._result=ae)}),S._status===-1&&(S._status=0,S._result=H)}if(S._status===1)return S._result.default;throw S._result}var he=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=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(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},Fe={map:I,forEach:function(S,H,ae){I(S,function(){H.apply(this,arguments)},ae)},count:function(S){var H=0;return I(S,function(){H++}),H},toArray:function(S){return I(S,function(H){return H})||[]},only:function(S){if(!pe(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return Ve.Activity=z,Ve.Children=Fe,Ve.Component=F,Ve.Fragment=f,Ve.Profiler=h,Ve.PureComponent=V,Ve.StrictMode=d,Ve.Suspense=x,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ne,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(S){return ne.H.useMemoCache(S)}},Ve.cache=function(S){return function(){return S.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(S,H,ae){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var oe=X({},S.props),Ce=S.key;if(H!=null)for(Ee in H.key!==void 0&&(Ce=""+H.key),H)!re.call(H,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&H.ref===void 0||(oe[Ee]=H[Ee]);var Ee=arguments.length-2;if(Ee===1)oe.children=ae;else if(1<Ee){for(var Ge=Array(Ee),mt=0;mt<Ee;mt++)Ge[mt]=arguments[mt+2];oe.children=Ge}return q(S.type,Ce,oe)},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,H,ae){var oe,Ce={},Ee=null;if(H!=null)for(oe in H.key!==void 0&&(Ee=""+H.key),H)re.call(H,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(Ce[oe]=H[oe]);var Ge=arguments.length-2;if(Ge===1)Ce.children=ae;else if(1<Ge){for(var mt=Array(Ge),Oe=0;Oe<Ge;Oe++)mt[Oe]=arguments[Oe+2];Ce.children=mt}if(S&&S.defaultProps)for(oe in Ge=S.defaultProps,Ge)Ce[oe]===void 0&&(Ce[oe]=Ge[oe]);return q(S,Ee,Ce)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(S){return{$$typeof:D,render:S}},Ve.isValidElement=pe,Ve.lazy=function(S){return{$$typeof:A,_payload:{_status:-1,_result:S},_init:te}},Ve.memo=function(S,H){return{$$typeof:b,type:S,compare:H===void 0?null:H}},Ve.startTransition=function(S){var H=ne.T,ae={};ne.T=ae;try{var oe=S(),Ce=ne.S;Ce!==null&&Ce(ae,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(ee,he)}catch(Ee){he(Ee)}finally{H!==null&&ae.types!==null&&(H.types=ae.types),ne.T=H}},Ve.unstable_useCacheRefresh=function(){return ne.H.useCacheRefresh()},Ve.use=function(S){return ne.H.use(S)},Ve.useActionState=function(S,H,ae){return ne.H.useActionState(S,H,ae)},Ve.useCallback=function(S,H){return ne.H.useCallback(S,H)},Ve.useContext=function(S){return ne.H.useContext(S)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(S,H){return ne.H.useDeferredValue(S,H)},Ve.useEffect=function(S,H){return ne.H.useEffect(S,H)},Ve.useEffectEvent=function(S){return ne.H.useEffectEvent(S)},Ve.useId=function(){return ne.H.useId()},Ve.useImperativeHandle=function(S,H,ae){return ne.H.useImperativeHandle(S,H,ae)},Ve.useInsertionEffect=function(S,H){return ne.H.useInsertionEffect(S,H)},Ve.useLayoutEffect=function(S,H){return ne.H.useLayoutEffect(S,H)},Ve.useMemo=function(S,H){return ne.H.useMemo(S,H)},Ve.useOptimistic=function(S,H){return ne.H.useOptimistic(S,H)},Ve.useReducer=function(S,H,ae){return ne.H.useReducer(S,H,ae)},Ve.useRef=function(S){return ne.H.useRef(S)},Ve.useState=function(S){return ne.H.useState(S)},Ve.useSyncExternalStore=function(S,H,ae){return ne.H.useSyncExternalStore(S,H,ae)},Ve.useTransition=function(){return ne.H.useTransition()},Ve.version="19.2.4",Ve}var rp;function fu(){return rp||(rp=1,Pc.exports=cm()),Pc.exports}var v=fu();const vt=im(v),sp=om({__proto__:null,default:vt},[v]);function um(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 dm(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 fm=(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(dm(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var p=um(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})(),mn="-ms-",jr="-moz-",pt="-webkit-",Op="comm",hu="rule",pu="decl",hm="@import",_p="@keyframes",pm="@layer",gm=Math.abs,Yr=String.fromCharCode,mm=Object.assign;function bm(i,c){return hn(i,0)^45?(((c<<2^hn(i,0))<<2^hn(i,1))<<2^hn(i,2))<<2^hn(i,3):0}function Hp(i){return i.trim()}function ym(i,c){return(i=c.exec(i))?i[0]:i}function gt(i,c,f){return i.replace(c,f)}function cu(i,c){return i.indexOf(c)}function hn(i,c){return i.charCodeAt(c)|0}function gi(i,c,f){return i.slice(c,f)}function ia(i){return i.length}function gu(i){return i.length}function Hr(i,c){return c.push(i),i}function vm(i,c){return i.map(c).join("")}var Gr=1,po=1,Bp=0,An=0,It=0,mo="";function Xr(i,c,f,d,h,p,C){return{value:i,root:c,parent:f,type:d,props:h,children:p,line:Gr,column:po,length:C,return:""}}function di(i,c){return mm(Xr("",null,null,"",null,null,0),i,{length:-i.length},c)}function xm(){return It}function Sm(){return It=An>0?hn(mo,--An):0,po--,It===10&&(po=1,Gr--),It}function Un(){return It=An<Bp?hn(mo,An++):0,po++,It===10&&(po=1,Gr++),It}function sa(){return hn(mo,An)}function Br(){return An}function yi(i,c){return gi(mo,i,c)}function mi(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 Up(i){return Gr=po=1,Bp=ia(mo=i),An=0,[]}function Np(i){return mo="",i}function Ur(i){return Hp(yi(An-1,uu(i===91?i+2:i===40?i+1:i)))}function wm(i){for(;(It=sa())&&It<33;)Un();return mi(i)>2||mi(It)>3?"":" "}function Cm(i,c){for(;--c&&Un()&&!(It<48||It>102||It>57&&It<65||It>70&&It<97););return yi(i,Br()+(c<6&&sa()==32&&Un()==32))}function uu(i){for(;Un();)switch(It){case i:return An;case 34:case 39:i!==34&&i!==39&&uu(It);break;case 40:i===41&&uu(i);break;case 92:Un();break}return An}function km(i,c){for(;Un()&&i+It!==57;)if(i+It===84&&sa()===47)break;return"/*"+yi(c,An-1)+"*"+Yr(i===47?i:Un())}function zm(i){for(;!mi(sa());)Un();return yi(i,An)}function Mm(i){return Np(Nr("",null,null,null,[""],i=Up(i),0,[0],i))}function Nr(i,c,f,d,h,p,C,D,x){for(var b=0,A=0,z=C,L=0,j=0,_=0,X=1,$=1,F=1,le=0,V="",ie=h,Y=p,ee=d,ne=V;$;)switch(_=le,le=Un()){case 40:if(_!=108&&hn(ne,z-1)==58){cu(ne+=gt(Ur(le),"&","&\f"),"&\f")!=-1&&(F=-1);break}case 34:case 39:case 91:ne+=Ur(le);break;case 9:case 10:case 13:case 32:ne+=wm(_);break;case 92:ne+=Cm(Br()-1,7);continue;case 47:switch(sa()){case 42:case 47:Hr(Dm(km(Un(),Br()),c,f),x);break;default:ne+="/"}break;case 123*X:D[b++]=ia(ne)*F;case 125*X:case 59:case 0:switch(le){case 0:case 125:$=0;case 59+A:F==-1&&(ne=gt(ne,/\f/g,"")),j>0&&ia(ne)-z&&Hr(j>32?up(ne+";",d,f,z-1):up(gt(ne," ","")+";",d,f,z-2),x);break;case 59:ne+=";";default:if(Hr(ee=cp(ne,c,f,b,A,h,D,V,ie=[],Y=[],z),p),le===123)if(A===0)Nr(ne,c,ee,ee,ie,p,z,D,Y);else switch(L===99&&hn(ne,3)===110?100:L){case 100:case 108:case 109:case 115:Nr(i,ee,ee,d&&Hr(cp(i,ee,ee,0,0,h,D,V,h,ie=[],z),Y),h,Y,z,D,d?ie:Y);break;default:Nr(ne,ee,ee,ee,[""],Y,0,D,Y)}}b=A=j=0,X=F=1,V=ne="",z=C;break;case 58:z=1+ia(ne),j=_;default:if(X<1){if(le==123)--X;else if(le==125&&X++==0&&Sm()==125)continue}switch(ne+=Yr(le),le*X){case 38:F=A>0?1:(ne+="\f",-1);break;case 44:D[b++]=(ia(ne)-1)*F,F=1;break;case 64:sa()===45&&(ne+=Ur(Un())),L=sa(),A=z=ia(V=ne+=zm(Br())),le++;break;case 45:_===45&&ia(ne)==2&&(X=0)}}return p}function cp(i,c,f,d,h,p,C,D,x,b,A){for(var z=h-1,L=h===0?p:[""],j=gu(L),_=0,X=0,$=0;_<d;++_)for(var F=0,le=gi(i,z+1,z=gm(X=C[_])),V=i;F<j;++F)(V=Hp(X>0?L[F]+" "+le:gt(le,/&\f/g,L[F])))&&(x[$++]=V);return Xr(i,c,f,h===0?hu:D,x,b,A)}function Dm(i,c,f){return Xr(i,c,f,Op,Yr(xm()),gi(i,2,-2),0)}function up(i,c,f,d){return Xr(i,c,f,pu,gi(i,0,d),gi(i,d+1,-1),d)}function fo(i,c){for(var f="",d=gu(i),h=0;h<d;h++)f+=c(i[h],h,i,c)||"";return f}function Am(i,c,f,d){switch(i.type){case pm:if(i.children.length)break;case hm:case pu:return i.return=i.return||i.value;case Op:return"";case _p:return i.return=i.value+"{"+fo(i.children,d)+"}";case hu:i.value=i.props.join(",")}return ia(f=fo(i.children,d))?i.return=i.value+"{"+f+"}":""}function Tm(i){var c=gu(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 Em(i){return function(c){c.root||(c=c.return)&&i(c)}}function Rm(i){var c=Object.create(null);return function(f){return c[f]===void 0&&(c[f]=i(f)),c[f]}}var Lm=function(c,f,d){for(var h=0,p=0;h=p,p=sa(),h===38&&p===12&&(f[d]=1),!mi(p);)Un();return yi(c,An)},Om=function(c,f){var d=-1,h=44;do switch(mi(h)){case 0:h===38&&sa()===12&&(f[d]=1),c[d]+=Lm(An-1,f,d);break;case 2:c[d]+=Ur(h);break;case 4:if(h===44){c[++d]=sa()===58?"&\f":"",f[d]=c[d].length;break}default:c[d]+=Yr(h)}while(h=Un());return c},_m=function(c,f){return Np(Om(Up(c),f))},dp=new WeakMap,Hm=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&&!dp.get(d))&&!h){dp.set(c,!0);for(var p=[],C=_m(f,p),D=d.props,x=0,b=0;x<C.length;x++)for(var A=0;A<D.length;A++,b++)c.props[b]=p[x]?C[x].replace(/&\f/g,D[A]):D[A]+" "+C[x]}}},Bm=function(c){if(c.type==="decl"){var f=c.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(c.return="",c.value="")}};function jp(i,c){switch(bm(i,c)){case 5103:return pt+"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 pt+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return pt+i+jr+i+mn+i+i;case 6828:case 4268:return pt+i+mn+i+i;case 6165:return pt+i+mn+"flex-"+i+i;case 5187:return pt+i+gt(i,/(\w+).+(:[^]+)/,pt+"box-$1$2"+mn+"flex-$1$2")+i;case 5443:return pt+i+mn+"flex-item-"+gt(i,/flex-|-self/,"")+i;case 4675:return pt+i+mn+"flex-line-pack"+gt(i,/align-content|flex-|-self/,"")+i;case 5548:return pt+i+mn+gt(i,"shrink","negative")+i;case 5292:return pt+i+mn+gt(i,"basis","preferred-size")+i;case 6060:return pt+"box-"+gt(i,"-grow","")+pt+i+mn+gt(i,"grow","positive")+i;case 4554:return pt+gt(i,/([^-])(transform)/g,"$1"+pt+"$2")+i;case 6187:return gt(gt(gt(i,/(zoom-|grab)/,pt+"$1"),/(image-set)/,pt+"$1"),i,"")+i;case 5495:case 3959:return gt(i,/(image-set\([^]*)/,pt+"$1$`$1");case 4968:return gt(gt(i,/(.+:)(flex-)?(.*)/,pt+"box-pack:$3"+mn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+pt+i+i;case 4095:case 3583:case 4068:case 2532:return gt(i,/(.+)-inline(.+)/,pt+"$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(ia(i)-1-c>6)switch(hn(i,c+1)){case 109:if(hn(i,c+4)!==45)break;case 102:return gt(i,/(.+:)(.+)-([^]+)/,"$1"+pt+"$2-$3$1"+jr+(hn(i,c+3)==108?"$3":"$2-$3"))+i;case 115:return~cu(i,"stretch")?jp(gt(i,"stretch","fill-available"),c)+i:i}break;case 4949:if(hn(i,c+1)!==115)break;case 6444:switch(hn(i,ia(i)-3-(~cu(i,"!important")&&10))){case 107:return gt(i,":",":"+pt)+i;case 101:return gt(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pt+(hn(i,14)===45?"inline-":"")+"box$3$1"+pt+"$2$3$1"+mn+"$2box$3")+i}break;case 5936:switch(hn(i,c+11)){case 114:return pt+i+mn+gt(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return pt+i+mn+gt(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return pt+i+mn+gt(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return pt+i+mn+i+i}return i}var Um=function(c,f,d,h){if(c.length>-1&&!c.return)switch(c.type){case pu:c.return=jp(c.value,c.length);break;case _p:return fo([di(c,{value:gt(c.value,"@","@"+pt)})],h);case hu:if(c.length)return vm(c.props,function(p){switch(ym(p,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return fo([di(c,{props:[gt(p,/:(read-\w+)/,":"+jr+"$1")]})],h);case"::placeholder":return fo([di(c,{props:[gt(p,/:(plac\w+)/,":"+pt+"input-$1")]}),di(c,{props:[gt(p,/:(plac\w+)/,":"+jr+"$1")]}),di(c,{props:[gt(p,/:(plac\w+)/,mn+"input-$1")]})],h)}return""})}},Nm=[Um],jm=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(X){var $=X.getAttribute("data-emotion");$.indexOf(" ")!==-1&&(document.head.appendChild(X),X.setAttribute("data-s",""))})}var h=c.stylisPlugins||Nm,p={},C,D=[];C=c.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(X){for(var $=X.getAttribute("data-emotion").split(" "),F=1;F<$.length;F++)p[$[F]]=!0;D.push(X)});var x,b=[Hm,Bm];{var A,z=[Am,Em(function(X){A.insert(X)})],L=Tm(b.concat(h,z)),j=function($){return fo(Mm($),L)};x=function($,F,le,V){A=le,j($?$+"{"+F.styles+"}":F.styles),V&&(_.inserted[F.name]=!0)}}var _={key:f,sheet:new fm({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 _.sheet.hydrate(D),_},eu={exports:{}},yt={};var fp;function qm(){if(fp)return yt;fp=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,b=i?Symbol.for("react.concurrent_mode"):60111,A=i?Symbol.for("react.forward_ref"):60112,z=i?Symbol.for("react.suspense"):60113,L=i?Symbol.for("react.suspense_list"):60120,j=i?Symbol.for("react.memo"):60115,_=i?Symbol.for("react.lazy"):60116,X=i?Symbol.for("react.block"):60121,$=i?Symbol.for("react.fundamental"):60117,F=i?Symbol.for("react.responder"):60118,le=i?Symbol.for("react.scope"):60119;function V(Y){if(typeof Y=="object"&&Y!==null){var ee=Y.$$typeof;switch(ee){case c:switch(Y=Y.type,Y){case x:case b:case d:case p:case h:case z:return Y;default:switch(Y=Y&&Y.$$typeof,Y){case D:case A:case _:case j:case C:return Y;default:return ee}}case f:return ee}}}function ie(Y){return V(Y)===b}return yt.AsyncMode=x,yt.ConcurrentMode=b,yt.ContextConsumer=D,yt.ContextProvider=C,yt.Element=c,yt.ForwardRef=A,yt.Fragment=d,yt.Lazy=_,yt.Memo=j,yt.Portal=f,yt.Profiler=p,yt.StrictMode=h,yt.Suspense=z,yt.isAsyncMode=function(Y){return ie(Y)||V(Y)===x},yt.isConcurrentMode=ie,yt.isContextConsumer=function(Y){return V(Y)===D},yt.isContextProvider=function(Y){return V(Y)===C},yt.isElement=function(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===c},yt.isForwardRef=function(Y){return V(Y)===A},yt.isFragment=function(Y){return V(Y)===d},yt.isLazy=function(Y){return V(Y)===_},yt.isMemo=function(Y){return V(Y)===j},yt.isPortal=function(Y){return V(Y)===f},yt.isProfiler=function(Y){return V(Y)===p},yt.isStrictMode=function(Y){return V(Y)===h},yt.isSuspense=function(Y){return V(Y)===z},yt.isValidElementType=function(Y){return typeof Y=="string"||typeof Y=="function"||Y===d||Y===b||Y===p||Y===h||Y===z||Y===L||typeof Y=="object"&&Y!==null&&(Y.$$typeof===_||Y.$$typeof===j||Y.$$typeof===C||Y.$$typeof===D||Y.$$typeof===A||Y.$$typeof===$||Y.$$typeof===F||Y.$$typeof===le||Y.$$typeof===X)},yt.typeOf=V,yt}var hp;function Ym(){return hp||(hp=1,eu.exports=qm()),eu.exports}var tu,pp;function Gm(){if(pp)return tu;pp=1;var i=Ym(),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(_){return i.isMemo(_)?h:p[_.$$typeof]||c}var D=Object.defineProperty,x=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,A=Object.getOwnPropertyDescriptor,z=Object.getPrototypeOf,L=Object.prototype;function j(_,X,$){if(typeof X!="string"){if(L){var F=z(X);F&&F!==L&&j(_,F,$)}var le=x(X);b&&(le=le.concat(b(X)));for(var V=C(_),ie=C(X),Y=0;Y<le.length;++Y){var ee=le[Y];if(!f[ee]&&!($&&$[ee])&&!(ie&&ie[ee])&&!(V&&V[ee])){var ne=A(X,ee);try{D(_,ee,ne)}catch{}}}}return _}return tu=j,tu}Gm();var Xm=!0;function Vm(i,c,f){var d="";return f.split(" ").forEach(function(h){i[h]!==void 0?c.push(i[h]+";"):h&&(d+=h+" ")}),d}var qp=function(c,f,d){var h=c.key+"-"+f.name;(d===!1||Xm===!1)&&c.registered[h]===void 0&&(c.registered[h]=f.styles)},Fm=function(c,f,d){qp(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 Qm(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 Km={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},Zm=/[A-Z]|^ms/g,$m=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yp=function(c){return c.charCodeAt(1)===45},gp=function(c){return c!=null&&typeof c!="boolean"},nu=Rm(function(i){return Yp(i)?i:i.replace(Zm,"-$&").toLowerCase()}),mp=function(c,f){switch(c){case"animation":case"animationName":if(typeof f=="string")return f.replace($m,function(d,h,p){return ra={name:h,styles:p,next:ra},h})}return Km[c]!==1&&!Yp(c)&&typeof f=="number"&&f!==0?f+"px":f};function bi(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 ra={name:h.name,styles:h.styles,next:ra},h.name;var p=f;if(p.styles!==void 0){var C=p.next;if(C!==void 0)for(;C!==void 0;)ra={name:C.name,styles:C.styles,next:ra},C=C.next;var D=p.styles+";";return D}return Jm(i,c,f)}case"function":{if(i!==void 0){var x=ra,b=f(i);return ra=x,bi(i,c,b)}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+=bi(i,c,f[h])+";";else for(var p in f){var C=f[p];if(typeof C!="object"){var D=C;gp(D)&&(d+=nu(p)+":"+mp(p,D)+";")}else if(Array.isArray(C)&&typeof C[0]=="string"&&c==null)for(var x=0;x<C.length;x++)gp(C[x])&&(d+=nu(p)+":"+mp(p,C[x])+";");else{var b=bi(i,c,C);switch(p){case"animation":case"animationName":{d+=nu(p)+":"+b+";";break}default:d+=p+"{"+b+"}"}}}return d}var bp=/label:\s*([^\s;{]+)\s*(;|$)/g,ra;function Gp(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="";ra=void 0;var p=i[0];if(p==null||p.raw===void 0)d=!1,h+=bi(f,c,p);else{var C=p;h+=C[0]}for(var D=1;D<i.length;D++)if(h+=bi(f,c,i[D]),d){var x=p;h+=x[D]}bp.lastIndex=0;for(var b="",A;(A=bp.exec(h))!==null;)b+="-"+A[1];var z=Qm(h)+b;return{name:z,styles:h,next:ra}}var Wm=function(c){return c()},Im=sp.useInsertionEffect?sp.useInsertionEffect:!1,Pm=Im||Wm,Xp=v.createContext(typeof HTMLElement<"u"?jm({key:"css"}):null);Xp.Provider;var e1=function(c){return v.forwardRef(function(f,d){var h=v.useContext(Xp);return c(f,h,d)})},t1=v.createContext({}),vi={}.hasOwnProperty,du="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",mu=function(c,f){var d={};for(var h in f)vi.call(f,h)&&(d[h]=f[h]);return d[du]=c,d},n1=function(c){var f=c.cache,d=c.serialized,h=c.isStringTag;return qp(f,d,h),Pm(function(){return Fm(f,d,h)}),null},a1=e1(function(i,c,f){var d=i.css;typeof d=="string"&&c.registered[d]!==void 0&&(d=c.registered[d]);var h=i[du],p=[d],C="";typeof i.className=="string"?C=Vm(c.registered,p,i.className):i.className!=null&&(C=i.className+" ");var D=Gp(p,void 0,v.useContext(t1));C+=c.key+"-"+D.name;var x={};for(var b in i)vi.call(i,b)&&b!=="css"&&b!==du&&(x[b]=i[b]);return x.className=C,f&&(x.ref=f),v.createElement(v.Fragment,null,v.createElement(n1,{cache:c,serialized:D,isStringTag:typeof h=="string"}),v.createElement(h,x))}),bu=a1,tt=pi.Fragment,r=function(c,f,d){return vi.call(f,"css")?pi.jsx(bu,mu(c,f),d):pi.jsx(c,f,d)},y=function(c,f,d){return vi.call(f,"css")?pi.jsxs(bu,mu(c,f),d):pi.jsxs(c,f,d)},au={exports:{}},fi={},lu={exports:{}},ou={};var yp;function l1(){return yp||(yp=1,(function(i){function c(T,I){var te=T.length;T.push(I);e:for(;0<te;){var he=te-1>>>1,Fe=T[he];if(0<h(Fe,I))T[he]=I,T[te]=Fe,te=he;else break e}}function f(T){return T.length===0?null:T[0]}function d(T){if(T.length===0)return null;var I=T[0],te=T.pop();if(te!==I){T[0]=te;e:for(var he=0,Fe=T.length,S=Fe>>>1;he<S;){var H=2*(he+1)-1,ae=T[H],oe=H+1,Ce=T[oe];if(0>h(ae,te))oe<Fe&&0>h(Ce,ae)?(T[he]=Ce,T[oe]=te,he=oe):(T[he]=ae,T[H]=te,he=H);else if(oe<Fe&&0>h(Ce,te))T[he]=Ce,T[oe]=te,he=oe;else break e}}return I}function h(T,I){var te=T.sortIndex-I.sortIndex;return te!==0?te:T.id-I.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=[],b=[],A=1,z=null,L=3,j=!1,_=!1,X=!1,$=!1,F=typeof setTimeout=="function"?setTimeout:null,le=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function ie(T){for(var I=f(b);I!==null;){if(I.callback===null)d(b);else if(I.startTime<=T)d(b),I.sortIndex=I.expirationTime,c(x,I);else break;I=f(b)}}function Y(T){if(X=!1,ie(T),!_)if(f(x)!==null)_=!0,ee||(ee=!0,be());else{var I=f(b);I!==null&&Be(Y,I.startTime-T)}}var ee=!1,ne=-1,re=5,q=-1;function W(){return $?!0:!(i.unstable_now()-q<re)}function pe(){if($=!1,ee){var T=i.unstable_now();q=T;var I=!0;try{e:{_=!1,X&&(X=!1,le(ne),ne=-1),j=!0;var te=L;try{t:{for(ie(T),z=f(x);z!==null&&!(z.expirationTime>T&&W());){var he=z.callback;if(typeof he=="function"){z.callback=null,L=z.priorityLevel;var Fe=he(z.expirationTime<=T);if(T=i.unstable_now(),typeof Fe=="function"){z.callback=Fe,ie(T),I=!0;break t}z===f(x)&&d(x),ie(T)}else d(x);z=f(x)}if(z!==null)I=!0;else{var S=f(b);S!==null&&Be(Y,S.startTime-T),I=!1}}break e}finally{z=null,L=te,j=!1}I=void 0}}finally{I?be():ee=!1}}}var be;if(typeof V=="function")be=function(){V(pe)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,se=me.port2;me.port1.onmessage=pe,be=function(){se.postMessage(null)}}else be=function(){F(pe,0)};function Be(T,I){ne=F(function(){T(i.unstable_now())},I)}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"):re=0<T?Math.floor(1e3/T):5},i.unstable_getCurrentPriorityLevel=function(){return L},i.unstable_next=function(T){switch(L){case 1:case 2:case 3:var I=3;break;default:I=L}var te=L;L=I;try{return T()}finally{L=te}},i.unstable_requestPaint=function(){$=!0},i.unstable_runWithPriority=function(T,I){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var te=L;L=T;try{return I()}finally{L=te}},i.unstable_scheduleCallback=function(T,I,te){var he=i.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?he+te:he):te=he,T){case 1:var Fe=-1;break;case 2:Fe=250;break;case 5:Fe=1073741823;break;case 4:Fe=1e4;break;default:Fe=5e3}return Fe=te+Fe,T={id:A++,callback:I,priorityLevel:T,startTime:te,expirationTime:Fe,sortIndex:-1},te>he?(T.sortIndex=te,c(b,T),f(x)===null&&T===f(b)&&(X?(le(ne),ne=-1):X=!0,Be(Y,te-he))):(T.sortIndex=Fe,c(x,T),_||j||(_=!0,ee||(ee=!0,be()))),T},i.unstable_shouldYield=W,i.unstable_wrapCallback=function(T){var I=L;return function(){var te=L;L=I;try{return T.apply(this,arguments)}finally{L=te}}}})(ou)),ou}var vp;function o1(){return vp||(vp=1,lu.exports=l1()),lu.exports}var iu={exports:{}},gn={};var xp;function i1(){if(xp)return gn;xp=1;var i=fu();function c(x){var b="https://react.dev/errors/"+x;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)b+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+x+"; visit "+b+" 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,b,A){var z=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:z==null?null:""+z,children:x,containerInfo:b,implementation:A}}var C=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function D(x,b){if(x==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return gn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,gn.createPortal=function(x,b){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(c(299));return p(x,b,null,A)},gn.flushSync=function(x){var b=C.T,A=d.p;try{if(C.T=null,d.p=2,x)return x()}finally{C.T=b,d.p=A,d.d.f()}},gn.preconnect=function(x,b){typeof x=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,d.d.C(x,b))},gn.prefetchDNS=function(x){typeof x=="string"&&d.d.D(x)},gn.preinit=function(x,b){if(typeof x=="string"&&b&&typeof b.as=="string"){var A=b.as,z=D(A,b.crossOrigin),L=typeof b.integrity=="string"?b.integrity:void 0,j=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;A==="style"?d.d.S(x,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:z,integrity:L,fetchPriority:j}):A==="script"&&d.d.X(x,{crossOrigin:z,integrity:L,fetchPriority:j,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},gn.preinitModule=function(x,b){if(typeof x=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var A=D(b.as,b.crossOrigin);d.d.M(x,{crossOrigin:A,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&d.d.M(x)},gn.preload=function(x,b){if(typeof x=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var A=b.as,z=D(A,b.crossOrigin);d.d.L(x,A,{crossOrigin:z,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},gn.preloadModule=function(x,b){if(typeof x=="string")if(b){var A=D(b.as,b.crossOrigin);d.d.m(x,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:A,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else d.d.m(x)},gn.requestFormReset=function(x){d.d.r(x)},gn.unstable_batchedUpdates=function(x,b){return x(b)},gn.useFormState=function(x,b,A){return C.H.useFormState(x,b,A)},gn.useFormStatus=function(){return C.H.useHostTransitionStatus()},gn.version="19.2.4",gn}var Sp;function r1(){if(Sp)return iu.exports;Sp=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(),iu.exports=i1(),iu.exports}var wp;function s1(){if(wp)return fi;wp=1;var i=o1(),c=fu(),f=r1();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 b(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,L=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),le=Symbol.for("react.consumer"),V=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),pe=Symbol.iterator;function be(e){return e===null||typeof e!="object"?null:(e=pe&&e[pe]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case F:return"Profiler";case $:return"StrictMode";case Y:return"Suspense";case ee:return"SuspenseList";case q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case V:return e.displayName||"Context";case le:return(e._context.displayName||"Context")+".Consumer";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ne:return t=e.displayName||null,t!==null?t:se(e.type)||"Memo";case re:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var Be=Array.isArray,T=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},he=[],Fe=-1;function S(e){return{current:e}}function H(e){0>Fe||(e.current=he[Fe],he[Fe]=null,Fe--)}function ae(e,t){Fe++,he[Fe]=e.current,e.current=t}var oe=S(null),Ce=S(null),Ee=S(null),Ge=S(null);function mt(e,t){switch(ae(Ee,t),ae(Ce,e),ae(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Dh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Dh(t),e=Ah(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(oe),ae(oe,e)}function Oe(){H(oe),H(Ce),H(Ee)}function an(e){e.memoizedState!==null&&ae(Ge,e);var t=oe.current,n=Ah(t,e.type);t!==n&&(ae(Ce,e),ae(oe,n))}function $e(e){Ce.current===e&&(H(oe),H(Ce)),Ge.current===e&&(H(Ge),ii._currentValue=te)}var rt,ut;function Ct(e){if(rt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);rt=t&&t[1]||"",ut=-1<n.stack.indexOf(`
|
|
1
|
+
function om(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 im(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Ic={exports:{}},ui={};var ap;function rm(){if(ap)return ui;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 ui.Fragment=c,ui.jsx=f,ui.jsxs=f,ui}var lp;function sm(){return lp||(lp=1,Ic.exports=rm()),Ic.exports}var pi=sm(),Pc={exports:{}},Ve={};var op;function cm(){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"),b=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),L=Symbol.iterator;function j(S){return S===null||typeof S!="object"?null:(S=L&&S[L]||S["@@iterator"],typeof S=="function"?S:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,$={};function F(S,H,ae){this.props=S,this.context=H,this.refs=$,this.updater=ae||_}F.prototype.isReactComponent={},F.prototype.setState=function(S,H){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,H,"setState")},F.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function le(){}le.prototype=F.prototype;function V(S,H,ae){this.props=S,this.context=H,this.refs=$,this.updater=ae||_}var ie=V.prototype=new le;ie.constructor=V,X(ie,F.prototype),ie.isPureReactComponent=!0;var Y=Array.isArray;function ee(){}var ne={H:null,A:null,T:null,S:null},re=Object.prototype.hasOwnProperty;function q(S,H,ae){var oe=ae.ref;return{$$typeof:i,type:S,key:H,ref:oe!==void 0?oe:null,props:ae}}function W(S,H){return q(S.type,H,S.props)}function pe(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function be(S){var H={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(ae){return H[ae]})}var me=/\/+/g;function se(S,H){return typeof S=="object"&&S!==null&&S.key!=null?be(""+S.key):H.toString(36)}function Be(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(ee,ee):(S.status="pending",S.then(function(H){S.status==="pending"&&(S.status="fulfilled",S.value=H)},function(H){S.status==="pending"&&(S.status="rejected",S.reason=H)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function T(S,H,ae,oe,Ce){var Ee=typeof S;(Ee==="undefined"||Ee==="boolean")&&(S=null);var Ge=!1;if(S===null)Ge=!0;else switch(Ee){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),H,ae,oe,Ce)}}if(Ge)return Ce=Ce(S),Ge=oe===""?"."+se(S,0):oe,Y(Ce)?(ae="",Ge!=null&&(ae=Ge.replace(me,"$&/")+"/"),T(Ce,H,ae,"",function(an){return an})):Ce!=null&&(pe(Ce)&&(Ce=W(Ce,ae+(Ce.key==null||S&&S.key===Ce.key?"":(""+Ce.key).replace(me,"$&/")+"/")+Ge)),H.push(Ce)),1;Ge=0;var mt=oe===""?".":oe+":";if(Y(S))for(var Oe=0;Oe<S.length;Oe++)oe=S[Oe],Ee=mt+se(oe,Oe),Ge+=T(oe,H,ae,Ee,Ce);else if(Oe=j(S),typeof Oe=="function")for(S=Oe.call(S),Oe=0;!(oe=S.next()).done;)oe=oe.value,Ee=mt+se(oe,Oe++),Ge+=T(oe,H,ae,Ee,Ce);else if(Ee==="object"){if(typeof S.then=="function")return T(Be(S),H,ae,oe,Ce);throw H=String(S),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return Ge}function I(S,H,ae){if(S==null)return S;var oe=[],Ce=0;return T(S,oe,"","",function(Ee){return H.call(ae,Ee,Ce++)}),oe}function te(S){if(S._status===-1){var H=S._result;H=H(),H.then(function(ae){(S._status===0||S._status===-1)&&(S._status=1,S._result=ae)},function(ae){(S._status===0||S._status===-1)&&(S._status=2,S._result=ae)}),S._status===-1&&(S._status=0,S._result=H)}if(S._status===1)return S._result.default;throw S._result}var he=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=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(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},Fe={map:I,forEach:function(S,H,ae){I(S,function(){H.apply(this,arguments)},ae)},count:function(S){var H=0;return I(S,function(){H++}),H},toArray:function(S){return I(S,function(H){return H})||[]},only:function(S){if(!pe(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return Ve.Activity=z,Ve.Children=Fe,Ve.Component=F,Ve.Fragment=f,Ve.Profiler=h,Ve.PureComponent=V,Ve.StrictMode=d,Ve.Suspense=x,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ne,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(S){return ne.H.useMemoCache(S)}},Ve.cache=function(S){return function(){return S.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(S,H,ae){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var oe=X({},S.props),Ce=S.key;if(H!=null)for(Ee in H.key!==void 0&&(Ce=""+H.key),H)!re.call(H,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&H.ref===void 0||(oe[Ee]=H[Ee]);var Ee=arguments.length-2;if(Ee===1)oe.children=ae;else if(1<Ee){for(var Ge=Array(Ee),mt=0;mt<Ee;mt++)Ge[mt]=arguments[mt+2];oe.children=Ge}return q(S.type,Ce,oe)},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,H,ae){var oe,Ce={},Ee=null;if(H!=null)for(oe in H.key!==void 0&&(Ee=""+H.key),H)re.call(H,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(Ce[oe]=H[oe]);var Ge=arguments.length-2;if(Ge===1)Ce.children=ae;else if(1<Ge){for(var mt=Array(Ge),Oe=0;Oe<Ge;Oe++)mt[Oe]=arguments[Oe+2];Ce.children=mt}if(S&&S.defaultProps)for(oe in Ge=S.defaultProps,Ge)Ce[oe]===void 0&&(Ce[oe]=Ge[oe]);return q(S,Ee,Ce)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(S){return{$$typeof:D,render:S}},Ve.isValidElement=pe,Ve.lazy=function(S){return{$$typeof:A,_payload:{_status:-1,_result:S},_init:te}},Ve.memo=function(S,H){return{$$typeof:b,type:S,compare:H===void 0?null:H}},Ve.startTransition=function(S){var H=ne.T,ae={};ne.T=ae;try{var oe=S(),Ce=ne.S;Ce!==null&&Ce(ae,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(ee,he)}catch(Ee){he(Ee)}finally{H!==null&&ae.types!==null&&(H.types=ae.types),ne.T=H}},Ve.unstable_useCacheRefresh=function(){return ne.H.useCacheRefresh()},Ve.use=function(S){return ne.H.use(S)},Ve.useActionState=function(S,H,ae){return ne.H.useActionState(S,H,ae)},Ve.useCallback=function(S,H){return ne.H.useCallback(S,H)},Ve.useContext=function(S){return ne.H.useContext(S)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(S,H){return ne.H.useDeferredValue(S,H)},Ve.useEffect=function(S,H){return ne.H.useEffect(S,H)},Ve.useEffectEvent=function(S){return ne.H.useEffectEvent(S)},Ve.useId=function(){return ne.H.useId()},Ve.useImperativeHandle=function(S,H,ae){return ne.H.useImperativeHandle(S,H,ae)},Ve.useInsertionEffect=function(S,H){return ne.H.useInsertionEffect(S,H)},Ve.useLayoutEffect=function(S,H){return ne.H.useLayoutEffect(S,H)},Ve.useMemo=function(S,H){return ne.H.useMemo(S,H)},Ve.useOptimistic=function(S,H){return ne.H.useOptimistic(S,H)},Ve.useReducer=function(S,H,ae){return ne.H.useReducer(S,H,ae)},Ve.useRef=function(S){return ne.H.useRef(S)},Ve.useState=function(S){return ne.H.useState(S)},Ve.useSyncExternalStore=function(S,H,ae){return ne.H.useSyncExternalStore(S,H,ae)},Ve.useTransition=function(){return ne.H.useTransition()},Ve.version="19.2.4",Ve}var ip;function du(){return ip||(ip=1,Pc.exports=cm()),Pc.exports}var v=du();const vt=im(v),rp=om({__proto__:null,default:vt},[v]);function um(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 dm(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 fm=(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(dm(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var p=um(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})(),mn="-ms-",jr="-moz-",pt="-webkit-",Op="comm",fu="rule",hu="decl",hm="@import",_p="@keyframes",pm="@layer",gm=Math.abs,Yr=String.fromCharCode,mm=Object.assign;function bm(i,c){return hn(i,0)^45?(((c<<2^hn(i,0))<<2^hn(i,1))<<2^hn(i,2))<<2^hn(i,3):0}function Hp(i){return i.trim()}function ym(i,c){return(i=c.exec(i))?i[0]:i}function gt(i,c,f){return i.replace(c,f)}function su(i,c){return i.indexOf(c)}function hn(i,c){return i.charCodeAt(c)|0}function gi(i,c,f){return i.slice(c,f)}function ia(i){return i.length}function pu(i){return i.length}function Hr(i,c){return c.push(i),i}function vm(i,c){return i.map(c).join("")}var Gr=1,po=1,Bp=0,An=0,It=0,mo="";function Xr(i,c,f,d,h,p,C){return{value:i,root:c,parent:f,type:d,props:h,children:p,line:Gr,column:po,length:C,return:""}}function di(i,c){return mm(Xr("",null,null,"",null,null,0),i,{length:-i.length},c)}function xm(){return It}function Sm(){return It=An>0?hn(mo,--An):0,po--,It===10&&(po=1,Gr--),It}function Un(){return It=An<Bp?hn(mo,An++):0,po++,It===10&&(po=1,Gr++),It}function sa(){return hn(mo,An)}function Br(){return An}function yi(i,c){return gi(mo,i,c)}function mi(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 Up(i){return Gr=po=1,Bp=ia(mo=i),An=0,[]}function Np(i){return mo="",i}function Ur(i){return Hp(yi(An-1,cu(i===91?i+2:i===40?i+1:i)))}function wm(i){for(;(It=sa())&&It<33;)Un();return mi(i)>2||mi(It)>3?"":" "}function Cm(i,c){for(;--c&&Un()&&!(It<48||It>102||It>57&&It<65||It>70&&It<97););return yi(i,Br()+(c<6&&sa()==32&&Un()==32))}function cu(i){for(;Un();)switch(It){case i:return An;case 34:case 39:i!==34&&i!==39&&cu(It);break;case 40:i===41&&cu(i);break;case 92:Un();break}return An}function km(i,c){for(;Un()&&i+It!==57;)if(i+It===84&&sa()===47)break;return"/*"+yi(c,An-1)+"*"+Yr(i===47?i:Un())}function zm(i){for(;!mi(sa());)Un();return yi(i,An)}function Mm(i){return Np(Nr("",null,null,null,[""],i=Up(i),0,[0],i))}function Nr(i,c,f,d,h,p,C,D,x){for(var b=0,A=0,z=C,L=0,j=0,_=0,X=1,$=1,F=1,le=0,V="",ie=h,Y=p,ee=d,ne=V;$;)switch(_=le,le=Un()){case 40:if(_!=108&&hn(ne,z-1)==58){su(ne+=gt(Ur(le),"&","&\f"),"&\f")!=-1&&(F=-1);break}case 34:case 39:case 91:ne+=Ur(le);break;case 9:case 10:case 13:case 32:ne+=wm(_);break;case 92:ne+=Cm(Br()-1,7);continue;case 47:switch(sa()){case 42:case 47:Hr(Dm(km(Un(),Br()),c,f),x);break;default:ne+="/"}break;case 123*X:D[b++]=ia(ne)*F;case 125*X:case 59:case 0:switch(le){case 0:case 125:$=0;case 59+A:F==-1&&(ne=gt(ne,/\f/g,"")),j>0&&ia(ne)-z&&Hr(j>32?cp(ne+";",d,f,z-1):cp(gt(ne," ","")+";",d,f,z-2),x);break;case 59:ne+=";";default:if(Hr(ee=sp(ne,c,f,b,A,h,D,V,ie=[],Y=[],z),p),le===123)if(A===0)Nr(ne,c,ee,ee,ie,p,z,D,Y);else switch(L===99&&hn(ne,3)===110?100:L){case 100:case 108:case 109:case 115:Nr(i,ee,ee,d&&Hr(sp(i,ee,ee,0,0,h,D,V,h,ie=[],z),Y),h,Y,z,D,d?ie:Y);break;default:Nr(ne,ee,ee,ee,[""],Y,0,D,Y)}}b=A=j=0,X=F=1,V=ne="",z=C;break;case 58:z=1+ia(ne),j=_;default:if(X<1){if(le==123)--X;else if(le==125&&X++==0&&Sm()==125)continue}switch(ne+=Yr(le),le*X){case 38:F=A>0?1:(ne+="\f",-1);break;case 44:D[b++]=(ia(ne)-1)*F,F=1;break;case 64:sa()===45&&(ne+=Ur(Un())),L=sa(),A=z=ia(V=ne+=zm(Br())),le++;break;case 45:_===45&&ia(ne)==2&&(X=0)}}return p}function sp(i,c,f,d,h,p,C,D,x,b,A){for(var z=h-1,L=h===0?p:[""],j=pu(L),_=0,X=0,$=0;_<d;++_)for(var F=0,le=gi(i,z+1,z=gm(X=C[_])),V=i;F<j;++F)(V=Hp(X>0?L[F]+" "+le:gt(le,/&\f/g,L[F])))&&(x[$++]=V);return Xr(i,c,f,h===0?fu:D,x,b,A)}function Dm(i,c,f){return Xr(i,c,f,Op,Yr(xm()),gi(i,2,-2),0)}function cp(i,c,f,d){return Xr(i,c,f,hu,gi(i,0,d),gi(i,d+1,-1),d)}function fo(i,c){for(var f="",d=pu(i),h=0;h<d;h++)f+=c(i[h],h,i,c)||"";return f}function Am(i,c,f,d){switch(i.type){case pm:if(i.children.length)break;case hm:case hu:return i.return=i.return||i.value;case Op:return"";case _p:return i.return=i.value+"{"+fo(i.children,d)+"}";case fu:i.value=i.props.join(",")}return ia(f=fo(i.children,d))?i.return=i.value+"{"+f+"}":""}function Tm(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 Em(i){return function(c){c.root||(c=c.return)&&i(c)}}function Rm(i){var c=Object.create(null);return function(f){return c[f]===void 0&&(c[f]=i(f)),c[f]}}var Lm=function(c,f,d){for(var h=0,p=0;h=p,p=sa(),h===38&&p===12&&(f[d]=1),!mi(p);)Un();return yi(c,An)},Om=function(c,f){var d=-1,h=44;do switch(mi(h)){case 0:h===38&&sa()===12&&(f[d]=1),c[d]+=Lm(An-1,f,d);break;case 2:c[d]+=Ur(h);break;case 4:if(h===44){c[++d]=sa()===58?"&\f":"",f[d]=c[d].length;break}default:c[d]+=Yr(h)}while(h=Un());return c},_m=function(c,f){return Np(Om(Up(c),f))},up=new WeakMap,Hm=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=_m(f,p),D=d.props,x=0,b=0;x<C.length;x++)for(var A=0;A<D.length;A++,b++)c.props[b]=p[x]?C[x].replace(/&\f/g,D[A]):D[A]+" "+C[x]}}},Bm=function(c){if(c.type==="decl"){var f=c.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(c.return="",c.value="")}};function jp(i,c){switch(bm(i,c)){case 5103:return pt+"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 pt+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return pt+i+jr+i+mn+i+i;case 6828:case 4268:return pt+i+mn+i+i;case 6165:return pt+i+mn+"flex-"+i+i;case 5187:return pt+i+gt(i,/(\w+).+(:[^]+)/,pt+"box-$1$2"+mn+"flex-$1$2")+i;case 5443:return pt+i+mn+"flex-item-"+gt(i,/flex-|-self/,"")+i;case 4675:return pt+i+mn+"flex-line-pack"+gt(i,/align-content|flex-|-self/,"")+i;case 5548:return pt+i+mn+gt(i,"shrink","negative")+i;case 5292:return pt+i+mn+gt(i,"basis","preferred-size")+i;case 6060:return pt+"box-"+gt(i,"-grow","")+pt+i+mn+gt(i,"grow","positive")+i;case 4554:return pt+gt(i,/([^-])(transform)/g,"$1"+pt+"$2")+i;case 6187:return gt(gt(gt(i,/(zoom-|grab)/,pt+"$1"),/(image-set)/,pt+"$1"),i,"")+i;case 5495:case 3959:return gt(i,/(image-set\([^]*)/,pt+"$1$`$1");case 4968:return gt(gt(i,/(.+:)(flex-)?(.*)/,pt+"box-pack:$3"+mn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+pt+i+i;case 4095:case 3583:case 4068:case 2532:return gt(i,/(.+)-inline(.+)/,pt+"$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(ia(i)-1-c>6)switch(hn(i,c+1)){case 109:if(hn(i,c+4)!==45)break;case 102:return gt(i,/(.+:)(.+)-([^]+)/,"$1"+pt+"$2-$3$1"+jr+(hn(i,c+3)==108?"$3":"$2-$3"))+i;case 115:return~su(i,"stretch")?jp(gt(i,"stretch","fill-available"),c)+i:i}break;case 4949:if(hn(i,c+1)!==115)break;case 6444:switch(hn(i,ia(i)-3-(~su(i,"!important")&&10))){case 107:return gt(i,":",":"+pt)+i;case 101:return gt(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pt+(hn(i,14)===45?"inline-":"")+"box$3$1"+pt+"$2$3$1"+mn+"$2box$3")+i}break;case 5936:switch(hn(i,c+11)){case 114:return pt+i+mn+gt(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return pt+i+mn+gt(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return pt+i+mn+gt(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return pt+i+mn+i+i}return i}var Um=function(c,f,d,h){if(c.length>-1&&!c.return)switch(c.type){case hu:c.return=jp(c.value,c.length);break;case _p:return fo([di(c,{value:gt(c.value,"@","@"+pt)})],h);case fu:if(c.length)return vm(c.props,function(p){switch(ym(p,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return fo([di(c,{props:[gt(p,/:(read-\w+)/,":"+jr+"$1")]})],h);case"::placeholder":return fo([di(c,{props:[gt(p,/:(plac\w+)/,":"+pt+"input-$1")]}),di(c,{props:[gt(p,/:(plac\w+)/,":"+jr+"$1")]}),di(c,{props:[gt(p,/:(plac\w+)/,mn+"input-$1")]})],h)}return""})}},Nm=[Um],jm=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(X){var $=X.getAttribute("data-emotion");$.indexOf(" ")!==-1&&(document.head.appendChild(X),X.setAttribute("data-s",""))})}var h=c.stylisPlugins||Nm,p={},C,D=[];C=c.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(X){for(var $=X.getAttribute("data-emotion").split(" "),F=1;F<$.length;F++)p[$[F]]=!0;D.push(X)});var x,b=[Hm,Bm];{var A,z=[Am,Em(function(X){A.insert(X)})],L=Tm(b.concat(h,z)),j=function($){return fo(Mm($),L)};x=function($,F,le,V){A=le,j($?$+"{"+F.styles+"}":F.styles),V&&(_.inserted[F.name]=!0)}}var _={key:f,sheet:new fm({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 _.sheet.hydrate(D),_},eu={exports:{}},yt={};var dp;function qm(){if(dp)return yt;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,b=i?Symbol.for("react.concurrent_mode"):60111,A=i?Symbol.for("react.forward_ref"):60112,z=i?Symbol.for("react.suspense"):60113,L=i?Symbol.for("react.suspense_list"):60120,j=i?Symbol.for("react.memo"):60115,_=i?Symbol.for("react.lazy"):60116,X=i?Symbol.for("react.block"):60121,$=i?Symbol.for("react.fundamental"):60117,F=i?Symbol.for("react.responder"):60118,le=i?Symbol.for("react.scope"):60119;function V(Y){if(typeof Y=="object"&&Y!==null){var ee=Y.$$typeof;switch(ee){case c:switch(Y=Y.type,Y){case x:case b:case d:case p:case h:case z:return Y;default:switch(Y=Y&&Y.$$typeof,Y){case D:case A:case _:case j:case C:return Y;default:return ee}}case f:return ee}}}function ie(Y){return V(Y)===b}return yt.AsyncMode=x,yt.ConcurrentMode=b,yt.ContextConsumer=D,yt.ContextProvider=C,yt.Element=c,yt.ForwardRef=A,yt.Fragment=d,yt.Lazy=_,yt.Memo=j,yt.Portal=f,yt.Profiler=p,yt.StrictMode=h,yt.Suspense=z,yt.isAsyncMode=function(Y){return ie(Y)||V(Y)===x},yt.isConcurrentMode=ie,yt.isContextConsumer=function(Y){return V(Y)===D},yt.isContextProvider=function(Y){return V(Y)===C},yt.isElement=function(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===c},yt.isForwardRef=function(Y){return V(Y)===A},yt.isFragment=function(Y){return V(Y)===d},yt.isLazy=function(Y){return V(Y)===_},yt.isMemo=function(Y){return V(Y)===j},yt.isPortal=function(Y){return V(Y)===f},yt.isProfiler=function(Y){return V(Y)===p},yt.isStrictMode=function(Y){return V(Y)===h},yt.isSuspense=function(Y){return V(Y)===z},yt.isValidElementType=function(Y){return typeof Y=="string"||typeof Y=="function"||Y===d||Y===b||Y===p||Y===h||Y===z||Y===L||typeof Y=="object"&&Y!==null&&(Y.$$typeof===_||Y.$$typeof===j||Y.$$typeof===C||Y.$$typeof===D||Y.$$typeof===A||Y.$$typeof===$||Y.$$typeof===F||Y.$$typeof===le||Y.$$typeof===X)},yt.typeOf=V,yt}var fp;function Ym(){return fp||(fp=1,eu.exports=qm()),eu.exports}var tu,hp;function Gm(){if(hp)return tu;hp=1;var i=Ym(),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(_){return i.isMemo(_)?h:p[_.$$typeof]||c}var D=Object.defineProperty,x=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,A=Object.getOwnPropertyDescriptor,z=Object.getPrototypeOf,L=Object.prototype;function j(_,X,$){if(typeof X!="string"){if(L){var F=z(X);F&&F!==L&&j(_,F,$)}var le=x(X);b&&(le=le.concat(b(X)));for(var V=C(_),ie=C(X),Y=0;Y<le.length;++Y){var ee=le[Y];if(!f[ee]&&!($&&$[ee])&&!(ie&&ie[ee])&&!(V&&V[ee])){var ne=A(X,ee);try{D(_,ee,ne)}catch{}}}}return _}return tu=j,tu}Gm();var Xm=!0;function Vm(i,c,f){var d="";return f.split(" ").forEach(function(h){i[h]!==void 0?c.push(i[h]+";"):h&&(d+=h+" ")}),d}var qp=function(c,f,d){var h=c.key+"-"+f.name;(d===!1||Xm===!1)&&c.registered[h]===void 0&&(c.registered[h]=f.styles)},Fm=function(c,f,d){qp(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 Qm(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 Km={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},Zm=/[A-Z]|^ms/g,$m=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yp=function(c){return c.charCodeAt(1)===45},pp=function(c){return c!=null&&typeof c!="boolean"},nu=Rm(function(i){return Yp(i)?i:i.replace(Zm,"-$&").toLowerCase()}),gp=function(c,f){switch(c){case"animation":case"animationName":if(typeof f=="string")return f.replace($m,function(d,h,p){return ra={name:h,styles:p,next:ra},h})}return Km[c]!==1&&!Yp(c)&&typeof f=="number"&&f!==0?f+"px":f};function bi(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 ra={name:h.name,styles:h.styles,next:ra},h.name;var p=f;if(p.styles!==void 0){var C=p.next;if(C!==void 0)for(;C!==void 0;)ra={name:C.name,styles:C.styles,next:ra},C=C.next;var D=p.styles+";";return D}return Jm(i,c,f)}case"function":{if(i!==void 0){var x=ra,b=f(i);return ra=x,bi(i,c,b)}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+=bi(i,c,f[h])+";";else for(var p in f){var C=f[p];if(typeof C!="object"){var D=C;pp(D)&&(d+=nu(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+=nu(p)+":"+gp(p,C[x])+";");else{var b=bi(i,c,C);switch(p){case"animation":case"animationName":{d+=nu(p)+":"+b+";";break}default:d+=p+"{"+b+"}"}}}return d}var mp=/label:\s*([^\s;{]+)\s*(;|$)/g,ra;function Gp(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="";ra=void 0;var p=i[0];if(p==null||p.raw===void 0)d=!1,h+=bi(f,c,p);else{var C=p;h+=C[0]}for(var D=1;D<i.length;D++)if(h+=bi(f,c,i[D]),d){var x=p;h+=x[D]}mp.lastIndex=0;for(var b="",A;(A=mp.exec(h))!==null;)b+="-"+A[1];var z=Qm(h)+b;return{name:z,styles:h,next:ra}}var Wm=function(c){return c()},Im=rp.useInsertionEffect?rp.useInsertionEffect:!1,Pm=Im||Wm,Xp=v.createContext(typeof HTMLElement<"u"?jm({key:"css"}):null);Xp.Provider;var e1=function(c){return v.forwardRef(function(f,d){var h=v.useContext(Xp);return c(f,h,d)})},t1=v.createContext({}),vi={}.hasOwnProperty,uu="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",gu=function(c,f){var d={};for(var h in f)vi.call(f,h)&&(d[h]=f[h]);return d[uu]=c,d},n1=function(c){var f=c.cache,d=c.serialized,h=c.isStringTag;return qp(f,d,h),Pm(function(){return Fm(f,d,h)}),null},a1=e1(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=Vm(c.registered,p,i.className):i.className!=null&&(C=i.className+" ");var D=Gp(p,void 0,v.useContext(t1));C+=c.key+"-"+D.name;var x={};for(var b in i)vi.call(i,b)&&b!=="css"&&b!==uu&&(x[b]=i[b]);return x.className=C,f&&(x.ref=f),v.createElement(v.Fragment,null,v.createElement(n1,{cache:c,serialized:D,isStringTag:typeof h=="string"}),v.createElement(h,x))}),mu=a1,tt=pi.Fragment,r=function(c,f,d){return vi.call(f,"css")?pi.jsx(mu,gu(c,f),d):pi.jsx(c,f,d)},y=function(c,f,d){return vi.call(f,"css")?pi.jsxs(mu,gu(c,f),d):pi.jsxs(c,f,d)},au={exports:{}},fi={},lu={exports:{}},ou={};var bp;function l1(){return bp||(bp=1,(function(i){function c(T,I){var te=T.length;T.push(I);e:for(;0<te;){var he=te-1>>>1,Fe=T[he];if(0<h(Fe,I))T[he]=I,T[te]=Fe,te=he;else break e}}function f(T){return T.length===0?null:T[0]}function d(T){if(T.length===0)return null;var I=T[0],te=T.pop();if(te!==I){T[0]=te;e:for(var he=0,Fe=T.length,S=Fe>>>1;he<S;){var H=2*(he+1)-1,ae=T[H],oe=H+1,Ce=T[oe];if(0>h(ae,te))oe<Fe&&0>h(Ce,ae)?(T[he]=Ce,T[oe]=te,he=oe):(T[he]=ae,T[H]=te,he=H);else if(oe<Fe&&0>h(Ce,te))T[he]=Ce,T[oe]=te,he=oe;else break e}}return I}function h(T,I){var te=T.sortIndex-I.sortIndex;return te!==0?te:T.id-I.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=[],b=[],A=1,z=null,L=3,j=!1,_=!1,X=!1,$=!1,F=typeof setTimeout=="function"?setTimeout:null,le=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function ie(T){for(var I=f(b);I!==null;){if(I.callback===null)d(b);else if(I.startTime<=T)d(b),I.sortIndex=I.expirationTime,c(x,I);else break;I=f(b)}}function Y(T){if(X=!1,ie(T),!_)if(f(x)!==null)_=!0,ee||(ee=!0,be());else{var I=f(b);I!==null&&Be(Y,I.startTime-T)}}var ee=!1,ne=-1,re=5,q=-1;function W(){return $?!0:!(i.unstable_now()-q<re)}function pe(){if($=!1,ee){var T=i.unstable_now();q=T;var I=!0;try{e:{_=!1,X&&(X=!1,le(ne),ne=-1),j=!0;var te=L;try{t:{for(ie(T),z=f(x);z!==null&&!(z.expirationTime>T&&W());){var he=z.callback;if(typeof he=="function"){z.callback=null,L=z.priorityLevel;var Fe=he(z.expirationTime<=T);if(T=i.unstable_now(),typeof Fe=="function"){z.callback=Fe,ie(T),I=!0;break t}z===f(x)&&d(x),ie(T)}else d(x);z=f(x)}if(z!==null)I=!0;else{var S=f(b);S!==null&&Be(Y,S.startTime-T),I=!1}}break e}finally{z=null,L=te,j=!1}I=void 0}}finally{I?be():ee=!1}}}var be;if(typeof V=="function")be=function(){V(pe)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,se=me.port2;me.port1.onmessage=pe,be=function(){se.postMessage(null)}}else be=function(){F(pe,0)};function Be(T,I){ne=F(function(){T(i.unstable_now())},I)}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"):re=0<T?Math.floor(1e3/T):5},i.unstable_getCurrentPriorityLevel=function(){return L},i.unstable_next=function(T){switch(L){case 1:case 2:case 3:var I=3;break;default:I=L}var te=L;L=I;try{return T()}finally{L=te}},i.unstable_requestPaint=function(){$=!0},i.unstable_runWithPriority=function(T,I){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var te=L;L=T;try{return I()}finally{L=te}},i.unstable_scheduleCallback=function(T,I,te){var he=i.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?he+te:he):te=he,T){case 1:var Fe=-1;break;case 2:Fe=250;break;case 5:Fe=1073741823;break;case 4:Fe=1e4;break;default:Fe=5e3}return Fe=te+Fe,T={id:A++,callback:I,priorityLevel:T,startTime:te,expirationTime:Fe,sortIndex:-1},te>he?(T.sortIndex=te,c(b,T),f(x)===null&&T===f(b)&&(X?(le(ne),ne=-1):X=!0,Be(Y,te-he))):(T.sortIndex=Fe,c(x,T),_||j||(_=!0,ee||(ee=!0,be()))),T},i.unstable_shouldYield=W,i.unstable_wrapCallback=function(T){var I=L;return function(){var te=L;L=I;try{return T.apply(this,arguments)}finally{L=te}}}})(ou)),ou}var yp;function o1(){return yp||(yp=1,lu.exports=l1()),lu.exports}var iu={exports:{}},gn={};var vp;function i1(){if(vp)return gn;vp=1;var i=du();function c(x){var b="https://react.dev/errors/"+x;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)b+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+x+"; visit "+b+" 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,b,A){var z=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:z==null?null:""+z,children:x,containerInfo:b,implementation:A}}var C=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function D(x,b){if(x==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return gn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,gn.createPortal=function(x,b){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(c(299));return p(x,b,null,A)},gn.flushSync=function(x){var b=C.T,A=d.p;try{if(C.T=null,d.p=2,x)return x()}finally{C.T=b,d.p=A,d.d.f()}},gn.preconnect=function(x,b){typeof x=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,d.d.C(x,b))},gn.prefetchDNS=function(x){typeof x=="string"&&d.d.D(x)},gn.preinit=function(x,b){if(typeof x=="string"&&b&&typeof b.as=="string"){var A=b.as,z=D(A,b.crossOrigin),L=typeof b.integrity=="string"?b.integrity:void 0,j=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;A==="style"?d.d.S(x,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:z,integrity:L,fetchPriority:j}):A==="script"&&d.d.X(x,{crossOrigin:z,integrity:L,fetchPriority:j,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},gn.preinitModule=function(x,b){if(typeof x=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var A=D(b.as,b.crossOrigin);d.d.M(x,{crossOrigin:A,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&d.d.M(x)},gn.preload=function(x,b){if(typeof x=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var A=b.as,z=D(A,b.crossOrigin);d.d.L(x,A,{crossOrigin:z,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},gn.preloadModule=function(x,b){if(typeof x=="string")if(b){var A=D(b.as,b.crossOrigin);d.d.m(x,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:A,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else d.d.m(x)},gn.requestFormReset=function(x){d.d.r(x)},gn.unstable_batchedUpdates=function(x,b){return x(b)},gn.useFormState=function(x,b,A){return C.H.useFormState(x,b,A)},gn.useFormStatus=function(){return C.H.useHostTransitionStatus()},gn.version="19.2.4",gn}var xp;function r1(){if(xp)return iu.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(),iu.exports=i1(),iu.exports}var Sp;function s1(){if(Sp)return fi;Sp=1;var i=o1(),c=du(),f=r1();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 b(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,L=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),le=Symbol.for("react.consumer"),V=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),pe=Symbol.iterator;function be(e){return e===null||typeof e!="object"?null:(e=pe&&e[pe]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case F:return"Profiler";case $:return"StrictMode";case Y:return"Suspense";case ee:return"SuspenseList";case q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case V:return e.displayName||"Context";case le:return(e._context.displayName||"Context")+".Consumer";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ne:return t=e.displayName||null,t!==null?t:se(e.type)||"Memo";case re:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var Be=Array.isArray,T=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},he=[],Fe=-1;function S(e){return{current:e}}function H(e){0>Fe||(e.current=he[Fe],he[Fe]=null,Fe--)}function ae(e,t){Fe++,he[Fe]=e.current,e.current=t}var oe=S(null),Ce=S(null),Ee=S(null),Ge=S(null);function mt(e,t){switch(ae(Ee,t),ae(Ce,e),ae(oe,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}}H(oe),ae(oe,e)}function Oe(){H(oe),H(Ce),H(Ee)}function an(e){e.memoizedState!==null&&ae(Ge,e);var t=oe.current,n=Dh(t,e.type);t!==n&&(ae(Ce,e),ae(oe,n))}function $e(e){Ce.current===e&&(H(oe),H(Ce)),Ge.current===e&&(H(Ge),ii._currentValue=te)}var rt,ut;function Ct(e){if(rt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);rt=t&&t[1]||"",ut=-1<n.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+rt+e+ut}var Ht=!1;function Pt(e,t){if(!e||Ht)return"";Ht=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var
|
|
3
|
+
`+rt+e+ut}var Ht=!1;function Pt(e,t){if(!e||Ht)return"";Ht=!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 O=B}Reflect.construct(e,[],K)}else{try{K.call()}catch(B){O=B}e.call(K.prototype)}}else{try{throw Error()}catch(B){O=B}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(B){if(B&&O&&typeof B.stack=="string")return[B.stack,O.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 G=`
|
|
6
6
|
`+w[a].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=a&&0<=l);break}}}finally{Ht=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ct(n):""}function en(e,t){switch(e.tag){case 26:case 27:case 5:return Ct(e.type);case 16:return Ct("Lazy");case 13:return e.child!==t&&t!==null?Ct("Suspense Fallback"):Ct("Suspense");case 19:return Ct("SuspenseList");case 0:case 15:return Pt(e.type,!1);case 11:return Pt(e.type.render,!1);case 1:return Pt(e.type,!0);case 31:return Ct("Activity");default:return""}}function pn(e){try{var t="",n=null;do t+=en(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 tn=Object.prototype.hasOwnProperty,bt=i.unstable_scheduleCallback,Rt=i.unstable_cancelCallback,at=i.unstable_shouldYield,ze=i.unstable_requestPaint,Lt=i.unstable_now,on=i.unstable_getCurrentPriorityLevel,rn=i.unstable_ImmediatePriority,xn=i.unstable_UserBlockingPriority,Sn=i.unstable_NormalPriority,J=i.unstable_LowPriority,ue=i.unstable_IdlePriority,Xe=i.log,nt=i.unstable_setDisableYieldValue,Ne=null,Ae=null;function kt(e){if(typeof Xe=="function"&&nt(e),Ae&&typeof Ae.setStrictMode=="function")try{Ae.setStrictMode(Ne,e)}catch{}}var xt=Math.clz32?Math.clz32:bo,La=Math.log,ca=Math.LN2;function bo(e){return e>>>=0,e===0?32:31-(La(e)/ca|0)|0}var ua=256,U=262144,Re=4194304;function Me(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 Ze(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=Me(a):(u&=g,u!==0?l=Me(u):n||(n=g&~e,n!==0&&(l=Me(n))))):(g=a&~o,g!==0?l=Me(g):u!==0?l=Me(u):n||(n=a&~e,n!==0&&(l=Me(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 lt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Pn(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 ea(){var e=Re;return Re<<=1,(Re&62914560)===0&&(Re=4194304),e}function bn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function dt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ft(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 G=31-xt(n),Z=1<<G;g[G]=0,w[G]=-1;var O=R[G];if(O!==null)for(R[G]=null,G=0;G<O.length;G++){var B=O[G];B!==null&&(B.lane&=-536870913)}n&=~Z}a!==0&&xi(e,a,0),o!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=o&~(u&~t))}function xi(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-xt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function Si(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-xt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function yo(e,t){var n=t&-t;return n=(n&42)!==0?1:da(n),(n&(e.suspendedLanes|t))!==0?0:n}function da(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 vo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function wi(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Wh(e.type))}function Zn(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var ta=Math.random().toString(36).slice(2),Bt="__reactFiber$"+ta,Xt="__reactProps$"+ta,Tn="__reactContainer$"+ta,Al="__reactEvents$"+ta,Oa="__reactListeners$"+ta,_a="__reactHandles$"+ta,xo="__reactResources$"+ta,cl="__reactMarker$"+ta;function So(e){delete e[Bt],delete e[Xt],delete e[Al],delete e[Oa],delete e[_a]}function fa(e){var t=e[Bt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Tn]||n[Bt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Hh(e);e!==null;){if(n=e[Bt])return n;e=Hh(e)}return t}e=n,n=e.parentNode}return null}function ge(e){if(e=e[Bt]||e[Tn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ce(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function ve(e){var t=e[xo];return t||(t=e[xo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function xe(e){e[cl]=!0}var _e=new Set,Ue={};function ot(e,t){it(e,t),it(e+"Capture",t)}function it(e,t){for(Ue[e]=t,e=0;e<t.length;e++)_e.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]*$"),yn={},wo={};function Wp(e){return tn.call(wo,e)?!0:tn.call(yn,e)?!1:je.test(e)?wo[e]=!0:(yn[e]=!0,!1)}function Ci(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 ki(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 ha(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 Nn(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 Ip(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 Fr(e){if(!e._valueTracker){var t=yu(e)?"checked":"value";e._valueTracker=Ip(e,t,""+e[t])}}function vu(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 zi(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 Pp=/[\n"\\]/g;function jn(e){return e.replace(Pp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Qr(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=""+Nn(t)):e.value!==""+Nn(t)&&(e.value=""+Nn(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Kr(e,u,Nn(t)):n!=null?Kr(e,u,Nn(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=""+Nn(g):e.removeAttribute("name")}function xu(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)){Fr(e);return}n=n!=null?""+Nn(n):"",t=t!=null?""+Nn(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),Fr(e)}function Kr(e,t,n){t==="number"&&zi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Tl(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=""+Nn(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 Su(e,t,n){if(t!=null&&(t=""+Nn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Nn(n):""}function wu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(d(92));if(Be(a)){if(1<a.length)throw Error(d(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Nn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Fr(e)}function El(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var e0=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 Cu(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||e0.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function ku(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&&Cu(e,l,a)}else for(var o in t)t.hasOwnProperty(o)&&Cu(e,o,t[o])}function Zr(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 t0=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"]]),n0=/^[\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 Mi(e){return n0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function pa(){}var $r=null;function Jr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rl=null,Ll=null;function zu(e){var t=ge(e);if(t&&(e=t.stateNode)){var n=e[Xt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Qr(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="'+jn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[Xt]||null;if(!l)throw Error(d(90));Qr(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&&vu(a)}break e;case"textarea":Su(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Tl(e,!!n.multiple,t,!1)}}}var Wr=!1;function Mu(e,t,n){if(Wr)return e(t,n);Wr=!0;try{var a=e(t);return a}finally{if(Wr=!1,(Rl!==null||Ll!==null)&&(hr(),Rl&&(t=Rl,e=Ll,Ll=Rl=null,zu(t),e)))for(t=0;t<e.length;t++)zu(e[t])}}function Co(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Xt]||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 ga=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ir=!1;if(ga)try{var ko={};Object.defineProperty(ko,"passive",{get:function(){Ir=!0}}),window.addEventListener("test",ko,ko),window.removeEventListener("test",ko,ko)}catch{Ir=!1}var Ha=null,Pr=null,Di=null;function Du(){if(Di)return Di;var e,t=Pr,n=t.length,a,l="value"in Ha?Ha.value:Ha.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 Di=l.slice(e,1<a?1-a:void 0)}function Ai(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 Ti(){return!0}function Au(){return!1}function wn(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)?Ti:Au,this.isPropagationStopped=Au,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=Ti)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ti)},persist:function(){},isPersistent:Ti}),t}var ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ei=wn(ul),zo=z({},ul,{view:0,detail:0}),a0=wn(zo),es,ts,Mo,Ri=z({},zo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:as,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!==Mo&&(Mo&&e.type==="mousemove"?(es=e.screenX-Mo.screenX,ts=e.screenY-Mo.screenY):ts=es=0,Mo=e),es)},movementY:function(e){return"movementY"in e?e.movementY:ts}}),Tu=wn(Ri),l0=z({},Ri,{dataTransfer:0}),o0=wn(l0),i0=z({},zo,{relatedTarget:0}),ns=wn(i0),r0=z({},ul,{animationName:0,elapsedTime:0,pseudoElement:0}),s0=wn(r0),c0=z({},ul,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),u0=wn(c0),d0=z({},ul,{data:0}),Eu=wn(d0),f0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},h0={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"},p0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function g0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=p0[e])?!!t[e]:!1}function as(){return g0}var m0=z({},zo,{key:function(e){if(e.key){var t=f0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ai(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?h0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:as,charCode:function(e){return e.type==="keypress"?Ai(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ai(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),b0=wn(m0),y0=z({},Ri,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ru=wn(y0),v0=z({},zo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:as}),x0=wn(v0),S0=z({},ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),w0=wn(S0),C0=z({},Ri,{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}),k0=wn(C0),z0=z({},ul,{newState:0,oldState:0}),M0=wn(z0),D0=[9,13,27,32],ls=ga&&"CompositionEvent"in window,Do=null;ga&&"documentMode"in document&&(Do=document.documentMode);var A0=ga&&"TextEvent"in window&&!Do,Lu=ga&&(!ls||Do&&8<Do&&11>=Do),Ou=" ",_u=!1;function Hu(e,t){switch(e){case"keyup":return D0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ol=!1;function T0(e,t){switch(e){case"compositionend":return Bu(t);case"keypress":return t.which!==32?null:(_u=!0,Ou);case"textInput":return e=t.data,e===Ou&&_u?null:e;default:return null}}function E0(e,t){if(Ol)return e==="compositionend"||!ls&&Hu(e,t)?(e=Du(),Di=Pr=Ha=null,Ol=!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 Lu&&t.locale!=="ko"?null:t.data;default:return null}}var R0={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 Uu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!R0[e.type]:t==="textarea"}function Nu(e,t,n,a){Rl?Ll?Ll.push(a):Ll=[a]:Rl=a,t=xr(t,"onChange"),0<t.length&&(n=new Ei("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Ao=null,To=null;function L0(e){Sh(e,0)}function Li(e){var t=ce(e);if(vu(t))return e}function ju(e,t){if(e==="change")return t}var qu=!1;if(ga){var os;if(ga){var is="oninput"in document;if(!is){var Yu=document.createElement("div");Yu.setAttribute("oninput","return;"),is=typeof Yu.oninput=="function"}os=is}else os=!1;qu=os&&(!document.documentMode||9<document.documentMode)}function Gu(){Ao&&(Ao.detachEvent("onpropertychange",Xu),To=Ao=null)}function Xu(e){if(e.propertyName==="value"&&Li(To)){var t=[];Nu(t,To,e,Jr(e)),Mu(L0,t)}}function O0(e,t,n){e==="focusin"?(Gu(),Ao=t,To=n,Ao.attachEvent("onpropertychange",Xu)):e==="focusout"&&Gu()}function _0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Li(To)}function H0(e,t){if(e==="click")return Li(t)}function B0(e,t){if(e==="input"||e==="change")return Li(t)}function U0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:U0;function Eo(e,t){if(En(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!tn.call(t,l)||!En(e[l],t[l]))return!1}return!0}function Vu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fu(e,t){var n=Vu(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=Vu(n)}}function Qu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ku(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zi(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=zi(e.document)}return t}function rs(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 N0=ga&&"documentMode"in document&&11>=document.documentMode,_l=null,ss=null,Ro=null,cs=!1;function Zu(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cs||_l==null||_l!==zi(a)||(a=_l,"selectionStart"in a&&rs(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}),Ro&&Eo(Ro,a)||(Ro=a,a=xr(ss,"onSelect"),0<a.length&&(t=new Ei("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=_l)))}function dl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Hl={animationend:dl("Animation","AnimationEnd"),animationiteration:dl("Animation","AnimationIteration"),animationstart:dl("Animation","AnimationStart"),transitionrun:dl("Transition","TransitionRun"),transitionstart:dl("Transition","TransitionStart"),transitioncancel:dl("Transition","TransitionCancel"),transitionend:dl("Transition","TransitionEnd")},us={},$u={};ga&&($u=document.createElement("div").style,"AnimationEvent"in window||(delete Hl.animationend.animation,delete Hl.animationiteration.animation,delete Hl.animationstart.animation),"TransitionEvent"in window||delete Hl.transitionend.transition);function fl(e){if(us[e])return us[e];if(!Hl[e])return e;var t=Hl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $u)return us[e]=t[n];return e}var Ju=fl("animationend"),Wu=fl("animationiteration"),Iu=fl("animationstart"),j0=fl("transitionrun"),q0=fl("transitionstart"),Y0=fl("transitioncancel"),Pu=fl("transitionend"),ed=new Map,ds="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(" ");ds.push("scrollEnd");function $n(e,t){ed.set(e,t),ot(t,[e])}var Oi=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)},qn=[],Bl=0,fs=0;function _i(){for(var e=Bl,t=fs=Bl=0;t<e;){var n=qn[t];qn[t++]=null;var a=qn[t];qn[t++]=null;var l=qn[t];qn[t++]=null;var o=qn[t];if(qn[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&&td(n,l,o)}}function Hi(e,t,n,a){qn[Bl++]=e,qn[Bl++]=t,qn[Bl++]=n,qn[Bl++]=a,fs|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function hs(e,t,n,a){return Hi(e,t,n,a),Bi(e)}function hl(e,t){return Hi(e,null,null,t),Bi(e)}function td(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!1,o=e.return;o!==null;)o.childLanes|=n,a=o.alternate,a!==null&&(a.childLanes|=n),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(l=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,l&&t!==null&&(l=31-xt(n),e=o.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),o):null}function Bi(e){if(50<Po)throw Po=0,wc=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ul={};function G0(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 Rn(e,t,n,a){return new G0(e,t,n,a)}function ps(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ma(e,t){var n=e.alternate;return n===null?(n=Rn(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 nd(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 Ui(e,t,n,a,l,o){var u=0;if(a=e,typeof e=="function")ps(e)&&(u=1);else if(typeof e=="string")u=Kg(e,n,oe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case q:return e=Rn(31,n,t,l),e.elementType=q,e.lanes=o,e;case X:return pl(n.children,l,o,t);case $:u=8,l|=24;break;case F:return e=Rn(12,n,t,l|2),e.elementType=F,e.lanes=o,e;case Y:return e=Rn(13,n,t,l),e.elementType=Y,e.lanes=o,e;case ee:return e=Rn(19,n,t,l),e.elementType=ee,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:u=10;break e;case le:u=9;break e;case ie:u=11;break e;case ne:u=14;break e;case re:u=16,a=null;break e}u=29,n=Error(d(130,e===null?"null":typeof e,"")),a=null}return t=Rn(u,n,t,l),t.elementType=e,t.type=a,t.lanes=o,t}function pl(e,t,n,a){return e=Rn(7,e,a,t),e.lanes=n,e}function gs(e,t,n){return e=Rn(6,e,null,t),e.lanes=n,e}function ad(e){var t=Rn(18,null,null,0);return t.stateNode=e,t}function ms(e,t,n){return t=Rn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ld=new WeakMap;function Yn(e,t){if(typeof e=="object"&&e!==null){var n=ld.get(e);return n!==void 0?n:(t={value:e,source:t,stack:pn(t)},ld.set(e,t),t)}return{value:e,source:t,stack:pn(t)}}var Nl=[],jl=0,Ni=null,Lo=0,Gn=[],Xn=0,Ba=null,na=1,aa="";function ba(e,t){Nl[jl++]=Lo,Nl[jl++]=Ni,Ni=e,Lo=t}function od(e,t,n){Gn[Xn++]=na,Gn[Xn++]=aa,Gn[Xn++]=Ba,Ba=e;var a=na;e=aa;var l=32-xt(a)-1;a&=~(1<<l),n+=1;var o=32-xt(t)+l;if(30<o){var u=l-l%5;o=(a&(1<<u)-1).toString(32),a>>=u,l-=u,na=1<<32-xt(t)+l|n<<l|a,aa=o+e}else na=1<<o|n<<l|a,aa=e}function bs(e){e.return!==null&&(ba(e,1),od(e,1,0))}function ys(e){for(;e===Ni;)Ni=Nl[--jl],Nl[jl]=null,Lo=Nl[--jl],Nl[jl]=null;for(;e===Ba;)Ba=Gn[--Xn],Gn[Xn]=null,aa=Gn[--Xn],Gn[Xn]=null,na=Gn[--Xn],Gn[Xn]=null}function id(e,t){Gn[Xn++]=na,Gn[Xn++]=aa,Gn[Xn++]=Ba,na=t.id,aa=t.overflow,Ba=e}var sn=null,Ot=null,et=!1,Ua=null,Vn=!1,vs=Error(d(519));function Na(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Oo(Yn(t,e)),vs}function rd(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Bt]=e,t[Xt]=a,n){case"dialog":We("cancel",t),We("close",t);break;case"iframe":case"object":case"embed":We("load",t);break;case"video":case"audio":for(n=0;n<ti.length;n++)We(ti[n],t);break;case"source":We("error",t);break;case"img":case"image":case"link":We("error",t),We("load",t);break;case"details":We("toggle",t);break;case"input":We("invalid",t),xu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":We("invalid",t);break;case"textarea":We("invalid",t),wu(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||zh(t.textContent,n)?(a.popover!=null&&(We("beforetoggle",t),We("toggle",t)),a.onScroll!=null&&We("scroll",t),a.onScrollEnd!=null&&We("scrollend",t),a.onClick!=null&&(t.onclick=pa),t=!0):t=!1,t||Na(e,!0)}function sd(e){for(sn=e.return;sn;)switch(sn.tag){case 5:case 31:case 13:Vn=!1;return;case 27:case 3:Vn=!0;return;default:sn=sn.return}}function ql(e){if(e!==sn)return!1;if(!et)return sd(e),et=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Uc(e.type,e.memoizedProps)),n=!n),n&&Ot&&Na(e),sd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Ot=_h(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Ot=_h(e)}else t===27?(t=Ot,Ia(e.type)?(e=Gc,Gc=null,Ot=e):Ot=t):Ot=sn?Qn(e.stateNode.nextSibling):null;return!0}function gl(){Ot=sn=null,et=!1}function xs(){var e=Ua;return e!==null&&(Mn===null?Mn=e:Mn.push.apply(Mn,e),Ua=null),e}function Oo(e){Ua===null?Ua=[e]:Ua.push(e)}var Ss=S(null),ml=null,ya=null;function ja(e,t,n){ae(Ss,t._currentValue),t._currentValue=n}function va(e){e._currentValue=Ss.current,H(Ss)}function ws(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 Cs(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),ws(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),ws(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 Yl(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;En(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(ii):e=[ii])}l=l.return}e!==null&&Cs(t,e,n,a),t.flags|=262144}function ji(e){for(e=e.firstContext;e!==null;){if(!En(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function bl(e){ml=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function cn(e){return cd(ml,e)}function qi(e,t){return ml===null&&bl(e),cd(e,t)}function cd(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ya===null){if(e===null)throw Error(d(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return n}var X0=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()})}},V0=i.unstable_scheduleCallback,F0=i.unstable_NormalPriority,Qt={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ks(){return{controller:new X0,data:new Map,refCount:0}}function _o(e){e.refCount--,e.refCount===0&&V0(F0,function(){e.controller.abort()})}var Ho=null,zs=0,Gl=0,Xl=null;function Q0(e,t){if(Ho===null){var n=Ho=[];zs=0,Gl=Ac(),Xl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return zs++,t.then(ud,ud),t}function ud(){if(--zs===0&&Ho!==null){Xl!==null&&(Xl.status="fulfilled");var e=Ho;Ho=null,Gl=0,Xl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function K0(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 dd=T.S;T.S=function(e,t){$f=Lt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Q0(e,t),dd!==null&&dd(e,t)};var yl=S(null);function Ms(){var e=yl.current;return e!==null?e:At.pooledCache}function Yi(e,t){t===null?ae(yl,yl.current):ae(yl,t.pool)}function fd(){var e=Ms();return e===null?null:{parent:Qt._currentValue,pool:e}}var Vl=Error(d(460)),Ds=Error(d(474)),Gi=Error(d(542)),Xi={then:function(){}};function hd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function pd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(pa,pa),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,md(e),e;default:if(typeof t.status=="string")t.then(pa,pa);else{if(e=At,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,md(e),e}throw xl=t,Vl}}function vl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(xl=n,Vl):n}}var xl=null;function gd(){if(xl===null)throw Error(d(459));var e=xl;return xl=null,e}function md(e){if(e===Vl||e===Gi)throw Error(d(483))}var Fl=null,Bo=0;function Vi(e){var t=Bo;return Bo+=1,Fl===null&&(Fl=[]),pd(Fl,e,t)}function Uo(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Fi(e,t){throw t.$$typeof===L?Error(d(525)):(e=Object.prototype.toString.call(t),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function bd(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=ma(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,Q){return k===null||k.tag!==6?(k=gs(E,M.mode,Q),k.return=M,k):(k=l(k,E),k.return=M,k)}function w(M,k,E,Q){var Te=E.type;return Te===X?G(M,k,E.props.children,Q,E.key):k!==null&&(k.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===re&&vl(Te)===k.type)?(k=l(k,E.props),Uo(k,E),k.return=M,k):(k=Ui(E.type,E.key,E.props,null,M.mode,Q),Uo(k,E),k.return=M,k)}function R(M,k,E,Q){return k===null||k.tag!==4||k.stateNode.containerInfo!==E.containerInfo||k.stateNode.implementation!==E.implementation?(k=ms(E,M.mode,Q),k.return=M,k):(k=l(k,E.children||[]),k.return=M,k)}function G(M,k,E,Q,Te){return k===null||k.tag!==7?(k=pl(E,M.mode,Q,Te),k.return=M,k):(k=l(k,E),k.return=M,k)}function Z(M,k,E){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=gs(""+k,M.mode,E),k.return=M,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case j:return E=Ui(k.type,k.key,k.props,null,M.mode,E),Uo(E,k),E.return=M,E;case _:return k=ms(k,M.mode,E),k.return=M,k;case re:return k=vl(k),Z(M,k,E)}if(Be(k)||be(k))return k=pl(k,M.mode,E,null),k.return=M,k;if(typeof k.then=="function")return Z(M,Vi(k),E);if(k.$$typeof===V)return Z(M,qi(M,k),E);Fi(M,k)}return null}function O(M,k,E,Q){var Te=k!==null?k.key:null;if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return Te!==null?null:g(M,k,""+E,Q);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case j:return E.key===Te?w(M,k,E,Q):null;case _:return E.key===Te?R(M,k,E,Q):null;case re:return E=vl(E),O(M,k,E,Q)}if(Be(E)||be(E))return Te!==null?null:G(M,k,E,Q,null);if(typeof E.then=="function")return O(M,k,Vi(E),Q);if(E.$$typeof===V)return O(M,k,qi(M,E),Q);Fi(M,E)}return null}function B(M,k,E,Q,Te){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return M=M.get(E)||null,g(k,M,""+Q,Te);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case j:return M=M.get(Q.key===null?E:Q.key)||null,w(k,M,Q,Te);case _:return M=M.get(Q.key===null?E:Q.key)||null,R(k,M,Q,Te);case re:return Q=vl(Q),B(M,k,E,Q,Te)}if(Be(Q)||be(Q))return M=M.get(E)||null,G(k,M,Q,Te,null);if(typeof Q.then=="function")return B(M,k,E,Vi(Q),Te);if(Q.$$typeof===V)return B(M,k,E,qi(k,Q),Te);Fi(k,Q)}return null}function ye(M,k,E,Q){for(var Te=null,st=null,ke=k,Ke=k=0,Pe=null;ke!==null&&Ke<E.length;Ke++){ke.index>Ke?(Pe=ke,ke=null):Pe=ke.sibling;var ct=O(M,ke,E[Ke],Q);if(ct===null){ke===null&&(ke=Pe);break}e&&ke&&ct.alternate===null&&t(M,ke),k=o(ct,k,Ke),st===null?Te=ct:st.sibling=ct,st=ct,ke=Pe}if(Ke===E.length)return n(M,ke),et&&ba(M,Ke),Te;if(ke===null){for(;Ke<E.length;Ke++)ke=Z(M,E[Ke],Q),ke!==null&&(k=o(ke,k,Ke),st===null?Te=ke:st.sibling=ke,st=ke);return et&&ba(M,Ke),Te}for(ke=a(ke);Ke<E.length;Ke++)Pe=B(ke,M,Ke,E[Ke],Q),Pe!==null&&(e&&Pe.alternate!==null&&ke.delete(Pe.key===null?Ke:Pe.key),k=o(Pe,k,Ke),st===null?Te=Pe:st.sibling=Pe,st=Pe);return e&&ke.forEach(function(al){return t(M,al)}),et&&ba(M,Ke),Te}function Le(M,k,E,Q){if(E==null)throw Error(d(151));for(var Te=null,st=null,ke=k,Ke=k=0,Pe=null,ct=E.next();ke!==null&&!ct.done;Ke++,ct=E.next()){ke.index>Ke?(Pe=ke,ke=null):Pe=ke.sibling;var al=O(M,ke,ct.value,Q);if(al===null){ke===null&&(ke=Pe);break}e&&ke&&al.alternate===null&&t(M,ke),k=o(al,k,Ke),st===null?Te=al:st.sibling=al,st=al,ke=Pe}if(ct.done)return n(M,ke),et&&ba(M,Ke),Te;if(ke===null){for(;!ct.done;Ke++,ct=E.next())ct=Z(M,ct.value,Q),ct!==null&&(k=o(ct,k,Ke),st===null?Te=ct:st.sibling=ct,st=ct);return et&&ba(M,Ke),Te}for(ke=a(ke);!ct.done;Ke++,ct=E.next())ct=B(ke,M,Ke,ct.value,Q),ct!==null&&(e&&ct.alternate!==null&&ke.delete(ct.key===null?Ke:ct.key),k=o(ct,k,Ke),st===null?Te=ct:st.sibling=ct,st=ct);return e&&ke.forEach(function(lm){return t(M,lm)}),et&&ba(M,Ke),Te}function Dt(M,k,E,Q){if(typeof E=="object"&&E!==null&&E.type===X&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case j:e:{for(var Te=E.key;k!==null;){if(k.key===Te){if(Te=E.type,Te===X){if(k.tag===7){n(M,k.sibling),Q=l(k,E.props.children),Q.return=M,M=Q;break e}}else if(k.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===re&&vl(Te)===k.type){n(M,k.sibling),Q=l(k,E.props),Uo(Q,E),Q.return=M,M=Q;break e}n(M,k);break}else t(M,k);k=k.sibling}E.type===X?(Q=pl(E.props.children,M.mode,Q,E.key),Q.return=M,M=Q):(Q=Ui(E.type,E.key,E.props,null,M.mode,Q),Uo(Q,E),Q.return=M,M=Q)}return u(M);case _:e:{for(Te=E.key;k!==null;){if(k.key===Te)if(k.tag===4&&k.stateNode.containerInfo===E.containerInfo&&k.stateNode.implementation===E.implementation){n(M,k.sibling),Q=l(k,E.children||[]),Q.return=M,M=Q;break e}else{n(M,k);break}else t(M,k);k=k.sibling}Q=ms(E,M.mode,Q),Q.return=M,M=Q}return u(M);case re:return E=vl(E),Dt(M,k,E,Q)}if(Be(E))return ye(M,k,E,Q);if(be(E)){if(Te=be(E),typeof Te!="function")throw Error(d(150));return E=Te.call(E),Le(M,k,E,Q)}if(typeof E.then=="function")return Dt(M,k,Vi(E),Q);if(E.$$typeof===V)return Dt(M,k,qi(M,E),Q);Fi(M,E)}return typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint"?(E=""+E,k!==null&&k.tag===6?(n(M,k.sibling),Q=l(k,E),Q.return=M,M=Q):(n(M,k),Q=gs(E,M.mode,Q),Q.return=M,M=Q),u(M)):n(M,k)}return function(M,k,E,Q){try{Bo=0;var Te=Dt(M,k,E,Q);return Fl=null,Te}catch(ke){if(ke===Vl||ke===Gi)throw ke;var st=Rn(29,ke,null,M.mode);return st.lanes=Q,st.return=M,st}}}var Sl=bd(!0),yd=bd(!1),qa=!1;function As(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ts(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 Ya(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ht&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=Bi(e),td(e,null,n),t}return Hi(e,a,t,n),Bi(e)}function No(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,Si(e,n)}}function Es(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 Rs=!1;function jo(){if(Rs){var e=Xl;if(e!==null)throw e}}function qo(e,t,n,a){Rs=!1;var l=e.updateQueue;qa=!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 G=e.alternate;G!==null&&(G=G.updateQueue,g=G.lastBaseUpdate,g!==u&&(g===null?G.firstBaseUpdate=R:g.next=R,G.lastBaseUpdate=w))}if(o!==null){var Z=l.baseState;u=0,G=R=w=null,g=o;do{var O=g.lane&-536870913,B=O!==g.lane;if(B?(Ie&O)===O:(a&O)===O){O!==0&&O===Gl&&(Rs=!0),G!==null&&(G=G.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var ye=e,Le=g;O=t;var Dt=n;switch(Le.tag){case 1:if(ye=Le.payload,typeof ye=="function"){Z=ye.call(Dt,Z,O);break e}Z=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Le.payload,O=typeof ye=="function"?ye.call(Dt,Z,O):ye,O==null)break e;Z=z({},Z,O);break e;case 2:qa=!0}}O=g.callback,O!==null&&(e.flags|=64,B&&(e.flags|=8192),B=l.callbacks,B===null?l.callbacks=[O]:B.push(O))}else B={lane:O,tag:g.tag,payload:g.payload,callback:g.callback,next:null},G===null?(R=G=B,w=Z):G=G.next=B,u|=O;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);G===null&&(w=Z),l.baseState=w,l.firstBaseUpdate=R,l.lastBaseUpdate=G,o===null&&(l.shared.lanes=0),Ka|=u,e.lanes=u,e.memoizedState=Z}}function vd(e,t){if(typeof e!="function")throw Error(d(191,e));e.call(t)}function xd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)vd(n[e],t)}var Ql=S(null),Qi=S(0);function Sd(e,t){e=Aa,ae(Qi,e),ae(Ql,t),Aa=e|t.baseLanes}function Ls(){ae(Qi,Aa),ae(Ql,Ql.current)}function Os(){Aa=Qi.current,H(Ql),H(Qi)}var Ln=S(null),Fn=null;function Xa(e){var t=e.alternate;ae(Vt,Vt.current&1),ae(Ln,e),Fn===null&&(t===null||Ql.current!==null||t.memoizedState!==null)&&(Fn=e)}function _s(e){ae(Vt,Vt.current),ae(Ln,e),Fn===null&&(Fn=e)}function wd(e){e.tag===22?(ae(Vt,Vt.current),ae(Ln,e),Fn===null&&(Fn=e)):Va()}function Va(){ae(Vt,Vt.current),ae(Ln,Ln.current)}function On(e){H(Ln),Fn===e&&(Fn=null),H(Vt)}var Vt=S(0);function Ki(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||qc(n)||Yc(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 xa=0,Qe=null,zt=null,Kt=null,Zi=!1,Kl=!1,wl=!1,$i=0,Yo=0,Zl=null,Z0=0;function qt(){throw Error(d(321))}function Hs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!En(e[n],t[n]))return!1;return!0}function Bs(e,t,n,a,l,o){return xa=o,Qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?of:Ws,wl=!1,o=n(a,l),wl=!1,Kl&&(o=kd(t,n,a,l)),Cd(e),o}function Cd(e){T.H=Vo;var t=zt!==null&&zt.next!==null;if(xa=0,Kt=zt=Qe=null,Zi=!1,Yo=0,Zl=null,t)throw Error(d(300));e===null||Zt||(e=e.dependencies,e!==null&&ji(e)&&(Zt=!0))}function kd(e,t,n,a){Qe=e;var l=0;do{if(Kl&&(Zl=null),Yo=0,Kl=!1,25<=l)throw Error(d(301));if(l+=1,Kt=zt=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=rf,o=t(n,a)}while(Kl);return o}function $0(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?Go(t):t,e=e.useState()[0],(zt!==null?zt.memoizedState:null)!==e&&(Qe.flags|=1024),t}function Us(){var e=$i!==0;return $i=0,e}function Ns(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function js(e){if(Zi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Zi=!1}xa=0,Kt=zt=Qe=null,Kl=!1,Yo=$i=0,Zl=null}function vn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Kt===null?Qe.memoizedState=Kt=e:Kt=Kt.next=e,Kt}function Ft(){if(zt===null){var e=Qe.alternate;e=e!==null?e.memoizedState:null}else e=zt.next;var t=Kt===null?Qe.memoizedState:Kt.next;if(t!==null)Kt=t,zt=e;else{if(e===null)throw Qe.alternate===null?Error(d(467)):Error(d(310));zt=e,e={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Kt===null?Qe.memoizedState=Kt=e:Kt=Kt.next=e}return Kt}function Ji(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Go(e){var t=Yo;return Yo+=1,Zl===null&&(Zl=[]),e=pd(Zl,e,t),t=Qe,(Kt===null?t.memoizedState:Kt.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?of:Ws),e}function Wi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Go(e);if(e.$$typeof===V)return cn(e)}throw Error(d(438,String(e)))}function qs(e){var t=null,n=Qe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Qe.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=Ji(),Qe.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 Sa(e,t){return typeof t=="function"?t(e):t}function Ii(e){var t=Ft();return Ys(t,zt,e)}function Ys(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,G=!1;do{var Z=R.lane&-536870913;if(Z!==R.lane?(Ie&Z)===Z:(xa&Z)===Z){var O=R.revertLane;if(O===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),Z===Gl&&(G=!0);else if((xa&O)===O){R=R.next,O===Gl&&(G=!0);continue}else Z={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},w===null?(g=w=Z,u=o):w=w.next=Z,Qe.lanes|=O,Ka|=O;Z=R.action,wl&&n(o,Z),o=R.hasEagerState?R.eagerState:n(o,Z)}else O={lane:Z,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},w===null?(g=w=O,u=o):w=w.next=O,Qe.lanes|=Z,Ka|=Z;R=R.next}while(R!==null&&R!==t);if(w===null?u=o:w.next=g,!En(o,e.memoizedState)&&(Zt=!0,G&&(n=Xl,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 Gs(e){var t=Ft(),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);En(o,t.memoizedState)||(Zt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,a]}function zd(e,t,n){var a=Qe,l=Ft(),o=et;if(o){if(n===void 0)throw Error(d(407));n=n()}else n=t();var u=!En((zt||l).memoizedState,n);if(u&&(l.memoizedState=n,Zt=!0),l=l.queue,Fs(Ad.bind(null,a,l,e),[e]),l.getSnapshot!==t||u||Kt!==null&&Kt.memoizedState.tag&1){if(a.flags|=2048,$l(9,{destroy:void 0},Dd.bind(null,a,l,n,t),null),At===null)throw Error(d(349));o||(xa&127)!==0||Md(a,t,n)}return n}function Md(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Qe.updateQueue,t===null?(t=Ji(),Qe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Dd(e,t,n,a){t.value=n,t.getSnapshot=a,Td(t)&&Ed(e)}function Ad(e,t,n){return n(function(){Td(t)&&Ed(e)})}function Td(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!En(e,n)}catch{return!0}}function Ed(e){var t=hl(e,2);t!==null&&Dn(t,e,2)}function Xs(e){var t=vn();if(typeof e=="function"){var n=e;if(e=n(),wl){kt(!0);try{n()}finally{kt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:e},t}function Rd(e,t,n,a){return e.baseState=n,Ys(e,zt,typeof a=="function"?a:Sa)}function J0(e,t,n,a,l){if(tr(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,Ld(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ld(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),Od(e,t,g)}catch(R){Vs(e,t,R)}finally{o!==null&&u.types!==null&&(o.types=u.types),T.T=o}}else try{o=n(l,a),Od(e,t,o)}catch(R){Vs(e,t,R)}}function Od(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){_d(e,t,a)},function(a){return Vs(e,t,a)}):_d(e,t,n)}function _d(e,t,n){t.status="fulfilled",t.value=n,Hd(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ld(e,n)))}function Vs(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Hd(t),t=t.next;while(t!==a)}e.action=null}function Hd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Bd(e,t){return t}function Ud(e,t){if(et){var n=At.formState;if(n!==null){e:{var a=Qe;if(et){if(Ot){t:{for(var l=Ot,o=Vn;l.nodeType!==8;){if(!o){l=null;break t}if(l=Qn(l.nextSibling),l===null){l=null;break t}}o=l.data,l=o==="F!"||o==="F"?l:null}if(l){Ot=Qn(l.nextSibling),a=l.data==="F!";break e}}Na(a)}a=!1}a&&(t=n[0])}}return n=vn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bd,lastRenderedState:t},n.queue=a,n=nf.bind(null,Qe,a),a.dispatch=n,a=Xs(!1),o=Js.bind(null,Qe,!1,a.queue),a=vn(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=J0.bind(null,Qe,l,o,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Nd(e){var t=Ft();return jd(t,zt,e)}function jd(e,t,n){if(t=Ys(e,t,Bd)[0],e=Ii(Sa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Go(t)}catch(u){throw u===Vl?Gi:u}else a=t;t=Ft();var l=t.queue,o=l.dispatch;return n!==t.memoizedState&&(Qe.flags|=2048,$l(9,{destroy:void 0},W0.bind(null,l,n),null)),[a,o,e]}function W0(e,t){e.action=t}function qd(e){var t=Ft(),n=zt;if(n!==null)return jd(t,n,e);Ft(),t=t.memoizedState,n=Ft();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function $l(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Qe.updateQueue,t===null&&(t=Ji(),Qe.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 Yd(){return Ft().memoizedState}function Pi(e,t,n,a){var l=vn();Qe.flags|=e,l.memoizedState=$l(1|t,{destroy:void 0},n,a===void 0?null:a)}function er(e,t,n,a){var l=Ft();a=a===void 0?null:a;var o=l.memoizedState.inst;zt!==null&&a!==null&&Hs(a,zt.memoizedState.deps)?l.memoizedState=$l(t,o,n,a):(Qe.flags|=e,l.memoizedState=$l(1|t,o,n,a))}function Gd(e,t){Pi(8390656,8,e,t)}function Fs(e,t){er(2048,8,e,t)}function I0(e){Qe.flags|=4;var t=Qe.updateQueue;if(t===null)t=Ji(),Qe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Xd(e){var t=Ft().memoizedState;return I0({ref:t,nextImpl:e}),function(){if((ht&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function Vd(e,t){return er(4,2,e,t)}function Fd(e,t){return er(4,4,e,t)}function Qd(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 Kd(e,t,n){n=n!=null?n.concat([e]):null,er(4,4,Qd.bind(null,t,e),n)}function Qs(){}function Zd(e,t){var n=Ft();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Hs(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function $d(e,t){var n=Ft();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Hs(t,a[1]))return a[0];if(a=e(),wl){kt(!0);try{e()}finally{kt(!1)}}return n.memoizedState=[a,t],a}function Ks(e,t,n){return n===void 0||(xa&1073741824)!==0&&(Ie&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Wf(),Qe.lanes|=e,Ka|=e,n)}function Jd(e,t,n,a){return En(n,t)?n:Ql.current!==null?(e=Ks(e,n,a),En(e,t)||(Zt=!0),e):(xa&42)===0||(xa&1073741824)!==0&&(Ie&261930)===0?(Zt=!0,e.memoizedState=n):(e=Wf(),Qe.lanes|=e,Ka|=e,t)}function Wd(e,t,n,a,l){var o=I.p;I.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 G=K0(w,a);Xo(e,t,G,Bn(e))}else Xo(e,t,a,Bn(e))}catch(Z){Xo(e,t,{then:function(){},status:"rejected",reason:Z},Bn())}finally{I.p=o,u!==null&&g.types!==null&&(u.types=g.types),T.T=u}}function P0(){}function Zs(e,t,n,a){if(e.tag!==5)throw Error(d(476));var l=Id(e).queue;Wd(e,l,t,te,n===null?P0:function(){return Pd(e),n(a)})}function Id(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Pd(e){var t=Id(e);t.next===null&&(t=e.alternate.memoizedState),Xo(e,t.next.queue,{},Bn())}function $s(){return cn(ii)}function ef(){return Ft().memoizedState}function tf(){return Ft().memoizedState}function eg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Bn();e=Ya(n);var a=Ga(t,e,n);a!==null&&(Dn(a,t,n),No(a,t,n)),t={cache:ks()},e.payload=t;return}t=t.return}}function tg(e,t,n){var a=Bn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},tr(e)?af(t,n):(n=hs(e,t,n,a),n!==null&&(Dn(n,e,a),lf(n,t,a)))}function nf(e,t,n){var a=Bn();Xo(e,t,n,a)}function Xo(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(tr(e))af(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,En(g,u))return Hi(e,t,l,0),At===null&&_i(),!1}catch{}if(n=hs(e,t,l,a),n!==null)return Dn(n,e,a),lf(n,t,a),!0}return!1}function Js(e,t,n,a){if(a={lane:2,revertLane:Ac(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},tr(e)){if(t)throw Error(d(479))}else t=hs(e,n,a,2),t!==null&&Dn(t,e,2)}function tr(e){var t=e.alternate;return e===Qe||t!==null&&t===Qe}function af(e,t){Kl=Zi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lf(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Si(e,n)}}var Vo={readContext:cn,use:Wi,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt};Vo.useEffectEvent=qt;var of={readContext:cn,use:Wi,useCallback:function(e,t){return vn().memoizedState=[e,t===void 0?null:t],e},useContext:cn,useEffect:Gd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Pi(4194308,4,Qd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Pi(4194308,4,e,t)},useInsertionEffect:function(e,t){Pi(4,2,e,t)},useMemo:function(e,t){var n=vn();t=t===void 0?null:t;var a=e();if(wl){kt(!0);try{e()}finally{kt(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=vn();if(n!==void 0){var l=n(t);if(wl){kt(!0);try{n(t)}finally{kt(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=tg.bind(null,Qe,e),[a.memoizedState,e]},useRef:function(e){var t=vn();return e={current:e},t.memoizedState=e},useState:function(e){e=Xs(e);var t=e.queue,n=nf.bind(null,Qe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qs,useDeferredValue:function(e,t){var n=vn();return Ks(n,e,t)},useTransition:function(){var e=Xs(!1);return e=Wd.bind(null,Qe,e.queue,!0,!1),vn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Qe,l=vn();if(et){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),At===null)throw Error(d(349));(Ie&127)!==0||Md(a,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Gd(Ad.bind(null,a,o,e),[e]),a.flags|=2048,$l(9,{destroy:void 0},Dd.bind(null,a,o,n,t),null),n},useId:function(){var e=vn(),t=At.identifierPrefix;if(et){var n=aa,a=na;n=(a&~(1<<32-xt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=$i++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Z0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:$s,useFormState:Ud,useActionState:Ud,useOptimistic:function(e){var t=vn();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,Qe,!0,n),n.dispatch=t,[e,t]},useMemoCache:qs,useCacheRefresh:function(){return vn().memoizedState=eg.bind(null,Qe)},useEffectEvent:function(e){var t=vn(),n={impl:e};return t.memoizedState=n,function(){if((ht&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:cn,use:Wi,useCallback:Zd,useContext:cn,useEffect:Fs,useImperativeHandle:Kd,useInsertionEffect:Vd,useLayoutEffect:Fd,useMemo:$d,useReducer:Ii,useRef:Yd,useState:function(){return Ii(Sa)},useDebugValue:Qs,useDeferredValue:function(e,t){var n=Ft();return Jd(n,zt.memoizedState,e,t)},useTransition:function(){var e=Ii(Sa)[0],t=Ft().memoizedState;return[typeof e=="boolean"?e:Go(e),t]},useSyncExternalStore:zd,useId:ef,useHostTransitionStatus:$s,useFormState:Nd,useActionState:Nd,useOptimistic:function(e,t){var n=Ft();return Rd(n,zt,e,t)},useMemoCache:qs,useCacheRefresh:tf};Ws.useEffectEvent=Xd;var rf={readContext:cn,use:Wi,useCallback:Zd,useContext:cn,useEffect:Fs,useImperativeHandle:Kd,useInsertionEffect:Vd,useLayoutEffect:Fd,useMemo:$d,useReducer:Gs,useRef:Yd,useState:function(){return Gs(Sa)},useDebugValue:Qs,useDeferredValue:function(e,t){var n=Ft();return zt===null?Ks(n,e,t):Jd(n,zt.memoizedState,e,t)},useTransition:function(){var e=Gs(Sa)[0],t=Ft().memoizedState;return[typeof e=="boolean"?e:Go(e),t]},useSyncExternalStore:zd,useId:ef,useHostTransitionStatus:$s,useFormState:qd,useActionState:qd,useOptimistic:function(e,t){var n=Ft();return zt!==null?Rd(n,zt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:qs,useCacheRefresh:tf};rf.useEffectEvent=Xd;function Is(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 Ps={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Bn(),l=Ya(a);l.payload=t,n!=null&&(l.callback=n),t=Ga(e,l,a),t!==null&&(Dn(t,e,a),No(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Bn(),l=Ya(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Ga(e,l,a),t!==null&&(Dn(t,e,a),No(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Bn(),a=Ya(n);a.tag=2,t!=null&&(a.callback=t),t=Ga(e,a,n),t!==null&&(Dn(t,e,n),No(t,e,n))}};function sf(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?!Eo(n,a)||!Eo(l,o):!0}function cf(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&&Ps.enqueueReplaceState(t,t.state,null)}function Cl(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=z({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function uf(e){Oi(e)}function df(e){console.error(e)}function ff(e){Oi(e)}function nr(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function hf(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 ec(e,t,n){return n=Ya(n),n.tag=3,n.payload={element:null},n.callback=function(){nr(e,t)},n}function pf(e){return e=Ya(e),e.tag=3,e}function gf(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(){hf(t,n,a)}}var u=n.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){hf(t,n,a),typeof l!="function"&&(Za===null?Za=new Set([this]):Za.add(this));var g=a.stack;this.componentDidCatch(a.value,{componentStack:g!==null?g:""})})}function ng(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Yl(t,n,l,!0),n=Ln.current,n!==null){switch(n.tag){case 31:case 13:return Fn===null?pr():n.alternate===null&&Yt===0&&(Yt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Xi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),zc(e,a,l)),!1;case 22:return n.flags|=65536,a===Xi?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)),zc(e,a,l)),!1}throw Error(d(435,n.tag))}return zc(e,a,l),pr(),!1}if(et)return t=Ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==vs&&(e=Error(d(422),{cause:a}),Oo(Yn(e,n)))):(a!==vs&&(t=Error(d(423),{cause:a}),Oo(Yn(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=Yn(a,n),l=ec(e.stateNode,a,l),Es(e,l),Yt!==4&&(Yt=2)),!1;var o=Error(d(520),{cause:a});if(o=Yn(o,n),Io===null?Io=[o]:Io.push(o),Yt!==4&&(Yt=2),t===null)return!0;a=Yn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=ec(n.stateNode,a,e),Es(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"&&(Za===null||!Za.has(o))))return n.flags|=65536,l&=-l,n.lanes|=l,l=pf(l),gf(l,e,n,a),Es(n,l),!1}n=n.return}while(n!==null);return!1}var tc=Error(d(461)),Zt=!1;function un(e,t,n,a){t.child=e===null?yd(t,null,n,a):Sl(t,e.child,n,a)}function mf(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 bl(t),a=Bs(e,t,n,u,o,l),g=Us(),e!==null&&!Zt?(Ns(e,t,l),wa(e,t,l)):(et&&g&&bs(t),t.flags|=1,un(e,t,a,l),t.child)}function bf(e,t,n,a,l){if(e===null){var o=n.type;return typeof o=="function"&&!ps(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,yf(e,t,o,a,l)):(e=Ui(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!cc(e,l)){var u=o.memoizedProps;if(n=n.compare,n=n!==null?n:Eo,n(u,a)&&e.ref===t.ref)return wa(e,t,l)}return t.flags|=1,e=ma(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(Eo(o,a)&&e.ref===t.ref)if(Zt=!1,t.pendingProps=a=o,cc(e,l))(e.flags&131072)!==0&&(Zt=!0);else return t.lanes=e.lanes,wa(e,t,l)}return nc(e,t,n,a,l)}function vf(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 xf(e,t,o,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Yi(t,o!==null?o.cachePool:null),o!==null?Sd(t,o):Ls(),wd(t);else return a=t.lanes=536870912,xf(e,t,o!==null?o.baseLanes|n:n,n,a)}else o!==null?(Yi(t,o.cachePool),Sd(t,o),Va(),t.memoizedState=null):(e!==null&&Yi(t,null),Ls(),Va());return un(e,t,l,n),t.child}function Fo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function xf(e,t,n,a,l){var o=Ms();return o=o===null?null:{parent:Qt._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&Yi(t,null),Ls(),wd(t),e!==null&&Yl(e,t,a,!0),t.childLanes=l,null}function ar(e,t){return t=or({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Sf(e,t,n){return Sl(t,e.child,null,n),e=ar(t,t.pendingProps),e.flags|=2,On(t),t.memoizedState=null,e}function ag(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(et){if(a.mode==="hidden")return e=ar(t,a),t.lanes=536870912,Fo(null,e);if(_s(t),(e=Ot)?(e=Oh(e,Vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ba!==null?{id:na,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},n=ad(e),n.return=t,t.child=n,sn=t,Ot=null)):e=null,e===null)throw Na(t);return t.lanes=536870912,null}return ar(t,a)}var o=e.memoizedState;if(o!==null){var u=o.dehydrated;if(_s(t),l)if(t.flags&256)t.flags&=-257,t=Sf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(d(558));else if(Zt||Yl(e,t,n,!1),l=(n&e.childLanes)!==0,Zt||l){if(a=At,a!==null&&(u=yo(a,n),u!==0&&u!==o.retryLane))throw o.retryLane=u,hl(e,u),Dn(a,e,u),tc;pr(),t=Sf(e,t,n)}else e=o.treeContext,Ot=Qn(u.nextSibling),sn=t,et=!0,Ua=null,Vn=!1,e!==null&&id(t,e),t=ar(t,a),t.flags|=4096;return t}return e=ma(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lr(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 nc(e,t,n,a,l){return bl(t),n=Bs(e,t,n,a,void 0,l),a=Us(),e!==null&&!Zt?(Ns(e,t,l),wa(e,t,l)):(et&&a&&bs(t),t.flags|=1,un(e,t,n,l),t.child)}function wf(e,t,n,a,l,o){return bl(t),t.updateQueue=null,n=kd(t,a,n,l),Cd(e),a=Us(),e!==null&&!Zt?(Ns(e,t,o),wa(e,t,o)):(et&&a&&bs(t),t.flags|=1,un(e,t,n,o),t.child)}function Cf(e,t,n,a,l){if(bl(t),t.stateNode===null){var o=Ul,u=n.contextType;typeof u=="object"&&u!==null&&(o=cn(u)),o=new n(a,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Ps,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=a,o.state=t.memoizedState,o.refs={},As(t),u=n.contextType,o.context=typeof u=="object"&&u!==null?cn(u):Ul,o.state=t.memoizedState,u=n.getDerivedStateFromProps,typeof u=="function"&&(Is(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&&Ps.enqueueReplaceState(o,o.state,null),qo(t,a,o,l),jo(),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=Cl(n,g);o.props=w;var R=o.context,G=n.contextType;u=Ul,typeof G=="object"&&G!==null&&(u=cn(G));var Z=n.getDerivedStateFromProps;G=typeof Z=="function"||typeof o.getSnapshotBeforeUpdate=="function",g=t.pendingProps!==g,G||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(g||R!==u)&&cf(t,o,a,u),qa=!1;var O=t.memoizedState;o.state=O,qo(t,a,o,l),jo(),R=t.memoizedState,g||O!==R||qa?(typeof Z=="function"&&(Is(t,n,Z,a),R=t.memoizedState),(w=qa||sf(t,n,w,a,O,R,u))?(G||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,Ts(e,t),u=t.memoizedProps,G=Cl(n,u),o.props=G,Z=t.pendingProps,O=o.context,R=n.contextType,w=Ul,typeof R=="object"&&R!==null&&(w=cn(R)),g=n.getDerivedStateFromProps,(R=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==Z||O!==w)&&cf(t,o,a,w),qa=!1,O=t.memoizedState,o.state=O,qo(t,a,o,l),jo();var B=t.memoizedState;u!==Z||O!==B||qa||e!==null&&e.dependencies!==null&&ji(e.dependencies)?(typeof g=="function"&&(Is(t,n,g,a),B=t.memoizedState),(G=qa||sf(t,n,G,a,O,B,w)||e!==null&&e.dependencies!==null&&ji(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&&O===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=B),o.props=a,o.state=B,o.context=w,a=G):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),a=!1)}return o=a,lr(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=Sl(t,e.child,null,l),t.child=Sl(t,null,n,l)):un(e,t,n,l),t.memoizedState=o.state,e=t.child):e=wa(e,t,l),e}function kf(e,t,n,a){return gl(),t.flags|=256,un(e,t,n,a),t.child}var ac={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lc(e){return{baseLanes:e,cachePool:fd()}}function oc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Hn),e}function zf(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:(Vt.current&2)!==0),u&&(l=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(et){if(l?Xa(t):Va(),(e=Ot)?(e=Oh(e,Vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ba!==null?{id:na,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},n=ad(e),n.return=t,t.child=n,sn=t,Ot=null)):e=null,e===null)throw Na(t);return Yc(e)?t.lanes=32:t.lanes=536870912,null}var g=a.children;return a=a.fallback,l?(Va(),l=t.mode,g=or({mode:"hidden",children:g},l),a=pl(a,l,n,null),g.return=t,a.return=t,g.sibling=a,t.child=g,a=t.child,a.memoizedState=lc(n),a.childLanes=oc(e,u,n),t.memoizedState=ac,Fo(null,a)):(Xa(t),ic(t,g))}var w=e.memoizedState;if(w!==null&&(g=w.dehydrated,g!==null)){if(o)t.flags&256?(Xa(t),t.flags&=-257,t=rc(e,t,n)):t.memoizedState!==null?(Va(),t.child=e.child,t.flags|=128,t=null):(Va(),g=a.fallback,l=t.mode,a=or({mode:"visible",children:a.children},l),g=pl(g,l,n,null),g.flags|=2,a.return=t,g.return=t,a.sibling=g,t.child=a,Sl(t,e.child,null,n),a=t.child,a.memoizedState=lc(n),a.childLanes=oc(e,u,n),t.memoizedState=ac,t=Fo(null,a));else if(Xa(t),Yc(g)){if(u=g.nextSibling&&g.nextSibling.dataset,u)var R=u.dgst;u=R,a=Error(d(419)),a.stack="",a.digest=u,Oo({value:a,source:null,stack:null}),t=rc(e,t,n)}else if(Zt||Yl(e,t,n,!1),u=(n&e.childLanes)!==0,Zt||u){if(u=At,u!==null&&(a=yo(u,n),a!==0&&a!==w.retryLane))throw w.retryLane=a,hl(e,a),Dn(u,e,a),tc;qc(g)||pr(),t=rc(e,t,n)}else qc(g)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,Ot=Qn(g.nextSibling),sn=t,et=!0,Ua=null,Vn=!1,e!==null&&id(t,e),t=ic(t,a.children),t.flags|=4096);return t}return l?(Va(),g=a.fallback,l=t.mode,w=e.child,R=w.sibling,a=ma(w,{mode:"hidden",children:a.children}),a.subtreeFlags=w.subtreeFlags&65011712,R!==null?g=ma(R,g):(g=pl(g,l,n,null),g.flags|=2),g.return=t,a.return=t,a.sibling=g,t.child=a,Fo(null,a),a=t.child,g=e.child.memoizedState,g===null?g=lc(n):(l=g.cachePool,l!==null?(w=Qt._currentValue,l=l.parent!==w?{parent:w,pool:w}:l):l=fd(),g={baseLanes:g.baseLanes|n,cachePool:l}),a.memoizedState=g,a.childLanes=oc(e,u,n),t.memoizedState=ac,Fo(e.child,a)):(Xa(t),n=e.child,e=n.sibling,n=ma(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 ic(e,t){return t=or({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function or(e,t){return e=Rn(22,e,null,t),e.lanes=0,e}function rc(e,t,n){return Sl(t,e.child,null,n),e=ic(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Mf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),ws(e.return,t,n)}function sc(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 Df(e,t,n){var a=t.pendingProps,l=a.revealOrder,o=a.tail;a=a.children;var u=Vt.current,g=(u&2)!==0;if(g?(u=u&1|2,t.flags|=128):u&=1,ae(Vt,u),un(e,t,a,n),a=et?Lo:0,!g&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mf(e,n,t);else if(e.tag===19)Mf(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&&Ki(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),sc(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&&Ki(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}sc(t,!0,n,null,o,a);break;case"together":sc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function wa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ka|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yl(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=ma(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ma(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ji(e)))}function lg(e,t,n){switch(t.tag){case 3:mt(t,t.stateNode.containerInfo),ja(t,Qt,e.memoizedState.cache),gl();break;case 27:case 5:an(t);break;case 4:mt(t,t.stateNode.containerInfo);break;case 10:ja(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,_s(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Xa(t),t.flags|=128,null):(n&t.child.childLanes)!==0?zf(e,t,n):(Xa(t),e=wa(e,t,n),e!==null?e.sibling:null);Xa(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Yl(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return Df(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ae(Vt,Vt.current),a)break;return null;case 22:return t.lanes=0,vf(e,t,n,t.pendingProps);case 24:ja(t,Qt,e.memoizedState.cache)}return wa(e,t,n)}function Af(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Zt=!0;else{if(!cc(e,n)&&(t.flags&128)===0)return Zt=!1,lg(e,t,n);Zt=(e.flags&131072)!==0}else Zt=!1,et&&(t.flags&1048576)!==0&&od(t,Lo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=vl(t.elementType),t.type=e,typeof e=="function")ps(e)?(a=Cl(e,a),t.tag=1,t=Cf(null,t,e,a,n)):(t.tag=0,t=nc(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===ie){t.tag=11,t=mf(null,t,e,a,n);break e}else if(l===ne){t.tag=14,t=bf(null,t,e,a,n);break e}}throw t=se(e)||e,Error(d(306,t,""))}}return t;case 0:return nc(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=Cl(a,t.pendingProps),Cf(e,t,a,l,n);case 3:e:{if(mt(t,t.stateNode.containerInfo),e===null)throw Error(d(387));a=t.pendingProps;var o=t.memoizedState;l=o.element,Ts(e,t),qo(t,a,null,n);var u=t.memoizedState;if(a=u.cache,ja(t,Qt,a),a!==o.cache&&Cs(t,[Qt],n,!0),jo(),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=kf(e,t,a,n);break e}else if(a!==l){l=Yn(Error(d(424)),t),Oo(l),t=kf(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,Ot=Qn(e.firstChild),sn=t,et=!0,Ua=null,Vn=!0,n=yd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(gl(),a===l){t=wa(e,t,n);break e}un(e,t,a,n)}t=t.child}return t;case 26:return lr(e,t),e===null?(n=jh(t.type,null,t.pendingProps,null))?t.memoizedState=n:et||(n=t.type,e=t.pendingProps,a=Sr(Ee.current).createElement(n),a[Bt]=t,a[Xt]=e,dn(a,n,e),xe(a),t.stateNode=a):t.memoizedState=jh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return an(t),e===null&&et&&(a=t.stateNode=Bh(t.type,t.pendingProps,Ee.current),sn=t,Vn=!0,l=Ot,Ia(t.type)?(Gc=l,Ot=Qn(a.firstChild)):Ot=l),un(e,t,t.pendingProps.children,n),lr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&et&&((l=a=Ot)&&(a=_g(a,t.type,t.pendingProps,Vn),a!==null?(t.stateNode=a,sn=t,Ot=Qn(a.firstChild),Vn=!1,l=!0):l=!1),l||Na(t)),an(t),l=t.type,o=t.pendingProps,u=e!==null?e.memoizedProps:null,a=o.children,Uc(l,o)?a=null:u!==null&&Uc(l,u)&&(t.flags|=32),t.memoizedState!==null&&(l=Bs(e,t,$0,null,null,n),ii._currentValue=l),lr(e,t),un(e,t,a,n),t.child;case 6:return e===null&&et&&((e=n=Ot)&&(n=Hg(n,t.pendingProps,Vn),n!==null?(t.stateNode=n,sn=t,Ot=null,e=!0):e=!1),e||Na(t)),null;case 13:return zf(e,t,n);case 4:return mt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Sl(t,null,a,n):un(e,t,a,n),t.child;case 11:return mf(e,t,t.type,t.pendingProps,n);case 7:return un(e,t,t.pendingProps,n),t.child;case 8:return un(e,t,t.pendingProps.children,n),t.child;case 12:return un(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,ja(t,t.type,a.value),un(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,bl(t),l=cn(l),a=a(l),t.flags|=1,un(e,t,a,n),t.child;case 14:return bf(e,t,t.type,t.pendingProps,n);case 15:return yf(e,t,t.type,t.pendingProps,n);case 19:return Df(e,t,n);case 31:return ag(e,t,n);case 22:return vf(e,t,n,t.pendingProps);case 24:return bl(t),a=cn(Qt),e===null?(l=Ms(),l===null&&(l=At,o=ks(),l.pooledCache=o,o.refCount++,o!==null&&(l.pooledCacheLanes|=n),l=o),t.memoizedState={parent:a,cache:l},As(t),ja(t,Qt,l)):((e.lanes&n)!==0&&(Ts(e,t),qo(t,null,null,n),jo()),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),ja(t,Qt,a)):(a=o.cache,ja(t,Qt,a),a!==l.cache&&Cs(t,[Qt],n,!0))),un(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function Ca(e){e.flags|=4}function uc(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(th())e.flags|=8192;else throw xl=Xi,Ds}else e.flags&=-16777217}function Tf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Vh(t))if(th())e.flags|=8192;else throw xl=Xi,Ds}function ir(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ea():536870912,e.lanes|=t,Pl|=t)}function Qo(e,t){if(!et)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 _t(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 og(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 _t(t),null;case 1:return _t(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),va(Qt),Oe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ql(t)?Ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xs())),_t(t),null;case 26:var l=t.type,o=t.memoizedState;return e===null?(Ca(t),o!==null?(_t(t),Tf(t,o)):(_t(t),uc(t,l,null,a,n))):o?o!==e.memoizedState?(Ca(t),_t(t),Tf(t,o)):(_t(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Ca(t),_t(t),uc(t,l,e,a,n)),null;case 27:if($e(t),n=Ee.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Ca(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return _t(t),null}e=oe.current,ql(t)?rd(t):(e=Bh(l,a,n),t.stateNode=e,Ca(t))}return _t(t),null;case 5:if($e(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Ca(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return _t(t),null}if(o=oe.current,ql(t))rd(t);else{var u=Sr(Ee.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[Bt]=t,o[Xt]=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(dn(o,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Ca(t)}}return _t(t),uc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Ca(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(e=Ee.current,ql(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=sn,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[Bt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||zh(e.nodeValue,n)),e||Na(t,!0)}else e=Sr(e).createTextNode(a),e[Bt]=t,t.stateNode=e}return _t(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=ql(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[Bt]=t}else gl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;_t(t),e=!1}else n=xs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(On(t),t):(On(t),null);if((t.flags&128)!==0)throw Error(d(558))}return _t(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=ql(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[Bt]=t}else gl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;_t(t),l=!1}else l=xs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(On(t),t):(On(t),null)}return On(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ir(t,t.updateQueue),_t(t),null);case 4:return Oe(),e===null&&Lc(t.stateNode.containerInfo),_t(t),null;case 10:return va(t.type),_t(t),null;case 19:if(H(Vt),a=t.memoizedState,a===null)return _t(t),null;if(l=(t.flags&128)!==0,o=a.rendering,o===null)if(l)Qo(a,!1);else{if(Yt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Ki(e),o!==null){for(t.flags|=128,Qo(a,!1),e=o.updateQueue,t.updateQueue=e,ir(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)nd(n,e),n=n.sibling;return ae(Vt,Vt.current&1|2),et&&ba(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Lt()>dr&&(t.flags|=128,l=!0,Qo(a,!1),t.lanes=4194304)}else{if(!l)if(e=Ki(o),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,ir(t,e),Qo(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!et)return _t(t),null}else 2*Lt()-a.renderingStartTime>dr&&n!==536870912&&(t.flags|=128,l=!0,Qo(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=Lt(),e.sibling=null,n=Vt.current,ae(Vt,l?n&1|2:n&1),et&&ba(t,a.treeForkCount),e):(_t(t),null);case 22:case 23:return On(t),Os(),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&&(_t(t),t.subtreeFlags&6&&(t.flags|=8192)):_t(t),n=t.updateQueue,n!==null&&ir(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&&H(yl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),va(Qt),_t(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function ig(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 va(Qt),Oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return $e(t),null;case 31:if(t.memoizedState!==null){if(On(t),t.alternate===null)throw Error(d(340));gl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(On(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));gl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(Vt),null;case 4:return Oe(),null;case 10:return va(t.type),null;case 22:case 23:return On(t),Os(),e!==null&&H(yl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return va(Qt),null;case 25:return null;default:return null}}function Ef(e,t){switch(ys(t),t.tag){case 3:va(Qt),Oe();break;case 26:case 27:case 5:$e(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&On(t);break;case 13:On(t);break;case 19:H(Vt);break;case 10:va(t.type);break;case 22:case 23:On(t),Os(),e!==null&&H(yl);break;case 24:va(Qt)}}function Ko(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){wt(t,t.return,g)}}function Fa(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(G){wt(l,w,G)}}}a=a.next}while(a!==o)}}catch(G){wt(t,t.return,G)}}function Rf(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{xd(t,n)}catch(a){wt(e,e.return,a)}}}function Lf(e,t,n){n.props=Cl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){wt(e,t,a)}}function Zo(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){wt(e,t,l)}}function la(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){wt(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){wt(e,t,l)}else n.current=null}function Of(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){wt(e,e.return,l)}}function dc(e,t,n){try{var a=e.stateNode;Ag(a,e.type,n,t),a[Xt]=t}catch(l){wt(e,e.return,l)}}function _f(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ia(e.type)||e.tag===4}function fc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_f(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&&Ia(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 hc(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=pa));else if(a!==4&&(a===27&&Ia(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(hc(e,t,n),e=e.sibling;e!==null;)hc(e,t,n),e=e.sibling}function rr(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&&Ia(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rr(e,t,n),e=e.sibling;e!==null;)rr(e,t,n),e=e.sibling}function Hf(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);dn(t,a,n),t[Bt]=e,t[Xt]=n}catch(o){wt(e,e.return,o)}}var ka=!1,$t=!1,pc=!1,Bf=typeof WeakSet=="function"?WeakSet:Set,ln=null;function rg(e,t){if(e=e.containerInfo,Hc=Ar,e=Ku(e),rs(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,G=0,Z=e,O=null;t:for(;;){for(var B;Z!==n||l!==0&&Z.nodeType!==3||(g=u+l),Z!==o||a!==0&&Z.nodeType!==3||(w=u+a),Z.nodeType===3&&(u+=Z.nodeValue.length),(B=Z.firstChild)!==null;)O=Z,Z=B;for(;;){if(Z===e)break t;if(O===n&&++R===l&&(g=u),O===o&&++G===a&&(w=u),(B=Z.nextSibling)!==null)break;Z=O,O=Z.parentNode}Z=B}n=g===-1||w===-1?null:{start:g,end:w}}else n=null}n=n||{start:0,end:0}}else n=null;for(Bc={focusedElem:e,selectionRange:n},Ar=!1,ln=t;ln!==null;)if(t=ln,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ln=e;else for(;ln!==null;){switch(t=ln,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,n=t,l=o.memoizedProps,o=o.memoizedState,a=n.stateNode;try{var ye=Cl(n.type,l);e=a.getSnapshotBeforeUpdate(ye,o),a.__reactInternalSnapshotBeforeUpdate=e}catch(Le){wt(n,n.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)jc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":jc(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,ln=e;break}ln=t.return}}function Uf(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Ma(e,n),a&4&&Ko(5,n);break;case 1:if(Ma(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(u){wt(n,n.return,u)}else{var l=Cl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){wt(n,n.return,u)}}a&64&&Rf(n),a&512&&Zo(n,n.return);break;case 3:if(Ma(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{xd(e,t)}catch(u){wt(n,n.return,u)}}break;case 27:t===null&&a&4&&Hf(n);case 26:case 5:Ma(e,n),t===null&&a&4&&Of(n),a&512&&Zo(n,n.return);break;case 12:Ma(e,n);break;case 31:Ma(e,n),a&4&&qf(e,n);break;case 13:Ma(e,n),a&4&&Yf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=mg.bind(null,n),Bg(e,n))));break;case 22:if(a=n.memoizedState!==null||ka,!a){t=t!==null&&t.memoizedState!==null||$t,l=ka;var o=$t;ka=a,($t=t)&&!o?Da(e,n,(n.subtreeFlags&8772)!==0):Ma(e,n),ka=l,$t=o}break;case 30:break;default:Ma(e,n)}}function Nf(e){var t=e.alternate;t!==null&&(e.alternate=null,Nf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&So(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ut=null,Cn=!1;function za(e,t,n){for(n=n.child;n!==null;)jf(e,t,n),n=n.sibling}function jf(e,t,n){if(Ae&&typeof Ae.onCommitFiberUnmount=="function")try{Ae.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:$t||la(n,t),za(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$t||la(n,t);var a=Ut,l=Cn;Ia(n.type)&&(Ut=n.stateNode,Cn=!1),za(e,t,n),ai(n.stateNode),Ut=a,Cn=l;break;case 5:$t||la(n,t);case 6:if(a=Ut,l=Cn,Ut=null,za(e,t,n),Ut=a,Cn=l,Ut!==null)if(Cn)try{(Ut.nodeType===9?Ut.body:Ut.nodeName==="HTML"?Ut.ownerDocument.body:Ut).removeChild(n.stateNode)}catch(o){wt(n,t,o)}else try{Ut.removeChild(n.stateNode)}catch(o){wt(n,t,o)}break;case 18:Ut!==null&&(Cn?(e=Ut,Rh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ro(e)):Rh(Ut,n.stateNode));break;case 4:a=Ut,l=Cn,Ut=n.stateNode.containerInfo,Cn=!0,za(e,t,n),Ut=a,Cn=l;break;case 0:case 11:case 14:case 15:Fa(2,n,t),$t||Fa(4,n,t),za(e,t,n);break;case 1:$t||(la(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Lf(n,t,a)),za(e,t,n);break;case 21:za(e,t,n);break;case 22:$t=(a=$t)||n.memoizedState!==null,za(e,t,n),$t=a;break;default:za(e,t,n)}}function qf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ro(e)}catch(n){wt(t,t.return,n)}}}function Yf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ro(e)}catch(n){wt(t,t.return,n)}}function sg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Bf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Bf),t;default:throw Error(d(435,e.tag))}}function sr(e,t){var n=sg(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=bg.bind(null,e,a);a.then(l,l)}})}function kn(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(Ia(g.type)){Ut=g.stateNode,Cn=!1;break e}break;case 5:Ut=g.stateNode,Cn=!1;break e;case 3:case 4:Ut=g.stateNode.containerInfo,Cn=!0;break e}g=g.return}if(Ut===null)throw Error(d(160));jf(o,u,l),Ut=null,Cn=!1,o=l.alternate,o!==null&&(o.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Gf(t,e),t=t.sibling}var Jn=null;function Gf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:kn(t,e),zn(e),a&4&&(Fa(3,e,e.return),Ko(3,e),Fa(5,e,e.return));break;case 1:kn(t,e),zn(e),a&512&&($t||n===null||la(n,n.return)),a&64&&ka&&(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(kn(t,e),zn(e),a&512&&($t||n===null||la(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[cl]||o[Bt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=l.createElement(a),l.head.insertBefore(o,l.querySelector("head > title"))),dn(o,a,n),o[Bt]=e,xe(o),a=o;break e;case"link":var u=Gh("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),dn(o,a,n),l.head.appendChild(o);break;case"meta":if(u=Gh("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),dn(o,a,n),l.head.appendChild(o);break;default:throw Error(d(468,a))}o[Bt]=e,xe(o),a=o}e.stateNode=a}else Xh(l,e.type,e.stateNode);else e.stateNode=Yh(l,a,e.memoizedProps);else o!==a?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,a===null?Xh(l,e.type,e.stateNode):Yh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&dc(e,e.memoizedProps,n.memoizedProps)}break;case 27:kn(t,e),zn(e),a&512&&($t||n===null||la(n,n.return)),n!==null&&a&4&&dc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(kn(t,e),zn(e),a&512&&($t||n===null||la(n,n.return)),e.flags&32){l=e.stateNode;try{El(l,"")}catch(ye){wt(e,e.return,ye)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,dc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(pc=!0);break;case 6:if(kn(t,e),zn(e),a&4){if(e.stateNode===null)throw Error(d(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ye){wt(e,e.return,ye)}}break;case 3:if(kr=null,l=Jn,Jn=wr(t.containerInfo),kn(t,e),Jn=l,zn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{ro(t.containerInfo)}catch(ye){wt(e,e.return,ye)}pc&&(pc=!1,Xf(e));break;case 4:a=Jn,Jn=wr(e.stateNode.containerInfo),kn(t,e),zn(e),Jn=a;break;case 12:kn(t,e),zn(e);break;case 31:kn(t,e),zn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,sr(e,a)));break;case 13:kn(t,e),zn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ur=Lt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,sr(e,a)));break;case 22:l=e.memoizedState!==null;var w=n!==null&&n.memoizedState!==null,R=ka,G=$t;if(ka=R||l,$t=G||w,kn(t,e),$t=G,ka=R,zn(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||w||ka||$t||kl(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 Z=w.memoizedProps.style,O=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;g.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(ye){wt(w,w.return,ye)}}}else if(t.tag===6){if(n===null){w=t;try{w.stateNode.nodeValue=l?"":w.memoizedProps}catch(ye){wt(w,w.return,ye)}}}else if(t.tag===18){if(n===null){w=t;try{var B=w.stateNode;l?Lh(B,!0):Lh(w.stateNode,!1)}catch(ye){wt(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,sr(e,n))));break;case 19:kn(t,e),zn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,sr(e,a)));break;case 30:break;case 21:break;default:kn(t,e),zn(e)}}function zn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(_f(a)){n=a;break}a=a.return}if(n==null)throw Error(d(160));switch(n.tag){case 27:var l=n.stateNode,o=fc(e);rr(e,o,l);break;case 5:var u=n.stateNode;n.flags&32&&(El(u,""),n.flags&=-33);var g=fc(e);rr(e,g,u);break;case 3:case 4:var w=n.stateNode.containerInfo,R=fc(e);hc(e,R,w);break;default:throw Error(d(161))}}catch(G){wt(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Xf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ma(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Uf(e,t.alternate,t),t=t.sibling}function kl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Fa(4,t,t.return),kl(t);break;case 1:la(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Lf(t,t.return,n),kl(t);break;case 27:ai(t.stateNode);case 26:case 5:la(t,t.return),kl(t);break;case 22:t.memoizedState===null&&kl(t);break;case 30:kl(t);break;default:kl(t)}e=e.sibling}}function Da(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:Da(l,o,n),Ko(4,o);break;case 1:if(Da(l,o,n),a=o,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(R){wt(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++)vd(w[l],g)}catch(R){wt(a,a.return,R)}}n&&u&64&&Rf(o),Zo(o,o.return);break;case 27:Hf(o);case 26:case 5:Da(l,o,n),n&&a===null&&u&4&&Of(o),Zo(o,o.return);break;case 12:Da(l,o,n);break;case 31:Da(l,o,n),n&&u&4&&qf(l,o);break;case 13:Da(l,o,n),n&&u&4&&Yf(l,o);break;case 22:o.memoizedState===null&&Da(l,o,n),Zo(o,o.return);break;case 30:break;default:Da(l,o,n)}t=t.sibling}}function gc(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&&_o(n))}function mc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_o(e))}function Wn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Vf(e,t,n,a),t=t.sibling}function Vf(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Wn(e,t,n,a),l&2048&&Ko(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&&_o(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){wt(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):$o(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&&gc(u,t);break;case 24:Wn(e,t,n,a),l&2048&&mc(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),Ko(8,u);break;case 23:break;case 22:var G=u.stateNode;u.memoizedState!==null?G._visibility&2?Jl(o,u,g,w,l):$o(o,u):(G._visibility|=2,Jl(o,u,g,w,l)),l&&R&2048&&gc(u.alternate,u);break;case 24:Jl(o,u,g,w,l),l&&R&2048&&mc(u.alternate,u);break;default:Jl(o,u,g,w,l)}t=t.sibling}}function $o(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:$o(n,a),l&2048&&gc(a.alternate,a);break;case 24:$o(n,a),l&2048&&mc(a.alternate,a);break;default:$o(n,a)}t=t.sibling}}var Jo=8192;function Wl(e,t,n){if(e.subtreeFlags&Jo)for(e=e.child;e!==null;)Ff(e,t,n),e=e.sibling}function Ff(e,t,n){switch(e.tag){case 26:Wl(e,t,n),e.flags&Jo&&e.memoizedState!==null&&Zg(n,Jn,e.memoizedState,e.memoizedProps);break;case 5:Wl(e,t,n);break;case 3:case 4:var a=Jn;Jn=wr(e.stateNode.containerInfo),Wl(e,t,n),Jn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Jo,Jo=16777216,Wl(e,t,n),Jo=a):Wl(e,t,n));break;default:Wl(e,t,n)}}function Qf(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 Wo(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];ln=a,Zf(a,e)}Qf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Kf(e),e=e.sibling}function Kf(e){switch(e.tag){case 0:case 11:case 15:Wo(e),e.flags&2048&&Fa(9,e,e.return);break;case 3:Wo(e);break;case 12:Wo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cr(e)):Wo(e);break;default:Wo(e)}}function cr(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];ln=a,Zf(a,e)}Qf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Fa(8,t,t.return),cr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,cr(t));break;default:cr(t)}e=e.sibling}}function Zf(e,t){for(;ln!==null;){var n=ln;switch(n.tag){case 0:case 11:case 15:Fa(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:_o(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,ln=a;else e:for(n=e;ln!==null;){a=ln;var l=a.sibling,o=a.return;if(Nf(a),a===n){ln=null;break e}if(l!==null){l.return=o,ln=l;break e}ln=o}}}var cg={getCacheForType:function(e){var t=cn(Qt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return cn(Qt).controller.signal}},ug=typeof WeakMap=="function"?WeakMap:Map,ht=0,At=null,Je=null,Ie=0,St=0,_n=null,Qa=!1,Il=!1,bc=!1,Aa=0,Yt=0,Ka=0,zl=0,yc=0,Hn=0,Pl=0,Io=null,Mn=null,vc=!1,ur=0,$f=0,dr=1/0,fr=null,Za=null,nn=0,$a=null,eo=null,Ta=0,xc=0,Sc=null,Jf=null,Po=0,wc=null;function Bn(){return(ht&2)!==0&&Ie!==0?Ie&-Ie:T.T!==null?Ac():wi()}function Wf(){if(Hn===0)if((Ie&536870912)===0||et){var e=U;U<<=1,(U&3932160)===0&&(U=262144),Hn=e}else Hn=536870912;return e=Ln.current,e!==null&&(e.flags|=32),Hn}function Dn(e,t,n){(e===At&&(St===2||St===9)||e.cancelPendingCommit!==null)&&(to(e,0),Ja(e,Ie,Hn,!1)),dt(e,n),((ht&2)===0||e!==At)&&(e===At&&((ht&2)===0&&(zl|=n),Yt===4&&Ja(e,Ie,Hn,!1)),oa(e))}function If(e,t,n){if((ht&6)!==0)throw Error(d(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||lt(e,t),l=a?hg(e,t):kc(e,t,!0),o=a;do{if(l===0){Il&&!a&&Ja(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!dg(n)){l=kc(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=Io;var w=g.current.memoizedState.isDehydrated;if(w&&(to(g,u).flags|=256),u=kc(g,u,!1),u!==2){if(bc&&!w){g.errorRecoveryDisabledLanes|=o,zl|=o,l=4;break e}o=Mn,Mn=l,o!==null&&(Mn===null?Mn=o:Mn.push.apply(Mn,o))}l=u}if(o=!1,l!==2)continue}}if(l===1){to(e,0),Ja(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:Ja(a,t,Hn,!Qa);break e;case 2:Mn=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(l=ur+300-Lt(),10<l)){if(Ja(a,t,Hn,!Qa),Ze(a,0,!0)!==0)break e;Ta=t,a.timeoutHandle=Th(Pf.bind(null,a,n,Mn,fr,vc,t,Hn,zl,Pl,Qa,o,"Throttled",-0,0),l);break e}Pf(a,n,Mn,fr,vc,t,Hn,zl,Pl,Qa,o,null,-0,0)}}break}while(!0);oa(e)}function Pf(e,t,n,a,l,o,u,g,w,R,G,Z,O,B){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pa},Ff(t,o,Z);var ye=(o&62914560)===o?ur-Lt():(o&4194048)===o?$f-Lt():0;if(ye=$g(Z,ye),ye!==null){Ta=o,e.cancelPendingCommit=ye(rh.bind(null,e,t,o,n,a,l,u,g,w,G,Z,null,O,B)),Ja(e,o,u,!R);return}}rh(e,t,o,n,a,l,u,g,w)}function dg(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(!En(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 Ja(e,t,n,a){t&=~yc,t&=~zl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var o=31-xt(l),u=1<<o;a[o]=-1,l&=~u}n!==0&&xi(e,n,t)}function hr(){return(ht&6)===0?(ei(0),!1):!0}function Cc(){if(Je!==null){if(St===0)var e=Je.return;else e=Je,ya=ml=null,js(e),Fl=null,Bo=0,e=Je;for(;e!==null;)Ef(e.alternate,e),e=e.return;Je=null}}function to(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Rg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ta=0,Cc(),At=e,Je=n=ma(e.current,null),Ie=t,St=0,_n=null,Qa=!1,Il=lt(e,t),bc=!1,Pl=Hn=yc=zl=Ka=Yt=0,Mn=Io=null,vc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-xt(a),o=1<<l;t|=e[l],a&=~o}return Aa=t,_i(),n}function eh(e,t){Qe=null,T.H=Vo,t===Vl||t===Gi?(t=gd(),St=3):t===Ds?(t=gd(),St=4):St=t===tc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,_n=t,Je===null&&(Yt=1,nr(e,Yn(t,e.current)))}function th(){var e=Ln.current;return e===null?!0:(Ie&4194048)===Ie?Fn===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?e===Fn:!1}function nh(){var e=T.H;return T.H=Vo,e===null?Vo:e}function ah(){var e=T.A;return T.A=cg,e}function pr(){Yt=4,Qa||(Ie&4194048)!==Ie&&Ln.current!==null||(Il=!0),(Ka&134217727)===0&&(zl&134217727)===0||At===null||Ja(At,Ie,Hn,!1)}function kc(e,t,n){var a=ht;ht|=2;var l=nh(),o=ah();(At!==e||Ie!==t)&&(fr=null,to(e,t)),t=!1;var u=Yt;e:do try{if(St!==0&&Je!==null){var g=Je,w=_n;switch(St){case 8:Cc(),u=6;break e;case 3:case 2:case 9:case 6:Ln.current===null&&(t=!0);var R=St;if(St=0,_n=null,no(e,g,w,R),n&&Il){u=0;break e}break;default:R=St,St=0,_n=null,no(e,g,w,R)}}fg(),u=Yt;break}catch(G){eh(e,G)}while(!0);return t&&e.shellSuspendCounter++,ya=ml=null,ht=a,T.H=l,T.A=o,Je===null&&(At=null,Ie=0,_i()),u}function fg(){for(;Je!==null;)lh(Je)}function hg(e,t){var n=ht;ht|=2;var a=nh(),l=ah();At!==e||Ie!==t?(fr=null,dr=Lt()+500,to(e,t)):Il=lt(e,t);e:do try{if(St!==0&&Je!==null){t=Je;var o=_n;t:switch(St){case 1:St=0,_n=null,no(e,t,o,1);break;case 2:case 9:if(hd(o)){St=0,_n=null,oh(t);break}t=function(){St!==2&&St!==9||At!==e||(St=7),oa(e)},o.then(t,t);break e;case 3:St=7;break e;case 4:St=5;break e;case 7:hd(o)?(St=0,_n=null,oh(t)):(St=0,_n=null,no(e,t,o,7));break;case 5:var u=null;switch(Je.tag){case 26:u=Je.memoizedState;case 5:case 27:var g=Je;if(u?Vh(u):g.stateNode.complete){St=0,_n=null;var w=g.sibling;if(w!==null)Je=w;else{var R=g.return;R!==null?(Je=R,gr(R)):Je=null}break t}}St=0,_n=null,no(e,t,o,5);break;case 6:St=0,_n=null,no(e,t,o,6);break;case 8:Cc(),Yt=6;break e;default:throw Error(d(462))}}pg();break}catch(G){eh(e,G)}while(!0);return ya=ml=null,T.H=a,T.A=l,ht=n,Je!==null?0:(At=null,Ie=0,_i(),Yt)}function pg(){for(;Je!==null&&!at();)lh(Je)}function lh(e){var t=Af(e.alternate,e,Aa);e.memoizedProps=e.pendingProps,t===null?gr(e):Je=t}function oh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=wf(n,t,t.pendingProps,t.type,void 0,Ie);break;case 11:t=wf(n,t,t.pendingProps,t.type.render,t.ref,Ie);break;case 5:js(t);default:Ef(n,t),t=Je=nd(t,Aa),t=Af(n,t,Aa)}e.memoizedProps=e.pendingProps,t===null?gr(e):Je=t}function no(e,t,n,a){ya=ml=null,js(t),Fl=null,Bo=0;var l=t.return;try{if(ng(e,l,t,n,Ie)){Yt=1,nr(e,Yn(n,e.current)),Je=null;return}}catch(o){if(l!==null)throw Je=l,o;Yt=1,nr(e,Yn(n,e.current)),Je=null;return}t.flags&32768?(et||a===1?e=!0:Il||(Ie&536870912)!==0?e=!1:(Qa=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ln.current,a!==null&&a.tag===13&&(a.flags|=16384))),ih(t,e)):gr(t)}function gr(e){var t=e;do{if((t.flags&32768)!==0){ih(t,Qa);return}e=t.return;var n=og(t.alternate,t,Aa);if(n!==null){Je=n;return}if(t=t.sibling,t!==null){Je=t;return}Je=t=e}while(t!==null);Yt===0&&(Yt=5)}function ih(e,t){do{var n=ig(e.alternate,e);if(n!==null){n.flags&=32767,Je=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Je=e;return}Je=e=n}while(e!==null);Yt=6,Je=null}function rh(e,t,n,a,l,o,u,g,w){e.cancelPendingCommit=null;do mr();while(nn!==0);if((ht&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(o=t.lanes|t.childLanes,o|=fs,ft(e,n,o,u,g,w),e===At&&(Je=At=null,Ie=0),eo=t,$a=e,Ta=n,xc=o,Sc=l,Jf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,yg(Sn,function(){return fh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=T.T,T.T=null,l=I.p,I.p=2,u=ht,ht|=4;try{rg(e,t,n)}finally{ht=u,I.p=l,T.T=a}}nn=1,sh(),ch(),uh()}}function sh(){if(nn===1){nn=0;var e=$a,t=eo,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=T.T,T.T=null;var a=I.p;I.p=2;var l=ht;ht|=4;try{Gf(t,e);var o=Bc,u=Ku(e.containerInfo),g=o.focusedElem,w=o.selectionRange;if(u!==g&&g&&g.ownerDocument&&Qu(g.ownerDocument.documentElement,g)){if(w!==null&&rs(g)){var R=w.start,G=w.end;if(G===void 0&&(G=R),"selectionStart"in g)g.selectionStart=R,g.selectionEnd=Math.min(G,g.value.length);else{var Z=g.ownerDocument||document,O=Z&&Z.defaultView||window;if(O.getSelection){var B=O.getSelection(),ye=g.textContent.length,Le=Math.min(w.start,ye),Dt=w.end===void 0?Le:Math.min(w.end,ye);!B.extend&&Le>Dt&&(u=Dt,Dt=Le,Le=u);var M=Fu(g,Le),k=Fu(g,Dt);if(M&&k&&(B.rangeCount!==1||B.anchorNode!==M.node||B.anchorOffset!==M.offset||B.focusNode!==k.node||B.focusOffset!==k.offset)){var E=Z.createRange();E.setStart(M.node,M.offset),B.removeAllRanges(),Le>Dt?(B.addRange(E),B.extend(k.node,k.offset)):(E.setEnd(k.node,k.offset),B.addRange(E))}}}}for(Z=[],B=g;B=B.parentNode;)B.nodeType===1&&Z.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<Z.length;g++){var Q=Z[g];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}Ar=!!Hc,Bc=Hc=null}finally{ht=l,I.p=a,T.T=n}}e.current=t,nn=2}}function ch(){if(nn===2){nn=0;var e=$a,t=eo,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=T.T,T.T=null;var a=I.p;I.p=2;var l=ht;ht|=4;try{Uf(e,t.alternate,t)}finally{ht=l,I.p=a,T.T=n}}nn=3}}function uh(){if(nn===4||nn===3){nn=0,ze();var e=$a,t=eo,n=Ta,a=Jf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?nn=5:(nn=0,eo=$a=null,dh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(Za=null),vo(n),t=t.stateNode,Ae&&typeof Ae.onCommitFiberRoot=="function")try{Ae.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=T.T,l=I.p,I.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,I.p=l}}(Ta&3)!==0&&mr(),oa(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===wc?Po++:(Po=0,wc=e):Po=0,ei(0)}}function dh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_o(t)))}function mr(){return sh(),ch(),uh(),fh()}function fh(){if(nn!==5)return!1;var e=$a,t=xc;xc=0;var n=vo(Ta),a=T.T,l=I.p;try{I.p=32>n?32:n,T.T=null,n=Sc,Sc=null;var o=$a,u=Ta;if(nn=0,eo=$a=null,Ta=0,(ht&6)!==0)throw Error(d(331));var g=ht;if(ht|=4,Kf(o.current),Vf(o,o.current,u,n),ht=g,ei(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot=="function")try{Ae.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{I.p=l,T.T=a,dh(e,t)}}function hh(e,t,n){t=Yn(n,t),t=ec(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(dt(e,2),oa(e))}function wt(e,t,n){if(e.tag===3)hh(e,e,n);else for(;t!==null;){if(t.tag===3){hh(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Za===null||!Za.has(a))){e=Yn(n,e),n=pf(2),a=Ga(t,n,2),a!==null&&(gf(n,a,t,e),dt(a,2),oa(a));break}}t=t.return}}function zc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new ug;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)||(bc=!0,l.add(n),e=gg.bind(null,e,t,n),t.then(e,e))}function gg(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,At===e&&(Ie&n)===n&&(Yt===4||Yt===3&&(Ie&62914560)===Ie&&300>Lt()-ur?(ht&2)===0&&to(e,0):yc|=n,Pl===Ie&&(Pl=0)),oa(e)}function ph(e,t){t===0&&(t=ea()),e=hl(e,t),e!==null&&(dt(e,t),oa(e))}function mg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ph(e,n)}function bg(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),ph(e,n)}function yg(e,t){return bt(e,t)}var br=null,ao=null,Mc=!1,yr=!1,Dc=!1,Wa=0;function oa(e){e!==ao&&e.next===null&&(ao===null?br=ao=e:ao=ao.next=e),yr=!0,Mc||(Mc=!0,xg())}function ei(e,t){if(!Dc&&yr){Dc=!0;do for(var n=!1,a=br;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-xt(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=Ie,o=Ze(a,a===At?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(o&3)===0||lt(a,o)||(n=!0,yh(a,o));a=a.next}while(n);Dc=!1}}function vg(){gh()}function gh(){yr=Mc=!1;var e=0;Wa!==0&&Eg()&&(e=Wa);for(var t=Lt(),n=null,a=br;a!==null;){var l=a.next,o=mh(a,t);o===0?(a.next=null,n===null?br=l:n.next=l,l===null&&(ao=n)):(n=a,(e!==0||(o&3)!==0)&&(yr=!0)),a=l}nn!==0&&nn!==5||ei(e),Wa!==0&&(Wa=0)}function mh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var u=31-xt(o),g=1<<u,w=l[u];w===-1?((g&n)===0||(g&a)!==0)&&(l[u]=Pn(g,t)):w<=t&&(e.expiredLanes|=g),o&=~g}if(t=At,n=Ie,n=Ze(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(St===2||St===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Rt(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||lt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Rt(a),vo(n)){case 2:case 8:n=xn;break;case 32:n=Sn;break;case 268435456:n=ue;break;default:n=Sn}return a=bh.bind(null,e),n=bt(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Rt(a),e.callbackPriority=2,e.callbackNode=null,2}function bh(e,t){if(nn!==0&&nn!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(mr()&&e.callbackNode!==n)return null;var a=Ie;return a=Ze(e,e===At?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(If(e,a,t),mh(e,Lt()),e.callbackNode!=null&&e.callbackNode===n?bh.bind(null,e):null)}function yh(e,t){if(mr())return null;If(e,t,!0)}function xg(){Lg(function(){(ht&6)!==0?bt(rn,vg):gh()})}function Ac(){if(Wa===0){var e=Gl;e===0&&(e=ua,ua<<=1,(ua&261888)===0&&(ua=256)),Wa=e}return Wa}function vh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Mi(""+e)}function xh(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 Sg(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var o=vh((l[Xt]||null).action),u=a.submitter;u&&(t=(t=u[Xt]||null)?vh(t.formAction):u.getAttribute("formAction"),t!==null&&(o=t,u=null));var g=new Ei("action","action",null,a,l);e.push({event:g,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Wa!==0){var w=u?xh(l,u):new FormData(l);Zs(n,{pending:!0,data:w,method:l.method,action:o},null,w)}}else typeof o=="function"&&(g.preventDefault(),w=u?xh(l,u):new FormData(l),Zs(n,{pending:!0,data:w,method:l.method,action:o},o,w))},currentTarget:l}]})}}for(var Tc=0;Tc<ds.length;Tc++){var Ec=ds[Tc],wg=Ec.toLowerCase(),Cg=Ec[0].toUpperCase()+Ec.slice(1);$n(wg,"on"+Cg)}$n(Ju,"onAnimationEnd"),$n(Wu,"onAnimationIteration"),$n(Iu,"onAnimationStart"),$n("dblclick","onDoubleClick"),$n("focusin","onFocus"),$n("focusout","onBlur"),$n(j0,"onTransitionRun"),$n(q0,"onTransitionStart"),$n(Y0,"onTransitionCancel"),$n(Pu,"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 ti="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(" "),kg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ti));function Sh(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(G){Oi(G)}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(G){Oi(G)}l.currentTarget=null,o=w}}}}function We(e,t){var n=t[Al];n===void 0&&(n=t[Al]=new Set);var a=e+"__bubble";n.has(a)||(wh(t,e,2,!1),n.add(a))}function Rc(e,t,n){var a=0;t&&(a|=4),wh(n,e,a,t)}var vr="_reactListening"+Math.random().toString(36).slice(2);function Lc(e){if(!e[vr]){e[vr]=!0,_e.forEach(function(n){n!=="selectionchange"&&(kg.has(n)||Rc(n,!1,e),Rc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vr]||(t[vr]=!0,Rc("selectionchange",!1,t))}}function wh(e,t,n,a){switch(Wh(t)){case 2:var l=Ig;break;case 8:l=Pg;break;default:l=Kc}n=l.bind(null,t,n,e),l=void 0,!Ir||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 Oc(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=fa(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}Mu(function(){var R=o,G=Jr(n),Z=[];e:{var O=ed.get(e);if(O!==void 0){var B=Ei,ye=e;switch(e){case"keypress":if(Ai(n)===0)break e;case"keydown":case"keyup":B=b0;break;case"focusin":ye="focus",B=ns;break;case"focusout":ye="blur",B=ns;break;case"beforeblur":case"afterblur":B=ns;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=Tu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=o0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=x0;break;case Ju:case Wu:case Iu:B=s0;break;case Pu:B=w0;break;case"scroll":case"scrollend":B=a0;break;case"wheel":B=k0;break;case"copy":case"cut":case"paste":B=u0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Ru;break;case"toggle":case"beforetoggle":B=M0}var Le=(t&4)!==0,Dt=!Le&&(e==="scroll"||e==="scrollend"),M=Le?O!==null?O+"Capture":null:O;Le=[];for(var k=R,E;k!==null;){var Q=k;if(E=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||E===null||M===null||(Q=Co(k,M),Q!=null&&Le.push(ni(k,Q,E))),Dt)break;k=k.return}0<Le.length&&(O=new B(O,ye,null,n,G),Z.push({event:O,listeners:Le}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",O&&n!==$r&&(ye=n.relatedTarget||n.fromElement)&&(fa(ye)||ye[Tn]))break e;if((B||O)&&(O=G.window===G?G:(O=G.ownerDocument)?O.defaultView||O.parentWindow:window,B?(ye=n.relatedTarget||n.toElement,B=R,ye=ye?fa(ye):null,ye!==null&&(Dt=p(ye),Le=ye.tag,ye!==Dt||Le!==5&&Le!==27&&Le!==6)&&(ye=null)):(B=null,ye=R),B!==ye)){if(Le=Tu,Q="onMouseLeave",M="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(Le=Ru,Q="onPointerLeave",M="onPointerEnter",k="pointer"),Dt=B==null?O:ce(B),E=ye==null?O:ce(ye),O=new Le(Q,k+"leave",B,n,G),O.target=Dt,O.relatedTarget=E,Q=null,fa(G)===R&&(Le=new Le(M,k+"enter",ye,n,G),Le.target=E,Le.relatedTarget=Dt,Q=Le),Dt=Q,B&&ye)t:{for(Le=zg,M=B,k=ye,E=0,Q=M;Q;Q=Le(Q))E++;Q=0;for(var Te=k;Te;Te=Le(Te))Q++;for(;0<E-Q;)M=Le(M),E--;for(;0<Q-E;)k=Le(k),Q--;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&&Ch(Z,O,B,Le,!1),ye!==null&&Dt!==null&&Ch(Z,Dt,ye,Le,!0)}}e:{if(O=R?ce(R):window,B=O.nodeName&&O.nodeName.toLowerCase(),B==="select"||B==="input"&&O.type==="file")var st=ju;else if(Uu(O))if(qu)st=B0;else{st=_0;var ke=O0}else B=O.nodeName,!B||B.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?R&&Zr(R.elementType)&&(st=ju):st=H0;if(st&&(st=st(e,R))){Nu(Z,st,n,G);break e}ke&&ke(e,O,R),e==="focusout"&&R&&O.type==="number"&&R.memoizedProps.value!=null&&Kr(O,"number",O.value)}switch(ke=R?ce(R):window,e){case"focusin":(Uu(ke)||ke.contentEditable==="true")&&(_l=ke,ss=R,Ro=null);break;case"focusout":Ro=ss=_l=null;break;case"mousedown":cs=!0;break;case"contextmenu":case"mouseup":case"dragend":cs=!1,Zu(Z,n,G);break;case"selectionchange":if(N0)break;case"keydown":case"keyup":Zu(Z,n,G)}var Ke;if(ls)e:{switch(e){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else Ol?Hu(e,n)&&(Pe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Pe="onCompositionStart");Pe&&(Lu&&n.locale!=="ko"&&(Ol||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&Ol&&(Ke=Du()):(Ha=G,Pr="value"in Ha?Ha.value:Ha.textContent,Ol=!0)),ke=xr(R,Pe),0<ke.length&&(Pe=new Eu(Pe,e,null,n,G),Z.push({event:Pe,listeners:ke}),Ke?Pe.data=Ke:(Ke=Bu(n),Ke!==null&&(Pe.data=Ke)))),(Ke=A0?T0(e,n):E0(e,n))&&(Pe=xr(R,"onBeforeInput"),0<Pe.length&&(ke=new Eu("onBeforeInput","beforeinput",null,n,G),Z.push({event:ke,listeners:Pe}),ke.data=Ke)),Sg(Z,e,R,n,G)}Sh(Z,t)})}function ni(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xr(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=Co(e,n),l!=null&&a.unshift(ni(e,l,o)),l=Co(e,t),l!=null&&a.push(ni(e,l,o))),e.tag===3)return a;e=e.return}return[]}function zg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ch(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=Co(n,o),R!=null&&u.unshift(ni(n,R,w))):l||(R=Co(n,o),R!=null&&u.push(ni(n,R,w)))),n=n.return}u.length!==0&&e.push({event:t,listeners:u})}var Mg=/\r\n?/g,Dg=/\u0000|\uFFFD/g;function kh(e){return(typeof e=="string"?e:""+e).replace(Mg,`
|
|
9
|
-
`).replace(Dg,"")}function zh(e,t){return t=kh(t),kh(e)===t}function Mt(e,t,n,a,l,o){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||El(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&El(e,""+a);break;case"className":ki(e,"class",a);break;case"tabIndex":ki(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ki(e,n,a);break;case"style":ku(e,a,o);break;case"data":if(t!=="object"){ki(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=Mi(""+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"&&Mt(e,t,"name",l.name,l,null),Mt(e,t,"formEncType",l.formEncType,l,null),Mt(e,t,"formMethod",l.formMethod,l,null),Mt(e,t,"formTarget",l.formTarget,l,null)):(Mt(e,t,"encType",l.encType,l,null),Mt(e,t,"method",l.method,l,null),Mt(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Mi(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=pa);break;case"onScroll":a!=null&&We("scroll",e);break;case"onScrollEnd":a!=null&&We("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=Mi(""+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":We("beforetoggle",e),We("toggle",e),Ci(e,"popover",a);break;case"xlinkActuate":ha(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ha(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ha(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ha(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ha(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ha(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ha(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ha(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ha(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Ci(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=t0.get(n)||n,Ci(e,n,a))}}function _c(e,t,n,a,l,o){switch(n){case"style":ku(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"?El(e,a):(typeof a=="number"||typeof a=="bigint")&&El(e,""+a);break;case"onScroll":a!=null&&We("scroll",e);break;case"onScrollEnd":a!=null&&We("scrollend",e);break;case"onClick":a!=null&&(e.onclick=pa);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[Xt]||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,""):Ci(e,n,a)}}}function dn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",e),We("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:Mt(e,t,o,u,n,null)}}l&&Mt(e,t,"srcSet",n.srcSet,n,null),a&&Mt(e,t,"src",n.src,n,null);return;case"input":We("invalid",e);var g=o=u=l=null,w=null,R=null;for(a in n)if(n.hasOwnProperty(a)){var G=n[a];if(G!=null)switch(a){case"name":l=G;break;case"type":u=G;break;case"checked":w=G;break;case"defaultChecked":R=G;break;case"value":o=G;break;case"defaultValue":g=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(d(137,t));break;default:Mt(e,t,a,G,n,null)}}xu(e,o,g,w,R,u,l,!1);return;case"select":We("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:Mt(e,t,l,g,n,null)}t=o,n=u,e.multiple=!!a,t!=null?Tl(e,!!a,t,!1):n!=null&&Tl(e,!!a,n,!0);return;case"textarea":We("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:Mt(e,t,u,g,n,null)}wu(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":Mt(e,t,w,a,n,null));return;case"dialog":We("beforetoggle",e),We("toggle",e),We("cancel",e),We("close",e);break;case"iframe":case"object":We("load",e);break;case"video":case"audio":for(a=0;a<ti.length;a++)We(ti[a],e);break;case"image":We("error",e),We("load",e);break;case"details":We("toggle",e);break;case"embed":case"source":case"link":We("error",e),We("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:Mt(e,t,R,a,n,null)}return;default:if(Zr(t)){for(G in n)n.hasOwnProperty(G)&&(a=n[G],a!==void 0&&_c(e,t,G,a,n,void 0));return}}for(g in n)n.hasOwnProperty(g)&&(a=n[g],a!=null&&Mt(e,t,g,a,n,null))}function Ag(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,G=null;for(B in n){var Z=n[B];if(n.hasOwnProperty(B)&&Z!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":w=Z;default:a.hasOwnProperty(B)||Mt(e,t,B,null,a,Z)}}for(var O in a){var B=a[O];if(Z=n[O],a.hasOwnProperty(O)&&(B!=null||Z!=null))switch(O){case"type":o=B;break;case"name":l=B;break;case"checked":R=B;break;case"defaultChecked":G=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!==Z&&Mt(e,t,O,B,a,Z)}}Qr(e,u,g,w,R,G,o,l);return;case"select":B=u=g=O=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)||Mt(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":O=o;break;case"defaultValue":g=o;break;case"multiple":u=o;default:o!==w&&Mt(e,t,l,o,a,w)}t=g,n=u,a=B,O!=null?Tl(e,!!n,O,!1):!!a!=!!n&&(t!=null?Tl(e,!!n,t,!0):Tl(e,!!n,n?[]:"",!1));return;case"textarea":B=O=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:Mt(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":O=l;break;case"defaultValue":B=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(d(91));break;default:l!==o&&Mt(e,t,u,l,a,o)}Su(e,O,B);return;case"option":for(var ye in n)O=n[ye],n.hasOwnProperty(ye)&&O!=null&&!a.hasOwnProperty(ye)&&(ye==="selected"?e.selected=!1:Mt(e,t,ye,null,a,O));for(w in a)O=a[w],B=n[w],a.hasOwnProperty(w)&&O!==B&&(O!=null||B!=null)&&(w==="selected"?e.selected=O&&typeof O!="function"&&typeof O!="symbol":Mt(e,t,w,O,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)O=n[Le],n.hasOwnProperty(Le)&&O!=null&&!a.hasOwnProperty(Le)&&Mt(e,t,Le,null,a,O);for(R in a)if(O=a[R],B=n[R],a.hasOwnProperty(R)&&O!==B&&(O!=null||B!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(d(137,t));break;default:Mt(e,t,R,O,a,B)}return;default:if(Zr(t)){for(var Dt in n)O=n[Dt],n.hasOwnProperty(Dt)&&O!==void 0&&!a.hasOwnProperty(Dt)&&_c(e,t,Dt,void 0,a,O);for(G in a)O=a[G],B=n[G],!a.hasOwnProperty(G)||O===B||O===void 0&&B===void 0||_c(e,t,G,O,a,B);return}}for(var M in n)O=n[M],n.hasOwnProperty(M)&&O!=null&&!a.hasOwnProperty(M)&&Mt(e,t,M,null,a,O);for(Z in a)O=a[Z],B=n[Z],!a.hasOwnProperty(Z)||O===B||O==null&&B==null||Mt(e,t,Z,O,a,B)}function Mh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Tg(){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&&Mh(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 G=w.transferSize,Z=w.initiatorType;G&&Mh(Z)&&(w=w.responseEnd,u+=G*(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 Hc=null,Bc=null;function Sr(e){return e.nodeType===9?e:e.ownerDocument}function Dh(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 Ah(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 Uc(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 Nc=null;function Eg(){var e=window.event;return e&&e.type==="popstate"?e===Nc?!1:(Nc=e,!0):(Nc=null,!1)}var Th=typeof setTimeout=="function"?setTimeout:void 0,Rg=typeof clearTimeout=="function"?clearTimeout:void 0,Eh=typeof Promise=="function"?Promise:void 0,Lg=typeof queueMicrotask=="function"?queueMicrotask:typeof Eh<"u"?function(e){return Eh.resolve(null).then(e).catch(Og)}:Th;function Og(e){setTimeout(function(){throw e})}function Ia(e){return e==="head"}function Rh(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),ro(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")ai(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ai(n);for(var o=n.firstChild;o;){var u=o.nextSibling,g=o.nodeName;o[cl]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=u}}else n==="body"&&ai(e.ownerDocument.body);n=l}while(n);ro(t)}function Lh(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 jc(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":jc(n),So(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function _g(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[cl])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=Qn(e.nextSibling),e===null)break}return null}function Hg(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Qn(e.nextSibling),e===null))return null;return e}function Oh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qn(e.nextSibling),e===null))return null;return e}function qc(e){return e.data==="$?"||e.data==="$~"}function Yc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Bg(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 Qn(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 Gc=null;function _h(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Qn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Hh(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 Bh(e,t,n){switch(t=Sr(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 ai(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);So(e)}var Kn=new Map,Uh=new Set;function wr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ea=I.d;I.d={f:Ug,r:Ng,D:jg,C:qg,L:Yg,m:Gg,X:Vg,S:Xg,M:Fg};function Ug(){var e=Ea.f(),t=hr();return e||t}function Ng(e){var t=ge(e);t!==null&&t.tag===5&&t.type==="form"?Pd(t):Ea.r(e)}var lo=typeof document>"u"?null:document;function Nh(e,t,n){var a=lo;if(a&&typeof t=="string"&&t){var l=jn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Uh.has(l)||(Uh.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),dn(t,"link",e),xe(t),a.head.appendChild(t)))}}function jg(e){Ea.D(e),Nh("dns-prefetch",e,null)}function qg(e,t){Ea.C(e,t),Nh("preconnect",e,t)}function Yg(e,t,n){Ea.L(e,t,n);var a=lo;if(a&&e&&t){var l='link[rel="preload"][as="'+jn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+jn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+jn(n.imageSizes)+'"]')):l+='[href="'+jn(e)+'"]';var o=l;switch(t){case"style":o=oo(e);break;case"script":o=io(e)}Kn.has(o)||(e=z({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Kn.set(o,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(li(o))||t==="script"&&a.querySelector(oi(o))||(t=a.createElement("link"),dn(t,"link",e),xe(t),a.head.appendChild(t)))}}function Gg(e,t){Ea.m(e,t);var n=lo;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+jn(a)+'"][href="'+jn(e)+'"]',o=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=io(e)}if(!Kn.has(o)&&(e=z({rel:"modulepreload",href:e},t),Kn.set(o,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(oi(o)))return}a=n.createElement("link"),dn(a,"link",e),xe(a),n.head.appendChild(a)}}}function Xg(e,t,n){Ea.S(e,t,n);var a=lo;if(a&&e){var l=ve(a).hoistableStyles,o=oo(e);t=t||"default";var u=l.get(o);if(!u){var g={loading:0,preload:null};if(u=a.querySelector(li(o)))g.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Kn.get(o))&&Xc(e,n);var w=u=a.createElement("link");xe(w),dn(w,"link",e),w._p=new Promise(function(R,G){w.onload=R,w.onerror=G}),w.addEventListener("load",function(){g.loading|=1}),w.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Cr(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:g},l.set(o,u)}}}function Vg(e,t){Ea.X(e,t);var n=lo;if(n&&e){var a=ve(n).hoistableScripts,l=io(e),o=a.get(l);o||(o=n.querySelector(oi(l)),o||(e=z({src:e,async:!0},t),(t=Kn.get(l))&&Vc(e,t),o=n.createElement("script"),xe(o),dn(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Fg(e,t){Ea.M(e,t);var n=lo;if(n&&e){var a=ve(n).hoistableScripts,l=io(e),o=a.get(l);o||(o=n.querySelector(oi(l)),o||(e=z({src:e,async:!0,type:"module"},t),(t=Kn.get(l))&&Vc(e,t),o=n.createElement("script"),xe(o),dn(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function jh(e,t,n,a){var l=(l=Ee.current)?wr(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=oo(n.href),n=ve(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=oo(n.href);var o=ve(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(li(e)))&&!o._p&&(u.instance=o,u.state.loading=5),Kn.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},Kn.set(e,n),o||Qg(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=io(n),n=ve(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 oo(e){return'href="'+jn(e)+'"'}function li(e){return'link[rel="stylesheet"]['+e+"]"}function qh(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function Qg(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}),dn(t,"link",n),xe(t),e.head.appendChild(t))}function io(e){return'[src="'+jn(e)+'"]'}function oi(e){return"script[async]"+e}function Yh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+jn(n.href)+'"]');if(a)return t.instance=a,xe(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"),xe(a),dn(a,"style",l),Cr(a,n.precedence,e),t.instance=a;case"stylesheet":l=oo(n.href);var o=e.querySelector(li(l));if(o)return t.state.loading|=4,t.instance=o,xe(o),o;a=qh(n),(l=Kn.get(l))&&Xc(a,l),o=(e.ownerDocument||e).createElement("link"),xe(o);var u=o;return u._p=new Promise(function(g,w){u.onload=g,u.onerror=w}),dn(o,"link",a),t.state.loading|=4,Cr(o,n.precedence,e),t.instance=o;case"script":return o=io(n.src),(l=e.querySelector(oi(o)))?(t.instance=l,xe(l),l):(a=n,(l=Kn.get(o))&&(a=z({},n),Vc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),xe(l),dn(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,Cr(a,n.precedence,e));return t.instance}function Cr(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 Xc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var kr=null;function Gh(e,t,n){if(kr===null){var a=new Map,l=kr=new Map;l.set(n,a)}else l=kr,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[cl]||o[Bt]||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 Xh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Kg(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 Vh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Zg(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=oo(a.href),o=t.querySelector(li(l));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=zr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,xe(o);return}o=t.ownerDocument||t,a=qh(a),(l=Kn.get(l))&&Xc(a,l),o=o.createElement("link"),xe(o);var u=o;u._p=new Promise(function(g,w){u.onload=g,u.onerror=w}),dn(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=zr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Fc=0;function $g(e,t){return e.stylesheets&&e.count===0&&Dr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Dr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Fc===0&&(Fc=62500*Tg());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Dr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Fc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function zr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Dr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mr=null;function Dr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mr=new Map,t.forEach(Jg,e),Mr=null,zr.call(e))}function Jg(e,t){if(!(t.state.loading&4)){var n=Mr.get(e);if(n)var a=n.get(null);else{n=new Map,Mr.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=zr.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 ii={$$typeof:V,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_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 Fh(e,t,n,a,l,o,u,g,w,R,G,Z){return e=new Wg(e,t,n,u,w,R,G,Z,g),t=1,o===!0&&(t|=24),o=Rn(3,null,null,t),e.current=o,o.stateNode=e,t=ks(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:a,isDehydrated:n,cache:t},As(o),e}function Qh(e){return e?(e=Ul,e):Ul}function Kh(e,t,n,a,l,o){l=Qh(l),a.context===null?a.context=l:a.pendingContext=l,a=Ya(t),a.payload={element:n},o=o===void 0?null:o,o!==null&&(a.callback=o),n=Ga(e,a,t),n!==null&&(Dn(n,e,t),No(n,e,t))}function Zh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qc(e,t){Zh(e,t),(e=e.alternate)&&Zh(e,t)}function $h(e){if(e.tag===13||e.tag===31){var t=hl(e,67108864);t!==null&&Dn(t,e,67108864),Qc(e,67108864)}}function Jh(e){if(e.tag===13||e.tag===31){var t=Bn();t=da(t);var n=hl(e,t);n!==null&&Dn(n,e,t),Qc(e,t)}}var Ar=!0;function Ig(e,t,n,a){var l=T.T;T.T=null;var o=I.p;try{I.p=2,Kc(e,t,n,a)}finally{I.p=o,T.T=l}}function Pg(e,t,n,a){var l=T.T;T.T=null;var o=I.p;try{I.p=8,Kc(e,t,n,a)}finally{I.p=o,T.T=l}}function Kc(e,t,n,a){if(Ar){var l=Zc(a);if(l===null)Oc(e,t,a,Tr,n),Ih(e,a);else if(tm(l,e,t,n,a))a.stopPropagation();else if(Ih(e,a),t&4&&-1<em.indexOf(e)){for(;l!==null;){var o=ge(l);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var u=Me(o.pendingLanes);if(u!==0){var g=o;for(g.pendingLanes|=2,g.entangledLanes|=2;u;){var w=1<<31-xt(u);g.entanglements[1]|=w,u&=~w}oa(o),(ht&6)===0&&(dr=Lt()+500,ei(0))}}break;case 31:case 13:g=hl(o,2),g!==null&&Dn(g,o,2),hr(),Qc(o,2)}if(o=Zc(a),o===null&&Oc(e,t,a,Tr,n),o===l)break;l=o}l!==null&&a.stopPropagation()}else Oc(e,t,a,null,n)}}function Zc(e){return e=Jr(e),$c(e)}var Tr=null;function $c(e){if(Tr=null,e=fa(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 Tr=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(on()){case rn:return 2;case xn:return 8;case Sn:case J:return 32;case ue:return 268435456;default:return 32}default:return 32}}var Jc=!1,Pa=null,el=null,tl=null,ri=new Map,si=new Map,nl=[],em="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 Ih(e,t){switch(e){case"focusin":case"focusout":Pa=null;break;case"dragenter":case"dragleave":el=null;break;case"mouseover":case"mouseout":tl=null;break;case"pointerover":case"pointerout":ri.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":si.delete(t.pointerId)}}function ci(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=ge(t),t!==null&&$h(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function tm(e,t,n,a,l){switch(t){case"focusin":return Pa=ci(Pa,e,t,n,a,l),!0;case"dragenter":return el=ci(el,e,t,n,a,l),!0;case"mouseover":return tl=ci(tl,e,t,n,a,l),!0;case"pointerover":var o=l.pointerId;return ri.set(o,ci(ri.get(o)||null,e,t,n,a,l)),!0;case"gotpointercapture":return o=l.pointerId,si.set(o,ci(si.get(o)||null,e,t,n,a,l)),!0}return!1}function Ph(e){var t=fa(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,Zn(e.priority,function(){Jh(n)});return}}else if(t===31){if(t=D(n),t!==null){e.blockedOn=t,Zn(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 Er(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);$r=a,n.target.dispatchEvent(a),$r=null}else return t=ge(n),t!==null&&$h(t),e.blockedOn=n,!1;t.shift()}return!0}function ep(e,t,n){Er(e)&&n.delete(t)}function nm(){Jc=!1,Pa!==null&&Er(Pa)&&(Pa=null),el!==null&&Er(el)&&(el=null),tl!==null&&Er(tl)&&(tl=null),ri.forEach(ep),si.forEach(ep)}function Rr(e,t){e.blockedOn===t&&(e.blockedOn=null,Jc||(Jc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,nm)))}var Lr=null;function tp(e){Lr!==e&&(Lr=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Lr===e&&(Lr=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($c(a||n)===null)continue;break}var o=ge(n);o!==null&&(e.splice(t,3),t-=3,Zs(o,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function ro(e){function t(w){return Rr(w,e)}Pa!==null&&Rr(Pa,e),el!==null&&Rr(el,e),tl!==null&&Rr(tl,e),ri.forEach(t),si.forEach(t);for(var n=0;n<nl.length;n++){var a=nl[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<nl.length&&(n=nl[0],n.blockedOn===null);)Ph(n),n.blockedOn===null&&nl.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[Xt]||null;if(typeof o=="function")u||tp(n);else if(u){var g=null;if(o&&o.hasAttribute("formAction")){if(l=o,u=o[Xt]||null)g=u.formAction;else if($c(l)!==null)continue}else g=u.action;typeof g=="function"?n[a+1]=g:(n.splice(a,3),a-=3),tp(n)}}}function np(){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}Or.prototype.render=Wc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var n=t.current,a=Bn();Kh(n,a,e,t,null,null)},Or.prototype.unmount=Wc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Kh(e.current,2,null,e,null,null),hr(),t[Tn]=null}};function Or(e){this._internalRoot=e}Or.prototype.unstable_scheduleHydration=function(e){if(e){var t=wi();e={blockedOn:null,target:e,priority:t};for(var n=0;n<nl.length&&t!==0&&t<nl[n].priority;n++);nl.splice(n,0,e),n===0&&Ph(e)}};var ap=c.version;if(ap!=="19.2.4")throw Error(d(527,ap,"19.2.4"));I.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=b(t),e=e!==null?A(e):null,e=e===null?null:e.stateNode,e};var am={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_r.isDisabled&&_r.supportsFiber)try{Ne=_r.inject(am),Ae=_r}catch{}}return fi.createRoot=function(e,t){if(!h(e))throw Error(d(299));var n=!1,a="",l=uf,o=df,u=ff;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=Fh(e,1,!1,null,null,n,a,null,l,o,u,np),e[Tn]=t.current,Lc(e),new Wc(t)},fi.hydrateRoot=function(e,t,n){if(!h(e))throw Error(d(299));var a=!1,l="",o=uf,u=df,g=ff,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=Fh(e,1,!0,t,n??null,a,l,w,o,u,g,np),t.context=Qh(null),n=t.current,a=Bn(),a=da(a),l=Ya(a),l.callback=null,Ga(n,l,a),n=a,t.current.lanes=n,dt(t,n),oa(t),e[Tn]=t.current,Lc(e),new Or(t)},fi.version="19.2.4",fi}var Cp;function c1(){if(Cp)return au.exports;Cp=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(),au.exports=s1(),au.exports}var u1=c1(),kp=function(c,f){var d=arguments;if(f==null||!vi.call(f,"css"))return v.createElement.apply(void 0,d);var h=d.length,p=new Array(h);p[0]=bu,p[1]=mu(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={}))})(kp||(kp={}));function m(){for(var i=arguments.length,c=new Array(i),f=0;f<i;f++)c[f]=arguments[f];return Gp(c)}function jt(){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 d1={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},f1={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:d1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Vp=v.createContext(f1);function go(){return v.useContext(Vp)}const sl="-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"},Ra=m("font-family:",sl,";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;}",""),h1=jt`
|
|
8
|
+
`+a.stack}}var tn=Object.prototype.hasOwnProperty,bt=i.unstable_scheduleCallback,Rt=i.unstable_cancelCallback,at=i.unstable_shouldYield,ze=i.unstable_requestPaint,Lt=i.unstable_now,on=i.unstable_getCurrentPriorityLevel,rn=i.unstable_ImmediatePriority,xn=i.unstable_UserBlockingPriority,Sn=i.unstable_NormalPriority,J=i.unstable_LowPriority,ue=i.unstable_IdlePriority,Xe=i.log,nt=i.unstable_setDisableYieldValue,Ne=null,Ae=null;function kt(e){if(typeof Xe=="function"&&nt(e),Ae&&typeof Ae.setStrictMode=="function")try{Ae.setStrictMode(Ne,e)}catch{}}var xt=Math.clz32?Math.clz32:bo,Ra=Math.log,ca=Math.LN2;function bo(e){return e>>>=0,e===0?32:31-(Ra(e)/ca|0)|0}var La=256,U=262144,Re=4194304;function Me(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 Ze(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=Me(a):(u&=g,u!==0?l=Me(u):n||(n=g&~e,n!==0&&(l=Me(n))))):(g=a&~o,g!==0?l=Me(g):u!==0?l=Me(u):n||(n=a&~e,n!==0&&(l=Me(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 lt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Pn(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 ea(){var e=Re;return Re<<=1,(Re&62914560)===0&&(Re=4194304),e}function bn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function dt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ft(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 G=31-xt(n),K=1<<G;g[G]=0,w[G]=-1;var O=R[G];if(O!==null)for(R[G]=null,G=0;G<O.length;G++){var B=O[G];B!==null&&(B.lane&=-536870913)}n&=~K}a!==0&&xi(e,a,0),o!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=o&~(u&~t))}function xi(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-xt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function Si(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-xt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function yo(e,t){var n=t&-t;return n=(n&42)!==0?1:ua(n),(n&(e.suspendedLanes|t))!==0?0:n}function ua(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 vo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function wi(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Jh(e.type))}function Zn(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var ta=Math.random().toString(36).slice(2),Bt="__reactFiber$"+ta,Xt="__reactProps$"+ta,Tn="__reactContainer$"+ta,Al="__reactEvents$"+ta,Oa="__reactListeners$"+ta,_a="__reactHandles$"+ta,xo="__reactResources$"+ta,cl="__reactMarker$"+ta;function So(e){delete e[Bt],delete e[Xt],delete e[Al],delete e[Oa],delete e[_a]}function da(e){var t=e[Bt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Tn]||n[Bt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_h(e);e!==null;){if(n=e[Bt])return n;e=_h(e)}return t}e=n,n=e.parentNode}return null}function ge(e){if(e=e[Bt]||e[Tn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ce(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function ve(e){var t=e[xo];return t||(t=e[xo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function xe(e){e[cl]=!0}var _e=new Set,Ue={};function ot(e,t){it(e,t),it(e+"Capture",t)}function it(e,t){for(Ue[e]=t,e=0;e<t.length;e++)_e.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]*$"),yn={},wo={};function Wp(e){return tn.call(wo,e)?!0:tn.call(yn,e)?!1:je.test(e)?wo[e]=!0:(yn[e]=!0,!1)}function Ci(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 ki(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 fa(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 Nn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ip(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 Fr(e){if(!e._valueTracker){var t=bu(e)?"checked":"value";e._valueTracker=Ip(e,t,""+e[t])}}function yu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=bu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function zi(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 Pp=/[\n"\\]/g;function jn(e){return e.replace(Pp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Qr(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=""+Nn(t)):e.value!==""+Nn(t)&&(e.value=""+Nn(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Kr(e,u,Nn(t)):n!=null?Kr(e,u,Nn(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=""+Nn(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)){Fr(e);return}n=n!=null?""+Nn(n):"",t=t!=null?""+Nn(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),Fr(e)}function Kr(e,t,n){t==="number"&&zi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Tl(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=""+Nn(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=""+Nn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Nn(n):""}function Su(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(d(92));if(Be(a)){if(1<a.length)throw Error(d(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Nn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Fr(e)}function El(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var e0=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||e0.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 Zr(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 t0=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"]]),n0=/^[\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 Mi(e){return n0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ha(){}var $r=null;function Jr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rl=null,Ll=null;function ku(e){var t=ge(e);if(t&&(e=t.stateNode)){var n=e[Xt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Qr(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="'+jn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[Xt]||null;if(!l)throw Error(d(90));Qr(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&&yu(a)}break e;case"textarea":xu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Tl(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,(Rl!==null||Ll!==null)&&(hr(),Rl&&(t=Rl,e=Ll,Ll=Rl=null,ku(t),e)))for(t=0;t<e.length;t++)ku(e[t])}}function Co(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Xt]||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 pa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ir=!1;if(pa)try{var ko={};Object.defineProperty(ko,"passive",{get:function(){Ir=!0}}),window.addEventListener("test",ko,ko),window.removeEventListener("test",ko,ko)}catch{Ir=!1}var Ha=null,Pr=null,Di=null;function Mu(){if(Di)return Di;var e,t=Pr,n=t.length,a,l="value"in Ha?Ha.value:Ha.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 Di=l.slice(e,1<a?1-a:void 0)}function Ai(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 Ti(){return!0}function Du(){return!1}function wn(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)?Ti: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=Ti)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ti)},persist:function(){},isPersistent:Ti}),t}var ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ei=wn(ul),zo=z({},ul,{view:0,detail:0}),a0=wn(zo),es,ts,Mo,Ri=z({},zo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:as,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!==Mo&&(Mo&&e.type==="mousemove"?(es=e.screenX-Mo.screenX,ts=e.screenY-Mo.screenY):ts=es=0,Mo=e),es)},movementY:function(e){return"movementY"in e?e.movementY:ts}}),Au=wn(Ri),l0=z({},Ri,{dataTransfer:0}),o0=wn(l0),i0=z({},zo,{relatedTarget:0}),ns=wn(i0),r0=z({},ul,{animationName:0,elapsedTime:0,pseudoElement:0}),s0=wn(r0),c0=z({},ul,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),u0=wn(c0),d0=z({},ul,{data:0}),Tu=wn(d0),f0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},h0={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"},p0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function g0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=p0[e])?!!t[e]:!1}function as(){return g0}var m0=z({},zo,{key:function(e){if(e.key){var t=f0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ai(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?h0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:as,charCode:function(e){return e.type==="keypress"?Ai(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ai(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),b0=wn(m0),y0=z({},Ri,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eu=wn(y0),v0=z({},zo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:as}),x0=wn(v0),S0=z({},ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),w0=wn(S0),C0=z({},Ri,{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}),k0=wn(C0),z0=z({},ul,{newState:0,oldState:0}),M0=wn(z0),D0=[9,13,27,32],ls=pa&&"CompositionEvent"in window,Do=null;pa&&"documentMode"in document&&(Do=document.documentMode);var A0=pa&&"TextEvent"in window&&!Do,Ru=pa&&(!ls||Do&&8<Do&&11>=Do),Lu=" ",Ou=!1;function _u(e,t){switch(e){case"keyup":return D0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ol=!1;function T0(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 E0(e,t){if(Ol)return e==="compositionend"||!ls&&_u(e,t)?(e=Mu(),Di=Pr=Ha=null,Ol=!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 R0={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"?!!R0[e.type]:t==="textarea"}function Uu(e,t,n,a){Rl?Ll?Ll.push(a):Ll=[a]:Rl=a,t=xr(t,"onChange"),0<t.length&&(n=new Ei("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Ao=null,To=null;function L0(e){xh(e,0)}function Li(e){var t=ce(e);if(yu(t))return e}function Nu(e,t){if(e==="change")return t}var ju=!1;if(pa){var os;if(pa){var is="oninput"in document;if(!is){var qu=document.createElement("div");qu.setAttribute("oninput","return;"),is=typeof qu.oninput=="function"}os=is}else os=!1;ju=os&&(!document.documentMode||9<document.documentMode)}function Yu(){Ao&&(Ao.detachEvent("onpropertychange",Gu),To=Ao=null)}function Gu(e){if(e.propertyName==="value"&&Li(To)){var t=[];Uu(t,To,e,Jr(e)),zu(L0,t)}}function O0(e,t,n){e==="focusin"?(Yu(),Ao=t,To=n,Ao.attachEvent("onpropertychange",Gu)):e==="focusout"&&Yu()}function _0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Li(To)}function H0(e,t){if(e==="click")return Li(t)}function B0(e,t){if(e==="input"||e==="change")return Li(t)}function U0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:U0;function Eo(e,t){if(En(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!tn.call(t,l)||!En(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=zi(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=zi(e.document)}return t}function rs(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 N0=pa&&"documentMode"in document&&11>=document.documentMode,_l=null,ss=null,Ro=null,cs=!1;function Ku(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cs||_l==null||_l!==zi(a)||(a=_l,"selectionStart"in a&&rs(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}),Ro&&Eo(Ro,a)||(Ro=a,a=xr(ss,"onSelect"),0<a.length&&(t=new Ei("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=_l)))}function dl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Hl={animationend:dl("Animation","AnimationEnd"),animationiteration:dl("Animation","AnimationIteration"),animationstart:dl("Animation","AnimationStart"),transitionrun:dl("Transition","TransitionRun"),transitionstart:dl("Transition","TransitionStart"),transitioncancel:dl("Transition","TransitionCancel"),transitionend:dl("Transition","TransitionEnd")},us={},Zu={};pa&&(Zu=document.createElement("div").style,"AnimationEvent"in window||(delete Hl.animationend.animation,delete Hl.animationiteration.animation,delete Hl.animationstart.animation),"TransitionEvent"in window||delete Hl.transitionend.transition);function fl(e){if(us[e])return us[e];if(!Hl[e])return e;var t=Hl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zu)return us[e]=t[n];return e}var $u=fl("animationend"),Ju=fl("animationiteration"),Wu=fl("animationstart"),j0=fl("transitionrun"),q0=fl("transitionstart"),Y0=fl("transitioncancel"),Iu=fl("transitionend"),Pu=new Map,ds="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(" ");ds.push("scrollEnd");function $n(e,t){Pu.set(e,t),ot(t,[e])}var Oi=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)},qn=[],Bl=0,fs=0;function _i(){for(var e=Bl,t=fs=Bl=0;t<e;){var n=qn[t];qn[t++]=null;var a=qn[t];qn[t++]=null;var l=qn[t];qn[t++]=null;var o=qn[t];if(qn[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 Hi(e,t,n,a){qn[Bl++]=e,qn[Bl++]=t,qn[Bl++]=n,qn[Bl++]=a,fs|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function hs(e,t,n,a){return Hi(e,t,n,a),Bi(e)}function hl(e,t){return Hi(e,null,null,t),Bi(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-xt(n),e=o.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),o):null}function Bi(e){if(50<Po)throw Po=0,wc=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ul={};function G0(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 Rn(e,t,n,a){return new G0(e,t,n,a)}function ps(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ga(e,t){var n=e.alternate;return n===null?(n=Rn(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 Ui(e,t,n,a,l,o){var u=0;if(a=e,typeof e=="function")ps(e)&&(u=1);else if(typeof e=="string")u=Kg(e,n,oe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case q:return e=Rn(31,n,t,l),e.elementType=q,e.lanes=o,e;case X:return pl(n.children,l,o,t);case $:u=8,l|=24;break;case F:return e=Rn(12,n,t,l|2),e.elementType=F,e.lanes=o,e;case Y:return e=Rn(13,n,t,l),e.elementType=Y,e.lanes=o,e;case ee:return e=Rn(19,n,t,l),e.elementType=ee,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:u=10;break e;case le:u=9;break e;case ie:u=11;break e;case ne:u=14;break e;case re:u=16,a=null;break e}u=29,n=Error(d(130,e===null?"null":typeof e,"")),a=null}return t=Rn(u,n,t,l),t.elementType=e,t.type=a,t.lanes=o,t}function pl(e,t,n,a){return e=Rn(7,e,a,t),e.lanes=n,e}function gs(e,t,n){return e=Rn(6,e,null,t),e.lanes=n,e}function nd(e){var t=Rn(18,null,null,0);return t.stateNode=e,t}function ms(e,t,n){return t=Rn(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 Yn(e,t){if(typeof e=="object"&&e!==null){var n=ad.get(e);return n!==void 0?n:(t={value:e,source:t,stack:pn(t)},ad.set(e,t),t)}return{value:e,source:t,stack:pn(t)}}var Nl=[],jl=0,Ni=null,Lo=0,Gn=[],Xn=0,Ba=null,na=1,aa="";function ma(e,t){Nl[jl++]=Lo,Nl[jl++]=Ni,Ni=e,Lo=t}function ld(e,t,n){Gn[Xn++]=na,Gn[Xn++]=aa,Gn[Xn++]=Ba,Ba=e;var a=na;e=aa;var l=32-xt(a)-1;a&=~(1<<l),n+=1;var o=32-xt(t)+l;if(30<o){var u=l-l%5;o=(a&(1<<u)-1).toString(32),a>>=u,l-=u,na=1<<32-xt(t)+l|n<<l|a,aa=o+e}else na=1<<o|n<<l|a,aa=e}function bs(e){e.return!==null&&(ma(e,1),ld(e,1,0))}function ys(e){for(;e===Ni;)Ni=Nl[--jl],Nl[jl]=null,Lo=Nl[--jl],Nl[jl]=null;for(;e===Ba;)Ba=Gn[--Xn],Gn[Xn]=null,aa=Gn[--Xn],Gn[Xn]=null,na=Gn[--Xn],Gn[Xn]=null}function od(e,t){Gn[Xn++]=na,Gn[Xn++]=aa,Gn[Xn++]=Ba,na=t.id,aa=t.overflow,Ba=e}var sn=null,Ot=null,et=!1,Ua=null,Vn=!1,vs=Error(d(519));function Na(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Oo(Yn(t,e)),vs}function id(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Bt]=e,t[Xt]=a,n){case"dialog":We("cancel",t),We("close",t);break;case"iframe":case"object":case"embed":We("load",t);break;case"video":case"audio":for(n=0;n<ti.length;n++)We(ti[n],t);break;case"source":We("error",t);break;case"img":case"image":case"link":We("error",t),We("load",t);break;case"details":We("toggle",t);break;case"input":We("invalid",t),vu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":We("invalid",t);break;case"textarea":We("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&&(We("beforetoggle",t),We("toggle",t)),a.onScroll!=null&&We("scroll",t),a.onScrollEnd!=null&&We("scrollend",t),a.onClick!=null&&(t.onclick=ha),t=!0):t=!1,t||Na(e,!0)}function rd(e){for(sn=e.return;sn;)switch(sn.tag){case 5:case 31:case 13:Vn=!1;return;case 27:case 3:Vn=!0;return;default:sn=sn.return}}function ql(e){if(e!==sn)return!1;if(!et)return rd(e),et=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Uc(e.type,e.memoizedProps)),n=!n),n&&Ot&&Na(e),rd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Ot=Oh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Ot=Oh(e)}else t===27?(t=Ot,Ia(e.type)?(e=Gc,Gc=null,Ot=e):Ot=t):Ot=sn?Qn(e.stateNode.nextSibling):null;return!0}function gl(){Ot=sn=null,et=!1}function xs(){var e=Ua;return e!==null&&(Mn===null?Mn=e:Mn.push.apply(Mn,e),Ua=null),e}function Oo(e){Ua===null?Ua=[e]:Ua.push(e)}var Ss=S(null),ml=null,ba=null;function ja(e,t,n){ae(Ss,t._currentValue),t._currentValue=n}function ya(e){e._currentValue=Ss.current,H(Ss)}function ws(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 Cs(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),ws(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),ws(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 Yl(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;En(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(ii):e=[ii])}l=l.return}e!==null&&Cs(t,e,n,a),t.flags|=262144}function ji(e){for(e=e.firstContext;e!==null;){if(!En(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function bl(e){ml=e,ba=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function cn(e){return sd(ml,e)}function qi(e,t){return ml===null&&bl(e),sd(e,t)}function sd(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ba===null){if(e===null)throw Error(d(308));ba=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ba=ba.next=t;return n}var X0=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()})}},V0=i.unstable_scheduleCallback,F0=i.unstable_NormalPriority,Qt={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ks(){return{controller:new X0,data:new Map,refCount:0}}function _o(e){e.refCount--,e.refCount===0&&V0(F0,function(){e.controller.abort()})}var Ho=null,zs=0,Gl=0,Xl=null;function Q0(e,t){if(Ho===null){var n=Ho=[];zs=0,Gl=Ac(),Xl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return zs++,t.then(cd,cd),t}function cd(){if(--zs===0&&Ho!==null){Xl!==null&&(Xl.status="fulfilled");var e=Ho;Ho=null,Gl=0,Xl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function K0(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=Lt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Q0(e,t),ud!==null&&ud(e,t)};var yl=S(null);function Ms(){var e=yl.current;return e!==null?e:At.pooledCache}function Yi(e,t){t===null?ae(yl,yl.current):ae(yl,t.pool)}function dd(){var e=Ms();return e===null?null:{parent:Qt._currentValue,pool:e}}var Vl=Error(d(460)),Ds=Error(d(474)),Gi=Error(d(542)),Xi={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(ha,ha),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(ha,ha);else{if(e=At,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 xl=t,Vl}}function vl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(xl=n,Vl):n}}var xl=null;function pd(){if(xl===null)throw Error(d(459));var e=xl;return xl=null,e}function gd(e){if(e===Vl||e===Gi)throw Error(d(483))}var Fl=null,Bo=0;function Vi(e){var t=Bo;return Bo+=1,Fl===null&&(Fl=[]),hd(Fl,e,t)}function Uo(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Fi(e,t){throw t.$$typeof===L?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=ga(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,Q){return k===null||k.tag!==6?(k=gs(E,M.mode,Q),k.return=M,k):(k=l(k,E),k.return=M,k)}function w(M,k,E,Q){var Te=E.type;return Te===X?G(M,k,E.props.children,Q,E.key):k!==null&&(k.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===re&&vl(Te)===k.type)?(k=l(k,E.props),Uo(k,E),k.return=M,k):(k=Ui(E.type,E.key,E.props,null,M.mode,Q),Uo(k,E),k.return=M,k)}function R(M,k,E,Q){return k===null||k.tag!==4||k.stateNode.containerInfo!==E.containerInfo||k.stateNode.implementation!==E.implementation?(k=ms(E,M.mode,Q),k.return=M,k):(k=l(k,E.children||[]),k.return=M,k)}function G(M,k,E,Q,Te){return k===null||k.tag!==7?(k=pl(E,M.mode,Q,Te),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=gs(""+k,M.mode,E),k.return=M,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case j:return E=Ui(k.type,k.key,k.props,null,M.mode,E),Uo(E,k),E.return=M,E;case _:return k=ms(k,M.mode,E),k.return=M,k;case re:return k=vl(k),K(M,k,E)}if(Be(k)||be(k))return k=pl(k,M.mode,E,null),k.return=M,k;if(typeof k.then=="function")return K(M,Vi(k),E);if(k.$$typeof===V)return K(M,qi(M,k),E);Fi(M,k)}return null}function O(M,k,E,Q){var Te=k!==null?k.key:null;if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return Te!==null?null:g(M,k,""+E,Q);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case j:return E.key===Te?w(M,k,E,Q):null;case _:return E.key===Te?R(M,k,E,Q):null;case re:return E=vl(E),O(M,k,E,Q)}if(Be(E)||be(E))return Te!==null?null:G(M,k,E,Q,null);if(typeof E.then=="function")return O(M,k,Vi(E),Q);if(E.$$typeof===V)return O(M,k,qi(M,E),Q);Fi(M,E)}return null}function B(M,k,E,Q,Te){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return M=M.get(E)||null,g(k,M,""+Q,Te);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case j:return M=M.get(Q.key===null?E:Q.key)||null,w(k,M,Q,Te);case _:return M=M.get(Q.key===null?E:Q.key)||null,R(k,M,Q,Te);case re:return Q=vl(Q),B(M,k,E,Q,Te)}if(Be(Q)||be(Q))return M=M.get(E)||null,G(k,M,Q,Te,null);if(typeof Q.then=="function")return B(M,k,E,Vi(Q),Te);if(Q.$$typeof===V)return B(M,k,E,qi(k,Q),Te);Fi(k,Q)}return null}function ye(M,k,E,Q){for(var Te=null,st=null,ke=k,Ke=k=0,Pe=null;ke!==null&&Ke<E.length;Ke++){ke.index>Ke?(Pe=ke,ke=null):Pe=ke.sibling;var ct=O(M,ke,E[Ke],Q);if(ct===null){ke===null&&(ke=Pe);break}e&&ke&&ct.alternate===null&&t(M,ke),k=o(ct,k,Ke),st===null?Te=ct:st.sibling=ct,st=ct,ke=Pe}if(Ke===E.length)return n(M,ke),et&&ma(M,Ke),Te;if(ke===null){for(;Ke<E.length;Ke++)ke=K(M,E[Ke],Q),ke!==null&&(k=o(ke,k,Ke),st===null?Te=ke:st.sibling=ke,st=ke);return et&&ma(M,Ke),Te}for(ke=a(ke);Ke<E.length;Ke++)Pe=B(ke,M,Ke,E[Ke],Q),Pe!==null&&(e&&Pe.alternate!==null&&ke.delete(Pe.key===null?Ke:Pe.key),k=o(Pe,k,Ke),st===null?Te=Pe:st.sibling=Pe,st=Pe);return e&&ke.forEach(function(al){return t(M,al)}),et&&ma(M,Ke),Te}function Le(M,k,E,Q){if(E==null)throw Error(d(151));for(var Te=null,st=null,ke=k,Ke=k=0,Pe=null,ct=E.next();ke!==null&&!ct.done;Ke++,ct=E.next()){ke.index>Ke?(Pe=ke,ke=null):Pe=ke.sibling;var al=O(M,ke,ct.value,Q);if(al===null){ke===null&&(ke=Pe);break}e&&ke&&al.alternate===null&&t(M,ke),k=o(al,k,Ke),st===null?Te=al:st.sibling=al,st=al,ke=Pe}if(ct.done)return n(M,ke),et&&ma(M,Ke),Te;if(ke===null){for(;!ct.done;Ke++,ct=E.next())ct=K(M,ct.value,Q),ct!==null&&(k=o(ct,k,Ke),st===null?Te=ct:st.sibling=ct,st=ct);return et&&ma(M,Ke),Te}for(ke=a(ke);!ct.done;Ke++,ct=E.next())ct=B(ke,M,Ke,ct.value,Q),ct!==null&&(e&&ct.alternate!==null&&ke.delete(ct.key===null?Ke:ct.key),k=o(ct,k,Ke),st===null?Te=ct:st.sibling=ct,st=ct);return e&&ke.forEach(function(lm){return t(M,lm)}),et&&ma(M,Ke),Te}function Dt(M,k,E,Q){if(typeof E=="object"&&E!==null&&E.type===X&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case j:e:{for(var Te=E.key;k!==null;){if(k.key===Te){if(Te=E.type,Te===X){if(k.tag===7){n(M,k.sibling),Q=l(k,E.props.children),Q.return=M,M=Q;break e}}else if(k.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===re&&vl(Te)===k.type){n(M,k.sibling),Q=l(k,E.props),Uo(Q,E),Q.return=M,M=Q;break e}n(M,k);break}else t(M,k);k=k.sibling}E.type===X?(Q=pl(E.props.children,M.mode,Q,E.key),Q.return=M,M=Q):(Q=Ui(E.type,E.key,E.props,null,M.mode,Q),Uo(Q,E),Q.return=M,M=Q)}return u(M);case _:e:{for(Te=E.key;k!==null;){if(k.key===Te)if(k.tag===4&&k.stateNode.containerInfo===E.containerInfo&&k.stateNode.implementation===E.implementation){n(M,k.sibling),Q=l(k,E.children||[]),Q.return=M,M=Q;break e}else{n(M,k);break}else t(M,k);k=k.sibling}Q=ms(E,M.mode,Q),Q.return=M,M=Q}return u(M);case re:return E=vl(E),Dt(M,k,E,Q)}if(Be(E))return ye(M,k,E,Q);if(be(E)){if(Te=be(E),typeof Te!="function")throw Error(d(150));return E=Te.call(E),Le(M,k,E,Q)}if(typeof E.then=="function")return Dt(M,k,Vi(E),Q);if(E.$$typeof===V)return Dt(M,k,qi(M,E),Q);Fi(M,E)}return typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint"?(E=""+E,k!==null&&k.tag===6?(n(M,k.sibling),Q=l(k,E),Q.return=M,M=Q):(n(M,k),Q=gs(E,M.mode,Q),Q.return=M,M=Q),u(M)):n(M,k)}return function(M,k,E,Q){try{Bo=0;var Te=Dt(M,k,E,Q);return Fl=null,Te}catch(ke){if(ke===Vl||ke===Gi)throw ke;var st=Rn(29,ke,null,M.mode);return st.lanes=Q,st.return=M,st}}}var Sl=md(!0),bd=md(!1),qa=!1;function As(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ts(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 Ya(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ht&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=Bi(e),ed(e,null,n),t}return Hi(e,a,t,n),Bi(e)}function No(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,Si(e,n)}}function Es(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 Rs=!1;function jo(){if(Rs){var e=Xl;if(e!==null)throw e}}function qo(e,t,n,a){Rs=!1;var l=e.updateQueue;qa=!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 G=e.alternate;G!==null&&(G=G.updateQueue,g=G.lastBaseUpdate,g!==u&&(g===null?G.firstBaseUpdate=R:g.next=R,G.lastBaseUpdate=w))}if(o!==null){var K=l.baseState;u=0,G=R=w=null,g=o;do{var O=g.lane&-536870913,B=O!==g.lane;if(B?(Ie&O)===O:(a&O)===O){O!==0&&O===Gl&&(Rs=!0),G!==null&&(G=G.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var ye=e,Le=g;O=t;var Dt=n;switch(Le.tag){case 1:if(ye=Le.payload,typeof ye=="function"){K=ye.call(Dt,K,O);break e}K=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Le.payload,O=typeof ye=="function"?ye.call(Dt,K,O):ye,O==null)break e;K=z({},K,O);break e;case 2:qa=!0}}O=g.callback,O!==null&&(e.flags|=64,B&&(e.flags|=8192),B=l.callbacks,B===null?l.callbacks=[O]:B.push(O))}else B={lane:O,tag:g.tag,payload:g.payload,callback:g.callback,next:null},G===null?(R=G=B,w=K):G=G.next=B,u|=O;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);G===null&&(w=K),l.baseState=w,l.firstBaseUpdate=R,l.lastBaseUpdate=G,o===null&&(l.shared.lanes=0),Ka|=u,e.lanes=u,e.memoizedState=K}}function yd(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++)yd(n[e],t)}var Ql=S(null),Qi=S(0);function xd(e,t){e=Da,ae(Qi,e),ae(Ql,t),Da=e|t.baseLanes}function Ls(){ae(Qi,Da),ae(Ql,Ql.current)}function Os(){Da=Qi.current,H(Ql),H(Qi)}var Ln=S(null),Fn=null;function Xa(e){var t=e.alternate;ae(Vt,Vt.current&1),ae(Ln,e),Fn===null&&(t===null||Ql.current!==null||t.memoizedState!==null)&&(Fn=e)}function _s(e){ae(Vt,Vt.current),ae(Ln,e),Fn===null&&(Fn=e)}function Sd(e){e.tag===22?(ae(Vt,Vt.current),ae(Ln,e),Fn===null&&(Fn=e)):Va()}function Va(){ae(Vt,Vt.current),ae(Ln,Ln.current)}function On(e){H(Ln),Fn===e&&(Fn=null),H(Vt)}var Vt=S(0);function Ki(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||qc(n)||Yc(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 va=0,Qe=null,zt=null,Kt=null,Zi=!1,Kl=!1,wl=!1,$i=0,Yo=0,Zl=null,Z0=0;function qt(){throw Error(d(321))}function Hs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!En(e[n],t[n]))return!1;return!0}function Bs(e,t,n,a,l,o){return va=o,Qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?lf:Ws,wl=!1,o=n(a,l),wl=!1,Kl&&(o=Cd(t,n,a,l)),wd(e),o}function wd(e){T.H=Vo;var t=zt!==null&&zt.next!==null;if(va=0,Kt=zt=Qe=null,Zi=!1,Yo=0,Zl=null,t)throw Error(d(300));e===null||Zt||(e=e.dependencies,e!==null&&ji(e)&&(Zt=!0))}function Cd(e,t,n,a){Qe=e;var l=0;do{if(Kl&&(Zl=null),Yo=0,Kl=!1,25<=l)throw Error(d(301));if(l+=1,Kt=zt=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(Kl);return o}function $0(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?Go(t):t,e=e.useState()[0],(zt!==null?zt.memoizedState:null)!==e&&(Qe.flags|=1024),t}function Us(){var e=$i!==0;return $i=0,e}function Ns(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function js(e){if(Zi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Zi=!1}va=0,Kt=zt=Qe=null,Kl=!1,Yo=$i=0,Zl=null}function vn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Kt===null?Qe.memoizedState=Kt=e:Kt=Kt.next=e,Kt}function Ft(){if(zt===null){var e=Qe.alternate;e=e!==null?e.memoizedState:null}else e=zt.next;var t=Kt===null?Qe.memoizedState:Kt.next;if(t!==null)Kt=t,zt=e;else{if(e===null)throw Qe.alternate===null?Error(d(467)):Error(d(310));zt=e,e={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Kt===null?Qe.memoizedState=Kt=e:Kt=Kt.next=e}return Kt}function Ji(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Go(e){var t=Yo;return Yo+=1,Zl===null&&(Zl=[]),e=hd(Zl,e,t),t=Qe,(Kt===null?t.memoizedState:Kt.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?lf:Ws),e}function Wi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Go(e);if(e.$$typeof===V)return cn(e)}throw Error(d(438,String(e)))}function qs(e){var t=null,n=Qe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Qe.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=Ji(),Qe.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 xa(e,t){return typeof t=="function"?t(e):t}function Ii(e){var t=Ft();return Ys(t,zt,e)}function Ys(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,G=!1;do{var K=R.lane&-536870913;if(K!==R.lane?(Ie&K)===K:(va&K)===K){var O=R.revertLane;if(O===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),K===Gl&&(G=!0);else if((va&O)===O){R=R.next,O===Gl&&(G=!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,Qe.lanes|=O,Ka|=O;K=R.action,wl&&n(o,K),o=R.hasEagerState?R.eagerState:n(o,K)}else O={lane:K,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},w===null?(g=w=O,u=o):w=w.next=O,Qe.lanes|=K,Ka|=K;R=R.next}while(R!==null&&R!==t);if(w===null?u=o:w.next=g,!En(o,e.memoizedState)&&(Zt=!0,G&&(n=Xl,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 Gs(e){var t=Ft(),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);En(o,t.memoizedState)||(Zt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,a]}function kd(e,t,n){var a=Qe,l=Ft(),o=et;if(o){if(n===void 0)throw Error(d(407));n=n()}else n=t();var u=!En((zt||l).memoizedState,n);if(u&&(l.memoizedState=n,Zt=!0),l=l.queue,Fs(Dd.bind(null,a,l,e),[e]),l.getSnapshot!==t||u||Kt!==null&&Kt.memoizedState.tag&1){if(a.flags|=2048,$l(9,{destroy:void 0},Md.bind(null,a,l,n,t),null),At===null)throw Error(d(349));o||(va&127)!==0||zd(a,t,n)}return n}function zd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Qe.updateQueue,t===null?(t=Ji(),Qe.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!En(e,n)}catch{return!0}}function Td(e){var t=hl(e,2);t!==null&&Dn(t,e,2)}function Xs(e){var t=vn();if(typeof e=="function"){var n=e;if(e=n(),wl){kt(!0);try{n()}finally{kt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:e},t}function Ed(e,t,n,a){return e.baseState=n,Ys(e,zt,typeof a=="function"?a:xa)}function J0(e,t,n,a,l){if(tr(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){Vs(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){Vs(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 Vs(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 Vs(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(et){var n=At.formState;if(n!==null){e:{var a=Qe;if(et){if(Ot){t:{for(var l=Ot,o=Vn;l.nodeType!==8;){if(!o){l=null;break t}if(l=Qn(l.nextSibling),l===null){l=null;break t}}o=l.data,l=o==="F!"||o==="F"?l:null}if(l){Ot=Qn(l.nextSibling),a=l.data==="F!";break e}}Na(a)}a=!1}a&&(t=n[0])}}return n=vn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hd,lastRenderedState:t},n.queue=a,n=tf.bind(null,Qe,a),a.dispatch=n,a=Xs(!1),o=Js.bind(null,Qe,!1,a.queue),a=vn(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=J0.bind(null,Qe,l,o,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Ud(e){var t=Ft();return Nd(t,zt,e)}function Nd(e,t,n){if(t=Ys(e,t,Hd)[0],e=Ii(xa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Go(t)}catch(u){throw u===Vl?Gi:u}else a=t;t=Ft();var l=t.queue,o=l.dispatch;return n!==t.memoizedState&&(Qe.flags|=2048,$l(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=Ft(),n=zt;if(n!==null)return Nd(t,n,e);Ft(),t=t.memoizedState,n=Ft();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function $l(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Qe.updateQueue,t===null&&(t=Ji(),Qe.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 Ft().memoizedState}function Pi(e,t,n,a){var l=vn();Qe.flags|=e,l.memoizedState=$l(1|t,{destroy:void 0},n,a===void 0?null:a)}function er(e,t,n,a){var l=Ft();a=a===void 0?null:a;var o=l.memoizedState.inst;zt!==null&&a!==null&&Hs(a,zt.memoizedState.deps)?l.memoizedState=$l(t,o,n,a):(Qe.flags|=e,l.memoizedState=$l(1|t,o,n,a))}function Yd(e,t){Pi(8390656,8,e,t)}function Fs(e,t){er(2048,8,e,t)}function I0(e){Qe.flags|=4;var t=Qe.updateQueue;if(t===null)t=Ji(),Qe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Gd(e){var t=Ft().memoizedState;return I0({ref:t,nextImpl:e}),function(){if((ht&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function Xd(e,t){return er(4,2,e,t)}function Vd(e,t){return er(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,er(4,4,Fd.bind(null,t,e),n)}function Qs(){}function Kd(e,t){var n=Ft();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Hs(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Zd(e,t){var n=Ft();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Hs(t,a[1]))return a[0];if(a=e(),wl){kt(!0);try{e()}finally{kt(!1)}}return n.memoizedState=[a,t],a}function Ks(e,t,n){return n===void 0||(va&1073741824)!==0&&(Ie&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Jf(),Qe.lanes|=e,Ka|=e,n)}function $d(e,t,n,a){return En(n,t)?n:Ql.current!==null?(e=Ks(e,n,a),En(e,t)||(Zt=!0),e):(va&42)===0||(va&1073741824)!==0&&(Ie&261930)===0?(Zt=!0,e.memoizedState=n):(e=Jf(),Qe.lanes|=e,Ka|=e,t)}function Jd(e,t,n,a,l){var o=I.p;I.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 G=K0(w,a);Xo(e,t,G,Bn(e))}else Xo(e,t,a,Bn(e))}catch(K){Xo(e,t,{then:function(){},status:"rejected",reason:K},Bn())}finally{I.p=o,u!==null&&g.types!==null&&(u.types=g.types),T.T=u}}function P0(){}function Zs(e,t,n,a){if(e.tag!==5)throw Error(d(476));var l=Wd(e).queue;Jd(e,l,t,te,n===null?P0:function(){return Id(e),n(a)})}function Wd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,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),Xo(e,t.next.queue,{},Bn())}function $s(){return cn(ii)}function Pd(){return Ft().memoizedState}function ef(){return Ft().memoizedState}function eg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Bn();e=Ya(n);var a=Ga(t,e,n);a!==null&&(Dn(a,t,n),No(a,t,n)),t={cache:ks()},e.payload=t;return}t=t.return}}function tg(e,t,n){var a=Bn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},tr(e)?nf(t,n):(n=hs(e,t,n,a),n!==null&&(Dn(n,e,a),af(n,t,a)))}function tf(e,t,n){var a=Bn();Xo(e,t,n,a)}function Xo(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(tr(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,En(g,u))return Hi(e,t,l,0),At===null&&_i(),!1}catch{}if(n=hs(e,t,l,a),n!==null)return Dn(n,e,a),af(n,t,a),!0}return!1}function Js(e,t,n,a){if(a={lane:2,revertLane:Ac(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},tr(e)){if(t)throw Error(d(479))}else t=hs(e,n,a,2),t!==null&&Dn(t,e,2)}function tr(e){var t=e.alternate;return e===Qe||t!==null&&t===Qe}function nf(e,t){Kl=Zi=!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,Si(e,n)}}var Vo={readContext:cn,use:Wi,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt};Vo.useEffectEvent=qt;var lf={readContext:cn,use:Wi,useCallback:function(e,t){return vn().memoizedState=[e,t===void 0?null:t],e},useContext:cn,useEffect:Yd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Pi(4194308,4,Fd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Pi(4194308,4,e,t)},useInsertionEffect:function(e,t){Pi(4,2,e,t)},useMemo:function(e,t){var n=vn();t=t===void 0?null:t;var a=e();if(wl){kt(!0);try{e()}finally{kt(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=vn();if(n!==void 0){var l=n(t);if(wl){kt(!0);try{n(t)}finally{kt(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=tg.bind(null,Qe,e),[a.memoizedState,e]},useRef:function(e){var t=vn();return e={current:e},t.memoizedState=e},useState:function(e){e=Xs(e);var t=e.queue,n=tf.bind(null,Qe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qs,useDeferredValue:function(e,t){var n=vn();return Ks(n,e,t)},useTransition:function(){var e=Xs(!1);return e=Jd.bind(null,Qe,e.queue,!0,!1),vn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Qe,l=vn();if(et){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),At===null)throw Error(d(349));(Ie&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,$l(9,{destroy:void 0},Md.bind(null,a,o,n,t),null),n},useId:function(){var e=vn(),t=At.identifierPrefix;if(et){var n=aa,a=na;n=(a&~(1<<32-xt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=$i++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Z0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:$s,useFormState:Bd,useActionState:Bd,useOptimistic:function(e){var t=vn();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,Qe,!0,n),n.dispatch=t,[e,t]},useMemoCache:qs,useCacheRefresh:function(){return vn().memoizedState=eg.bind(null,Qe)},useEffectEvent:function(e){var t=vn(),n={impl:e};return t.memoizedState=n,function(){if((ht&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:cn,use:Wi,useCallback:Kd,useContext:cn,useEffect:Fs,useImperativeHandle:Qd,useInsertionEffect:Xd,useLayoutEffect:Vd,useMemo:Zd,useReducer:Ii,useRef:qd,useState:function(){return Ii(xa)},useDebugValue:Qs,useDeferredValue:function(e,t){var n=Ft();return $d(n,zt.memoizedState,e,t)},useTransition:function(){var e=Ii(xa)[0],t=Ft().memoizedState;return[typeof e=="boolean"?e:Go(e),t]},useSyncExternalStore:kd,useId:Pd,useHostTransitionStatus:$s,useFormState:Ud,useActionState:Ud,useOptimistic:function(e,t){var n=Ft();return Ed(n,zt,e,t)},useMemoCache:qs,useCacheRefresh:ef};Ws.useEffectEvent=Gd;var of={readContext:cn,use:Wi,useCallback:Kd,useContext:cn,useEffect:Fs,useImperativeHandle:Qd,useInsertionEffect:Xd,useLayoutEffect:Vd,useMemo:Zd,useReducer:Gs,useRef:qd,useState:function(){return Gs(xa)},useDebugValue:Qs,useDeferredValue:function(e,t){var n=Ft();return zt===null?Ks(n,e,t):$d(n,zt.memoizedState,e,t)},useTransition:function(){var e=Gs(xa)[0],t=Ft().memoizedState;return[typeof e=="boolean"?e:Go(e),t]},useSyncExternalStore:kd,useId:Pd,useHostTransitionStatus:$s,useFormState:jd,useActionState:jd,useOptimistic:function(e,t){var n=Ft();return zt!==null?Ed(n,zt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:qs,useCacheRefresh:ef};of.useEffectEvent=Gd;function Is(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 Ps={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Bn(),l=Ya(a);l.payload=t,n!=null&&(l.callback=n),t=Ga(e,l,a),t!==null&&(Dn(t,e,a),No(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Bn(),l=Ya(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Ga(e,l,a),t!==null&&(Dn(t,e,a),No(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Bn(),a=Ya(n);a.tag=2,t!=null&&(a.callback=t),t=Ga(e,a,n),t!==null&&(Dn(t,e,n),No(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?!Eo(n,a)||!Eo(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&&Ps.enqueueReplaceState(t,t.state,null)}function Cl(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=z({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function cf(e){Oi(e)}function uf(e){console.error(e)}function df(e){Oi(e)}function nr(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 ec(e,t,n){return n=Ya(n),n.tag=3,n.payload={element:null},n.callback=function(){nr(e,t)},n}function hf(e){return e=Ya(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"&&(Za===null?Za=new Set([this]):Za.add(this));var g=a.stack;this.componentDidCatch(a.value,{componentStack:g!==null?g:""})})}function ng(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Yl(t,n,l,!0),n=Ln.current,n!==null){switch(n.tag){case 31:case 13:return Fn===null?pr():n.alternate===null&&Yt===0&&(Yt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Xi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),zc(e,a,l)),!1;case 22:return n.flags|=65536,a===Xi?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)),zc(e,a,l)),!1}throw Error(d(435,n.tag))}return zc(e,a,l),pr(),!1}if(et)return t=Ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==vs&&(e=Error(d(422),{cause:a}),Oo(Yn(e,n)))):(a!==vs&&(t=Error(d(423),{cause:a}),Oo(Yn(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=Yn(a,n),l=ec(e.stateNode,a,l),Es(e,l),Yt!==4&&(Yt=2)),!1;var o=Error(d(520),{cause:a});if(o=Yn(o,n),Io===null?Io=[o]:Io.push(o),Yt!==4&&(Yt=2),t===null)return!0;a=Yn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=ec(n.stateNode,a,e),Es(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"&&(Za===null||!Za.has(o))))return n.flags|=65536,l&=-l,n.lanes|=l,l=hf(l),pf(l,e,n,a),Es(n,l),!1}n=n.return}while(n!==null);return!1}var tc=Error(d(461)),Zt=!1;function un(e,t,n,a){t.child=e===null?bd(t,null,n,a):Sl(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 bl(t),a=Bs(e,t,n,u,o,l),g=Us(),e!==null&&!Zt?(Ns(e,t,l),Sa(e,t,l)):(et&&g&&bs(t),t.flags|=1,un(e,t,a,l),t.child)}function mf(e,t,n,a,l){if(e===null){var o=n.type;return typeof o=="function"&&!ps(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,bf(e,t,o,a,l)):(e=Ui(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!cc(e,l)){var u=o.memoizedProps;if(n=n.compare,n=n!==null?n:Eo,n(u,a)&&e.ref===t.ref)return Sa(e,t,l)}return t.flags|=1,e=ga(o,a),e.ref=t.ref,e.return=t,t.child=e}function bf(e,t,n,a,l){if(e!==null){var o=e.memoizedProps;if(Eo(o,a)&&e.ref===t.ref)if(Zt=!1,t.pendingProps=a=o,cc(e,l))(e.flags&131072)!==0&&(Zt=!0);else return t.lanes=e.lanes,Sa(e,t,l)}return nc(e,t,n,a,l)}function yf(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&&Yi(t,o!==null?o.cachePool:null),o!==null?xd(t,o):Ls(),Sd(t);else return a=t.lanes=536870912,vf(e,t,o!==null?o.baseLanes|n:n,n,a)}else o!==null?(Yi(t,o.cachePool),xd(t,o),Va(),t.memoizedState=null):(e!==null&&Yi(t,null),Ls(),Va());return un(e,t,l,n),t.child}function Fo(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=Ms();return o=o===null?null:{parent:Qt._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&Yi(t,null),Ls(),Sd(t),e!==null&&Yl(e,t,a,!0),t.childLanes=l,null}function ar(e,t){return t=or({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 Sl(t,e.child,null,n),e=ar(t,t.pendingProps),e.flags|=2,On(t),t.memoizedState=null,e}function ag(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(et){if(a.mode==="hidden")return e=ar(t,a),t.lanes=536870912,Fo(null,e);if(_s(t),(e=Ot)?(e=Lh(e,Vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ba!==null?{id:na,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},n=nd(e),n.return=t,t.child=n,sn=t,Ot=null)):e=null,e===null)throw Na(t);return t.lanes=536870912,null}return ar(t,a)}var o=e.memoizedState;if(o!==null){var u=o.dehydrated;if(_s(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(Zt||Yl(e,t,n,!1),l=(n&e.childLanes)!==0,Zt||l){if(a=At,a!==null&&(u=yo(a,n),u!==0&&u!==o.retryLane))throw o.retryLane=u,hl(e,u),Dn(a,e,u),tc;pr(),t=xf(e,t,n)}else e=o.treeContext,Ot=Qn(u.nextSibling),sn=t,et=!0,Ua=null,Vn=!1,e!==null&&od(t,e),t=ar(t,a),t.flags|=4096;return t}return e=ga(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lr(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 nc(e,t,n,a,l){return bl(t),n=Bs(e,t,n,a,void 0,l),a=Us(),e!==null&&!Zt?(Ns(e,t,l),Sa(e,t,l)):(et&&a&&bs(t),t.flags|=1,un(e,t,n,l),t.child)}function Sf(e,t,n,a,l,o){return bl(t),t.updateQueue=null,n=Cd(t,a,n,l),wd(e),a=Us(),e!==null&&!Zt?(Ns(e,t,o),Sa(e,t,o)):(et&&a&&bs(t),t.flags|=1,un(e,t,n,o),t.child)}function wf(e,t,n,a,l){if(bl(t),t.stateNode===null){var o=Ul,u=n.contextType;typeof u=="object"&&u!==null&&(o=cn(u)),o=new n(a,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Ps,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=a,o.state=t.memoizedState,o.refs={},As(t),u=n.contextType,o.context=typeof u=="object"&&u!==null?cn(u):Ul,o.state=t.memoizedState,u=n.getDerivedStateFromProps,typeof u=="function"&&(Is(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&&Ps.enqueueReplaceState(o,o.state,null),qo(t,a,o,l),jo(),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=Cl(n,g);o.props=w;var R=o.context,G=n.contextType;u=Ul,typeof G=="object"&&G!==null&&(u=cn(G));var K=n.getDerivedStateFromProps;G=typeof K=="function"||typeof o.getSnapshotBeforeUpdate=="function",g=t.pendingProps!==g,G||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(g||R!==u)&&sf(t,o,a,u),qa=!1;var O=t.memoizedState;o.state=O,qo(t,a,o,l),jo(),R=t.memoizedState,g||O!==R||qa?(typeof K=="function"&&(Is(t,n,K,a),R=t.memoizedState),(w=qa||rf(t,n,w,a,O,R,u))?(G||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,Ts(e,t),u=t.memoizedProps,G=Cl(n,u),o.props=G,K=t.pendingProps,O=o.context,R=n.contextType,w=Ul,typeof R=="object"&&R!==null&&(w=cn(R)),g=n.getDerivedStateFromProps,(R=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==K||O!==w)&&sf(t,o,a,w),qa=!1,O=t.memoizedState,o.state=O,qo(t,a,o,l),jo();var B=t.memoizedState;u!==K||O!==B||qa||e!==null&&e.dependencies!==null&&ji(e.dependencies)?(typeof g=="function"&&(Is(t,n,g,a),B=t.memoizedState),(G=qa||rf(t,n,G,a,O,B,w)||e!==null&&e.dependencies!==null&&ji(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&&O===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=B),o.props=a,o.state=B,o.context=w,a=G):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),a=!1)}return o=a,lr(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=Sl(t,e.child,null,l),t.child=Sl(t,null,n,l)):un(e,t,n,l),t.memoizedState=o.state,e=t.child):e=Sa(e,t,l),e}function Cf(e,t,n,a){return gl(),t.flags|=256,un(e,t,n,a),t.child}var ac={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lc(e){return{baseLanes:e,cachePool:dd()}}function oc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Hn),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:(Vt.current&2)!==0),u&&(l=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(et){if(l?Xa(t):Va(),(e=Ot)?(e=Lh(e,Vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ba!==null?{id:na,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},n=nd(e),n.return=t,t.child=n,sn=t,Ot=null)):e=null,e===null)throw Na(t);return Yc(e)?t.lanes=32:t.lanes=536870912,null}var g=a.children;return a=a.fallback,l?(Va(),l=t.mode,g=or({mode:"hidden",children:g},l),a=pl(a,l,n,null),g.return=t,a.return=t,g.sibling=a,t.child=g,a=t.child,a.memoizedState=lc(n),a.childLanes=oc(e,u,n),t.memoizedState=ac,Fo(null,a)):(Xa(t),ic(t,g))}var w=e.memoizedState;if(w!==null&&(g=w.dehydrated,g!==null)){if(o)t.flags&256?(Xa(t),t.flags&=-257,t=rc(e,t,n)):t.memoizedState!==null?(Va(),t.child=e.child,t.flags|=128,t=null):(Va(),g=a.fallback,l=t.mode,a=or({mode:"visible",children:a.children},l),g=pl(g,l,n,null),g.flags|=2,a.return=t,g.return=t,a.sibling=g,t.child=a,Sl(t,e.child,null,n),a=t.child,a.memoizedState=lc(n),a.childLanes=oc(e,u,n),t.memoizedState=ac,t=Fo(null,a));else if(Xa(t),Yc(g)){if(u=g.nextSibling&&g.nextSibling.dataset,u)var R=u.dgst;u=R,a=Error(d(419)),a.stack="",a.digest=u,Oo({value:a,source:null,stack:null}),t=rc(e,t,n)}else if(Zt||Yl(e,t,n,!1),u=(n&e.childLanes)!==0,Zt||u){if(u=At,u!==null&&(a=yo(u,n),a!==0&&a!==w.retryLane))throw w.retryLane=a,hl(e,a),Dn(u,e,a),tc;qc(g)||pr(),t=rc(e,t,n)}else qc(g)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,Ot=Qn(g.nextSibling),sn=t,et=!0,Ua=null,Vn=!1,e!==null&&od(t,e),t=ic(t,a.children),t.flags|=4096);return t}return l?(Va(),g=a.fallback,l=t.mode,w=e.child,R=w.sibling,a=ga(w,{mode:"hidden",children:a.children}),a.subtreeFlags=w.subtreeFlags&65011712,R!==null?g=ga(R,g):(g=pl(g,l,n,null),g.flags|=2),g.return=t,a.return=t,a.sibling=g,t.child=a,Fo(null,a),a=t.child,g=e.child.memoizedState,g===null?g=lc(n):(l=g.cachePool,l!==null?(w=Qt._currentValue,l=l.parent!==w?{parent:w,pool:w}:l):l=dd(),g={baseLanes:g.baseLanes|n,cachePool:l}),a.memoizedState=g,a.childLanes=oc(e,u,n),t.memoizedState=ac,Fo(e.child,a)):(Xa(t),n=e.child,e=n.sibling,n=ga(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 ic(e,t){return t=or({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function or(e,t){return e=Rn(22,e,null,t),e.lanes=0,e}function rc(e,t,n){return Sl(t,e.child,null,n),e=ic(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),ws(e.return,t,n)}function sc(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=Vt.current,g=(u&2)!==0;if(g?(u=u&1|2,t.flags|=128):u&=1,ae(Vt,u),un(e,t,a,n),a=et?Lo: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&&Ki(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),sc(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&&Ki(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}sc(t,!0,n,null,o,a);break;case"together":sc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Sa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ka|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yl(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=ga(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ga(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ji(e)))}function lg(e,t,n){switch(t.tag){case 3:mt(t,t.stateNode.containerInfo),ja(t,Qt,e.memoizedState.cache),gl();break;case 27:case 5:an(t);break;case 4:mt(t,t.stateNode.containerInfo);break;case 10:ja(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,_s(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Xa(t),t.flags|=128,null):(n&t.child.childLanes)!==0?kf(e,t,n):(Xa(t),e=Sa(e,t,n),e!==null?e.sibling:null);Xa(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Yl(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),ae(Vt,Vt.current),a)break;return null;case 22:return t.lanes=0,yf(e,t,n,t.pendingProps);case 24:ja(t,Qt,e.memoizedState.cache)}return Sa(e,t,n)}function Df(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Zt=!0;else{if(!cc(e,n)&&(t.flags&128)===0)return Zt=!1,lg(e,t,n);Zt=(e.flags&131072)!==0}else Zt=!1,et&&(t.flags&1048576)!==0&&ld(t,Lo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=vl(t.elementType),t.type=e,typeof e=="function")ps(e)?(a=Cl(e,a),t.tag=1,t=wf(null,t,e,a,n)):(t.tag=0,t=nc(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===ie){t.tag=11,t=gf(null,t,e,a,n);break e}else if(l===ne){t.tag=14,t=mf(null,t,e,a,n);break e}}throw t=se(e)||e,Error(d(306,t,""))}}return t;case 0:return nc(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=Cl(a,t.pendingProps),wf(e,t,a,l,n);case 3:e:{if(mt(t,t.stateNode.containerInfo),e===null)throw Error(d(387));a=t.pendingProps;var o=t.memoizedState;l=o.element,Ts(e,t),qo(t,a,null,n);var u=t.memoizedState;if(a=u.cache,ja(t,Qt,a),a!==o.cache&&Cs(t,[Qt],n,!0),jo(),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=Yn(Error(d(424)),t),Oo(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,Ot=Qn(e.firstChild),sn=t,et=!0,Ua=null,Vn=!0,n=bd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(gl(),a===l){t=Sa(e,t,n);break e}un(e,t,a,n)}t=t.child}return t;case 26:return lr(e,t),e===null?(n=Nh(t.type,null,t.pendingProps,null))?t.memoizedState=n:et||(n=t.type,e=t.pendingProps,a=Sr(Ee.current).createElement(n),a[Bt]=t,a[Xt]=e,dn(a,n,e),xe(a),t.stateNode=a):t.memoizedState=Nh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return an(t),e===null&&et&&(a=t.stateNode=Hh(t.type,t.pendingProps,Ee.current),sn=t,Vn=!0,l=Ot,Ia(t.type)?(Gc=l,Ot=Qn(a.firstChild)):Ot=l),un(e,t,t.pendingProps.children,n),lr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&et&&((l=a=Ot)&&(a=_g(a,t.type,t.pendingProps,Vn),a!==null?(t.stateNode=a,sn=t,Ot=Qn(a.firstChild),Vn=!1,l=!0):l=!1),l||Na(t)),an(t),l=t.type,o=t.pendingProps,u=e!==null?e.memoizedProps:null,a=o.children,Uc(l,o)?a=null:u!==null&&Uc(l,u)&&(t.flags|=32),t.memoizedState!==null&&(l=Bs(e,t,$0,null,null,n),ii._currentValue=l),lr(e,t),un(e,t,a,n),t.child;case 6:return e===null&&et&&((e=n=Ot)&&(n=Hg(n,t.pendingProps,Vn),n!==null?(t.stateNode=n,sn=t,Ot=null,e=!0):e=!1),e||Na(t)),null;case 13:return kf(e,t,n);case 4:return mt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Sl(t,null,a,n):un(e,t,a,n),t.child;case 11:return gf(e,t,t.type,t.pendingProps,n);case 7:return un(e,t,t.pendingProps,n),t.child;case 8:return un(e,t,t.pendingProps.children,n),t.child;case 12:return un(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,ja(t,t.type,a.value),un(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,bl(t),l=cn(l),a=a(l),t.flags|=1,un(e,t,a,n),t.child;case 14:return mf(e,t,t.type,t.pendingProps,n);case 15:return bf(e,t,t.type,t.pendingProps,n);case 19:return Mf(e,t,n);case 31:return ag(e,t,n);case 22:return yf(e,t,n,t.pendingProps);case 24:return bl(t),a=cn(Qt),e===null?(l=Ms(),l===null&&(l=At,o=ks(),l.pooledCache=o,o.refCount++,o!==null&&(l.pooledCacheLanes|=n),l=o),t.memoizedState={parent:a,cache:l},As(t),ja(t,Qt,l)):((e.lanes&n)!==0&&(Ts(e,t),qo(t,null,null,n),jo()),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),ja(t,Qt,a)):(a=o.cache,ja(t,Qt,a),a!==l.cache&&Cs(t,[Qt],n,!0))),un(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function wa(e){e.flags|=4}function uc(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 xl=Xi,Ds}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 xl=Xi,Ds}function ir(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ea():536870912,e.lanes|=t,Pl|=t)}function Qo(e,t){if(!et)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 _t(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 og(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 _t(t),null;case 1:return _t(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ya(Qt),Oe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ql(t)?wa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xs())),_t(t),null;case 26:var l=t.type,o=t.memoizedState;return e===null?(wa(t),o!==null?(_t(t),Af(t,o)):(_t(t),uc(t,l,null,a,n))):o?o!==e.memoizedState?(wa(t),_t(t),Af(t,o)):(_t(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&wa(t),_t(t),uc(t,l,e,a,n)),null;case 27:if($e(t),n=Ee.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&wa(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return _t(t),null}e=oe.current,ql(t)?id(t):(e=Hh(l,a,n),t.stateNode=e,wa(t))}return _t(t),null;case 5:if($e(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&wa(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return _t(t),null}if(o=oe.current,ql(t))id(t);else{var u=Sr(Ee.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[Bt]=t,o[Xt]=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(dn(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&&wa(t)}}return _t(t),uc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&wa(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(e=Ee.current,ql(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=sn,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[Bt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||kh(e.nodeValue,n)),e||Na(t,!0)}else e=Sr(e).createTextNode(a),e[Bt]=t,t.stateNode=e}return _t(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=ql(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[Bt]=t}else gl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;_t(t),e=!1}else n=xs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(On(t),t):(On(t),null);if((t.flags&128)!==0)throw Error(d(558))}return _t(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=ql(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[Bt]=t}else gl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;_t(t),l=!1}else l=xs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(On(t),t):(On(t),null)}return On(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ir(t,t.updateQueue),_t(t),null);case 4:return Oe(),e===null&&Lc(t.stateNode.containerInfo),_t(t),null;case 10:return ya(t.type),_t(t),null;case 19:if(H(Vt),a=t.memoizedState,a===null)return _t(t),null;if(l=(t.flags&128)!==0,o=a.rendering,o===null)if(l)Qo(a,!1);else{if(Yt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Ki(e),o!==null){for(t.flags|=128,Qo(a,!1),e=o.updateQueue,t.updateQueue=e,ir(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)td(n,e),n=n.sibling;return ae(Vt,Vt.current&1|2),et&&ma(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Lt()>dr&&(t.flags|=128,l=!0,Qo(a,!1),t.lanes=4194304)}else{if(!l)if(e=Ki(o),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,ir(t,e),Qo(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!et)return _t(t),null}else 2*Lt()-a.renderingStartTime>dr&&n!==536870912&&(t.flags|=128,l=!0,Qo(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=Lt(),e.sibling=null,n=Vt.current,ae(Vt,l?n&1|2:n&1),et&&ma(t,a.treeForkCount),e):(_t(t),null);case 22:case 23:return On(t),Os(),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&&(_t(t),t.subtreeFlags&6&&(t.flags|=8192)):_t(t),n=t.updateQueue,n!==null&&ir(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&&H(yl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ya(Qt),_t(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function ig(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 ya(Qt),Oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return $e(t),null;case 31:if(t.memoizedState!==null){if(On(t),t.alternate===null)throw Error(d(340));gl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(On(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));gl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(Vt),null;case 4:return Oe(),null;case 10:return ya(t.type),null;case 22:case 23:return On(t),Os(),e!==null&&H(yl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(Qt),null;case 25:return null;default:return null}}function Tf(e,t){switch(ys(t),t.tag){case 3:ya(Qt),Oe();break;case 26:case 27:case 5:$e(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&On(t);break;case 13:On(t);break;case 19:H(Vt);break;case 10:ya(t.type);break;case 22:case 23:On(t),Os(),e!==null&&H(yl);break;case 24:ya(Qt)}}function Ko(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){wt(t,t.return,g)}}function Fa(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(G){wt(l,w,G)}}}a=a.next}while(a!==o)}}catch(G){wt(t,t.return,G)}}function Ef(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{vd(t,n)}catch(a){wt(e,e.return,a)}}}function Rf(e,t,n){n.props=Cl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){wt(e,t,a)}}function Zo(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){wt(e,t,l)}}function la(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){wt(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){wt(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){wt(e,e.return,l)}}function dc(e,t,n){try{var a=e.stateNode;Ag(a,e.type,n,t),a[Xt]=t}catch(l){wt(e,e.return,l)}}function Of(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ia(e.type)||e.tag===4}function fc(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&&Ia(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 hc(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=ha));else if(a!==4&&(a===27&&Ia(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(hc(e,t,n),e=e.sibling;e!==null;)hc(e,t,n),e=e.sibling}function rr(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&&Ia(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rr(e,t,n),e=e.sibling;e!==null;)rr(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]);dn(t,a,n),t[Bt]=e,t[Xt]=n}catch(o){wt(e,e.return,o)}}var Ca=!1,$t=!1,pc=!1,Hf=typeof WeakSet=="function"?WeakSet:Set,ln=null;function rg(e,t){if(e=e.containerInfo,Hc=Ar,e=Qu(e),rs(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,G=0,K=e,O=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;)O=K,K=B;for(;;){if(K===e)break t;if(O===n&&++R===l&&(g=u),O===o&&++G===a&&(w=u),(B=K.nextSibling)!==null)break;K=O,O=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(Bc={focusedElem:e,selectionRange:n},Ar=!1,ln=t;ln!==null;)if(t=ln,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ln=e;else for(;ln!==null;){switch(t=ln,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,n=t,l=o.memoizedProps,o=o.memoizedState,a=n.stateNode;try{var ye=Cl(n.type,l);e=a.getSnapshotBeforeUpdate(ye,o),a.__reactInternalSnapshotBeforeUpdate=e}catch(Le){wt(n,n.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)jc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":jc(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,ln=e;break}ln=t.return}}function Bf(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:za(e,n),a&4&&Ko(5,n);break;case 1:if(za(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(u){wt(n,n.return,u)}else{var l=Cl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){wt(n,n.return,u)}}a&64&&Ef(n),a&512&&Zo(n,n.return);break;case 3:if(za(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){wt(n,n.return,u)}}break;case 27:t===null&&a&4&&_f(n);case 26:case 5:za(e,n),t===null&&a&4&&Lf(n),a&512&&Zo(n,n.return);break;case 12:za(e,n);break;case 31:za(e,n),a&4&&jf(e,n);break;case 13:za(e,n),a&4&&qf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=mg.bind(null,n),Bg(e,n))));break;case 22:if(a=n.memoizedState!==null||Ca,!a){t=t!==null&&t.memoizedState!==null||$t,l=Ca;var o=$t;Ca=a,($t=t)&&!o?Ma(e,n,(n.subtreeFlags&8772)!==0):za(e,n),Ca=l,$t=o}break;case 30:break;default:za(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&&So(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ut=null,Cn=!1;function ka(e,t,n){for(n=n.child;n!==null;)Nf(e,t,n),n=n.sibling}function Nf(e,t,n){if(Ae&&typeof Ae.onCommitFiberUnmount=="function")try{Ae.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:$t||la(n,t),ka(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$t||la(n,t);var a=Ut,l=Cn;Ia(n.type)&&(Ut=n.stateNode,Cn=!1),ka(e,t,n),ai(n.stateNode),Ut=a,Cn=l;break;case 5:$t||la(n,t);case 6:if(a=Ut,l=Cn,Ut=null,ka(e,t,n),Ut=a,Cn=l,Ut!==null)if(Cn)try{(Ut.nodeType===9?Ut.body:Ut.nodeName==="HTML"?Ut.ownerDocument.body:Ut).removeChild(n.stateNode)}catch(o){wt(n,t,o)}else try{Ut.removeChild(n.stateNode)}catch(o){wt(n,t,o)}break;case 18:Ut!==null&&(Cn?(e=Ut,Eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ro(e)):Eh(Ut,n.stateNode));break;case 4:a=Ut,l=Cn,Ut=n.stateNode.containerInfo,Cn=!0,ka(e,t,n),Ut=a,Cn=l;break;case 0:case 11:case 14:case 15:Fa(2,n,t),$t||Fa(4,n,t),ka(e,t,n);break;case 1:$t||(la(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Rf(n,t,a)),ka(e,t,n);break;case 21:ka(e,t,n);break;case 22:$t=(a=$t)||n.memoizedState!==null,ka(e,t,n),$t=a;break;default:ka(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{ro(e)}catch(n){wt(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{ro(e)}catch(n){wt(t,t.return,n)}}function sg(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 sr(e,t){var n=sg(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=bg.bind(null,e,a);a.then(l,l)}})}function kn(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(Ia(g.type)){Ut=g.stateNode,Cn=!1;break e}break;case 5:Ut=g.stateNode,Cn=!1;break e;case 3:case 4:Ut=g.stateNode.containerInfo,Cn=!0;break e}g=g.return}if(Ut===null)throw Error(d(160));Nf(o,u,l),Ut=null,Cn=!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:kn(t,e),zn(e),a&4&&(Fa(3,e,e.return),Ko(3,e),Fa(5,e,e.return));break;case 1:kn(t,e),zn(e),a&512&&($t||n===null||la(n,n.return)),a&64&&Ca&&(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(kn(t,e),zn(e),a&512&&($t||n===null||la(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[cl]||o[Bt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=l.createElement(a),l.head.insertBefore(o,l.querySelector("head > title"))),dn(o,a,n),o[Bt]=e,xe(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),dn(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),dn(o,a,n),l.head.appendChild(o);break;default:throw Error(d(468,a))}o[Bt]=e,xe(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&&dc(e,e.memoizedProps,n.memoizedProps)}break;case 27:kn(t,e),zn(e),a&512&&($t||n===null||la(n,n.return)),n!==null&&a&4&&dc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(kn(t,e),zn(e),a&512&&($t||n===null||la(n,n.return)),e.flags&32){l=e.stateNode;try{El(l,"")}catch(ye){wt(e,e.return,ye)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,dc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(pc=!0);break;case 6:if(kn(t,e),zn(e),a&4){if(e.stateNode===null)throw Error(d(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ye){wt(e,e.return,ye)}}break;case 3:if(kr=null,l=Jn,Jn=wr(t.containerInfo),kn(t,e),Jn=l,zn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{ro(t.containerInfo)}catch(ye){wt(e,e.return,ye)}pc&&(pc=!1,Gf(e));break;case 4:a=Jn,Jn=wr(e.stateNode.containerInfo),kn(t,e),zn(e),Jn=a;break;case 12:kn(t,e),zn(e);break;case 31:kn(t,e),zn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,sr(e,a)));break;case 13:kn(t,e),zn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ur=Lt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,sr(e,a)));break;case 22:l=e.memoizedState!==null;var w=n!==null&&n.memoizedState!==null,R=Ca,G=$t;if(Ca=R||l,$t=G||w,kn(t,e),$t=G,Ca=R,zn(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||w||Ca||$t||kl(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,O=K!=null&&K.hasOwnProperty("display")?K.display:null;g.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(ye){wt(w,w.return,ye)}}}else if(t.tag===6){if(n===null){w=t;try{w.stateNode.nodeValue=l?"":w.memoizedProps}catch(ye){wt(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){wt(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,sr(e,n))));break;case 19:kn(t,e),zn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,sr(e,a)));break;case 30:break;case 21:break;default:kn(t,e),zn(e)}}function zn(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=fc(e);rr(e,o,l);break;case 5:var u=n.stateNode;n.flags&32&&(El(u,""),n.flags&=-33);var g=fc(e);rr(e,g,u);break;case 3:case 4:var w=n.stateNode.containerInfo,R=fc(e);hc(e,R,w);break;default:throw Error(d(161))}}catch(G){wt(e,e.return,G)}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 za(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Bf(e,t.alternate,t),t=t.sibling}function kl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Fa(4,t,t.return),kl(t);break;case 1:la(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Rf(t,t.return,n),kl(t);break;case 27:ai(t.stateNode);case 26:case 5:la(t,t.return),kl(t);break;case 22:t.memoizedState===null&&kl(t);break;case 30:kl(t);break;default:kl(t)}e=e.sibling}}function Ma(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:Ma(l,o,n),Ko(4,o);break;case 1:if(Ma(l,o,n),a=o,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(R){wt(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++)yd(w[l],g)}catch(R){wt(a,a.return,R)}}n&&u&64&&Ef(o),Zo(o,o.return);break;case 27:_f(o);case 26:case 5:Ma(l,o,n),n&&a===null&&u&4&&Lf(o),Zo(o,o.return);break;case 12:Ma(l,o,n);break;case 31:Ma(l,o,n),n&&u&4&&jf(l,o);break;case 13:Ma(l,o,n),n&&u&4&&qf(l,o);break;case 22:o.memoizedState===null&&Ma(l,o,n),Zo(o,o.return);break;case 30:break;default:Ma(l,o,n)}t=t.sibling}}function gc(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&&_o(n))}function mc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_o(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&&Ko(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&&_o(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){wt(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):$o(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&&gc(u,t);break;case 24:Wn(e,t,n,a),l&2048&&mc(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),Ko(8,u);break;case 23:break;case 22:var G=u.stateNode;u.memoizedState!==null?G._visibility&2?Jl(o,u,g,w,l):$o(o,u):(G._visibility|=2,Jl(o,u,g,w,l)),l&&R&2048&&gc(u.alternate,u);break;case 24:Jl(o,u,g,w,l),l&&R&2048&&mc(u.alternate,u);break;default:Jl(o,u,g,w,l)}t=t.sibling}}function $o(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:$o(n,a),l&2048&&gc(a.alternate,a);break;case 24:$o(n,a),l&2048&&mc(a.alternate,a);break;default:$o(n,a)}t=t.sibling}}var Jo=8192;function Wl(e,t,n){if(e.subtreeFlags&Jo)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&Jo&&e.memoizedState!==null&&Zg(n,Jn,e.memoizedState,e.memoizedProps);break;case 5:Wl(e,t,n);break;case 3:case 4:var a=Jn;Jn=wr(e.stateNode.containerInfo),Wl(e,t,n),Jn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Jo,Jo=16777216,Wl(e,t,n),Jo=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 Wo(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];ln=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:Wo(e),e.flags&2048&&Fa(9,e,e.return);break;case 3:Wo(e);break;case 12:Wo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cr(e)):Wo(e);break;default:Wo(e)}}function cr(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];ln=a,Kf(a,e)}Ff(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Fa(8,t,t.return),cr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,cr(t));break;default:cr(t)}e=e.sibling}}function Kf(e,t){for(;ln!==null;){var n=ln;switch(n.tag){case 0:case 11:case 15:Fa(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:_o(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,ln=a;else e:for(n=e;ln!==null;){a=ln;var l=a.sibling,o=a.return;if(Uf(a),a===n){ln=null;break e}if(l!==null){l.return=o,ln=l;break e}ln=o}}}var cg={getCacheForType:function(e){var t=cn(Qt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return cn(Qt).controller.signal}},ug=typeof WeakMap=="function"?WeakMap:Map,ht=0,At=null,Je=null,Ie=0,St=0,_n=null,Qa=!1,Il=!1,bc=!1,Da=0,Yt=0,Ka=0,zl=0,yc=0,Hn=0,Pl=0,Io=null,Mn=null,vc=!1,ur=0,Zf=0,dr=1/0,fr=null,Za=null,nn=0,$a=null,eo=null,Aa=0,xc=0,Sc=null,$f=null,Po=0,wc=null;function Bn(){return(ht&2)!==0&&Ie!==0?Ie&-Ie:T.T!==null?Ac():wi()}function Jf(){if(Hn===0)if((Ie&536870912)===0||et){var e=U;U<<=1,(U&3932160)===0&&(U=262144),Hn=e}else Hn=536870912;return e=Ln.current,e!==null&&(e.flags|=32),Hn}function Dn(e,t,n){(e===At&&(St===2||St===9)||e.cancelPendingCommit!==null)&&(to(e,0),Ja(e,Ie,Hn,!1)),dt(e,n),((ht&2)===0||e!==At)&&(e===At&&((ht&2)===0&&(zl|=n),Yt===4&&Ja(e,Ie,Hn,!1)),oa(e))}function Wf(e,t,n){if((ht&6)!==0)throw Error(d(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||lt(e,t),l=a?hg(e,t):kc(e,t,!0),o=a;do{if(l===0){Il&&!a&&Ja(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!dg(n)){l=kc(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=Io;var w=g.current.memoizedState.isDehydrated;if(w&&(to(g,u).flags|=256),u=kc(g,u,!1),u!==2){if(bc&&!w){g.errorRecoveryDisabledLanes|=o,zl|=o,l=4;break e}o=Mn,Mn=l,o!==null&&(Mn===null?Mn=o:Mn.push.apply(Mn,o))}l=u}if(o=!1,l!==2)continue}}if(l===1){to(e,0),Ja(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:Ja(a,t,Hn,!Qa);break e;case 2:Mn=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(l=ur+300-Lt(),10<l)){if(Ja(a,t,Hn,!Qa),Ze(a,0,!0)!==0)break e;Aa=t,a.timeoutHandle=Ah(If.bind(null,a,n,Mn,fr,vc,t,Hn,zl,Pl,Qa,o,"Throttled",-0,0),l);break e}If(a,n,Mn,fr,vc,t,Hn,zl,Pl,Qa,o,null,-0,0)}}break}while(!0);oa(e)}function If(e,t,n,a,l,o,u,g,w,R,G,K,O,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:ha},Vf(t,o,K);var ye=(o&62914560)===o?ur-Lt():(o&4194048)===o?Zf-Lt():0;if(ye=$g(K,ye),ye!==null){Aa=o,e.cancelPendingCommit=ye(ih.bind(null,e,t,o,n,a,l,u,g,w,G,K,null,O,B)),Ja(e,o,u,!R);return}}ih(e,t,o,n,a,l,u,g,w)}function dg(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(!En(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 Ja(e,t,n,a){t&=~yc,t&=~zl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var o=31-xt(l),u=1<<o;a[o]=-1,l&=~u}n!==0&&xi(e,n,t)}function hr(){return(ht&6)===0?(ei(0),!1):!0}function Cc(){if(Je!==null){if(St===0)var e=Je.return;else e=Je,ba=ml=null,js(e),Fl=null,Bo=0,e=Je;for(;e!==null;)Tf(e.alternate,e),e=e.return;Je=null}}function to(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Rg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Aa=0,Cc(),At=e,Je=n=ga(e.current,null),Ie=t,St=0,_n=null,Qa=!1,Il=lt(e,t),bc=!1,Pl=Hn=yc=zl=Ka=Yt=0,Mn=Io=null,vc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-xt(a),o=1<<l;t|=e[l],a&=~o}return Da=t,_i(),n}function Pf(e,t){Qe=null,T.H=Vo,t===Vl||t===Gi?(t=pd(),St=3):t===Ds?(t=pd(),St=4):St=t===tc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,_n=t,Je===null&&(Yt=1,nr(e,Yn(t,e.current)))}function eh(){var e=Ln.current;return e===null?!0:(Ie&4194048)===Ie?Fn===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?e===Fn:!1}function th(){var e=T.H;return T.H=Vo,e===null?Vo:e}function nh(){var e=T.A;return T.A=cg,e}function pr(){Yt=4,Qa||(Ie&4194048)!==Ie&&Ln.current!==null||(Il=!0),(Ka&134217727)===0&&(zl&134217727)===0||At===null||Ja(At,Ie,Hn,!1)}function kc(e,t,n){var a=ht;ht|=2;var l=th(),o=nh();(At!==e||Ie!==t)&&(fr=null,to(e,t)),t=!1;var u=Yt;e:do try{if(St!==0&&Je!==null){var g=Je,w=_n;switch(St){case 8:Cc(),u=6;break e;case 3:case 2:case 9:case 6:Ln.current===null&&(t=!0);var R=St;if(St=0,_n=null,no(e,g,w,R),n&&Il){u=0;break e}break;default:R=St,St=0,_n=null,no(e,g,w,R)}}fg(),u=Yt;break}catch(G){Pf(e,G)}while(!0);return t&&e.shellSuspendCounter++,ba=ml=null,ht=a,T.H=l,T.A=o,Je===null&&(At=null,Ie=0,_i()),u}function fg(){for(;Je!==null;)ah(Je)}function hg(e,t){var n=ht;ht|=2;var a=th(),l=nh();At!==e||Ie!==t?(fr=null,dr=Lt()+500,to(e,t)):Il=lt(e,t);e:do try{if(St!==0&&Je!==null){t=Je;var o=_n;t:switch(St){case 1:St=0,_n=null,no(e,t,o,1);break;case 2:case 9:if(fd(o)){St=0,_n=null,lh(t);break}t=function(){St!==2&&St!==9||At!==e||(St=7),oa(e)},o.then(t,t);break e;case 3:St=7;break e;case 4:St=5;break e;case 7:fd(o)?(St=0,_n=null,lh(t)):(St=0,_n=null,no(e,t,o,7));break;case 5:var u=null;switch(Je.tag){case 26:u=Je.memoizedState;case 5:case 27:var g=Je;if(u?Xh(u):g.stateNode.complete){St=0,_n=null;var w=g.sibling;if(w!==null)Je=w;else{var R=g.return;R!==null?(Je=R,gr(R)):Je=null}break t}}St=0,_n=null,no(e,t,o,5);break;case 6:St=0,_n=null,no(e,t,o,6);break;case 8:Cc(),Yt=6;break e;default:throw Error(d(462))}}pg();break}catch(G){Pf(e,G)}while(!0);return ba=ml=null,T.H=a,T.A=l,ht=n,Je!==null?0:(At=null,Ie=0,_i(),Yt)}function pg(){for(;Je!==null&&!at();)ah(Je)}function ah(e){var t=Df(e.alternate,e,Da);e.memoizedProps=e.pendingProps,t===null?gr(e):Je=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,Ie);break;case 11:t=Sf(n,t,t.pendingProps,t.type.render,t.ref,Ie);break;case 5:js(t);default:Tf(n,t),t=Je=td(t,Da),t=Df(n,t,Da)}e.memoizedProps=e.pendingProps,t===null?gr(e):Je=t}function no(e,t,n,a){ba=ml=null,js(t),Fl=null,Bo=0;var l=t.return;try{if(ng(e,l,t,n,Ie)){Yt=1,nr(e,Yn(n,e.current)),Je=null;return}}catch(o){if(l!==null)throw Je=l,o;Yt=1,nr(e,Yn(n,e.current)),Je=null;return}t.flags&32768?(et||a===1?e=!0:Il||(Ie&536870912)!==0?e=!1:(Qa=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ln.current,a!==null&&a.tag===13&&(a.flags|=16384))),oh(t,e)):gr(t)}function gr(e){var t=e;do{if((t.flags&32768)!==0){oh(t,Qa);return}e=t.return;var n=og(t.alternate,t,Da);if(n!==null){Je=n;return}if(t=t.sibling,t!==null){Je=t;return}Je=t=e}while(t!==null);Yt===0&&(Yt=5)}function oh(e,t){do{var n=ig(e.alternate,e);if(n!==null){n.flags&=32767,Je=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Je=e;return}Je=e=n}while(e!==null);Yt=6,Je=null}function ih(e,t,n,a,l,o,u,g,w){e.cancelPendingCommit=null;do mr();while(nn!==0);if((ht&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(o=t.lanes|t.childLanes,o|=fs,ft(e,n,o,u,g,w),e===At&&(Je=At=null,Ie=0),eo=t,$a=e,Aa=n,xc=o,Sc=l,$f=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,yg(Sn,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=I.p,I.p=2,u=ht,ht|=4;try{rg(e,t,n)}finally{ht=u,I.p=l,T.T=a}}nn=1,rh(),sh(),ch()}}function rh(){if(nn===1){nn=0;var e=$a,t=eo,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=T.T,T.T=null;var a=I.p;I.p=2;var l=ht;ht|=4;try{Yf(t,e);var o=Bc,u=Qu(e.containerInfo),g=o.focusedElem,w=o.selectionRange;if(u!==g&&g&&g.ownerDocument&&Fu(g.ownerDocument.documentElement,g)){if(w!==null&&rs(g)){var R=w.start,G=w.end;if(G===void 0&&(G=R),"selectionStart"in g)g.selectionStart=R,g.selectionEnd=Math.min(G,g.value.length);else{var K=g.ownerDocument||document,O=K&&K.defaultView||window;if(O.getSelection){var B=O.getSelection(),ye=g.textContent.length,Le=Math.min(w.start,ye),Dt=w.end===void 0?Le:Math.min(w.end,ye);!B.extend&&Le>Dt&&(u=Dt,Dt=Le,Le=u);var M=Vu(g,Le),k=Vu(g,Dt);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>Dt?(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 Q=K[g];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}Ar=!!Hc,Bc=Hc=null}finally{ht=l,I.p=a,T.T=n}}e.current=t,nn=2}}function sh(){if(nn===2){nn=0;var e=$a,t=eo,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=T.T,T.T=null;var a=I.p;I.p=2;var l=ht;ht|=4;try{Bf(e,t.alternate,t)}finally{ht=l,I.p=a,T.T=n}}nn=3}}function ch(){if(nn===4||nn===3){nn=0,ze();var e=$a,t=eo,n=Aa,a=$f;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?nn=5:(nn=0,eo=$a=null,uh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(Za=null),vo(n),t=t.stateNode,Ae&&typeof Ae.onCommitFiberRoot=="function")try{Ae.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=T.T,l=I.p,I.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,I.p=l}}(Aa&3)!==0&&mr(),oa(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===wc?Po++:(Po=0,wc=e):Po=0,ei(0)}}function uh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_o(t)))}function mr(){return rh(),sh(),ch(),dh()}function dh(){if(nn!==5)return!1;var e=$a,t=xc;xc=0;var n=vo(Aa),a=T.T,l=I.p;try{I.p=32>n?32:n,T.T=null,n=Sc,Sc=null;var o=$a,u=Aa;if(nn=0,eo=$a=null,Aa=0,(ht&6)!==0)throw Error(d(331));var g=ht;if(ht|=4,Qf(o.current),Xf(o,o.current,u,n),ht=g,ei(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot=="function")try{Ae.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{I.p=l,T.T=a,uh(e,t)}}function fh(e,t,n){t=Yn(n,t),t=ec(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(dt(e,2),oa(e))}function wt(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"&&(Za===null||!Za.has(a))){e=Yn(n,e),n=hf(2),a=Ga(t,n,2),a!==null&&(pf(n,a,t,e),dt(a,2),oa(a));break}}t=t.return}}function zc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new ug;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)||(bc=!0,l.add(n),e=gg.bind(null,e,t,n),t.then(e,e))}function gg(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,At===e&&(Ie&n)===n&&(Yt===4||Yt===3&&(Ie&62914560)===Ie&&300>Lt()-ur?(ht&2)===0&&to(e,0):yc|=n,Pl===Ie&&(Pl=0)),oa(e)}function hh(e,t){t===0&&(t=ea()),e=hl(e,t),e!==null&&(dt(e,t),oa(e))}function mg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hh(e,n)}function bg(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 bt(e,t)}var br=null,ao=null,Mc=!1,yr=!1,Dc=!1,Wa=0;function oa(e){e!==ao&&e.next===null&&(ao===null?br=ao=e:ao=ao.next=e),yr=!0,Mc||(Mc=!0,xg())}function ei(e,t){if(!Dc&&yr){Dc=!0;do for(var n=!1,a=br;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-xt(42|e)+1)-1,o&=l&~(u&~g),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,bh(a,o))}else o=Ie,o=Ze(a,a===At?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(o&3)===0||lt(a,o)||(n=!0,bh(a,o));a=a.next}while(n);Dc=!1}}function vg(){ph()}function ph(){yr=Mc=!1;var e=0;Wa!==0&&Eg()&&(e=Wa);for(var t=Lt(),n=null,a=br;a!==null;){var l=a.next,o=gh(a,t);o===0?(a.next=null,n===null?br=l:n.next=l,l===null&&(ao=n)):(n=a,(e!==0||(o&3)!==0)&&(yr=!0)),a=l}nn!==0&&nn!==5||ei(e),Wa!==0&&(Wa=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-xt(o),g=1<<u,w=l[u];w===-1?((g&n)===0||(g&a)!==0)&&(l[u]=Pn(g,t)):w<=t&&(e.expiredLanes|=g),o&=~g}if(t=At,n=Ie,n=Ze(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(St===2||St===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Rt(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||lt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Rt(a),vo(n)){case 2:case 8:n=xn;break;case 32:n=Sn;break;case 268435456:n=ue;break;default:n=Sn}return a=mh.bind(null,e),n=bt(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Rt(a),e.callbackPriority=2,e.callbackNode=null,2}function mh(e,t){if(nn!==0&&nn!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(mr()&&e.callbackNode!==n)return null;var a=Ie;return a=Ze(e,e===At?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Wf(e,a,t),gh(e,Lt()),e.callbackNode!=null&&e.callbackNode===n?mh.bind(null,e):null)}function bh(e,t){if(mr())return null;Wf(e,t,!0)}function xg(){Lg(function(){(ht&6)!==0?bt(rn,vg):ph()})}function Ac(){if(Wa===0){var e=Gl;e===0&&(e=La,La<<=1,(La&261888)===0&&(La=256)),Wa=e}return Wa}function yh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Mi(""+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 Sg(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var o=yh((l[Xt]||null).action),u=a.submitter;u&&(t=(t=u[Xt]||null)?yh(t.formAction):u.getAttribute("formAction"),t!==null&&(o=t,u=null));var g=new Ei("action","action",null,a,l);e.push({event:g,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Wa!==0){var w=u?vh(l,u):new FormData(l);Zs(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),Zs(n,{pending:!0,data:w,method:l.method,action:o},o,w))},currentTarget:l}]})}}for(var Tc=0;Tc<ds.length;Tc++){var Ec=ds[Tc],wg=Ec.toLowerCase(),Cg=Ec[0].toUpperCase()+Ec.slice(1);$n(wg,"on"+Cg)}$n($u,"onAnimationEnd"),$n(Ju,"onAnimationIteration"),$n(Wu,"onAnimationStart"),$n("dblclick","onDoubleClick"),$n("focusin","onFocus"),$n("focusout","onBlur"),$n(j0,"onTransitionRun"),$n(q0,"onTransitionStart"),$n(Y0,"onTransitionCancel"),$n(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 ti="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(" "),kg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ti));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(G){Oi(G)}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(G){Oi(G)}l.currentTarget=null,o=w}}}}function We(e,t){var n=t[Al];n===void 0&&(n=t[Al]=new Set);var a=e+"__bubble";n.has(a)||(Sh(t,e,2,!1),n.add(a))}function Rc(e,t,n){var a=0;t&&(a|=4),Sh(n,e,a,t)}var vr="_reactListening"+Math.random().toString(36).slice(2);function Lc(e){if(!e[vr]){e[vr]=!0,_e.forEach(function(n){n!=="selectionchange"&&(kg.has(n)||Rc(n,!1,e),Rc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vr]||(t[vr]=!0,Rc("selectionchange",!1,t))}}function Sh(e,t,n,a){switch(Jh(t)){case 2:var l=Ig;break;case 8:l=Pg;break;default:l=Kc}n=l.bind(null,t,n,e),l=void 0,!Ir||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 Oc(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=da(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,G=Jr(n),K=[];e:{var O=Pu.get(e);if(O!==void 0){var B=Ei,ye=e;switch(e){case"keypress":if(Ai(n)===0)break e;case"keydown":case"keyup":B=b0;break;case"focusin":ye="focus",B=ns;break;case"focusout":ye="blur",B=ns;break;case"beforeblur":case"afterblur":B=ns;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=o0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=x0;break;case $u:case Ju:case Wu:B=s0;break;case Iu:B=w0;break;case"scroll":case"scrollend":B=a0;break;case"wheel":B=k0;break;case"copy":case"cut":case"paste":B=u0;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=M0}var Le=(t&4)!==0,Dt=!Le&&(e==="scroll"||e==="scrollend"),M=Le?O!==null?O+"Capture":null:O;Le=[];for(var k=R,E;k!==null;){var Q=k;if(E=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||E===null||M===null||(Q=Co(k,M),Q!=null&&Le.push(ni(k,Q,E))),Dt)break;k=k.return}0<Le.length&&(O=new B(O,ye,null,n,G),K.push({event:O,listeners:Le}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",O&&n!==$r&&(ye=n.relatedTarget||n.fromElement)&&(da(ye)||ye[Tn]))break e;if((B||O)&&(O=G.window===G?G:(O=G.ownerDocument)?O.defaultView||O.parentWindow:window,B?(ye=n.relatedTarget||n.toElement,B=R,ye=ye?da(ye):null,ye!==null&&(Dt=p(ye),Le=ye.tag,ye!==Dt||Le!==5&&Le!==27&&Le!==6)&&(ye=null)):(B=null,ye=R),B!==ye)){if(Le=Au,Q="onMouseLeave",M="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(Le=Eu,Q="onPointerLeave",M="onPointerEnter",k="pointer"),Dt=B==null?O:ce(B),E=ye==null?O:ce(ye),O=new Le(Q,k+"leave",B,n,G),O.target=Dt,O.relatedTarget=E,Q=null,da(G)===R&&(Le=new Le(M,k+"enter",ye,n,G),Le.target=E,Le.relatedTarget=Dt,Q=Le),Dt=Q,B&&ye)t:{for(Le=zg,M=B,k=ye,E=0,Q=M;Q;Q=Le(Q))E++;Q=0;for(var Te=k;Te;Te=Le(Te))Q++;for(;0<E-Q;)M=Le(M),E--;for(;0<Q-E;)k=Le(k),Q--;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,O,B,Le,!1),ye!==null&&Dt!==null&&wh(K,Dt,ye,Le,!0)}}e:{if(O=R?ce(R):window,B=O.nodeName&&O.nodeName.toLowerCase(),B==="select"||B==="input"&&O.type==="file")var st=Nu;else if(Bu(O))if(ju)st=B0;else{st=_0;var ke=O0}else B=O.nodeName,!B||B.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?R&&Zr(R.elementType)&&(st=Nu):st=H0;if(st&&(st=st(e,R))){Uu(K,st,n,G);break e}ke&&ke(e,O,R),e==="focusout"&&R&&O.type==="number"&&R.memoizedProps.value!=null&&Kr(O,"number",O.value)}switch(ke=R?ce(R):window,e){case"focusin":(Bu(ke)||ke.contentEditable==="true")&&(_l=ke,ss=R,Ro=null);break;case"focusout":Ro=ss=_l=null;break;case"mousedown":cs=!0;break;case"contextmenu":case"mouseup":case"dragend":cs=!1,Ku(K,n,G);break;case"selectionchange":if(N0)break;case"keydown":case"keyup":Ku(K,n,G)}var Ke;if(ls)e:{switch(e){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else Ol?_u(e,n)&&(Pe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Pe="onCompositionStart");Pe&&(Ru&&n.locale!=="ko"&&(Ol||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&Ol&&(Ke=Mu()):(Ha=G,Pr="value"in Ha?Ha.value:Ha.textContent,Ol=!0)),ke=xr(R,Pe),0<ke.length&&(Pe=new Tu(Pe,e,null,n,G),K.push({event:Pe,listeners:ke}),Ke?Pe.data=Ke:(Ke=Hu(n),Ke!==null&&(Pe.data=Ke)))),(Ke=A0?T0(e,n):E0(e,n))&&(Pe=xr(R,"onBeforeInput"),0<Pe.length&&(ke=new Tu("onBeforeInput","beforeinput",null,n,G),K.push({event:ke,listeners:Pe}),ke.data=Ke)),Sg(K,e,R,n,G)}xh(K,t)})}function ni(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xr(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=Co(e,n),l!=null&&a.unshift(ni(e,l,o)),l=Co(e,t),l!=null&&a.push(ni(e,l,o))),e.tag===3)return a;e=e.return}return[]}function zg(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=Co(n,o),R!=null&&u.unshift(ni(n,R,w))):l||(R=Co(n,o),R!=null&&u.push(ni(n,R,w)))),n=n.return}u.length!==0&&e.push({event:t,listeners:u})}var Mg=/\r\n?/g,Dg=/\u0000|\uFFFD/g;function Ch(e){return(typeof e=="string"?e:""+e).replace(Mg,`
|
|
9
|
+
`).replace(Dg,"")}function kh(e,t){return t=Ch(t),Ch(e)===t}function Mt(e,t,n,a,l,o){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||El(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&El(e,""+a);break;case"className":ki(e,"class",a);break;case"tabIndex":ki(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ki(e,n,a);break;case"style":Cu(e,a,o);break;case"data":if(t!=="object"){ki(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=Mi(""+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"&&Mt(e,t,"name",l.name,l,null),Mt(e,t,"formEncType",l.formEncType,l,null),Mt(e,t,"formMethod",l.formMethod,l,null),Mt(e,t,"formTarget",l.formTarget,l,null)):(Mt(e,t,"encType",l.encType,l,null),Mt(e,t,"method",l.method,l,null),Mt(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Mi(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=ha);break;case"onScroll":a!=null&&We("scroll",e);break;case"onScrollEnd":a!=null&&We("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=Mi(""+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":We("beforetoggle",e),We("toggle",e),Ci(e,"popover",a);break;case"xlinkActuate":fa(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":fa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":fa(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":fa(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":fa(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":fa(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":fa(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":fa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":fa(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Ci(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=t0.get(n)||n,Ci(e,n,a))}}function _c(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"?El(e,a):(typeof a=="number"||typeof a=="bigint")&&El(e,""+a);break;case"onScroll":a!=null&&We("scroll",e);break;case"onScrollEnd":a!=null&&We("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ha);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[Xt]||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,""):Ci(e,n,a)}}}function dn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",e),We("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:Mt(e,t,o,u,n,null)}}l&&Mt(e,t,"srcSet",n.srcSet,n,null),a&&Mt(e,t,"src",n.src,n,null);return;case"input":We("invalid",e);var g=o=u=l=null,w=null,R=null;for(a in n)if(n.hasOwnProperty(a)){var G=n[a];if(G!=null)switch(a){case"name":l=G;break;case"type":u=G;break;case"checked":w=G;break;case"defaultChecked":R=G;break;case"value":o=G;break;case"defaultValue":g=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(d(137,t));break;default:Mt(e,t,a,G,n,null)}}vu(e,o,g,w,R,u,l,!1);return;case"select":We("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:Mt(e,t,l,g,n,null)}t=o,n=u,e.multiple=!!a,t!=null?Tl(e,!!a,t,!1):n!=null&&Tl(e,!!a,n,!0);return;case"textarea":We("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:Mt(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":Mt(e,t,w,a,n,null));return;case"dialog":We("beforetoggle",e),We("toggle",e),We("cancel",e),We("close",e);break;case"iframe":case"object":We("load",e);break;case"video":case"audio":for(a=0;a<ti.length;a++)We(ti[a],e);break;case"image":We("error",e),We("load",e);break;case"details":We("toggle",e);break;case"embed":case"source":case"link":We("error",e),We("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:Mt(e,t,R,a,n,null)}return;default:if(Zr(t)){for(G in n)n.hasOwnProperty(G)&&(a=n[G],a!==void 0&&_c(e,t,G,a,n,void 0));return}}for(g in n)n.hasOwnProperty(g)&&(a=n[g],a!=null&&Mt(e,t,g,a,n,null))}function Ag(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,G=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)||Mt(e,t,B,null,a,K)}}for(var O in a){var B=a[O];if(K=n[O],a.hasOwnProperty(O)&&(B!=null||K!=null))switch(O){case"type":o=B;break;case"name":l=B;break;case"checked":R=B;break;case"defaultChecked":G=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&&Mt(e,t,O,B,a,K)}}Qr(e,u,g,w,R,G,o,l);return;case"select":B=u=g=O=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)||Mt(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":O=o;break;case"defaultValue":g=o;break;case"multiple":u=o;default:o!==w&&Mt(e,t,l,o,a,w)}t=g,n=u,a=B,O!=null?Tl(e,!!n,O,!1):!!a!=!!n&&(t!=null?Tl(e,!!n,t,!0):Tl(e,!!n,n?[]:"",!1));return;case"textarea":B=O=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:Mt(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":O=l;break;case"defaultValue":B=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(d(91));break;default:l!==o&&Mt(e,t,u,l,a,o)}xu(e,O,B);return;case"option":for(var ye in n)O=n[ye],n.hasOwnProperty(ye)&&O!=null&&!a.hasOwnProperty(ye)&&(ye==="selected"?e.selected=!1:Mt(e,t,ye,null,a,O));for(w in a)O=a[w],B=n[w],a.hasOwnProperty(w)&&O!==B&&(O!=null||B!=null)&&(w==="selected"?e.selected=O&&typeof O!="function"&&typeof O!="symbol":Mt(e,t,w,O,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)O=n[Le],n.hasOwnProperty(Le)&&O!=null&&!a.hasOwnProperty(Le)&&Mt(e,t,Le,null,a,O);for(R in a)if(O=a[R],B=n[R],a.hasOwnProperty(R)&&O!==B&&(O!=null||B!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(d(137,t));break;default:Mt(e,t,R,O,a,B)}return;default:if(Zr(t)){for(var Dt in n)O=n[Dt],n.hasOwnProperty(Dt)&&O!==void 0&&!a.hasOwnProperty(Dt)&&_c(e,t,Dt,void 0,a,O);for(G in a)O=a[G],B=n[G],!a.hasOwnProperty(G)||O===B||O===void 0&&B===void 0||_c(e,t,G,O,a,B);return}}for(var M in n)O=n[M],n.hasOwnProperty(M)&&O!=null&&!a.hasOwnProperty(M)&&Mt(e,t,M,null,a,O);for(K in a)O=a[K],B=n[K],!a.hasOwnProperty(K)||O===B||O==null&&B==null||Mt(e,t,K,O,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 Tg(){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 G=w.transferSize,K=w.initiatorType;G&&zh(K)&&(w=w.responseEnd,u+=G*(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 Hc=null,Bc=null;function Sr(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 Uc(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 Nc=null;function Eg(){var e=window.event;return e&&e.type==="popstate"?e===Nc?!1:(Nc=e,!0):(Nc=null,!1)}var Ah=typeof setTimeout=="function"?setTimeout:void 0,Rg=typeof clearTimeout=="function"?clearTimeout:void 0,Th=typeof Promise=="function"?Promise:void 0,Lg=typeof queueMicrotask=="function"?queueMicrotask:typeof Th<"u"?function(e){return Th.resolve(null).then(e).catch(Og)}:Ah;function Og(e){setTimeout(function(){throw e})}function Ia(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),ro(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")ai(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ai(n);for(var o=n.firstChild;o;){var u=o.nextSibling,g=o.nodeName;o[cl]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=u}}else n==="body"&&ai(e.ownerDocument.body);n=l}while(n);ro(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 jc(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":jc(n),So(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function _g(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[cl])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=Qn(e.nextSibling),e===null)break}return null}function Hg(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Qn(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=Qn(e.nextSibling),e===null))return null;return e}function qc(e){return e.data==="$?"||e.data==="$~"}function Yc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Bg(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 Qn(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 Gc=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 Qn(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=Sr(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 ai(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);So(e)}var Kn=new Map,Bh=new Set;function wr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ta=I.d;I.d={f:Ug,r:Ng,D:jg,C:qg,L:Yg,m:Gg,X:Vg,S:Xg,M:Fg};function Ug(){var e=Ta.f(),t=hr();return e||t}function Ng(e){var t=ge(e);t!==null&&t.tag===5&&t.type==="form"?Id(t):Ta.r(e)}var lo=typeof document>"u"?null:document;function Uh(e,t,n){var a=lo;if(a&&typeof t=="string"&&t){var l=jn(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"),dn(t,"link",e),xe(t),a.head.appendChild(t)))}}function jg(e){Ta.D(e),Uh("dns-prefetch",e,null)}function qg(e,t){Ta.C(e,t),Uh("preconnect",e,t)}function Yg(e,t,n){Ta.L(e,t,n);var a=lo;if(a&&e&&t){var l='link[rel="preload"][as="'+jn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+jn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+jn(n.imageSizes)+'"]')):l+='[href="'+jn(e)+'"]';var o=l;switch(t){case"style":o=oo(e);break;case"script":o=io(e)}Kn.has(o)||(e=z({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Kn.set(o,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(li(o))||t==="script"&&a.querySelector(oi(o))||(t=a.createElement("link"),dn(t,"link",e),xe(t),a.head.appendChild(t)))}}function Gg(e,t){Ta.m(e,t);var n=lo;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+jn(a)+'"][href="'+jn(e)+'"]',o=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=io(e)}if(!Kn.has(o)&&(e=z({rel:"modulepreload",href:e},t),Kn.set(o,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(oi(o)))return}a=n.createElement("link"),dn(a,"link",e),xe(a),n.head.appendChild(a)}}}function Xg(e,t,n){Ta.S(e,t,n);var a=lo;if(a&&e){var l=ve(a).hoistableStyles,o=oo(e);t=t||"default";var u=l.get(o);if(!u){var g={loading:0,preload:null};if(u=a.querySelector(li(o)))g.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Kn.get(o))&&Xc(e,n);var w=u=a.createElement("link");xe(w),dn(w,"link",e),w._p=new Promise(function(R,G){w.onload=R,w.onerror=G}),w.addEventListener("load",function(){g.loading|=1}),w.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Cr(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:g},l.set(o,u)}}}function Vg(e,t){Ta.X(e,t);var n=lo;if(n&&e){var a=ve(n).hoistableScripts,l=io(e),o=a.get(l);o||(o=n.querySelector(oi(l)),o||(e=z({src:e,async:!0},t),(t=Kn.get(l))&&Vc(e,t),o=n.createElement("script"),xe(o),dn(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Fg(e,t){Ta.M(e,t);var n=lo;if(n&&e){var a=ve(n).hoistableScripts,l=io(e),o=a.get(l);o||(o=n.querySelector(oi(l)),o||(e=z({src:e,async:!0,type:"module"},t),(t=Kn.get(l))&&Vc(e,t),o=n.createElement("script"),xe(o),dn(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=Ee.current)?wr(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=oo(n.href),n=ve(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=oo(n.href);var o=ve(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(li(e)))&&!o._p&&(u.instance=o,u.state.loading=5),Kn.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},Kn.set(e,n),o||Qg(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=io(n),n=ve(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 oo(e){return'href="'+jn(e)+'"'}function li(e){return'link[rel="stylesheet"]['+e+"]"}function jh(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function Qg(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}),dn(t,"link",n),xe(t),e.head.appendChild(t))}function io(e){return'[src="'+jn(e)+'"]'}function oi(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~="'+jn(n.href)+'"]');if(a)return t.instance=a,xe(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"),xe(a),dn(a,"style",l),Cr(a,n.precedence,e),t.instance=a;case"stylesheet":l=oo(n.href);var o=e.querySelector(li(l));if(o)return t.state.loading|=4,t.instance=o,xe(o),o;a=jh(n),(l=Kn.get(l))&&Xc(a,l),o=(e.ownerDocument||e).createElement("link"),xe(o);var u=o;return u._p=new Promise(function(g,w){u.onload=g,u.onerror=w}),dn(o,"link",a),t.state.loading|=4,Cr(o,n.precedence,e),t.instance=o;case"script":return o=io(n.src),(l=e.querySelector(oi(o)))?(t.instance=l,xe(l),l):(a=n,(l=Kn.get(o))&&(a=z({},n),Vc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),xe(l),dn(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,Cr(a,n.precedence,e));return t.instance}function Cr(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 Xc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var kr=null;function Yh(e,t,n){if(kr===null){var a=new Map,l=kr=new Map;l.set(n,a)}else l=kr,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[cl]||o[Bt]||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 Kg(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 Zg(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=oo(a.href),o=t.querySelector(li(l));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=zr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,xe(o);return}o=t.ownerDocument||t,a=jh(a),(l=Kn.get(l))&&Xc(a,l),o=o.createElement("link"),xe(o);var u=o;u._p=new Promise(function(g,w){u.onload=g,u.onerror=w}),dn(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=zr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Fc=0;function $g(e,t){return e.stylesheets&&e.count===0&&Dr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Dr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Fc===0&&(Fc=62500*Tg());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Dr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Fc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function zr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Dr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mr=null;function Dr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mr=new Map,t.forEach(Jg,e),Mr=null,zr.call(e))}function Jg(e,t){if(!(t.state.loading&4)){var n=Mr.get(e);if(n)var a=n.get(null);else{n=new Map,Mr.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=zr.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 ii={$$typeof:V,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_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,G,K){return e=new Wg(e,t,n,u,w,R,G,K,g),t=1,o===!0&&(t|=24),o=Rn(3,null,null,t),e.current=o,o.stateNode=e,t=ks(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:a,isDehydrated:n,cache:t},As(o),e}function Fh(e){return e?(e=Ul,e):Ul}function Qh(e,t,n,a,l,o){l=Fh(l),a.context===null?a.context=l:a.pendingContext=l,a=Ya(t),a.payload={element:n},o=o===void 0?null:o,o!==null&&(a.callback=o),n=Ga(e,a,t),n!==null&&(Dn(n,e,t),No(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 Qc(e,t){Kh(e,t),(e=e.alternate)&&Kh(e,t)}function Zh(e){if(e.tag===13||e.tag===31){var t=hl(e,67108864);t!==null&&Dn(t,e,67108864),Qc(e,67108864)}}function $h(e){if(e.tag===13||e.tag===31){var t=Bn();t=ua(t);var n=hl(e,t);n!==null&&Dn(n,e,t),Qc(e,t)}}var Ar=!0;function Ig(e,t,n,a){var l=T.T;T.T=null;var o=I.p;try{I.p=2,Kc(e,t,n,a)}finally{I.p=o,T.T=l}}function Pg(e,t,n,a){var l=T.T;T.T=null;var o=I.p;try{I.p=8,Kc(e,t,n,a)}finally{I.p=o,T.T=l}}function Kc(e,t,n,a){if(Ar){var l=Zc(a);if(l===null)Oc(e,t,a,Tr,n),Wh(e,a);else if(tm(l,e,t,n,a))a.stopPropagation();else if(Wh(e,a),t&4&&-1<em.indexOf(e)){for(;l!==null;){var o=ge(l);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var u=Me(o.pendingLanes);if(u!==0){var g=o;for(g.pendingLanes|=2,g.entangledLanes|=2;u;){var w=1<<31-xt(u);g.entanglements[1]|=w,u&=~w}oa(o),(ht&6)===0&&(dr=Lt()+500,ei(0))}}break;case 31:case 13:g=hl(o,2),g!==null&&Dn(g,o,2),hr(),Qc(o,2)}if(o=Zc(a),o===null&&Oc(e,t,a,Tr,n),o===l)break;l=o}l!==null&&a.stopPropagation()}else Oc(e,t,a,null,n)}}function Zc(e){return e=Jr(e),$c(e)}var Tr=null;function $c(e){if(Tr=null,e=da(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 Tr=e,null}function Jh(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(on()){case rn:return 2;case xn:return 8;case Sn:case J:return 32;case ue:return 268435456;default:return 32}default:return 32}}var Jc=!1,Pa=null,el=null,tl=null,ri=new Map,si=new Map,nl=[],em="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":Pa=null;break;case"dragenter":case"dragleave":el=null;break;case"mouseover":case"mouseout":tl=null;break;case"pointerover":case"pointerout":ri.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":si.delete(t.pointerId)}}function ci(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=ge(t),t!==null&&Zh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function tm(e,t,n,a,l){switch(t){case"focusin":return Pa=ci(Pa,e,t,n,a,l),!0;case"dragenter":return el=ci(el,e,t,n,a,l),!0;case"mouseover":return tl=ci(tl,e,t,n,a,l),!0;case"pointerover":var o=l.pointerId;return ri.set(o,ci(ri.get(o)||null,e,t,n,a,l)),!0;case"gotpointercapture":return o=l.pointerId,si.set(o,ci(si.get(o)||null,e,t,n,a,l)),!0}return!1}function Ih(e){var t=da(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,Zn(e.priority,function(){$h(n)});return}}else if(t===31){if(t=D(n),t!==null){e.blockedOn=t,Zn(e.priority,function(){$h(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 Er(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);$r=a,n.target.dispatchEvent(a),$r=null}else return t=ge(n),t!==null&&Zh(t),e.blockedOn=n,!1;t.shift()}return!0}function Ph(e,t,n){Er(e)&&n.delete(t)}function nm(){Jc=!1,Pa!==null&&Er(Pa)&&(Pa=null),el!==null&&Er(el)&&(el=null),tl!==null&&Er(tl)&&(tl=null),ri.forEach(Ph),si.forEach(Ph)}function Rr(e,t){e.blockedOn===t&&(e.blockedOn=null,Jc||(Jc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,nm)))}var Lr=null;function ep(e){Lr!==e&&(Lr=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Lr===e&&(Lr=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($c(a||n)===null)continue;break}var o=ge(n);o!==null&&(e.splice(t,3),t-=3,Zs(o,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function ro(e){function t(w){return Rr(w,e)}Pa!==null&&Rr(Pa,e),el!==null&&Rr(el,e),tl!==null&&Rr(tl,e),ri.forEach(t),si.forEach(t);for(var n=0;n<nl.length;n++){var a=nl[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<nl.length&&(n=nl[0],n.blockedOn===null);)Ih(n),n.blockedOn===null&&nl.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[Xt]||null;if(typeof o=="function")u||ep(n);else if(u){var g=null;if(o&&o.hasAttribute("formAction")){if(l=o,u=o[Xt]||null)g=u.formAction;else if($c(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}Or.prototype.render=Wc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var n=t.current,a=Bn();Qh(n,a,e,t,null,null)},Or.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),hr(),t[Tn]=null}};function Or(e){this._internalRoot=e}Or.prototype.unstable_scheduleHydration=function(e){if(e){var t=wi();e={blockedOn:null,target:e,priority:t};for(var n=0;n<nl.length&&t!==0&&t<nl[n].priority;n++);nl.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"));I.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=b(t),e=e!==null?A(e):null,e=e===null?null:e.stateNode,e};var am={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_r.isDisabled&&_r.supportsFiber)try{Ne=_r.inject(am),Ae=_r}catch{}}return fi.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[Tn]=t.current,Lc(e),new Wc(t)},fi.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=Bn(),a=ua(a),l=Ya(a),l.callback=null,Ga(n,l,a),n=a,t.current.lanes=n,dt(t,n),oa(t),e[Tn]=t.current,Lc(e),new Or(t)},fi.version="19.2.4",fi}var wp;function c1(){if(wp)return au.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(),au.exports=s1(),au.exports}var u1=c1(),Cp=function(c,f){var d=arguments;if(f==null||!vi.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 Gp(c)}function jt(){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 d1={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},f1={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:d1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Vp=v.createContext(f1);function go(){return v.useContext(Vp)}const sl="-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"},Ea=m("font-family:",sl,";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;}",""),h1=jt`
|
|
10
10
|
from { opacity: 0; }
|
|
11
11
|
to { opacity: 1; }
|
|
12
12
|
`,p1=jt`
|
|
@@ -21,7 +21,7 @@ Error generating stack: `+a.message+`
|
|
|
21
21
|
`,g1=jt`
|
|
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:",h1," 0.15s ease-out;font-family:",sl,";",""),modal:m(
|
|
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:",h1," 0.15s ease-out;font-family:",sl,";",""),modal:m(Ea," 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:",p1," 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 ho({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:y("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})}),y("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 m1={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 Dl({title:i,message:c,inputLabel:f,defaultValue:d="",placeholder:h,confirmLabel:p="Confirm",cancelLabel:C="Cancel",isLoading:D=!1,loadingLabel:x="Processing...",onConfirm:b,onCancel:A}){const[z,L]=vt.useState(d),j=_=>{_.preventDefault(),z.trim()&&!D&&b(z.trim())};return r("div",{css:He.overlay,onClick:D?void 0:A,children:r("div",{css:He.modal,onClick:_=>_.stopPropagation(),children:y("form",{onSubmit:j,children:[r("div",{css:He.header,children:r("h3",{css:He.title,children:i})}),y("div",{css:He.body,children:[c&&r("p",{css:He.message,children:c}),f&&r("label",{css:He.message,children:f}),r("input",{css:m1.input,type:"text",value:z,onChange:_=>L(_.target.value),placeholder:h,autoFocus:!0,disabled:D})]}),y("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?y(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:",g1," 0.75s linear infinite;margin-right:6px;","")}),x]}):p})]})]})})})}function Vr({title:i,message:c,buttonLabel:f="OK",onClose:d}){return r("div",{css:He.overlay,onClick:d,children:y("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 ll={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 rl({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",b=p||C||D,A=!b||x;return r("div",{css:He.overlay,children:y("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?y("p",{css:He.message,children:["Processing stopped. Processed ",c.processed??c.current," image",(c.processed??c.current)!==1?"s":""," before stopping."]}):p?y(tt,{children:[y("p",{css:He.message,children:[c.message?c.message:c.isDelete?y(tt,{children:["Deleted ",c.processed," file",c.processed!==1?"s":"",".",c.errors!==void 0&&c.errors>0?y(tt,{children:[" ",c.errors," error",c.errors!==1?"s":""," occurred."]}):null]}):c.isMove?y(tt,{children:["Moved ",c.processed," file",c.processed!==1?"s":"",".",c.errors!==void 0&&c.errors>0?y(tt,{children:[" ",c.errors," error",c.errors!==1?"s":""," occurred."]}):null]}):c.isScan?y(tt,{children:[c.alreadyProcessed!==void 0&&c.alreadyProcessed>0?y(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?y(tt,{children:[" Removed ",c.orphanedEntries," orphaned entr",c.orphanedEntries!==1?"ies":"y","."]}):null,c.pendingUpdates!==void 0&&c.pendingUpdates>0?y(tt,{children:[" ",c.pendingUpdates," file",c.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):y(tt,{children:["Processed ",c.processed," new image",c.processed!==1?"s":"",".",c.alreadyProcessed!==void 0&&c.alreadyProcessed>0?y(tt,{children:[" ",c.alreadyProcessed," already processed."]}):null]}),c.orphansRemoved!==void 0&&c.orphansRemoved>0?y(tt,{children:[" Removed ",c.orphansRemoved," orphaned thumbnail",c.orphansRemoved!==1?"s":"","."]}):null]}),c.errorMessages&&c.errorMessages.length>0&&y("div",{css:ll.errorList,children:[c.errorMessages.slice(0,10).map((z,L)=>r("p",{css:ll.errorItem,children:z},L)),c.errorMessages.length>10&&y("p",{css:ll.errorItem,children:["...and ",c.errorMessages.length-10," more"]})]})]}):y(tt,{children:[r("p",{css:He.message,children:c.status==="cleanup"?c.message||"Cleaning up...":c.message||"Processing..."}),y("div",{css:ll.progressContainer,children:[r("div",{css:ll.progressBar,children:r("div",{css:ll.progressFill,style:{width:`${c.percent}%`}})}),y("div",{css:ll.progressText,children:[y("span",{children:[c.current," of ",c.total]}),y("span",{children:[c.percent,"%"]})]}),c.currentFile&&r("p",{css:ll.currentFile,title:c.currentFile,children:c.currentFile})]})]})}),y("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"}),b&&c.orphanedFiles&&c.orphanedFiles.length>0&&d&&y("button",{css:[He.btn,He.btnDanger,"",""],onClick:d,children:["Delete ",c.orphanedFiles.length," Orphan",c.orphanedFiles.length!==1?"s":""]}),b&&r("button",{css:[He.btn,He.btnConfirm,"",""],onClick:f,children:"Done"})]})]})})}function Fp(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),b=v.useCallback(()=>{p.current&&p.current.abort()},[]);return{execute:v.useCallback(async z=>{const{endpoint:L,body:j,title:_,operationType:X,onComplete:$,onError:F}=z;if(C.current){console.warn("Streaming operation already in progress");return}C.current=!0,D.current=!1;const V=`${L.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;x.current=V;const ie=new AbortController;p.current=ie;const Y=async()=>{D.current=!0,d(ee=>({...ee,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:V})})}catch{}};ie.signal.addEventListener("abort",Y),f(_),c(!0),d({current:0,total:0,percent:0,status:"processing",message:`Starting ${_.toLowerCase()}...`});try{const ee=await fetch(L,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...j,operationId:V})});if(!ee.ok){const W=await ee.json().catch(()=>({}));throw new Error(W.error||`Request failed: ${ee.status}`)}if(!ee.body)throw new Error("No response body");const ne=ee.body.getReader(),re=new TextDecoder;let q="";try{for(;;){const{done:W,value:pe}=await ne.read();if(W)break;q+=re.decode(pe,{stream:!0});const be=q.split(`
|
|
25
25
|
|
|
26
26
|
`);q=be.pop()||"";for(const me of be)if(me.startsWith("data: "))try{const se=JSON.parse(me.slice(6));if(se.type==="start")d(Be=>({...Be,total:se.total||Be.total}));else if(se.type==="progress")d({current:se.current||0,total:se.total||0,percent:se.percent||Math.round((se.current||0)/(se.total||1)*100),status:"processing",currentFile:se.currentFile,message:se.message});else if(se.type==="cleanup")d(Be=>({...Be,status:"cleanup",message:se.message}));else if(se.type==="complete"){const Be=se.cancelled===!0,T=se.processed??se.moved??se.renamed??se.pushed??se.downloaded??se.added??se.imported??se.deleted??se.current??0;d({current:T,total:T,percent:100,status:Be?"stopped":se.errors&&se.errors>0?"error":"complete",message:se.message,processed:T,errors:se.errors,orphanedFiles:se.orphanedFiles,isDelete:X==="delete",isMove:X==="move",isScan:X==="scan"}),h(),$?.(se)}else se.type==="error"&&(d(Be=>({...Be,status:"error",message:se.message})),F?.(se.message||"Unknown error"))}catch{}}}catch(W){if(!D.current)throw W}finally{ie.signal.removeEventListener("abort",Y)}}catch(ee){if(!D.current){const ne=ee instanceof Error?ee.message:"Operation failed";console.error(`${_} error:`,ee),d({current:0,total:0,percent:0,status:"error",message:ne}),F?.(ne)}}finally{C.current=!1,p.current=null,x.current=null}},[c,f,d,h]),stop:b,get isRunning(){return C.current}}}const b1=jt`
|
|
27
27
|
from { opacity: 0; }
|
|
@@ -35,7 +35,7 @@ Error generating stack: `+a.message+`
|
|
|
35
35
|
opacity: 1;
|
|
36
36
|
transform: translateY(0) scale(1);
|
|
37
37
|
}
|
|
38
|
-
`,Gt={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:",b1," 0.15s ease-out;font-family:",sl,";",""),modal:m(
|
|
38
|
+
`,Gt={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:",b1," 0.15s ease-out;font-family:",sl,";",""),modal:m(Ea," 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;display:flex;flex-direction:column;animation:",y1," 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:"zizupt",styles:"padding:12px 24px 24px;flex:1;overflow-y:auto;min-height:200px;max-height:400px"},message:m("font-size:",N.base,";color:",s.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:m("display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer;transition:all 0.15s ease;border:1px solid transparent;position:relative;&:hover{background-color:",s.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:m("width:16px;height:100%;position:relative;flex-shrink:0;&::before{content:'';position:absolute;left:8px;top:0;bottom:50%;width:0;border-left:1px dashed ",s.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",s.textSecondary,";}",""),folderItemSelected:m("background-color:",s.primaryLight,";border-color:",s.primary,";&:hover{background-color:",s.primaryLight,";}",""),folderItemDisabled:{name:"181lhkw",styles:"opacity:0.5;cursor:not-allowed;&:hover{background-color:transparent;}"},folderIcon:{name:"17bs1oo",styles:"width:20px;height:20px;color:#f9935e;flex-shrink:0"},folderName:m("font-size:",N.base,";color:",s.text,";flex:1;",""),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:m("display:flex;align-items:center;justify-content:center;padding:40px;color:",s.textSecondary,";",""),spinner:m("width:24px;height:24px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function Qp({selectedItems:i,currentPath:c,onMove:f,onCancel:d}){const[h,p]=v.useState([]),[C,D]=v.useState(!0),[x,b]=v.useState(null);v.useEffect(()=>{async function _(){try{const X=await fetch("/api/studio/list-folders");if(X.ok){const $=await X.json();console.log("Loaded folders:",$),p($.folders||[])}else console.error("Failed to load folders:",X.status,await X.text())}catch(X){console.error("Failed to load folders:",X)}finally{D(!1)}}_()},[]);const A=Array.from(i),z=h.filter(_=>!A.some(X=>_.path===X||_.path.startsWith(X+"/"))),L=_=>_===c,j=()=>{x&&f(x)};return r("div",{css:Gt.overlay,onClick:d,children:y("div",{css:Gt.modal,onClick:_=>_.stopPropagation(),children:[r("div",{css:Gt.header,children:r("h3",{css:Gt.title,children:"Move Items"})}),y("div",{css:Gt.body,children:[y("p",{css:Gt.message,children:["Select a destination folder for ",i.size," item",i.size!==1?"s":"",":"]}),C?r("div",{css:Gt.loading,children:r("div",{css:Gt.spinner})}):z.length===0?r("div",{css:Gt.loading,children:"No available folders to move to."}):r("div",{css:Gt.folderList,children:z.map(_=>{const X=L(_.path);return y("div",{css:[Gt.folderItem,x===_.path&&Gt.folderItemSelected,X&&Gt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!X&&b(_.path),children:[_.depth>0&&r("div",{css:Gt.treeIndent,children:Array.from({length:_.depth}).map(($,F)=>r("div",{css:Gt.treeLine},F))}),r("svg",{css:Gt.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("span",{css:Gt.folderName,children:[_.name,X&&" (current)"]})]},_.path)})})]}),y("div",{css:Gt.footer,children:[r("button",{css:[Gt.btn,Gt.btnCancel,"",""],onClick:d,children:"Cancel"}),r("button",{css:[Gt.btn,Gt.btnConfirm,"",""],onClick:j,disabled:!x,children:"Move Here"})]})]})})}const v1=`CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
|
|
39
39
|
CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key
|
|
40
40
|
CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_key
|
|
41
41
|
CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
|
|
@@ -52,11 +52,11 @@ NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev`,Se={overlay:{name:"
|
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transform: translateY(0) scale(1);
|
|
54
54
|
}
|
|
55
|
-
`,Tt={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:",x1," 0.15s ease-out;font-family:",sl,";",""),modal:m(
|
|
55
|
+
`,Tt={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:",x1," 0.15s ease-out;font-family:",sl,";",""),modal:m(Ea," 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:",S1," 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 w1({currentPath:i,onClose:c,onUploadComplete:f,streamingOperation:d,setShowProgress:h,setProgressTitle:p,setProgressState:C}){const[D,x]=v.useState("upload"),[b,A]=v.useState([]),[z,L]=v.useState(""),[j,_]=v.useState(!1),[X,$]=v.useState(!1),[F,le]=v.useState(!1),V=v.useRef(null),ie=v.useCallback(q=>{q&&A(Array.from(q))},[]),Y=v.useCallback(q=>{q.preventDefault(),_(!1),ie(q.dataTransfer.files)},[ie]),ee=v.useRef(!1),ne=v.useCallback(async()=>{if(b.length!==0){if(h&&p&&C){c(),ee.current=!1,p("Uploading Files"),h(!0),C({current:0,total:b.length,percent:0,status:"processing",message:"Uploading..."});let q=0;const W=[];for(let pe=0;pe<b.length;pe++){if(ee.current){C(se=>({...se,status:"stopped",message:`Stopped. Uploaded ${q} file${q!==1?"s":""}.`})),f();return}const be=b[pe],me=new FormData;me.append("file",be),me.append("path",i);try{(await fetch("/api/studio/upload",{method:"POST",body:me})).ok?q++:W.push(be.name)}catch{W.push(be.name)}C({current:pe+1,total:b.length,percent:Math.round((pe+1)/b.length*100),status:"processing",currentFile:be.name})}C({current:b.length,total:b.length,percent:100,status:"complete",message:`Uploaded ${q} file${q!==1?"s":""}.${W.length>0?` ${W.length} failed.`:""}`}),f();return}$(!0);try{for(const q of b){const W=new FormData;W.append("file",q),W.append("path",i),await fetch("/api/studio/upload",{method:"POST",body:W})}f(),c()}catch(q){console.error("Upload failed:",q)}finally{$(!1)}}},[b,i,f,c,h,p,C]),re=v.useCallback(async()=>{const q=z.split(`
|
|
56
56
|
`).map(W=>W.trim()).filter(W=>W.length>0);if(q.length!==0){if(d){c(),await d.execute({endpoint:"/api/studio/import",body:{urls:q},title:"Importing URLs",onComplete:()=>{f()}});return}le(!0);try{const pe=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:q})})).body?.getReader();if(!pe)throw new Error("No reader");const be=new TextDecoder;for(;;){const{done:me,value:se}=await pe.read();if(me)break;const T=be.decode(se).split(`
|
|
57
57
|
|
|
58
58
|
`).filter(I=>I.startsWith("data: "));for(const I of T)JSON.parse(I.replace("data: ","")).type==="complete"&&(f(),c())}}catch(W){console.error("Import failed:",W)}finally{le(!1)}}},[z,f,c,d]);return r("div",{css:Tt.overlay,onClick:c,children:y("div",{css:Tt.modal,onClick:q=>q.stopPropagation(),children:[y("div",{css:Tt.header,children:[r("h3",{css:Tt.title,children:"Add New"}),y("div",{css:Tt.tabs,children:[r("button",{css:[Tt.tab,D==="upload"&&Tt.tabActive,"",""],onClick:()=>x("upload"),children:"Upload Files"}),r("button",{css:[Tt.tab,D==="import"&&Tt.tabActive,"",""],onClick:()=>x("import"),children:"Import URLs"})]})]}),r("div",{css:Tt.body,children:D==="upload"?y(tt,{children:[y("div",{css:[Tt.dropzone,j&&Tt.dropzoneActive,"",""],onClick:()=>V.current?.click(),onDragOver:q=>{q.preventDefault(),_(!0)},onDragLeave:()=>_(!1),onDrop:Y,children:[r("svg",{css:Tt.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:Tt.dropzoneText,children:"Drop files here or click to browse"}),r("p",{css:Tt.dropzoneHint,children:"Supports images and other media files"})]}),r("input",{ref:V,type:"file",multiple:!0,css:Tt.fileInput,onChange:q=>ie(q.target.files)}),b.length>0&&y("div",{css:Tt.selectedFiles,children:[b.length," file",b.length!==1?"s":""," selected"]})]}):y(tt,{children:[r("p",{css:Tt.textareaLabel,children:"Paste image URLs (one per line)"}),r("textarea",{css:Tt.textarea,value:z,onChange:q=>L(q.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
|
|
59
|
-
https://cdn.example.com/photos/image2.jpg`})]})}),y("div",{css:Tt.footer,children:[r("button",{css:[Tt.btn,Tt.btnCancel,"",""],onClick:c,children:"Cancel"}),D==="upload"?r("button",{css:[Tt.btn,Tt.btnConfirm,"",""],onClick:ne,disabled:b.length===0||X,children:X?"Uploading...":"Upload"}):r("button",{css:[Tt.btn,Tt.btnConfirm,"",""],onClick:re,disabled:!z.trim()||F,children:F?"Importing...":"Import"})]})]})})}const C1="36px",Ye={btn:m("height:",C1,";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(
|
|
59
|
+
https://cdn.example.com/photos/image2.jpg`})]})}),y("div",{css:Tt.footer,children:[r("button",{css:[Tt.btn,Tt.btnCancel,"",""],onClick:c,children:"Cancel"}),D==="upload"?r("button",{css:[Tt.btn,Tt.btnConfirm,"",""],onClick:ne,disabled:b.length===0||X,children:X?"Uploading...":"Upload"}):r("button",{css:[Tt.btn,Tt.btnConfirm,"",""],onClick:re,disabled:!z.trim()||F,children:F?"Importing...":"Import"})]})]})})}const C1="36px",Ye={btn:m("height:",C1,";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(Ea," 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 k1(){const[i,c]=v.useState(!1);return y(tt,{children:[r("button",{css:Ye.btn,onClick:()=>c(!0),"aria-label":"Settings",children:y("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(M1,{onClose:()=>c(!1)})]})}const z1=`# Dev site link (opens from Studio header)
|
|
60
60
|
STUDIO_DEV_SITE_URL=http://localhost:3000
|
|
61
61
|
|
|
62
62
|
# Cloudflare R2 Storage
|
|
@@ -68,7 +68,7 @@ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function M1({onClose:i}){
|
|
|
68
68
|
to { transform: rotate(360deg); }
|
|
69
69
|
`,De={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:",ru,";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:",D1," 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:",ru,";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:",ru,";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 A1(){const{selectedItems:i,viewMode:c,setViewMode:f,clearSelection:d,currentPath:h,triggerRefresh:p,focusedItem:C,scanRequested:D,clearScanRequest:x,fileItems:b,requestProcess:A,setProcessMode:z,actionState:L,cancelAction:j}=go(),_=v.useRef(null),X=v.useRef(null),[$,F]=v.useState(!1),[le,V]=v.useState(!1),[ie,Y]=v.useState(!1),[ee,ne]=v.useState(!1),[re,q]=v.useState(!1),[W,pe]=v.useState(0),[be,me]=v.useState(!1),[se,Be]=v.useState(0),[T,I]=v.useState(!1),[te,he]=v.useState(!1),[Fe,S]=v.useState(!1),[H,ae]=v.useState(0),[oe,Ce]=v.useState(!1),[Ee,Ge]=v.useState("Processing Images"),[mt,Oe]=v.useState({current:0,total:0,percent:0,status:"processing"}),[an,$e]=v.useState(null),[rt,ut]=v.useState(!1),[Ct,Ht]=v.useState(!1),[Pt,en]=v.useState(!1),[pn,tn]=v.useState(!1),[bt,Rt]=v.useState(!1),[at,ze]=v.useState(!1),[Lt,on]=v.useState(!1),[rn,xn]=v.useState(!1),Sn=v.useRef(null),J=v.useRef(null),ue=Fp({setShowProgress:Ce,setProgressTitle:Ge,setProgressState:Oe,triggerRefresh:p}),Xe=h==="public/images"||h.startsWith("public/images/");v.useCallback(()=>{_.current?.click()},[]);const nt=v.useCallback(()=>{ne(!0),p(),setTimeout(()=>ne(!1),600)},[p]),Ne=v.useCallback(async()=>{Y(!0),Ge("Scanning Files"),Ce(!0),Oe({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const ce=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!ce)throw new Error("No reader");const ve=new TextDecoder;let xe="";for(;;){const{done:_e,value:Ue}=await ce.read();if(_e)break;xe+=ve.decode(Ue,{stream:!0});const ot=xe.split(`
|
|
70
70
|
|
|
71
|
-
`);xe=ot.pop()||"";for(const it of ot){if(!it.startsWith("data: "))continue;const je=JSON.parse(it.slice(6));if(je.type==="start")Oe({current:0,total:je.total,percent:0,status:"processing",message:`Scanning ${je.total} files...`});else if(je.type==="progress")Oe({current:je.current,total:je.total,percent:je.percent,status:"processing",currentFile:je.currentFile});else if(je.type==="cleanup")Oe(yn=>({...yn,message:je.message}));else if(je.type==="complete"){let yn=je.renamed>0?`${je.renamed} file(s) renamed due to conflicts. `:"";je.orphanedFiles&&je.orphanedFiles.length>0&&(yn+=`Found ${je.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Oe({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:yn||void 0,isScan:!0}),p()}else je.type==="error"&&Oe({current:0,total:0,percent:0,status:"error",message:je.message||"Scan failed"})}}}catch(ge){console.error("Scan error:",ge),Oe({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{Y(!1)}},[p]);v.useEffect(()=>{const ge=ce=>{Sn.current&&!Sn.current.contains(ce.target)&&on(!1),J.current&&!J.current.contains(ce.target)&&xn(!1)};return document.addEventListener("mousedown",ge),()=>document.removeEventListener("mousedown",ge)},[]),v.useEffect(()=>{D&&!ie&&(x(),Ne())},[D,ie,x,Ne]);const Ae=v.useCallback(async ge=>{const ce=ge.target.files;if(!ce||ce.length===0)return;const ve=Array.from(ce);ve.length>1?(Oe({current:0,total:ve.length,percent:0,status:"processing",message:"Uploading files..."}),Ce(!0)):V(!0);let xe=0,_e=0;try{for(let Ue=0;Ue<ve.length;Ue++){const ot=ve[Ue],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)xe++;else{const yn=await je.json();_e++,ve.length===1&&(je.status>=500?(console.error("Upload error:",yn),$e({title:"Upload Failed",message:`Failed to upload ${ot.name}: ${yn.error||"Unknown error"}`})):$e({title:"Cannot Upload Here",message:yn.error||"Upload not allowed in this location."}))}}catch{_e++}ve.length>1&&Oe({current:Ue+1,total:ve.length,percent:Math.round((Ue+1)/ve.length*100),status:"processing",currentFile:ot.name})}ve.length>1&&Oe({current:ve.length,total:ve.length,percent:100,status:"complete",processed:xe,errors:_e}),p()}catch(Ue){console.error("Upload error:",Ue),ve.length>1?Oe({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):$e({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{V(!1),_.current&&(_.current.value="")}},[h,p]),kt=v.useCallback(async ge=>{if(i.size>0){const ve=Array.from(i),xe=ve.filter(Ue=>(Ue.split("/").pop()||"").includes(".")&&!Ue.endsWith("/")),_e=ve.filter(Ue=>!(Ue.split("/").pop()||"").includes(".")||Ue.endsWith("/"));if(_e.length>0)try{const ot=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(_e.join(","))}`)).json();if(ot.images)for(const it of ot.images){const je=`public/${it}`;xe.includes(je)||xe.push(je)}}catch(Ue){console.error("Failed to get folder files:",Ue)}if(xe.length===0){$e({title:"No Files Found",message:"No files found in the selected items."});return}z(ge),A(xe)}else try{const xe=await(await fetch("/api/studio/count-images")).json();if(!xe.images||xe.images.length===0){$e({title:"No Images Found",message:"No images found in the public folder to process."});return}const _e=xe.images.map(Ue=>`public/${Ue}`);z(ge),A(_e)}catch(ve){console.error("Failed to get images:",ve),$e({title:"Error",message:"Failed to get images."})}},[i,A,z]),xt=v.useCallback(()=>{ue.stop(),X.current&&(Oe(ge=>({...ge,status:"stopping"})),X.current.abort())},[ue]),La=v.useCallback(async()=>{const ge=mt.orphanedFiles;if(!(!ge||ge.length===0))try{const ce=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ge})}),ve=await ce.json();ce.ok?(Oe(xe=>({...xe,orphanedFiles:void 0,orphansRemoved:ve.deleted,message:`Deleted ${ve.deleted} orphaned thumbnail${ve.deleted!==1?"s":""}.`})),p()):$e({title:"Delete Failed",message:ve.error||"Failed to delete orphaned files."})}catch(ce){console.error("Delete orphans error:",ce),$e({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[mt.orphanedFiles,p]),ca=v.useCallback(async()=>{if(i.size===0)return;const ge=Array.from(i),ce=ge.filter(_e=>(_e.split("/").pop()||"").includes(".")&&!_e.endsWith("/")),ve=ge.filter(_e=>!(_e.split("/").pop()||"").includes(".")||_e.endsWith("/"));let xe=ce.length;if(ve.length>0)try{const Ue=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ve.join(","))}`)).json();Ue.images&&(xe+=Ue.images.length)}catch(_e){console.error("Failed to get folder files:",_e)}pe(xe),q(!0)},[i]),bo=v.useCallback(async()=>{q(!1);const ge=Array.from(i);ge.length!==0&&await ue.execute({endpoint:"/api/studio/delete-stream",body:{paths:ge},title:"Deleting Files",operationType:"delete",onComplete:()=>{d()}})},[i,d,ue]),ua=v.useCallback(async()=>{if(i.size===0)return;const ge=Array.from(i),ce=ge.filter(it=>(it.split("/").pop()||"").includes(".")&&!it.endsWith("/")),ve=ge.filter(it=>!(it.split("/").pop()||"").includes(".")||it.endsWith("/")),xe=ve.length>0;if(xe)try{const je=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ve.join(","))}`)).json();if(je.images)for(const yn of je.images){const wo=`public/${yn}`;ce.includes(wo)||ce.push(wo)}}catch(it){console.error("Failed to get folder files:",it)}if(ce.length===0){$e({title:"No Files Found",message:"No files found in the selected items."});return}let _e=!1,Ue=!1,ot=0;for(const it of ce){const je=b.find(yn=>yn.path===it);je?je.isRemote?_e=!0:je.cdnPushed?ot++:Ue=!0:xe&&(Ue=!0)}if(!xe&&ot===ce.length){$e({title:"Already Pushed",message:`All ${ce.length} file${ce.length!==1?"s are":" is"} already on the CDN.`});return}Be(ce.length),I(_e),he(Ue),me(!0)},[i,b]),U=v.useCallback(async()=>{me(!1);const ge=Array.from(i),ce=ge.filter(_e=>(_e.split("/").pop()||"").includes(".")&&!_e.endsWith("/")),ve=ge.filter(_e=>!(_e.split("/").pop()||"").includes(".")||_e.endsWith("/"));if(ve.length>0)try{const Ue=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ve.join(","))}`)).json();if(Ue.images)for(const ot of Ue.images){const it=`public/${ot}`;ce.includes(it)||ce.push(it)}}catch(_e){console.error("Failed to get folder files:",_e)}const xe=ce.map(_e=>"/"+_e.replace(/^public\//,""));xe.length!==0&&await ue.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:xe},title:"Pushing to CDN",onComplete:()=>{d()},onError:_e=>{(_e.includes("R2 not configured")||_e.includes("CLOUDFLARE_R2"))&&(Ce(!1),Rt(!0))}})},[i,d,ue]),[Re,Me]=v.useState([]),[Ze,lt]=v.useState(0),Pn=v.useCallback(async()=>{if(i.size===0)return;const ge=Array.from(i),ce=ge.filter(Ue=>(Ue.split("/").pop()||"").includes(".")&&!Ue.endsWith("/")),ve=ge.filter(Ue=>!(Ue.split("/").pop()||"").includes(".")||Ue.endsWith("/")),xe=ve.length>0;if(xe)try{const ot=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ve.join(","))}`)).json();if(ot.images)for(const it of ot.images){const je=`public/${it}`;ce.includes(je)||ce.push(je)}}catch(Ue){console.error("Failed to get folder files:",Ue)}if(ce.length===0){$e({title:"No Files Found",message:"No files found in the selected items."});return}let _e;if(xe)_e=ce;else if(_e=ce.filter(Ue=>{const ot=b.find(it=>it.path===Ue);return ot&&ot.cdnPushed&&!ot.isRemote}),_e.length===0){$e({title:"No CDN Files",message:`None of the ${ce.length} selected file${ce.length!==1?"s are":" is"} on the CDN.`});return}Me(_e),lt(ce.length),ae(_e.length),S(!0)},[i,b]),ea=v.useCallback(async()=>{S(!1),L.showDownloadConfirm&&j();const ce=(L.showDownloadConfirm?L.actionPaths:Re).map(ve=>"/"+ve.replace(/^public\//,""));await ue.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:ce},title:"Downloading from CDN",onComplete:()=>d()})},[Re,d,L.showDownloadConfirm,L.actionPaths,j,ue]),bn=v.useCallback(async()=>{if(i.size===0)return;const ce=Array.from(i).filter(ve=>{const xe=b.find(_e=>_e.path===ve);return xe&&(xe.hasUpdate||xe.type==="folder"&&xe.updateCount&&xe.updateCount>0)});if(ce.length===0){$e({title:"No Updates",message:"No files with pending updates in selection."});return}await ue.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:ce},title:"Pushing Updates",onComplete:()=>d()})},[i,b,d,ue]),dt=v.useCallback(async()=>{if(i.size===0)return;const ce=Array.from(i).filter(ve=>{const xe=b.find(_e=>_e.path===ve);return xe&&(xe.hasUpdate||xe.type==="folder"&&xe.updateCount&&xe.updateCount>0)});if(ce.length!==0)try{const ve=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ce})});if(ve.ok)d(),p();else{const xe=await ve.json();$e({title:"Cancel Failed",message:xe.error||"Unknown error"})}}catch(ve){console.error("Cancel updates error:",ve),$e({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[i,b,d,p]),ft=v.useCallback(async ge=>{ut(!1);try{const ce=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:ge})});if(ce.ok)p();else{const ve=await ce.json();$e({title:"Create Folder Failed",message:ve.error||"Unknown error"})}}catch(ce){console.error("Create folder error:",ce),$e({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,p]),xi=v.useCallback(()=>{i.size!==0&&tn(!0)},[i]),Si=v.useCallback(async ge=>{const ce=Array.from(i);await ue.execute({endpoint:"/api/studio/move",body:{paths:ce,destination:ge},title:"Moving Files",onComplete:()=>d()})},[i,d,ue]),{searchQuery:yo,setSearchQuery:da}=go(),vo=v.useCallback(ge=>{da(ge.target.value)},[da]),wi=v.useCallback(ge=>{ge.key==="Escape"&&(ge.stopPropagation(),da(""),ge.target.blur())},[da]),Zn=i.size>0;Zn&&Array.from(i).some(ge=>{const ce=b.find(ve=>ve.path===ge);return ce&&ce.cdnPushed&&!ce.isRemote}),Zn&&Array.from(i).every(ge=>{const ce=b.find(ve=>ve.path===ge);return ce&&ce.type==="file"&&ce.cdnPushed&&!ce.isRemote});const ta=Zn&&Array.from(i).some(ge=>{const ce=b.find(ve=>ve.path===ge);return ce&&(ce.hasUpdate||ce.type==="folder"&&ce.updateCount&&ce.updateCount>0)}),Bt=Array.from(i),Xt=Bt.length===1&&!Bt[0].includes("."),Tn=Xt?Bt[0]:null,Al=Tn&&Tn.split("/").pop()||"",Oa=Bt.length===1&&Bt[0].includes("."),_a=Oa?Bt[0]:null,xo=_a&&_a.split("/").pop()||"",cl=v.useCallback(async ge=>{Tn&&(Ht(!1),await ue.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:Tn,newName:ge},title:"Renaming Folder",onComplete:()=>d()}))},[Tn,d,ue]),So=v.useCallback(async ge=>{_a&&(en(!1),await ue.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:_a,newName:ge},title:"Renaming File",onComplete:()=>d()}))},[_a,d,ue]),fa=y(tt,{children:[(Fe||L.showDownloadConfirm)&&r(ho,{title:"Download from CDN",message:(()=>{const ge=L.showDownloadConfirm?L.downloadImageCount:H,ce=L.showDownloadConfirm?L.downloadTotalSelected:Ze;return ce>ge?`Download ${ge} of ${ce} selected file${ce!==1?"s":""} from Cloudflare R2? (${ce-ge} not on CDN)`:`Download ${ge} image${ge!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:ea,onCancel:()=>{S(!1),L.showDownloadConfirm&&j()}}),oe&&r(rl,{title:Ee,progress:mt,onStop:xt,onDeleteOrphans:La,onClose:()=>{Ce(!1),Oe({current:0,total:0,percent:0,status:"processing"}),p()}})]});return C?fa:y(tt,{children:[fa,re&&r(ho,{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:bo,onCancel:()=>q(!1)}),be&&r(ho,{title:"Push to CDN",message:`Push ${se} image${se!==1?"s":""} to Cloudflare R2?${T?" Remote images will be downloaded first.":""}${te?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:U,onCancel:()=>me(!1)}),rt&&r(Dl,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:ft,onCancel:()=>ut(!1)}),pn&&r(Qp,{selectedItems:i,currentPath:h,onMove:ge=>{tn(!1),Si(ge)},onCancel:()=>tn(!1)}),Ct&&Tn&&r(Dl,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:Al,defaultValue:Al,confirmLabel:"Rename",onConfirm:cl,onCancel:()=>Ht(!1)}),Pt&&_a&&r(Dl,{title:"Rename File",message:"Enter a new name for the file:",placeholder:xo,defaultValue:xo,confirmLabel:"Rename",onConfirm:So,onCancel:()=>en(!1)}),an&&r(Vr,{title:an.title,message:an.message,onClose:()=>{$e(null),p()}}),r(Kp,{isOpen:bt,onClose:()=>Rt(!1)}),$&&r(w1,{currentPath:h,onClose:()=>F(!1),onUploadComplete:()=>{F(!1),p()},streamingOperation:ue,setShowProgress:Ce,setProgressTitle:Ge,setProgressState:Oe}),y("div",{css:De.toolbar,children:[r("input",{ref:_,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:Ae,style:{display:"none"}}),y("div",{css:De.left,children:[y("button",{css:[De.btn,De.btnPrimary,"",""],onClick:()=>F(!0),disabled:le||Xe,children:[r(T1,{}),"Add New"]}),y("button",{css:De.btn,onClick:()=>{Oa?en(!0):Xt?Ht(!0):ut(!0)},disabled:Xe&&!Xt&&!Oa,title:Xe&&!Xt&&!Oa?"Cannot create folders in protected images folder":void 0,children:[Oa||Xt?r(_1,{}):r(O1,{}),Oa?"Rename File":Xt?"Rename Folder":"New Folder"]}),r("div",{css:De.divider}),y("div",{css:De.cloudDropdownWrapper,ref:J,children:[y("button",{css:De.btn,onClick:()=>xn(!rn),disabled:L.showProgress||Xe,title:Xe?"Cannot process images folder":void 0,children:[r(Y1,{}),"Thumbnails",r("svg",{css:De.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"})})]}),rn&&y("div",{css:De.cloudDropdown,children:[y("button",{css:[De.cloudDropdownItem,De.cloudDropdownItemDefault,"",""],onClick:()=>{xn(!1),kt("generate")},children:[r(G1,{}),"Generate Thumbnails"]}),y("button",{css:[De.cloudDropdownItem,De.cloudDropdownItemDanger,"",""],onClick:()=>{xn(!1),kt("remove")},children:[r(X1,{}),"Remove Thumbnails"]})]})]}),y("button",{css:[De.btn,De.btnDanger,"",""],onClick:ca,disabled:!Zn,children:[r(L1,{}),"Delete"]}),y("button",{css:De.btn,onClick:xi,disabled:!Zn,children:[r(H1,{}),"Move"]}),y("div",{css:De.cloudDropdownWrapper,ref:Sn,children:[y("button",{css:[De.btn,De.btnCloud,"",""],onClick:()=>on(!Lt),disabled:!Zn,children:[r(zp,{}),"Cloud",r("svg",{css:De.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"})})]}),Lt&&Zn&&y("div",{css:De.cloudDropdown,children:[ta&&y(tt,{children:[y("button",{css:De.cloudDropdownItem,onClick:()=>{on(!1),bn()},children:[r(B1,{}),"Push Update"]}),y("button",{css:[De.cloudDropdownItem,De.cloudDropdownItemDanger,"",""],onClick:()=>{on(!1),dt()},children:[r(U1,{}),"Cancel Update"]}),r("div",{css:De.cloudDropdownDivider})]}),y("button",{css:De.cloudDropdownItem,onClick:()=>{on(!1),ua()},children:[r(zp,{}),"Push CDN"]}),y("button",{css:De.cloudDropdownItem,onClick:()=>{on(!1),Pn()},children:[r(N1,{}),"Download"]})]})]}),y("div",{css:De.searchWrapper,children:[r("input",{css:De.searchInput,type:"text",placeholder:"Search images...",value:yo,onChange:vo,onKeyDown:wi}),yo&&r("button",{css:De.searchClearBtn,onClick:()=>da(""),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"})})})]})]}),y("div",{css:De.right,children:[Zn&&y("span",{css:De.selectionCount,children:[i.size," selected",r("button",{css:De.clearBtn,onClick:d,children:"Clear"})]}),y("button",{css:De.btn,onClick:Ne,disabled:ie,children:[r(E1,{spinning:ie}),"Scan"]}),r("button",{css:De.btn,onClick:nt,title:"Refresh view",disabled:ee,children:r(R1,{spinning:ee})}),y("div",{css:De.viewToggle,children:[r("button",{css:[De.viewBtn,c==="grid"&&De.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:r(j1,{})}),r("button",{css:[De.viewBtn,c==="list"&&De.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:r(q1,{})})]}),r(k1,{})]})]})]})}function T1(){return r("svg",{css:De.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 E1({spinning:i}){return r("svg",{css:[De.icon,i&&De.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 R1({spinning:i}){return r("svg",{css:[De.icon,i&&De.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 L1(){return r("svg",{css:De.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 O1(){return r("svg",{css:De.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 _1(){return r("svg",{css:De.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 H1(){return r("svg",{css:De.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 zp(){return r("svg",{css:De.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 B1(){return r("svg",{css:De.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 U1(){return r("svg",{css:De.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 N1(){return r("svg",{css:De.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 j1(){return r("svg",{css:De.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 q1(){return r("svg",{css:De.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 Y1(){return r("svg",{css:De.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:De.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 X1(){return r("svg",{css:De.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 V1{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 hi=new V1;function Zp(){const{currentPath:i,setCurrentPath:c,navigateUp:f,selectedItems:d,toggleSelection:h,selectRange:p,lastSelectedPath:C,selectAll:D,clearSelection:x,refreshKey:b,setFocusedItem:A,triggerRefresh:z,triggerScan:L,searchQuery:j,showError:_,setFileItems:X,editedImageKey:$}=go(),[F,le]=v.useState([]),[V,ie]=v.useState(!0),[Y,ee]=v.useState(!1),[ne,re]=v.useState(null),q=v.useRef(!0),W=v.useRef(i);v.useEffect(()=>{async function S(){const H=W.current!==i;(q.current||H)&&ie(!0),W.current=i;try{const ae=j&&j.length>=2?await hi.search(j,i):await hi.list(i),oe=ae.items||[];le(oe),X(oe),ee(ae.isEmpty===!0)}catch(ae){const oe=ae instanceof Error?ae.message:"Failed to load items";_("Load Error",oe),le([]),X([]),ee(!1)}ie(!1),q.current=!1}S()},[i,b,j,_,X]),v.useEffect(()=>{async function S(){if(i!=="public"){re(null);return}try{const H=await hi.checkFeaturedImage();re(H)}catch{re(null)}}S()},[i,b]);const pe=i==="public",be=j&&j.length>=2,me=[...F].sort((S,H)=>S.type==="folder"&&H.type!=="folder"?-1:S.type!=="folder"&&H.type==="folder"?1:S.name.localeCompare(H.name)),se=me.length>0&&me.every(S=>d.has(S.path)),Be=me.some(S=>d.has(S.path)),T=v.useCallback((S,H)=>{H.shiftKey&&C?p(C,S.path,me):h(S.path)},[C,p,me,h]),I=v.useCallback(S=>{S.type==="folder"?c(S.path):A(S)},[c,A]),te=v.useCallback(async S=>{try{const H="/"+S.path.replace(/^public\//,"");await hi.reprocess([H]),z()}catch(H){const ae=H instanceof Error?H.message:"Failed to generate thumbnail";_("Processing Error",ae)}},[z,_]),he=v.useCallback(()=>{se?x():D(me)},[se,x,D,me]),Fe=ne&&!ne.exists?ne:null;return{items:F,loading:V,sortedItems:me,metaEmpty:Y,missingFeaturedImage:Fe,isAtRoot:pe,isSearching:be,allItemsSelected:se,someItemsSelected:Be,currentPath:i,selectedItems:d,navigateUp:f,editedImageKey:$,handleItemClick:T,handleOpen:I,handleGenerateThumbnail:te,handleSelectAll:he,triggerScan:L,triggerRefresh:z}}const F1=jt`
|
|
71
|
+
`);xe=ot.pop()||"";for(const it of ot){if(!it.startsWith("data: "))continue;const je=JSON.parse(it.slice(6));if(je.type==="start")Oe({current:0,total:je.total,percent:0,status:"processing",message:`Scanning ${je.total} files...`});else if(je.type==="progress")Oe({current:je.current,total:je.total,percent:je.percent,status:"processing",currentFile:je.currentFile});else if(je.type==="cleanup")Oe(yn=>({...yn,message:je.message}));else if(je.type==="complete"){let yn=je.renamed>0?`${je.renamed} file(s) renamed due to conflicts. `:"";je.orphanedFiles&&je.orphanedFiles.length>0&&(yn+=`Found ${je.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Oe({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:yn||void 0,isScan:!0}),p()}else je.type==="error"&&Oe({current:0,total:0,percent:0,status:"error",message:je.message||"Scan failed"})}}}catch(ge){console.error("Scan error:",ge),Oe({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{Y(!1)}},[p]);v.useEffect(()=>{const ge=ce=>{Sn.current&&!Sn.current.contains(ce.target)&&on(!1),J.current&&!J.current.contains(ce.target)&&xn(!1)};return document.addEventListener("mousedown",ge),()=>document.removeEventListener("mousedown",ge)},[]),v.useEffect(()=>{D&&!ie&&(x(),Ne())},[D,ie,x,Ne]);const Ae=v.useCallback(async ge=>{const ce=ge.target.files;if(!ce||ce.length===0)return;const ve=Array.from(ce);ve.length>1?(Oe({current:0,total:ve.length,percent:0,status:"processing",message:"Uploading files..."}),Ce(!0)):V(!0);let xe=0,_e=0;try{for(let Ue=0;Ue<ve.length;Ue++){const ot=ve[Ue],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)xe++;else{const yn=await je.json();_e++,ve.length===1&&(je.status>=500?(console.error("Upload error:",yn),$e({title:"Upload Failed",message:`Failed to upload ${ot.name}: ${yn.error||"Unknown error"}`})):$e({title:"Cannot Upload Here",message:yn.error||"Upload not allowed in this location."}))}}catch{_e++}ve.length>1&&Oe({current:Ue+1,total:ve.length,percent:Math.round((Ue+1)/ve.length*100),status:"processing",currentFile:ot.name})}ve.length>1&&Oe({current:ve.length,total:ve.length,percent:100,status:"complete",processed:xe,errors:_e}),p()}catch(Ue){console.error("Upload error:",Ue),ve.length>1?Oe({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):$e({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{V(!1),_.current&&(_.current.value="")}},[h,p]),kt=v.useCallback(async ge=>{if(i.size>0){const ve=Array.from(i),xe=ve.filter(Ue=>(Ue.split("/").pop()||"").includes(".")&&!Ue.endsWith("/")),_e=ve.filter(Ue=>!(Ue.split("/").pop()||"").includes(".")||Ue.endsWith("/"));if(_e.length>0)try{const ot=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(_e.join(","))}`)).json();if(ot.images)for(const it of ot.images){const je=`public/${it}`;xe.includes(je)||xe.push(je)}}catch(Ue){console.error("Failed to get folder files:",Ue)}if(xe.length===0){$e({title:"No Files Found",message:"No files found in the selected items."});return}z(ge),A(xe)}else try{const xe=await(await fetch("/api/studio/count-images")).json();if(!xe.images||xe.images.length===0){$e({title:"No Images Found",message:"No images found in the public folder to process."});return}const _e=xe.images.map(Ue=>`public/${Ue}`);z(ge),A(_e)}catch(ve){console.error("Failed to get images:",ve),$e({title:"Error",message:"Failed to get images."})}},[i,A,z]),xt=v.useCallback(()=>{ue.stop(),X.current&&(Oe(ge=>({...ge,status:"stopping"})),X.current.abort())},[ue]),Ra=v.useCallback(async()=>{const ge=mt.orphanedFiles;if(!(!ge||ge.length===0))try{const ce=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ge})}),ve=await ce.json();ce.ok?(Oe(xe=>({...xe,orphanedFiles:void 0,orphansRemoved:ve.deleted,message:`Deleted ${ve.deleted} orphaned thumbnail${ve.deleted!==1?"s":""}.`})),p()):$e({title:"Delete Failed",message:ve.error||"Failed to delete orphaned files."})}catch(ce){console.error("Delete orphans error:",ce),$e({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[mt.orphanedFiles,p]),ca=v.useCallback(async()=>{if(i.size===0)return;const ge=Array.from(i),ce=ge.filter(_e=>(_e.split("/").pop()||"").includes(".")&&!_e.endsWith("/")),ve=ge.filter(_e=>!(_e.split("/").pop()||"").includes(".")||_e.endsWith("/"));let xe=ce.length;if(ve.length>0)try{const Ue=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ve.join(","))}`)).json();Ue.images&&(xe+=Ue.images.length)}catch(_e){console.error("Failed to get folder files:",_e)}pe(xe),q(!0)},[i]),bo=v.useCallback(async()=>{q(!1);const ge=Array.from(i);ge.length!==0&&await ue.execute({endpoint:"/api/studio/delete-stream",body:{paths:ge},title:"Deleting Files",operationType:"delete",onComplete:()=>{d()}})},[i,d,ue]),La=v.useCallback(async()=>{if(i.size===0)return;const ge=Array.from(i),ce=ge.filter(it=>(it.split("/").pop()||"").includes(".")&&!it.endsWith("/")),ve=ge.filter(it=>!(it.split("/").pop()||"").includes(".")||it.endsWith("/")),xe=ve.length>0;if(xe)try{const je=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ve.join(","))}`)).json();if(je.images)for(const yn of je.images){const wo=`public/${yn}`;ce.includes(wo)||ce.push(wo)}}catch(it){console.error("Failed to get folder files:",it)}if(ce.length===0){$e({title:"No Files Found",message:"No files found in the selected items."});return}let _e=!1,Ue=!1,ot=0;for(const it of ce){const je=b.find(yn=>yn.path===it);je?je.isRemote?_e=!0:je.cdnPushed?ot++:Ue=!0:xe&&(Ue=!0)}if(!xe&&ot===ce.length){$e({title:"Already Pushed",message:`All ${ce.length} file${ce.length!==1?"s are":" is"} already on the CDN.`});return}Be(ce.length),I(_e),he(Ue),me(!0)},[i,b]),U=v.useCallback(async()=>{me(!1);const ge=Array.from(i),ce=ge.filter(_e=>(_e.split("/").pop()||"").includes(".")&&!_e.endsWith("/")),ve=ge.filter(_e=>!(_e.split("/").pop()||"").includes(".")||_e.endsWith("/"));if(ve.length>0)try{const Ue=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ve.join(","))}`)).json();if(Ue.images)for(const ot of Ue.images){const it=`public/${ot}`;ce.includes(it)||ce.push(it)}}catch(_e){console.error("Failed to get folder files:",_e)}const xe=ce.map(_e=>"/"+_e.replace(/^public\//,""));xe.length!==0&&await ue.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:xe},title:"Pushing to CDN",onComplete:()=>{d()},onError:_e=>{(_e.includes("R2 not configured")||_e.includes("CLOUDFLARE_R2"))&&(Ce(!1),Rt(!0))}})},[i,d,ue]),[Re,Me]=v.useState([]),[Ze,lt]=v.useState(0),Pn=v.useCallback(async()=>{if(i.size===0)return;const ge=Array.from(i),ce=ge.filter(Ue=>(Ue.split("/").pop()||"").includes(".")&&!Ue.endsWith("/")),ve=ge.filter(Ue=>!(Ue.split("/").pop()||"").includes(".")||Ue.endsWith("/")),xe=ve.length>0;if(xe)try{const ot=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ve.join(","))}`)).json();if(ot.images)for(const it of ot.images){const je=`public/${it}`;ce.includes(je)||ce.push(je)}}catch(Ue){console.error("Failed to get folder files:",Ue)}if(ce.length===0){$e({title:"No Files Found",message:"No files found in the selected items."});return}let _e;if(xe)_e=ce;else if(_e=ce.filter(Ue=>{const ot=b.find(it=>it.path===Ue);return ot&&ot.cdnPushed&&!ot.isRemote}),_e.length===0){$e({title:"No CDN Files",message:`None of the ${ce.length} selected file${ce.length!==1?"s are":" is"} on the CDN.`});return}Me(_e),lt(ce.length),ae(_e.length),S(!0)},[i,b]),ea=v.useCallback(async()=>{S(!1),L.showDownloadConfirm&&j();const ce=(L.showDownloadConfirm?L.actionPaths:Re).map(ve=>"/"+ve.replace(/^public\//,""));await ue.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:ce},title:"Downloading from CDN",onComplete:()=>d()})},[Re,d,L.showDownloadConfirm,L.actionPaths,j,ue]),bn=v.useCallback(async()=>{if(i.size===0)return;const ce=Array.from(i).filter(ve=>{const xe=b.find(_e=>_e.path===ve);return xe&&(xe.hasUpdate||xe.type==="folder"&&xe.updateCount&&xe.updateCount>0)});if(ce.length===0){$e({title:"No Updates",message:"No files with pending updates in selection."});return}await ue.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:ce},title:"Pushing Updates",onComplete:()=>d()})},[i,b,d,ue]),dt=v.useCallback(async()=>{if(i.size===0)return;const ce=Array.from(i).filter(ve=>{const xe=b.find(_e=>_e.path===ve);return xe&&(xe.hasUpdate||xe.type==="folder"&&xe.updateCount&&xe.updateCount>0)});if(ce.length!==0)try{const ve=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ce})});if(ve.ok)d(),p();else{const xe=await ve.json();$e({title:"Cancel Failed",message:xe.error||"Unknown error"})}}catch(ve){console.error("Cancel updates error:",ve),$e({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[i,b,d,p]),ft=v.useCallback(async ge=>{ut(!1);try{const ce=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:ge})});if(ce.ok)p();else{const ve=await ce.json();$e({title:"Create Folder Failed",message:ve.error||"Unknown error"})}}catch(ce){console.error("Create folder error:",ce),$e({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,p]),xi=v.useCallback(()=>{i.size!==0&&tn(!0)},[i]),Si=v.useCallback(async ge=>{const ce=Array.from(i);await ue.execute({endpoint:"/api/studio/move",body:{paths:ce,destination:ge},title:"Moving Files",onComplete:()=>d()})},[i,d,ue]),{searchQuery:yo,setSearchQuery:ua}=go(),vo=v.useCallback(ge=>{ua(ge.target.value)},[ua]),wi=v.useCallback(ge=>{ge.key==="Escape"&&(ge.stopPropagation(),ua(""),ge.target.blur())},[ua]),Zn=i.size>0;Zn&&Array.from(i).some(ge=>{const ce=b.find(ve=>ve.path===ge);return ce&&ce.cdnPushed&&!ce.isRemote}),Zn&&Array.from(i).every(ge=>{const ce=b.find(ve=>ve.path===ge);return ce&&ce.type==="file"&&ce.cdnPushed&&!ce.isRemote});const ta=Zn&&Array.from(i).some(ge=>{const ce=b.find(ve=>ve.path===ge);return ce&&(ce.hasUpdate||ce.type==="folder"&&ce.updateCount&&ce.updateCount>0)}),Bt=Array.from(i),Xt=Bt.length===1&&!Bt[0].includes("."),Tn=Xt?Bt[0]:null,Al=Tn&&Tn.split("/").pop()||"",Oa=Bt.length===1&&Bt[0].includes("."),_a=Oa?Bt[0]:null,xo=_a&&_a.split("/").pop()||"",cl=v.useCallback(async ge=>{Tn&&(Ht(!1),await ue.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:Tn,newName:ge},title:"Renaming Folder",onComplete:()=>d()}))},[Tn,d,ue]),So=v.useCallback(async ge=>{_a&&(en(!1),await ue.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:_a,newName:ge},title:"Renaming File",onComplete:()=>d()}))},[_a,d,ue]),da=y(tt,{children:[(Fe||L.showDownloadConfirm)&&r(ho,{title:"Download from CDN",message:(()=>{const ge=L.showDownloadConfirm?L.downloadImageCount:H,ce=L.showDownloadConfirm?L.downloadTotalSelected:Ze;return ce>ge?`Download ${ge} of ${ce} selected file${ce!==1?"s":""} from Cloudflare R2? (${ce-ge} not on CDN)`:`Download ${ge} image${ge!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:ea,onCancel:()=>{S(!1),L.showDownloadConfirm&&j()}}),oe&&r(rl,{title:Ee,progress:mt,onStop:xt,onDeleteOrphans:Ra,onClose:()=>{Ce(!1),Oe({current:0,total:0,percent:0,status:"processing"}),p()}})]});return C?da:y(tt,{children:[da,re&&r(ho,{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:bo,onCancel:()=>q(!1)}),be&&r(ho,{title:"Push to CDN",message:`Push ${se} image${se!==1?"s":""} to Cloudflare R2?${T?" Remote images will be downloaded first.":""}${te?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:U,onCancel:()=>me(!1)}),rt&&r(Dl,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:ft,onCancel:()=>ut(!1)}),pn&&r(Qp,{selectedItems:i,currentPath:h,onMove:ge=>{tn(!1),Si(ge)},onCancel:()=>tn(!1)}),Ct&&Tn&&r(Dl,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:Al,defaultValue:Al,confirmLabel:"Rename",onConfirm:cl,onCancel:()=>Ht(!1)}),Pt&&_a&&r(Dl,{title:"Rename File",message:"Enter a new name for the file:",placeholder:xo,defaultValue:xo,confirmLabel:"Rename",onConfirm:So,onCancel:()=>en(!1)}),an&&r(Vr,{title:an.title,message:an.message,onClose:()=>{$e(null),p()}}),r(Kp,{isOpen:bt,onClose:()=>Rt(!1)}),$&&r(w1,{currentPath:h,onClose:()=>F(!1),onUploadComplete:()=>{F(!1),p()},streamingOperation:ue,setShowProgress:Ce,setProgressTitle:Ge,setProgressState:Oe}),y("div",{css:De.toolbar,children:[r("input",{ref:_,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:Ae,style:{display:"none"}}),y("div",{css:De.left,children:[y("button",{css:[De.btn,De.btnPrimary,"",""],onClick:()=>F(!0),disabled:le||Xe,children:[r(T1,{}),"Add New"]}),y("button",{css:De.btn,onClick:()=>{Oa?en(!0):Xt?Ht(!0):ut(!0)},disabled:Xe&&!Xt&&!Oa,title:Xe&&!Xt&&!Oa?"Cannot create folders in protected images folder":void 0,children:[Oa||Xt?r(_1,{}):r(O1,{}),Oa?"Rename File":Xt?"Rename Folder":"New Folder"]}),r("div",{css:De.divider}),y("div",{css:De.cloudDropdownWrapper,ref:J,children:[y("button",{css:De.btn,onClick:()=>xn(!rn),disabled:L.showProgress||Xe,title:Xe?"Cannot process images folder":void 0,children:[r(Y1,{}),"Thumbnails",r("svg",{css:De.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"})})]}),rn&&y("div",{css:De.cloudDropdown,children:[y("button",{css:[De.cloudDropdownItem,De.cloudDropdownItemDefault,"",""],onClick:()=>{xn(!1),kt("generate")},children:[r(G1,{}),"Generate Thumbnails"]}),y("button",{css:[De.cloudDropdownItem,De.cloudDropdownItemDanger,"",""],onClick:()=>{xn(!1),kt("remove")},children:[r(X1,{}),"Remove Thumbnails"]})]})]}),y("button",{css:[De.btn,De.btnDanger,"",""],onClick:ca,disabled:!Zn,children:[r(L1,{}),"Delete"]}),y("button",{css:De.btn,onClick:xi,disabled:!Zn,children:[r(H1,{}),"Move"]}),y("div",{css:De.cloudDropdownWrapper,ref:Sn,children:[y("button",{css:[De.btn,De.btnCloud,"",""],onClick:()=>on(!Lt),disabled:!Zn,children:[r(kp,{}),"Cloud",r("svg",{css:De.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"})})]}),Lt&&Zn&&y("div",{css:De.cloudDropdown,children:[ta&&y(tt,{children:[y("button",{css:De.cloudDropdownItem,onClick:()=>{on(!1),bn()},children:[r(B1,{}),"Push Update"]}),y("button",{css:[De.cloudDropdownItem,De.cloudDropdownItemDanger,"",""],onClick:()=>{on(!1),dt()},children:[r(U1,{}),"Cancel Update"]}),r("div",{css:De.cloudDropdownDivider})]}),y("button",{css:De.cloudDropdownItem,onClick:()=>{on(!1),La()},children:[r(kp,{}),"Push CDN"]}),y("button",{css:De.cloudDropdownItem,onClick:()=>{on(!1),Pn()},children:[r(N1,{}),"Download"]})]})]}),y("div",{css:De.searchWrapper,children:[r("input",{css:De.searchInput,type:"text",placeholder:"Search images...",value:yo,onChange:vo,onKeyDown:wi}),yo&&r("button",{css:De.searchClearBtn,onClick:()=>ua(""),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"})})})]})]}),y("div",{css:De.right,children:[Zn&&y("span",{css:De.selectionCount,children:[i.size," selected",r("button",{css:De.clearBtn,onClick:d,children:"Clear"})]}),y("button",{css:De.btn,onClick:Ne,disabled:ie,children:[r(E1,{spinning:ie}),"Scan"]}),r("button",{css:De.btn,onClick:nt,title:"Refresh view",disabled:ee,children:r(R1,{spinning:ee})}),y("div",{css:De.viewToggle,children:[r("button",{css:[De.viewBtn,c==="grid"&&De.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:r(j1,{})}),r("button",{css:[De.viewBtn,c==="list"&&De.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:r(q1,{})})]}),r(k1,{})]})]})]})}function T1(){return r("svg",{css:De.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 E1({spinning:i}){return r("svg",{css:[De.icon,i&&De.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 R1({spinning:i}){return r("svg",{css:[De.icon,i&&De.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 L1(){return r("svg",{css:De.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 O1(){return r("svg",{css:De.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 _1(){return r("svg",{css:De.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 H1(){return r("svg",{css:De.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:De.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 B1(){return r("svg",{css:De.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 U1(){return r("svg",{css:De.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 N1(){return r("svg",{css:De.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 j1(){return r("svg",{css:De.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 q1(){return r("svg",{css:De.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 Y1(){return r("svg",{css:De.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:De.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 X1(){return r("svg",{css:De.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 V1{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 hi=new V1;function Zp(){const{currentPath:i,setCurrentPath:c,navigateUp:f,selectedItems:d,toggleSelection:h,selectRange:p,lastSelectedPath:C,selectAll:D,clearSelection:x,refreshKey:b,setFocusedItem:A,triggerRefresh:z,triggerScan:L,searchQuery:j,showError:_,setFileItems:X,editedImageKey:$}=go(),[F,le]=v.useState([]),[V,ie]=v.useState(!0),[Y,ee]=v.useState(!1),[ne,re]=v.useState(null),q=v.useRef(!0),W=v.useRef(i);v.useEffect(()=>{async function S(){const H=W.current!==i;(q.current||H)&&ie(!0),W.current=i;try{const ae=j&&j.length>=2?await hi.search(j,i):await hi.list(i),oe=ae.items||[];le(oe),X(oe),ee(ae.isEmpty===!0)}catch(ae){const oe=ae instanceof Error?ae.message:"Failed to load items";_("Load Error",oe),le([]),X([]),ee(!1)}ie(!1),q.current=!1}S()},[i,b,j,_,X]),v.useEffect(()=>{async function S(){if(i!=="public"){re(null);return}try{const H=await hi.checkFeaturedImage();re(H)}catch{re(null)}}S()},[i,b]);const pe=i==="public",be=j&&j.length>=2,me=[...F].sort((S,H)=>S.type==="folder"&&H.type!=="folder"?-1:S.type!=="folder"&&H.type==="folder"?1:S.name.localeCompare(H.name)),se=me.length>0&&me.every(S=>d.has(S.path)),Be=me.some(S=>d.has(S.path)),T=v.useCallback((S,H)=>{H.shiftKey&&C?p(C,S.path,me):h(S.path)},[C,p,me,h]),I=v.useCallback(S=>{S.type==="folder"?c(S.path):A(S)},[c,A]),te=v.useCallback(async S=>{try{const H="/"+S.path.replace(/^public\//,"");await hi.reprocess([H]),z()}catch(H){const ae=H instanceof Error?H.message:"Failed to generate thumbnail";_("Processing Error",ae)}},[z,_]),he=v.useCallback(()=>{se?x():D(me)},[se,x,D,me]),Fe=ne&&!ne.exists?ne:null;return{items:F,loading:V,sortedItems:me,metaEmpty:Y,missingFeaturedImage:Fe,isAtRoot:pe,isSearching:be,allItemsSelected:se,someItemsSelected:Be,currentPath:i,selectedItems:d,navigateUp:f,editedImageKey:$,handleItemClick:T,handleOpen:I,handleGenerateThumbnail:te,handleSelectAll:he,triggerScan:L,triggerRefresh:z}}const F1=jt`
|
|
72
72
|
from { opacity: 0; }
|
|
73
73
|
to { opacity: 1; }
|
|
74
74
|
`,Q1=jt`
|
|
@@ -82,12 +82,12 @@ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function M1({onClose:i}){
|
|
|
82
82
|
`);me=T.pop()||"";for(const I of T)if(I.startsWith("data: "))try{const te=JSON.parse(I.slice(6));te.type==="start"?ee(he=>({...he,total:te.total,message:`Screenshotting ${te.url}...`})):te.type==="progress"?ee({current:te.current,total:te.total,percent:te.percent,status:"processing",message:te.message}):te.type==="complete"?(ee({current:te.processed,total:te.processed,percent:100,status:te.errors>0?"error":"complete",message:te.message}),X()):te.type==="error"&&ee(he=>({...he,status:"error",message:te.message}))}catch{}}}}catch(W){console.error("Featured image generation error:",W),ee({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?y(tt,{children:[V&&r(rl,{title:"Generating Screenshot",progress:Y,onClose:()=>ie(!1)}),r("div",{css:de.loading,children:r("div",{css:de.spinner})})]}):f&&h?y("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:_,children:"Scan for Files"})]}):c.length===0&&h?y("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"})]}):y(tt,{children:[r($p,{isOpen:F,onClose:()=>le(!1),onSelect:re}),V&&r(rl,{title:"Generating Screenshot",progress:Y,onClose:()=>ie(!1)}),y("div",{children:[c.length>0&&r("div",{css:de.selectAllRow,children:y("label",{css:de.selectAllLabel,children:[r("input",{type:"checkbox",css:de.selectAllCheckbox,checked:C,ref:q=>{q&&(q.indeterminate=D&&!C)},onChange:j}),"Select all (",c.length,")"]})}),y("div",{css:de.grid,children:[!h&&!p&&y("div",{css:[de.item,de.parentItem,"",""],onClick:b,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"})})}),y("div",{css:de.label,children:[r("p",{css:de.name,children:".."}),r("p",{css:de.size,children:"Parent folder"})]})]}),c.map(q=>r(W1,{item:q,isSelected:x.has(q.path),onClick:W=>A(q,W),onOpen:()=>z(q),onGenerateThumbnail:()=>L(q),editedImageKey:$},q.path)),h&&d&&!p&&y("div",{css:de.featuredPlaceholder,onClick:ne,title:`Generate ${d.filename}`,children:[y("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"})]}),y("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",b=!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",L=J1(i.path),j=!x&&(i.hasSm||i.hasMd||i.hasLg||i.hasFull||L),_=$=>{$.stopPropagation();const F="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(F),D(!0),setTimeout(()=>D(!1),1500)},X=$=>{if(z){$.stopPropagation(),d();return}f($)};return y("div",{css:[de.item,c&&!z&&de.itemSelected,"",""],onClick:X,children:[!z&&r("div",{css:de.checkboxWrapper,onClick:$=>$.stopPropagation(),children:r("input",{type:"checkbox",css:de.checkbox,checked:c,onChange:()=>f({})})}),y("div",{css:[de.content,i.isCloud&&de.contentCloud,i.isRemote&&de.contentRemote,"",""],children:[y("button",{css:de.copyBtn,onClick:_,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:$=>{$.stopPropagation(),d()},children:"Open"}),x?z?y("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"})}):b&&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:y("div",{css:de.labelText,children:[r("p",{css:de.name,title:i.name,children:i.name}),x?y("div",{css:de.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&y("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&&y("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&&y("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&&y("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&&y("span",{css:de.size,children:[i.fileCount," files"]})]}):y("div",{css:de.statusRow,children:[r("div",{css:de.statusLeft,children:i.hasUpdate?y(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:I1(i.size)}):null}),j&&r("span",{css:de.thumbChips,children:L?r("span",{css:de.thumbChip,children:L}):y(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 I1(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const P1=jt`
|
|
83
83
|
to { transform: rotate(360deg); }
|
|
84
84
|
`,P={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:",P1," 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 e2(){const{loading:i,sortedItems:c,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:p,allItemsSelected:C,someItemsSelected:D,selectedItems:x,navigateUp:b,handleItemClick:A,handleOpen:z,handleGenerateThumbnail:L,handleSelectAll:j,triggerScan:_,triggerRefresh:X,editedImageKey:$}=Zp(),[F,le]=v.useState(!1),[V,ie]=v.useState(!1),[Y,ee]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),ne=()=>{le(!0)},re=async q=>{le(!1),ie(!0),ee({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:q})});if(!W.ok){const me=await W.json();ee({current:0,total:4,percent:0,status:"error",message:me.error||"Failed to generate screenshot"});return}const pe=W.body?.getReader(),be=new TextDecoder;if(pe){let me="";for(;;){const{done:se,value:Be}=await pe.read();if(se)break;me+=be.decode(Be,{stream:!0});const T=me.split(`
|
|
85
|
-
`);me=T.pop()||"";for(const I of T)if(I.startsWith("data: "))try{const te=JSON.parse(I.slice(6));te.type==="start"?ee(he=>({...he,total:te.total,message:`Screenshotting ${te.url}...`})):te.type==="progress"?ee({current:te.current,total:te.total,percent:te.percent,status:"processing",message:te.message}):te.type==="complete"?(ee({current:te.processed,total:te.processed,percent:100,status:te.errors>0?"error":"complete",message:te.message}),X()):te.type==="error"&&ee(he=>({...he,status:"error",message:te.message}))}catch{}}}}catch(W){console.error("Featured image generation error:",W),ee({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?r("div",{css:P.loading,children:r("div",{css:P.spinner})}):f&&h?y("div",{css:P.empty,children:[r("p",{children:"No files tracked yet"}),r("p",{css:P.emptyHint,children:"Click Scan to discover files in your public folder"}),r("button",{css:P.scanButton,onClick:_,children:"Scan for Files"})]}):c.length===0&&h?y("div",{css:P.empty,children:[r("p",{children:"No files in this folder"}),r("p",{css:P.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):y(tt,{children:[r($p,{isOpen:F,onClose:()=>le(!1),onSelect:re}),V&&r(rl,{title:"Generating Screenshot",progress:Y,onClose:()=>ie(!1)}),r("div",{css:P.tableWrapper,children:y("table",{css:P.table,children:[r("thead",{children:y("tr",{children:[r("th",{css:[P.th,P.thCheckbox,"",""],children:c.length>0&&r("input",{type:"checkbox",css:P.checkbox,checked:C,ref:q=>{q&&(q.indeterminate=D&&!C)},onChange:j})}),r("th",{css:P.th,children:"Name"}),r("th",{css:[P.th,P.thSize,"",""],children:"Size"}),r("th",{css:[P.th,P.thDimensions,"",""],children:"Dimensions"}),r("th",{css:[P.th,P.thCdn,"",""],children:"CDN"})]})}),y("tbody",{css:P.tbody,children:[!h&&!p&&y("tr",{css:P.parentRow,onClick:b,children:[r("td",{css:P.td}),r("td",{css:P.td,children:y("div",{css:P.nameCell,children:[r("svg",{css:P.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:P.name,children:".."})]})}),r("td",{css:[P.td,P.meta,"",""],children:"--"}),r("td",{css:[P.td,P.meta,"",""],children:"Parent folder"}),r("td",{css:P.td,children:"--"})]}),c.map(q=>r(t2,{item:q,isSelected:x.has(q.path),onClick:W=>A(q,W),onOpen:()=>z(q),onGenerateThumbnail:()=>L(q),editedImageKey:$},q.path)),h&&d&&!p&&y("tr",{css:P.featuredRow,onClick:ne,title:`Generate ${d.filename}`,children:[r("td",{css:P.td}),r("td",{css:P.td,children:y("div",{css:P.nameCell,children:[r("div",{css:P.folderIconWrapper,children:r("svg",{css:P.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:[P.name,P.featuredText,"",""],children:d.filename})]})}),r("td",{css:[P.td,P.meta,P.featuredText,"",""],children:"--"}),r("td",{css:[P.td,P.meta,P.featuredText,"",""],children:"Click to generate"}),r("td",{css:[P.td,P.featuredText,"",""],children:"--"})]})]})]})})]})}function t2({item:i,isSelected:c,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:p}){const[C,D]=v.useState(!1),x=i.type==="folder",b=!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",L=_=>{_.stopPropagation();const X="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(X),D(!0),setTimeout(()=>D(!1),1500)},j=_=>{if(z){_.stopPropagation(),d();return}f(_)};return y("tr",{css:[P.row,c&&!z&&P.rowSelected,"",""],onClick:j,children:[r("td",{css:[P.td,P.checkboxCell,"",""],onClick:_=>_.stopPropagation(),children:!z&&r("input",{type:"checkbox",css:P.checkbox,checked:c,onChange:()=>f({})})}),r("td",{css:P.td,children:y("div",{css:P.nameCell,children:[x?z?y("div",{css:P.imagesFolderWrapper,children:[r("svg",{css:P.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:P.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:P.folderIconWrapper,children:r("svg",{css:P.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):b&&A?r("div",{css:[P.thumbnailWrapper,i.isCloud&&P.thumbnailCloud,i.isRemote&&P.thumbnailRemote,"",""],children:r("img",{css:P.thumbnail,src:A,alt:i.name,loading:"lazy"})}):r("div",{css:[P.thumbnailWrapper,i.isCloud&&P.thumbnailCloud,i.isRemote&&P.thumbnailRemote,"",""],children:r("svg",{css:P.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:P.name,title:i.name,children:n2(i.name)}),y("div",{css:P.actionsCell,children:[y("button",{css:P.copyBtn,onClick:L,title:"Copy file path",children:[C&&r("span",{css:P.tooltip,children:"Copied!"}),r("svg",{css:P.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:P.openBtn,onClick:_=>{_.stopPropagation(),d()},children:"Open"})]})]})}),r("td",{css:[P.td,P.meta,"",""],children:x?y("div",{css:P.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&y("span",{css:[P.folderStat,P.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:P.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&&y("span",{css:[P.folderStat,P.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:P.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&&y("span",{css:[P.folderStat,P.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:P.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&&y("span",{css:[P.folderStat,P.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:P.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&&y("span",{children:[i.fileCount," files"]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount===void 0&&"--"]}):i.hasUpdate?y("span",{css:P.updateLabel,children:[r("svg",{css:P.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:P.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:P.storedLabel,children:r("svg",{css:i.isRemote?P.storedIconRemote:P.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?Mp(i.size):"--"}),r("td",{css:[P.td,P.meta,"",""],children:x?i.totalSize!==void 0?Mp(i.totalSize):"--":i.dimensions?`${i.dimensions.width}x${i.dimensions.height}`:"--"}),r("td",{css:P.td,children:i.cdnPushed?i.isRemote?r("span",{css:P.cdnBadgeRemote,children:"Remote"}):y("span",{css:P.cdnBadge,children:[r("svg",{css:P.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:P.cdnEmpty,children:"--"})})]})}function Mp(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function n2(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 a2=Object.defineProperty,l2=(i,c,f)=>c in i?a2(i,c,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[c]=f,Nt=(i,c,f)=>l2(i,typeof c!="symbol"?c+"":c,f);const qr={x:0,y:0,width:0,height:0,unit:"px"},so=(i,c,f)=>Math.min(Math.max(i,c),f),o2=(...i)=>i.filter(c=>c&&typeof c=="string").join(" "),Dp=(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 co(i,c,f){return i.unit==="%"?{...qr,...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 ol(i,c,f){return i.unit?i.unit==="px"?{...qr,...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}:{...qr,...i,unit:"px"}}function Ap(i,c,f,d,h,p=0,C=0,D=d,x=h){const b={...i};let A=Math.min(p,d),z=Math.min(C,h),L=Math.min(D,d),j=Math.min(x,h);c&&(c>1?(A=C?C*c:A,z=A/c,L=D*c):(z=p?p/c:z,A=z*c,j=x/c)),b.y<0&&(b.height=Math.max(b.height+b.y,z),b.y=0),b.x<0&&(b.width=Math.max(b.width+b.x,A),b.x=0);const _=d-(b.x+b.width);_<0&&(b.x=Math.min(b.x,d-A),b.width+=_);const X=h-(b.y+b.height);if(X<0&&(b.y=Math.min(b.y,h-z),b.height+=X),b.width<A&&((f==="sw"||f=="nw")&&(b.x-=A-b.width),b.width=A),b.height<z&&((f==="nw"||f=="ne")&&(b.y-=z-b.height),b.height=z),b.width>L&&((f==="sw"||f=="nw")&&(b.x-=L-b.width),b.width=L),b.height>j&&((f==="nw"||f=="ne")&&(b.y-=j-b.height),b.height=j),c){const $=b.width/b.height;if($<c){const F=Math.max(b.width/c,z);(f==="nw"||f=="ne")&&(b.y-=F-b.height),b.height=F}else if($>c){const F=Math.max(b.height*c,A);(f==="sw"||f=="nw")&&(b.x-=F-b.width),b.width=F}}return b}function i2(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 uo={capture:!0,passive:!1};let r2=0;const il=class In extends v.PureComponent{constructor(){super(...arguments),Nt(this,"docMoveBound",!1),Nt(this,"mouseDownOnCrop",!1),Nt(this,"dragStarted",!1),Nt(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),Nt(this,"componentRef",v.createRef()),Nt(this,"mediaRef",v.createRef()),Nt(this,"resizeObserver"),Nt(this,"initChangeCalled",!1),Nt(this,"instanceId",`rc-${r2++}`),Nt(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),Nt(this,"onCropPointerDown",c=>{const{crop:f,disabled:d}=this.props,h=this.getBox();if(!f)return;const p=ol(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,b=c.clientY,A=p.x,z=p.y;if(C){const L=c.clientX-h.x,j=c.clientY-h.y;let _=0,X=0;C==="ne"||C=="e"?(_=L-(p.x+p.width),X=j-p.y,A=p.x,z=p.y+p.height):C==="se"||C==="s"?(_=L-(p.x+p.width),X=j-(p.y+p.height),A=p.x,z=p.y):C==="sw"||C=="w"?(_=L-p.x,X=j-(p.y+p.height),A=p.x+p.width,z=p.y):(C==="nw"||C=="n")&&(_=L-p.x,X=j-p.y,A=p.x+p.width,z=p.y+p.height),x=A+h.x+_,b=z+h.y+X}this.evData={startClientX:x,startClientY:b,startCropX:A,startCropY:z,clientX:c.clientX,clientY:c.clientY,isResize:D,ord:C},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),Nt(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,b=c.clientY-D.y,A={unit:"px",x,y:b,width:0,height:0};this.evData={startClientX:c.clientX,startClientY:c.clientY,startCropX:x,startCropY:b,clientX:c.clientX,clientY:c.clientY,isResize:!0},this.mouseDownOnCrop=!0,C(ol(A,D.width,D.height),co(A,D.width,D.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),Nt(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(),Dp(f,x)||h(ol(x,C.width,C.height),co(x,C.width,C.height))}),Nt(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(),b=this.makePixelCrop(x),A=(navigator.platform.match("Mac")?c.metaKey:c.ctrlKey)?In.nudgeStepLarge:c.shiftKey?In.nudgeStepMedium:In.nudgeStep;if(C==="ArrowLeft"?(b.x-=A,D=!0):C==="ArrowRight"?(b.x+=A,D=!0):C==="ArrowUp"?(b.y-=A,D=!0):C==="ArrowDown"&&(b.y+=A,D=!0),D){c.cancelable&&c.preventDefault(),b.x=so(b.x,0,x.width-b.width),b.y=so(b.y,0,x.height-b.height);const z=ol(b,x.width,x.height),L=co(b,x.width,x.height);h(z,L),p&&p(z,L)}}),Nt(this,"onHandlerKeyDown",(c,f)=>{const{aspect:d=0,crop:h,disabled:p,minWidth:C=0,minHeight:D=0,maxWidth:x,maxHeight:b,onChange:A,onComplete:z}=this.props,L=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 j=(navigator.platform.match("Mac")?c.metaKey:c.ctrlKey)?In.nudgeStepLarge:c.shiftKey?In.nudgeStepMedium:In.nudgeStep,_=ol(h,L.width,L.height),X=i2(_,c.key,j,f),$=Ap(X,d,f,L.width,L.height,C,D,x,b);if(!Dp(h,$)){const F=co($,L.width,L.height);A($,F),z&&z($,F)}}),Nt(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(ol(f,C.width,C.height),co(f,C.width,C.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),Nt(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(ol(f,h,p),co(f,h,p))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,uo),this.document.addEventListener("pointerup",this.onDocPointerDone,uo),this.document.addEventListener("pointercancel",this.onDocPointerDone,uo),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,uo),this.document.removeEventListener("pointerup",this.onDocPointerDone,uo),this.document.removeEventListener("pointercancel",this.onDocPointerDone,uo),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=so(c.startCropX+h,0,f.width-d.width),d.y=so(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 b;return d&&f?b=f==="nw"||f==="w"||f==="sw":b=C<p.startCropX,b?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 b=this.getPointRegion(p,c.ord,C,D),A=c.ord||b;let z=c.clientX-c.startClientX,L=c.clientY-c.startClientY;(C&&A==="nw"||A==="w"||A==="sw")&&(z=Math.min(z,-C)),(D&&A==="nw"||A==="n"||A==="ne")&&(L=Math.min(L,-D));const j={unit:"px",x:0,y:0,width:0,height:0};b==="ne"?(j.x=c.startCropX,j.width=z,f?(j.height=j.width/f,j.y=c.startCropY-j.height):(j.height=Math.abs(L),j.y=c.startCropY-j.height)):b==="se"?(j.x=c.startCropX,j.y=c.startCropY,j.width=z,f?j.height=j.width/f:j.height=L):b==="sw"?(j.x=c.startCropX+z,j.y=c.startCropY,j.width=Math.abs(z),f?j.height=j.width/f:j.height=L):b==="nw"&&(j.x=c.startCropX+z,j.width=Math.abs(z),f?(j.height=j.width/f,j.y=c.startCropY-j.height):(j.height=Math.abs(L),j.y=c.startCropY+L));const _=Ap(j,f,b,p.width,p.height,C,D,d,h);return f||In.xyOrds.indexOf(A)>-1?x=_:In.xOrds.indexOf(A)>-1?(x.x=_.x,x.width=_.width):In.yOrds.indexOf(A)>-1&&(x.y=_.y,x.height=_.height),x.x=so(x.x,0,p.width-x.width),x.y=so(x.y,0,p.height-x.height),x}renderCropSelection(){const{ariaLabels:c=In.defaultProps.ariaLabels,disabled:f,locked:d,renderSelectionAddon:h,ruleOfThirds:p,crop:C}=this.props,D=this.getCropStyle();if(C)return vt.createElement("div",{style:D,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":c.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!d&&vt.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},vt.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),vt.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),vt.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),vt.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),vt.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"}),vt.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"}),vt.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"}),vt.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"}),vt.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"}),vt.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"}),vt.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"}),vt.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&&vt.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:x=>x.stopPropagation()},h(this.state)),p&&vt.createElement(vt.Fragment,null,vt.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),vt.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(c){const f={...qr,...this.props.crop||{}};return ol(f,c.width,c.height)}render(){const{aspect:c,children:f,circularCrop:d,className:h,crop:p,disabled:C,locked:D,style:x,ruleOfThirds:b}=this.props,{cropIsActive:A,newCropIsBeingDrawn:z}=this.state,L=p?this.renderCropSelection():null,j=o2("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&&b&&"ReactCrop--rule-of-thirds",!this.dragStarted&&p&&!p.width&&!p.height&&"ReactCrop--invisible-crop",d&&"ReactCrop--no-animate");return vt.createElement("div",{ref:this.componentRef,className:j,style:x},vt.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),p?vt.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},vt.createElement("defs",null,vt.createElement("mask",{id:`hole-${this.instanceId}`},vt.createElement("rect",{width:"100%",height:"100%",fill:"white"}),d?vt.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"}):vt.createElement("rect",{x:`${p.x}${p.unit}`,y:`${p.y}${p.unit}`,width:`${p.width}${p.unit}`,height:`${p.height}${p.unit}`,fill:"black"}))),vt.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,L)}};Nt(il,"xOrds",["e","w"]),Nt(il,"yOrds",["n","s"]),Nt(il,"xyOrds",["nw","ne","se","sw"]),Nt(il,"nudgeStep",1),Nt(il,"nudgeStepMedium",10),Nt(il,"nudgeStepLarge",100),Nt(il,"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 s2=il;const c2=jt`
|
|
85
|
+
`);me=T.pop()||"";for(const I of T)if(I.startsWith("data: "))try{const te=JSON.parse(I.slice(6));te.type==="start"?ee(he=>({...he,total:te.total,message:`Screenshotting ${te.url}...`})):te.type==="progress"?ee({current:te.current,total:te.total,percent:te.percent,status:"processing",message:te.message}):te.type==="complete"?(ee({current:te.processed,total:te.processed,percent:100,status:te.errors>0?"error":"complete",message:te.message}),X()):te.type==="error"&&ee(he=>({...he,status:"error",message:te.message}))}catch{}}}}catch(W){console.error("Featured image generation error:",W),ee({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?r("div",{css:P.loading,children:r("div",{css:P.spinner})}):f&&h?y("div",{css:P.empty,children:[r("p",{children:"No files tracked yet"}),r("p",{css:P.emptyHint,children:"Click Scan to discover files in your public folder"}),r("button",{css:P.scanButton,onClick:_,children:"Scan for Files"})]}):c.length===0&&h?y("div",{css:P.empty,children:[r("p",{children:"No files in this folder"}),r("p",{css:P.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):y(tt,{children:[r($p,{isOpen:F,onClose:()=>le(!1),onSelect:re}),V&&r(rl,{title:"Generating Screenshot",progress:Y,onClose:()=>ie(!1)}),r("div",{css:P.tableWrapper,children:y("table",{css:P.table,children:[r("thead",{children:y("tr",{children:[r("th",{css:[P.th,P.thCheckbox,"",""],children:c.length>0&&r("input",{type:"checkbox",css:P.checkbox,checked:C,ref:q=>{q&&(q.indeterminate=D&&!C)},onChange:j})}),r("th",{css:P.th,children:"Name"}),r("th",{css:[P.th,P.thSize,"",""],children:"Size"}),r("th",{css:[P.th,P.thDimensions,"",""],children:"Dimensions"}),r("th",{css:[P.th,P.thCdn,"",""],children:"CDN"})]})}),y("tbody",{css:P.tbody,children:[!h&&!p&&y("tr",{css:P.parentRow,onClick:b,children:[r("td",{css:P.td}),r("td",{css:P.td,children:y("div",{css:P.nameCell,children:[r("svg",{css:P.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:P.name,children:".."})]})}),r("td",{css:[P.td,P.meta,"",""],children:"--"}),r("td",{css:[P.td,P.meta,"",""],children:"Parent folder"}),r("td",{css:P.td,children:"--"})]}),c.map(q=>r(t2,{item:q,isSelected:x.has(q.path),onClick:W=>A(q,W),onOpen:()=>z(q),onGenerateThumbnail:()=>L(q),editedImageKey:$},q.path)),h&&d&&!p&&y("tr",{css:P.featuredRow,onClick:ne,title:`Generate ${d.filename}`,children:[r("td",{css:P.td}),r("td",{css:P.td,children:y("div",{css:P.nameCell,children:[r("div",{css:P.folderIconWrapper,children:r("svg",{css:P.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:[P.name,P.featuredText,"",""],children:d.filename})]})}),r("td",{css:[P.td,P.meta,P.featuredText,"",""],children:"--"}),r("td",{css:[P.td,P.meta,P.featuredText,"",""],children:"Click to generate"}),r("td",{css:[P.td,P.featuredText,"",""],children:"--"})]})]})]})})]})}function t2({item:i,isSelected:c,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:p}){const[C,D]=v.useState(!1),x=i.type==="folder",b=!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",L=_=>{_.stopPropagation();const X="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(X),D(!0),setTimeout(()=>D(!1),1500)},j=_=>{if(z){_.stopPropagation(),d();return}f(_)};return y("tr",{css:[P.row,c&&!z&&P.rowSelected,"",""],onClick:j,children:[r("td",{css:[P.td,P.checkboxCell,"",""],onClick:_=>_.stopPropagation(),children:!z&&r("input",{type:"checkbox",css:P.checkbox,checked:c,onChange:()=>f({})})}),r("td",{css:P.td,children:y("div",{css:P.nameCell,children:[x?z?y("div",{css:P.imagesFolderWrapper,children:[r("svg",{css:P.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:P.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:P.folderIconWrapper,children:r("svg",{css:P.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):b&&A?r("div",{css:[P.thumbnailWrapper,i.isCloud&&P.thumbnailCloud,i.isRemote&&P.thumbnailRemote,"",""],children:r("img",{css:P.thumbnail,src:A,alt:i.name,loading:"lazy"})}):r("div",{css:[P.thumbnailWrapper,i.isCloud&&P.thumbnailCloud,i.isRemote&&P.thumbnailRemote,"",""],children:r("svg",{css:P.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:P.name,title:i.name,children:n2(i.name)}),y("div",{css:P.actionsCell,children:[y("button",{css:P.copyBtn,onClick:L,title:"Copy file path",children:[C&&r("span",{css:P.tooltip,children:"Copied!"}),r("svg",{css:P.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:P.openBtn,onClick:_=>{_.stopPropagation(),d()},children:"Open"})]})]})}),r("td",{css:[P.td,P.meta,"",""],children:x?y("div",{css:P.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&y("span",{css:[P.folderStat,P.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:P.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&&y("span",{css:[P.folderStat,P.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:P.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&&y("span",{css:[P.folderStat,P.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:P.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&&y("span",{css:[P.folderStat,P.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:P.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&&y("span",{children:[i.fileCount," files"]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount===void 0&&"--"]}):i.hasUpdate?y("span",{css:P.updateLabel,children:[r("svg",{css:P.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:P.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:P.storedLabel,children:r("svg",{css:i.isRemote?P.storedIconRemote:P.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:[P.td,P.meta,"",""],children:x?i.totalSize!==void 0?zp(i.totalSize):"--":i.dimensions?`${i.dimensions.width}x${i.dimensions.height}`:"--"}),r("td",{css:P.td,children:i.cdnPushed?i.isRemote?r("span",{css:P.cdnBadgeRemote,children:"Remote"}):y("span",{css:P.cdnBadge,children:[r("svg",{css:P.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:P.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 n2(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 a2=Object.defineProperty,l2=(i,c,f)=>c in i?a2(i,c,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[c]=f,Nt=(i,c,f)=>l2(i,typeof c!="symbol"?c+"":c,f);const qr={x:0,y:0,width:0,height:0,unit:"px"},so=(i,c,f)=>Math.min(Math.max(i,c),f),o2=(...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 co(i,c,f){return i.unit==="%"?{...qr,...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 ol(i,c,f){return i.unit?i.unit==="px"?{...qr,...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}:{...qr,...i,unit:"px"}}function Dp(i,c,f,d,h,p=0,C=0,D=d,x=h){const b={...i};let A=Math.min(p,d),z=Math.min(C,h),L=Math.min(D,d),j=Math.min(x,h);c&&(c>1?(A=C?C*c:A,z=A/c,L=D*c):(z=p?p/c:z,A=z*c,j=x/c)),b.y<0&&(b.height=Math.max(b.height+b.y,z),b.y=0),b.x<0&&(b.width=Math.max(b.width+b.x,A),b.x=0);const _=d-(b.x+b.width);_<0&&(b.x=Math.min(b.x,d-A),b.width+=_);const X=h-(b.y+b.height);if(X<0&&(b.y=Math.min(b.y,h-z),b.height+=X),b.width<A&&((f==="sw"||f=="nw")&&(b.x-=A-b.width),b.width=A),b.height<z&&((f==="nw"||f=="ne")&&(b.y-=z-b.height),b.height=z),b.width>L&&((f==="sw"||f=="nw")&&(b.x-=L-b.width),b.width=L),b.height>j&&((f==="nw"||f=="ne")&&(b.y-=j-b.height),b.height=j),c){const $=b.width/b.height;if($<c){const F=Math.max(b.width/c,z);(f==="nw"||f=="ne")&&(b.y-=F-b.height),b.height=F}else if($>c){const F=Math.max(b.height*c,A);(f==="sw"||f=="nw")&&(b.x-=F-b.width),b.width=F}}return b}function i2(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 uo={capture:!0,passive:!1};let r2=0;const il=class In extends v.PureComponent{constructor(){super(...arguments),Nt(this,"docMoveBound",!1),Nt(this,"mouseDownOnCrop",!1),Nt(this,"dragStarted",!1),Nt(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),Nt(this,"componentRef",v.createRef()),Nt(this,"mediaRef",v.createRef()),Nt(this,"resizeObserver"),Nt(this,"initChangeCalled",!1),Nt(this,"instanceId",`rc-${r2++}`),Nt(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),Nt(this,"onCropPointerDown",c=>{const{crop:f,disabled:d}=this.props,h=this.getBox();if(!f)return;const p=ol(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,b=c.clientY,A=p.x,z=p.y;if(C){const L=c.clientX-h.x,j=c.clientY-h.y;let _=0,X=0;C==="ne"||C=="e"?(_=L-(p.x+p.width),X=j-p.y,A=p.x,z=p.y+p.height):C==="se"||C==="s"?(_=L-(p.x+p.width),X=j-(p.y+p.height),A=p.x,z=p.y):C==="sw"||C=="w"?(_=L-p.x,X=j-(p.y+p.height),A=p.x+p.width,z=p.y):(C==="nw"||C=="n")&&(_=L-p.x,X=j-p.y,A=p.x+p.width,z=p.y+p.height),x=A+h.x+_,b=z+h.y+X}this.evData={startClientX:x,startClientY:b,startCropX:A,startCropY:z,clientX:c.clientX,clientY:c.clientY,isResize:D,ord:C},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),Nt(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,b=c.clientY-D.y,A={unit:"px",x,y:b,width:0,height:0};this.evData={startClientX:c.clientX,startClientY:c.clientY,startCropX:x,startCropY:b,clientX:c.clientX,clientY:c.clientY,isResize:!0},this.mouseDownOnCrop=!0,C(ol(A,D.width,D.height),co(A,D.width,D.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),Nt(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(ol(x,C.width,C.height),co(x,C.width,C.height))}),Nt(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(),b=this.makePixelCrop(x),A=(navigator.platform.match("Mac")?c.metaKey:c.ctrlKey)?In.nudgeStepLarge:c.shiftKey?In.nudgeStepMedium:In.nudgeStep;if(C==="ArrowLeft"?(b.x-=A,D=!0):C==="ArrowRight"?(b.x+=A,D=!0):C==="ArrowUp"?(b.y-=A,D=!0):C==="ArrowDown"&&(b.y+=A,D=!0),D){c.cancelable&&c.preventDefault(),b.x=so(b.x,0,x.width-b.width),b.y=so(b.y,0,x.height-b.height);const z=ol(b,x.width,x.height),L=co(b,x.width,x.height);h(z,L),p&&p(z,L)}}),Nt(this,"onHandlerKeyDown",(c,f)=>{const{aspect:d=0,crop:h,disabled:p,minWidth:C=0,minHeight:D=0,maxWidth:x,maxHeight:b,onChange:A,onComplete:z}=this.props,L=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 j=(navigator.platform.match("Mac")?c.metaKey:c.ctrlKey)?In.nudgeStepLarge:c.shiftKey?In.nudgeStepMedium:In.nudgeStep,_=ol(h,L.width,L.height),X=i2(_,c.key,j,f),$=Dp(X,d,f,L.width,L.height,C,D,x,b);if(!Mp(h,$)){const F=co($,L.width,L.height);A($,F),z&&z($,F)}}),Nt(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(ol(f,C.width,C.height),co(f,C.width,C.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),Nt(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(ol(f,h,p),co(f,h,p))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,uo),this.document.addEventListener("pointerup",this.onDocPointerDone,uo),this.document.addEventListener("pointercancel",this.onDocPointerDone,uo),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,uo),this.document.removeEventListener("pointerup",this.onDocPointerDone,uo),this.document.removeEventListener("pointercancel",this.onDocPointerDone,uo),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=so(c.startCropX+h,0,f.width-d.width),d.y=so(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 b;return d&&f?b=f==="nw"||f==="w"||f==="sw":b=C<p.startCropX,b?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 b=this.getPointRegion(p,c.ord,C,D),A=c.ord||b;let z=c.clientX-c.startClientX,L=c.clientY-c.startClientY;(C&&A==="nw"||A==="w"||A==="sw")&&(z=Math.min(z,-C)),(D&&A==="nw"||A==="n"||A==="ne")&&(L=Math.min(L,-D));const j={unit:"px",x:0,y:0,width:0,height:0};b==="ne"?(j.x=c.startCropX,j.width=z,f?(j.height=j.width/f,j.y=c.startCropY-j.height):(j.height=Math.abs(L),j.y=c.startCropY-j.height)):b==="se"?(j.x=c.startCropX,j.y=c.startCropY,j.width=z,f?j.height=j.width/f:j.height=L):b==="sw"?(j.x=c.startCropX+z,j.y=c.startCropY,j.width=Math.abs(z),f?j.height=j.width/f:j.height=L):b==="nw"&&(j.x=c.startCropX+z,j.width=Math.abs(z),f?(j.height=j.width/f,j.y=c.startCropY-j.height):(j.height=Math.abs(L),j.y=c.startCropY+L));const _=Dp(j,f,b,p.width,p.height,C,D,d,h);return f||In.xyOrds.indexOf(A)>-1?x=_:In.xOrds.indexOf(A)>-1?(x.x=_.x,x.width=_.width):In.yOrds.indexOf(A)>-1&&(x.y=_.y,x.height=_.height),x.x=so(x.x,0,p.width-x.width),x.y=so(x.y,0,p.height-x.height),x}renderCropSelection(){const{ariaLabels:c=In.defaultProps.ariaLabels,disabled:f,locked:d,renderSelectionAddon:h,ruleOfThirds:p,crop:C}=this.props,D=this.getCropStyle();if(C)return vt.createElement("div",{style:D,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":c.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!d&&vt.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},vt.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),vt.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),vt.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),vt.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),vt.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"}),vt.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"}),vt.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"}),vt.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"}),vt.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"}),vt.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"}),vt.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"}),vt.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&&vt.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:x=>x.stopPropagation()},h(this.state)),p&&vt.createElement(vt.Fragment,null,vt.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),vt.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(c){const f={...qr,...this.props.crop||{}};return ol(f,c.width,c.height)}render(){const{aspect:c,children:f,circularCrop:d,className:h,crop:p,disabled:C,locked:D,style:x,ruleOfThirds:b}=this.props,{cropIsActive:A,newCropIsBeingDrawn:z}=this.state,L=p?this.renderCropSelection():null,j=o2("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&&b&&"ReactCrop--rule-of-thirds",!this.dragStarted&&p&&!p.width&&!p.height&&"ReactCrop--invisible-crop",d&&"ReactCrop--no-animate");return vt.createElement("div",{ref:this.componentRef,className:j,style:x},vt.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),p?vt.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},vt.createElement("defs",null,vt.createElement("mask",{id:`hole-${this.instanceId}`},vt.createElement("rect",{width:"100%",height:"100%",fill:"white"}),d?vt.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"}):vt.createElement("rect",{x:`${p.x}${p.unit}`,y:`${p.y}${p.unit}`,width:`${p.width}${p.unit}`,height:`${p.height}${p.unit}`,fill:"black"}))),vt.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,L)}};Nt(il,"xOrds",["e","w"]),Nt(il,"yOrds",["n","s"]),Nt(il,"xyOrds",["nw","ne","se","sw"]),Nt(il,"nudgeStep",1),Nt(il,"nudgeStepMedium",10),Nt(il,"nudgeStepLarge",100),Nt(il,"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 s2=il;const c2=jt`
|
|
86
86
|
from { opacity: 0; }
|
|
87
87
|
to { opacity: 1; }
|
|
88
|
-
`,we={overlay:m("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",c2," 0.15s ease-out;font-family:",sl,";",""),container:m(Ra," 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,";}","")},u2=[{label:"Free",value:void 0},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"2:3",value:2/3},{label:"9:16",value:9/16}];function d2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(2)} MB`}function f2({imagePath:i,imageSrc:c,dimensions:f,fileSize:d,onClose:h,onSaveComplete:p,triggerRefresh:C}){const D=v.useRef(null),[x,b]=v.useState(),[A,z]=v.useState(),[L,j]=v.useState(void 0),[_,X]=v.useState(f.width),[$,F]=v.useState(f.height),[le,V]=v.useState(!1),[ie,Y]=v.useState(!1),[ee,ne]=v.useState({width:f.width,height:f.height}),[re,q]=v.useState(1),[W,pe]=v.useState(!1),[be,me]=v.useState(0),[se,Be]=v.useState(!1),T=_!==ee.width||$!==ee.height,[I,te]=v.useState(0),[he,Fe]=v.useState(0),[S,H]=v.useState(!1),[ae,oe]=v.useState(0),[Ce,Ee]=v.useState(null),[Ge,mt]=v.useState(d),[Oe,an]=v.useState(95),[$e,rt]=v.useState(0),ut=$e!==0,Ct=J=>{const ue=J.currentTarget,{naturalWidth:Xe,naturalHeight:nt,width:Ne,height:Ae}=ue;ne({width:Xe,height:nt}),q(Xe/Ne),Y(!0),X(Xe),F(nt)},Ht=()=>{if(!ie||!D.current||W||T||ut)return;const J=D.current.width,ue=D.current.height;if(pe(!0),L){const Xe=J/ue;let nt,Ne;L>Xe?(nt=100,Ne=Xe/L*100):(Ne=100,nt=L/Xe*100);const Ae={unit:"%",x:(100-nt)/2,y:(100-Ne)/2,width:nt,height:Ne};b(Ae);const kt={unit:"px",x:Math.round(Ae.x/100*J),y:Math.round(Ae.y/100*ue),width:Math.round(Ae.width/100*J),height:Math.round(Ae.height/100*ue)};z(kt)}else b({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:J,height:ue})},Pt=()=>{pe(!1),b(void 0),z(void 0)};v.useEffect(()=>{if(A&&ie&&re>0){const J=Math.round(A.width*re),ue=Math.round(A.height*re);te(J),Fe(ue)}else W||(te(0),Fe(0))},[A,ie,re,W]);const en=()=>{rt(J=>(J+90)%360)},pn=()=>{rt(J=>(J-90+360)%360)},tn=()=>{rt(0)},bt=()=>{se&&p({name:i.split("/").pop()||"",path:i,type:"file",dimensions:ee}),h()},Rt=J=>{if(j(J),!ie||!D.current)return;const ue=D.current.width,Xe=D.current.height;if(J){const nt=ue/Xe;let Ne,Ae;J>nt?(Ne=100,Ae=nt/J*100):(Ae=100,Ne=J/nt*100);const kt={unit:"%",x:(100-Ne)/2,y:(100-Ae)/2,width:Ne,height:Ae};b(kt);const xt={unit:"px",x:Math.round(kt.x/100*ue),y:Math.round(kt.y/100*Xe),width:Math.round(kt.width/100*ue),height:Math.round(kt.height/100*Xe)};z(xt)}else b({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:ue,height:Xe})},at=ee.width/ee.height,ze=J=>{if(W)return;const ue=parseInt(J.target.value)||0;X(ue),ue>0&&F(Math.round(ue/at))},Lt=J=>{if(W)return;const ue=parseInt(J.target.value)||0;F(ue),ue>0&&X(Math.round(ue*at))},on=()=>{X(ee.width),F(ee.height)},rn=J=>{if(!A||!D.current)return;const ue=parseInt(J.target.value)||0;if(ue<=0)return;let Xe=he;L&&(Xe=Math.round(ue/L));const nt=ue/re,Ne=Xe/re,Ae={unit:"px",x:A.x,y:A.y,width:nt,height:Ne},kt=D.current.width-Ae.x,xt=D.current.height-Ae.y;Ae.width=Math.min(nt,kt),Ae.height=Math.min(Ne,xt),z(Ae),b({unit:"px",x:Ae.x,y:Ae.y,width:Ae.width,height:Ae.height})},xn=J=>{if(!A||!D.current)return;const ue=parseInt(J.target.value)||0;if(ue<=0)return;let Xe=I;L&&(Xe=Math.round(ue*L));const nt=Xe/re,Ne=ue/re,Ae={unit:"px",x:A.x,y:A.y,width:nt,height:Ne},kt=D.current.width-Ae.x,xt=D.current.height-Ae.y;Ae.width=Math.min(nt,kt),Ae.height=Math.min(Ne,xt),z(Ae),b({unit:"px",x:Ae.x,y:Ae.y,width:Ae.width,height:Ae.height})},Sn=async()=>{if(ie){V(!0);try{const J=A?{x:Math.round(A.x*re),y:Math.round(A.y*re),width:Math.round(A.width*re),height:Math.round(A.height*re)}:{x:0,y:0,width:ee.width,height:ee.height};let ue=W?I:T?_:ee.width,Xe=W?he:T?$:ee.height;if($e===90||$e===270){const Ae=ue;ue=Xe,Xe=Ae}const Ne=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:i,crop:J,rotation:$e,resize:{width:ue,height:Xe},quality:Oe})})).json();Ne.success?(C(),p(Ne.updatedItem),ne({width:Ne.dimensions.width,height:Ne.dimensions.height}),X(Ne.dimensions.width),F(Ne.dimensions.height),Ne.updatedItem?.size&&mt(Ne.updatedItem.size),pe(!1),b(void 0),z(void 0),rt(0),Be(!0),me(Date.now()),oe(Ae=>Ae+1),H(!0),setTimeout(()=>H(!1),3e3)):(console.error("Edit failed:",Ne.error),Ee(Ne.error||"Failed to save image"))}catch(J){console.error("Edit error:",J),Ee("An error occurred while saving the image")}finally{V(!1)}}};return y("div",{css:we.overlay,children:[y("div",{css:we.container,children:[y("div",{css:we.main,children:[r("div",{css:we.headerButtons,children:r("button",{css:we.closeBtn,onClick:bt,children:r("svg",{css:we.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"})})})}),y("div",{css:we.rotationWrapper,onClick:Ht,children:[r(s2,{crop:W?x:void 0,onChange:J=>b(J),onComplete:J=>z(J),aspect:L,css:we.cropWrapper,disabled:!W,children:r("img",{ref:D,src:be?`${c}?v=${be}`:c,alt:"Edit",onLoad:Ct,style:{cursor:W?"crosshair":"pointer"}})}),!W&&ie&&r("div",{css:we.cropHint,children:ut?"Save rotation first to enable crop":T?"Save resize first to enable crop":"Click to enable crop selection"}),S&&r("div",{css:we.successBanner,children:"Image updated"},ae)]})]}),y("div",{css:we.sidebar,children:[r("div",{css:we.sidebarHeader,children:r("h2",{css:we.sidebarTitle,children:"Edit Image"})}),y("div",{css:we.sidebarContent,children:[y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"Crop Selection"}),r("span",{css:we.subSectionLabel,children:"Aspect Ratio"}),r("div",{css:we.aspectButtons,children:u2.map(J=>r("button",{css:[we.aspectBtn,L===J.value&&we.aspectBtnActive,"",""],onClick:()=>Rt(J.value),disabled:T||ut,children:J.label},J.label))}),W&&y(tt,{children:[r("span",{css:we.subSectionLabel,children:"Selection Size"}),y("div",{css:we.resizeRow,children:[r("input",{type:"number",css:we.resizeInput,value:I,onChange:rn,min:1}),r("span",{css:we.resizeX,children:"×"}),r("input",{type:"number",css:we.resizeInput,value:he,onChange:xn,min:1}),r("span",{css:we.resizeX,children:"px"})]})]}),r("p",{css:we.hint,children:ut?"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:we.clearBtn,onClick:Pt,children:"Clear Selection"})]}),y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"Rotation"}),r("div",{css:we.rotatePreview,children:r("img",{src:be?`${c}?v=${be}`:c,alt:"Rotation preview",style:{transform:`rotate(${$e}deg)`}})}),y("div",{css:we.rotateButtons,children:[y("button",{css:we.rotateBtn,onClick:pn,disabled:le||W||T,children:[r("svg",{css:we.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"]}),y("button",{css:we.rotateBtn,onClick:en,disabled:le||W||T,children:[r("svg",{css:we.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"]})]}),ut&&r("button",{css:we.clearBtn,onClick:tn,children:"Reset Rotation"}),r("p",{css:we.hint,children:W||T?"Save other changes first to rotate":ut?"Click Save Changes to apply rotation":"Preview rotation before saving"})]}),y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"Resize Image"}),y("div",{css:we.resizeRow,children:[r("input",{type:"number",css:we.resizeInput,value:_,onChange:ze,min:1,disabled:W||ut}),r("span",{css:we.resizeX,children:"×"}),r("input",{type:"number",css:we.resizeInput,value:$,onChange:Lt,min:1,disabled:W||ut}),r("span",{css:we.resizeX,children:"px"})]}),T&&!W&&!ut&&r("button",{css:we.clearBtn,onClick:on,children:"Reset to Original"}),ut?r("p",{css:we.hint,children:"Save rotation first to resize"}):W?r("p",{css:we.hint,children:"Clear crop selection to resize"}):T?r("p",{css:we.hint,children:"Save to apply resize, then crop"}):r("p",{css:we.hint,children:"Maintains aspect ratio"})]}),y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"Quality"}),y("div",{css:we.qualityRow,children:[r("input",{type:"range",css:we.qualitySlider,min:1,max:100,value:Oe,onChange:J=>an(parseInt(J.target.value))}),y("span",{css:we.qualityValue,children:[Oe,"%"]})]}),r("p",{css:we.hint,children:"Lower quality = smaller file size"})]}),y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"File Size"}),r("p",{css:we.fileSize,children:d2(Ge)})]})]}),y("div",{css:we.sidebarFooter,children:[r("button",{css:we.actionBtn,onClick:Sn,disabled:le||!ie,children:le?y(tt,{children:[r("span",{css:we.spinner}),"Saving..."]}):"Save Changes"}),r("button",{css:we.cancelBtn,onClick:bt,disabled:le,children:"Close"})]})]})]}),Ce&&r(Vr,{title:"Error",message:Ce,onClose:()=>Ee(null)})]})}const h2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],p2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function g2(i){const c=i.toLowerCase().substring(i.lastIndexOf("."));return h2.includes(c)}function m2(i){const c=i.toLowerCase().substring(i.lastIndexOf("."));return p2.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 b2(){const{focusedItem:i,setFocusedItem:c,triggerRefresh:f,fileItems:d,setEditedImageKey:h,requestDelete:p,requestMove:C,requestSync:D,requestDownload:x,requestProcess:b,setProcessMode:A,actionState:z}=go(),[L,j]=v.useState(!1),[_,X]=v.useState(!1),[$,F]=v.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[le,V]=v.useState(!1),[ie,Y]=v.useState(null),[ee,ne]=v.useState(!1),[re,q]=v.useState(!1),[W,pe]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[be,me]=v.useState(!1),[se,Be]=v.useState(0),T=z.showProgress,I=i?i.name.toLowerCase()==="favicon.png"||i.name.toLowerCase()==="favicon.jpg":!1,te=i&&!i.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(i.name)&&(!i.isCloud||i.hasUpdate),he=rt=>{c(rt),Be(Date.now()),h(rt.path)};if(!i)return null;const Fe=g2(i.name),S=m2(i.name),H="/"+i.path.replace(/^public\//,""),ae=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${H}`:H,oe=se?`${ae}?v=${se}`:ae,Ce=typeof window<"u"?window.location.origin:"",Ee=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${H}`:`${Ce}${H}`,Ge=()=>{c(null)},mt=()=>{navigator.clipboard.writeText(Ee),ne(!0),setTimeout(()=>ne(!1),1500)},Oe=async rt=>{if(rt&&rt!==i.name){j(!1),X(!0),F({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const ut=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:i.path,newName:rt})});if(!ut.body)throw new Error("No response body");const Ct=ut.body.getReader(),Ht=new TextDecoder;let Pt="",en="";for(;;){const{done:pn,value:tn}=await Ct.read();if(pn)break;Pt+=Ht.decode(tn,{stream:!0});const bt=Pt.split(`
|
|
88
|
+
`,we={overlay:m("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",c2," 0.15s ease-out;font-family:",sl,";",""),container:m(Ea," 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,";}","")},u2=[{label:"Free",value:void 0},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"2:3",value:2/3},{label:"9:16",value:9/16}];function d2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(2)} MB`}function f2({imagePath:i,imageSrc:c,dimensions:f,fileSize:d,onClose:h,onSaveComplete:p,triggerRefresh:C}){const D=v.useRef(null),[x,b]=v.useState(),[A,z]=v.useState(),[L,j]=v.useState(void 0),[_,X]=v.useState(f.width),[$,F]=v.useState(f.height),[le,V]=v.useState(!1),[ie,Y]=v.useState(!1),[ee,ne]=v.useState({width:f.width,height:f.height}),[re,q]=v.useState(1),[W,pe]=v.useState(!1),[be,me]=v.useState(0),[se,Be]=v.useState(!1),T=_!==ee.width||$!==ee.height,[I,te]=v.useState(0),[he,Fe]=v.useState(0),[S,H]=v.useState(!1),[ae,oe]=v.useState(0),[Ce,Ee]=v.useState(null),[Ge,mt]=v.useState(d),[Oe,an]=v.useState(95),[$e,rt]=v.useState(0),ut=$e!==0,Ct=J=>{const ue=J.currentTarget,{naturalWidth:Xe,naturalHeight:nt,width:Ne,height:Ae}=ue;ne({width:Xe,height:nt}),q(Xe/Ne),Y(!0),X(Xe),F(nt)},Ht=()=>{if(!ie||!D.current||W||T||ut)return;const J=D.current.width,ue=D.current.height;if(pe(!0),L){const Xe=J/ue;let nt,Ne;L>Xe?(nt=100,Ne=Xe/L*100):(Ne=100,nt=L/Xe*100);const Ae={unit:"%",x:(100-nt)/2,y:(100-Ne)/2,width:nt,height:Ne};b(Ae);const kt={unit:"px",x:Math.round(Ae.x/100*J),y:Math.round(Ae.y/100*ue),width:Math.round(Ae.width/100*J),height:Math.round(Ae.height/100*ue)};z(kt)}else b({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:J,height:ue})},Pt=()=>{pe(!1),b(void 0),z(void 0)};v.useEffect(()=>{if(A&&ie&&re>0){const J=Math.round(A.width*re),ue=Math.round(A.height*re);te(J),Fe(ue)}else W||(te(0),Fe(0))},[A,ie,re,W]);const en=()=>{rt(J=>(J+90)%360)},pn=()=>{rt(J=>(J-90+360)%360)},tn=()=>{rt(0)},bt=()=>{se&&p({name:i.split("/").pop()||"",path:i,type:"file",dimensions:ee}),h()},Rt=J=>{if(j(J),!ie||!D.current)return;const ue=D.current.width,Xe=D.current.height;if(J){const nt=ue/Xe;let Ne,Ae;J>nt?(Ne=100,Ae=nt/J*100):(Ae=100,Ne=J/nt*100);const kt={unit:"%",x:(100-Ne)/2,y:(100-Ae)/2,width:Ne,height:Ae};b(kt);const xt={unit:"px",x:Math.round(kt.x/100*ue),y:Math.round(kt.y/100*Xe),width:Math.round(kt.width/100*ue),height:Math.round(kt.height/100*Xe)};z(xt)}else b({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:ue,height:Xe})},at=ee.width/ee.height,ze=J=>{if(W)return;const ue=parseInt(J.target.value)||0;X(ue),ue>0&&F(Math.round(ue/at))},Lt=J=>{if(W)return;const ue=parseInt(J.target.value)||0;F(ue),ue>0&&X(Math.round(ue*at))},on=()=>{X(ee.width),F(ee.height)},rn=J=>{if(!A||!D.current)return;const ue=parseInt(J.target.value)||0;if(ue<=0)return;let Xe=he;L&&(Xe=Math.round(ue/L));const nt=ue/re,Ne=Xe/re,Ae={unit:"px",x:A.x,y:A.y,width:nt,height:Ne},kt=D.current.width-Ae.x,xt=D.current.height-Ae.y;Ae.width=Math.min(nt,kt),Ae.height=Math.min(Ne,xt),z(Ae),b({unit:"px",x:Ae.x,y:Ae.y,width:Ae.width,height:Ae.height})},xn=J=>{if(!A||!D.current)return;const ue=parseInt(J.target.value)||0;if(ue<=0)return;let Xe=I;L&&(Xe=Math.round(ue*L));const nt=Xe/re,Ne=ue/re,Ae={unit:"px",x:A.x,y:A.y,width:nt,height:Ne},kt=D.current.width-Ae.x,xt=D.current.height-Ae.y;Ae.width=Math.min(nt,kt),Ae.height=Math.min(Ne,xt),z(Ae),b({unit:"px",x:Ae.x,y:Ae.y,width:Ae.width,height:Ae.height})},Sn=async()=>{if(ie){V(!0);try{const J=A?{x:Math.round(A.x*re),y:Math.round(A.y*re),width:Math.round(A.width*re),height:Math.round(A.height*re)}:{x:0,y:0,width:ee.width,height:ee.height};let ue=W?I:T?_:ee.width,Xe=W?he:T?$:ee.height;if($e===90||$e===270){const Ae=ue;ue=Xe,Xe=Ae}const Ne=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:i,crop:J,rotation:$e,resize:{width:ue,height:Xe},quality:Oe})})).json();Ne.success?(C(),p(Ne.updatedItem),ne({width:Ne.dimensions.width,height:Ne.dimensions.height}),X(Ne.dimensions.width),F(Ne.dimensions.height),Ne.updatedItem?.size&&mt(Ne.updatedItem.size),pe(!1),b(void 0),z(void 0),rt(0),Be(!0),me(Date.now()),oe(Ae=>Ae+1),H(!0),setTimeout(()=>H(!1),3e3)):(console.error("Edit failed:",Ne.error),Ee(Ne.error||"Failed to save image"))}catch(J){console.error("Edit error:",J),Ee("An error occurred while saving the image")}finally{V(!1)}}};return y("div",{css:we.overlay,children:[y("div",{css:we.container,children:[y("div",{css:we.main,children:[r("div",{css:we.headerButtons,children:r("button",{css:we.closeBtn,onClick:bt,children:r("svg",{css:we.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"})})})}),y("div",{css:we.rotationWrapper,onClick:Ht,children:[r(s2,{crop:W?x:void 0,onChange:J=>b(J),onComplete:J=>z(J),aspect:L,css:we.cropWrapper,disabled:!W,children:r("img",{ref:D,src:be?`${c}?v=${be}`:c,alt:"Edit",onLoad:Ct,style:{cursor:W?"crosshair":"pointer"}})}),!W&&ie&&r("div",{css:we.cropHint,children:ut?"Save rotation first to enable crop":T?"Save resize first to enable crop":"Click to enable crop selection"}),S&&r("div",{css:we.successBanner,children:"Image updated"},ae)]})]}),y("div",{css:we.sidebar,children:[r("div",{css:we.sidebarHeader,children:r("h2",{css:we.sidebarTitle,children:"Edit Image"})}),y("div",{css:we.sidebarContent,children:[y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"Crop Selection"}),r("span",{css:we.subSectionLabel,children:"Aspect Ratio"}),r("div",{css:we.aspectButtons,children:u2.map(J=>r("button",{css:[we.aspectBtn,L===J.value&&we.aspectBtnActive,"",""],onClick:()=>Rt(J.value),disabled:T||ut,children:J.label},J.label))}),W&&y(tt,{children:[r("span",{css:we.subSectionLabel,children:"Selection Size"}),y("div",{css:we.resizeRow,children:[r("input",{type:"number",css:we.resizeInput,value:I,onChange:rn,min:1}),r("span",{css:we.resizeX,children:"×"}),r("input",{type:"number",css:we.resizeInput,value:he,onChange:xn,min:1}),r("span",{css:we.resizeX,children:"px"})]})]}),r("p",{css:we.hint,children:ut?"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:we.clearBtn,onClick:Pt,children:"Clear Selection"})]}),y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"Rotation"}),r("div",{css:we.rotatePreview,children:r("img",{src:be?`${c}?v=${be}`:c,alt:"Rotation preview",style:{transform:`rotate(${$e}deg)`}})}),y("div",{css:we.rotateButtons,children:[y("button",{css:we.rotateBtn,onClick:pn,disabled:le||W||T,children:[r("svg",{css:we.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"]}),y("button",{css:we.rotateBtn,onClick:en,disabled:le||W||T,children:[r("svg",{css:we.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"]})]}),ut&&r("button",{css:we.clearBtn,onClick:tn,children:"Reset Rotation"}),r("p",{css:we.hint,children:W||T?"Save other changes first to rotate":ut?"Click Save Changes to apply rotation":"Preview rotation before saving"})]}),y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"Resize Image"}),y("div",{css:we.resizeRow,children:[r("input",{type:"number",css:we.resizeInput,value:_,onChange:ze,min:1,disabled:W||ut}),r("span",{css:we.resizeX,children:"×"}),r("input",{type:"number",css:we.resizeInput,value:$,onChange:Lt,min:1,disabled:W||ut}),r("span",{css:we.resizeX,children:"px"})]}),T&&!W&&!ut&&r("button",{css:we.clearBtn,onClick:on,children:"Reset to Original"}),ut?r("p",{css:we.hint,children:"Save rotation first to resize"}):W?r("p",{css:we.hint,children:"Clear crop selection to resize"}):T?r("p",{css:we.hint,children:"Save to apply resize, then crop"}):r("p",{css:we.hint,children:"Maintains aspect ratio"})]}),y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"Quality"}),y("div",{css:we.qualityRow,children:[r("input",{type:"range",css:we.qualitySlider,min:1,max:100,value:Oe,onChange:J=>an(parseInt(J.target.value))}),y("span",{css:we.qualityValue,children:[Oe,"%"]})]}),r("p",{css:we.hint,children:"Lower quality = smaller file size"})]}),y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"File Size"}),r("p",{css:we.fileSize,children:d2(Ge)})]})]}),y("div",{css:we.sidebarFooter,children:[r("button",{css:we.actionBtn,onClick:Sn,disabled:le||!ie,children:le?y(tt,{children:[r("span",{css:we.spinner}),"Saving..."]}):"Save Changes"}),r("button",{css:we.cancelBtn,onClick:bt,disabled:le,children:"Close"})]})]})]}),Ce&&r(Vr,{title:"Error",message:Ce,onClose:()=>Ee(null)})]})}const h2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],p2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function g2(i){const c=i.toLowerCase().substring(i.lastIndexOf("."));return h2.includes(c)}function m2(i){const c=i.toLowerCase().substring(i.lastIndexOf("."));return p2.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 b2(){const{focusedItem:i,setFocusedItem:c,triggerRefresh:f,fileItems:d,setEditedImageKey:h,requestDelete:p,requestMove:C,requestSync:D,requestDownload:x,requestProcess:b,setProcessMode:A,actionState:z}=go(),[L,j]=v.useState(!1),[_,X]=v.useState(!1),[$,F]=v.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[le,V]=v.useState(!1),[ie,Y]=v.useState(null),[ee,ne]=v.useState(!1),[re,q]=v.useState(!1),[W,pe]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[be,me]=v.useState(!1),[se,Be]=v.useState(0),T=z.showProgress,I=i?i.name.toLowerCase()==="favicon.png"||i.name.toLowerCase()==="favicon.jpg":!1,te=i&&!i.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(i.name)&&(!i.isCloud||i.hasUpdate),he=rt=>{c(rt),Be(Date.now()),h(rt.path)};if(!i)return null;const Fe=g2(i.name),S=m2(i.name),H="/"+i.path.replace(/^public\//,""),ae=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${H}`:H,oe=se?`${ae}?v=${se}`:ae,Ce=typeof window<"u"?window.location.origin:"",Ee=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${H}`:`${Ce}${H}`,Ge=()=>{c(null)},mt=()=>{navigator.clipboard.writeText(Ee),ne(!0),setTimeout(()=>ne(!1),1500)},Oe=async rt=>{if(rt&&rt!==i.name){j(!1),X(!0),F({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const ut=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:i.path,newName:rt})});if(!ut.body)throw new Error("No response body");const Ct=ut.body.getReader(),Ht=new TextDecoder;let Pt="",en="";for(;;){const{done:pn,value:tn}=await Ct.read();if(pn)break;Pt+=Ht.decode(tn,{stream:!0});const bt=Pt.split(`
|
|
89
89
|
`);Pt=bt.pop()||"";for(const Rt of bt){if(!Rt.startsWith("data: "))continue;const at=JSON.parse(Rt.slice(6));at.type==="start"?F({current:0,total:at.total,percent:0,status:"processing",message:at.message}):at.type==="progress"?F({current:at.current,total:at.total,percent:Math.round(at.current/at.total*100),status:"processing",message:at.message}):at.type==="complete"?(en=at.newPath,F({current:at.renamed,total:at.renamed,percent:100,status:"complete",message:"Renamed successfully"})):at.type==="error"&&(F(ze=>({...ze,status:"error",message:at.message})),Y({title:"Rename Failed",message:at.message}))}}en&&(c({...i,path:en,name:en.split("/").pop()||rt}),f())}catch(ut){console.error("Rename error:",ut),F(Ct=>({...Ct,status:"error",message:"Failed to rename"})),Y({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},an=async()=>{if(i){q(!0),pe({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const rt=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+i.path.replace(/^public\//,"")})});if(!rt.ok){const Ht=await rt.json();pe({current:0,total:3,percent:0,status:"error",message:Ht.error||"Failed to generate favicons"});return}const ut=rt.body?.getReader(),Ct=new TextDecoder;if(ut){let Ht="";for(;;){const{done:Pt,value:en}=await ut.read();if(Pt)break;Ht+=Ct.decode(en,{stream:!0});const pn=Ht.split(`
|
|
90
|
-
`);Ht=pn.pop()||"";for(const tn of pn)if(tn.startsWith("data: "))try{const bt=JSON.parse(tn.slice(6));bt.type==="start"?pe(Rt=>({...Rt,total:bt.total})):bt.type==="progress"?pe({current:bt.current,total:bt.total,percent:bt.percent,status:"processing",message:bt.message}):bt.type==="complete"?pe({current:bt.processed,total:bt.processed,percent:100,status:bt.errors>0?"error":"complete",message:bt.message}):bt.type==="error"&&pe(Rt=>({...Rt,status:"error",message:bt.message}))}catch{}}}}catch(rt){console.error("Favicon generation error:",rt),pe({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},$e=()=>Fe?r("img",{css:fe.image,src:oe,alt:i.name}):S?r("video",{css:fe.video,src:oe,controls:!0}):y("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 y(tt,{children:[ie&&r(Vr,{title:ie.title,message:ie.message,onClose:()=>Y(null)}),r(Kp,{isOpen:le,onClose:()=>V(!1)}),L&&r(Dl,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:i.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:Oe,onCancel:()=>j(!1)}),_&&r(rl,{title:"Renaming",progress:$,onClose:()=>{X(!1),f()}}),re&&r(rl,{title:"Generating Favicons",progress:W,onClose:()=>q(!1)}),r("div",{css:fe.overlay,onClick:Ge,children:y("div",{css:fe.container,onClick:rt=>rt.stopPropagation(),children:[y("div",{css:fe.main,children:[y("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"})})}),y("button",{css:fe.copyBtn,onClick:mt,title:"Copy file path",children:[ee&&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:$e()})]}),y("div",{css:fe.sidebar,children:[r("div",{css:fe.sidebarHeader,children:r("h3",{css:fe.sidebarTitle,children:"Details"})}),y("div",{css:fe.sidebarContent,children:[y("div",{css:fe.info,children:[y("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Name"}),r("span",{css:fe.infoValueWrap,children:i.name})]}),y("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&&y("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Size"}),r("span",{css:fe.infoValue,children:y2(i.size)})]}),i.dimensions&&y("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Dimensions"}),y("span",{css:fe.infoValue,children:[i.dimensions.width," × ",i.dimensions.height]})]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&y("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Thumbnails"}),r("span",{css:fe.infoValue,children:y("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"})]})})]}),y("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"})]}),y("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"URL"}),r("a",{href:Ee,target:"_blank",rel:"noopener noreferrer",css:fe.infoLink,title:Ee,children:Ee})]})]}),y("div",{css:fe.actions,children:[y("button",{css:fe.actionBtn,onClick:()=>j(!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"]}),Fe&&y("button",{css:fe.actionBtn,onClick:()=>me(!0),disabled:T||!te,title:te?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"})}),te?"Edit Image":"Download to Edit"]}),y("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"]}),y("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"]}),y("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"]}),y("button",{css:fe.actionBtn,onClick:()=>{A("generate"),b([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)&&y("button",{css:fe.actionBtn,onClick:()=>{A("remove"),b([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"]}),I&&y("button",{css:fe.actionBtn,onClick:an,disabled:re||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"]}),y("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"]})]})]})]})]})}),be&&i.dimensions&&r(f2,{imagePath:i.path,imageSrc:oe,dimensions:i.dimensions,fileSize:i.size||0,onClose:()=>me(!1),onSaveComplete:he,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 Ml={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 v2(){const{error:i,clearError:c}=go();return i?r("div",{css:Ml.overlay,onClick:c,children:y("div",{css:Ml.modal,onClick:f=>f.stopPropagation(),children:[y("div",{css:Ml.header,children:[r("svg",{css:Ml.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:Ml.title,children:i.title})]}),r("p",{css:Ml.message,children:i.message}),r("button",{css:Ml.button,onClick:c,children:"OK"})]})}):null}const Tp={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 x2({triggerRefresh:i,clearSelection:c,setFocusedItem:f,showError:d}){const[h,p]=v.useState(Tp),C=v.useCallback(re=>{p(q=>({...q,progressState:typeof re=="function"?re(q.progressState):{...q.progressState,...re}}))},[]),D=v.useCallback(re=>{p(q=>({...q,showProgress:re}))},[]),x=v.useCallback(re=>{p(q=>({...q,progressTitle:re}))},[]),b=Fp({setShowProgress:D,setProgressTitle:x,setProgressState:C,triggerRefresh:i}),A=v.useCallback(re=>{p(q=>({...q,actionPaths:re,showDeleteConfirm:!0}))},[]),z=v.useCallback(re=>{p(q=>({...q,actionPaths:re,showMoveModal:!0}))},[]),L=v.useCallback((re,q)=>{const W=re.map(me=>"/"+me.replace(/^public\//,""));let pe=!1,be=!1;for(const me of re){const se=q.find(Be=>Be.path===me);se&&(se.isRemote?pe=!0:se.cdnPushed||(be=!0))}p(me=>({...me,actionPaths:re,syncImageCount:W.length,syncHasRemote:pe,syncHasLocal:be,showSyncConfirm:!0}))},[]),j=v.useCallback((re,q)=>{const W=[];for(const pe of re){const be=q.find(me=>me.path===pe);be&&be.cdnPushed&&!be.isRemote&&W.push(pe)}p(pe=>({...pe,actionPaths:W,downloadImageCount:W.length,downloadTotalSelected:re.length,showDownloadConfirm:!0}))},[]),_=v.useCallback(re=>{p(q=>({...q,actionPaths:re,showProcessConfirm:!0}))},[]),X=v.useCallback(re=>{p(q=>({...q,processMode:re}))},[]),$=v.useCallback(()=>{p(re=>({...re,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),F=v.useCallback(()=>{p(Tp)},[]),le=v.useCallback(()=>{b.stop()},[b]),V=v.useCallback(async()=>{const re=h.actionPaths;p(q=>({...q,showDeleteConfirm:!1}));try{const q=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:re})});if(q.ok)c(),f(null),i();else{const W=await q.json();d("Delete Failed",W.error||"Unknown error")}}catch(q){console.error("Delete error:",q),d("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,c,f,i,d]),ie=v.useCallback(async re=>{const q=h.actionPaths;p(W=>({...W,showMoveModal:!1})),await b.execute({endpoint:"/api/studio/move",body:{paths:q,destination:re},title:"Moving Files",onComplete:W=>{W.errors&&W.errors>0&&W.errorMessages?.length&&d("Move Failed",W.errorMessages.join(`
|
|
90
|
+
`);Ht=pn.pop()||"";for(const tn of pn)if(tn.startsWith("data: "))try{const bt=JSON.parse(tn.slice(6));bt.type==="start"?pe(Rt=>({...Rt,total:bt.total})):bt.type==="progress"?pe({current:bt.current,total:bt.total,percent:bt.percent,status:"processing",message:bt.message}):bt.type==="complete"?pe({current:bt.processed,total:bt.processed,percent:100,status:bt.errors>0?"error":"complete",message:bt.message}):bt.type==="error"&&pe(Rt=>({...Rt,status:"error",message:bt.message}))}catch{}}}}catch(rt){console.error("Favicon generation error:",rt),pe({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},$e=()=>Fe?r("img",{css:fe.image,src:oe,alt:i.name}):S?r("video",{css:fe.video,src:oe,controls:!0}):y("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 y(tt,{children:[ie&&r(Vr,{title:ie.title,message:ie.message,onClose:()=>Y(null)}),r(Kp,{isOpen:le,onClose:()=>V(!1)}),L&&r(Dl,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:i.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:Oe,onCancel:()=>j(!1)}),_&&r(rl,{title:"Renaming",progress:$,onClose:()=>{X(!1),f()}}),re&&r(rl,{title:"Generating Favicons",progress:W,onClose:()=>q(!1)}),r("div",{css:fe.overlay,onClick:Ge,children:y("div",{css:fe.container,onClick:rt=>rt.stopPropagation(),children:[y("div",{css:fe.main,children:[y("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"})})}),y("button",{css:fe.copyBtn,onClick:mt,title:"Copy file path",children:[ee&&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:$e()})]}),y("div",{css:fe.sidebar,children:[r("div",{css:fe.sidebarHeader,children:r("h3",{css:fe.sidebarTitle,children:"Details"})}),y("div",{css:fe.sidebarContent,children:[y("div",{css:fe.info,children:[y("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Name"}),r("span",{css:fe.infoValueWrap,children:i.name})]}),y("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&&y("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Size"}),r("span",{css:fe.infoValue,children:y2(i.size)})]}),i.dimensions&&y("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Dimensions"}),y("span",{css:fe.infoValue,children:[i.dimensions.width," × ",i.dimensions.height]})]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&y("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Thumbnails"}),r("span",{css:fe.infoValue,children:y("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"})]})})]}),y("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"})]}),y("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"URL"}),r("a",{href:Ee,target:"_blank",rel:"noopener noreferrer",css:fe.infoLink,title:Ee,children:Ee})]})]}),y("div",{css:fe.actions,children:[y("button",{css:fe.actionBtn,onClick:()=>j(!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"]}),Fe&&y("button",{css:fe.actionBtn,onClick:()=>me(!0),disabled:T||!te,title:te?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"})}),te?"Edit Image":"Download to Edit"]}),y("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"]}),y("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"]}),y("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"]}),y("button",{css:fe.actionBtn,onClick:()=>{A("generate"),b([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)&&y("button",{css:fe.actionBtn,onClick:()=>{A("remove"),b([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"]}),I&&y("button",{css:fe.actionBtn,onClick:an,disabled:re||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"]}),y("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"]})]})]})]})]})}),be&&i.dimensions&&r(f2,{imagePath:i.path,imageSrc:oe,dimensions:i.dimensions,fileSize:i.size||0,onClose:()=>me(!1),onSaveComplete:he,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 Ml={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 v2(){const{error:i,clearError:c}=go();return i?r("div",{css:Ml.overlay,onClick:c,children:y("div",{css:Ml.modal,onClick:f=>f.stopPropagation(),children:[y("div",{css:Ml.header,children:[r("svg",{css:Ml.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:Ml.title,children:i.title})]}),r("p",{css:Ml.message,children:i.message}),r("button",{css:Ml.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 x2({triggerRefresh:i,clearSelection:c,setFocusedItem:f,showError:d}){const[h,p]=v.useState(Ap),C=v.useCallback(re=>{p(q=>({...q,progressState:typeof re=="function"?re(q.progressState):{...q.progressState,...re}}))},[]),D=v.useCallback(re=>{p(q=>({...q,showProgress:re}))},[]),x=v.useCallback(re=>{p(q=>({...q,progressTitle:re}))},[]),b=Fp({setShowProgress:D,setProgressTitle:x,setProgressState:C,triggerRefresh:i}),A=v.useCallback(re=>{p(q=>({...q,actionPaths:re,showDeleteConfirm:!0}))},[]),z=v.useCallback(re=>{p(q=>({...q,actionPaths:re,showMoveModal:!0}))},[]),L=v.useCallback((re,q)=>{const W=re.map(me=>"/"+me.replace(/^public\//,""));let pe=!1,be=!1;for(const me of re){const se=q.find(Be=>Be.path===me);se&&(se.isRemote?pe=!0:se.cdnPushed||(be=!0))}p(me=>({...me,actionPaths:re,syncImageCount:W.length,syncHasRemote:pe,syncHasLocal:be,showSyncConfirm:!0}))},[]),j=v.useCallback((re,q)=>{const W=[];for(const pe of re){const be=q.find(me=>me.path===pe);be&&be.cdnPushed&&!be.isRemote&&W.push(pe)}p(pe=>({...pe,actionPaths:W,downloadImageCount:W.length,downloadTotalSelected:re.length,showDownloadConfirm:!0}))},[]),_=v.useCallback(re=>{p(q=>({...q,actionPaths:re,showProcessConfirm:!0}))},[]),X=v.useCallback(re=>{p(q=>({...q,processMode:re}))},[]),$=v.useCallback(()=>{p(re=>({...re,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),F=v.useCallback(()=>{p(Ap)},[]),le=v.useCallback(()=>{b.stop()},[b]),V=v.useCallback(async()=>{const re=h.actionPaths;p(q=>({...q,showDeleteConfirm:!1}));try{const q=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:re})});if(q.ok)c(),f(null),i();else{const W=await q.json();d("Delete Failed",W.error||"Unknown error")}}catch(q){console.error("Delete error:",q),d("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,c,f,i,d]),ie=v.useCallback(async re=>{const q=h.actionPaths;p(W=>({...W,showMoveModal:!1})),await b.execute({endpoint:"/api/studio/move",body:{paths:q,destination:re},title:"Moving Files",onComplete:W=>{W.errors&&W.errors>0&&W.errorMessages?.length&&d("Move Failed",W.errorMessages.join(`
|
|
91
91
|
`)),c(),f(null)}})},[h.actionPaths,c,f,d,b]),Y=v.useCallback(async()=>{const q=h.actionPaths.map(be=>"/"+be.replace(/^public\//,""));p(be=>({...be,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:q.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let W=0;const pe=[];for(let be=0;be<q.length;be++){const me=q[be];try{const se=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[me]})});if(se.ok)W++;else{const Be=await se.json();pe.push(`${me}: ${Be.error||"Unknown error"}`)}}catch(se){pe.push(`${me}: ${se instanceof Error?se.message:"Unknown error"}`)}C({current:be+1,total:q.length,percent:Math.round((be+1)/q.length*100),status:"processing",message:`Pushed ${me}`})}C({current:q.length,total:q.length,percent:100,status:pe.length>0?"error":"complete",message:`Pushed ${W} file${W!==1?"s":""}${pe.length>0?`, ${pe.length} error${pe.length!==1?"s":""}`:""}`}),pe.length>0&&d("Push Errors",pe.join(`
|
|
92
92
|
`)),c(),i()},[h.actionPaths,c,i,d,C]),ee=v.useCallback(async()=>{const re=h.actionPaths,q=h.processMode,W=re.map(se=>{const Be=se.replace(/^public\//,"");return Be.startsWith("/")?Be:`/${Be}`}),pe=q==="remove",be=pe?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",me=pe?"Removing Thumbnails":"Generating Thumbnails";p(se=>({...se,showProcessConfirm:!1})),await b.execute({endpoint:be,body:{imageKeys:W},title:me})},[h.actionPaths,h.processMode,b]),ne=v.useCallback(async()=>{const re=h.progressState.orphanedFiles;if(!(!re||re.length===0))try{const q=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:re})});if(q.ok)C(W=>({...W,orphanedFiles:void 0,message:W.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),i();else{const W=await q.json();d("Delete Failed",W.error||"Failed to delete orphaned files")}}catch(q){console.error("Delete orphans error:",q),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:L,requestDownload:j,requestProcess:_,setProcessMode:X,cancelAction:$,closeProgress:F,stopProcessing:le,confirmDelete:V,confirmMove:ie,confirmSync:Y,confirmProcess:ee,deleteOrphans:ne}}const S2=jt`
|
|
93
93
|
from { opacity: 0; }
|
|
@@ -104,7 +104,7 @@ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function M1({onClose:i}){
|
|
|
104
104
|
`,C2=jt`
|
|
105
105
|
from { transform: rotate(0deg); }
|
|
106
106
|
to { transform: rotate(360deg); }
|
|
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:",S2," 0.15s ease-out;font-family:",sl,";",""),modal:m(
|
|
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:",S2," 0.15s ease-out;font-family:",sl,";",""),modal:m(Ea," 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:",w2," 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:",C2," 0.8s linear infinite;","")};function k2({folderPath:i,onConfirm:c,onCancel:f}){const[d,h]=v.useState(!0),[p,C]=v.useState(null),[D,x]=v.useState([]),[b,A]=v.useState(new Set),[z,L]=v.useState(""),[j,_]=v.useState("");v.useEffect(()=>{async function V(){try{const[ie,Y]=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(ie.ok){const ee=await ie.json();C(ee),A(new Set(ee.assignments||[]))}if(Y.ok){const ee=await Y.json();x(ee.assignments||[])}}catch(ie){console.error("Failed to load data:",ie)}finally{h(!1)}}V()},[i]);const X=V=>{A(ie=>{const Y=new Set(ie);return Y.has(V)?Y.delete(V):Y.add(V),Y})},$=()=>{const V=z.trim().toLowerCase();if(V){if(!/^[a-z][a-z0-9]*$/.test(V)){_("Name must start with a letter and contain only letters and numbers");return}A(ie=>new Set([...ie,V])),L(""),_("")}},F=()=>{const V=Array.from(b);V.length!==0&&c(V)};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 le=p&&p.ttfFiles.length===0&&p.woff2Files.length===0;return r("div",{css:qe.overlay,onClick:f,children:y("div",{css:qe.modal,onClick:V=>V.stopPropagation(),children:[r("div",{css:qe.header,children:r("h3",{css:qe.title,children:"Assign Web Font"})}),y("div",{css:qe.body,children:[y("div",{css:qe.section,children:[r("p",{css:qe.sectionLabel,children:"Font Folder"}),y("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?y(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)"]}):y(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&&y("div",{css:qe.section,children:[r("p",{css:qe.sectionLabel,children:"Detected Fonts"}),r("div",{css:qe.fontList,children:p.detectedFonts.map((V,ie)=>y("span",{css:qe.fontChip,children:[V.weightName,V.style==="italic"?" Italic":""]},ie))})]}),p&&p.needsGeneration&&y("div",{css:qe.section,children:[r("p",{css:qe.sectionLabel,children:"TTF Files to Convert"}),y("div",{css:qe.fontList,children:[p.ttfFiles.slice(0,8).map((V,ie)=>r("span",{css:qe.fontChip,children:V},ie)),p.ttfFiles.length>8&&y("span",{css:qe.fontChip,children:["+",p.ttfFiles.length-8," more"]})]})]}),!le&&y("div",{css:qe.section,children:[r("p",{css:qe.sectionLabel,children:"Assign To"}),D.length>0?r("div",{css:qe.checkboxList,children:D.map(V=>y("label",{css:qe.checkboxLabel,children:[r("input",{type:"checkbox",css:qe.checkbox,checked:b.has(V.name),onChange:()=>X(V.name)}),r("span",{css:qe.checkboxText,children:V.name})]},V.name))}):r("p",{css:qe.emptyText,children:"No existing font assignments"}),Array.from(b).filter(V=>!D.find(ie=>ie.name===V)).map(V=>y("label",{css:[qe.checkboxLabel,"margin-top:8px;",""],children:[r("input",{type:"checkbox",css:qe.checkbox,checked:!0,onChange:()=>X(V)}),y("span",{css:qe.checkboxText,children:[V," (new)"]})]},V)),y("div",{css:qe.addNewRow,children:[r("input",{type:"text",css:qe.addNewInput,placeholder:"Add new assignment...",value:z,onChange:V=>{L(V.target.value),_("")},onKeyDown:V=>{V.key==="Enter"&&(V.preventDefault(),$())}}),r("button",{css:qe.addNewBtn,onClick:$,disabled:!z.trim(),children:"Add"})]}),j&&r("p",{css:qe.errorText,children:j})]}),le&&r("div",{css:qe.section,children:r("p",{css:qe.emptyText,children:"This folder does not contain any TTF or woff2 font files."})})]}),y("div",{css:qe.footer,children:[r("button",{css:[qe.btn,qe.btnCancel,"",""],onClick:f,children:"Cancel"}),y("button",{css:[qe.btn,qe.btnConfirm,"",""],onClick:F,disabled:b.size===0||le,children:["Assign Font",b.size>1?"s":""]})]})]})})}const z2=jt`
|
|
108
108
|
from { opacity: 0; }
|
|
109
109
|
to { opacity: 1; }
|
|
110
110
|
`,M2=jt`
|
|
@@ -119,7 +119,7 @@ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function M1({onClose:i}){
|
|
|
119
119
|
`,D2=jt`
|
|
120
120
|
from { transform: rotate(0deg); }
|
|
121
121
|
to { transform: rotate(360deg); }
|
|
122
|
-
`,Jt={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:",z2," 0.15s ease-out;font-family:",sl,";",""),modal:m(
|
|
122
|
+
`,Jt={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:",z2," 0.15s ease-out;font-family:",sl,";",""),modal:m(Ea," 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:",M2," 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:",D2," 0.8s linear infinite;","")};function A2({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 L=await fetch("/api/studio/fonts/assignments");if(L.ok){const j=await L.json();p(j.assignments||[])}}catch(L){console.error("Failed to load assignments:",L)}finally{d(!1)}},[]);v.useEffect(()=>{x()},[x]);const b=L=>{D(L)},A=()=>{D(null)},z=async L=>{try{(await fetch("/api/studio/fonts/delete-assignment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:L})})).ok&&(p(_=>_.filter(X=>X.name!==L)),D(null),c?.())}catch(j){console.error("Failed to delete assignment:",j)}};return r("div",{css:Jt.overlay,onClick:i,children:y("div",{css:Jt.modal,onClick:L=>L.stopPropagation(),children:[r("div",{css:Jt.header,children:r("h3",{css:Jt.title,children:"Font Assignments"})}),r("div",{css:Jt.body,children:f?r("div",{css:Jt.loading,children:r("div",{css:Jt.loadingSpinner})}):h.length===0?y("p",{css:Jt.emptyText,children:["No font assignments yet.",r("br",{}),'Select a folder and click "Assign Web Font" to create one.']}):r("div",{css:Jt.assignmentList,children:h.map(L=>y("div",{css:Jt.assignmentRow,children:[y("div",{css:Jt.assignmentInfo,children:[r("span",{css:Jt.assignmentName,children:L.name}),r("span",{css:Jt.assignmentFolder,children:L.folder})]}),C===L.name?y("div",{css:Jt.confirmRow,children:[r("button",{css:Jt.confirmBtn,onClick:()=>z(L.name),children:"Delete?"}),r("button",{css:Jt.cancelBtn,onClick:A,children:"Cancel"})]}):r("button",{css:Jt.deleteBtn,onClick:()=>b(L.name),children:"Delete"})]},L.name))})}),r("div",{css:Jt.footer,children:r("button",{css:[Jt.btn,Jt.btnPrimary,"",""],onClick:i,children:"Done"})})]})})}const T2=jt`
|
|
123
123
|
from { opacity: 0; }
|
|
124
124
|
to { opacity: 1; }
|
|
125
125
|
`,E2=jt`
|
|
@@ -131,9 +131,9 @@ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function M1({onClose:i}){
|
|
|
131
131
|
opacity: 1;
|
|
132
132
|
transform: translateY(0) scale(1);
|
|
133
133
|
}
|
|
134
|
-
`,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:",T2," 0.15s ease-out;font-family:",sl,";",""),modal:m(
|
|
134
|
+
`,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:",T2," 0.15s ease-out;font-family:",sl,";",""),modal:m(Ea," 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:",E2," 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;",""),content:{name:"vxuddk",styles:"padding:24px"},dropzone:m("border:2px dashed ",s.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s ease;background-color:",s.background,";&: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;color:",s.textMuted,";margin:0 auto 16px;",""),dropzoneText:m("font-size:",N.base,";color:",s.text,";margin:0 0 8px;",""),dropzoneHint:m("font-size:",N.sm,";color:",s.textMuted,";margin:0;",""),fileList:{name:"1kqpffn",styles:"margin-top:16px;max-height:200px;overflow-y:auto"},fileItem:m("display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:",s.background,";border-radius:6px;margin-bottom:4px;font-size:",N.sm,";&:last-child{margin-bottom:0;}",""),fileName:m("color:",s.text,";overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;margin-right:8px;",""),fileSize:m("color:",s.textMuted,";flex-shrink:0;",""),removeBtn:m("background:none;border:none;color:",s.textMuted,";cursor:pointer;padding:4px;margin-left:8px;&:hover{color:",s.danger,";}",""),footer:m("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;background-color:",s.background,";border-top:1px solid ",s.border,";",""),btn:m("padding:10px 20px;border-radius:6px;font-size:",N.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;",""),btnSecondary:m("background-color:",s.surface,";border:1px solid ",s.border,";color:",s.text,";&:hover{background-color:",s.background,";}",""),btnPrimary:m("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover:not(:disabled){background-color:",s.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}","")};function R2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function L2({currentPath:i,onClose:c,onUploadComplete:f,setShowProgress:d,setProgressTitle:h,setProgress:p}){const[C,D]=v.useState([]),[x,b]=v.useState(!1),A=v.useRef(null),z=v.useRef(!1),L=v.useCallback($=>{if($){const F=Array.from($).filter(le=>le.name.toLowerCase().endsWith(".ttf"));D(le=>[...le,...F])}},[]),j=v.useCallback($=>{$.preventDefault(),b(!1),L($.dataTransfer.files)},[L]),_=v.useCallback($=>{D(F=>F.filter((le,V)=>V!==$))},[]),X=v.useCallback(async()=>{if(C.length===0)return;c(),z.current=!1,h("Uploading Font Files"),d(!0),p({current:0,total:C.length,percent:0,status:"progress",message:"Uploading..."});let $=0;const F=[];for(let le=0;le<C.length;le++){if(z.current){p(Y=>({...Y,status:"complete",message:`Stopped. Uploaded ${$} file${$!==1?"s":""}.`})),f();return}const V=C[le];p({current:le,total:C.length,percent:Math.round(le/C.length*100),status:"progress",message:`Uploading ${V.name}...`}),await new Promise(Y=>setTimeout(Y,500));const ie=new FormData;ie.append("file",V),ie.append("path",i);try{(await fetch("/api/studio/fonts/upload",{method:"POST",body:ie})).ok?$++:F.push(V.name)}catch{F.push(V.name)}}p({current:$,total:C.length,percent:100,status:"complete",message:F.length>0?`Uploaded ${$} file${$!==1?"s":""}. ${F.length} failed.`:`Uploaded ${$} file${$!==1?"s":""} successfully.`}),f()},[C,i,c,f,d,h,p]);return r("div",{css:Wt.overlay,onClick:c,children:y("div",{css:Wt.modal,onClick:$=>$.stopPropagation(),children:[r("div",{css:Wt.header,children:r("h2",{css:Wt.title,children:"Add Font Files"})}),y("div",{css:Wt.content,children:[r("input",{ref:A,type:"file",multiple:!0,accept:".ttf",style:{display:"none"},onChange:$=>L($.target.files)}),y("div",{css:[Wt.dropzone,x&&Wt.dropzoneActive,"",""],onClick:()=>A.current?.click(),onDragOver:$=>{$.preventDefault(),b(!0)},onDragLeave:()=>b(!1),onDrop:j,children:[r("svg",{css:Wt.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),r("p",{css:Wt.dropzoneText,children:x?"Drop files here":"Click to select or drag and drop"}),r("p",{css:Wt.dropzoneHint,children:"TTF font files only"})]}),C.length>0&&r("div",{css:Wt.fileList,children:C.map(($,F)=>y("div",{css:Wt.fileItem,children:[r("span",{css:Wt.fileName,children:$.name}),r("span",{css:Wt.fileSize,children:R2($.size)}),r("button",{css:Wt.removeBtn,onClick:()=>_(F),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:"M6 18L18 6M6 6l12 12"})})})]},`${$.name}-${F}`))})]}),y("div",{css:Wt.footer,children:[r("button",{css:[Wt.btn,Wt.btnSecondary,"",""],onClick:c,children:"Cancel"}),y("button",{css:[Wt.btn,Wt.btnPrimary,"",""],onClick:X,disabled:C.length===0,children:["Upload ",C.length>0&&`(${C.length})`]})]})]})})}const Tp="36px",Ep=jt`
|
|
135
135
|
to { transform: rotate(360deg); }
|
|
136
|
-
`,K={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:",Ep,";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:",Rp," 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:",Ep,";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:",Rp," 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 Lp(i){return i<1024?i+" B":i<1024*1024?(i/1024).toFixed(1)+" KB":(i/(1024*1024)).toFixed(1)+" MB"}function O2({currentPath:i,setCurrentPath:c,refreshKey:f,triggerRefresh:d}){const[h,p]=v.useState([]),[C,D]=v.useState(!0),[x,b]=v.useState(new Set),[A,z]=v.useState(!1),[L,j]=v.useState(!1),[_,X]=v.useState(!1),[$,F]=v.useState(!1),[le,V]=v.useState(!1),[ie,Y]=v.useState(!1),[ee,ne]=v.useState("grid"),[re,q]=v.useState(!1),[W,pe]=v.useState(!1),[be,me]=v.useState(!1),[se,Be]=v.useState(!1),[T,I]=v.useState(!1),[te,he]=v.useState({status:"idle",current:0,total:0,percent:0}),[Fe,S]=v.useState("Processing"),[H,ae]=v.useState(null),[oe,Ce]=v.useState({}),[Ee,Ge]=v.useState(null),mt=v.useCallback(async()=>{try{D(!0);const U=await fetch(`/api/studio/fonts/list?path=${encodeURIComponent(i)}`);if(U.ok){const Re=await U.json();p(Re.items||[]),z(Re.canCreate===!0)}}catch(U){console.error("Failed to fetch fonts:",U),p([])}finally{D(!1)}},[i]);v.useEffect(()=>{mt(),b(new Set)},[mt,f]);const Oe=v.useCallback(async U=>{const Re={};for(const Me of U)if(Me.type==="folder")try{const Ze=await fetch("/api/studio/fonts/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:Me.path})});if(Ze.ok){const lt=await Ze.json();Re[Me.path]={needsGeneration:lt.needsGeneration,hasWoff2:lt.woff2Files?.length>0,assignments:lt.assignments||[]}}}catch{}Ce(Re)},[]);v.useEffect(()=>{const U=h.filter(Re=>Re.type==="folder");U.length>0&&i.startsWith("_fonts")&&Oe(U)},[h,i,Oe]);const an=i==="_fonts";i==="src"||i.startsWith("src/");const $e=v.useCallback((U,Re)=>{if(Re.stopPropagation(),Re.shiftKey&&Ee){const Me=h.findIndex(lt=>lt.path===Ee),Ze=h.findIndex(lt=>lt.path===U.path);if(Me!==-1&&Ze!==-1){const lt=Math.min(Me,Ze),Pn=Math.max(Me,Ze);b(ea=>{const bn=new Set(ea);for(let dt=lt;dt<=Pn;dt++)bn.add(h[dt].path);return bn})}}else b(Me=>{const Ze=new Set(Me);return Ze.has(U.path)?Ze.delete(U.path):Ze.add(U.path),Ze});Ge(U.path)},[h,Ee]),rt=v.useCallback(U=>{U.type==="folder"&&(c(U.path),b(new Set))},[c]),ut=v.useCallback(()=>{const U=i.split("/");U.pop();const Re=U.join("/")||"_fonts";c(Re),b(new Set)},[i,c]),Ct=h.length>0&&x.size===h.length,Ht=x.size>0,Pt=v.useCallback(()=>{b(Ct?new Set:new Set(h.map(U=>U.path)))},[Ct,h]),en=v.useCallback(()=>{b(new Set),Ge(null)},[]),pn=v.useCallback(()=>{const U=h.filter(Me=>Me.type==="file"&&Me.name.toLowerCase().endsWith(".woff2")),Re=U.every(Me=>x.has(Me.path));b(Re?Me=>{const Ze=new Set(Me);return U.forEach(lt=>Ze.delete(lt.path)),Ze}:Me=>{const Ze=new Set(Me);return U.forEach(lt=>Ze.add(lt.path)),Ze})},[h,x]),tn=v.useCallback(()=>{const U=h.filter(Me=>Me.type==="file"&&Me.name.toLowerCase().endsWith(".ttf")),Re=U.every(Me=>x.has(Me.path));b(Re?Me=>{const Ze=new Set(Me);return U.forEach(lt=>Ze.delete(lt.path)),Ze}:Me=>{const Ze=new Set(Me);return U.forEach(lt=>Ze.add(lt.path)),Ze})},[h,x]),bt=v.useCallback(async()=>{q(!0),await mt(),q(!1)},[mt]),Rt=Array.from(x),at=Rt.length===1&&h.find(U=>U.path===Rt[0])?.type==="folder",ze=at?Rt[0]:null,Lt=ze&&ze.split("/").pop()||"",on=Rt.length===1&&h.find(U=>U.path===Rt[0])?.type==="file",rn=on?Rt[0]:null,xn=rn&&rn.split("/").pop()||"",Sn=v.useCallback(()=>{at&&me(!0)},[at]),J=v.useCallback(async U=>{me(!1),S("Assigning Web Font"),I(!0),he({status:"progress",current:0,total:1,percent:0,message:"Starting..."});try{const Re=await fetch("/api/studio/fonts/assign-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:ze,assignments:U})});if(!Re.ok||!Re.body){he({status:"error",current:0,total:0,percent:0,message:"Failed to start assignment"});return}const Me=Re.body.getReader(),Ze=new TextDecoder;for(;;){const{done:lt,value:Pn}=await Me.read();if(lt)break;const bn=Ze.decode(Pn,{stream:!0}).split(`
|
|
136
|
+
`,Z={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 O2({currentPath:i,setCurrentPath:c,refreshKey:f,triggerRefresh:d}){const[h,p]=v.useState([]),[C,D]=v.useState(!0),[x,b]=v.useState(new Set),[A,z]=v.useState(!1),[L,j]=v.useState(!1),[_,X]=v.useState(!1),[$,F]=v.useState(!1),[le,V]=v.useState(!1),[ie,Y]=v.useState(!1),[ee,ne]=v.useState("grid"),[re,q]=v.useState(!1),[W,pe]=v.useState(!1),[be,me]=v.useState(!1),[se,Be]=v.useState(!1),[T,I]=v.useState(!1),[te,he]=v.useState({status:"idle",current:0,total:0,percent:0}),[Fe,S]=v.useState("Processing"),[H,ae]=v.useState(null),[oe,Ce]=v.useState({}),[Ee,Ge]=v.useState(null),mt=v.useCallback(async()=>{try{D(!0);const U=await fetch(`/api/studio/fonts/list?path=${encodeURIComponent(i)}`);if(U.ok){const Re=await U.json();p(Re.items||[]),z(Re.canCreate===!0)}}catch(U){console.error("Failed to fetch fonts:",U),p([])}finally{D(!1)}},[i]);v.useEffect(()=>{mt(),b(new Set)},[mt,f]);const Oe=v.useCallback(async U=>{const Re={};for(const Me of U)if(Me.type==="folder")try{const Ze=await fetch("/api/studio/fonts/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:Me.path})});if(Ze.ok){const lt=await Ze.json();Re[Me.path]={needsGeneration:lt.needsGeneration,hasWoff2:lt.woff2Files?.length>0,assignments:lt.assignments||[]}}}catch{}Ce(Re)},[]);v.useEffect(()=>{const U=h.filter(Re=>Re.type==="folder");U.length>0&&i.startsWith("_fonts")&&Oe(U)},[h,i,Oe]);const an=i==="_fonts";i==="src"||i.startsWith("src/");const $e=v.useCallback((U,Re)=>{if(Re.stopPropagation(),Re.shiftKey&&Ee){const Me=h.findIndex(lt=>lt.path===Ee),Ze=h.findIndex(lt=>lt.path===U.path);if(Me!==-1&&Ze!==-1){const lt=Math.min(Me,Ze),Pn=Math.max(Me,Ze);b(ea=>{const bn=new Set(ea);for(let dt=lt;dt<=Pn;dt++)bn.add(h[dt].path);return bn})}}else b(Me=>{const Ze=new Set(Me);return Ze.has(U.path)?Ze.delete(U.path):Ze.add(U.path),Ze});Ge(U.path)},[h,Ee]),rt=v.useCallback(U=>{U.type==="folder"&&(c(U.path),b(new Set))},[c]),ut=v.useCallback(()=>{const U=i.split("/");U.pop();const Re=U.join("/")||"_fonts";c(Re),b(new Set)},[i,c]),Ct=h.length>0&&x.size===h.length,Ht=x.size>0,Pt=v.useCallback(()=>{b(Ct?new Set:new Set(h.map(U=>U.path)))},[Ct,h]),en=v.useCallback(()=>{b(new Set),Ge(null)},[]),pn=v.useCallback(()=>{const U=h.filter(Me=>Me.type==="file"&&Me.name.toLowerCase().endsWith(".woff2")),Re=U.every(Me=>x.has(Me.path));b(Re?Me=>{const Ze=new Set(Me);return U.forEach(lt=>Ze.delete(lt.path)),Ze}:Me=>{const Ze=new Set(Me);return U.forEach(lt=>Ze.add(lt.path)),Ze})},[h,x]),tn=v.useCallback(()=>{const U=h.filter(Me=>Me.type==="file"&&Me.name.toLowerCase().endsWith(".ttf")),Re=U.every(Me=>x.has(Me.path));b(Re?Me=>{const Ze=new Set(Me);return U.forEach(lt=>Ze.delete(lt.path)),Ze}:Me=>{const Ze=new Set(Me);return U.forEach(lt=>Ze.add(lt.path)),Ze})},[h,x]),bt=v.useCallback(async()=>{q(!0),await mt(),q(!1)},[mt]),Rt=Array.from(x),at=Rt.length===1&&h.find(U=>U.path===Rt[0])?.type==="folder",ze=at?Rt[0]:null,Lt=ze&&ze.split("/").pop()||"",on=Rt.length===1&&h.find(U=>U.path===Rt[0])?.type==="file",rn=on?Rt[0]:null,xn=rn&&rn.split("/").pop()||"",Sn=v.useCallback(()=>{at&&me(!0)},[at]),J=v.useCallback(async U=>{me(!1),S("Assigning Web Font"),I(!0),he({status:"progress",current:0,total:1,percent:0,message:"Starting..."});try{const Re=await fetch("/api/studio/fonts/assign-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:ze,assignments:U})});if(!Re.ok||!Re.body){he({status:"error",current:0,total:0,percent:0,message:"Failed to start assignment"});return}const Me=Re.body.getReader(),Ze=new TextDecoder;for(;;){const{done:lt,value:Pn}=await Me.read();if(lt)break;const bn=Ze.decode(Pn,{stream:!0}).split(`
|
|
137
137
|
`);for(const dt of bn)if(dt.startsWith("data: "))try{const ft=JSON.parse(dt.slice(6));ft.status==="progress"?he({status:"progress",current:ft.current||0,total:ft.total||1,percent:ft.total?Math.round(ft.current/ft.total*100):0,message:ft.message,currentFile:ft.currentFile}):ft.status==="complete"?(he({status:"complete",current:ft.created?.length||0,total:ft.created?.length||0,percent:100,message:ft.message,processed:ft.created?.length||0}),d()):ft.status==="error"&&he({status:"error",current:0,total:0,percent:0,message:ft.message})}catch{}}}catch(Re){he({status:"error",current:0,total:0,percent:0,message:String(Re)})}},[ze,d]),ue=v.useCallback(()=>{I(!1),he({status:"idle",current:0,total:0,percent:0})},[]),Xe=v.useCallback(async U=>{if(ze){X(!1),S("Renaming Folder"),I(!0),he({status:"progress",current:0,total:1,percent:0,message:"Starting..."});try{const Re=await fetch("/api/studio/fonts/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:ze,newName:U})});if(!Re.ok||!Re.body){he({status:"error",current:0,total:0,percent:0,message:"Failed to start rename"});return}const Me=Re.body.getReader(),Ze=new TextDecoder;for(;;){const{done:lt,value:Pn}=await Me.read();if(lt)break;const bn=Ze.decode(Pn,{stream:!0}).split(`
|
|
138
138
|
`);for(const dt of bn)if(dt.startsWith("data: "))try{const ft=JSON.parse(dt.slice(6));ft.status==="progress"?he({status:"progress",current:ft.current||0,total:ft.total||1,percent:ft.total?Math.round(ft.current/ft.total*100):0,message:ft.message}):ft.status==="complete"?(he({status:"complete",current:1,total:1,percent:100,message:ft.message}),b(new Set),d()):ft.status==="error"&&he({status:"error",current:0,total:0,percent:0,message:ft.message})}catch{}}}catch(Re){he({status:"error",current:0,total:0,percent:0,message:String(Re)})}}},[ze,d]),nt=v.useCallback(async U=>{if(rn){F(!1);try{(await fetch("/api/studio/fonts/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:rn,newName:U})})).ok&&(b(new Set),d())}catch(Re){console.error("Rename file failed:",Re)}}},[rn,d]),Ne=v.useCallback(()=>{x.size!==0&&Y(!0)},[x.size]),Ae=v.useCallback(async()=>{Y(!1),S("Deleting Files"),I(!0),he({status:"progress",current:0,total:x.size,percent:0,message:"Starting..."});try{const U=await fetch("/api/studio/fonts/delete-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Array.from(x)})});if(!U.ok||!U.body){he({status:"error",current:0,total:0,percent:0,message:"Failed to start delete"});return}const Re=U.body.getReader(),Me=new TextDecoder;for(;;){const{done:Ze,value:lt}=await Re.read();if(Ze)break;const ea=Me.decode(lt,{stream:!0}).split(`
|
|
139
|
-
`);for(const bn of ea)if(bn.startsWith("data: "))try{const dt=JSON.parse(bn.slice(6));dt.status==="progress"?he({status:"progress",current:dt.current||0,total:dt.total||1,percent:dt.total?Math.round(dt.current/dt.total*100):0,message:dt.message}):dt.status==="complete"?(he({status:"complete",current:dt.deleted?.length||0,total:dt.deleted?.length||0,percent:100,message:dt.message}),b(new Set),d()):dt.status==="error"&&he({status:"error",current:0,total:0,percent:0,message:dt.message})}catch{}}}catch(U){he({status:"error",current:0,total:0,percent:0,message:String(U)})}},[x,d]),kt=v.useCallback(()=>{V(!0)},[]),xt=v.useCallback(async U=>{V(!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(Re){console.error("Create folder failed:",Re)}},[i,d]),La=v.useCallback(U=>{U.preventDefault(),U.stopPropagation(),i.startsWith("_fonts")&&j(!0)},[i]),ca=v.useCallback(U=>{U.preventDefault(),U.stopPropagation(),j(!1)},[]),bo=v.useCallback(async U=>{if(U.preventDefault(),U.stopPropagation(),j(!1),!i.startsWith("_fonts"))return;const Re=Array.from(U.dataTransfer.files).filter(Me=>Me.name.toLowerCase().endsWith(".ttf"));if(Re.length!==0){for(const Me of Re){const Ze=new FormData;Ze.append("file",Me),Ze.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:Ze})}catch(lt){console.error("Upload failed:",lt)}}d()}},[i,d]);if(C)return y("div",{css:K.container,children:[r("div",{css:K.toolbar}),r("div",{css:K.loading,children:r("div",{css:K.spinner})})]});const ua=i.startsWith("_fonts");return y("div",{css:K.container,children:[y("div",{css:K.toolbar,children:[y("div",{css:K.toolbarLeft,children:[ua&&y("button",{css:[K.btn,K.btnPrimary,"",""],onClick:()=>pe(!0),children:[r(_2,{}),"Add New"]}),y("button",{css:K.btn,onClick:()=>{on?F(!0):at?X(!0):kt()},children:[on||at?r(U2,{}):r(H2,{}),on?"Rename File":at?"Rename Folder":"New Folder"]}),y("button",{css:[K.btn,K.btnDanger,"",""],onClick:Ne,disabled:x.size===0,children:[r(B2,{}),"Delete"]}),y("button",{css:K.btn,onClick:Sn,disabled:!at,title:at?"Assign web font":"Select a folder to assign",children:[r(V2,{}),"Assign Web Font"]})]}),y("div",{css:K.toolbarRight,children:[Ht&&y("span",{css:K.selectionCount,children:[x.size," selected",r("button",{css:K.clearBtn,onClick:en,children:"Clear"})]}),r("button",{css:K.btn,onClick:bt,title:"Refresh view",disabled:re,children:r(Y2,{spinning:re})}),y("div",{css:K.viewToggle,children:[r("button",{css:[K.viewBtn,ee==="grid"&&K.viewBtnActive,"",""],onClick:()=>ne("grid"),"aria-label":"Grid view",children:r(G2,{})}),r("button",{css:[K.viewBtn,ee==="list"&&K.viewBtnActive,"",""],onClick:()=>ne("list"),"aria-label":"List view",children:r(X2,{})})]}),r("button",{css:K.btn,onClick:()=>Be(!0),title:"Font assignments settings",children:r(F2,{})})]})]}),y("div",{css:K.content,onDragOver:La,onDragLeave:ca,onDrop:bo,style:{position:"relative"},children:[L&&r("div",{css:K.dropOverlay,children:y("div",{css:K.dropMessage,children:[r(N2,{}),r("span",{children:"Drop TTF files to upload"})]})}),h.length===0&&!A?y("div",{css:K.empty,children:[r(su,{css:K.emptyIcon}),r("p",{css:K.emptyText,children:"No files yet"}),r("p",{css:K.emptyText,children:ua?'Drop TTF files here or click "Add New"':"This folder is empty"})]}):h.length===0&&A?y("div",{css:K.empty,children:[r(su,{css:K.emptyIcon}),r("p",{css:K.emptyText,children:"Folder doesn't exist"}),r("button",{css:K.createBtn,onClick:kt,children:"Create Folder"})]}):ee==="grid"?y(tt,{children:[h.length>0&&y("div",{css:K.selectAllRow,children:[y("label",{css:K.selectAllLabel,children:[r("input",{type:"checkbox",css:K.selectAllCheckbox,checked:Ct,ref:U=>{U&&(U.indeterminate=Ht&&!Ct)},onChange:Pt}),"Select all (",h.length,")"]}),h.some(U=>U.name.toLowerCase().endsWith(".woff2"))&&y("label",{css:K.selectAllLabel,children:[r("input",{type:"checkbox",css:K.selectAllCheckbox,checked:h.filter(U=>U.name.toLowerCase().endsWith(".woff2")).every(U=>x.has(U.path)),onChange:pn}),"WOFF2"]}),h.some(U=>U.name.toLowerCase().endsWith(".ttf"))&&y("label",{css:K.selectAllLabel,children:[r("input",{type:"checkbox",css:K.selectAllCheckbox,checked:h.filter(U=>U.name.toLowerCase().endsWith(".ttf")).every(U=>x.has(U.path)),onChange:tn}),"TTF"]})]}),y("div",{css:K.grid,children:[!an&&y("div",{css:K.item,onClick:ut,onDoubleClick:ut,children:[r("div",{css:K.itemContent,children:r(j2,{})}),y("div",{css:K.label,children:[r("p",{css:K.labelName,children:".."}),r("p",{css:K.labelMeta,children:"Parent folder"})]})]}),h.map(U=>{const Re=x.has(U.path);return y("div",{css:[K.item,Re&&K.itemSelected,"",""],onClick:Me=>$e(U,Me),onDoubleClick:()=>rt(U),children:[r("div",{css:K.checkboxWrapper,onClick:Me=>{Me.stopPropagation(),$e(U,Me)},children:r("input",{type:"checkbox",css:K.checkbox,checked:Re,onChange:()=>{}})}),y("div",{css:K.itemContent,children:[r("button",{css:K.openBtn,onClick:Me=>{Me.stopPropagation(),rt(U)},children:"Open"}),U.type==="folder"?r(su,{}):r(q2,{})]}),y("div",{css:K.label,children:[r("p",{css:K.labelName,children:y("span",{css:K.badgeWrapper,children:[U.type==="folder"&&oe[U.path]&&r("span",{css:[K.badge,oe[U.path].assignments.length>0?K.badgeGreen:oe[U.path].hasWoff2?K.badgeYellow:K.badgeGray,"",""],title:oe[U.path].assignments.length>0?`Assigned to: ${oe[U.path].assignments.join(", ")}`:oe[U.path].hasWoff2?"woff2 ready":"TTF only"}),U.name]})}),r("p",{css:K.labelMeta,children:U.type==="folder"?`${U.fileCount||0} files`:U.size?Lp(U.size):""})]})]},U.path)})]})]}):y(tt,{children:[h.length>0&&y("div",{css:K.selectAllRow,children:[y("label",{css:K.selectAllLabel,children:[r("input",{type:"checkbox",css:K.selectAllCheckbox,checked:Ct,ref:U=>{U&&(U.indeterminate=Ht&&!Ct)},onChange:Pt}),"Select all (",h.length,")"]}),h.some(U=>U.name.toLowerCase().endsWith(".woff2"))&&y("label",{css:K.selectAllLabel,children:[r("input",{type:"checkbox",css:K.selectAllCheckbox,checked:h.filter(U=>U.name.toLowerCase().endsWith(".woff2")).every(U=>x.has(U.path)),onChange:pn}),"WOFF2"]}),h.some(U=>U.name.toLowerCase().endsWith(".ttf"))&&y("label",{css:K.selectAllLabel,children:[r("input",{type:"checkbox",css:K.selectAllCheckbox,checked:h.filter(U=>U.name.toLowerCase().endsWith(".ttf")).every(U=>x.has(U.path)),onChange:tn}),"TTF"]})]}),r("div",{css:K.tableWrapper,children:y("table",{css:K.table,children:[r("thead",{children:y("tr",{children:[r("th",{css:[K.th,K.thCheckbox,"",""],children:h.length>0&&r("input",{type:"checkbox",css:K.checkbox,checked:Ct,ref:U=>{U&&(U.indeterminate=Ht&&!Ct)},onChange:Pt})}),r("th",{css:K.th,children:"Name"}),r("th",{css:[K.th,K.thSize,"",""],children:"Size"})]})}),y("tbody",{children:[!an&&y("tr",{css:K.parentRow,onClick:ut,children:[r("td",{css:K.td}),r("td",{css:K.td,children:y("div",{css:K.nameCell,children:[r("svg",{css:K.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:K.name,children:".."})]})}),r("td",{css:[K.td,K.meta,"",""],children:"Parent folder"})]}),h.map(U=>{const Re=x.has(U.path);return y("tr",{css:[K.row,Re&&K.rowSelected,"",""],onClick:Me=>$e(U,Me),children:[r("td",{css:[K.td,K.checkboxCell,"",""],onClick:Me=>Me.stopPropagation(),children:r("input",{type:"checkbox",css:K.checkbox,checked:Re,onChange:()=>$e(U,{})})}),r("td",{css:K.td,children:y("div",{css:K.nameCell,children:[U.type==="folder"?r("div",{css:K.folderIconWrapper,children:r("svg",{css:K.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:K.fileIconWrapper,children:r("svg",{css:K.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"})})}),y("span",{css:K.badgeWrapper,children:[U.type==="folder"&&oe[U.path]&&r("span",{css:[K.badge,oe[U.path].assignments.length>0?K.badgeGreen:oe[U.path].hasWoff2?K.badgeYellow:K.badgeGray,"",""],title:oe[U.path].assignments.length>0?`Assigned to: ${oe[U.path].assignments.join(", ")}`:oe[U.path].hasWoff2?"woff2 ready":"TTF only"}),r("span",{css:K.name,title:U.name,children:U.name})]}),r("div",{css:K.actionsCell,children:r("button",{css:K.listOpenBtn,onClick:Me=>{Me.stopPropagation(),rt(U)},children:"Open"})})]})}),r("td",{css:[K.td,K.meta,"",""],children:U.type==="folder"?`${U.fileCount||0} files`:U.size?Lp(U.size):"--"})]},U.path)})]})]})})]})]}),le&&r(Dl,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:xt,onCancel:()=>V(!1)}),_&&ze&&r(Dl,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:Lt,defaultValue:Lt,confirmLabel:"Rename",onConfirm:Xe,onCancel:()=>X(!1)}),$&&rn&&r(Dl,{title:"Rename File",message:"Enter a new name for the file:",placeholder:xn,defaultValue:xn,confirmLabel:"Rename",onConfirm:nt,onCancel:()=>F(!1)}),ie&&r(ho,{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:Ae,onCancel:()=>Y(!1)}),W&&r(L2,{currentPath:i,onClose:()=>pe(!1),onUploadComplete:()=>{pe(!1),d()},setShowProgress:I,setProgressTitle:S,setProgress:he}),be&&ze&&r(k2,{folderPath:ze,onConfirm:J,onCancel:()=>me(!1)}),T&&r(rl,{title:Fe,progress:te,onClose:ue}),se&&r(A2,{onClose:()=>Be(!1),onRefresh:d}),H&&r(Vr,{title:H.title,message:H.message,onClose:()=>ae(null)})]})}function _2(){return r("svg",{css:K.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}function H2(){return r("svg",{css:K.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 B2(){return r("svg",{css:K.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 U2(){return r("svg",{css:K.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 N2(){return r("svg",{css:K.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 su(){return r("svg",{css:K.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 j2(){return r("svg",{css:K.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 q2(){return r("svg",{css:K.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 Y2({spinning:i}){return r("svg",{css:[K.btnIcon,i&&K.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 G2(){return r("svg",{css:K.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 X2(){return r("svg",{css:K.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 V2(){return r("svg",{css:K.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 F2(){return y("svg",{css:K.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 Q2="36px",Et={container:m(Ra," 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:",Q2,";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 K2({onClose:i,isVisible:c=!0,standaloneMode:f=!1,workspacePath:d,siteUrl:h}){const p=i||(()=>{}),[C,D]=v.useState("public"),[x,b]=v.useState(new Set),[A,z]=v.useState(null),[L,j]=v.useState("grid"),[_,X]=v.useState(null),[$,F]=v.useState(null),[le,V]=v.useState(!1),[ie,Y]=v.useState(0),[ee,ne]=v.useState(!1),[re,q]=v.useState(""),[W,pe]=v.useState(null),[be,me]=v.useState([]),[se,Be]=v.useState(!1),[T,I]=v.useState(()=>{if(typeof window<"u"){const J=window.location.hash.slice(1);if(J==="fonts")return"fonts";if(J==="media")return"media"}return"media"}),[te,he]=v.useState(!1),Fe=v.useRef(null);v.useEffect(()=>{const J=()=>{const ue=window.location.hash.slice(1);ue==="fonts"?I("fonts"):ue==="media"&&I("media")};return window.addEventListener("hashchange",J),()=>window.removeEventListener("hashchange",J)},[]);const[S,H]=v.useState("_fonts"),[ae,oe]=v.useState(0),Ce=v.useCallback(()=>{Y(J=>J+1)},[]),[Ee,Ge]=v.useState(null),mt=v.useCallback(J=>{Ge({path:J,key:Date.now()})},[]);v.useEffect(()=>{if(_&&be.length>0){const J=be.find(ue=>ue.path===_.path);J&&JSON.stringify(J)!==JSON.stringify(_)&&X(J)}},[be,_]);const Oe=v.useCallback(()=>{ne(!0)},[]),an=v.useCallback(()=>{ne(!1)},[]),$e=v.useCallback((J,ue)=>{pe({title:J,message:ue})},[]),rt=v.useCallback(()=>{pe(null)},[]),ut=v.useCallback(J=>{J.preventDefault(),J.stopPropagation(),Be(!0)},[]),Ct=v.useCallback(J=>{J.preventDefault(),J.stopPropagation(),Be(!1)},[]),Ht=v.useCallback(async J=>{J.preventDefault(),J.stopPropagation(),Be(!1);const ue=Array.from(J.dataTransfer.files);if(ue.length!==0&&!(C==="public/images"||C.startsWith("public/images/"))){for(const Xe of ue){const nt=new FormData;nt.append("file",Xe),nt.append("path",C);try{await fetch("/api/studio/upload",{method:"POST",body:nt})}catch(Ne){console.error("Upload error:",Ne)}}Ce()}},[C,Ce]),Pt=v.useCallback(()=>{if(C==="public")return;const J=C.split("/");J.pop(),D(J.join("/")||"public"),b(new Set)},[C]),en=v.useCallback(J=>{D(J),b(new Set),X(null)},[]),pn=v.useCallback(J=>{b(ue=>{const Xe=new Set(ue);return Xe.has(J)?Xe.delete(J):Xe.add(J),Xe}),z(J)},[]),tn=v.useCallback((J,ue,Xe)=>{const nt=Xe.findIndex(xt=>xt.path===J),Ne=Xe.findIndex(xt=>xt.path===ue);if(nt===-1||Ne===-1)return;const Ae=Math.min(nt,Ne),kt=Math.max(nt,Ne);b(xt=>{const La=new Set(xt);for(let ca=Ae;ca<=kt;ca++)La.add(Xe[ca].path);return La}),z(ue)},[]),bt=v.useCallback(J=>{b(new Set(J.map(ue=>ue.path)))},[]),Rt=v.useCallback(()=>{b(new Set)},[]),at=v.useCallback(J=>{X(J)},[]),ze=x2({triggerRefresh:Ce,clearSelection:Rt,setFocusedItem:at,showError:$e}),Lt=v.useCallback(J=>{if(J.key==="Escape"){const ue=J.target;if(ue.tagName==="INPUT"||ue.tagName==="TEXTAREA")return;_?X(null):f||p()}},[p,_,f]);v.useEffect(()=>(c&&(document.addEventListener("keydown",Lt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",Lt),document.body.style.overflow=""}),[Lt,c]),v.useEffect(()=>{const J=ue=>{Fe.current&&!Fe.current.contains(ue.target)&&he(!1)};return te&&document.addEventListener("mousedown",J),()=>{document.removeEventListener("mousedown",J)}},[te]);const on=v.useCallback(()=>{he(J=>!J)},[]),rn=v.useCallback(J=>{I(J),he(!1),window.location.hash=J},[]),xn=v.useCallback(()=>{oe(J=>J+1)},[]),Sn={isOpen:!0,openStudio:()=>{},closeStudio:p,toggleStudio:p,currentPath:C,setCurrentPath:en,navigateUp:Pt,selectedItems:x,toggleSelection:pn,selectRange:tn,selectAll:bt,clearSelection:Rt,lastSelectedPath:A,viewMode:L,setViewMode:j,focusedItem:_,setFocusedItem:X,meta:$,setMeta:F,isLoading:le,setIsLoading:V,refreshKey:ie,triggerRefresh:Ce,editedImageKey:Ee,setEditedImageKey:mt,scanRequested:ee,triggerScan:Oe,clearScanRequest:an,searchQuery:re,setSearchQuery:q,error:W,showError:$e,clearError:rt,fileItems:be,setFileItems:me,actionState:ze.actionState,requestDelete:ze.requestDelete,requestMove:ze.requestMove,requestSync:ze.requestSync,requestDownload:ze.requestDownload,requestProcess:ze.requestProcess,setProcessMode:ze.setProcessMode,confirmDelete:ze.confirmDelete,confirmMove:ze.confirmMove,confirmSync:ze.confirmSync,confirmProcess:ze.confirmProcess,cancelAction:ze.cancelAction,closeProgress:ze.closeProgress,stopProcessing:ze.stopProcessing,deleteOrphans:ze.deleteOrphans};return r(Vp.Provider,{value:Sn,children:y("div",{css:Et.container,children:[y("div",{css:Et.header,children:[r("div",{css:Et.headerLeft,children:y("div",{css:Et.titleDropdown,ref:Fe,children:[y("button",{css:Et.titleButton,onClick:on,children:[r("span",{children:"gallop.studio"}),r(eb,{isOpen:te})]}),te&&y("div",{css:Et.dropdownMenu,children:[r("button",{css:[Et.dropdownItem,T==="media"&&Et.dropdownItemActive,"",""],onClick:()=>rn("media"),children:"media & files"}),r("button",{css:[Et.dropdownItem,T==="fonts"&&Et.dropdownItemActive,"",""],onClick:()=>rn("fonts"),children:"fonts"})]})]})}),r("div",{css:Et.headerCenter,children:r(W2,{currentPath:C,onNavigate:en,projectName:d?d.split("/").pop():void 0})}),y("div",{css:Et.headerActions,children:[h&&r("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:Et.headerIconBtn,title:`Open ${h}`,children:r(I2,{})}),!f&&r("button",{css:Et.headerBtn,onClick:p,"aria-label":"Close Studio",children:r(P2,{})})]})]}),T==="media"?y(tt,{children:[r(A1,{}),y("div",{css:Et.content,onDragOver:ut,onDragLeave:Ct,onDrop:Ht,children:[se&&r("div",{css:Et.dropOverlay,children:y("div",{css:Et.dropMessage,children:[r("svg",{css:Et.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:Et.fileBrowser,children:L==="grid"?r($1,{}):r(e2,{})})]}),_&&r(b2,{}),r(v2,{}),ze.actionState.showDeleteConfirm&&r(ho,{title:"Delete Files",message:`Are you sure you want to delete ${ze.actionState.actionPaths.length} item${ze.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:ze.confirmDelete,onCancel:ze.cancelAction}),ze.actionState.showSyncConfirm&&r(ho,{title:"Push to CDN",message:`Push ${ze.actionState.syncImageCount} image${ze.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${ze.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${ze.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:ze.confirmSync,onCancel:ze.cancelAction}),ze.actionState.showProcessConfirm&&r(J2,{imageCount:ze.actionState.actionPaths.length,mode:ze.actionState.processMode,onConfirm:ze.confirmProcess,onCancel:ze.cancelAction}),ze.actionState.showMoveModal&&r(Qp,{selectedItems:new Set(ze.actionState.actionPaths),currentPath:C,onMove:J=>ze.confirmMove(J),onCancel:ze.cancelAction}),ze.actionState.showProgress&&r(rl,{title:ze.actionState.progressTitle,progress:ze.actionState.progressState,onStop:ze.stopProcessing,onDeleteOrphans:ze.deleteOrphans,onClose:ze.closeProgress})]}):r(O2,{currentPath:S,setCurrentPath:H,refreshKey:ae,triggerRefresh:xn})]})})}var Z2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},$2={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 J2({imageCount:i,mode:c,onConfirm:f,onCancel:d}){const h={overlay:$2,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:Z2,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:y("div",{css:h.container,onClick:b=>b.stopPropagation(),children:[r("h2",{css:h.title,children:C}),r("p",{css:h.message,children:D}),y("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 W2({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:Et.breadcrumbs,children:h.map((p,C)=>y("span",{style:{display:"flex",alignItems:"center",gap:6},children:[C>0&&r("span",{css:Et.breadcrumbSeparator,children:"/"}),C===h.length-1?r("span",{css:Et.breadcrumbCurrent,children:p.name}):r("span",{css:Et.breadcrumbItem,onClick:()=>c(p.path),children:p.name})]},p.path))})}function I2(){return y("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 P2(){return y("svg",{css:Et.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function eb({isOpen:i}){return r("svg",{css:[Et.titleChevron,i&&Et.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 tb=window.__STUDIO_WORKSPACE__||"Unknown",nb=window.__STUDIO_SITE_URL__||"";u1.createRoot(Jp).render(r(v.StrictMode,{children:r("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:r(K2,{isVisible:!0,standaloneMode:!0,workspacePath:tb,siteUrl:nb})})}));
|
|
139
|
+
`);for(const bn of ea)if(bn.startsWith("data: "))try{const dt=JSON.parse(bn.slice(6));dt.status==="progress"?he({status:"progress",current:dt.current||0,total:dt.total||1,percent:dt.total?Math.round(dt.current/dt.total*100):0,message:dt.message}):dt.status==="complete"?(he({status:"complete",current:dt.deleted?.length||0,total:dt.deleted?.length||0,percent:100,message:dt.message}),b(new Set),d()):dt.status==="error"&&he({status:"error",current:0,total:0,percent:0,message:dt.message})}catch{}}}catch(U){he({status:"error",current:0,total:0,percent:0,message:String(U)})}},[x,d]),kt=v.useCallback(()=>{V(!0)},[]),xt=v.useCallback(async U=>{V(!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(Re){console.error("Create folder failed:",Re)}},[i,d]),Ra=v.useCallback(U=>{U.preventDefault(),U.stopPropagation(),i.startsWith("_fonts")&&j(!0)},[i]),ca=v.useCallback(U=>{U.preventDefault(),U.stopPropagation(),j(!1)},[]),bo=v.useCallback(async U=>{if(U.preventDefault(),U.stopPropagation(),j(!1),!i.startsWith("_fonts"))return;const Re=Array.from(U.dataTransfer.files).filter(Me=>Me.name.toLowerCase().endsWith(".ttf"));if(Re.length!==0){for(const Me of Re){const Ze=new FormData;Ze.append("file",Me),Ze.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:Ze})}catch(lt){console.error("Upload failed:",lt)}}d()}},[i,d]);if(C)return y("div",{css:Z.container,children:[r("div",{css:Z.toolbar}),r("div",{css:Z.loading,children:r("div",{css:Z.spinner})})]});const La=i.startsWith("_fonts");return y("div",{css:Z.container,children:[y("div",{css:Z.toolbar,children:[y("div",{css:Z.toolbarLeft,children:[La&&y("button",{css:[Z.btn,Z.btnPrimary,"",""],onClick:()=>pe(!0),children:[r(_2,{}),"Add New"]}),y("button",{css:Z.btn,onClick:()=>{on?F(!0):at?X(!0):kt()},children:[on||at?r(U2,{}):r(H2,{}),on?"Rename File":at?"Rename Folder":"New Folder"]}),y("button",{css:[Z.btn,Z.btnDanger,"",""],onClick:Ne,disabled:x.size===0,children:[r(B2,{}),"Delete"]}),y("button",{css:Z.btn,onClick:Sn,disabled:!at,title:at?"Assign web font":"Select a folder to assign",children:[r(V2,{}),"Assign Web Font"]})]}),y("div",{css:Z.toolbarRight,children:[Ht&&y("span",{css:Z.selectionCount,children:[x.size," selected",r("button",{css:Z.clearBtn,onClick:en,children:"Clear"})]}),r("button",{css:Z.btn,onClick:bt,title:"Refresh view",disabled:re,children:r(Y2,{spinning:re})}),y("div",{css:Z.viewToggle,children:[r("button",{css:[Z.viewBtn,ee==="grid"&&Z.viewBtnActive,"",""],onClick:()=>ne("grid"),"aria-label":"Grid view",children:r(G2,{})}),r("button",{css:[Z.viewBtn,ee==="list"&&Z.viewBtnActive,"",""],onClick:()=>ne("list"),"aria-label":"List view",children:r(X2,{})})]}),r("button",{css:Z.btn,onClick:()=>Be(!0),title:"Font assignments settings",children:r(F2,{})})]})]}),y("div",{css:Z.content,onDragOver:Ra,onDragLeave:ca,onDrop:bo,style:{position:"relative"},children:[L&&r("div",{css:Z.dropOverlay,children:y("div",{css:Z.dropMessage,children:[r(N2,{}),r("span",{children:"Drop TTF files to upload"})]})}),h.length===0&&A?y("div",{css:Z.empty,children:[r(Lp,{css:Z.emptyIcon}),r("p",{css:Z.emptyText,children:"Folder doesn't exist"}),r("button",{css:Z.createBtn,onClick:kt,children:"Create Folder"})]}):ee==="grid"?y(tt,{children:[h.length>0&&y("div",{css:Z.selectAllRow,children:[y("label",{css:Z.selectAllLabel,children:[r("input",{type:"checkbox",css:Z.selectAllCheckbox,checked:Ct,ref:U=>{U&&(U.indeterminate=Ht&&!Ct)},onChange:Pt}),"Select all (",h.length,")"]}),h.some(U=>U.name.toLowerCase().endsWith(".woff2"))&&y("label",{css:Z.selectAllLabel,children:[r("input",{type:"checkbox",css:Z.selectAllCheckbox,checked:h.filter(U=>U.name.toLowerCase().endsWith(".woff2")).every(U=>x.has(U.path)),onChange:pn}),"WOFF2"]}),h.some(U=>U.name.toLowerCase().endsWith(".ttf"))&&y("label",{css:Z.selectAllLabel,children:[r("input",{type:"checkbox",css:Z.selectAllCheckbox,checked:h.filter(U=>U.name.toLowerCase().endsWith(".ttf")).every(U=>x.has(U.path)),onChange:tn}),"TTF"]})]}),y("div",{css:Z.grid,children:[!an&&y("div",{css:Z.item,onClick:ut,onDoubleClick:ut,children:[r("div",{css:Z.itemContent,children:r(j2,{})}),y("div",{css:Z.label,children:[r("p",{css:Z.labelName,children:".."}),r("p",{css:Z.labelMeta,children:"Parent folder"})]})]}),h.map(U=>{const Re=x.has(U.path);return y("div",{css:[Z.item,Re&&Z.itemSelected,"",""],onClick:Me=>$e(U,Me),onDoubleClick:()=>rt(U),children:[r("div",{css:Z.checkboxWrapper,onClick:Me=>{Me.stopPropagation(),$e(U,Me)},children:r("input",{type:"checkbox",css:Z.checkbox,checked:Re,onChange:()=>{}})}),y("div",{css:Z.itemContent,children:[r("button",{css:Z.openBtn,onClick:Me=>{Me.stopPropagation(),rt(U)},children:"Open"}),U.type==="folder"?r(Lp,{}):r(q2,{})]}),y("div",{css:Z.label,children:[r("p",{css:Z.labelName,children:y("span",{css:Z.badgeWrapper,children:[U.type==="folder"&&oe[U.path]&&r("span",{css:[Z.badge,oe[U.path].assignments.length>0?Z.badgeGreen:oe[U.path].hasWoff2?Z.badgeYellow:Z.badgeGray,"",""],title:oe[U.path].assignments.length>0?`Assigned to: ${oe[U.path].assignments.join(", ")}`:oe[U.path].hasWoff2?"woff2 ready":"TTF only"}),U.name]})}),r("p",{css:Z.labelMeta,children:U.type==="folder"?`${U.fileCount||0} files`:U.size?Rp(U.size):""})]})]},U.path)})]})]}):y(tt,{children:[h.length>0&&y("div",{css:Z.selectAllRow,children:[y("label",{css:Z.selectAllLabel,children:[r("input",{type:"checkbox",css:Z.selectAllCheckbox,checked:Ct,ref:U=>{U&&(U.indeterminate=Ht&&!Ct)},onChange:Pt}),"Select all (",h.length,")"]}),h.some(U=>U.name.toLowerCase().endsWith(".woff2"))&&y("label",{css:Z.selectAllLabel,children:[r("input",{type:"checkbox",css:Z.selectAllCheckbox,checked:h.filter(U=>U.name.toLowerCase().endsWith(".woff2")).every(U=>x.has(U.path)),onChange:pn}),"WOFF2"]}),h.some(U=>U.name.toLowerCase().endsWith(".ttf"))&&y("label",{css:Z.selectAllLabel,children:[r("input",{type:"checkbox",css:Z.selectAllCheckbox,checked:h.filter(U=>U.name.toLowerCase().endsWith(".ttf")).every(U=>x.has(U.path)),onChange:tn}),"TTF"]})]}),r("div",{css:Z.tableWrapper,children:y("table",{css:Z.table,children:[r("thead",{children:y("tr",{children:[r("th",{css:[Z.th,Z.thCheckbox,"",""],children:h.length>0&&r("input",{type:"checkbox",css:Z.checkbox,checked:Ct,ref:U=>{U&&(U.indeterminate=Ht&&!Ct)},onChange:Pt})}),r("th",{css:Z.th,children:"Name"}),r("th",{css:[Z.th,Z.thSize,"",""],children:"Size"})]})}),y("tbody",{children:[!an&&y("tr",{css:Z.parentRow,onClick:ut,children:[r("td",{css:Z.td}),r("td",{css:Z.td,children:y("div",{css:Z.nameCell,children:[r("svg",{css:Z.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:Z.name,children:".."})]})}),r("td",{css:[Z.td,Z.meta,"",""],children:"Parent folder"})]}),h.map(U=>{const Re=x.has(U.path);return y("tr",{css:[Z.row,Re&&Z.rowSelected,"",""],onClick:Me=>$e(U,Me),children:[r("td",{css:[Z.td,Z.checkboxCell,"",""],onClick:Me=>Me.stopPropagation(),children:r("input",{type:"checkbox",css:Z.checkbox,checked:Re,onChange:()=>$e(U,{})})}),r("td",{css:Z.td,children:y("div",{css:Z.nameCell,children:[U.type==="folder"?r("div",{css:Z.folderIconWrapper,children:r("svg",{css:Z.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:Z.fileIconWrapper,children:r("svg",{css:Z.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"})})}),y("span",{css:Z.badgeWrapper,children:[U.type==="folder"&&oe[U.path]&&r("span",{css:[Z.badge,oe[U.path].assignments.length>0?Z.badgeGreen:oe[U.path].hasWoff2?Z.badgeYellow:Z.badgeGray,"",""],title:oe[U.path].assignments.length>0?`Assigned to: ${oe[U.path].assignments.join(", ")}`:oe[U.path].hasWoff2?"woff2 ready":"TTF only"}),r("span",{css:Z.name,title:U.name,children:U.name})]}),r("div",{css:Z.actionsCell,children:r("button",{css:Z.listOpenBtn,onClick:Me=>{Me.stopPropagation(),rt(U)},children:"Open"})})]})}),r("td",{css:[Z.td,Z.meta,"",""],children:U.type==="folder"?`${U.fileCount||0} files`:U.size?Rp(U.size):"--"})]},U.path)})]})]})})]})]}),le&&r(Dl,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:xt,onCancel:()=>V(!1)}),_&&ze&&r(Dl,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:Lt,defaultValue:Lt,confirmLabel:"Rename",onConfirm:Xe,onCancel:()=>X(!1)}),$&&rn&&r(Dl,{title:"Rename File",message:"Enter a new name for the file:",placeholder:xn,defaultValue:xn,confirmLabel:"Rename",onConfirm:nt,onCancel:()=>F(!1)}),ie&&r(ho,{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:Ae,onCancel:()=>Y(!1)}),W&&r(L2,{currentPath:i,onClose:()=>pe(!1),onUploadComplete:()=>{pe(!1),d()},setShowProgress:I,setProgressTitle:S,setProgress:he}),be&&ze&&r(k2,{folderPath:ze,onConfirm:J,onCancel:()=>me(!1)}),T&&r(rl,{title:Fe,progress:te,onClose:ue}),se&&r(A2,{onClose:()=>Be(!1),onRefresh:d}),H&&r(Vr,{title:H.title,message:H.message,onClose:()=>ae(null)})]})}function _2(){return r("svg",{css:Z.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}function H2(){return r("svg",{css:Z.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 B2(){return r("svg",{css:Z.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 U2(){return r("svg",{css:Z.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 N2(){return r("svg",{css:Z.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 Lp(){return r("svg",{css:Z.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 j2(){return r("svg",{css:Z.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 q2(){return r("svg",{css:Z.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 Y2({spinning:i}){return r("svg",{css:[Z.btnIcon,i&&Z.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 G2(){return r("svg",{css:Z.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 X2(){return r("svg",{css:Z.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 V2(){return r("svg",{css:Z.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 F2(){return y("svg",{css:Z.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 Q2="36px",Et={container:m(Ea," 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:",Q2,";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 K2({onClose:i,isVisible:c=!0,standaloneMode:f=!1,workspacePath:d,siteUrl:h}){const p=i||(()=>{}),[C,D]=v.useState("public"),[x,b]=v.useState(new Set),[A,z]=v.useState(null),[L,j]=v.useState("grid"),[_,X]=v.useState(null),[$,F]=v.useState(null),[le,V]=v.useState(!1),[ie,Y]=v.useState(0),[ee,ne]=v.useState(!1),[re,q]=v.useState(""),[W,pe]=v.useState(null),[be,me]=v.useState([]),[se,Be]=v.useState(!1),[T,I]=v.useState(()=>{if(typeof window<"u"){const J=window.location.hash.slice(1);if(J==="fonts")return"fonts";if(J==="media")return"media"}return"media"}),[te,he]=v.useState(!1),Fe=v.useRef(null);v.useEffect(()=>{const J=()=>{const ue=window.location.hash.slice(1);ue==="fonts"?I("fonts"):ue==="media"&&I("media")};return window.addEventListener("hashchange",J),()=>window.removeEventListener("hashchange",J)},[]);const[S,H]=v.useState("_fonts"),[ae,oe]=v.useState(0),Ce=v.useCallback(()=>{Y(J=>J+1)},[]),[Ee,Ge]=v.useState(null),mt=v.useCallback(J=>{Ge({path:J,key:Date.now()})},[]);v.useEffect(()=>{if(_&&be.length>0){const J=be.find(ue=>ue.path===_.path);J&&JSON.stringify(J)!==JSON.stringify(_)&&X(J)}},[be,_]);const Oe=v.useCallback(()=>{ne(!0)},[]),an=v.useCallback(()=>{ne(!1)},[]),$e=v.useCallback((J,ue)=>{pe({title:J,message:ue})},[]),rt=v.useCallback(()=>{pe(null)},[]),ut=v.useCallback(J=>{J.preventDefault(),J.stopPropagation(),Be(!0)},[]),Ct=v.useCallback(J=>{J.preventDefault(),J.stopPropagation(),Be(!1)},[]),Ht=v.useCallback(async J=>{J.preventDefault(),J.stopPropagation(),Be(!1);const ue=Array.from(J.dataTransfer.files);if(ue.length!==0&&!(C==="public/images"||C.startsWith("public/images/"))){for(const Xe of ue){const nt=new FormData;nt.append("file",Xe),nt.append("path",C);try{await fetch("/api/studio/upload",{method:"POST",body:nt})}catch(Ne){console.error("Upload error:",Ne)}}Ce()}},[C,Ce]),Pt=v.useCallback(()=>{if(C==="public")return;const J=C.split("/");J.pop(),D(J.join("/")||"public"),b(new Set)},[C]),en=v.useCallback(J=>{D(J),b(new Set),X(null)},[]),pn=v.useCallback(J=>{b(ue=>{const Xe=new Set(ue);return Xe.has(J)?Xe.delete(J):Xe.add(J),Xe}),z(J)},[]),tn=v.useCallback((J,ue,Xe)=>{const nt=Xe.findIndex(xt=>xt.path===J),Ne=Xe.findIndex(xt=>xt.path===ue);if(nt===-1||Ne===-1)return;const Ae=Math.min(nt,Ne),kt=Math.max(nt,Ne);b(xt=>{const Ra=new Set(xt);for(let ca=Ae;ca<=kt;ca++)Ra.add(Xe[ca].path);return Ra}),z(ue)},[]),bt=v.useCallback(J=>{b(new Set(J.map(ue=>ue.path)))},[]),Rt=v.useCallback(()=>{b(new Set)},[]),at=v.useCallback(J=>{X(J)},[]),ze=x2({triggerRefresh:Ce,clearSelection:Rt,setFocusedItem:at,showError:$e}),Lt=v.useCallback(J=>{if(J.key==="Escape"){const ue=J.target;if(ue.tagName==="INPUT"||ue.tagName==="TEXTAREA")return;_?X(null):f||p()}},[p,_,f]);v.useEffect(()=>(c&&(document.addEventListener("keydown",Lt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",Lt),document.body.style.overflow=""}),[Lt,c]),v.useEffect(()=>{const J=ue=>{Fe.current&&!Fe.current.contains(ue.target)&&he(!1)};return te&&document.addEventListener("mousedown",J),()=>{document.removeEventListener("mousedown",J)}},[te]);const on=v.useCallback(()=>{he(J=>!J)},[]),rn=v.useCallback(J=>{I(J),he(!1),window.location.hash=J},[]),xn=v.useCallback(()=>{oe(J=>J+1)},[]),Sn={isOpen:!0,openStudio:()=>{},closeStudio:p,toggleStudio:p,currentPath:C,setCurrentPath:en,navigateUp:Pt,selectedItems:x,toggleSelection:pn,selectRange:tn,selectAll:bt,clearSelection:Rt,lastSelectedPath:A,viewMode:L,setViewMode:j,focusedItem:_,setFocusedItem:X,meta:$,setMeta:F,isLoading:le,setIsLoading:V,refreshKey:ie,triggerRefresh:Ce,editedImageKey:Ee,setEditedImageKey:mt,scanRequested:ee,triggerScan:Oe,clearScanRequest:an,searchQuery:re,setSearchQuery:q,error:W,showError:$e,clearError:rt,fileItems:be,setFileItems:me,actionState:ze.actionState,requestDelete:ze.requestDelete,requestMove:ze.requestMove,requestSync:ze.requestSync,requestDownload:ze.requestDownload,requestProcess:ze.requestProcess,setProcessMode:ze.setProcessMode,confirmDelete:ze.confirmDelete,confirmMove:ze.confirmMove,confirmSync:ze.confirmSync,confirmProcess:ze.confirmProcess,cancelAction:ze.cancelAction,closeProgress:ze.closeProgress,stopProcessing:ze.stopProcessing,deleteOrphans:ze.deleteOrphans};return r(Vp.Provider,{value:Sn,children:y("div",{css:Et.container,children:[y("div",{css:Et.header,children:[r("div",{css:Et.headerLeft,children:y("div",{css:Et.titleDropdown,ref:Fe,children:[y("button",{css:Et.titleButton,onClick:on,children:[r("span",{children:"gallop.studio"}),r(eb,{isOpen:te})]}),te&&y("div",{css:Et.dropdownMenu,children:[r("button",{css:[Et.dropdownItem,T==="media"&&Et.dropdownItemActive,"",""],onClick:()=>rn("media"),children:"media & files"}),r("button",{css:[Et.dropdownItem,T==="fonts"&&Et.dropdownItemActive,"",""],onClick:()=>rn("fonts"),children:"fonts"})]})]})}),r("div",{css:Et.headerCenter,children:r(W2,{currentPath:C,onNavigate:en,projectName:d?d.split("/").pop():void 0})}),y("div",{css:Et.headerActions,children:[h&&r("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:Et.headerIconBtn,title:`Open ${h}`,children:r(I2,{})}),!f&&r("button",{css:Et.headerBtn,onClick:p,"aria-label":"Close Studio",children:r(P2,{})})]})]}),T==="media"?y(tt,{children:[r(A1,{}),y("div",{css:Et.content,onDragOver:ut,onDragLeave:Ct,onDrop:Ht,children:[se&&r("div",{css:Et.dropOverlay,children:y("div",{css:Et.dropMessage,children:[r("svg",{css:Et.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:Et.fileBrowser,children:L==="grid"?r($1,{}):r(e2,{})})]}),_&&r(b2,{}),r(v2,{}),ze.actionState.showDeleteConfirm&&r(ho,{title:"Delete Files",message:`Are you sure you want to delete ${ze.actionState.actionPaths.length} item${ze.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:ze.confirmDelete,onCancel:ze.cancelAction}),ze.actionState.showSyncConfirm&&r(ho,{title:"Push to CDN",message:`Push ${ze.actionState.syncImageCount} image${ze.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${ze.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${ze.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:ze.confirmSync,onCancel:ze.cancelAction}),ze.actionState.showProcessConfirm&&r(J2,{imageCount:ze.actionState.actionPaths.length,mode:ze.actionState.processMode,onConfirm:ze.confirmProcess,onCancel:ze.cancelAction}),ze.actionState.showMoveModal&&r(Qp,{selectedItems:new Set(ze.actionState.actionPaths),currentPath:C,onMove:J=>ze.confirmMove(J),onCancel:ze.cancelAction}),ze.actionState.showProgress&&r(rl,{title:ze.actionState.progressTitle,progress:ze.actionState.progressState,onStop:ze.stopProcessing,onDeleteOrphans:ze.deleteOrphans,onClose:ze.closeProgress})]}):r(O2,{currentPath:S,setCurrentPath:H,refreshKey:ae,triggerRefresh:xn})]})})}var Z2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},$2={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 J2({imageCount:i,mode:c,onConfirm:f,onCancel:d}){const h={overlay:$2,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:Z2,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:y("div",{css:h.container,onClick:b=>b.stopPropagation(),children:[r("h2",{css:h.title,children:C}),r("p",{css:h.message,children:D}),y("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 W2({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:Et.breadcrumbs,children:h.map((p,C)=>y("span",{style:{display:"flex",alignItems:"center",gap:6},children:[C>0&&r("span",{css:Et.breadcrumbSeparator,children:"/"}),C===h.length-1?r("span",{css:Et.breadcrumbCurrent,children:p.name}):r("span",{css:Et.breadcrumbItem,onClick:()=>c(p.path),children:p.name})]},p.path))})}function I2(){return y("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 P2(){return y("svg",{css:Et.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function eb({isOpen:i}){return r("svg",{css:[Et.titleChevron,i&&Et.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 tb=window.__STUDIO_WORKSPACE__||"Unknown",nb=window.__STUDIO_SITE_URL__||"";u1.createRoot(Jp).render(r(v.StrictMode,{children:r("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:r(K2,{isVisible:!0,standaloneMode:!0,workspacePath:tb,siteUrl:nb})})}));
|