@gallop.software/studio 2.3.147 → 2.3.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
function Pm(i,s){for(var f=0;f<s.length;f++){const d=s[f];if(typeof d!="string"&&!Array.isArray(d)){for(const h in d)if(h!=="default"&&!(h in i)){const m=Object.getOwnPropertyDescriptor(d,h);m&&Object.defineProperty(i,h,m.get?m:{enumerable:!0,get:()=>d[h]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))d(h);new MutationObserver(h=>{for(const m of h)if(m.type==="childList")for(const w of m.addedNodes)w.tagName==="LINK"&&w.rel==="modulepreload"&&d(w)}).observe(document,{childList:!0,subtree:!0});function f(h){const m={};return h.integrity&&(m.integrity=h.integrity),h.referrerPolicy&&(m.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?m.credentials="include":h.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function d(h){if(h.ep)return;h.ep=!0;const m=f(h);fetch(h.href,m)}})();function eg(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Fc={exports:{}},ni={};var tp;function tg(){if(tp)return ni;tp=1;var i=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function f(d,h,m){var w=null;if(m!==void 0&&(w=""+m),h.key!==void 0&&(w=""+h.key),"key"in h){m={};for(var D in h)D!=="key"&&(m[D]=h[D])}else m=h;return h=m.ref,{$$typeof:i,type:d,key:w,ref:h!==void 0?h:null,props:m}}return ni.Fragment=s,ni.jsx=f,ni.jsxs=f,ni}var np;function ng(){return np||(np=1,Fc.exports=tg()),Fc.exports}var ii=ng(),Jc={exports:{}},je={};var ap;function ag(){if(ap)return je;ap=1;var i=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),w=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),B=Symbol.iterator;function q(x){return x===null||typeof x!="object"?null:(x=B&&x[B]||x["@@iterator"],typeof x=="function"?x:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,ie={};function Q(x,_,ee){this.props=x,this.context=_,this.refs=ie,this.updater=ee||H}Q.prototype.isReactComponent={},Q.prototype.setState=function(x,_){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,_,"setState")},Q.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function ce(){}ce.prototype=Q.prototype;function ae(x,_,ee){this.props=x,this.context=_,this.refs=ie,this.updater=ee||H}var de=ae.prototype=new ce;de.constructor=ae,Y(de,Q.prototype),de.isPureReactComponent=!0;var X=Array.isArray;function P(){}var I={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function U(x,_,ee){var oe=ee.ref;return{$$typeof:i,type:x,key:_,ref:oe!==void 0?oe:null,props:ee}}function Z(x,_){return U(x.type,_,x.props)}function he(x){return typeof x=="object"&&x!==null&&x.$$typeof===i}function me(x){var _={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(ee){return _[ee]})}var pe=/\/+/g;function ne(x,_){return typeof x=="object"&&x!==null&&x.key!=null?me(""+x.key):_.toString(36)}function Oe(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(P,P):(x.status="pending",x.then(function(_){x.status==="pending"&&(x.status="fulfilled",x.value=_)},function(_){x.status==="pending"&&(x.status="rejected",x.reason=_)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function E(x,_,ee,oe,Se){var K=typeof x;(K==="undefined"||K==="boolean")&&(x=null);var Ce=!1;if(x===null)Ce=!0;else switch(K){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(x.$$typeof){case i:case s:Ce=!0;break;case T:return Ce=x._init,E(Ce(x._payload),_,ee,oe,Se)}}if(Ce)return Se=Se(x),Ce=oe===""?"."+ne(x,0):oe,X(Se)?(ee="",Ce!=null&&(ee=Ce.replace(pe,"$&/")+"/"),E(Se,_,ee,"",function(Rt){return Rt})):Se!=null&&(he(Se)&&(Se=Z(Se,ee+(Se.key==null||x&&x.key===Se.key?"":(""+Se.key).replace(pe,"$&/")+"/")+Ce)),_.push(Se)),1;Ce=0;var Ye=oe===""?".":oe+":";if(X(x))for(var ze=0;ze<x.length;ze++)oe=x[ze],K=Ye+ne(oe,ze),Ce+=E(oe,_,ee,K,Se);else if(ze=q(x),typeof ze=="function")for(x=ze.call(x),ze=0;!(oe=x.next()).done;)oe=oe.value,K=Ye+ne(oe,ze++),Ce+=E(oe,_,ee,K,Se);else if(K==="object"){if(typeof x.then=="function")return E(Oe(x),_,ee,oe,Se);throw _=String(x),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function $(x,_,ee){if(x==null)return x;var oe=[],Se=0;return E(x,oe,"","",function(K){return _.call(ee,K,Se++)}),oe}function W(x){if(x._status===-1){var _=x._result;_=_(),_.then(function(ee){(x._status===0||x._status===-1)&&(x._status=1,x._result=ee)},function(ee){(x._status===0||x._status===-1)&&(x._status=2,x._result=ee)}),x._status===-1&&(x._status=0,x._result=_)}if(x._status===1)return x._result.default;throw x._result}var De=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var _=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(_))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},qe={map:$,forEach:function(x,_,ee){$(x,function(){_.apply(this,arguments)},ee)},count:function(x){var _=0;return $(x,function(){_++}),_},toArray:function(x){return $(x,function(_){return _})||[]},only:function(x){if(!he(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return je.Activity=z,je.Children=qe,je.Component=Q,je.Fragment=f,je.Profiler=h,je.PureComponent=ae,je.StrictMode=d,je.Suspense=C,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,je.__COMPILER_RUNTIME={__proto__:null,c:function(x){return I.H.useMemoCache(x)}},je.cache=function(x){return function(){return x.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(x,_,ee){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var oe=Y({},x.props),Se=x.key;if(_!=null)for(K in _.key!==void 0&&(Se=""+_.key),_)!te.call(_,K)||K==="key"||K==="__self"||K==="__source"||K==="ref"&&_.ref===void 0||(oe[K]=_[K]);var K=arguments.length-2;if(K===1)oe.children=ee;else if(1<K){for(var Ce=Array(K),Ye=0;Ye<K;Ye++)Ce[Ye]=arguments[Ye+2];oe.children=Ce}return U(x.type,Se,oe)},je.createContext=function(x){return x={$$typeof:w,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:m,_context:x},x},je.createElement=function(x,_,ee){var oe,Se={},K=null;if(_!=null)for(oe in _.key!==void 0&&(K=""+_.key),_)te.call(_,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(Se[oe]=_[oe]);var Ce=arguments.length-2;if(Ce===1)Se.children=ee;else if(1<Ce){for(var Ye=Array(Ce),ze=0;ze<Ce;ze++)Ye[ze]=arguments[ze+2];Se.children=Ye}if(x&&x.defaultProps)for(oe in Ce=x.defaultProps,Ce)Se[oe]===void 0&&(Se[oe]=Ce[oe]);return U(x,K,Se)},je.createRef=function(){return{current:null}},je.forwardRef=function(x){return{$$typeof:D,render:x}},je.isValidElement=he,je.lazy=function(x){return{$$typeof:T,_payload:{_status:-1,_result:x},_init:W}},je.memo=function(x,_){return{$$typeof:g,type:x,compare:_===void 0?null:_}},je.startTransition=function(x){var _=I.T,ee={};I.T=ee;try{var oe=x(),Se=I.S;Se!==null&&Se(ee,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(P,De)}catch(K){De(K)}finally{_!==null&&ee.types!==null&&(_.types=ee.types),I.T=_}},je.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},je.use=function(x){return I.H.use(x)},je.useActionState=function(x,_,ee){return I.H.useActionState(x,_,ee)},je.useCallback=function(x,_){return I.H.useCallback(x,_)},je.useContext=function(x){return I.H.useContext(x)},je.useDebugValue=function(){},je.useDeferredValue=function(x,_){return I.H.useDeferredValue(x,_)},je.useEffect=function(x,_){return I.H.useEffect(x,_)},je.useEffectEvent=function(x){return I.H.useEffectEvent(x)},je.useId=function(){return I.H.useId()},je.useImperativeHandle=function(x,_,ee){return I.H.useImperativeHandle(x,_,ee)},je.useInsertionEffect=function(x,_){return I.H.useInsertionEffect(x,_)},je.useLayoutEffect=function(x,_){return I.H.useLayoutEffect(x,_)},je.useMemo=function(x,_){return I.H.useMemo(x,_)},je.useOptimistic=function(x,_){return I.H.useOptimistic(x,_)},je.useReducer=function(x,_,ee){return I.H.useReducer(x,_,ee)},je.useRef=function(x){return I.H.useRef(x)},je.useState=function(x){return I.H.useState(x)},je.useSyncExternalStore=function(x,_,ee){return I.H.useSyncExternalStore(x,_,ee)},je.useTransition=function(){return I.H.useTransition()},je.version="19.2.4",je}var lp;function su(){return lp||(lp=1,Jc.exports=ag()),Jc.exports}var v=su();const rt=eg(v),op=Pm({__proto__:null,default:rt},[v]);function lg(i){if(i.sheet)return i.sheet;for(var s=0;s<document.styleSheets.length;s++)if(document.styleSheets[s].ownerNode===i)return document.styleSheets[s]}function og(i){var s=document.createElement("style");return s.setAttribute("data-emotion",i.key),i.nonce!==void 0&&s.setAttribute("nonce",i.nonce),s.appendChild(document.createTextNode("")),s.setAttribute("data-s",""),s}var ig=(function(){function i(f){var d=this;this._insertTag=function(h){var m;d.tags.length===0?d.insertionPoint?m=d.insertionPoint.nextSibling:d.prepend?m=d.container.firstChild:m=d.before:m=d.tags[d.tags.length-1].nextSibling,d.container.insertBefore(h,m),d.tags.push(h)},this.isSpeedy=f.speedy===void 0?!0:f.speedy,this.tags=[],this.ctr=0,this.nonce=f.nonce,this.key=f.key,this.container=f.container,this.prepend=f.prepend,this.insertionPoint=f.insertionPoint,this.before=null}var s=i.prototype;return s.hydrate=function(d){d.forEach(this._insertTag)},s.insert=function(d){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(og(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var m=lg(h);try{m.insertRule(d,m.cssRules.length)}catch{}}else h.appendChild(document.createTextNode(d));this.ctr++},s.flush=function(){this.tags.forEach(function(d){var h;return(h=d.parentNode)==null?void 0:h.removeChild(d)}),this.tags=[],this.ctr=0},i})(),en="-ms-",_r="-moz-",lt="-webkit-",Dp="comm",cu="rule",uu="decl",rg="@import",Ep="@keyframes",sg="@layer",cg=Math.abs,Hr=String.fromCharCode,ug=Object.assign;function dg(i,s){return Wt(i,0)^45?(((s<<2^Wt(i,0))<<2^Wt(i,1))<<2^Wt(i,2))<<2^Wt(i,3):0}function Ap(i){return i.trim()}function fg(i,s){return(i=s.exec(i))?i[0]:i}function ot(i,s,f){return i.replace(s,f)}function ou(i,s){return i.indexOf(s)}function Wt(i,s){return i.charCodeAt(s)|0}function ri(i,s,f){return i.slice(s,f)}function Zn(i){return i.length}function du(i){return i.length}function Ar(i,s){return s.push(i),i}function hg(i,s){return i.map(s).join("")}var Ur=1,lo=1,Tp=0,fn=0,jt=0,io="";function Br(i,s,f,d,h,m,w){return{value:i,root:s,parent:f,type:d,props:h,children:m,line:Ur,column:lo,length:w,return:""}}function ai(i,s){return ug(Br("",null,null,"",null,null,0),i,{length:-i.length},s)}function pg(){return jt}function mg(){return jt=fn>0?Wt(io,--fn):0,lo--,jt===10&&(lo=1,Ur--),jt}function Cn(){return jt=fn<Tp?Wt(io,fn++):0,lo++,jt===10&&(lo=1,Ur++),jt}function Jn(){return Wt(io,fn)}function Tr(){return fn}function ui(i,s){return ri(io,i,s)}function si(i){switch(i){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Rp(i){return Ur=lo=1,Tp=Zn(io=i),fn=0,[]}function Lp(i){return io="",i}function Rr(i){return Ap(ui(fn-1,iu(i===91?i+2:i===40?i+1:i)))}function gg(i){for(;(jt=Jn())&&jt<33;)Cn();return si(i)>2||si(jt)>3?"":" "}function yg(i,s){for(;--s&&Cn()&&!(jt<48||jt>102||jt>57&&jt<65||jt>70&&jt<97););return ui(i,Tr()+(s<6&&Jn()==32&&Cn()==32))}function iu(i){for(;Cn();)switch(jt){case i:return fn;case 34:case 39:i!==34&&i!==39&&iu(jt);break;case 40:i===41&&iu(i);break;case 92:Cn();break}return fn}function bg(i,s){for(;Cn()&&i+jt!==57;)if(i+jt===84&&Jn()===47)break;return"/*"+ui(s,fn-1)+"*"+Hr(i===47?i:Cn())}function vg(i){for(;!si(Jn());)Cn();return ui(i,fn)}function xg(i){return Lp(Lr("",null,null,null,[""],i=Rp(i),0,[0],i))}function Lr(i,s,f,d,h,m,w,D,C){for(var g=0,T=0,z=w,B=0,q=0,H=0,Y=1,ie=1,Q=1,ce=0,ae="",de=h,X=m,P=d,I=ae;ie;)switch(H=ce,ce=Cn()){case 40:if(H!=108&&Wt(I,z-1)==58){ou(I+=ot(Rr(ce),"&","&\f"),"&\f")!=-1&&(Q=-1);break}case 34:case 39:case 91:I+=Rr(ce);break;case 9:case 10:case 13:case 32:I+=gg(H);break;case 92:I+=yg(Tr()-1,7);continue;case 47:switch(Jn()){case 42:case 47:Ar(Sg(bg(Cn(),Tr()),s,f),C);break;default:I+="/"}break;case 123*Y:D[g++]=Zn(I)*Q;case 125*Y:case 59:case 0:switch(ce){case 0:case 125:ie=0;case 59+T:Q==-1&&(I=ot(I,/\f/g,"")),q>0&&Zn(I)-z&&Ar(q>32?rp(I+";",d,f,z-1):rp(ot(I," ","")+";",d,f,z-2),C);break;case 59:I+=";";default:if(Ar(P=ip(I,s,f,g,T,h,D,ae,de=[],X=[],z),m),ce===123)if(T===0)Lr(I,s,P,P,de,m,z,D,X);else switch(B===99&&Wt(I,3)===110?100:B){case 100:case 108:case 109:case 115:Lr(i,P,P,d&&Ar(ip(i,P,P,0,0,h,D,ae,h,de=[],z),X),h,X,z,D,d?de:X);break;default:Lr(I,P,P,P,[""],X,0,D,X)}}g=T=q=0,Y=Q=1,ae=I="",z=w;break;case 58:z=1+Zn(I),q=H;default:if(Y<1){if(ce==123)--Y;else if(ce==125&&Y++==0&&mg()==125)continue}switch(I+=Hr(ce),ce*Y){case 38:Q=T>0?1:(I+="\f",-1);break;case 44:D[g++]=(Zn(I)-1)*Q,Q=1;break;case 64:Jn()===45&&(I+=Rr(Cn())),B=Jn(),T=z=Zn(ae=I+=vg(Tr())),ce++;break;case 45:H===45&&Zn(I)==2&&(Y=0)}}return m}function ip(i,s,f,d,h,m,w,D,C,g,T){for(var z=h-1,B=h===0?m:[""],q=du(B),H=0,Y=0,ie=0;H<d;++H)for(var Q=0,ce=ri(i,z+1,z=cg(Y=w[H])),ae=i;Q<q;++Q)(ae=Ap(Y>0?B[Q]+" "+ce:ot(ce,/&\f/g,B[Q])))&&(C[ie++]=ae);return Br(i,s,f,h===0?cu:D,C,g,T)}function Sg(i,s,f){return Br(i,s,f,Dp,Hr(pg()),ri(i,2,-2),0)}function rp(i,s,f,d){return Br(i,s,f,uu,ri(i,0,d),ri(i,d+1,-1),d)}function to(i,s){for(var f="",d=du(i),h=0;h<d;h++)f+=s(i[h],h,i,s)||"";return f}function Cg(i,s,f,d){switch(i.type){case sg:if(i.children.length)break;case rg:case uu:return i.return=i.return||i.value;case Dp:return"";case Ep:return i.return=i.value+"{"+to(i.children,d)+"}";case cu:i.value=i.props.join(",")}return Zn(f=to(i.children,d))?i.return=i.value+"{"+f+"}":""}function wg(i){var s=du(i);return function(f,d,h,m){for(var w="",D=0;D<s;D++)w+=i[D](f,d,h,m)||"";return w}}function kg(i){return function(s){s.root||(s=s.return)&&i(s)}}function zg(i){var s=Object.create(null);return function(f){return s[f]===void 0&&(s[f]=i(f)),s[f]}}var Mg=function(s,f,d){for(var h=0,m=0;h=m,m=Jn(),h===38&&m===12&&(f[d]=1),!si(m);)Cn();return ui(s,fn)},Dg=function(s,f){var d=-1,h=44;do switch(si(h)){case 0:h===38&&Jn()===12&&(f[d]=1),s[d]+=Mg(fn-1,f,d);break;case 2:s[d]+=Rr(h);break;case 4:if(h===44){s[++d]=Jn()===58?"&\f":"",f[d]=s[d].length;break}default:s[d]+=Hr(h)}while(h=Cn());return s},Eg=function(s,f){return Lp(Dg(Rp(s),f))},sp=new WeakMap,Ag=function(s){if(!(s.type!=="rule"||!s.parent||s.length<1)){for(var f=s.value,d=s.parent,h=s.column===d.column&&s.line===d.line;d.type!=="rule";)if(d=d.parent,!d)return;if(!(s.props.length===1&&f.charCodeAt(0)!==58&&!sp.get(d))&&!h){sp.set(s,!0);for(var m=[],w=Eg(f,m),D=d.props,C=0,g=0;C<w.length;C++)for(var T=0;T<D.length;T++,g++)s.props[g]=m[C]?w[C].replace(/&\f/g,D[T]):D[T]+" "+w[C]}}},Tg=function(s){if(s.type==="decl"){var f=s.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(s.return="",s.value="")}};function _p(i,s){switch(dg(i,s)){case 5103:return lt+"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 lt+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return lt+i+_r+i+en+i+i;case 6828:case 4268:return lt+i+en+i+i;case 6165:return lt+i+en+"flex-"+i+i;case 5187:return lt+i+ot(i,/(\w+).+(:[^]+)/,lt+"box-$1$2"+en+"flex-$1$2")+i;case 5443:return lt+i+en+"flex-item-"+ot(i,/flex-|-self/,"")+i;case 4675:return lt+i+en+"flex-line-pack"+ot(i,/align-content|flex-|-self/,"")+i;case 5548:return lt+i+en+ot(i,"shrink","negative")+i;case 5292:return lt+i+en+ot(i,"basis","preferred-size")+i;case 6060:return lt+"box-"+ot(i,"-grow","")+lt+i+en+ot(i,"grow","positive")+i;case 4554:return lt+ot(i,/([^-])(transform)/g,"$1"+lt+"$2")+i;case 6187:return ot(ot(ot(i,/(zoom-|grab)/,lt+"$1"),/(image-set)/,lt+"$1"),i,"")+i;case 5495:case 3959:return ot(i,/(image-set\([^]*)/,lt+"$1$`$1");case 4968:return ot(ot(i,/(.+:)(flex-)?(.*)/,lt+"box-pack:$3"+en+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+lt+i+i;case 4095:case 3583:case 4068:case 2532:return ot(i,/(.+)-inline(.+)/,lt+"$1$2")+i;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Zn(i)-1-s>6)switch(Wt(i,s+1)){case 109:if(Wt(i,s+4)!==45)break;case 102:return ot(i,/(.+:)(.+)-([^]+)/,"$1"+lt+"$2-$3$1"+_r+(Wt(i,s+3)==108?"$3":"$2-$3"))+i;case 115:return~ou(i,"stretch")?_p(ot(i,"stretch","fill-available"),s)+i:i}break;case 4949:if(Wt(i,s+1)!==115)break;case 6444:switch(Wt(i,Zn(i)-3-(~ou(i,"!important")&&10))){case 107:return ot(i,":",":"+lt)+i;case 101:return ot(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+lt+(Wt(i,14)===45?"inline-":"")+"box$3$1"+lt+"$2$3$1"+en+"$2box$3")+i}break;case 5936:switch(Wt(i,s+11)){case 114:return lt+i+en+ot(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return lt+i+en+ot(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return lt+i+en+ot(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return lt+i+en+i+i}return i}var Rg=function(s,f,d,h){if(s.length>-1&&!s.return)switch(s.type){case uu:s.return=_p(s.value,s.length);break;case Ep:return to([ai(s,{value:ot(s.value,"@","@"+lt)})],h);case cu:if(s.length)return hg(s.props,function(m){switch(fg(m,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return to([ai(s,{props:[ot(m,/:(read-\w+)/,":"+_r+"$1")]})],h);case"::placeholder":return to([ai(s,{props:[ot(m,/:(plac\w+)/,":"+lt+"input-$1")]}),ai(s,{props:[ot(m,/:(plac\w+)/,":"+_r+"$1")]}),ai(s,{props:[ot(m,/:(plac\w+)/,en+"input-$1")]})],h)}return""})}},Lg=[Rg],_g=function(s){var f=s.key;if(f==="css"){var d=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(d,function(Y){var ie=Y.getAttribute("data-emotion");ie.indexOf(" ")!==-1&&(document.head.appendChild(Y),Y.setAttribute("data-s",""))})}var h=s.stylisPlugins||Lg,m={},w,D=[];w=s.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(Y){for(var ie=Y.getAttribute("data-emotion").split(" "),Q=1;Q<ie.length;Q++)m[ie[Q]]=!0;D.push(Y)});var C,g=[Ag,Tg];{var T,z=[Cg,kg(function(Y){T.insert(Y)})],B=wg(g.concat(h,z)),q=function(ie){return to(xg(ie),B)};C=function(ie,Q,ce,ae){T=ce,q(ie?ie+"{"+Q.styles+"}":Q.styles),ae&&(H.inserted[Q.name]=!0)}}var H={key:f,sheet:new ig({key:f,container:w,nonce:s.nonce,speedy:s.speedy,prepend:s.prepend,insertionPoint:s.insertionPoint}),nonce:s.nonce,inserted:m,registered:{},insert:C};return H.sheet.hydrate(D),H},$c={exports:{}},it={};var cp;function Og(){if(cp)return it;cp=1;var i=typeof Symbol=="function"&&Symbol.for,s=i?Symbol.for("react.element"):60103,f=i?Symbol.for("react.portal"):60106,d=i?Symbol.for("react.fragment"):60107,h=i?Symbol.for("react.strict_mode"):60108,m=i?Symbol.for("react.profiler"):60114,w=i?Symbol.for("react.provider"):60109,D=i?Symbol.for("react.context"):60110,C=i?Symbol.for("react.async_mode"):60111,g=i?Symbol.for("react.concurrent_mode"):60111,T=i?Symbol.for("react.forward_ref"):60112,z=i?Symbol.for("react.suspense"):60113,B=i?Symbol.for("react.suspense_list"):60120,q=i?Symbol.for("react.memo"):60115,H=i?Symbol.for("react.lazy"):60116,Y=i?Symbol.for("react.block"):60121,ie=i?Symbol.for("react.fundamental"):60117,Q=i?Symbol.for("react.responder"):60118,ce=i?Symbol.for("react.scope"):60119;function ae(X){if(typeof X=="object"&&X!==null){var P=X.$$typeof;switch(P){case s:switch(X=X.type,X){case C:case g:case d:case m:case h:case z:return X;default:switch(X=X&&X.$$typeof,X){case D:case T:case H:case q:case w:return X;default:return P}}case f:return P}}}function de(X){return ae(X)===g}return it.AsyncMode=C,it.ConcurrentMode=g,it.ContextConsumer=D,it.ContextProvider=w,it.Element=s,it.ForwardRef=T,it.Fragment=d,it.Lazy=H,it.Memo=q,it.Portal=f,it.Profiler=m,it.StrictMode=h,it.Suspense=z,it.isAsyncMode=function(X){return de(X)||ae(X)===C},it.isConcurrentMode=de,it.isContextConsumer=function(X){return ae(X)===D},it.isContextProvider=function(X){return ae(X)===w},it.isElement=function(X){return typeof X=="object"&&X!==null&&X.$$typeof===s},it.isForwardRef=function(X){return ae(X)===T},it.isFragment=function(X){return ae(X)===d},it.isLazy=function(X){return ae(X)===H},it.isMemo=function(X){return ae(X)===q},it.isPortal=function(X){return ae(X)===f},it.isProfiler=function(X){return ae(X)===m},it.isStrictMode=function(X){return ae(X)===h},it.isSuspense=function(X){return ae(X)===z},it.isValidElementType=function(X){return typeof X=="string"||typeof X=="function"||X===d||X===g||X===m||X===h||X===z||X===B||typeof X=="object"&&X!==null&&(X.$$typeof===H||X.$$typeof===q||X.$$typeof===w||X.$$typeof===D||X.$$typeof===T||X.$$typeof===ie||X.$$typeof===Q||X.$$typeof===ce||X.$$typeof===Y)},it.typeOf=ae,it}var up;function Hg(){return up||(up=1,$c.exports=Og()),$c.exports}var Wc,dp;function Ug(){if(dp)return Wc;dp=1;var i=Hg(),s={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},f={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},d={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},h={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},m={};m[i.ForwardRef]=d,m[i.Memo]=h;function w(H){return i.isMemo(H)?h:m[H.$$typeof]||s}var D=Object.defineProperty,C=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,T=Object.getOwnPropertyDescriptor,z=Object.getPrototypeOf,B=Object.prototype;function q(H,Y,ie){if(typeof Y!="string"){if(B){var Q=z(Y);Q&&Q!==B&&q(H,Q,ie)}var ce=C(Y);g&&(ce=ce.concat(g(Y)));for(var ae=w(H),de=w(Y),X=0;X<ce.length;++X){var P=ce[X];if(!f[P]&&!(ie&&ie[P])&&!(de&&de[P])&&!(ae&&ae[P])){var I=T(Y,P);try{D(H,P,I)}catch{}}}}return H}return Wc=q,Wc}Ug();var Bg=!0;function Ng(i,s,f){var d="";return f.split(" ").forEach(function(h){i[h]!==void 0?s.push(i[h]+";"):h&&(d+=h+" ")}),d}var Op=function(s,f,d){var h=s.key+"-"+f.name;(d===!1||Bg===!1)&&s.registered[h]===void 0&&(s.registered[h]=f.styles)},jg=function(s,f,d){Op(s,f,d);var h=s.key+"-"+f.name;if(s.inserted[f.name]===void 0){var m=f;do s.insert(f===m?"."+h:"",m,s.sheet,!0),m=m.next;while(m!==void 0)}};function qg(i){for(var s=0,f,d=0,h=i.length;h>=4;++d,h-=4)f=i.charCodeAt(d)&255|(i.charCodeAt(++d)&255)<<8|(i.charCodeAt(++d)&255)<<16|(i.charCodeAt(++d)&255)<<24,f=(f&65535)*1540483477+((f>>>16)*59797<<16),f^=f>>>24,s=(f&65535)*1540483477+((f>>>16)*59797<<16)^(s&65535)*1540483477+((s>>>16)*59797<<16);switch(h){case 3:s^=(i.charCodeAt(d+2)&255)<<16;case 2:s^=(i.charCodeAt(d+1)&255)<<8;case 1:s^=i.charCodeAt(d)&255,s=(s&65535)*1540483477+((s>>>16)*59797<<16)}return s^=s>>>13,s=(s&65535)*1540483477+((s>>>16)*59797<<16),((s^s>>>15)>>>0).toString(36)}var Yg={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},Gg=/[A-Z]|^ms/g,Xg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Hp=function(s){return s.charCodeAt(1)===45},fp=function(s){return s!=null&&typeof s!="boolean"},Ic=zg(function(i){return Hp(i)?i:i.replace(Gg,"-$&").toLowerCase()}),hp=function(s,f){switch(s){case"animation":case"animationName":if(typeof f=="string")return f.replace(Xg,function(d,h,m){return Fn={name:h,styles:m,next:Fn},h})}return Yg[s]!==1&&!Hp(s)&&typeof f=="number"&&f!==0?f+"px":f};function ci(i,s,f){if(f==null)return"";var d=f;if(d.__emotion_styles!==void 0)return d;switch(typeof f){case"boolean":return"";case"object":{var h=f;if(h.anim===1)return Fn={name:h.name,styles:h.styles,next:Fn},h.name;var m=f;if(m.styles!==void 0){var w=m.next;if(w!==void 0)for(;w!==void 0;)Fn={name:w.name,styles:w.styles,next:Fn},w=w.next;var D=m.styles+";";return D}return Vg(i,s,f)}case"function":{if(i!==void 0){var C=Fn,g=f(i);return Fn=C,ci(i,s,g)}break}}var T=f;return T}function Vg(i,s,f){var d="";if(Array.isArray(f))for(var h=0;h<f.length;h++)d+=ci(i,s,f[h])+";";else for(var m in f){var w=f[m];if(typeof w!="object"){var D=w;fp(D)&&(d+=Ic(m)+":"+hp(m,D)+";")}else if(Array.isArray(w)&&typeof w[0]=="string"&&s==null)for(var C=0;C<w.length;C++)fp(w[C])&&(d+=Ic(m)+":"+hp(m,w[C])+";");else{var g=ci(i,s,w);switch(m){case"animation":case"animationName":{d+=Ic(m)+":"+g+";";break}default:d+=m+"{"+g+"}"}}}return d}var pp=/label:\s*([^\s;{]+)\s*(;|$)/g,Fn;function Up(i,s,f){if(i.length===1&&typeof i[0]=="object"&&i[0]!==null&&i[0].styles!==void 0)return i[0];var d=!0,h="";Fn=void 0;var m=i[0];if(m==null||m.raw===void 0)d=!1,h+=ci(f,s,m);else{var w=m;h+=w[0]}for(var D=1;D<i.length;D++)if(h+=ci(f,s,i[D]),d){var C=m;h+=C[D]}pp.lastIndex=0;for(var g="",T;(T=pp.exec(h))!==null;)g+="-"+T[1];var z=qg(h)+g;return{name:z,styles:h,next:Fn}}var Qg=function(s){return s()},Kg=op.useInsertionEffect?op.useInsertionEffect:!1,Zg=Kg||Qg,Bp=v.createContext(typeof HTMLElement<"u"?_g({key:"css"}):null);Bp.Provider;var Fg=function(s){return v.forwardRef(function(f,d){var h=v.useContext(Bp);return s(f,h,d)})},Jg=v.createContext({}),di={}.hasOwnProperty,ru="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fu=function(s,f){var d={};for(var h in f)di.call(f,h)&&(d[h]=f[h]);return d[ru]=s,d},$g=function(s){var f=s.cache,d=s.serialized,h=s.isStringTag;return Op(f,d,h),Zg(function(){return jg(f,d,h)}),null},Wg=Fg(function(i,s,f){var d=i.css;typeof d=="string"&&s.registered[d]!==void 0&&(d=s.registered[d]);var h=i[ru],m=[d],w="";typeof i.className=="string"?w=Ng(s.registered,m,i.className):i.className!=null&&(w=i.className+" ");var D=Up(m,void 0,v.useContext(Jg));w+=s.key+"-"+D.name;var C={};for(var g in i)di.call(i,g)&&g!=="css"&&g!==ru&&(C[g]=i[g]);return C.className=w,f&&(C.ref=f),v.createElement(v.Fragment,null,v.createElement($g,{cache:s,serialized:D,isStringTag:typeof h=="string"}),v.createElement(h,C))}),hu=Wg,Pe=ii.Fragment,r=function(s,f,d){return di.call(f,"css")?ii.jsx(hu,fu(s,f),d):ii.jsx(s,f,d)},b=function(s,f,d){return di.call(f,"css")?ii.jsxs(hu,fu(s,f),d):ii.jsxs(s,f,d)},Pc={exports:{}},li={},eu={exports:{}},tu={};var mp;function Ig(){return mp||(mp=1,(function(i){function s(E,$){var W=E.length;E.push($);e:for(;0<W;){var De=W-1>>>1,qe=E[De];if(0<h(qe,$))E[De]=$,E[W]=qe,W=De;else break e}}function f(E){return E.length===0?null:E[0]}function d(E){if(E.length===0)return null;var $=E[0],W=E.pop();if(W!==$){E[0]=W;e:for(var De=0,qe=E.length,x=qe>>>1;De<x;){var _=2*(De+1)-1,ee=E[_],oe=_+1,Se=E[oe];if(0>h(ee,W))oe<qe&&0>h(Se,ee)?(E[De]=Se,E[oe]=W,De=oe):(E[De]=ee,E[_]=W,De=_);else if(oe<qe&&0>h(Se,W))E[De]=Se,E[oe]=W,De=oe;else break e}}return $}function h(E,$){var W=E.sortIndex-$.sortIndex;return W!==0?W:E.id-$.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;i.unstable_now=function(){return m.now()}}else{var w=Date,D=w.now();i.unstable_now=function(){return w.now()-D}}var C=[],g=[],T=1,z=null,B=3,q=!1,H=!1,Y=!1,ie=!1,Q=typeof setTimeout=="function"?setTimeout:null,ce=typeof clearTimeout=="function"?clearTimeout:null,ae=typeof setImmediate<"u"?setImmediate:null;function de(E){for(var $=f(g);$!==null;){if($.callback===null)d(g);else if($.startTime<=E)d(g),$.sortIndex=$.expirationTime,s(C,$);else break;$=f(g)}}function X(E){if(Y=!1,de(E),!H)if(f(C)!==null)H=!0,P||(P=!0,me());else{var $=f(g);$!==null&&Oe(X,$.startTime-E)}}var P=!1,I=-1,te=5,U=-1;function Z(){return ie?!0:!(i.unstable_now()-U<te)}function he(){if(ie=!1,P){var E=i.unstable_now();U=E;var $=!0;try{e:{H=!1,Y&&(Y=!1,ce(I),I=-1),q=!0;var W=B;try{t:{for(de(E),z=f(C);z!==null&&!(z.expirationTime>E&&Z());){var De=z.callback;if(typeof De=="function"){z.callback=null,B=z.priorityLevel;var qe=De(z.expirationTime<=E);if(E=i.unstable_now(),typeof qe=="function"){z.callback=qe,de(E),$=!0;break t}z===f(C)&&d(C),de(E)}else d(C);z=f(C)}if(z!==null)$=!0;else{var x=f(g);x!==null&&Oe(X,x.startTime-E),$=!1}}break e}finally{z=null,B=W,q=!1}$=void 0}}finally{$?me():P=!1}}}var me;if(typeof ae=="function")me=function(){ae(he)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,ne=pe.port2;pe.port1.onmessage=he,me=function(){ne.postMessage(null)}}else me=function(){Q(he,0)};function Oe(E,$){I=Q(function(){E(i.unstable_now())},$)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(E){E.callback=null},i.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<E?Math.floor(1e3/E):5},i.unstable_getCurrentPriorityLevel=function(){return B},i.unstable_next=function(E){switch(B){case 1:case 2:case 3:var $=3;break;default:$=B}var W=B;B=$;try{return E()}finally{B=W}},i.unstable_requestPaint=function(){ie=!0},i.unstable_runWithPriority=function(E,$){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var W=B;B=E;try{return $()}finally{B=W}},i.unstable_scheduleCallback=function(E,$,W){var De=i.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?De+W:De):W=De,E){case 1:var qe=-1;break;case 2:qe=250;break;case 5:qe=1073741823;break;case 4:qe=1e4;break;default:qe=5e3}return qe=W+qe,E={id:T++,callback:$,priorityLevel:E,startTime:W,expirationTime:qe,sortIndex:-1},W>De?(E.sortIndex=W,s(g,E),f(C)===null&&E===f(g)&&(Y?(ce(I),I=-1):Y=!0,Oe(X,W-De))):(E.sortIndex=qe,s(C,E),H||q||(H=!0,P||(P=!0,me()))),E},i.unstable_shouldYield=Z,i.unstable_wrapCallback=function(E){var $=B;return function(){var W=B;B=$;try{return E.apply(this,arguments)}finally{B=W}}}})(tu)),tu}var gp;function Pg(){return gp||(gp=1,eu.exports=Ig()),eu.exports}var nu={exports:{}},Pt={};var yp;function e1(){if(yp)return Pt;yp=1;var i=su();function s(C){var g="https://react.dev/errors/"+C;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)g+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+C+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var d={d:{f,r:function(){throw Error(s(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},h=Symbol.for("react.portal");function m(C,g,T){var z=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:z==null?null:""+z,children:C,containerInfo:g,implementation:T}}var w=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function D(C,g){if(C==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,Pt.createPortal=function(C,g){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return m(C,g,null,T)},Pt.flushSync=function(C){var g=w.T,T=d.p;try{if(w.T=null,d.p=2,C)return C()}finally{w.T=g,d.p=T,d.d.f()}},Pt.preconnect=function(C,g){typeof C=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,d.d.C(C,g))},Pt.prefetchDNS=function(C){typeof C=="string"&&d.d.D(C)},Pt.preinit=function(C,g){if(typeof C=="string"&&g&&typeof g.as=="string"){var T=g.as,z=D(T,g.crossOrigin),B=typeof g.integrity=="string"?g.integrity:void 0,q=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;T==="style"?d.d.S(C,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:z,integrity:B,fetchPriority:q}):T==="script"&&d.d.X(C,{crossOrigin:z,integrity:B,fetchPriority:q,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Pt.preinitModule=function(C,g){if(typeof C=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var T=D(g.as,g.crossOrigin);d.d.M(C,{crossOrigin:T,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&d.d.M(C)},Pt.preload=function(C,g){if(typeof C=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var T=g.as,z=D(T,g.crossOrigin);d.d.L(C,T,{crossOrigin:z,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Pt.preloadModule=function(C,g){if(typeof C=="string")if(g){var T=D(g.as,g.crossOrigin);d.d.m(C,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:T,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else d.d.m(C)},Pt.requestFormReset=function(C){d.d.r(C)},Pt.unstable_batchedUpdates=function(C,g){return C(g)},Pt.useFormState=function(C,g,T){return w.H.useFormState(C,g,T)},Pt.useFormStatus=function(){return w.H.useHostTransitionStatus()},Pt.version="19.2.4",Pt}var bp;function t1(){if(bp)return nu.exports;bp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(s){console.error(s)}}return i(),nu.exports=e1(),nu.exports}var vp;function n1(){if(vp)return li;vp=1;var i=Pg(),s=su(),f=t1();function d(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function w(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 C(e){if(m(e)!==e)throw Error(d(188))}function g(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(d(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var o=l.alternate;if(o===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===o.child){for(o=l.child;o;){if(o===n)return C(l),e;if(o===a)return C(l),t;o=o.sibling}throw Error(d(188))}if(n.return!==a.return)n=l,a=o;else{for(var c=!1,p=l.child;p;){if(p===n){c=!0,n=l,a=o;break}if(p===a){c=!0,a=l,n=o;break}p=p.sibling}if(!c){for(p=o.child;p;){if(p===n){c=!0,n=o,a=l;break}if(p===a){c=!0,a=o,n=l;break}p=p.sibling}if(!c)throw Error(d(189))}}if(n.alternate!==a)throw Error(d(190))}if(n.tag!==3)throw Error(d(188));return n.stateNode.current===n?e:t}function T(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=T(e),t!==null)return t;e=e.sibling}return null}var z=Object.assign,B=Symbol.for("react.element"),q=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),ce=Symbol.for("react.consumer"),ae=Symbol.for("react.context"),de=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),he=Symbol.iterator;function me(e){return e===null||typeof e!="object"?null:(e=he&&e[he]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Symbol.for("react.client.reference");function ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case Q:return"Profiler";case ie:return"StrictMode";case X:return"Suspense";case P:return"SuspenseList";case U:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case ae:return e.displayName||"Context";case ce:return(e._context.displayName||"Context")+".Consumer";case de:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case te:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var Oe=Array.isArray,E=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},De=[],qe=-1;function x(e){return{current:e}}function _(e){0>qe||(e.current=De[qe],De[qe]=null,qe--)}function ee(e,t){qe++,De[qe]=e.current,e.current=t}var oe=x(null),Se=x(null),K=x(null),Ce=x(null);function Ye(e,t){switch(ee(K,t),ee(Se,e),ee(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?kh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=kh(t),e=zh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}_(oe),ee(oe,e)}function ze(){_(oe),_(Se),_(K)}function Rt(e){e.memoizedState!==null&&ee(Ce,e);var t=oe.current,n=zh(t,e.type);t!==n&&(ee(Se,e),ee(oe,n))}function Ze(e){Se.current===e&&(_(oe),_(Se)),Ce.current===e&&(_(Ce),Io._currentValue=W)}var ut,mt;function qt(e){if(ut===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ut=t&&t[1]||"",mt=-1<n.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+ut+e+mt}var Yt=!1;function tn(e,t){if(!e||Yt)return"";Yt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(O){var L=O}Reflect.construct(e,[],G)}else{try{G.call()}catch(O){L=O}e.call(G.prototype)}}else{try{throw Error()}catch(O){L=O}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(O){if(O&&L&&typeof O.stack=="string")return[O.stack,L.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=a.DetermineComponentFrameRoot(),c=o[0],p=o[1];if(c&&p){var S=c.split(`
|
|
4
|
+
`),R=p.split(`
|
|
5
|
+
`);for(l=a=0;a<S.length&&!S[a].includes("DetermineComponentFrameRoot");)a++;for(;l<R.length&&!R[l].includes("DetermineComponentFrameRoot");)l++;if(a===S.length||l===R.length)for(a=S.length-1,l=R.length-1;1<=a&&0<=l&&S[a]!==R[l];)l--;for(;1<=a&&0<=l;a--,l--)if(S[a]!==R[l]){if(a!==1||l!==1)do if(a--,l--,0>l||S[a]!==R[l]){var N=`
|
|
6
|
+
`+S[a].replace(" at new "," at ");return e.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",e.displayName)),N}while(1<=a&&0<=l);break}}}finally{Yt=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?qt(n):""}function Qt(e,t){switch(e.tag){case 26:case 27:case 5:return qt(e.type);case 16:return qt("Lazy");case 13:return e.child!==t&&t!==null?qt("Suspense Fallback"):qt("Suspense");case 19:return qt("SuspenseList");case 0:case 15:return tn(e.type,!1);case 11:return tn(e.type.render,!1);case 1:return tn(e.type,!0);case 31:return qt("Activity");default:return""}}function hn(e){try{var t="",n=null;do t+=Qt(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
7
|
+
Error generating stack: `+a.message+`
|
|
8
|
+
`+a.stack}}var It=Object.prototype.hasOwnProperty,dt=i.unstable_scheduleCallback,Xt=i.unstable_cancelCallback,wt=i.unstable_shouldYield,Re=i.unstable_requestPaint,Dt=i.unstable_now,wn=i.unstable_getCurrentPriorityLevel,Yn=i.unstable_ImmediatePriority,Hn=i.unstable_UserBlockingPriority,kn=i.unstable_NormalPriority,F=i.unstable_LowPriority,se=i.unstable_IdlePriority,Ge=i.log,et=i.unstable_setDisableYieldValue,Be=null,Ee=null;function xt(e){if(typeof Ge=="function"&&et(e),Ee&&typeof Ee.setStrictMode=="function")try{Ee.setStrictMode(Be,e)}catch{}}var gt=Math.clz32?Math.clz32:Nr,pl=Math.log,Qa=Math.LN2;function Nr(e){return e>>>=0,e===0?32:31-(pl(e)/Qa|0)|0}var ml=256,gl=262144,Ka=4194304;function $n(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function yl(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,o=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~o,a!==0?l=$n(a):(c&=p,c!==0?l=$n(c):n||(n=p&~e,n!==0&&(l=$n(n))))):(p=a&~o,p!==0?l=$n(p):c!==0?l=$n(c):n||(n=a&~e,n!==0&&(l=$n(n)))),l===0?0:t!==0&&t!==l&&(t&o)===0&&(o=l&-l,n=t&-t,o>=n||o===32&&(n&4194048)!==0)?t:l}function Za(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function jr(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hi(){var e=Ka;return Ka<<=1,(Ka&62914560)===0&&(Ka=4194304),e}function so(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qr(e,t,n,a,l,o){var c=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var p=e.entanglements,S=e.expirationTimes,R=e.hiddenUpdates;for(n=c&~n;0<n;){var N=31-gt(n),G=1<<N;p[N]=0,S[N]=-1;var L=R[N];if(L!==null)for(R[N]=null,N=0;N<L.length;N++){var O=L[N];O!==null&&(O.lane&=-536870913)}n&=~G}a!==0&&pi(e,a,0),o!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=o&~(c&~t))}function pi(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-gt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function mi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-gt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function co(e,t){var n=t&-t;return n=(n&42)!==0?1:Wn(n),(n&(e.suspendedLanes|t))!==0?0:n}function Wn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function uo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function gi(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Fh(e.type))}function Un(e,t){var n=$.p;try{return $.p=e,t()}finally{$.p=n}}var Gn=Math.random().toString(36).slice(2),kt="__reactFiber$"+Gn,Lt="__reactProps$"+Gn,pn="__reactContainer$"+Gn,bl="__reactEvents$"+Gn,ya="__reactListeners$"+Gn,ba="__reactHandles$"+Gn,fo="__reactResources$"+Gn,Ja="__reactMarker$"+Gn;function ho(e){delete e[kt],delete e[Lt],delete e[bl],delete e[ya],delete e[ba]}function In(e){var t=e[kt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pn]||n[kt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Lh(e);e!==null;){if(n=e[kt])return n;e=Lh(e)}return t}e=n,n=e.parentNode}return null}function fe(e){if(e=e[kt]||e[pn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function le(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function ye(e){var t=e[fo];return t||(t=e[fo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function be(e){e[Ja]=!0}var Le=new Set,He={};function We(e,t){Ie(e,t),Ie(e+"Capture",t)}function Ie(e,t){for(He[e]=t,e=0;e<t.length;e++)Le.add(t[e])}var Ue=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]*$"),nn={},po={};function Qp(e){return It.call(po,e)?!0:It.call(nn,e)?!1:Ue.test(e)?po[e]=!0:(nn[e]=!0,!1)}function yi(e,t,n){if(Qp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function bi(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Pn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function zn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function mu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kp(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(c){n=""+c,o.call(this,c)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(c){n=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yr(e){if(!e._valueTracker){var t=mu(e)?"checked":"value";e._valueTracker=Kp(e,t,""+e[t])}}function gu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=mu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function vi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Zp=/[\n"\\]/g;function Mn(e){return e.replace(Zp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gr(e,t,n,a,l,o,c,p){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+zn(t)):e.value!==""+zn(t)&&(e.value=""+zn(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?Xr(e,c,zn(t)):n!=null?Xr(e,c,zn(n)):a!=null&&e.removeAttribute("value"),l==null&&o!=null&&(e.defaultChecked=!!o),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+zn(p):e.removeAttribute("name")}function yu(e,t,n,a,l,o,c,p){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Yr(e);return}n=n!=null?""+zn(n):"",t=t!=null?""+zn(t):n,p||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=p?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),Yr(e)}function Xr(e,t,n){t==="number"&&vi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function vl(e,t,n,a){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&a&&(e[n].defaultSelected=!0)}else{for(n=""+zn(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function bu(e,t,n){if(t!=null&&(t=""+zn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+zn(n):""}function vu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(d(92));if(Oe(a)){if(1<a.length)throw Error(d(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=zn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Yr(e)}function xl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fp=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function xu(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||Fp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Su(e,t,n){if(t!=null&&typeof t!="object")throw Error(d(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&xu(e,l,a)}else for(var o in t)t.hasOwnProperty(o)&&xu(e,o,t[o])}function Vr(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jp=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"]]),$p=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function xi(e){return $p.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ea(){}var Qr=null;function Kr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sl=null,Cl=null;function Cu(e){var t=fe(e);if(t&&(e=t.stateNode)){var n=e[Lt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gr(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Mn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[Lt]||null;if(!l)throw Error(d(90));Gr(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&gu(a)}break e;case"textarea":bu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&vl(e,!!n.multiple,t,!1)}}}var Zr=!1;function wu(e,t,n){if(Zr)return e(t,n);Zr=!0;try{var a=e(t);return a}finally{if(Zr=!1,(Sl!==null||Cl!==null)&&(rr(),Sl&&(t=Sl,e=Cl,Cl=Sl=null,Cu(t),e)))for(t=0;t<e.length;t++)Cu(e[t])}}function mo(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Lt]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(d(231,t,typeof n));return n}var ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fr=!1;if(ta)try{var go={};Object.defineProperty(go,"passive",{get:function(){Fr=!0}}),window.addEventListener("test",go,go),window.removeEventListener("test",go,go)}catch{Fr=!1}var va=null,Jr=null,Si=null;function ku(){if(Si)return Si;var e,t=Jr,n=t.length,a,l="value"in va?va.value:va.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var c=n-e;for(a=1;a<=c&&t[n-a]===l[o-a];a++);return Si=l.slice(e,1<a?1-a:void 0)}function Ci(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 wi(){return!0}function zu(){return!1}function on(e){function t(n,a,l,o,c){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=o,this.target=c,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(o):o[p]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?wi:zu,this.isPropagationStopped=zu,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=wi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wi)},persist:function(){},isPersistent:wi}),t}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ki=on($a),yo=z({},$a,{view:0,detail:0}),Wp=on(yo),$r,Wr,bo,zi=z({},yo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==bo&&(bo&&e.type==="mousemove"?($r=e.screenX-bo.screenX,Wr=e.screenY-bo.screenY):Wr=$r=0,bo=e),$r)},movementY:function(e){return"movementY"in e?e.movementY:Wr}}),Mu=on(zi),Ip=z({},zi,{dataTransfer:0}),Pp=on(Ip),e0=z({},yo,{relatedTarget:0}),Ir=on(e0),t0=z({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),n0=on(t0),a0=z({},$a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),l0=on(a0),o0=z({},$a,{data:0}),Du=on(o0),i0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r0={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"},s0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function c0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=s0[e])?!!t[e]:!1}function Pr(){return c0}var u0=z({},yo,{key:function(e){if(e.key){var t=i0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ci(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?r0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pr,charCode:function(e){return e.type==="keypress"?Ci(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ci(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),d0=on(u0),f0=z({},zi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eu=on(f0),h0=z({},yo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pr}),p0=on(h0),m0=z({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),g0=on(m0),y0=z({},zi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),b0=on(y0),v0=z({},$a,{newState:0,oldState:0}),x0=on(v0),S0=[9,13,27,32],es=ta&&"CompositionEvent"in window,vo=null;ta&&"documentMode"in document&&(vo=document.documentMode);var C0=ta&&"TextEvent"in window&&!vo,Au=ta&&(!es||vo&&8<vo&&11>=vo),Tu=" ",Ru=!1;function Lu(e,t){switch(e){case"keyup":return S0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _u(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wl=!1;function w0(e,t){switch(e){case"compositionend":return _u(t);case"keypress":return t.which!==32?null:(Ru=!0,Tu);case"textInput":return e=t.data,e===Tu&&Ru?null:e;default:return null}}function k0(e,t){if(wl)return e==="compositionend"||!es&&Lu(e,t)?(e=ku(),Si=Jr=va=null,wl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Au&&t.locale!=="ko"?null:t.data;default:return null}}var z0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ou(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!z0[e.type]:t==="textarea"}function Hu(e,t,n,a){Sl?Cl?Cl.push(a):Cl=[a]:Sl=a,t=pr(t,"onChange"),0<t.length&&(n=new ki("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var xo=null,So=null;function M0(e){bh(e,0)}function Mi(e){var t=le(e);if(gu(t))return e}function Uu(e,t){if(e==="change")return t}var Bu=!1;if(ta){var ts;if(ta){var ns="oninput"in document;if(!ns){var Nu=document.createElement("div");Nu.setAttribute("oninput","return;"),ns=typeof Nu.oninput=="function"}ts=ns}else ts=!1;Bu=ts&&(!document.documentMode||9<document.documentMode)}function ju(){xo&&(xo.detachEvent("onpropertychange",qu),So=xo=null)}function qu(e){if(e.propertyName==="value"&&Mi(So)){var t=[];Hu(t,So,e,Kr(e)),wu(M0,t)}}function D0(e,t,n){e==="focusin"?(ju(),xo=t,So=n,xo.attachEvent("onpropertychange",qu)):e==="focusout"&&ju()}function E0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mi(So)}function A0(e,t){if(e==="click")return Mi(t)}function T0(e,t){if(e==="input"||e==="change")return Mi(t)}function R0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mn=typeof Object.is=="function"?Object.is:R0;function Co(e,t){if(mn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!It.call(t,l)||!mn(e[l],t[l]))return!1}return!0}function Yu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gu(e,t){var n=Yu(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yu(n)}}function Xu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=vi(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vi(e.document)}return t}function as(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var L0=ta&&"documentMode"in document&&11>=document.documentMode,kl=null,ls=null,wo=null,os=!1;function Qu(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;os||kl==null||kl!==vi(a)||(a=kl,"selectionStart"in a&&as(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),wo&&Co(wo,a)||(wo=a,a=pr(ls,"onSelect"),0<a.length&&(t=new ki("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=kl)))}function Wa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var zl={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionrun:Wa("Transition","TransitionRun"),transitionstart:Wa("Transition","TransitionStart"),transitioncancel:Wa("Transition","TransitionCancel"),transitionend:Wa("Transition","TransitionEnd")},is={},Ku={};ta&&(Ku=document.createElement("div").style,"AnimationEvent"in window||(delete zl.animationend.animation,delete zl.animationiteration.animation,delete zl.animationstart.animation),"TransitionEvent"in window||delete zl.transitionend.transition);function Ia(e){if(is[e])return is[e];if(!zl[e])return e;var t=zl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ku)return is[e]=t[n];return e}var Zu=Ia("animationend"),Fu=Ia("animationiteration"),Ju=Ia("animationstart"),_0=Ia("transitionrun"),O0=Ia("transitionstart"),H0=Ia("transitioncancel"),$u=Ia("transitionend"),Wu=new Map,rs="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");rs.push("scrollEnd");function Bn(e,t){Wu.set(e,t),We(t,[e])}var Di=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Dn=[],Ml=0,ss=0;function Ei(){for(var e=Ml,t=ss=Ml=0;t<e;){var n=Dn[t];Dn[t++]=null;var a=Dn[t];Dn[t++]=null;var l=Dn[t];Dn[t++]=null;var o=Dn[t];if(Dn[t++]=null,a!==null&&l!==null){var c=a.pending;c===null?l.next=l:(l.next=c.next,c.next=l),a.pending=l}o!==0&&Iu(n,l,o)}}function Ai(e,t,n,a){Dn[Ml++]=e,Dn[Ml++]=t,Dn[Ml++]=n,Dn[Ml++]=a,ss|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function cs(e,t,n,a){return Ai(e,t,n,a),Ti(e)}function Pa(e,t){return Ai(e,null,null,t),Ti(e)}function Iu(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-gt(n),e=o.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),o):null}function Ti(e){if(50<Qo)throw Qo=0,bc=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Dl={};function U0(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(e,t,n,a){return new U0(e,t,n,a)}function us(e){return e=e.prototype,!(!e||!e.isReactComponent)}function na(e,t){var n=e.alternate;return n===null?(n=gn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Pu(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ri(e,t,n,a,l,o){var c=0;if(a=e,typeof e=="function")us(e)&&(c=1);else if(typeof e=="string")c=Ym(e,n,oe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case U:return e=gn(31,n,t,l),e.elementType=U,e.lanes=o,e;case Y:return el(n.children,l,o,t);case ie:c=8,l|=24;break;case Q:return e=gn(12,n,t,l|2),e.elementType=Q,e.lanes=o,e;case X:return e=gn(13,n,t,l),e.elementType=X,e.lanes=o,e;case P:return e=gn(19,n,t,l),e.elementType=P,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ae:c=10;break e;case ce:c=9;break e;case de:c=11;break e;case I:c=14;break e;case te:c=16,a=null;break e}c=29,n=Error(d(130,e===null?"null":typeof e,"")),a=null}return t=gn(c,n,t,l),t.elementType=e,t.type=a,t.lanes=o,t}function el(e,t,n,a){return e=gn(7,e,a,t),e.lanes=n,e}function ds(e,t,n){return e=gn(6,e,null,t),e.lanes=n,e}function ed(e){var t=gn(18,null,null,0);return t.stateNode=e,t}function fs(e,t,n){return t=gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var td=new WeakMap;function En(e,t){if(typeof e=="object"&&e!==null){var n=td.get(e);return n!==void 0?n:(t={value:e,source:t,stack:hn(t)},td.set(e,t),t)}return{value:e,source:t,stack:hn(t)}}var El=[],Al=0,Li=null,ko=0,An=[],Tn=0,xa=null,Xn=1,Vn="";function aa(e,t){El[Al++]=ko,El[Al++]=Li,Li=e,ko=t}function nd(e,t,n){An[Tn++]=Xn,An[Tn++]=Vn,An[Tn++]=xa,xa=e;var a=Xn;e=Vn;var l=32-gt(a)-1;a&=~(1<<l),n+=1;var o=32-gt(t)+l;if(30<o){var c=l-l%5;o=(a&(1<<c)-1).toString(32),a>>=c,l-=c,Xn=1<<32-gt(t)+l|n<<l|a,Vn=o+e}else Xn=1<<o|n<<l|a,Vn=e}function hs(e){e.return!==null&&(aa(e,1),nd(e,1,0))}function ps(e){for(;e===Li;)Li=El[--Al],El[Al]=null,ko=El[--Al],El[Al]=null;for(;e===xa;)xa=An[--Tn],An[Tn]=null,Vn=An[--Tn],An[Tn]=null,Xn=An[--Tn],An[Tn]=null}function ad(e,t){An[Tn++]=Xn,An[Tn++]=Vn,An[Tn++]=xa,Xn=t.id,Vn=t.overflow,xa=e}var Kt=null,St=null,$e=!1,Sa=null,Rn=!1,ms=Error(d(519));function Ca(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zo(En(t,e)),ms}function ld(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[kt]=e,t[Lt]=a,n){case"dialog":Ke("cancel",t),Ke("close",t);break;case"iframe":case"object":case"embed":Ke("load",t);break;case"video":case"audio":for(n=0;n<Zo.length;n++)Ke(Zo[n],t);break;case"source":Ke("error",t);break;case"img":case"image":case"link":Ke("error",t),Ke("load",t);break;case"details":Ke("toggle",t);break;case"input":Ke("invalid",t),yu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ke("invalid",t);break;case"textarea":Ke("invalid",t),vu(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Ch(t.textContent,n)?(a.popover!=null&&(Ke("beforetoggle",t),Ke("toggle",t)),a.onScroll!=null&&Ke("scroll",t),a.onScrollEnd!=null&&Ke("scrollend",t),a.onClick!=null&&(t.onclick=ea),t=!0):t=!1,t||Ca(e,!0)}function od(e){for(Kt=e.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Kt=Kt.return}}function Tl(e){if(e!==Kt)return!1;if(!$e)return od(e),$e=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||_c(e.type,e.memoizedProps)),n=!n),n&&St&&Ca(e),od(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));St=Rh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));St=Rh(e)}else t===27?(t=St,Ua(e.type)?(e=Nc,Nc=null,St=e):St=t):St=Kt?_n(e.stateNode.nextSibling):null;return!0}function tl(){St=Kt=null,$e=!1}function gs(){var e=Sa;return e!==null&&(un===null?un=e:un.push.apply(un,e),Sa=null),e}function zo(e){Sa===null?Sa=[e]:Sa.push(e)}var ys=x(null),nl=null,la=null;function wa(e,t,n){ee(ys,t._currentValue),t._currentValue=n}function oa(e){e._currentValue=ys.current,_(ys)}function bs(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function vs(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var o=l.dependencies;if(o!==null){var c=l.child;o=o.firstContext;e:for(;o!==null;){var p=o;o=l;for(var S=0;S<t.length;S++)if(p.context===t[S]){o.lanes|=n,p=o.alternate,p!==null&&(p.lanes|=n),bs(o.return,n,e),a||(c=null);break e}o=p.next}}else if(l.tag===18){if(c=l.return,c===null)throw Error(d(341));c.lanes|=n,o=c.alternate,o!==null&&(o.lanes|=n),bs(c,n,e),c=null}else c=l.child;if(c!==null)c.return=l;else for(c=l;c!==null;){if(c===e){c=null;break}if(l=c.sibling,l!==null){l.return=c.return,c=l;break}c=c.return}l=c}}function Rl(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 c=l.alternate;if(c===null)throw Error(d(387));if(c=c.memoizedProps,c!==null){var p=l.type;mn(l.pendingProps.value,c.value)||(e!==null?e.push(p):e=[p])}}else if(l===Ce.current){if(c=l.alternate,c===null)throw Error(d(387));c.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Io):e=[Io])}l=l.return}e!==null&&vs(t,e,n,a),t.flags|=262144}function _i(e){for(e=e.firstContext;e!==null;){if(!mn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function al(e){nl=e,la=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Zt(e){return id(nl,e)}function Oi(e,t){return nl===null&&al(e),id(e,t)}function id(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},la===null){if(e===null)throw Error(d(308));la=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else la=la.next=t;return n}var B0=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()})}},N0=i.unstable_scheduleCallback,j0=i.unstable_NormalPriority,Ht={$$typeof:ae,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xs(){return{controller:new B0,data:new Map,refCount:0}}function Mo(e){e.refCount--,e.refCount===0&&N0(j0,function(){e.controller.abort()})}var Do=null,Ss=0,Ll=0,_l=null;function q0(e,t){if(Do===null){var n=Do=[];Ss=0,Ll=kc(),_l={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Ss++,t.then(rd,rd),t}function rd(){if(--Ss===0&&Do!==null){_l!==null&&(_l.status="fulfilled");var e=Do;Do=null,Ll=0,_l=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Y0(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),a}var sd=E.S;E.S=function(e,t){Kf=Dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&q0(e,t),sd!==null&&sd(e,t)};var ll=x(null);function Cs(){var e=ll.current;return e!==null?e:yt.pooledCache}function Hi(e,t){t===null?ee(ll,ll.current):ee(ll,t.pool)}function cd(){var e=Cs();return e===null?null:{parent:Ht._currentValue,pool:e}}var Ol=Error(d(460)),ws=Error(d(474)),Ui=Error(d(542)),Bi={then:function(){}};function ud(e){return e=e.status,e==="fulfilled"||e==="rejected"}function dd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ea,ea),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hd(e),e;default:if(typeof t.status=="string")t.then(ea,ea);else{if(e=yt,e!==null&&100<e.shellSuspendCounter)throw Error(d(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hd(e),e}throw il=t,Ol}}function ol(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(il=n,Ol):n}}var il=null;function fd(){if(il===null)throw Error(d(459));var e=il;return il=null,e}function hd(e){if(e===Ol||e===Ui)throw Error(d(483))}var Hl=null,Eo=0;function Ni(e){var t=Eo;return Eo+=1,Hl===null&&(Hl=[]),dd(Hl,e,t)}function Ao(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ji(e,t){throw t.$$typeof===B?Error(d(525)):(e=Object.prototype.toString.call(t),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function pd(e){function t(M,k){if(e){var A=M.deletions;A===null?(M.deletions=[k],M.flags|=16):A.push(k)}}function n(M,k){if(!e)return null;for(;k!==null;)t(M,k),k=k.sibling;return null}function a(M){for(var k=new Map;M!==null;)M.key!==null?k.set(M.key,M):k.set(M.index,M),M=M.sibling;return k}function l(M,k){return M=na(M,k),M.index=0,M.sibling=null,M}function o(M,k,A){return M.index=A,e?(A=M.alternate,A!==null?(A=A.index,A<k?(M.flags|=67108866,k):A):(M.flags|=67108866,k)):(M.flags|=1048576,k)}function c(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function p(M,k,A,j){return k===null||k.tag!==6?(k=ds(A,M.mode,j),k.return=M,k):(k=l(k,A),k.return=M,k)}function S(M,k,A,j){var Me=A.type;return Me===Y?N(M,k,A.props.children,j,A.key):k!==null&&(k.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===te&&ol(Me)===k.type)?(k=l(k,A.props),Ao(k,A),k.return=M,k):(k=Ri(A.type,A.key,A.props,null,M.mode,j),Ao(k,A),k.return=M,k)}function R(M,k,A,j){return k===null||k.tag!==4||k.stateNode.containerInfo!==A.containerInfo||k.stateNode.implementation!==A.implementation?(k=fs(A,M.mode,j),k.return=M,k):(k=l(k,A.children||[]),k.return=M,k)}function N(M,k,A,j,Me){return k===null||k.tag!==7?(k=el(A,M.mode,j,Me),k.return=M,k):(k=l(k,A),k.return=M,k)}function G(M,k,A){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=ds(""+k,M.mode,A),k.return=M,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case q:return A=Ri(k.type,k.key,k.props,null,M.mode,A),Ao(A,k),A.return=M,A;case H:return k=fs(k,M.mode,A),k.return=M,k;case te:return k=ol(k),G(M,k,A)}if(Oe(k)||me(k))return k=el(k,M.mode,A,null),k.return=M,k;if(typeof k.then=="function")return G(M,Ni(k),A);if(k.$$typeof===ae)return G(M,Oi(M,k),A);ji(M,k)}return null}function L(M,k,A,j){var Me=k!==null?k.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return Me!==null?null:p(M,k,""+A,j);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case q:return A.key===Me?S(M,k,A,j):null;case H:return A.key===Me?R(M,k,A,j):null;case te:return A=ol(A),L(M,k,A,j)}if(Oe(A)||me(A))return Me!==null?null:N(M,k,A,j,null);if(typeof A.then=="function")return L(M,k,Ni(A),j);if(A.$$typeof===ae)return L(M,k,Oi(M,A),j);ji(M,A)}return null}function O(M,k,A,j,Me){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return M=M.get(A)||null,p(k,M,""+j,Me);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case q:return M=M.get(j.key===null?A:j.key)||null,S(k,M,j,Me);case H:return M=M.get(j.key===null?A:j.key)||null,R(k,M,j,Me);case te:return j=ol(j),O(M,k,A,j,Me)}if(Oe(j)||me(j))return M=M.get(A)||null,N(k,M,j,Me,null);if(typeof j.then=="function")return O(M,k,A,Ni(j),Me);if(j.$$typeof===ae)return O(M,k,A,Oi(k,j),Me);ji(k,j)}return null}function ge(M,k,A,j){for(var Me=null,tt=null,we=k,Ve=k=0,Je=null;we!==null&&Ve<A.length;Ve++){we.index>Ve?(Je=we,we=null):Je=we.sibling;var nt=L(M,we,A[Ve],j);if(nt===null){we===null&&(we=Je);break}e&&we&&nt.alternate===null&&t(M,we),k=o(nt,k,Ve),tt===null?Me=nt:tt.sibling=nt,tt=nt,we=Je}if(Ve===A.length)return n(M,we),$e&&aa(M,Ve),Me;if(we===null){for(;Ve<A.length;Ve++)we=G(M,A[Ve],j),we!==null&&(k=o(we,k,Ve),tt===null?Me=we:tt.sibling=we,tt=we);return $e&&aa(M,Ve),Me}for(we=a(we);Ve<A.length;Ve++)Je=O(we,M,Ve,A[Ve],j),Je!==null&&(e&&Je.alternate!==null&&we.delete(Je.key===null?Ve:Je.key),k=o(Je,k,Ve),tt===null?Me=Je:tt.sibling=Je,tt=Je);return e&&we.forEach(function(Ya){return t(M,Ya)}),$e&&aa(M,Ve),Me}function Ae(M,k,A,j){if(A==null)throw Error(d(151));for(var Me=null,tt=null,we=k,Ve=k=0,Je=null,nt=A.next();we!==null&&!nt.done;Ve++,nt=A.next()){we.index>Ve?(Je=we,we=null):Je=we.sibling;var Ya=L(M,we,nt.value,j);if(Ya===null){we===null&&(we=Je);break}e&&we&&Ya.alternate===null&&t(M,we),k=o(Ya,k,Ve),tt===null?Me=Ya:tt.sibling=Ya,tt=Ya,we=Je}if(nt.done)return n(M,we),$e&&aa(M,Ve),Me;if(we===null){for(;!nt.done;Ve++,nt=A.next())nt=G(M,nt.value,j),nt!==null&&(k=o(nt,k,Ve),tt===null?Me=nt:tt.sibling=nt,tt=nt);return $e&&aa(M,Ve),Me}for(we=a(we);!nt.done;Ve++,nt=A.next())nt=O(we,M,Ve,nt.value,j),nt!==null&&(e&&nt.alternate!==null&&we.delete(nt.key===null?Ve:nt.key),k=o(nt,k,Ve),tt===null?Me=nt:tt.sibling=nt,tt=nt);return e&&we.forEach(function(Im){return t(M,Im)}),$e&&aa(M,Ve),Me}function pt(M,k,A,j){if(typeof A=="object"&&A!==null&&A.type===Y&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case q:e:{for(var Me=A.key;k!==null;){if(k.key===Me){if(Me=A.type,Me===Y){if(k.tag===7){n(M,k.sibling),j=l(k,A.props.children),j.return=M,M=j;break e}}else if(k.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===te&&ol(Me)===k.type){n(M,k.sibling),j=l(k,A.props),Ao(j,A),j.return=M,M=j;break e}n(M,k);break}else t(M,k);k=k.sibling}A.type===Y?(j=el(A.props.children,M.mode,j,A.key),j.return=M,M=j):(j=Ri(A.type,A.key,A.props,null,M.mode,j),Ao(j,A),j.return=M,M=j)}return c(M);case H:e:{for(Me=A.key;k!==null;){if(k.key===Me)if(k.tag===4&&k.stateNode.containerInfo===A.containerInfo&&k.stateNode.implementation===A.implementation){n(M,k.sibling),j=l(k,A.children||[]),j.return=M,M=j;break e}else{n(M,k);break}else t(M,k);k=k.sibling}j=fs(A,M.mode,j),j.return=M,M=j}return c(M);case te:return A=ol(A),pt(M,k,A,j)}if(Oe(A))return ge(M,k,A,j);if(me(A)){if(Me=me(A),typeof Me!="function")throw Error(d(150));return A=Me.call(A),Ae(M,k,A,j)}if(typeof A.then=="function")return pt(M,k,Ni(A),j);if(A.$$typeof===ae)return pt(M,k,Oi(M,A),j);ji(M,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,k!==null&&k.tag===6?(n(M,k.sibling),j=l(k,A),j.return=M,M=j):(n(M,k),j=ds(A,M.mode,j),j.return=M,M=j),c(M)):n(M,k)}return function(M,k,A,j){try{Eo=0;var Me=pt(M,k,A,j);return Hl=null,Me}catch(we){if(we===Ol||we===Ui)throw we;var tt=gn(29,we,null,M.mode);return tt.lanes=j,tt.return=M,tt}}}var rl=pd(!0),md=pd(!1),ka=!1;function ks(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ma(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(at&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=Ti(e),Iu(e,null,n),t}return Ai(e,a,t,n),Ti(e)}function To(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,mi(e,n)}}function Ms(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var c={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?l=o=c:o=o.next=c,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ds=!1;function Ro(){if(Ds){var e=_l;if(e!==null)throw e}}function Lo(e,t,n,a){Ds=!1;var l=e.updateQueue;ka=!1;var o=l.firstBaseUpdate,c=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var S=p,R=S.next;S.next=null,c===null?o=R:c.next=R,c=S;var N=e.alternate;N!==null&&(N=N.updateQueue,p=N.lastBaseUpdate,p!==c&&(p===null?N.firstBaseUpdate=R:p.next=R,N.lastBaseUpdate=S))}if(o!==null){var G=l.baseState;c=0,N=R=S=null,p=o;do{var L=p.lane&-536870913,O=L!==p.lane;if(O?(Fe&L)===L:(a&L)===L){L!==0&&L===Ll&&(Ds=!0),N!==null&&(N=N.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var ge=e,Ae=p;L=t;var pt=n;switch(Ae.tag){case 1:if(ge=Ae.payload,typeof ge=="function"){G=ge.call(pt,G,L);break e}G=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Ae.payload,L=typeof ge=="function"?ge.call(pt,G,L):ge,L==null)break e;G=z({},G,L);break e;case 2:ka=!0}}L=p.callback,L!==null&&(e.flags|=64,O&&(e.flags|=8192),O=l.callbacks,O===null?l.callbacks=[L]:O.push(L))}else O={lane:L,tag:p.tag,payload:p.payload,callback:p.callback,next:null},N===null?(R=N=O,S=G):N=N.next=O,c|=L;if(p=p.next,p===null){if(p=l.shared.pending,p===null)break;O=p,p=O.next,O.next=null,l.lastBaseUpdate=O,l.shared.pending=null}}while(!0);N===null&&(S=G),l.baseState=S,l.firstBaseUpdate=R,l.lastBaseUpdate=N,o===null&&(l.shared.lanes=0),Ra|=c,e.lanes=c,e.memoizedState=G}}function gd(e,t){if(typeof e!="function")throw Error(d(191,e));e.call(t)}function yd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)gd(n[e],t)}var Ul=x(null),qi=x(0);function bd(e,t){e=pa,ee(qi,e),ee(Ul,t),pa=e|t.baseLanes}function Es(){ee(qi,pa),ee(Ul,Ul.current)}function As(){pa=qi.current,_(Ul),_(qi)}var yn=x(null),Ln=null;function Da(e){var t=e.alternate;ee(_t,_t.current&1),ee(yn,e),Ln===null&&(t===null||Ul.current!==null||t.memoizedState!==null)&&(Ln=e)}function Ts(e){ee(_t,_t.current),ee(yn,e),Ln===null&&(Ln=e)}function vd(e){e.tag===22?(ee(_t,_t.current),ee(yn,e),Ln===null&&(Ln=e)):Ea()}function Ea(){ee(_t,_t.current),ee(yn,yn.current)}function bn(e){_(yn),Ln===e&&(Ln=null),_(_t)}var _t=x(0);function Yi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Uc(n)||Bc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ia=0,Xe=null,ft=null,Ut=null,Gi=!1,Bl=!1,sl=!1,Xi=0,_o=0,Nl=null,G0=0;function Et(){throw Error(d(321))}function Rs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mn(e[n],t[n]))return!1;return!0}function Ls(e,t,n,a,l,o){return ia=o,Xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,E.H=e===null||e.memoizedState===null?nf:Zs,sl=!1,o=n(a,l),sl=!1,Bl&&(o=Sd(t,n,a,l)),xd(e),o}function xd(e){E.H=Uo;var t=ft!==null&&ft.next!==null;if(ia=0,Ut=ft=Xe=null,Gi=!1,_o=0,Nl=null,t)throw Error(d(300));e===null||Bt||(e=e.dependencies,e!==null&&_i(e)&&(Bt=!0))}function Sd(e,t,n,a){Xe=e;var l=0;do{if(Bl&&(Nl=null),_o=0,Bl=!1,25<=l)throw Error(d(301));if(l+=1,Ut=ft=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}E.H=af,o=t(n,a)}while(Bl);return o}function X0(){var e=E.H,t=e.useState()[0];return t=typeof t.then=="function"?Oo(t):t,e=e.useState()[0],(ft!==null?ft.memoizedState:null)!==e&&(Xe.flags|=1024),t}function _s(){var e=Xi!==0;return Xi=0,e}function Os(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Hs(e){if(Gi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Gi=!1}ia=0,Ut=ft=Xe=null,Bl=!1,_o=Xi=0,Nl=null}function an(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?Xe.memoizedState=Ut=e:Ut=Ut.next=e,Ut}function Ot(){if(ft===null){var e=Xe.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=Ut===null?Xe.memoizedState:Ut.next;if(t!==null)Ut=t,ft=e;else{if(e===null)throw Xe.alternate===null?Error(d(467)):Error(d(310));ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},Ut===null?Xe.memoizedState=Ut=e:Ut=Ut.next=e}return Ut}function Vi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=_o;return _o+=1,Nl===null&&(Nl=[]),e=dd(Nl,e,t),t=Xe,(Ut===null?t.memoizedState:Ut.next)===null&&(t=t.alternate,E.H=t===null||t.memoizedState===null?nf:Zs),e}function Qi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Oo(e);if(e.$$typeof===ae)return Zt(e)}throw Error(d(438,String(e)))}function Us(e){var t=null,n=Xe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Xe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Vi(),Xe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=Z;return t.index++,n}function ra(e,t){return typeof t=="function"?t(e):t}function Ki(e){var t=Ot();return Bs(t,ft,e)}function Bs(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 c=l.next;l.next=o.next,o.next=c}t.baseQueue=l=o,a.pending=null}if(o=e.baseState,l===null)e.memoizedState=o;else{t=l.next;var p=c=null,S=null,R=t,N=!1;do{var G=R.lane&-536870913;if(G!==R.lane?(Fe&G)===G:(ia&G)===G){var L=R.revertLane;if(L===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),G===Ll&&(N=!0);else if((ia&L)===L){R=R.next,L===Ll&&(N=!0);continue}else G={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(p=S=G,c=o):S=S.next=G,Xe.lanes|=L,Ra|=L;G=R.action,sl&&n(o,G),o=R.hasEagerState?R.eagerState:n(o,G)}else L={lane:G,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(p=S=L,c=o):S=S.next=L,Xe.lanes|=G,Ra|=G;R=R.next}while(R!==null&&R!==t);if(S===null?c=o:S.next=p,!mn(o,e.memoizedState)&&(Bt=!0,N&&(n=_l,n!==null)))throw n;e.memoizedState=o,e.baseState=c,e.baseQueue=S,a.lastRenderedState=o}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ns(e){var t=Ot(),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 c=l=l.next;do o=e(o,c.action),c=c.next;while(c!==l);mn(o,t.memoizedState)||(Bt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,a]}function Cd(e,t,n){var a=Xe,l=Ot(),o=$e;if(o){if(n===void 0)throw Error(d(407));n=n()}else n=t();var c=!mn((ft||l).memoizedState,n);if(c&&(l.memoizedState=n,Bt=!0),l=l.queue,Ys(zd.bind(null,a,l,e),[e]),l.getSnapshot!==t||c||Ut!==null&&Ut.memoizedState.tag&1){if(a.flags|=2048,jl(9,{destroy:void 0},kd.bind(null,a,l,n,t),null),yt===null)throw Error(d(349));o||(ia&127)!==0||wd(a,t,n)}return n}function wd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Xe.updateQueue,t===null?(t=Vi(),Xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kd(e,t,n,a){t.value=n,t.getSnapshot=a,Md(t)&&Dd(e)}function zd(e,t,n){return n(function(){Md(t)&&Dd(e)})}function Md(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mn(e,n)}catch{return!0}}function Dd(e){var t=Pa(e,2);t!==null&&dn(t,e,2)}function js(e){var t=an();if(typeof e=="function"){var n=e;if(e=n(),sl){xt(!0);try{n()}finally{xt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function Ed(e,t,n,a){return e.baseState=n,Bs(e,ft,typeof a=="function"?a:ra)}function V0(e,t,n,a,l){if(Ji(e))throw Error(d(485));if(e=t.action,e!==null){var o={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){o.listeners.push(c)}};E.T!==null?n(!0):o.isTransition=!1,a(o),n=t.pending,n===null?(o.next=t.pending=o,Ad(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ad(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var o=E.T,c={};E.T=c;try{var p=n(l,a),S=E.S;S!==null&&S(c,p),Td(e,t,p)}catch(R){qs(e,t,R)}finally{o!==null&&c.types!==null&&(o.types=c.types),E.T=o}}else try{o=n(l,a),Td(e,t,o)}catch(R){qs(e,t,R)}}function Td(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Rd(e,t,a)},function(a){return qs(e,t,a)}):Rd(e,t,n)}function Rd(e,t,n){t.status="fulfilled",t.value=n,Ld(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ad(e,n)))}function qs(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Ld(t),t=t.next;while(t!==a)}e.action=null}function Ld(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _d(e,t){return t}function Od(e,t){if($e){var n=yt.formState;if(n!==null){e:{var a=Xe;if($e){if(St){t:{for(var l=St,o=Rn;l.nodeType!==8;){if(!o){l=null;break t}if(l=_n(l.nextSibling),l===null){l=null;break t}}o=l.data,l=o==="F!"||o==="F"?l:null}if(l){St=_n(l.nextSibling),a=l.data==="F!";break e}}Ca(a)}a=!1}a&&(t=n[0])}}return n=an(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_d,lastRenderedState:t},n.queue=a,n=Pd.bind(null,Xe,a),a.dispatch=n,a=js(!1),o=Ks.bind(null,Xe,!1,a.queue),a=an(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=V0.bind(null,Xe,l,o,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Hd(e){var t=Ot();return Ud(t,ft,e)}function Ud(e,t,n){if(t=Bs(e,t,_d)[0],e=Ki(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Oo(t)}catch(c){throw c===Ol?Ui:c}else a=t;t=Ot();var l=t.queue,o=l.dispatch;return n!==t.memoizedState&&(Xe.flags|=2048,jl(9,{destroy:void 0},Q0.bind(null,l,n),null)),[a,o,e]}function Q0(e,t){e.action=t}function Bd(e){var t=Ot(),n=ft;if(n!==null)return Ud(t,n,e);Ot(),t=t.memoizedState,n=Ot();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function jl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Xe.updateQueue,t===null&&(t=Vi(),Xe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Nd(){return Ot().memoizedState}function Zi(e,t,n,a){var l=an();Xe.flags|=e,l.memoizedState=jl(1|t,{destroy:void 0},n,a===void 0?null:a)}function Fi(e,t,n,a){var l=Ot();a=a===void 0?null:a;var o=l.memoizedState.inst;ft!==null&&a!==null&&Rs(a,ft.memoizedState.deps)?l.memoizedState=jl(t,o,n,a):(Xe.flags|=e,l.memoizedState=jl(1|t,o,n,a))}function jd(e,t){Zi(8390656,8,e,t)}function Ys(e,t){Fi(2048,8,e,t)}function K0(e){Xe.flags|=4;var t=Xe.updateQueue;if(t===null)t=Vi(),Xe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function qd(e){var t=Ot().memoizedState;return K0({ref:t,nextImpl:e}),function(){if((at&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function Yd(e,t){return Fi(4,2,e,t)}function Gd(e,t){return Fi(4,4,e,t)}function Xd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vd(e,t,n){n=n!=null?n.concat([e]):null,Fi(4,4,Xd.bind(null,t,e),n)}function Gs(){}function Qd(e,t){var n=Ot();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Rs(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Kd(e,t){var n=Ot();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Rs(t,a[1]))return a[0];if(a=e(),sl){xt(!0);try{e()}finally{xt(!1)}}return n.memoizedState=[a,t],a}function Xs(e,t,n){return n===void 0||(ia&1073741824)!==0&&(Fe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ff(),Xe.lanes|=e,Ra|=e,n)}function Zd(e,t,n,a){return mn(n,t)?n:Ul.current!==null?(e=Xs(e,n,a),mn(e,t)||(Bt=!0),e):(ia&42)===0||(ia&1073741824)!==0&&(Fe&261930)===0?(Bt=!0,e.memoizedState=n):(e=Ff(),Xe.lanes|=e,Ra|=e,t)}function Fd(e,t,n,a,l){var o=$.p;$.p=o!==0&&8>o?o:8;var c=E.T,p={};E.T=p,Ks(e,!1,t,n);try{var S=l(),R=E.S;if(R!==null&&R(p,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var N=Y0(S,a);Ho(e,t,N,Sn(e))}else Ho(e,t,a,Sn(e))}catch(G){Ho(e,t,{then:function(){},status:"rejected",reason:G},Sn())}finally{$.p=o,c!==null&&p.types!==null&&(c.types=p.types),E.T=c}}function Z0(){}function Vs(e,t,n,a){if(e.tag!==5)throw Error(d(476));var l=Jd(e).queue;Fd(e,l,t,W,n===null?Z0:function(){return $d(e),n(a)})}function Jd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:W},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $d(e){var t=Jd(e);t.next===null&&(t=e.alternate.memoizedState),Ho(e,t.next.queue,{},Sn())}function Qs(){return Zt(Io)}function Wd(){return Ot().memoizedState}function Id(){return Ot().memoizedState}function F0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Sn();e=za(n);var a=Ma(t,e,n);a!==null&&(dn(a,t,n),To(a,t,n)),t={cache:xs()},e.payload=t;return}t=t.return}}function J0(e,t,n){var a=Sn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ji(e)?ef(t,n):(n=cs(e,t,n,a),n!==null&&(dn(n,e,a),tf(n,t,a)))}function Pd(e,t,n){var a=Sn();Ho(e,t,n,a)}function Ho(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ji(e))ef(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var c=t.lastRenderedState,p=o(c,n);if(l.hasEagerState=!0,l.eagerState=p,mn(p,c))return Ai(e,t,l,0),yt===null&&Ei(),!1}catch{}if(n=cs(e,t,l,a),n!==null)return dn(n,e,a),tf(n,t,a),!0}return!1}function Ks(e,t,n,a){if(a={lane:2,revertLane:kc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ji(e)){if(t)throw Error(d(479))}else t=cs(e,n,a,2),t!==null&&dn(t,e,2)}function Ji(e){var t=e.alternate;return e===Xe||t!==null&&t===Xe}function ef(e,t){Bl=Gi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tf(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,mi(e,n)}}var Uo={readContext:Zt,use:Qi,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};Uo.useEffectEvent=Et;var nf={readContext:Zt,use:Qi,useCallback:function(e,t){return an().memoizedState=[e,t===void 0?null:t],e},useContext:Zt,useEffect:jd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Zi(4194308,4,Xd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zi(4194308,4,e,t)},useInsertionEffect:function(e,t){Zi(4,2,e,t)},useMemo:function(e,t){var n=an();t=t===void 0?null:t;var a=e();if(sl){xt(!0);try{e()}finally{xt(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=an();if(n!==void 0){var l=n(t);if(sl){xt(!0);try{n(t)}finally{xt(!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=J0.bind(null,Xe,e),[a.memoizedState,e]},useRef:function(e){var t=an();return e={current:e},t.memoizedState=e},useState:function(e){e=js(e);var t=e.queue,n=Pd.bind(null,Xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){var n=an();return Xs(n,e,t)},useTransition:function(){var e=js(!1);return e=Fd.bind(null,Xe,e.queue,!0,!1),an().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Xe,l=an();if($e){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),yt===null)throw Error(d(349));(Fe&127)!==0||wd(a,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,jd(zd.bind(null,a,o,e),[e]),a.flags|=2048,jl(9,{destroy:void 0},kd.bind(null,a,o,n,t),null),n},useId:function(){var e=an(),t=yt.identifierPrefix;if($e){var n=Vn,a=Xn;n=(a&~(1<<32-gt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Xi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=G0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qs,useFormState:Od,useActionState:Od,useOptimistic:function(e){var t=an();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ks.bind(null,Xe,!0,n),n.dispatch=t,[e,t]},useMemoCache:Us,useCacheRefresh:function(){return an().memoizedState=F0.bind(null,Xe)},useEffectEvent:function(e){var t=an(),n={impl:e};return t.memoizedState=n,function(){if((at&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},Zs={readContext:Zt,use:Qi,useCallback:Qd,useContext:Zt,useEffect:Ys,useImperativeHandle:Vd,useInsertionEffect:Yd,useLayoutEffect:Gd,useMemo:Kd,useReducer:Ki,useRef:Nd,useState:function(){return Ki(ra)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=Ot();return Zd(n,ft.memoizedState,e,t)},useTransition:function(){var e=Ki(ra)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Oo(e),t]},useSyncExternalStore:Cd,useId:Wd,useHostTransitionStatus:Qs,useFormState:Hd,useActionState:Hd,useOptimistic:function(e,t){var n=Ot();return Ed(n,ft,e,t)},useMemoCache:Us,useCacheRefresh:Id};Zs.useEffectEvent=qd;var af={readContext:Zt,use:Qi,useCallback:Qd,useContext:Zt,useEffect:Ys,useImperativeHandle:Vd,useInsertionEffect:Yd,useLayoutEffect:Gd,useMemo:Kd,useReducer:Ns,useRef:Nd,useState:function(){return Ns(ra)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=Ot();return ft===null?Xs(n,e,t):Zd(n,ft.memoizedState,e,t)},useTransition:function(){var e=Ns(ra)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:Oo(e),t]},useSyncExternalStore:Cd,useId:Wd,useHostTransitionStatus:Qs,useFormState:Bd,useActionState:Bd,useOptimistic:function(e,t){var n=Ot();return ft!==null?Ed(n,ft,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Us,useCacheRefresh:Id};af.useEffectEvent=qd;function Fs(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:z({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Sn(),l=za(a);l.payload=t,n!=null&&(l.callback=n),t=Ma(e,l,a),t!==null&&(dn(t,e,a),To(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Sn(),l=za(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Ma(e,l,a),t!==null&&(dn(t,e,a),To(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Sn(),a=za(n);a.tag=2,t!=null&&(a.callback=t),t=Ma(e,a,n),t!==null&&(dn(t,e,n),To(t,e,n))}};function lf(e,t,n,a,l,o,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,o,c):t.prototype&&t.prototype.isPureReactComponent?!Co(n,a)||!Co(l,o):!0}function of(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Js.enqueueReplaceState(t,t.state,null)}function cl(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=z({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function rf(e){Di(e)}function sf(e){console.error(e)}function cf(e){Di(e)}function $i(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function uf(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function $s(e,t,n){return n=za(n),n.tag=3,n.payload={element:null},n.callback=function(){$i(e,t)},n}function df(e){return e=za(e),e.tag=3,e}function ff(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var o=a.value;e.payload=function(){return l(o)},e.callback=function(){uf(t,n,a)}}var c=n.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){uf(t,n,a),typeof l!="function"&&(La===null?La=new Set([this]):La.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function $0(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Rl(t,n,l,!0),n=yn.current,n!==null){switch(n.tag){case 31:case 13:return Ln===null?sr():n.alternate===null&&At===0&&(At=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Bi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Sc(e,a,l)),!1;case 22:return n.flags|=65536,a===Bi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Sc(e,a,l)),!1}throw Error(d(435,n.tag))}return Sc(e,a,l),sr(),!1}if($e)return t=yn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==ms&&(e=Error(d(422),{cause:a}),zo(En(e,n)))):(a!==ms&&(t=Error(d(423),{cause:a}),zo(En(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=En(a,n),l=$s(e.stateNode,a,l),Ms(e,l),At!==4&&(At=2)),!1;var o=Error(d(520),{cause:a});if(o=En(o,n),Vo===null?Vo=[o]:Vo.push(o),At!==4&&(At=2),t===null)return!0;a=En(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=$s(n.stateNode,a,e),Ms(n,e),!1;case 1:if(t=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(La===null||!La.has(o))))return n.flags|=65536,l&=-l,n.lanes|=l,l=df(l),ff(l,e,n,a),Ms(n,l),!1}n=n.return}while(n!==null);return!1}var Ws=Error(d(461)),Bt=!1;function Ft(e,t,n,a){t.child=e===null?md(t,null,n,a):rl(t,e.child,n,a)}function hf(e,t,n,a,l){n=n.render;var o=t.ref;if("ref"in a){var c={};for(var p in a)p!=="ref"&&(c[p]=a[p])}else c=a;return al(t),a=Ls(e,t,n,c,o,l),p=_s(),e!==null&&!Bt?(Os(e,t,l),sa(e,t,l)):($e&&p&&hs(t),t.flags|=1,Ft(e,t,a,l),t.child)}function pf(e,t,n,a,l){if(e===null){var o=n.type;return typeof o=="function"&&!us(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,mf(e,t,o,a,l)):(e=Ri(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!oc(e,l)){var c=o.memoizedProps;if(n=n.compare,n=n!==null?n:Co,n(c,a)&&e.ref===t.ref)return sa(e,t,l)}return t.flags|=1,e=na(o,a),e.ref=t.ref,e.return=t,t.child=e}function mf(e,t,n,a,l){if(e!==null){var o=e.memoizedProps;if(Co(o,a)&&e.ref===t.ref)if(Bt=!1,t.pendingProps=a=o,oc(e,l))(e.flags&131072)!==0&&(Bt=!0);else return t.lanes=e.lanes,sa(e,t,l)}return Is(e,t,n,a,l)}function gf(e,t,n,a){var l=a.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|n:n,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;a=l&~o}else a=0,t.child=null;return yf(e,t,o,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hi(t,o!==null?o.cachePool:null),o!==null?bd(t,o):Es(),vd(t);else return a=t.lanes=536870912,yf(e,t,o!==null?o.baseLanes|n:n,n,a)}else o!==null?(Hi(t,o.cachePool),bd(t,o),Ea(),t.memoizedState=null):(e!==null&&Hi(t,null),Es(),Ea());return Ft(e,t,l,n),t.child}function Bo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function yf(e,t,n,a,l){var o=Cs();return o=o===null?null:{parent:Ht._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&Hi(t,null),Es(),vd(t),e!==null&&Rl(e,t,a,!0),t.childLanes=l,null}function Wi(e,t){return t=Pi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bf(e,t,n){return rl(t,e.child,null,n),e=Wi(t,t.pendingProps),e.flags|=2,bn(t),t.memoizedState=null,e}function W0(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if($e){if(a.mode==="hidden")return e=Wi(t,a),t.lanes=536870912,Bo(null,e);if(Ts(t),(e=St)?(e=Th(e,Rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Xn,overflow:Vn}:null,retryLane:536870912,hydrationErrors:null},n=ed(e),n.return=t,t.child=n,Kt=t,St=null)):e=null,e===null)throw Ca(t);return t.lanes=536870912,null}return Wi(t,a)}var o=e.memoizedState;if(o!==null){var c=o.dehydrated;if(Ts(t),l)if(t.flags&256)t.flags&=-257,t=bf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(d(558));else if(Bt||Rl(e,t,n,!1),l=(n&e.childLanes)!==0,Bt||l){if(a=yt,a!==null&&(c=co(a,n),c!==0&&c!==o.retryLane))throw o.retryLane=c,Pa(e,c),dn(a,e,c),Ws;sr(),t=bf(e,t,n)}else e=o.treeContext,St=_n(c.nextSibling),Kt=t,$e=!0,Sa=null,Rn=!1,e!==null&&ad(t,e),t=Wi(t,a),t.flags|=4096;return t}return e=na(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ii(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 Is(e,t,n,a,l){return al(t),n=Ls(e,t,n,a,void 0,l),a=_s(),e!==null&&!Bt?(Os(e,t,l),sa(e,t,l)):($e&&a&&hs(t),t.flags|=1,Ft(e,t,n,l),t.child)}function vf(e,t,n,a,l,o){return al(t),t.updateQueue=null,n=Sd(t,a,n,l),xd(e),a=_s(),e!==null&&!Bt?(Os(e,t,o),sa(e,t,o)):($e&&a&&hs(t),t.flags|=1,Ft(e,t,n,o),t.child)}function xf(e,t,n,a,l){if(al(t),t.stateNode===null){var o=Dl,c=n.contextType;typeof c=="object"&&c!==null&&(o=Zt(c)),o=new n(a,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Js,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=a,o.state=t.memoizedState,o.refs={},ks(t),c=n.contextType,o.context=typeof c=="object"&&c!==null?Zt(c):Dl,o.state=t.memoizedState,c=n.getDerivedStateFromProps,typeof c=="function"&&(Fs(t,n,c,a),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(c=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),c!==o.state&&Js.enqueueReplaceState(o,o.state,null),Lo(t,a,o,l),Ro(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){o=t.stateNode;var p=t.memoizedProps,S=cl(n,p);o.props=S;var R=o.context,N=n.contextType;c=Dl,typeof N=="object"&&N!==null&&(c=Zt(N));var G=n.getDerivedStateFromProps;N=typeof G=="function"||typeof o.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,N||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(p||R!==c)&&of(t,o,a,c),ka=!1;var L=t.memoizedState;o.state=L,Lo(t,a,o,l),Ro(),R=t.memoizedState,p||L!==R||ka?(typeof G=="function"&&(Fs(t,n,G,a),R=t.memoizedState),(S=ka||lf(t,n,S,a,L,R,c))?(N||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=R),o.props=a,o.state=R,o.context=c,a=S):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{o=t.stateNode,zs(e,t),c=t.memoizedProps,N=cl(n,c),o.props=N,G=t.pendingProps,L=o.context,R=n.contextType,S=Dl,typeof R=="object"&&R!==null&&(S=Zt(R)),p=n.getDerivedStateFromProps,(R=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(c!==G||L!==S)&&of(t,o,a,S),ka=!1,L=t.memoizedState,o.state=L,Lo(t,a,o,l),Ro();var O=t.memoizedState;c!==G||L!==O||ka||e!==null&&e.dependencies!==null&&_i(e.dependencies)?(typeof p=="function"&&(Fs(t,n,p,a),O=t.memoizedState),(N=ka||lf(t,n,N,a,L,O,S)||e!==null&&e.dependencies!==null&&_i(e.dependencies))?(R||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(a,O,S),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(a,O,S)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||c===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),o.props=a,o.state=O,o.context=S,a=N):(typeof o.componentDidUpdate!="function"||c===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),a=!1)}return o=a,Ii(e,t),a=(t.flags&128)!==0,o||a?(o=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&a?(t.child=rl(t,e.child,null,l),t.child=rl(t,null,n,l)):Ft(e,t,n,l),t.memoizedState=o.state,e=t.child):e=sa(e,t,l),e}function Sf(e,t,n,a){return tl(),t.flags|=256,Ft(e,t,n,a),t.child}var Ps={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ec(e){return{baseLanes:e,cachePool:cd()}}function tc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=xn),e}function Cf(e,t,n){var a=t.pendingProps,l=!1,o=(t.flags&128)!==0,c;if((c=o)||(c=e!==null&&e.memoizedState===null?!1:(_t.current&2)!==0),c&&(l=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if($e){if(l?Da(t):Ea(),(e=St)?(e=Th(e,Rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Xn,overflow:Vn}:null,retryLane:536870912,hydrationErrors:null},n=ed(e),n.return=t,t.child=n,Kt=t,St=null)):e=null,e===null)throw Ca(t);return Bc(e)?t.lanes=32:t.lanes=536870912,null}var p=a.children;return a=a.fallback,l?(Ea(),l=t.mode,p=Pi({mode:"hidden",children:p},l),a=el(a,l,n,null),p.return=t,a.return=t,p.sibling=a,t.child=p,a=t.child,a.memoizedState=ec(n),a.childLanes=tc(e,c,n),t.memoizedState=Ps,Bo(null,a)):(Da(t),nc(t,p))}var S=e.memoizedState;if(S!==null&&(p=S.dehydrated,p!==null)){if(o)t.flags&256?(Da(t),t.flags&=-257,t=ac(e,t,n)):t.memoizedState!==null?(Ea(),t.child=e.child,t.flags|=128,t=null):(Ea(),p=a.fallback,l=t.mode,a=Pi({mode:"visible",children:a.children},l),p=el(p,l,n,null),p.flags|=2,a.return=t,p.return=t,a.sibling=p,t.child=a,rl(t,e.child,null,n),a=t.child,a.memoizedState=ec(n),a.childLanes=tc(e,c,n),t.memoizedState=Ps,t=Bo(null,a));else if(Da(t),Bc(p)){if(c=p.nextSibling&&p.nextSibling.dataset,c)var R=c.dgst;c=R,a=Error(d(419)),a.stack="",a.digest=c,zo({value:a,source:null,stack:null}),t=ac(e,t,n)}else if(Bt||Rl(e,t,n,!1),c=(n&e.childLanes)!==0,Bt||c){if(c=yt,c!==null&&(a=co(c,n),a!==0&&a!==S.retryLane))throw S.retryLane=a,Pa(e,a),dn(c,e,a),Ws;Uc(p)||sr(),t=ac(e,t,n)}else Uc(p)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,St=_n(p.nextSibling),Kt=t,$e=!0,Sa=null,Rn=!1,e!==null&&ad(t,e),t=nc(t,a.children),t.flags|=4096);return t}return l?(Ea(),p=a.fallback,l=t.mode,S=e.child,R=S.sibling,a=na(S,{mode:"hidden",children:a.children}),a.subtreeFlags=S.subtreeFlags&65011712,R!==null?p=na(R,p):(p=el(p,l,n,null),p.flags|=2),p.return=t,a.return=t,a.sibling=p,t.child=a,Bo(null,a),a=t.child,p=e.child.memoizedState,p===null?p=ec(n):(l=p.cachePool,l!==null?(S=Ht._currentValue,l=l.parent!==S?{parent:S,pool:S}:l):l=cd(),p={baseLanes:p.baseLanes|n,cachePool:l}),a.memoizedState=p,a.childLanes=tc(e,c,n),t.memoizedState=Ps,Bo(e.child,a)):(Da(t),n=e.child,e=n.sibling,n=na(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=n,t.memoizedState=null,n)}function nc(e,t){return t=Pi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Pi(e,t){return e=gn(22,e,null,t),e.lanes=0,e}function ac(e,t,n){return rl(t,e.child,null,n),e=nc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),bs(e.return,t,n)}function lc(e,t,n,a,l,o){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:o}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=n,c.tailMode=l,c.treeForkCount=o)}function kf(e,t,n){var a=t.pendingProps,l=a.revealOrder,o=a.tail;a=a.children;var c=_t.current,p=(c&2)!==0;if(p?(c=c&1|2,t.flags|=128):c&=1,ee(_t,c),Ft(e,t,a,n),a=$e?ko:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wf(e,n,t);else if(e.tag===19)wf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Yi(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),lc(t,!1,l,n,o,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Yi(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}lc(t,!0,n,null,o,a);break;case"together":lc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function sa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ra|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Rl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(d(153));if(t.child!==null){for(e=t.child,n=na(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=na(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function oc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_i(e)))}function I0(e,t,n){switch(t.tag){case 3:Ye(t,t.stateNode.containerInfo),wa(t,Ht,e.memoizedState.cache),tl();break;case 27:case 5:Rt(t);break;case 4:Ye(t,t.stateNode.containerInfo);break;case 10:wa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ts(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Da(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Cf(e,t,n):(Da(t),e=sa(e,t,n),e!==null?e.sibling:null);Da(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Rl(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return kf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ee(_t,_t.current),a)break;return null;case 22:return t.lanes=0,gf(e,t,n,t.pendingProps);case 24:wa(t,Ht,e.memoizedState.cache)}return sa(e,t,n)}function zf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Bt=!0;else{if(!oc(e,n)&&(t.flags&128)===0)return Bt=!1,I0(e,t,n);Bt=(e.flags&131072)!==0}else Bt=!1,$e&&(t.flags&1048576)!==0&&nd(t,ko,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ol(t.elementType),t.type=e,typeof e=="function")us(e)?(a=cl(e,a),t.tag=1,t=xf(null,t,e,a,n)):(t.tag=0,t=Is(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===de){t.tag=11,t=hf(null,t,e,a,n);break e}else if(l===I){t.tag=14,t=pf(null,t,e,a,n);break e}}throw t=ne(e)||e,Error(d(306,t,""))}}return t;case 0:return Is(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=cl(a,t.pendingProps),xf(e,t,a,l,n);case 3:e:{if(Ye(t,t.stateNode.containerInfo),e===null)throw Error(d(387));a=t.pendingProps;var o=t.memoizedState;l=o.element,zs(e,t),Lo(t,a,null,n);var c=t.memoizedState;if(a=c.cache,wa(t,Ht,a),a!==o.cache&&vs(t,[Ht],n,!0),Ro(),a=c.element,o.isDehydrated)if(o={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sf(e,t,a,n);break e}else if(a!==l){l=En(Error(d(424)),t),zo(l),t=Sf(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,St=_n(e.firstChild),Kt=t,$e=!0,Sa=null,Rn=!0,n=md(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(tl(),a===l){t=sa(e,t,n);break e}Ft(e,t,a,n)}t=t.child}return t;case 26:return Ii(e,t),e===null?(n=Uh(t.type,null,t.pendingProps,null))?t.memoizedState=n:$e||(n=t.type,e=t.pendingProps,a=mr(K.current).createElement(n),a[kt]=t,a[Lt]=e,Jt(a,n,e),be(a),t.stateNode=a):t.memoizedState=Uh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Rt(t),e===null&&$e&&(a=t.stateNode=_h(t.type,t.pendingProps,K.current),Kt=t,Rn=!0,l=St,Ua(t.type)?(Nc=l,St=_n(a.firstChild)):St=l),Ft(e,t,t.pendingProps.children,n),Ii(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&$e&&((l=a=St)&&(a=Em(a,t.type,t.pendingProps,Rn),a!==null?(t.stateNode=a,Kt=t,St=_n(a.firstChild),Rn=!1,l=!0):l=!1),l||Ca(t)),Rt(t),l=t.type,o=t.pendingProps,c=e!==null?e.memoizedProps:null,a=o.children,_c(l,o)?a=null:c!==null&&_c(l,c)&&(t.flags|=32),t.memoizedState!==null&&(l=Ls(e,t,X0,null,null,n),Io._currentValue=l),Ii(e,t),Ft(e,t,a,n),t.child;case 6:return e===null&&$e&&((e=n=St)&&(n=Am(n,t.pendingProps,Rn),n!==null?(t.stateNode=n,Kt=t,St=null,e=!0):e=!1),e||Ca(t)),null;case 13:return Cf(e,t,n);case 4:return Ye(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=rl(t,null,a,n):Ft(e,t,a,n),t.child;case 11:return hf(e,t,t.type,t.pendingProps,n);case 7:return Ft(e,t,t.pendingProps,n),t.child;case 8:return Ft(e,t,t.pendingProps.children,n),t.child;case 12:return Ft(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,wa(t,t.type,a.value),Ft(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,al(t),l=Zt(l),a=a(l),t.flags|=1,Ft(e,t,a,n),t.child;case 14:return pf(e,t,t.type,t.pendingProps,n);case 15:return mf(e,t,t.type,t.pendingProps,n);case 19:return kf(e,t,n);case 31:return W0(e,t,n);case 22:return gf(e,t,n,t.pendingProps);case 24:return al(t),a=Zt(Ht),e===null?(l=Cs(),l===null&&(l=yt,o=xs(),l.pooledCache=o,o.refCount++,o!==null&&(l.pooledCacheLanes|=n),l=o),t.memoizedState={parent:a,cache:l},ks(t),wa(t,Ht,l)):((e.lanes&n)!==0&&(zs(e,t),Lo(t,null,null,n),Ro()),l=e.memoizedState,o=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),wa(t,Ht,a)):(a=o.cache,wa(t,Ht,a),a!==l.cache&&vs(t,[Ht],n,!0))),Ft(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function ca(e){e.flags|=4}function ic(e,t,n,a,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(If())e.flags|=8192;else throw il=Bi,ws}else e.flags&=-16777217}function Mf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Yh(t))if(If())e.flags|=8192;else throw il=Bi,ws}function er(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hi():536870912,e.lanes|=t,Xl|=t)}function No(e,t){if(!$e)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 Ct(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 P0(e,t,n){var a=t.pendingProps;switch(ps(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(t),null;case 1:return Ct(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),oa(Ht),ze(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Tl(t)?ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gs())),Ct(t),null;case 26:var l=t.type,o=t.memoizedState;return e===null?(ca(t),o!==null?(Ct(t),Mf(t,o)):(Ct(t),ic(t,l,null,a,n))):o?o!==e.memoizedState?(ca(t),Ct(t),Mf(t,o)):(Ct(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ca(t),Ct(t),ic(t,l,e,a,n)),null;case 27:if(Ze(t),n=K.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 Ct(t),null}e=oe.current,Tl(t)?ld(t):(e=_h(l,a,n),t.stateNode=e,ca(t))}return Ct(t),null;case 5:if(Ze(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 Ct(t),null}if(o=oe.current,Tl(t))ld(t);else{var c=mr(K.current);switch(o){case 1:o=c.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:o=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":o=c.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":o=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":o=c.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?o.multiple=!0:a.size&&(o.size=a.size);break;default:o=typeof a.is=="string"?c.createElement(l,{is:a.is}):c.createElement(l)}}o[kt]=t,o[Lt]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)o.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=o;e:switch(Jt(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 Ct(t),ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ca(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(e=K.current,Tl(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=Kt,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[kt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Ch(e.nodeValue,n)),e||Ca(t,!0)}else e=mr(e).createTextNode(a),e[kt]=t,t.stateNode=e}return Ct(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Tl(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[kt]=t}else tl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ct(t),e=!1}else n=gs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(bn(t),t):(bn(t),null);if((t.flags&128)!==0)throw Error(d(558))}return Ct(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Tl(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[kt]=t}else tl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ct(t),l=!1}else l=gs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(bn(t),t):(bn(t),null)}return bn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),er(t,t.updateQueue),Ct(t),null);case 4:return ze(),e===null&&Ec(t.stateNode.containerInfo),Ct(t),null;case 10:return oa(t.type),Ct(t),null;case 19:if(_(_t),a=t.memoizedState,a===null)return Ct(t),null;if(l=(t.flags&128)!==0,o=a.rendering,o===null)if(l)No(a,!1);else{if(At!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Yi(e),o!==null){for(t.flags|=128,No(a,!1),e=o.updateQueue,t.updateQueue=e,er(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Pu(n,e),n=n.sibling;return ee(_t,_t.current&1|2),$e&&aa(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Dt()>or&&(t.flags|=128,l=!0,No(a,!1),t.lanes=4194304)}else{if(!l)if(e=Yi(o),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,er(t,e),No(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!$e)return Ct(t),null}else 2*Dt()-a.renderingStartTime>or&&n!==536870912&&(t.flags|=128,l=!0,No(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(e=a.last,e!==null?e.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Dt(),e.sibling=null,n=_t.current,ee(_t,l?n&1|2:n&1),$e&&aa(t,a.treeForkCount),e):(Ct(t),null);case 22:case 23:return bn(t),As(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Ct(t),t.subtreeFlags&6&&(t.flags|=8192)):Ct(t),n=t.updateQueue,n!==null&&er(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&_(ll),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),oa(Ht),Ct(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function em(e,t){switch(ps(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(Ht),ze(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ze(t),null;case 31:if(t.memoizedState!==null){if(bn(t),t.alternate===null)throw Error(d(340));tl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(bn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));tl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _(_t),null;case 4:return ze(),null;case 10:return oa(t.type),null;case 22:case 23:return bn(t),As(),e!==null&&_(ll),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(Ht),null;case 25:return null;default:return null}}function Df(e,t){switch(ps(t),t.tag){case 3:oa(Ht),ze();break;case 26:case 27:case 5:Ze(t);break;case 4:ze();break;case 31:t.memoizedState!==null&&bn(t);break;case 13:bn(t);break;case 19:_(_t);break;case 10:oa(t.type);break;case 22:case 23:bn(t),As(),e!==null&&_(ll);break;case 24:oa(Ht)}}function jo(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&e)===e){a=void 0;var o=n.create,c=n.inst;a=o(),c.destroy=a}n=n.next}while(n!==l)}}catch(p){ct(t,t.return,p)}}function Aa(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){var c=a.inst,p=c.destroy;if(p!==void 0){c.destroy=void 0,l=t;var S=n,R=p;try{R()}catch(N){ct(l,S,N)}}}a=a.next}while(a!==o)}}catch(N){ct(t,t.return,N)}}function Ef(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{yd(t,n)}catch(a){ct(e,e.return,a)}}}function Af(e,t,n){n.props=cl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){ct(e,t,a)}}function qo(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(l){ct(e,t,l)}}function Qn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){ct(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){ct(e,t,l)}else n.current=null}function Tf(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){ct(e,e.return,l)}}function rc(e,t,n){try{var a=e.stateNode;Cm(a,e.type,n,t),a[Lt]=t}catch(l){ct(e,e.return,l)}}function Rf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ua(e.type)||e.tag===4}function sc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ua(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function cc(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ea));else if(a!==4&&(a===27&&Ua(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(cc(e,t,n),e=e.sibling;e!==null;)cc(e,t,n),e=e.sibling}function tr(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Ua(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(tr(e,t,n),e=e.sibling;e!==null;)tr(e,t,n),e=e.sibling}function Lf(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Jt(t,a,n),t[kt]=e,t[Lt]=n}catch(o){ct(e,e.return,o)}}var ua=!1,Nt=!1,uc=!1,_f=typeof WeakSet=="function"?WeakSet:Set,Vt=null;function tm(e,t){if(e=e.containerInfo,Rc=Cr,e=Vu(e),as(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var l=a.anchorOffset,o=a.focusNode;a=a.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var c=0,p=-1,S=-1,R=0,N=0,G=e,L=null;t:for(;;){for(var O;G!==n||l!==0&&G.nodeType!==3||(p=c+l),G!==o||a!==0&&G.nodeType!==3||(S=c+a),G.nodeType===3&&(c+=G.nodeValue.length),(O=G.firstChild)!==null;)L=G,G=O;for(;;){if(G===e)break t;if(L===n&&++R===l&&(p=c),L===o&&++N===a&&(S=c),(O=G.nextSibling)!==null)break;G=L,L=G.parentNode}G=O}n=p===-1||S===-1?null:{start:p,end:S}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lc={focusedElem:e,selectionRange:n},Cr=!1,Vt=t;Vt!==null;)if(t=Vt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Vt=e;else for(;Vt!==null;){switch(t=Vt,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 ge=cl(n.type,l);e=a.getSnapshotBeforeUpdate(ge,o),a.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){ct(n,n.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Hc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(d(163))}if(e=t.sibling,e!==null){e.return=t.return,Vt=e;break}Vt=t.return}}function Of(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:fa(e,n),a&4&&jo(5,n);break;case 1:if(fa(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(c){ct(n,n.return,c)}else{var l=cl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){ct(n,n.return,c)}}a&64&&Ef(n),a&512&&qo(n,n.return);break;case 3:if(fa(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{yd(e,t)}catch(c){ct(n,n.return,c)}}break;case 27:t===null&&a&4&&Lf(n);case 26:case 5:fa(e,n),t===null&&a&4&&Tf(n),a&512&&qo(n,n.return);break;case 12:fa(e,n);break;case 31:fa(e,n),a&4&&Bf(e,n);break;case 13:fa(e,n),a&4&&Nf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=um.bind(null,n),Tm(e,n))));break;case 22:if(a=n.memoizedState!==null||ua,!a){t=t!==null&&t.memoizedState!==null||Nt,l=ua;var o=Nt;ua=a,(Nt=t)&&!o?ha(e,n,(n.subtreeFlags&8772)!==0):fa(e,n),ua=l,Nt=o}break;case 30:break;default:fa(e,n)}}function Hf(e){var t=e.alternate;t!==null&&(e.alternate=null,Hf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ho(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var zt=null,rn=!1;function da(e,t,n){for(n=n.child;n!==null;)Uf(e,t,n),n=n.sibling}function Uf(e,t,n){if(Ee&&typeof Ee.onCommitFiberUnmount=="function")try{Ee.onCommitFiberUnmount(Be,n)}catch{}switch(n.tag){case 26:Nt||Qn(n,t),da(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Nt||Qn(n,t);var a=zt,l=rn;Ua(n.type)&&(zt=n.stateNode,rn=!1),da(e,t,n),Jo(n.stateNode),zt=a,rn=l;break;case 5:Nt||Qn(n,t);case 6:if(a=zt,l=rn,zt=null,da(e,t,n),zt=a,rn=l,zt!==null)if(rn)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(n.stateNode)}catch(o){ct(n,t,o)}else try{zt.removeChild(n.stateNode)}catch(o){ct(n,t,o)}break;case 18:zt!==null&&(rn?(e=zt,Eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Wl(e)):Eh(zt,n.stateNode));break;case 4:a=zt,l=rn,zt=n.stateNode.containerInfo,rn=!0,da(e,t,n),zt=a,rn=l;break;case 0:case 11:case 14:case 15:Aa(2,n,t),Nt||Aa(4,n,t),da(e,t,n);break;case 1:Nt||(Qn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Af(n,t,a)),da(e,t,n);break;case 21:da(e,t,n);break;case 22:Nt=(a=Nt)||n.memoizedState!==null,da(e,t,n),Nt=a;break;default:da(e,t,n)}}function Bf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wl(e)}catch(n){ct(t,t.return,n)}}}function Nf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wl(e)}catch(n){ct(t,t.return,n)}}function nm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _f),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _f),t;default:throw Error(d(435,e.tag))}}function nr(e,t){var n=nm(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=dm.bind(null,e,a);a.then(l,l)}})}function sn(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],o=e,c=t,p=c;e:for(;p!==null;){switch(p.tag){case 27:if(Ua(p.type)){zt=p.stateNode,rn=!1;break e}break;case 5:zt=p.stateNode,rn=!1;break e;case 3:case 4:zt=p.stateNode.containerInfo,rn=!0;break e}p=p.return}if(zt===null)throw Error(d(160));Uf(o,c,l),zt=null,rn=!1,o=l.alternate,o!==null&&(o.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)jf(t,e),t=t.sibling}var Nn=null;function jf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sn(t,e),cn(e),a&4&&(Aa(3,e,e.return),jo(3,e),Aa(5,e,e.return));break;case 1:sn(t,e),cn(e),a&512&&(Nt||n===null||Qn(n,n.return)),a&64&&ua&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var l=Nn;if(sn(t,e),cn(e),a&512&&(Nt||n===null||Qn(n,n.return)),a&4){var o=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,l=l.ownerDocument||l;t:switch(a){case"title":o=l.getElementsByTagName("title")[0],(!o||o[Ja]||o[kt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=l.createElement(a),l.head.insertBefore(o,l.querySelector("head > title"))),Jt(o,a,n),o[kt]=e,be(o),a=o;break e;case"link":var c=jh("link","href",l).get(a+(n.href||""));if(c){for(var p=0;p<c.length;p++)if(o=c[p],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){c.splice(p,1);break t}}o=l.createElement(a),Jt(o,a,n),l.head.appendChild(o);break;case"meta":if(c=jh("meta","content",l).get(a+(n.content||""))){for(p=0;p<c.length;p++)if(o=c[p],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){c.splice(p,1);break t}}o=l.createElement(a),Jt(o,a,n),l.head.appendChild(o);break;default:throw Error(d(468,a))}o[kt]=e,be(o),a=o}e.stateNode=a}else qh(l,e.type,e.stateNode);else e.stateNode=Nh(l,a,e.memoizedProps);else o!==a?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,a===null?qh(l,e.type,e.stateNode):Nh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&rc(e,e.memoizedProps,n.memoizedProps)}break;case 27:sn(t,e),cn(e),a&512&&(Nt||n===null||Qn(n,n.return)),n!==null&&a&4&&rc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(sn(t,e),cn(e),a&512&&(Nt||n===null||Qn(n,n.return)),e.flags&32){l=e.stateNode;try{xl(l,"")}catch(ge){ct(e,e.return,ge)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,rc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(uc=!0);break;case 6:if(sn(t,e),cn(e),a&4){if(e.stateNode===null)throw Error(d(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ge){ct(e,e.return,ge)}}break;case 3:if(br=null,l=Nn,Nn=gr(t.containerInfo),sn(t,e),Nn=l,cn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Wl(t.containerInfo)}catch(ge){ct(e,e.return,ge)}uc&&(uc=!1,qf(e));break;case 4:a=Nn,Nn=gr(e.stateNode.containerInfo),sn(t,e),cn(e),Nn=a;break;case 12:sn(t,e),cn(e);break;case 31:sn(t,e),cn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,nr(e,a)));break;case 13:sn(t,e),cn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(lr=Dt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,nr(e,a)));break;case 22:l=e.memoizedState!==null;var S=n!==null&&n.memoizedState!==null,R=ua,N=Nt;if(ua=R||l,Nt=N||S,sn(t,e),Nt=N,ua=R,cn(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||S||ua||Nt||ul(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){S=n=t;try{if(o=S.stateNode,l)c=o.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{p=S.stateNode;var G=S.memoizedProps.style,L=G!=null&&G.hasOwnProperty("display")?G.display:null;p.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(ge){ct(S,S.return,ge)}}}else if(t.tag===6){if(n===null){S=t;try{S.stateNode.nodeValue=l?"":S.memoizedProps}catch(ge){ct(S,S.return,ge)}}}else if(t.tag===18){if(n===null){S=t;try{var O=S.stateNode;l?Ah(O,!0):Ah(S.stateNode,!1)}catch(ge){ct(S,S.return,ge)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,nr(e,n))));break;case 19:sn(t,e),cn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,nr(e,a)));break;case 30:break;case 21:break;default:sn(t,e),cn(e)}}function cn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Rf(a)){n=a;break}a=a.return}if(n==null)throw Error(d(160));switch(n.tag){case 27:var l=n.stateNode,o=sc(e);tr(e,o,l);break;case 5:var c=n.stateNode;n.flags&32&&(xl(c,""),n.flags&=-33);var p=sc(e);tr(e,p,c);break;case 3:case 4:var S=n.stateNode.containerInfo,R=sc(e);cc(e,R,S);break;default:throw Error(d(161))}}catch(N){ct(e,e.return,N)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Of(e,t.alternate,t),t=t.sibling}function ul(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Aa(4,t,t.return),ul(t);break;case 1:Qn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Af(t,t.return,n),ul(t);break;case 27:Jo(t.stateNode);case 26:case 5:Qn(t,t.return),ul(t);break;case 22:t.memoizedState===null&&ul(t);break;case 30:ul(t);break;default:ul(t)}e=e.sibling}}function ha(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,o=t,c=o.flags;switch(o.tag){case 0:case 11:case 15:ha(l,o,n),jo(4,o);break;case 1:if(ha(l,o,n),a=o,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(R){ct(a,a.return,R)}if(a=o,l=a.updateQueue,l!==null){var p=a.stateNode;try{var S=l.shared.hiddenCallbacks;if(S!==null)for(l.shared.hiddenCallbacks=null,l=0;l<S.length;l++)gd(S[l],p)}catch(R){ct(a,a.return,R)}}n&&c&64&&Ef(o),qo(o,o.return);break;case 27:Lf(o);case 26:case 5:ha(l,o,n),n&&a===null&&c&4&&Tf(o),qo(o,o.return);break;case 12:ha(l,o,n);break;case 31:ha(l,o,n),n&&c&4&&Bf(l,o);break;case 13:ha(l,o,n),n&&c&4&&Nf(l,o);break;case 22:o.memoizedState===null&&ha(l,o,n),qo(o,o.return);break;case 30:break;default:ha(l,o,n)}t=t.sibling}}function dc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Mo(n))}function fc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Mo(e))}function jn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Yf(e,t,n,a),t=t.sibling}function Yf(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:jn(e,t,n,a),l&2048&&jo(9,t);break;case 1:jn(e,t,n,a);break;case 3:jn(e,t,n,a),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Mo(e)));break;case 12:if(l&2048){jn(e,t,n,a),e=t.stateNode;try{var o=t.memoizedProps,c=o.id,p=o.onPostCommit;typeof p=="function"&&p(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){ct(t,t.return,S)}}else jn(e,t,n,a);break;case 31:jn(e,t,n,a);break;case 13:jn(e,t,n,a);break;case 23:break;case 22:o=t.stateNode,c=t.alternate,t.memoizedState!==null?o._visibility&2?jn(e,t,n,a):Yo(e,t):o._visibility&2?jn(e,t,n,a):(o._visibility|=2,ql(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&dc(c,t);break;case 24:jn(e,t,n,a),l&2048&&fc(t.alternate,t);break;default:jn(e,t,n,a)}}function ql(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,c=t,p=n,S=a,R=c.flags;switch(c.tag){case 0:case 11:case 15:ql(o,c,p,S,l),jo(8,c);break;case 23:break;case 22:var N=c.stateNode;c.memoizedState!==null?N._visibility&2?ql(o,c,p,S,l):Yo(o,c):(N._visibility|=2,ql(o,c,p,S,l)),l&&R&2048&&dc(c.alternate,c);break;case 24:ql(o,c,p,S,l),l&&R&2048&&fc(c.alternate,c);break;default:ql(o,c,p,S,l)}t=t.sibling}}function Yo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,l=a.flags;switch(a.tag){case 22:Yo(n,a),l&2048&&dc(a.alternate,a);break;case 24:Yo(n,a),l&2048&&fc(a.alternate,a);break;default:Yo(n,a)}t=t.sibling}}var Go=8192;function Yl(e,t,n){if(e.subtreeFlags&Go)for(e=e.child;e!==null;)Gf(e,t,n),e=e.sibling}function Gf(e,t,n){switch(e.tag){case 26:Yl(e,t,n),e.flags&Go&&e.memoizedState!==null&&Gm(n,Nn,e.memoizedState,e.memoizedProps);break;case 5:Yl(e,t,n);break;case 3:case 4:var a=Nn;Nn=gr(e.stateNode.containerInfo),Yl(e,t,n),Nn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Go,Go=16777216,Yl(e,t,n),Go=a):Yl(e,t,n));break;default:Yl(e,t,n)}}function Xf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Xo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Vt=a,Qf(a,e)}Xf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vf(e),e=e.sibling}function Vf(e){switch(e.tag){case 0:case 11:case 15:Xo(e),e.flags&2048&&Aa(9,e,e.return);break;case 3:Xo(e);break;case 12:Xo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ar(e)):Xo(e);break;default:Xo(e)}}function ar(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Vt=a,Qf(a,e)}Xf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Aa(8,t,t.return),ar(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ar(t));break;default:ar(t)}e=e.sibling}}function Qf(e,t){for(;Vt!==null;){var n=Vt;switch(n.tag){case 0:case 11:case 15:Aa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Mo(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Vt=a;else e:for(n=e;Vt!==null;){a=Vt;var l=a.sibling,o=a.return;if(Hf(a),a===n){Vt=null;break e}if(l!==null){l.return=o,Vt=l;break e}Vt=o}}}var am={getCacheForType:function(e){var t=Zt(Ht),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Zt(Ht).controller.signal}},lm=typeof WeakMap=="function"?WeakMap:Map,at=0,yt=null,Qe=null,Fe=0,st=0,vn=null,Ta=!1,Gl=!1,hc=!1,pa=0,At=0,Ra=0,dl=0,pc=0,xn=0,Xl=0,Vo=null,un=null,mc=!1,lr=0,Kf=0,or=1/0,ir=null,La=null,Gt=0,_a=null,Vl=null,ma=0,gc=0,yc=null,Zf=null,Qo=0,bc=null;function Sn(){return(at&2)!==0&&Fe!==0?Fe&-Fe:E.T!==null?kc():gi()}function Ff(){if(xn===0)if((Fe&536870912)===0||$e){var e=gl;gl<<=1,(gl&3932160)===0&&(gl=262144),xn=e}else xn=536870912;return e=yn.current,e!==null&&(e.flags|=32),xn}function dn(e,t,n){(e===yt&&(st===2||st===9)||e.cancelPendingCommit!==null)&&(Ql(e,0),Oa(e,Fe,xn,!1)),Fa(e,n),((at&2)===0||e!==yt)&&(e===yt&&((at&2)===0&&(dl|=n),At===4&&Oa(e,Fe,xn,!1)),Kn(e))}function Jf(e,t,n){if((at&6)!==0)throw Error(d(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Za(e,t),l=a?rm(e,t):xc(e,t,!0),o=a;do{if(l===0){Gl&&!a&&Oa(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!om(n)){l=xc(e,t,!1),o=!1;continue}if(l===2){if(o=t,e.errorRecoveryDisabledLanes&o)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var p=e;l=Vo;var S=p.current.memoizedState.isDehydrated;if(S&&(Ql(p,c).flags|=256),c=xc(p,c,!1),c!==2){if(hc&&!S){p.errorRecoveryDisabledLanes|=o,dl|=o,l=4;break e}o=un,un=l,o!==null&&(un===null?un=o:un.push.apply(un,o))}l=c}if(o=!1,l!==2)continue}}if(l===1){Ql(e,0),Oa(e,t,0,!0);break}e:{switch(a=e,o=l,o){case 0:case 1:throw Error(d(345));case 4:if((t&4194048)!==t)break;case 6:Oa(a,t,xn,!Ta);break e;case 2:un=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(l=lr+300-Dt(),10<l)){if(Oa(a,t,xn,!Ta),yl(a,0,!0)!==0)break e;ma=t,a.timeoutHandle=Mh($f.bind(null,a,n,un,ir,mc,t,xn,dl,Xl,Ta,o,"Throttled",-0,0),l);break e}$f(a,n,un,ir,mc,t,xn,dl,Xl,Ta,o,null,-0,0)}}break}while(!0);Kn(e)}function $f(e,t,n,a,l,o,c,p,S,R,N,G,L,O){if(e.timeoutHandle=-1,G=t.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ea},Gf(t,o,G);var ge=(o&62914560)===o?lr-Dt():(o&4194048)===o?Kf-Dt():0;if(ge=Xm(G,ge),ge!==null){ma=o,e.cancelPendingCommit=ge(lh.bind(null,e,t,o,n,a,l,c,p,S,N,G,null,L,O)),Oa(e,o,c,!R);return}}lh(e,t,o,n,a,l,c,p,S)}function om(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var l=n[a],o=l.getSnapshot;l=l.value;try{if(!mn(o(),l))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Oa(e,t,n,a){t&=~pc,t&=~dl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var o=31-gt(l),c=1<<o;a[o]=-1,l&=~c}n!==0&&pi(e,n,t)}function rr(){return(at&6)===0?(Ko(0),!1):!0}function vc(){if(Qe!==null){if(st===0)var e=Qe.return;else e=Qe,la=nl=null,Hs(e),Hl=null,Eo=0,e=Qe;for(;e!==null;)Df(e.alternate,e),e=e.return;Qe=null}}function Ql(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,zm(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ma=0,vc(),yt=e,Qe=n=na(e.current,null),Fe=t,st=0,vn=null,Ta=!1,Gl=Za(e,t),hc=!1,Xl=xn=pc=dl=Ra=At=0,un=Vo=null,mc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-gt(a),o=1<<l;t|=e[l],a&=~o}return pa=t,Ei(),n}function Wf(e,t){Xe=null,E.H=Uo,t===Ol||t===Ui?(t=fd(),st=3):t===ws?(t=fd(),st=4):st=t===Ws?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,vn=t,Qe===null&&(At=1,$i(e,En(t,e.current)))}function If(){var e=yn.current;return e===null?!0:(Fe&4194048)===Fe?Ln===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?e===Ln:!1}function Pf(){var e=E.H;return E.H=Uo,e===null?Uo:e}function eh(){var e=E.A;return E.A=am,e}function sr(){At=4,Ta||(Fe&4194048)!==Fe&&yn.current!==null||(Gl=!0),(Ra&134217727)===0&&(dl&134217727)===0||yt===null||Oa(yt,Fe,xn,!1)}function xc(e,t,n){var a=at;at|=2;var l=Pf(),o=eh();(yt!==e||Fe!==t)&&(ir=null,Ql(e,t)),t=!1;var c=At;e:do try{if(st!==0&&Qe!==null){var p=Qe,S=vn;switch(st){case 8:vc(),c=6;break e;case 3:case 2:case 9:case 6:yn.current===null&&(t=!0);var R=st;if(st=0,vn=null,Kl(e,p,S,R),n&&Gl){c=0;break e}break;default:R=st,st=0,vn=null,Kl(e,p,S,R)}}im(),c=At;break}catch(N){Wf(e,N)}while(!0);return t&&e.shellSuspendCounter++,la=nl=null,at=a,E.H=l,E.A=o,Qe===null&&(yt=null,Fe=0,Ei()),c}function im(){for(;Qe!==null;)th(Qe)}function rm(e,t){var n=at;at|=2;var a=Pf(),l=eh();yt!==e||Fe!==t?(ir=null,or=Dt()+500,Ql(e,t)):Gl=Za(e,t);e:do try{if(st!==0&&Qe!==null){t=Qe;var o=vn;t:switch(st){case 1:st=0,vn=null,Kl(e,t,o,1);break;case 2:case 9:if(ud(o)){st=0,vn=null,nh(t);break}t=function(){st!==2&&st!==9||yt!==e||(st=7),Kn(e)},o.then(t,t);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:ud(o)?(st=0,vn=null,nh(t)):(st=0,vn=null,Kl(e,t,o,7));break;case 5:var c=null;switch(Qe.tag){case 26:c=Qe.memoizedState;case 5:case 27:var p=Qe;if(c?Yh(c):p.stateNode.complete){st=0,vn=null;var S=p.sibling;if(S!==null)Qe=S;else{var R=p.return;R!==null?(Qe=R,cr(R)):Qe=null}break t}}st=0,vn=null,Kl(e,t,o,5);break;case 6:st=0,vn=null,Kl(e,t,o,6);break;case 8:vc(),At=6;break e;default:throw Error(d(462))}}sm();break}catch(N){Wf(e,N)}while(!0);return la=nl=null,E.H=a,E.A=l,at=n,Qe!==null?0:(yt=null,Fe=0,Ei(),At)}function sm(){for(;Qe!==null&&!wt();)th(Qe)}function th(e){var t=zf(e.alternate,e,pa);e.memoizedProps=e.pendingProps,t===null?cr(e):Qe=t}function nh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vf(n,t,t.pendingProps,t.type,void 0,Fe);break;case 11:t=vf(n,t,t.pendingProps,t.type.render,t.ref,Fe);break;case 5:Hs(t);default:Df(n,t),t=Qe=Pu(t,pa),t=zf(n,t,pa)}e.memoizedProps=e.pendingProps,t===null?cr(e):Qe=t}function Kl(e,t,n,a){la=nl=null,Hs(t),Hl=null,Eo=0;var l=t.return;try{if($0(e,l,t,n,Fe)){At=1,$i(e,En(n,e.current)),Qe=null;return}}catch(o){if(l!==null)throw Qe=l,o;At=1,$i(e,En(n,e.current)),Qe=null;return}t.flags&32768?($e||a===1?e=!0:Gl||(Fe&536870912)!==0?e=!1:(Ta=e=!0,(a===2||a===9||a===3||a===6)&&(a=yn.current,a!==null&&a.tag===13&&(a.flags|=16384))),ah(t,e)):cr(t)}function cr(e){var t=e;do{if((t.flags&32768)!==0){ah(t,Ta);return}e=t.return;var n=P0(t.alternate,t,pa);if(n!==null){Qe=n;return}if(t=t.sibling,t!==null){Qe=t;return}Qe=t=e}while(t!==null);At===0&&(At=5)}function ah(e,t){do{var n=em(e.alternate,e);if(n!==null){n.flags&=32767,Qe=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Qe=e;return}Qe=e=n}while(e!==null);At=6,Qe=null}function lh(e,t,n,a,l,o,c,p,S){e.cancelPendingCommit=null;do ur();while(Gt!==0);if((at&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(o=t.lanes|t.childLanes,o|=ss,qr(e,n,o,c,p,S),e===yt&&(Qe=yt=null,Fe=0),Vl=t,_a=e,ma=n,gc=o,yc=l,Zf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,fm(kn,function(){return ch(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=E.T,E.T=null,l=$.p,$.p=2,c=at,at|=4;try{tm(e,t,n)}finally{at=c,$.p=l,E.T=a}}Gt=1,oh(),ih(),rh()}}function oh(){if(Gt===1){Gt=0;var e=_a,t=Vl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=E.T,E.T=null;var a=$.p;$.p=2;var l=at;at|=4;try{jf(t,e);var o=Lc,c=Vu(e.containerInfo),p=o.focusedElem,S=o.selectionRange;if(c!==p&&p&&p.ownerDocument&&Xu(p.ownerDocument.documentElement,p)){if(S!==null&&as(p)){var R=S.start,N=S.end;if(N===void 0&&(N=R),"selectionStart"in p)p.selectionStart=R,p.selectionEnd=Math.min(N,p.value.length);else{var G=p.ownerDocument||document,L=G&&G.defaultView||window;if(L.getSelection){var O=L.getSelection(),ge=p.textContent.length,Ae=Math.min(S.start,ge),pt=S.end===void 0?Ae:Math.min(S.end,ge);!O.extend&&Ae>pt&&(c=pt,pt=Ae,Ae=c);var M=Gu(p,Ae),k=Gu(p,pt);if(M&&k&&(O.rangeCount!==1||O.anchorNode!==M.node||O.anchorOffset!==M.offset||O.focusNode!==k.node||O.focusOffset!==k.offset)){var A=G.createRange();A.setStart(M.node,M.offset),O.removeAllRanges(),Ae>pt?(O.addRange(A),O.extend(k.node,k.offset)):(A.setEnd(k.node,k.offset),O.addRange(A))}}}}for(G=[],O=p;O=O.parentNode;)O.nodeType===1&&G.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<G.length;p++){var j=G[p];j.element.scrollLeft=j.left,j.element.scrollTop=j.top}}Cr=!!Rc,Lc=Rc=null}finally{at=l,$.p=a,E.T=n}}e.current=t,Gt=2}}function ih(){if(Gt===2){Gt=0;var e=_a,t=Vl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=E.T,E.T=null;var a=$.p;$.p=2;var l=at;at|=4;try{Of(e,t.alternate,t)}finally{at=l,$.p=a,E.T=n}}Gt=3}}function rh(){if(Gt===4||Gt===3){Gt=0,Re();var e=_a,t=Vl,n=ma,a=Zf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Gt=5:(Gt=0,Vl=_a=null,sh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(La=null),uo(n),t=t.stateNode,Ee&&typeof Ee.onCommitFiberRoot=="function")try{Ee.onCommitFiberRoot(Be,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=E.T,l=$.p,$.p=2,E.T=null;try{for(var o=e.onRecoverableError,c=0;c<a.length;c++){var p=a[c];o(p.value,{componentStack:p.stack})}}finally{E.T=t,$.p=l}}(ma&3)!==0&&ur(),Kn(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===bc?Qo++:(Qo=0,bc=e):Qo=0,Ko(0)}}function sh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Mo(t)))}function ur(){return oh(),ih(),rh(),ch()}function ch(){if(Gt!==5)return!1;var e=_a,t=gc;gc=0;var n=uo(ma),a=E.T,l=$.p;try{$.p=32>n?32:n,E.T=null,n=yc,yc=null;var o=_a,c=ma;if(Gt=0,Vl=_a=null,ma=0,(at&6)!==0)throw Error(d(331));var p=at;if(at|=4,Vf(o.current),Yf(o,o.current,c,n),at=p,Ko(0,!1),Ee&&typeof Ee.onPostCommitFiberRoot=="function")try{Ee.onPostCommitFiberRoot(Be,o)}catch{}return!0}finally{$.p=l,E.T=a,sh(e,t)}}function uh(e,t,n){t=En(n,t),t=$s(e.stateNode,t,2),e=Ma(e,t,2),e!==null&&(Fa(e,2),Kn(e))}function ct(e,t,n){if(e.tag===3)uh(e,e,n);else for(;t!==null;){if(t.tag===3){uh(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(La===null||!La.has(a))){e=En(n,e),n=df(2),a=Ma(t,n,2),a!==null&&(ff(n,a,t,e),Fa(a,2),Kn(a));break}}t=t.return}}function Sc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new lm;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(hc=!0,l.add(n),e=cm.bind(null,e,t,n),t.then(e,e))}function cm(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,yt===e&&(Fe&n)===n&&(At===4||At===3&&(Fe&62914560)===Fe&&300>Dt()-lr?(at&2)===0&&Ql(e,0):pc|=n,Xl===Fe&&(Xl=0)),Kn(e)}function dh(e,t){t===0&&(t=hi()),e=Pa(e,t),e!==null&&(Fa(e,t),Kn(e))}function um(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dh(e,n)}function dm(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(t),dh(e,n)}function fm(e,t){return dt(e,t)}var dr=null,Zl=null,Cc=!1,fr=!1,wc=!1,Ha=0;function Kn(e){e!==Zl&&e.next===null&&(Zl===null?dr=Zl=e:Zl=Zl.next=e),fr=!0,Cc||(Cc=!0,pm())}function Ko(e,t){if(!wc&&fr){wc=!0;do for(var n=!1,a=dr;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var o=0;else{var c=a.suspendedLanes,p=a.pingedLanes;o=(1<<31-gt(42|e)+1)-1,o&=l&~(c&~p),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,mh(a,o))}else o=Fe,o=yl(a,a===yt?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(o&3)===0||Za(a,o)||(n=!0,mh(a,o));a=a.next}while(n);wc=!1}}function hm(){fh()}function fh(){fr=Cc=!1;var e=0;Ha!==0&&km()&&(e=Ha);for(var t=Dt(),n=null,a=dr;a!==null;){var l=a.next,o=hh(a,t);o===0?(a.next=null,n===null?dr=l:n.next=l,l===null&&(Zl=n)):(n=a,(e!==0||(o&3)!==0)&&(fr=!0)),a=l}Gt!==0&&Gt!==5||Ko(e),Ha!==0&&(Ha=0)}function hh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var c=31-gt(o),p=1<<c,S=l[c];S===-1?((p&n)===0||(p&a)!==0)&&(l[c]=jr(p,t)):S<=t&&(e.expiredLanes|=p),o&=~p}if(t=yt,n=Fe,n=yl(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&&Xt(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Za(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Xt(a),uo(n)){case 2:case 8:n=Hn;break;case 32:n=kn;break;case 268435456:n=se;break;default:n=kn}return a=ph.bind(null,e),n=dt(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Xt(a),e.callbackPriority=2,e.callbackNode=null,2}function ph(e,t){if(Gt!==0&&Gt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ur()&&e.callbackNode!==n)return null;var a=Fe;return a=yl(e,e===yt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Jf(e,a,t),hh(e,Dt()),e.callbackNode!=null&&e.callbackNode===n?ph.bind(null,e):null)}function mh(e,t){if(ur())return null;Jf(e,t,!0)}function pm(){Mm(function(){(at&6)!==0?dt(Yn,hm):fh()})}function kc(){if(Ha===0){var e=Ll;e===0&&(e=ml,ml<<=1,(ml&261888)===0&&(ml=256)),Ha=e}return Ha}function gh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xi(""+e)}function yh(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function mm(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var o=gh((l[Lt]||null).action),c=a.submitter;c&&(t=(t=c[Lt]||null)?gh(t.formAction):c.getAttribute("formAction"),t!==null&&(o=t,c=null));var p=new ki("action","action",null,a,l);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ha!==0){var S=c?yh(l,c):new FormData(l);Vs(n,{pending:!0,data:S,method:l.method,action:o},null,S)}}else typeof o=="function"&&(p.preventDefault(),S=c?yh(l,c):new FormData(l),Vs(n,{pending:!0,data:S,method:l.method,action:o},o,S))},currentTarget:l}]})}}for(var zc=0;zc<rs.length;zc++){var Mc=rs[zc],gm=Mc.toLowerCase(),ym=Mc[0].toUpperCase()+Mc.slice(1);Bn(gm,"on"+ym)}Bn(Zu,"onAnimationEnd"),Bn(Fu,"onAnimationIteration"),Bn(Ju,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(_0,"onTransitionRun"),Bn(O0,"onTransitionStart"),Bn(H0,"onTransitionCancel"),Bn($u,"onTransitionEnd"),Ie("onMouseEnter",["mouseout","mouseover"]),Ie("onMouseLeave",["mouseout","mouseover"]),Ie("onPointerEnter",["pointerout","pointerover"]),Ie("onPointerLeave",["pointerout","pointerover"]),We("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),We("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),We("onBeforeInput",["compositionend","keypress","textInput","paste"]),We("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),We("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),We("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),bm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zo));function bh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var o=void 0;if(t)for(var c=a.length-1;0<=c;c--){var p=a[c],S=p.instance,R=p.currentTarget;if(p=p.listener,S!==o&&l.isPropagationStopped())break e;o=p,l.currentTarget=R;try{o(l)}catch(N){Di(N)}l.currentTarget=null,o=S}else for(c=0;c<a.length;c++){if(p=a[c],S=p.instance,R=p.currentTarget,p=p.listener,S!==o&&l.isPropagationStopped())break e;o=p,l.currentTarget=R;try{o(l)}catch(N){Di(N)}l.currentTarget=null,o=S}}}}function Ke(e,t){var n=t[bl];n===void 0&&(n=t[bl]=new Set);var a=e+"__bubble";n.has(a)||(vh(t,e,2,!1),n.add(a))}function Dc(e,t,n){var a=0;t&&(a|=4),vh(n,e,a,t)}var hr="_reactListening"+Math.random().toString(36).slice(2);function Ec(e){if(!e[hr]){e[hr]=!0,Le.forEach(function(n){n!=="selectionchange"&&(bm.has(n)||Dc(n,!1,e),Dc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hr]||(t[hr]=!0,Dc("selectionchange",!1,t))}}function vh(e,t,n,a){switch(Fh(t)){case 2:var l=Km;break;case 8:l=Zm;break;default:l=Xc}n=l.bind(null,t,n,e),l=void 0,!Fr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Ac(e,t,n,a,l){var o=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var c=a.tag;if(c===3||c===4){var p=a.stateNode.containerInfo;if(p===l)break;if(c===4)for(c=a.return;c!==null;){var S=c.tag;if((S===3||S===4)&&c.stateNode.containerInfo===l)return;c=c.return}for(;p!==null;){if(c=In(p),c===null)return;if(S=c.tag,S===5||S===6||S===26||S===27){a=o=c;continue e}p=p.parentNode}}a=a.return}wu(function(){var R=o,N=Kr(n),G=[];e:{var L=Wu.get(e);if(L!==void 0){var O=ki,ge=e;switch(e){case"keypress":if(Ci(n)===0)break e;case"keydown":case"keyup":O=d0;break;case"focusin":ge="focus",O=Ir;break;case"focusout":ge="blur",O=Ir;break;case"beforeblur":case"afterblur":O=Ir;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=Mu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Pp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=p0;break;case Zu:case Fu:case Ju:O=n0;break;case $u:O=g0;break;case"scroll":case"scrollend":O=Wp;break;case"wheel":O=b0;break;case"copy":case"cut":case"paste":O=l0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Eu;break;case"toggle":case"beforetoggle":O=x0}var Ae=(t&4)!==0,pt=!Ae&&(e==="scroll"||e==="scrollend"),M=Ae?L!==null?L+"Capture":null:L;Ae=[];for(var k=R,A;k!==null;){var j=k;if(A=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||A===null||M===null||(j=mo(k,M),j!=null&&Ae.push(Fo(k,j,A))),pt)break;k=k.return}0<Ae.length&&(L=new O(L,ge,null,n,N),G.push({event:L,listeners:Ae}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",L&&n!==Qr&&(ge=n.relatedTarget||n.fromElement)&&(In(ge)||ge[pn]))break e;if((O||L)&&(L=N.window===N?N:(L=N.ownerDocument)?L.defaultView||L.parentWindow:window,O?(ge=n.relatedTarget||n.toElement,O=R,ge=ge?In(ge):null,ge!==null&&(pt=m(ge),Ae=ge.tag,ge!==pt||Ae!==5&&Ae!==27&&Ae!==6)&&(ge=null)):(O=null,ge=R),O!==ge)){if(Ae=Mu,j="onMouseLeave",M="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=Eu,j="onPointerLeave",M="onPointerEnter",k="pointer"),pt=O==null?L:le(O),A=ge==null?L:le(ge),L=new Ae(j,k+"leave",O,n,N),L.target=pt,L.relatedTarget=A,j=null,In(N)===R&&(Ae=new Ae(M,k+"enter",ge,n,N),Ae.target=A,Ae.relatedTarget=pt,j=Ae),pt=j,O&&ge)t:{for(Ae=vm,M=O,k=ge,A=0,j=M;j;j=Ae(j))A++;j=0;for(var Me=k;Me;Me=Ae(Me))j++;for(;0<A-j;)M=Ae(M),A--;for(;0<j-A;)k=Ae(k),j--;for(;A--;){if(M===k||k!==null&&M===k.alternate){Ae=M;break t}M=Ae(M),k=Ae(k)}Ae=null}else Ae=null;O!==null&&xh(G,L,O,Ae,!1),ge!==null&&pt!==null&&xh(G,pt,ge,Ae,!0)}}e:{if(L=R?le(R):window,O=L.nodeName&&L.nodeName.toLowerCase(),O==="select"||O==="input"&&L.type==="file")var tt=Uu;else if(Ou(L))if(Bu)tt=T0;else{tt=E0;var we=D0}else O=L.nodeName,!O||O.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?R&&Vr(R.elementType)&&(tt=Uu):tt=A0;if(tt&&(tt=tt(e,R))){Hu(G,tt,n,N);break e}we&&we(e,L,R),e==="focusout"&&R&&L.type==="number"&&R.memoizedProps.value!=null&&Xr(L,"number",L.value)}switch(we=R?le(R):window,e){case"focusin":(Ou(we)||we.contentEditable==="true")&&(kl=we,ls=R,wo=null);break;case"focusout":wo=ls=kl=null;break;case"mousedown":os=!0;break;case"contextmenu":case"mouseup":case"dragend":os=!1,Qu(G,n,N);break;case"selectionchange":if(L0)break;case"keydown":case"keyup":Qu(G,n,N)}var Ve;if(es)e:{switch(e){case"compositionstart":var Je="onCompositionStart";break e;case"compositionend":Je="onCompositionEnd";break e;case"compositionupdate":Je="onCompositionUpdate";break e}Je=void 0}else wl?Lu(e,n)&&(Je="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Je="onCompositionStart");Je&&(Au&&n.locale!=="ko"&&(wl||Je!=="onCompositionStart"?Je==="onCompositionEnd"&&wl&&(Ve=ku()):(va=N,Jr="value"in va?va.value:va.textContent,wl=!0)),we=pr(R,Je),0<we.length&&(Je=new Du(Je,e,null,n,N),G.push({event:Je,listeners:we}),Ve?Je.data=Ve:(Ve=_u(n),Ve!==null&&(Je.data=Ve)))),(Ve=C0?w0(e,n):k0(e,n))&&(Je=pr(R,"onBeforeInput"),0<Je.length&&(we=new Du("onBeforeInput","beforeinput",null,n,N),G.push({event:we,listeners:Je}),we.data=Ve)),mm(G,e,R,n,N)}bh(G,t)})}function Fo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function pr(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,o=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||o===null||(l=mo(e,n),l!=null&&a.unshift(Fo(e,l,o)),l=mo(e,t),l!=null&&a.push(Fo(e,l,o))),e.tag===3)return a;e=e.return}return[]}function vm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function xh(e,t,n,a,l){for(var o=t._reactName,c=[];n!==null&&n!==a;){var p=n,S=p.alternate,R=p.stateNode;if(p=p.tag,S!==null&&S===a)break;p!==5&&p!==26&&p!==27||R===null||(S=R,l?(R=mo(n,o),R!=null&&c.unshift(Fo(n,R,S))):l||(R=mo(n,o),R!=null&&c.push(Fo(n,R,S)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var xm=/\r\n?/g,Sm=/\u0000|\uFFFD/g;function Sh(e){return(typeof e=="string"?e:""+e).replace(xm,`
|
|
9
|
+
`).replace(Sm,"")}function Ch(e,t){return t=Sh(t),Sh(e)===t}function ht(e,t,n,a,l,o){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||xl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&xl(e,""+a);break;case"className":bi(e,"class",a);break;case"tabIndex":bi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":bi(e,n,a);break;case"style":Su(e,a,o);break;case"data":if(t!=="object"){bi(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=xi(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(n==="formAction"?(t!=="input"&&ht(e,t,"name",l.name,l,null),ht(e,t,"formEncType",l.formEncType,l,null),ht(e,t,"formMethod",l.formMethod,l,null),ht(e,t,"formTarget",l.formTarget,l,null)):(ht(e,t,"encType",l.encType,l,null),ht(e,t,"method",l.method,l,null),ht(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=xi(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=ea);break;case"onScroll":a!=null&&Ke("scroll",e);break;case"onScrollEnd":a!=null&&Ke("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=xi(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Ke("beforetoggle",e),Ke("toggle",e),yi(e,"popover",a);break;case"xlinkActuate":Pn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Pn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Pn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Pn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Pn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Pn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":yi(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Jp.get(n)||n,yi(e,n,a))}}function Tc(e,t,n,a,l,o){switch(n){case"style":Su(e,a,o);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"children":typeof a=="string"?xl(e,a):(typeof a=="number"||typeof a=="bigint")&&xl(e,""+a);break;case"onScroll":a!=null&&Ke("scroll",e);break;case"onScrollEnd":a!=null&&Ke("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ea);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!He.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),o=e[Lt]||null,o=o!=null?o[n]:null,typeof o=="function"&&e.removeEventListener(t,o,l),typeof a=="function")){typeof o!="function"&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,l);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):yi(e,n,a)}}}function Jt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ke("error",e),Ke("load",e);var a=!1,l=!1,o;for(o in n)if(n.hasOwnProperty(o)){var c=n[o];if(c!=null)switch(o){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:ht(e,t,o,c,n,null)}}l&&ht(e,t,"srcSet",n.srcSet,n,null),a&&ht(e,t,"src",n.src,n,null);return;case"input":Ke("invalid",e);var p=o=c=l=null,S=null,R=null;for(a in n)if(n.hasOwnProperty(a)){var N=n[a];if(N!=null)switch(a){case"name":l=N;break;case"type":c=N;break;case"checked":S=N;break;case"defaultChecked":R=N;break;case"value":o=N;break;case"defaultValue":p=N;break;case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(d(137,t));break;default:ht(e,t,a,N,n,null)}}yu(e,o,p,S,R,c,l,!1);return;case"select":Ke("invalid",e),a=c=o=null;for(l in n)if(n.hasOwnProperty(l)&&(p=n[l],p!=null))switch(l){case"value":o=p;break;case"defaultValue":c=p;break;case"multiple":a=p;default:ht(e,t,l,p,n,null)}t=o,n=c,e.multiple=!!a,t!=null?vl(e,!!a,t,!1):n!=null&&vl(e,!!a,n,!0);return;case"textarea":Ke("invalid",e),o=l=a=null;for(c in n)if(n.hasOwnProperty(c)&&(p=n[c],p!=null))switch(c){case"value":a=p;break;case"defaultValue":l=p;break;case"children":o=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(d(91));break;default:ht(e,t,c,p,n,null)}vu(e,a,l,o);return;case"option":for(S in n)n.hasOwnProperty(S)&&(a=n[S],a!=null)&&(S==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":ht(e,t,S,a,n,null));return;case"dialog":Ke("beforetoggle",e),Ke("toggle",e),Ke("cancel",e),Ke("close",e);break;case"iframe":case"object":Ke("load",e);break;case"video":case"audio":for(a=0;a<Zo.length;a++)Ke(Zo[a],e);break;case"image":Ke("error",e),Ke("load",e);break;case"details":Ke("toggle",e);break;case"embed":case"source":case"link":Ke("error",e),Ke("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:ht(e,t,R,a,n,null)}return;default:if(Vr(t)){for(N in n)n.hasOwnProperty(N)&&(a=n[N],a!==void 0&&Tc(e,t,N,a,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(a=n[p],a!=null&&ht(e,t,p,a,n,null))}function Cm(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,c=null,p=null,S=null,R=null,N=null;for(O in n){var G=n[O];if(n.hasOwnProperty(O)&&G!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":S=G;default:a.hasOwnProperty(O)||ht(e,t,O,null,a,G)}}for(var L in a){var O=a[L];if(G=n[L],a.hasOwnProperty(L)&&(O!=null||G!=null))switch(L){case"type":o=O;break;case"name":l=O;break;case"checked":R=O;break;case"defaultChecked":N=O;break;case"value":c=O;break;case"defaultValue":p=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(d(137,t));break;default:O!==G&&ht(e,t,L,O,a,G)}}Gr(e,c,p,S,R,N,o,l);return;case"select":O=c=p=L=null;for(o in n)if(S=n[o],n.hasOwnProperty(o)&&S!=null)switch(o){case"value":break;case"multiple":O=S;default:a.hasOwnProperty(o)||ht(e,t,o,null,a,S)}for(l in a)if(o=a[l],S=n[l],a.hasOwnProperty(l)&&(o!=null||S!=null))switch(l){case"value":L=o;break;case"defaultValue":p=o;break;case"multiple":c=o;default:o!==S&&ht(e,t,l,o,a,S)}t=p,n=c,a=O,L!=null?vl(e,!!n,L,!1):!!a!=!!n&&(t!=null?vl(e,!!n,t,!0):vl(e,!!n,n?[]:"",!1));return;case"textarea":O=L=null;for(p in n)if(l=n[p],n.hasOwnProperty(p)&&l!=null&&!a.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:ht(e,t,p,null,a,l)}for(c in a)if(l=a[c],o=n[c],a.hasOwnProperty(c)&&(l!=null||o!=null))switch(c){case"value":L=l;break;case"defaultValue":O=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(d(91));break;default:l!==o&&ht(e,t,c,l,a,o)}bu(e,L,O);return;case"option":for(var ge in n)L=n[ge],n.hasOwnProperty(ge)&&L!=null&&!a.hasOwnProperty(ge)&&(ge==="selected"?e.selected=!1:ht(e,t,ge,null,a,L));for(S in a)L=a[S],O=n[S],a.hasOwnProperty(S)&&L!==O&&(L!=null||O!=null)&&(S==="selected"?e.selected=L&&typeof L!="function"&&typeof L!="symbol":ht(e,t,S,L,a,O));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in n)L=n[Ae],n.hasOwnProperty(Ae)&&L!=null&&!a.hasOwnProperty(Ae)&&ht(e,t,Ae,null,a,L);for(R in a)if(L=a[R],O=n[R],a.hasOwnProperty(R)&&L!==O&&(L!=null||O!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(d(137,t));break;default:ht(e,t,R,L,a,O)}return;default:if(Vr(t)){for(var pt in n)L=n[pt],n.hasOwnProperty(pt)&&L!==void 0&&!a.hasOwnProperty(pt)&&Tc(e,t,pt,void 0,a,L);for(N in a)L=a[N],O=n[N],!a.hasOwnProperty(N)||L===O||L===void 0&&O===void 0||Tc(e,t,N,L,a,O);return}}for(var M in n)L=n[M],n.hasOwnProperty(M)&&L!=null&&!a.hasOwnProperty(M)&&ht(e,t,M,null,a,L);for(G in a)L=a[G],O=n[G],!a.hasOwnProperty(G)||L===O||L==null&&O==null||ht(e,t,G,L,a,O)}function wh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function wm(){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,c=l.initiatorType,p=l.duration;if(o&&p&&wh(c)){for(c=0,p=l.responseEnd,a+=1;a<n.length;a++){var S=n[a],R=S.startTime;if(R>p)break;var N=S.transferSize,G=S.initiatorType;N&&wh(G)&&(S=S.responseEnd,c+=N*(S<p?1:(p-R)/(S-R)))}if(--a,t+=8*(o+c)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Rc=null,Lc=null;function mr(e){return e.nodeType===9?e:e.ownerDocument}function kh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function _c(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Oc=null;function km(){var e=window.event;return e&&e.type==="popstate"?e===Oc?!1:(Oc=e,!0):(Oc=null,!1)}var Mh=typeof setTimeout=="function"?setTimeout:void 0,zm=typeof clearTimeout=="function"?clearTimeout:void 0,Dh=typeof Promise=="function"?Promise:void 0,Mm=typeof queueMicrotask=="function"?queueMicrotask:typeof Dh<"u"?function(e){return Dh.resolve(null).then(e).catch(Dm)}:Mh;function Dm(e){setTimeout(function(){throw e})}function Ua(e){return e==="head"}function Eh(e,t){var n=t,a=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(l),Wl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Jo(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Jo(n);for(var o=n.firstChild;o;){var c=o.nextSibling,p=o.nodeName;o[Ja]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=c}}else n==="body"&&Jo(e.ownerDocument.body);n=l}while(n);Wl(t)}function Ah(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Hc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Hc(n),ho(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Em(e,t,n,a){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ja])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function Am(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=_n(e.nextSibling),e===null))return null;return e}function Th(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_n(e.nextSibling),e===null))return null;return e}function Uc(e){return e.data==="$?"||e.data==="$~"}function Bc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Tm(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function _n(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Nc=null;function Rh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return _n(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Lh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function _h(e,t,n){switch(t=mr(n),e){case"html":if(e=t.documentElement,!e)throw Error(d(452));return e;case"head":if(e=t.head,!e)throw Error(d(453));return e;case"body":if(e=t.body,!e)throw Error(d(454));return e;default:throw Error(d(451))}}function Jo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ho(e)}var On=new Map,Oh=new Set;function gr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ga=$.d;$.d={f:Rm,r:Lm,D:_m,C:Om,L:Hm,m:Um,X:Nm,S:Bm,M:jm};function Rm(){var e=ga.f(),t=rr();return e||t}function Lm(e){var t=fe(e);t!==null&&t.tag===5&&t.type==="form"?$d(t):ga.r(e)}var Fl=typeof document>"u"?null:document;function Hh(e,t,n){var a=Fl;if(a&&typeof t=="string"&&t){var l=Mn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Oh.has(l)||(Oh.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),Jt(t,"link",e),be(t),a.head.appendChild(t)))}}function _m(e){ga.D(e),Hh("dns-prefetch",e,null)}function Om(e,t){ga.C(e,t),Hh("preconnect",e,t)}function Hm(e,t,n){ga.L(e,t,n);var a=Fl;if(a&&e&&t){var l='link[rel="preload"][as="'+Mn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Mn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Mn(n.imageSizes)+'"]')):l+='[href="'+Mn(e)+'"]';var o=l;switch(t){case"style":o=Jl(e);break;case"script":o=$l(e)}On.has(o)||(e=z({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),On.set(o,e),a.querySelector(l)!==null||t==="style"&&a.querySelector($o(o))||t==="script"&&a.querySelector(Wo(o))||(t=a.createElement("link"),Jt(t,"link",e),be(t),a.head.appendChild(t)))}}function Um(e,t){ga.m(e,t);var n=Fl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Mn(a)+'"][href="'+Mn(e)+'"]',o=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=$l(e)}if(!On.has(o)&&(e=z({rel:"modulepreload",href:e},t),On.set(o,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Wo(o)))return}a=n.createElement("link"),Jt(a,"link",e),be(a),n.head.appendChild(a)}}}function Bm(e,t,n){ga.S(e,t,n);var a=Fl;if(a&&e){var l=ye(a).hoistableStyles,o=Jl(e);t=t||"default";var c=l.get(o);if(!c){var p={loading:0,preload:null};if(c=a.querySelector($o(o)))p.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},n),(n=On.get(o))&&jc(e,n);var S=c=a.createElement("link");be(S),Jt(S,"link",e),S._p=new Promise(function(R,N){S.onload=R,S.onerror=N}),S.addEventListener("load",function(){p.loading|=1}),S.addEventListener("error",function(){p.loading|=2}),p.loading|=4,yr(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:p},l.set(o,c)}}}function Nm(e,t){ga.X(e,t);var n=Fl;if(n&&e){var a=ye(n).hoistableScripts,l=$l(e),o=a.get(l);o||(o=n.querySelector(Wo(l)),o||(e=z({src:e,async:!0},t),(t=On.get(l))&&qc(e,t),o=n.createElement("script"),be(o),Jt(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function jm(e,t){ga.M(e,t);var n=Fl;if(n&&e){var a=ye(n).hoistableScripts,l=$l(e),o=a.get(l);o||(o=n.querySelector(Wo(l)),o||(e=z({src:e,async:!0,type:"module"},t),(t=On.get(l))&&qc(e,t),o=n.createElement("script"),be(o),Jt(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Uh(e,t,n,a){var l=(l=K.current)?gr(l):null;if(!l)throw Error(d(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Jl(n.href),n=ye(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=Jl(n.href);var o=ye(l).hoistableStyles,c=o.get(e);if(c||(l=l.ownerDocument||l,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,c),(o=l.querySelector($o(e)))&&!o._p&&(c.instance=o,c.state.loading=5),On.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},On.set(e,n),o||qm(l,e,n,c.state))),t&&a===null)throw Error(d(528,""));return c}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=$l(n),n=ye(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 Jl(e){return'href="'+Mn(e)+'"'}function $o(e){return'link[rel="stylesheet"]['+e+"]"}function Bh(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function qm(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}),Jt(t,"link",n),be(t),e.head.appendChild(t))}function $l(e){return'[src="'+Mn(e)+'"]'}function Wo(e){return"script[async]"+e}function Nh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Mn(n.href)+'"]');if(a)return t.instance=a,be(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"),be(a),Jt(a,"style",l),yr(a,n.precedence,e),t.instance=a;case"stylesheet":l=Jl(n.href);var o=e.querySelector($o(l));if(o)return t.state.loading|=4,t.instance=o,be(o),o;a=Bh(n),(l=On.get(l))&&jc(a,l),o=(e.ownerDocument||e).createElement("link"),be(o);var c=o;return c._p=new Promise(function(p,S){c.onload=p,c.onerror=S}),Jt(o,"link",a),t.state.loading|=4,yr(o,n.precedence,e),t.instance=o;case"script":return o=$l(n.src),(l=e.querySelector(Wo(o)))?(t.instance=l,be(l),l):(a=n,(l=On.get(o))&&(a=z({},n),qc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),be(l),Jt(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(d(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,yr(a,n.precedence,e));return t.instance}function yr(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,o=l,c=0;c<a.length;c++){var p=a[c];if(p.dataset.precedence===t)o=p;else if(o!==l)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var br=null;function jh(e,t,n){if(br===null){var a=new Map,l=br=new Map;l.set(n,a)}else l=br,a=l.get(n),a||(a=new Map,l.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var o=n[l];if(!(o[Ja]||o[kt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var c=o.getAttribute(t)||"";c=e+c;var p=a.get(c);p?p.push(o):a.set(c,[o])}}return a}function qh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Ym(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Yh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Gm(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=Jl(a.href),o=t.querySelector($o(l));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=vr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,be(o);return}o=t.ownerDocument||t,a=Bh(a),(l=On.get(l))&&jc(a,l),o=o.createElement("link"),be(o);var c=o;c._p=new Promise(function(p,S){c.onload=p,c.onerror=S}),Jt(o,"link",a),n.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=vr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Yc=0;function Xm(e,t){return e.stylesheets&&e.count===0&&Sr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Sr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Yc===0&&(Yc=62500*wm());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Sr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Yc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function vr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Sr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xr=null;function Sr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xr=new Map,t.forEach(Vm,e),xr=null,vr.call(e))}function Vm(e,t){if(!(t.state.loading&4)){var n=xr.get(e);if(n)var a=n.get(null);else{n=new Map,xr.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<l.length;o++){var c=l[o];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(n.set(c.dataset.precedence,c),a=c)}a&&n.set(null,a)}l=t.instance,c=l.getAttribute("data-precedence"),o=n.get(c)||a,o===a&&n.set(null,l),n.set(c,l),this.count++,a=vr.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),o?o.parentNode.insertBefore(l,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var Io={$$typeof:ae,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function Qm(e,t,n,a,l,o,c,p,S){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=so(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=so(0),this.hiddenUpdates=so(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=o,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function Gh(e,t,n,a,l,o,c,p,S,R,N,G){return e=new Qm(e,t,n,c,S,R,N,G,p),t=1,o===!0&&(t|=24),o=gn(3,null,null,t),e.current=o,o.stateNode=e,t=xs(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:a,isDehydrated:n,cache:t},ks(o),e}function Xh(e){return e?(e=Dl,e):Dl}function Vh(e,t,n,a,l,o){l=Xh(l),a.context===null?a.context=l:a.pendingContext=l,a=za(t),a.payload={element:n},o=o===void 0?null:o,o!==null&&(a.callback=o),n=Ma(e,a,t),n!==null&&(dn(n,e,t),To(n,e,t))}function Qh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Gc(e,t){Qh(e,t),(e=e.alternate)&&Qh(e,t)}function Kh(e){if(e.tag===13||e.tag===31){var t=Pa(e,67108864);t!==null&&dn(t,e,67108864),Gc(e,67108864)}}function Zh(e){if(e.tag===13||e.tag===31){var t=Sn();t=Wn(t);var n=Pa(e,t);n!==null&&dn(n,e,t),Gc(e,t)}}var Cr=!0;function Km(e,t,n,a){var l=E.T;E.T=null;var o=$.p;try{$.p=2,Xc(e,t,n,a)}finally{$.p=o,E.T=l}}function Zm(e,t,n,a){var l=E.T;E.T=null;var o=$.p;try{$.p=8,Xc(e,t,n,a)}finally{$.p=o,E.T=l}}function Xc(e,t,n,a){if(Cr){var l=Vc(a);if(l===null)Ac(e,t,a,wr,n),Jh(e,a);else if(Jm(l,e,t,n,a))a.stopPropagation();else if(Jh(e,a),t&4&&-1<Fm.indexOf(e)){for(;l!==null;){var o=fe(l);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var c=$n(o.pendingLanes);if(c!==0){var p=o;for(p.pendingLanes|=2,p.entangledLanes|=2;c;){var S=1<<31-gt(c);p.entanglements[1]|=S,c&=~S}Kn(o),(at&6)===0&&(or=Dt()+500,Ko(0))}}break;case 31:case 13:p=Pa(o,2),p!==null&&dn(p,o,2),rr(),Gc(o,2)}if(o=Vc(a),o===null&&Ac(e,t,a,wr,n),o===l)break;l=o}l!==null&&a.stopPropagation()}else Ac(e,t,a,null,n)}}function Vc(e){return e=Kr(e),Qc(e)}var wr=null;function Qc(e){if(wr=null,e=In(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=w(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 wr=e,null}function Fh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(wn()){case Yn:return 2;case Hn:return 8;case kn:case F:return 32;case se:return 268435456;default:return 32}default:return 32}}var Kc=!1,Ba=null,Na=null,ja=null,Po=new Map,ei=new Map,qa=[],Fm="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Jh(e,t){switch(e){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":Na=null;break;case"mouseover":case"mouseout":ja=null;break;case"pointerover":case"pointerout":Po.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ei.delete(t.pointerId)}}function ti(e,t,n,a,l,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:o,targetContainers:[l]},t!==null&&(t=fe(t),t!==null&&Kh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Jm(e,t,n,a,l){switch(t){case"focusin":return Ba=ti(Ba,e,t,n,a,l),!0;case"dragenter":return Na=ti(Na,e,t,n,a,l),!0;case"mouseover":return ja=ti(ja,e,t,n,a,l),!0;case"pointerover":var o=l.pointerId;return Po.set(o,ti(Po.get(o)||null,e,t,n,a,l)),!0;case"gotpointercapture":return o=l.pointerId,ei.set(o,ti(ei.get(o)||null,e,t,n,a,l)),!0}return!1}function $h(e){var t=In(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=w(n),t!==null){e.blockedOn=t,Un(e.priority,function(){Zh(n)});return}}else if(t===31){if(t=D(n),t!==null){e.blockedOn=t,Un(e.priority,function(){Zh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function kr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Qr=a,n.target.dispatchEvent(a),Qr=null}else return t=fe(n),t!==null&&Kh(t),e.blockedOn=n,!1;t.shift()}return!0}function Wh(e,t,n){kr(e)&&n.delete(t)}function $m(){Kc=!1,Ba!==null&&kr(Ba)&&(Ba=null),Na!==null&&kr(Na)&&(Na=null),ja!==null&&kr(ja)&&(ja=null),Po.forEach(Wh),ei.forEach(Wh)}function zr(e,t){e.blockedOn===t&&(e.blockedOn=null,Kc||(Kc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,$m)))}var Mr=null;function Ih(e){Mr!==e&&(Mr=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Mr===e&&(Mr=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(Qc(a||n)===null)continue;break}var o=fe(n);o!==null&&(e.splice(t,3),t-=3,Vs(o,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function Wl(e){function t(S){return zr(S,e)}Ba!==null&&zr(Ba,e),Na!==null&&zr(Na,e),ja!==null&&zr(ja,e),Po.forEach(t),ei.forEach(t);for(var n=0;n<qa.length;n++){var a=qa[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<qa.length&&(n=qa[0],n.blockedOn===null);)$h(n),n.blockedOn===null&&qa.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],o=n[a+1],c=l[Lt]||null;if(typeof o=="function")c||Ih(n);else if(c){var p=null;if(o&&o.hasAttribute("formAction")){if(l=o,c=o[Lt]||null)p=c.formAction;else if(Qc(l)!==null)continue}else p=c.action;typeof p=="function"?n[a+1]=p:(n.splice(a,3),a-=3),Ih(n)}}}function Ph(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(c){return l=c})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function Zc(e){this._internalRoot=e}Dr.prototype.render=Zc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var n=t.current,a=Sn();Vh(n,a,e,t,null,null)},Dr.prototype.unmount=Zc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vh(e.current,2,null,e,null,null),rr(),t[pn]=null}};function Dr(e){this._internalRoot=e}Dr.prototype.unstable_scheduleHydration=function(e){if(e){var t=gi();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qa.length&&t!==0&&t<qa[n].priority;n++);qa.splice(n,0,e),n===0&&$h(e)}};var ep=s.version;if(ep!=="19.2.4")throw Error(d(527,ep,"19.2.4"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(d(188)):(e=Object.keys(e).join(","),Error(d(268,e)));return e=g(t),e=e!==null?T(e):null,e=e===null?null:e.stateNode,e};var Wm={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Er=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Er.isDisabled&&Er.supportsFiber)try{Be=Er.inject(Wm),Ee=Er}catch{}}return li.createRoot=function(e,t){if(!h(e))throw Error(d(299));var n=!1,a="",l=rf,o=sf,c=cf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Gh(e,1,!1,null,null,n,a,null,l,o,c,Ph),e[pn]=t.current,Ec(e),new Zc(t)},li.hydrateRoot=function(e,t,n){if(!h(e))throw Error(d(299));var a=!1,l="",o=rf,c=sf,p=cf,S=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(S=n.formState)),t=Gh(e,1,!0,t,n??null,a,l,S,o,c,p,Ph),t.context=Xh(null),n=t.current,a=Sn(),a=Wn(a),l=za(a),l.callback=null,Ma(n,l,a),n=a,t.current.lanes=n,Fa(t,n),Kn(t),e[pn]=t.current,Ec(e),new Dr(t)},li.version="19.2.4",li}var xp;function a1(){if(xp)return Pc.exports;xp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(s){console.error(s)}}return i(),Pc.exports=n1(),Pc.exports}var l1=a1(),Sp=function(s,f){var d=arguments;if(f==null||!di.call(f,"css"))return v.createElement.apply(void 0,d);var h=d.length,m=new Array(h);m[0]=hu,m[1]=fu(s,f);for(var w=2;w<h;w++)m[w]=d[w];return v.createElement.apply(null,m)};(function(i){var s;s||(s=i.JSX||(i.JSX={}))})(Sp||(Sp={}));function y(){for(var i=arguments.length,s=new Array(i),f=0;f<i;f++)s[f]=arguments[f];return Up(s)}function ln(){var i=y.apply(void 0,arguments),s="animation-"+i.name;return{name:s,styles:"@keyframes "+s+"{"+i.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const o1={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},i1={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:o1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Np=v.createContext(i1);function oo(){return v.useContext(Np)}const fi="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",u={primary:"#635bff",primaryHover:"#5851e5",primaryLight:"#f0f0ff",background:"#f6f9fc",surface:"#ffffff",surfaceHover:"#f6f9fc",border:"#d8dee4",borderLight:"#e3e8ee",borderHover:"#c1c9d2",text:"#1a1f36",textSecondary:"#697386",textMuted:"#8792a2",success:"#0d7d4d",successLight:"#e6f7ef",danger:"#df1b41",dangerHover:"#c41535",dangerLight:"#fff5f7",imagesFolder:"#8b5cf6",hover:"#e8ecf0"},V={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},ro=y("font-family:",fi,";font-size:",V.base,";line-height:1.5;color:",u.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;}",""),r1=ln`
|
|
10
|
+
from { opacity: 0; }
|
|
11
|
+
to { opacity: 1; }
|
|
12
|
+
`,s1=ln`
|
|
13
|
+
from {
|
|
14
|
+
opacity: 0;
|
|
15
|
+
transform: translateY(-8px) scale(0.98);
|
|
16
|
+
}
|
|
17
|
+
to {
|
|
18
|
+
opacity: 1;
|
|
19
|
+
transform: translateY(0) scale(1);
|
|
20
|
+
}
|
|
21
|
+
`,c1=ln`
|
|
22
|
+
from { transform: rotate(0deg); }
|
|
23
|
+
to { transform: rotate(360deg); }
|
|
24
|
+
`,_e={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",r1," 0.15s ease-out;font-family:",fi,";",""),modal:y(ro," background-color:",u.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:",s1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",V.lg,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:y("font-size:",V.base,";color:",u.textSecondary,";margin:0;line-height:1.6;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",u.border,";background-color:",u.background,";",""),btn:y("padding:10px 18px;font-size:",V.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",u.surface,";border:1px solid ",u.border,";color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),btnConfirm:y("background-color:",u.primary,";border:1px solid ",u.primary,";color:white;&:hover{background-color:",u.primaryHover,";border-color:",u.primaryHover,";}",""),btnDanger:y("background-color:",u.danger,";border:1px solid ",u.danger,";color:white;&:hover{background-color:",u.dangerHover,";border-color:",u.dangerHover,";}","")};function no({title:i,message:s,confirmLabel:f="Confirm",cancelLabel:d="Cancel",variant:h="default",onConfirm:m,onCancel:w}){return r("div",{css:_e.overlay,onClick:w,children:b("div",{css:_e.modal,onClick:D=>D.stopPropagation(),children:[r("div",{css:_e.header,children:r("h3",{css:_e.title,children:i})}),r("div",{css:_e.body,children:r("p",{css:_e.message,children:s})}),b("div",{css:_e.footer,children:[r("button",{css:[_e.btn,_e.btnCancel,"",""],onClick:w,children:d}),r("button",{css:[_e.btn,h==="danger"?_e.btnDanger:_e.btnConfirm,"",""],onClick:m,children:f})]})]})})}const u1={input:y("width:100%;padding:10px 12px;font-size:",V.base,";border:1px solid ",u.border,";border-radius:6px;background:",u.surface,";color:",u.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 2px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}","")};function ao({title:i,message:s,inputLabel:f,defaultValue:d="",placeholder:h,confirmLabel:m="Confirm",cancelLabel:w="Cancel",isLoading:D=!1,loadingLabel:C="Processing...",onConfirm:g,onCancel:T}){const[z,B]=rt.useState(d),q=H=>{H.preventDefault(),z.trim()&&!D&&g(z.trim())};return r("div",{css:_e.overlay,onClick:D?void 0:T,children:r("div",{css:_e.modal,onClick:H=>H.stopPropagation(),children:b("form",{onSubmit:q,children:[r("div",{css:_e.header,children:r("h3",{css:_e.title,children:i})}),b("div",{css:_e.body,children:[s&&r("p",{css:_e.message,children:s}),f&&r("label",{css:_e.message,children:f}),r("input",{css:u1.input,type:"text",value:z,onChange:H=>B(H.target.value),placeholder:h,autoFocus:!0,disabled:D})]}),b("div",{css:_e.footer,children:[r("button",{type:"button",css:[_e.btn,_e.btnCancel,"",""],onClick:T,disabled:D,children:w}),r("button",{type:"submit",css:[_e.btn,_e.btnConfirm,"",""],disabled:!z.trim()||D,children:D?b(Pe,{children:[r("span",{css:y("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",c1," 0.75s linear infinite;margin-right:6px;","")}),C]}):m})]})]})})})}function pu({title:i,message:s,buttonLabel:f="OK",onClose:d}){return r("div",{css:_e.overlay,onClick:d,children:b("div",{css:_e.modal,onClick:h=>h.stopPropagation(),children:[r("div",{css:_e.header,children:r("h3",{css:_e.title,children:i})}),r("div",{css:_e.body,children:r("p",{css:_e.message,children:s})}),r("div",{css:_e.footer,children:r("button",{css:[_e.btn,_e.btnConfirm,"",""],onClick:d,children:f})})]})})}const Ga={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:y("width:100%;height:8px;background-color:",u.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:y("height:100%;background:linear-gradient(90deg, ",u.primary,", ",u.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:y("font-size:",V.sm,";color:",u.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:y("font-size:",V.xs,";color:",u.textMuted,";margin:8px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),errorList:{name:"1lw22n1",styles:"margin-top:12px;padding:12px;background:#fef2f2;border:1px solid #fecaca;border-radius:6px;max-height:200px;overflow-y:auto"},errorItem:y("font-size:",V.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function hl({title:i,progress:s,onClose:f,onDeleteOrphans:d,onStop:h}){const m=s.status==="complete",w=s.status==="error",D=s.status==="stopped",C=s.status==="stopping",g=m||w||D,T=!g||C;return r("div",{css:_e.overlay,children:b("div",{css:_e.modal,onClick:z=>z.stopPropagation(),children:[r("div",{css:_e.header,children:r("h3",{css:_e.title,children:i})}),r("div",{css:_e.body,children:w?r("p",{css:_e.message,children:s.message||"An error occurred"}):D?b("p",{css:_e.message,children:["Processing stopped. Processed ",s.processed??s.current," image",(s.processed??s.current)!==1?"s":""," before stopping."]}):m?b(Pe,{children:[b("p",{css:_e.message,children:[s.message?s.message:s.isDelete?b(Pe,{children:["Deleted ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?b(Pe,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isMove?b(Pe,{children:["Moved ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?b(Pe,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isScan?b(Pe,{children:[s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?b(Pe,{children:[s.alreadyProcessed," image",s.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",s.processed," new image",s.processed!==1?"s":"",".",s.orphanedEntries!==void 0&&s.orphanedEntries>0?b(Pe,{children:[" Removed ",s.orphanedEntries," orphaned entr",s.orphanedEntries!==1?"ies":"y","."]}):null,s.pendingUpdates!==void 0&&s.pendingUpdates>0?b(Pe,{children:[" ",s.pendingUpdates," file",s.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):b(Pe,{children:["Processed ",s.processed," new image",s.processed!==1?"s":"",".",s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?b(Pe,{children:[" ",s.alreadyProcessed," already processed."]}):null]}),s.orphansRemoved!==void 0&&s.orphansRemoved>0?b(Pe,{children:[" Removed ",s.orphansRemoved," orphaned thumbnail",s.orphansRemoved!==1?"s":"","."]}):null]}),s.errorMessages&&s.errorMessages.length>0&&b("div",{css:Ga.errorList,children:[s.errorMessages.slice(0,10).map((z,B)=>r("p",{css:Ga.errorItem,children:z},B)),s.errorMessages.length>10&&b("p",{css:Ga.errorItem,children:["...and ",s.errorMessages.length-10," more"]})]})]}):b(Pe,{children:[r("p",{css:_e.message,children:s.status==="cleanup"?s.message||"Cleaning up...":s.message||"Processing..."}),b("div",{css:Ga.progressContainer,children:[r("div",{css:Ga.progressBar,children:r("div",{css:Ga.progressFill,style:{width:`${s.percent}%`}})}),b("div",{css:Ga.progressText,children:[b("span",{children:[s.current," of ",s.total]}),b("span",{children:[s.percent,"%"]})]}),s.currentFile&&r("p",{css:Ga.currentFile,title:s.currentFile,children:s.currentFile})]})]})}),b("div",{css:_e.footer,children:[T&&h&&r("button",{css:[_e.btn,_e.btnDanger,"",""],onClick:h,disabled:s.status==="stopping",children:s.status==="stopping"?"Stopping...":"Stop"}),g&&s.orphanedFiles&&s.orphanedFiles.length>0&&d&&b("button",{css:[_e.btn,_e.btnDanger,"",""],onClick:d,children:["Delete ",s.orphanedFiles.length," Orphan",s.orphanedFiles.length!==1?"s":""]}),g&&r("button",{css:[_e.btn,_e.btnConfirm,"",""],onClick:f,children:"Done"})]})]})})}function jp(i){const{setShowProgress:s,setProgressTitle:f,setProgressState:d,triggerRefresh:h}=i,m=v.useRef(null),w=v.useRef(!1),D=v.useRef(!1),C=v.useRef(null),g=v.useCallback(()=>{m.current&&m.current.abort()},[]);return{execute:v.useCallback(async z=>{const{endpoint:B,body:q,title:H,operationType:Y,onComplete:ie,onError:Q}=z;if(w.current){console.warn("Streaming operation already in progress");return}w.current=!0,D.current=!1;const ae=`${B.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;C.current=ae;const de=new AbortController;m.current=de;const X=async()=>{D.current=!0,d(P=>({...P,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:ae})})}catch{}};de.signal.addEventListener("abort",X),f(H),s(!0),d({current:0,total:0,percent:0,status:"processing",message:`Starting ${H.toLowerCase()}...`});try{const P=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...q,operationId:ae})});if(!P.ok){const Z=await P.json().catch(()=>({}));throw new Error(Z.error||`Request failed: ${P.status}`)}if(!P.body)throw new Error("No response body");const I=P.body.getReader(),te=new TextDecoder;let U="";try{for(;;){const{done:Z,value:he}=await I.read();if(Z)break;U+=te.decode(he,{stream:!0});const me=U.split(`
|
|
25
|
+
|
|
26
|
+
`);U=me.pop()||"";for(const pe of me)if(pe.startsWith("data: "))try{const ne=JSON.parse(pe.slice(6));if(ne.type==="start")d(Oe=>({...Oe,total:ne.total||Oe.total}));else if(ne.type==="progress")d({current:ne.current||0,total:ne.total||0,percent:ne.percent||Math.round((ne.current||0)/(ne.total||1)*100),status:"processing",currentFile:ne.currentFile,message:ne.message});else if(ne.type==="cleanup")d(Oe=>({...Oe,status:"cleanup",message:ne.message}));else if(ne.type==="complete"){const Oe=ne.cancelled===!0,E=ne.processed??ne.moved??ne.renamed??ne.pushed??ne.downloaded??ne.added??ne.imported??ne.deleted??ne.current??0;d({current:E,total:E,percent:100,status:Oe?"stopped":ne.errors&&ne.errors>0?"error":"complete",message:ne.message,processed:E,errors:ne.errors,orphanedFiles:ne.orphanedFiles,isDelete:Y==="delete",isMove:Y==="move",isScan:Y==="scan"}),h(),ie?.(ne)}else ne.type==="error"&&(d(Oe=>({...Oe,status:"error",message:ne.message})),Q?.(ne.message||"Unknown error"))}catch{}}}catch(Z){if(!D.current)throw Z}finally{de.signal.removeEventListener("abort",X)}}catch(P){if(!D.current){const I=P instanceof Error?P.message:"Operation failed";console.error(`${H} error:`,P),d({current:0,total:0,percent:0,status:"error",message:I}),Q?.(I)}}finally{w.current=!1,m.current=null,C.current=null}},[s,f,d,h]),stop:g,get isRunning(){return w.current}}}const d1=ln`
|
|
27
|
+
from { opacity: 0; }
|
|
28
|
+
to { opacity: 1; }
|
|
29
|
+
`,f1=ln`
|
|
30
|
+
from {
|
|
31
|
+
opacity: 0;
|
|
32
|
+
transform: translateY(-8px) scale(0.98);
|
|
33
|
+
}
|
|
34
|
+
to {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
transform: translateY(0) scale(1);
|
|
37
|
+
}
|
|
38
|
+
`,Tt={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",d1," 0.15s ease-out;font-family:",fi,";",""),modal:y(ro," background-color:",u.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:480px;width:90%;max-height:80vh;display:flex;flex-direction:column;animation:",f1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",V.lg,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"zizupt",styles:"padding:12px 24px 24px;flex:1;overflow-y:auto;min-height:200px;max-height:400px"},message:y("font-size:",V.base,";color:",u.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:y("display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer;transition:all 0.15s ease;border:1px solid transparent;position:relative;&:hover{background-color:",u.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:y("width:16px;height:100%;position:relative;flex-shrink:0;&::before{content:'';position:absolute;left:8px;top:0;bottom:50%;width:0;border-left:1px dashed ",u.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",u.textSecondary,";}",""),folderItemSelected:y("background-color:",u.primaryLight,";border-color:",u.primary,";&:hover{background-color:",u.primaryLight,";}",""),folderItemDisabled:{name:"181lhkw",styles:"opacity:0.5;cursor:not-allowed;&:hover{background-color:transparent;}"},folderIcon:{name:"17bs1oo",styles:"width:20px;height:20px;color:#f9935e;flex-shrink:0"},folderName:y("font-size:",V.base,";color:",u.text,";flex:1;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",u.border,";background-color:",u.background,";",""),btn:y("padding:10px 18px;font-size:",V.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",u.surface,";border:1px solid ",u.border,";color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),btnConfirm:y("background-color:",u.primary,";border:1px solid ",u.primary,";color:white;&:hover:not(:disabled){background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:y("display:flex;align-items:center;justify-content:center;padding:40px;color:",u.textSecondary,";",""),spinner:y("width:24px;height:24px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function qp({selectedItems:i,currentPath:s,onMove:f,onCancel:d}){const[h,m]=v.useState([]),[w,D]=v.useState(!0),[C,g]=v.useState(null);v.useEffect(()=>{async function H(){try{const Y=await fetch("/api/studio/list-folders");if(Y.ok){const ie=await Y.json();console.log("Loaded folders:",ie),m(ie.folders||[])}else console.error("Failed to load folders:",Y.status,await Y.text())}catch(Y){console.error("Failed to load folders:",Y)}finally{D(!1)}}H()},[]);const T=Array.from(i),z=h.filter(H=>!T.some(Y=>H.path===Y||H.path.startsWith(Y+"/"))),B=H=>H===s,q=()=>{C&&f(C)};return r("div",{css:Tt.overlay,onClick:d,children:b("div",{css:Tt.modal,onClick:H=>H.stopPropagation(),children:[r("div",{css:Tt.header,children:r("h3",{css:Tt.title,children:"Move Items"})}),b("div",{css:Tt.body,children:[b("p",{css:Tt.message,children:["Select a destination folder for ",i.size," item",i.size!==1?"s":"",":"]}),w?r("div",{css:Tt.loading,children:r("div",{css:Tt.spinner})}):z.length===0?r("div",{css:Tt.loading,children:"No available folders to move to."}):r("div",{css:Tt.folderList,children:z.map(H=>{const Y=B(H.path);return b("div",{css:[Tt.folderItem,C===H.path&&Tt.folderItemSelected,Y&&Tt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!Y&&g(H.path),children:[H.depth>0&&r("div",{css:Tt.treeIndent,children:Array.from({length:H.depth}).map((ie,Q)=>r("div",{css:Tt.treeLine},Q))}),r("svg",{css:Tt.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),b("span",{css:Tt.folderName,children:[H.name,Y&&" (current)"]})]},H.path)})})]}),b("div",{css:Tt.footer,children:[r("button",{css:[Tt.btn,Tt.btnCancel,"",""],onClick:d,children:"Cancel"}),r("button",{css:[Tt.btn,Tt.btnConfirm,"",""],onClick:q,disabled:!C,children:"Move Here"})]})]})})}const h1=`CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
|
|
39
|
+
CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key
|
|
40
|
+
CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_key
|
|
41
|
+
CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
|
|
42
|
+
CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev
|
|
43
|
+
NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev`,ve={overlay:{name:"8ivopw",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.6);display:flex;align-items:center;justify-content:center;z-index:1100;padding:20px"},modal:y("background:",u.surface,";border-radius:12px;max-width:560px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 40px rgba(0, 0, 0, 0.3);",""),header:y("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",u.border,";",""),icon:y("width:32px;height:32px;color:",u.primary,";flex-shrink:0;",""),title:y("font-size:",V.xl,";font-weight:600;color:",u.text,";margin:0;",""),closeBtn:y("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",u.textMuted,";border-radius:4px;&:hover{color:",u.text,";background:",u.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:y("font-size:",V.base,";color:",u.textSecondary,";margin:0 0 20px 0;line-height:1.6;",""),steps:{name:"1fs2p21",styles:"list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px"},step:{name:"1wesxqa",styles:"display:flex;gap:12px"},stepNumber:y("width:28px;height:28px;border-radius:50%;background:",u.primaryLight,";color:",u.primary,";font-size:",V.sm,";font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0;",""),stepContent:{name:"pkc2k3",styles:"flex:1;padding-top:3px"},stepTitle:y("font-size:",V.base,";font-weight:500;color:",u.text,";margin:0 0 4px 0;",""),stepDesc:y("font-size:",V.sm,";color:",u.textSecondary,";margin:0;line-height:1.5;",""),link:y("color:",u.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:y("background:",u.background,";border:1px solid ",u.border,";border-radius:8px;padding:16px;padding-right:48px;font-family:'SF Mono',Monaco,'Cascadia Code',monospace;font-size:13px;line-height:1.8;color:",u.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:y("color:",u.primary,";",""),envValue:y("color:",u.textSecondary,";",""),copyBtn:y("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;color:",u.textMuted,";transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";color:",u.text,";border-color:#d0d5dd;}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},copiedTooltip:{name:"9a5yd1",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;&::before{content:'';position:absolute;right:-4px;top:50%;transform:translateY(-50%);border-left:4px solid #1a1f36;border-top:4px solid transparent;border-bottom:4px solid transparent;}"},footer:y("padding:16px 24px;border-top:1px solid ",u.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:y("padding:10px 16px;border-radius:6px;font-size:",V.base,";font-weight:500;border:1px solid ",u.border,";background:",u.surface,";color:",u.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:y("padding:10px 20px;border-radius:6px;font-size:",V.base,";font-weight:500;border:none;background:",u.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",u.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function Yp({isOpen:i,onClose:s}){const[f,d]=v.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(h1),d(!0),setTimeout(()=>d(!1),2e3)}catch(m){console.error("Failed to copy:",m)}};return i?r("div",{css:ve.overlay,onClick:s,children:b("div",{css:ve.modal,onClick:m=>m.stopPropagation(),children:[b("div",{css:ve.header,children:[r("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("h2",{css:ve.title,children:"Set Up CDN Storage"}),r("button",{css:ve.closeBtn,onClick:s,children:r("svg",{css:ve.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:ve.content,children:[r("p",{css:ve.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),b("ol",{css:ve.steps,children:[b("li",{css:ve.step,children:[r("span",{css:ve.stepNumber,children:"1"}),b("div",{css:ve.stepContent,children:[r("h4",{css:ve.stepTitle,children:"Create a Cloudflare account"}),b("p",{css:ve.stepDesc,children:["Sign up at"," ",r("a",{css:ve.link,href:"https://dash.cloudflare.com/sign-up",target:"_blank",rel:"noopener noreferrer",children:"dash.cloudflare.com"})," ","if you don't have one already."]})]})]}),b("li",{css:ve.step,children:[r("span",{css:ve.stepNumber,children:"2"}),b("div",{css:ve.stepContent,children:[r("h4",{css:ve.stepTitle,children:"Create an R2 bucket"}),b("p",{css:ve.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",r("code",{children:"my-images"}),"."]})]})]}),b("li",{css:ve.step,children:[r("span",{css:ve.stepNumber,children:"3"}),b("div",{css:ve.stepContent,children:[r("h4",{css:ve.stepTitle,children:"Enable public access"}),b("p",{css:ve.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',r("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),b("li",{css:ve.step,children:[r("span",{css:ve.stepNumber,children:"4"}),b("div",{css:ve.stepContent,children:[r("h4",{css:ve.stepTitle,children:"Create API token"}),r("p",{css:ve.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),b("li",{css:ve.step,children:[r("span",{css:ve.stepNumber,children:"5"}),b("div",{css:ve.stepContent,children:[r("h4",{css:ve.stepTitle,children:"Add environment variables"}),b("p",{css:ve.stepDesc,children:["Add these to your ",r("code",{children:".env.local"})," file:"]})]})]})]}),b("div",{css:ve.envVarsWrapper,children:[b("div",{css:ve.envVars,children:[b("span",{css:ve.envVar,children:[r("span",{css:ve.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",r("span",{css:ve.envValue,children:"your_account_id"})]}),b("span",{css:ve.envVar,children:[r("span",{css:ve.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",r("span",{css:ve.envValue,children:"your_access_key"})]}),b("span",{css:ve.envVar,children:[r("span",{css:ve.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",r("span",{css:ve.envValue,children:"your_secret_key"})]}),b("span",{css:ve.envVar,children:[r("span",{css:ve.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",r("span",{css:ve.envValue,children:"your_bucket_name"})]}),b("span",{css:ve.envVar,children:[r("span",{css:ve.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:ve.envValue,children:"https://pub-xxx.r2.dev"})]}),b("span",{css:ve.envVar,children:[r("span",{css:ve.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:ve.envValue,children:"https://pub-xxx.r2.dev"})]})]}),b("button",{css:ve.copyBtn,onClick:h,title:"Copy to clipboard",children:[f&&r("span",{css:ve.copiedTooltip,children:"Copied!"}),r("svg",{css:ve.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]})]}),b("div",{css:ve.footer,children:[b("a",{css:ve.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",r("svg",{css:ve.externalIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),r("button",{css:ve.doneBtn,onClick:s,children:"Got it"})]})]})}):null}const p1=ln`
|
|
44
|
+
from { opacity: 0; }
|
|
45
|
+
to { opacity: 1; }
|
|
46
|
+
`,m1=ln`
|
|
47
|
+
from {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
transform: translateY(-8px) scale(0.98);
|
|
50
|
+
}
|
|
51
|
+
to {
|
|
52
|
+
opacity: 1;
|
|
53
|
+
transform: translateY(0) scale(1);
|
|
54
|
+
}
|
|
55
|
+
`,bt={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",p1," 0.15s ease-out;font-family:",fi,";",""),modal:y(ro," background-color:",u.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:",m1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",V.lg,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),tabs:y("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",u.border,";",""),tab:y("padding:12px 20px;font-size:",V.base,";font-weight:500;color:",u.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",u.text,";}",""),tabActive:y("color:",u.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",u.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:y("border:2px dashed ",u.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",u.primary,";background-color:",u.primaryLight,";}",""),dropzoneActive:y("border-color:",u.primary,";background-color:",u.primaryLight,";",""),dropzoneIcon:y("width:48px;height:48px;margin:0 auto 16px;color:",u.textMuted,";",""),dropzoneText:y("font-size:",V.base,";color:",u.text,";margin:0 0 4px;",""),dropzoneHint:y("font-size:",V.sm,";color:",u.textSecondary,";margin:0;",""),textarea:y("width:100%;min-height:150px;padding:12px;font-size:",V.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",u.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 3px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}",""),textareaLabel:y("font-size:",V.sm,";color:",u.textSecondary,";margin:0 0 8px;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",u.border,";background-color:",u.background,";",""),btn:y("padding:10px 18px;font-size:",V.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",u.surface,";border:1px solid ",u.border,";color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),btnConfirm:y("background-color:",u.primary,";border:1px solid ",u.primary,";color:white;&:hover:not(:disabled){background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:y("margin-top:16px;padding:12px;background-color:",u.background,";border-radius:6px;font-size:",V.sm,";color:",u.text,";","")};function g1({currentPath:i,onClose:s,onUploadComplete:f,streamingOperation:d,setShowProgress:h,setProgressTitle:m,setProgressState:w}){const[D,C]=v.useState("upload"),[g,T]=v.useState([]),[z,B]=v.useState(""),[q,H]=v.useState(!1),[Y,ie]=v.useState(!1),[Q,ce]=v.useState(!1),ae=v.useRef(null),de=v.useCallback(U=>{U&&T(Array.from(U))},[]),X=v.useCallback(U=>{U.preventDefault(),H(!1),de(U.dataTransfer.files)},[de]),P=v.useRef(!1),I=v.useCallback(async()=>{if(g.length!==0){if(h&&m&&w){s(),P.current=!1,m("Uploading Files"),h(!0),w({current:0,total:g.length,percent:0,status:"processing",message:"Uploading..."});let U=0;const Z=[];for(let he=0;he<g.length;he++){if(P.current){w(ne=>({...ne,status:"stopped",message:`Stopped. Uploaded ${U} file${U!==1?"s":""}.`})),f();return}const me=g[he],pe=new FormData;pe.append("file",me),pe.append("path",i);try{(await fetch("/api/studio/upload",{method:"POST",body:pe})).ok?U++:Z.push(me.name)}catch{Z.push(me.name)}w({current:he+1,total:g.length,percent:Math.round((he+1)/g.length*100),status:"processing",currentFile:me.name})}w({current:g.length,total:g.length,percent:100,status:"complete",message:`Uploaded ${U} file${U!==1?"s":""}.${Z.length>0?` ${Z.length} failed.`:""}`}),f();return}ie(!0);try{for(const U of g){const Z=new FormData;Z.append("file",U),Z.append("path",i),await fetch("/api/studio/upload",{method:"POST",body:Z})}f(),s()}catch(U){console.error("Upload failed:",U)}finally{ie(!1)}}},[g,i,f,s,h,m,w]),te=v.useCallback(async()=>{const U=z.split(`
|
|
56
|
+
`).map(Z=>Z.trim()).filter(Z=>Z.length>0);if(U.length!==0){if(d){s(),await d.execute({endpoint:"/api/studio/import",body:{urls:U},title:"Importing URLs",onComplete:()=>{f()}});return}ce(!0);try{const he=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:U})})).body?.getReader();if(!he)throw new Error("No reader");const me=new TextDecoder;for(;;){const{done:pe,value:ne}=await he.read();if(pe)break;const E=me.decode(ne).split(`
|
|
57
|
+
|
|
58
|
+
`).filter($=>$.startsWith("data: "));for(const $ of E)JSON.parse($.replace("data: ","")).type==="complete"&&(f(),s())}}catch(Z){console.error("Import failed:",Z)}finally{ce(!1)}}},[z,f,s,d]);return r("div",{css:bt.overlay,onClick:s,children:b("div",{css:bt.modal,onClick:U=>U.stopPropagation(),children:[b("div",{css:bt.header,children:[r("h3",{css:bt.title,children:"Add New"}),b("div",{css:bt.tabs,children:[r("button",{css:[bt.tab,D==="upload"&&bt.tabActive,"",""],onClick:()=>C("upload"),children:"Upload Files"}),r("button",{css:[bt.tab,D==="import"&&bt.tabActive,"",""],onClick:()=>C("import"),children:"Import URLs"})]})]}),r("div",{css:bt.body,children:D==="upload"?b(Pe,{children:[b("div",{css:[bt.dropzone,q&&bt.dropzoneActive,"",""],onClick:()=>ae.current?.click(),onDragOver:U=>{U.preventDefault(),H(!0)},onDragLeave:()=>H(!1),onDrop:X,children:[r("svg",{css:bt.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:bt.dropzoneText,children:"Drop files here or click to browse"}),r("p",{css:bt.dropzoneHint,children:"Supports images and other media files"})]}),r("input",{ref:ae,type:"file",multiple:!0,css:bt.fileInput,onChange:U=>de(U.target.files)}),g.length>0&&b("div",{css:bt.selectedFiles,children:[g.length," file",g.length!==1?"s":""," selected"]})]}):b(Pe,{children:[r("p",{css:bt.textareaLabel,children:"Paste image URLs (one per line)"}),r("textarea",{css:bt.textarea,value:z,onChange:U=>B(U.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
|
|
59
|
+
https://cdn.example.com/photos/image2.jpg`})]})}),b("div",{css:bt.footer,children:[r("button",{css:[bt.btn,bt.btnCancel,"",""],onClick:s,children:"Cancel"}),D==="upload"?r("button",{css:[bt.btn,bt.btnConfirm,"",""],onClick:I,disabled:g.length===0||Y,children:Y?"Uploading...":"Upload"}):r("button",{css:[bt.btn,bt.btnConfirm,"",""],onClick:te,disabled:!z.trim()||Q,children:Q?"Importing...":"Import"})]})]})})}const y1="36px",Ne={btn:y("height:",y1,";padding:0 12px;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),icon:y("width:16px;height:16px;color:",u.textSecondary,";",""),overlay:{name:"1cy1r91",styles:"position:fixed;top:0;right:0;bottom:0;left:0;z-index:10000;display:flex;align-items:flex-start;justify-content:center;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);overflow-y:auto;scroll-behavior:smooth;padding:48px 24px"},panel:y(ro," position:relative;background-color:",u.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);width:100%;max-width:512px;padding:24px;margin:auto 0;",""),header:{name:"1o4fids",styles:"display:flex;align-items:center;justify-content:space-between;margin-bottom:24px"},title:y("font-size:",V.xl,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:y("padding:6px;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:y("font-size:",V.base,";font-weight:600;color:",u.text,";margin:0 0 12px 0;",""),description:y("font-size:",V.sm,";color:",u.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:y("background-color:",u.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",V.xs,";color:",u.textSecondary,";border:1px solid ",u.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:y("position:absolute;top:8px;right:8px;padding:4px;background:",u.surface,";border:1px solid ",u.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),tooltip:{name:"6eskey",styles:"position:absolute;bottom:100%;left:50%;transform:translateX(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-bottom:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;top:100%;left:50%;transform:translateX(-50%);border:4px solid transparent;border-top-color:#1a1f36;}"},copyIcon:y("width:14px;height:14px;color:",u.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:y("width:100%;padding:10px 14px;border:1px solid ",u.border,";border-radius:6px;font-size:",V.base,";color:",u.text,";background:",u.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 3px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:y("font-size:",V.xs,";font-weight:500;color:",u.textSecondary,";display:block;margin-bottom:6px;",""),footer:y("margin-top:24px;padding-top:20px;border-top:1px solid ",u.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:y("padding:10px 18px;font-size:",V.base,";font-weight:500;color:",u.text,";background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),saveBtn:y("padding:10px 18px;font-size:",V.base,";font-weight:500;color:white;background-color:",u.primary,";border:1px solid ",u.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),cdnList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},cdnRow:{name:"197tvr9",styles:"display:flex;gap:8px;align-items:center"},cdnInput:y("flex:1;padding:8px 12px;border:1px solid ",u.border,";border-radius:6px;font-size:",V.sm,";color:",u.text,";background:",u.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 3px ",u.primaryLight,";}",""),cdnIndex:y("font-size:",V.xs,";color:",u.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:y("padding:6px;background:none;border:none;cursor:pointer;color:",u.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",u.danger,";}",""),cdnAddBtn:y("padding:8px 12px;font-size:",V.sm,";font-weight:500;color:",u.primary,";background:",u.primaryLight,";border:1px dashed ",u.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:",u.surface,";}",""),warning:y("font-size:",V.xs,";color:",u.danger,";margin-top:8px;padding:8px 12px;background:",u.dangerLight,";border-radius:6px;","")};function b1(){const[i,s]=v.useState(!1);return b(Pe,{children:[r("button",{css:Ne.btn,onClick:()=>s(!0),"aria-label":"Settings",children:b("svg",{css:Ne.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(x1,{onClose:()=>s(!1)})]})}const v1=`# Dev site link (opens from Studio header)
|
|
60
|
+
STUDIO_DEV_SITE_URL=http://localhost:3000
|
|
61
|
+
|
|
62
|
+
# Cloudflare R2 Storage
|
|
63
|
+
CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
|
|
64
|
+
CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id
|
|
65
|
+
CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key
|
|
66
|
+
CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
|
|
67
|
+
CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function x1({onClose:i}){const{triggerRefresh:s}=oo(),[f,d]=v.useState(!1),[h,m]=v.useState([]),[w,D]=v.useState(!0),[C,g]=v.useState(!1),[T,z]=v.useState(!1);v.useEffect(()=>{async function Q(){try{const ae=await(await fetch("/api/studio/cdns")).json();m(ae.cdns||[])}catch(ce){console.error("Failed to load CDN URLs:",ce)}finally{D(!1)}}Q()},[]);const B=()=>{navigator.clipboard.writeText(v1),d(!0),setTimeout(()=>d(!1),2e3)},q=v.useCallback((Q,ce)=>{m(ae=>{const de=[...ae];return de[Q]=ce,de}),z(!0)},[]),H=v.useCallback(()=>{m(Q=>[...Q,""]),z(!0)},[]),Y=v.useCallback(Q=>{m(ce=>ce.filter((ae,de)=>de!==Q)),z(!0)},[]),ie=v.useCallback(async()=>{g(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:h})})).ok&&(z(!1),s(),i())}catch(Q){console.error("Failed to save CDN URLs:",Q)}finally{g(!1)}},[h,s,i]);return r("div",{css:Ne.overlay,onClick:i,children:b("div",{css:Ne.panel,onClick:Q=>Q.stopPropagation(),children:[b("div",{css:Ne.header,children:[r("h2",{css:Ne.title,children:"Settings"}),r("button",{css:Ne.closeBtn,onClick:i,children:r("svg",{css:Ne.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:Ne.sections,children:[b("section",{children:[r("h3",{css:Ne.sectionTitle,children:"CDN URLs"}),r("p",{css:Ne.description,children:"Manage CDN base URLs used by your images:"}),w?r("p",{css:Ne.description,children:"Loading..."}):b(Pe,{children:[r("div",{css:Ne.cdnList,children:h.map((Q,ce)=>b("div",{css:Ne.cdnRow,children:[r("span",{css:Ne.cdnIndex,children:ce}),r("input",{css:Ne.cdnInput,type:"text",value:Q,onChange:ae=>q(ce,ae.target.value),placeholder:"https://cdn.example.com"}),r("button",{css:Ne.cdnDeleteBtn,onClick:()=>Y(ce),title:"Delete CDN URL",children:r("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},ce))}),b("button",{css:Ne.cdnAddBtn,onClick:H,children:[r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),h.length>0&&r("p",{css:Ne.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),b("section",{children:[r("h3",{css:Ne.sectionTitle,children:"Environment Variables"}),b("p",{css:Ne.description,children:["Configure in ",r("code",{children:".env.local"})," file (local development only, not needed in production):"]}),b("div",{css:Ne.codeWrapper,children:[b("button",{css:Ne.copyBtn,onClick:B,title:"Copy to clipboard",children:[f&&r("span",{css:Ne.tooltip,children:"Copied!"}),r("svg",{css:Ne.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),b("div",{css:Ne.code,children:[r("p",{css:Ne.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),r("p",{css:Ne.codeLine,children:" "}),r("p",{css:Ne.codeLine,children:"# Cloudflare R2 Storage"}),r("p",{css:Ne.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),r("p",{css:Ne.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),r("p",{css:Ne.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),r("p",{css:Ne.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),r("p",{css:Ne.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),b("section",{children:[r("h3",{css:Ne.sectionTitle,children:"Thumbnail Sizes"}),b("div",{css:Ne.grid,children:[b("div",{children:[r("label",{css:Ne.label,children:"Small"}),r("input",{css:Ne.input,type:"number",defaultValue:300})]}),b("div",{children:[r("label",{css:Ne.label,children:"Medium"}),r("input",{css:Ne.input,type:"number",defaultValue:700})]}),b("div",{children:[r("label",{css:Ne.label,children:"Large"}),r("input",{css:Ne.input,type:"number",defaultValue:1400})]})]})]})]}),b("div",{css:Ne.footer,children:[r("button",{css:Ne.cancelBtn,onClick:i,children:"Cancel"}),r("button",{css:Ne.saveBtn,onClick:ie,disabled:C||!T,children:C?"Saving...":"Save Changes"})]})]})})}const au="36px",S1=ln`
|
|
68
|
+
to { transform: rotate(360deg); }
|
|
69
|
+
`,ke={toolbar:y("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",u.surface,";border-bottom:1px solid ",u.border,";overflow:visible;min-width:0;@media (min-width: 768px){padding:12px 24px;}",""),left:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},right:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},btn:y("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",au,";padding:0 14px;border-radius:6px;font-size:",V.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";cursor:pointer;transition:all 0.15s ease;color:",u.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:y("background:",u.primary,";border-color:",u.primary,";color:white;&:hover:not(:disabled){background:",u.primaryHover,";border-color:",u.primaryHover,";}",""),btnDanger:y("color:",u.danger,";&:hover:not(:disabled){background-color:",u.dangerLight,";border-color:",u.danger,";}",""),btnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},cloudDropdownWrapper:{name:"bjn8wh",styles:"position:relative"},dropdownArrow:{name:"1j1hlpy",styles:"width:12px;height:12px;margin-left:4px"},cloudDropdown:y("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",u.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:y("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",V.sm,";color:",u.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",u.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:y("svg{color:",u.text,";}",""),cloudDropdownItemDanger:y("color:",u.danger,";svg{color:",u.danger,";}",""),cloudDropdownDivider:y("height:1px;background-color:",u.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:y("animation:",S1," 1s linear infinite;",""),selectionCount:y("font-size:",V.base,";color:",u.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:y("color:",u.primary,";background:none;border:none;cursor:pointer;font-size:",V.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:y("width:1px;height:24px;background:",u.border,";margin:0 4px;",""),viewToggle:y("display:flex;align-items:center;height:",au,";background-color:",u.surface,";border:1px solid ",u.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:y("height:",au,";padding:0 32px 0 12px;border:1px solid ",u.border,";border-radius:6px;font-size:",V.base,";background:",u.surface,";color:",u.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 2px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}",""),searchClearBtn:y("position:absolute;right:5px;top:5px;bottom:5px;background:",u.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:",u.primaryHover,";}",""),viewBtn:y("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",u.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",u.text,";background-color:",u.surfaceHover,";}",""),viewBtnActive:y("background-color:",u.primaryLight,";color:",u.primary,";&:hover{background-color:",u.primaryLight,";color:",u.primary,";}","")};function C1(){const{selectedItems:i,viewMode:s,setViewMode:f,clearSelection:d,currentPath:h,triggerRefresh:m,focusedItem:w,scanRequested:D,clearScanRequest:C,fileItems:g,requestProcess:T,setProcessMode:z,actionState:B,cancelAction:q}=oo(),H=v.useRef(null),Y=v.useRef(null),[ie,Q]=v.useState(!1),[ce,ae]=v.useState(!1),[de,X]=v.useState(!1),[P,I]=v.useState(!1),[te,U]=v.useState(!1),[Z,he]=v.useState(0),[me,pe]=v.useState(!1),[ne,Oe]=v.useState(0),[E,$]=v.useState(!1),[W,De]=v.useState(!1),[qe,x]=v.useState(!1),[_,ee]=v.useState(0),[oe,Se]=v.useState(!1),[K,Ce]=v.useState("Processing Images"),[Ye,ze]=v.useState({current:0,total:0,percent:0,status:"processing"}),[Rt,Ze]=v.useState(null),[ut,mt]=v.useState(!1),[qt,Yt]=v.useState(!1),[tn,Qt]=v.useState(!1),[hn,It]=v.useState(!1),[dt,Xt]=v.useState(!1),[wt,Re]=v.useState(!1),[Dt,wn]=v.useState(!1),[Yn,Hn]=v.useState(!1),kn=v.useRef(null),F=v.useRef(null),se=jp({setShowProgress:Se,setProgressTitle:Ce,setProgressState:ze,triggerRefresh:m}),Ge=h==="public/images"||h.startsWith("public/images/");v.useCallback(()=>{H.current?.click()},[]);const et=v.useCallback(()=>{I(!0),m(),setTimeout(()=>I(!1),600)},[m]),Be=v.useCallback(async()=>{X(!0),Ce("Scanning Files"),Se(!0),ze({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const le=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!le)throw new Error("No reader");const ye=new TextDecoder;let be="";for(;;){const{done:Le,value:He}=await le.read();if(Le)break;be+=ye.decode(He,{stream:!0});const We=be.split(`
|
|
70
|
+
|
|
71
|
+
`);be=We.pop()||"";for(const Ie of We){if(!Ie.startsWith("data: "))continue;const Ue=JSON.parse(Ie.slice(6));if(Ue.type==="start")ze({current:0,total:Ue.total,percent:0,status:"processing",message:`Scanning ${Ue.total} files...`});else if(Ue.type==="progress")ze({current:Ue.current,total:Ue.total,percent:Ue.percent,status:"processing",currentFile:Ue.currentFile});else if(Ue.type==="cleanup")ze(nn=>({...nn,message:Ue.message}));else if(Ue.type==="complete"){let nn=Ue.renamed>0?`${Ue.renamed} file(s) renamed due to conflicts. `:"";Ue.orphanedFiles&&Ue.orphanedFiles.length>0&&(nn+=`Found ${Ue.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),ze({current:Ue.total||0,total:Ue.total||0,percent:100,status:"complete",processed:Ue.added,alreadyProcessed:Ue.existingCount,errors:Ue.errors,orphanedFiles:Ue.orphanedFiles,pendingUpdates:Ue.pendingUpdates,orphanedEntries:Ue.orphanedEntries,message:nn||void 0,isScan:!0}),m()}else Ue.type==="error"&&ze({current:0,total:0,percent:0,status:"error",message:Ue.message||"Scan failed"})}}}catch(fe){console.error("Scan error:",fe),ze({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{X(!1)}},[m]);v.useEffect(()=>{const fe=le=>{kn.current&&!kn.current.contains(le.target)&&wn(!1),F.current&&!F.current.contains(le.target)&&Hn(!1)};return document.addEventListener("mousedown",fe),()=>document.removeEventListener("mousedown",fe)},[]),v.useEffect(()=>{D&&!de&&(C(),Be())},[D,de,C,Be]);const Ee=v.useCallback(async fe=>{const le=fe.target.files;if(!le||le.length===0)return;const ye=Array.from(le);ye.length>1?(ze({current:0,total:ye.length,percent:0,status:"processing",message:"Uploading files..."}),Se(!0)):ae(!0);let be=0,Le=0;try{for(let He=0;He<ye.length;He++){const We=ye[He],Ie=new FormData;Ie.append("file",We),Ie.append("path",h);try{const Ue=await fetch("/api/studio/upload",{method:"POST",body:Ie});if(Ue.ok)be++;else{const nn=await Ue.json();Le++,ye.length===1&&(Ue.status>=500?(console.error("Upload error:",nn),Ze({title:"Upload Failed",message:`Failed to upload ${We.name}: ${nn.error||"Unknown error"}`})):Ze({title:"Cannot Upload Here",message:nn.error||"Upload not allowed in this location."}))}}catch{Le++}ye.length>1&&ze({current:He+1,total:ye.length,percent:Math.round((He+1)/ye.length*100),status:"processing",currentFile:We.name})}ye.length>1&&ze({current:ye.length,total:ye.length,percent:100,status:"complete",processed:be,errors:Le}),m()}catch(He){console.error("Upload error:",He),ye.length>1?ze({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):Ze({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{ae(!1),H.current&&(H.current.value="")}},[h,m]),xt=v.useCallback(async fe=>{if(i.size>0){const ye=Array.from(i),be=ye.filter(He=>(He.split("/").pop()||"").includes(".")&&!He.endsWith("/")),Le=ye.filter(He=>!(He.split("/").pop()||"").includes(".")||He.endsWith("/"));if(Le.length>0)try{const We=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(Le.join(","))}`)).json();if(We.images)for(const Ie of We.images){const Ue=`public/${Ie}`;be.includes(Ue)||be.push(Ue)}}catch(He){console.error("Failed to get folder files:",He)}if(be.length===0){Ze({title:"No Files Found",message:"No files found in the selected items."});return}z(fe),T(be)}else try{const be=await(await fetch("/api/studio/count-images")).json();if(!be.images||be.images.length===0){Ze({title:"No Images Found",message:"No images found in the public folder to process."});return}const Le=be.images.map(He=>`public/${He}`);z(fe),T(Le)}catch(ye){console.error("Failed to get images:",ye),Ze({title:"Error",message:"Failed to get images."})}},[i,T,z]),gt=v.useCallback(()=>{se.stop(),Y.current&&(ze(fe=>({...fe,status:"stopping"})),Y.current.abort())},[se]),pl=v.useCallback(async()=>{const fe=Ye.orphanedFiles;if(!(!fe||fe.length===0))try{const le=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:fe})}),ye=await le.json();le.ok?(ze(be=>({...be,orphanedFiles:void 0,orphansRemoved:ye.deleted,message:`Deleted ${ye.deleted} orphaned thumbnail${ye.deleted!==1?"s":""}.`})),m()):Ze({title:"Delete Failed",message:ye.error||"Failed to delete orphaned files."})}catch(le){console.error("Delete orphans error:",le),Ze({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[Ye.orphanedFiles,m]),Qa=v.useCallback(async()=>{if(i.size===0)return;const fe=Array.from(i),le=fe.filter(Le=>(Le.split("/").pop()||"").includes(".")&&!Le.endsWith("/")),ye=fe.filter(Le=>!(Le.split("/").pop()||"").includes(".")||Le.endsWith("/"));let be=le.length;if(ye.length>0)try{const He=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ye.join(","))}`)).json();He.images&&(be+=He.images.length)}catch(Le){console.error("Failed to get folder files:",Le)}he(be),U(!0)},[i]),Nr=v.useCallback(async()=>{U(!1);const fe=Array.from(i);fe.length!==0&&await se.execute({endpoint:"/api/studio/delete-stream",body:{paths:fe},title:"Deleting Files",operationType:"delete",onComplete:()=>{d()}})},[i,d,se]),ml=v.useCallback(async()=>{if(i.size===0)return;const fe=Array.from(i),le=fe.filter(Ie=>(Ie.split("/").pop()||"").includes(".")&&!Ie.endsWith("/")),ye=fe.filter(Ie=>!(Ie.split("/").pop()||"").includes(".")||Ie.endsWith("/")),be=ye.length>0;if(be)try{const Ue=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ye.join(","))}`)).json();if(Ue.images)for(const nn of Ue.images){const po=`public/${nn}`;le.includes(po)||le.push(po)}}catch(Ie){console.error("Failed to get folder files:",Ie)}if(le.length===0){Ze({title:"No Files Found",message:"No files found in the selected items."});return}let Le=!1,He=!1,We=0;for(const Ie of le){const Ue=g.find(nn=>nn.path===Ie);Ue?Ue.isRemote?Le=!0:Ue.cdnPushed?We++:He=!0:be&&(He=!0)}if(!be&&We===le.length){Ze({title:"Already Pushed",message:`All ${le.length} file${le.length!==1?"s are":" is"} already on the CDN.`});return}Oe(le.length),$(Le),De(He),pe(!0)},[i,g]),gl=v.useCallback(async()=>{pe(!1);const fe=Array.from(i),le=fe.filter(Le=>(Le.split("/").pop()||"").includes(".")&&!Le.endsWith("/")),ye=fe.filter(Le=>!(Le.split("/").pop()||"").includes(".")||Le.endsWith("/"));if(ye.length>0)try{const He=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ye.join(","))}`)).json();if(He.images)for(const We of He.images){const Ie=`public/${We}`;le.includes(Ie)||le.push(Ie)}}catch(Le){console.error("Failed to get folder files:",Le)}const be=le.map(Le=>"/"+Le.replace(/^public\//,""));be.length!==0&&await se.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:be},title:"Pushing to CDN",onComplete:()=>{d()},onError:Le=>{(Le.includes("R2 not configured")||Le.includes("CLOUDFLARE_R2"))&&(Se(!1),Xt(!0))}})},[i,d,se]),[Ka,$n]=v.useState([]),[yl,Za]=v.useState(0),jr=v.useCallback(async()=>{if(i.size===0)return;const fe=Array.from(i),le=fe.filter(He=>(He.split("/").pop()||"").includes(".")&&!He.endsWith("/")),ye=fe.filter(He=>!(He.split("/").pop()||"").includes(".")||He.endsWith("/")),be=ye.length>0;if(be)try{const We=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ye.join(","))}`)).json();if(We.images)for(const Ie of We.images){const Ue=`public/${Ie}`;le.includes(Ue)||le.push(Ue)}}catch(He){console.error("Failed to get folder files:",He)}if(le.length===0){Ze({title:"No Files Found",message:"No files found in the selected items."});return}let Le;if(be)Le=le;else if(Le=le.filter(He=>{const We=g.find(Ie=>Ie.path===He);return We&&We.cdnPushed&&!We.isRemote}),Le.length===0){Ze({title:"No CDN Files",message:`None of the ${le.length} selected file${le.length!==1?"s are":" is"} on the CDN.`});return}$n(Le),Za(le.length),ee(Le.length),x(!0)},[i,g]),hi=v.useCallback(async()=>{x(!1),B.showDownloadConfirm&&q();const le=(B.showDownloadConfirm?B.actionPaths:Ka).map(ye=>"/"+ye.replace(/^public\//,""));await se.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:le},title:"Downloading from CDN",onComplete:()=>d()})},[Ka,d,B.showDownloadConfirm,B.actionPaths,q,se]),so=v.useCallback(async()=>{if(i.size===0)return;const le=Array.from(i).filter(ye=>{const be=g.find(Le=>Le.path===ye);return be&&(be.hasUpdate||be.type==="folder"&&be.updateCount&&be.updateCount>0)});if(le.length===0){Ze({title:"No Updates",message:"No files with pending updates in selection."});return}await se.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:le},title:"Pushing Updates",onComplete:()=>d()})},[i,g,d,se]),Fa=v.useCallback(async()=>{if(i.size===0)return;const le=Array.from(i).filter(ye=>{const be=g.find(Le=>Le.path===ye);return be&&(be.hasUpdate||be.type==="folder"&&be.updateCount&&be.updateCount>0)});if(le.length!==0)try{const ye=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:le})});if(ye.ok)d(),m();else{const be=await ye.json();Ze({title:"Cancel Failed",message:be.error||"Unknown error"})}}catch(ye){console.error("Cancel updates error:",ye),Ze({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[i,g,d,m]),qr=v.useCallback(async fe=>{mt(!1);try{const le=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:fe})});if(le.ok)m();else{const ye=await le.json();Ze({title:"Create Folder Failed",message:ye.error||"Unknown error"})}}catch(le){console.error("Create folder error:",le),Ze({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,m]),pi=v.useCallback(()=>{i.size!==0&&It(!0)},[i]),mi=v.useCallback(async fe=>{const le=Array.from(i);await se.execute({endpoint:"/api/studio/move",body:{paths:le,destination:fe},title:"Moving Files",onComplete:()=>d()})},[i,d,se]),{searchQuery:co,setSearchQuery:Wn}=oo(),uo=v.useCallback(fe=>{Wn(fe.target.value)},[Wn]),gi=v.useCallback(fe=>{fe.key==="Escape"&&(fe.stopPropagation(),Wn(""),fe.target.blur())},[Wn]),Un=i.size>0;Un&&Array.from(i).some(fe=>{const le=g.find(ye=>ye.path===fe);return le&&le.cdnPushed&&!le.isRemote}),Un&&Array.from(i).every(fe=>{const le=g.find(ye=>ye.path===fe);return le&&le.type==="file"&&le.cdnPushed&&!le.isRemote});const Gn=Un&&Array.from(i).some(fe=>{const le=g.find(ye=>ye.path===fe);return le&&(le.hasUpdate||le.type==="folder"&&le.updateCount&&le.updateCount>0)}),kt=Array.from(i),Lt=kt.length===1&&!kt[0].includes("."),pn=Lt?kt[0]:null,bl=pn&&pn.split("/").pop()||"",ya=kt.length===1&&kt[0].includes("."),ba=ya?kt[0]:null,fo=ba&&ba.split("/").pop()||"",Ja=v.useCallback(async fe=>{pn&&(Yt(!1),await se.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:pn,newName:fe},title:"Renaming Folder",onComplete:()=>d()}))},[pn,d,se]),ho=v.useCallback(async fe=>{ba&&(Qt(!1),await se.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:ba,newName:fe},title:"Renaming File",onComplete:()=>d()}))},[ba,d,se]),In=b(Pe,{children:[(qe||B.showDownloadConfirm)&&r(no,{title:"Download from CDN",message:(()=>{const fe=B.showDownloadConfirm?B.downloadImageCount:_,le=B.showDownloadConfirm?B.downloadTotalSelected:yl;return le>fe?`Download ${fe} of ${le} selected file${le!==1?"s":""} from Cloudflare R2? (${le-fe} not on CDN)`:`Download ${fe} image${fe!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:hi,onCancel:()=>{x(!1),B.showDownloadConfirm&&q()}}),oe&&r(hl,{title:K,progress:Ye,onStop:gt,onDeleteOrphans:pl,onClose:()=>{Se(!1),ze({current:0,total:0,percent:0,status:"processing"}),m()}})]});return w?In:b(Pe,{children:[In,te&&r(no,{title:"Delete Items",message:`Are you sure you want to delete ${Z} file${Z!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Nr,onCancel:()=>U(!1)}),me&&r(no,{title:"Push to CDN",message:`Push ${ne} image${ne!==1?"s":""} to Cloudflare R2?${E?" Remote images will be downloaded first.":""}${W?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:gl,onCancel:()=>pe(!1)}),ut&&r(ao,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:qr,onCancel:()=>mt(!1)}),hn&&r(qp,{selectedItems:i,currentPath:h,onMove:fe=>{It(!1),mi(fe)},onCancel:()=>It(!1)}),qt&&pn&&r(ao,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:bl,defaultValue:bl,confirmLabel:"Rename",onConfirm:Ja,onCancel:()=>Yt(!1)}),tn&&ba&&r(ao,{title:"Rename File",message:"Enter a new name for the file:",placeholder:fo,defaultValue:fo,confirmLabel:"Rename",onConfirm:ho,onCancel:()=>Qt(!1)}),Rt&&r(pu,{title:Rt.title,message:Rt.message,onClose:()=>{Ze(null),m()}}),r(Yp,{isOpen:dt,onClose:()=>Xt(!1)}),ie&&r(g1,{currentPath:h,onClose:()=>Q(!1),onUploadComplete:()=>{Q(!1),m()},streamingOperation:se,setShowProgress:Se,setProgressTitle:Ce,setProgressState:ze}),b("div",{css:ke.toolbar,children:[r("input",{ref:H,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:Ee,style:{display:"none"}}),b("div",{css:ke.left,children:[b("button",{css:[ke.btn,ke.btnPrimary,"",""],onClick:()=>Q(!0),disabled:ce||Ge,children:[r(w1,{}),"Add New"]}),b("button",{css:ke.btn,onClick:()=>{ya?Qt(!0):Lt?Yt(!0):mt(!0)},disabled:Ge&&!Lt&&!ya,title:Ge&&!Lt&&!ya?"Cannot create folders in protected images folder":void 0,children:[ya||Lt?r(E1,{}):r(D1,{}),ya?"Rename File":Lt?"Rename Folder":"New Folder"]}),r("div",{css:ke.divider}),b("div",{css:ke.cloudDropdownWrapper,ref:F,children:[b("button",{css:ke.btn,onClick:()=>Hn(!Yn),disabled:B.showProgress||Ge,title:Ge?"Cannot process images folder":void 0,children:[r(H1,{}),"Thumbnails",r("svg",{css:ke.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Yn&&b("div",{css:ke.cloudDropdown,children:[b("button",{css:[ke.cloudDropdownItem,ke.cloudDropdownItemDefault,"",""],onClick:()=>{Hn(!1),xt("generate")},children:[r(U1,{}),"Generate Thumbnails"]}),b("button",{css:[ke.cloudDropdownItem,ke.cloudDropdownItemDanger,"",""],onClick:()=>{Hn(!1),xt("remove")},children:[r(B1,{}),"Remove Thumbnails"]})]})]}),b("button",{css:[ke.btn,ke.btnDanger,"",""],onClick:Qa,disabled:!Un,children:[r(M1,{}),"Delete"]}),b("button",{css:ke.btn,onClick:pi,disabled:!Un,children:[r(A1,{}),"Move"]}),b("div",{css:ke.cloudDropdownWrapper,ref:kn,children:[b("button",{css:[ke.btn,ke.btnCloud,"",""],onClick:()=>wn(!Dt),disabled:!Un,children:[r(Cp,{}),"Cloud",r("svg",{css:ke.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Dt&&Un&&b("div",{css:ke.cloudDropdown,children:[Gn&&b(Pe,{children:[b("button",{css:ke.cloudDropdownItem,onClick:()=>{wn(!1),so()},children:[r(T1,{}),"Push Update"]}),b("button",{css:[ke.cloudDropdownItem,ke.cloudDropdownItemDanger,"",""],onClick:()=>{wn(!1),Fa()},children:[r(R1,{}),"Cancel Update"]}),r("div",{css:ke.cloudDropdownDivider})]}),b("button",{css:ke.cloudDropdownItem,onClick:()=>{wn(!1),ml()},children:[r(Cp,{}),"Push CDN"]}),b("button",{css:ke.cloudDropdownItem,onClick:()=>{wn(!1),jr()},children:[r(L1,{}),"Download"]})]})]}),b("div",{css:ke.searchWrapper,children:[r("input",{css:ke.searchInput,type:"text",placeholder:"Search images...",value:co,onChange:uo,onKeyDown:gi}),co&&r("button",{css:ke.searchClearBtn,onClick:()=>Wn(""),title:"Clear search",children:r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),b("div",{css:ke.right,children:[Un&&b("span",{css:ke.selectionCount,children:[i.size," selected",r("button",{css:ke.clearBtn,onClick:d,children:"Clear"})]}),b("button",{css:ke.btn,onClick:Be,disabled:de,children:[r(k1,{spinning:de}),"Scan"]}),r("button",{css:ke.btn,onClick:et,title:"Refresh view",disabled:P,children:r(z1,{spinning:P})}),b("div",{css:ke.viewToggle,children:[r("button",{css:[ke.viewBtn,s==="grid"&&ke.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:r(_1,{})}),r("button",{css:[ke.viewBtn,s==="list"&&ke.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:r(O1,{})})]}),r(b1,{})]})]})]})}function w1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function k1({spinning:i}){return r("svg",{css:[ke.icon,i&&ke.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function z1({spinning:i}){return r("svg",{css:[ke.icon,i&&ke.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function M1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 D1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})})}function E1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function A1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function Cp(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}function T1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function R1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function L1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 _1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 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 O1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function H1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 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 U1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 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 B1(){return r("svg",{css:ke.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"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 N1{async get(s){const f=await fetch(s,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!f.ok){const d=await f.json().catch(()=>({}));throw new Error(d.error||`Request failed: ${f.status}`)}return f.json()}async post(s,f){const d=await fetch(s,{method:"POST",headers:f?{"Content-Type":"application/json"}:void 0,body:f?JSON.stringify(f):void 0});if(!d.ok){const h=await d.json().catch(()=>({}));throw new Error(h.error||`Request failed: ${d.status}`)}return d.json()}async list(s="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(s)}`)}async search(s,f="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(s)}&path=${encodeURIComponent(f)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(s){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(s.join(","))}`)}async upload(s,f="public"){const d=new FormData;d.append("file",s),d.append("path",f);const h=await fetch("/api/studio/upload",{method:"POST",body:d});if(!h.ok){const m=await h.json().catch(()=>({}));throw new Error(m.error||`Upload failed: ${h.status}`)}return h.json()}async delete(s){return this.post("/api/studio/delete",{paths:s})}async createFolder(s,f){return this.post("/api/studio/create-folder",{parentPath:s,name:f})}async rename(s,f){return this.post("/api/studio/rename",{oldPath:s,newName:f})}async move(s,f){return this.post("/api/studio/move",{paths:s,destination:f})}async push(s){return this.post("/api/studio/sync",{imageKeys:s})}async reprocess(s){return this.post("/api/studio/reprocess",{imageKeys:s})}processAllStream(){return new EventSource("/api/studio/process-all")}async checkFeaturedImage(){return this.get("/api/studio/check-featured-image")}async getFeaturedImageOptions(){return this.get("/api/studio/featured-image-options")}}const oi=new N1;function Gp(){const{currentPath:i,setCurrentPath:s,navigateUp:f,selectedItems:d,toggleSelection:h,selectRange:m,lastSelectedPath:w,selectAll:D,clearSelection:C,refreshKey:g,setFocusedItem:T,triggerRefresh:z,triggerScan:B,searchQuery:q,showError:H,setFileItems:Y,editedImageKey:ie}=oo(),[Q,ce]=v.useState([]),[ae,de]=v.useState(!0),[X,P]=v.useState(!1),[I,te]=v.useState(null),U=v.useRef(!0),Z=v.useRef(i);v.useEffect(()=>{async function x(){const _=Z.current!==i;(U.current||_)&&de(!0),Z.current=i;try{const ee=q&&q.length>=2?await oi.search(q,i):await oi.list(i),oe=ee.items||[];ce(oe),Y(oe),P(ee.isEmpty===!0)}catch(ee){const oe=ee instanceof Error?ee.message:"Failed to load items";H("Load Error",oe),ce([]),Y([]),P(!1)}de(!1),U.current=!1}x()},[i,g,q,H,Y]),v.useEffect(()=>{async function x(){if(i!=="public"){te(null);return}try{const _=await oi.checkFeaturedImage();te(_)}catch{te(null)}}x()},[i,g]);const he=i==="public",me=q&&q.length>=2,pe=[...Q].sort((x,_)=>x.type==="folder"&&_.type!=="folder"?-1:x.type!=="folder"&&_.type==="folder"?1:x.name.localeCompare(_.name)),ne=pe.length>0&&pe.every(x=>d.has(x.path)),Oe=pe.some(x=>d.has(x.path)),E=v.useCallback((x,_)=>{_.shiftKey&&w?m(w,x.path,pe):h(x.path)},[w,m,pe,h]),$=v.useCallback(x=>{x.type==="folder"?s(x.path):T(x)},[s,T]),W=v.useCallback(async x=>{try{const _="/"+x.path.replace(/^public\//,"");await oi.reprocess([_]),z()}catch(_){const ee=_ instanceof Error?_.message:"Failed to generate thumbnail";H("Processing Error",ee)}},[z,H]),De=v.useCallback(()=>{ne?C():D(pe)},[ne,C,D,pe]),qe=I&&!I.exists?I:null;return{items:Q,loading:ae,sortedItems:pe,metaEmpty:X,missingFeaturedImage:qe,isAtRoot:he,isSearching:me,allItemsSelected:ne,someItemsSelected:Oe,currentPath:i,selectedItems:d,navigateUp:f,editedImageKey:ie,handleItemClick:E,handleOpen:$,handleGenerateThumbnail:W,handleSelectAll:De,triggerScan:B,triggerRefresh:z}}const j1=ln`
|
|
72
|
+
from { opacity: 0; }
|
|
73
|
+
to { opacity: 1; }
|
|
74
|
+
`,q1=ln`
|
|
75
|
+
from { transform: translateY(-20px); opacity: 0; }
|
|
76
|
+
to { transform: translateY(0); opacity: 1; }
|
|
77
|
+
`,Y1=ln`
|
|
78
|
+
to { transform: rotate(360deg); }
|
|
79
|
+
`,$t={overlay:y("position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.5);animation:",j1," 0.15s ease;",""),modal:y("background:",u.surface,";border-radius:12px;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);width:100%;max-width:440px;animation:",q1," 0.2s ease;overflow:hidden;",""),header:y("padding:20px 24px;border-bottom:1px solid ",u.border,";",""),title:y("font-size:",V.lg,";font-weight:600;color:",u.text,";margin:0;",""),subtitle:y("font-size:",V.sm,";color:",u.textSecondary,";margin:4px 0 0 0;",""),body:{name:"1a7zdz",styles:"padding:24px;display:flex;flex-direction:column;gap:12px"},loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},spinner:y("width:24px;height:24px;border-radius:50%;border:2px solid ",u.border,";border-top-color:",u.primary,";animation:",Y1," 0.8s linear infinite;",""),urlButton:y("display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px 20px;background:",u.background,";border:1px solid ",u.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover:not(:disabled){background:",u.surfaceHover,";border-color:",u.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),urlLabel:y("font-size:",V.xs,";font-weight:600;color:",u.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:y("font-size:",V.base,";font-weight:500;color:",u.text,";word-break:break-all;",""),noOptions:y("padding:20px;text-align:center;color:",u.textSecondary,";font-size:",V.sm,";",""),footer:y("padding:16px 24px;border-top:1px solid ",u.border,";display:flex;justify-content:flex-end;",""),cancelBtn:y("padding:10px 20px;font-size:",V.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";&:hover{background:",u.surfaceHover,";border-color:",u.borderHover,";}","")};function Xp({isOpen:i,onClose:s,onSelect:f}){const[d,h]=v.useState(!0),[m,w]=v.useState(null),[D,C]=v.useState(null);if(v.useEffect(()=>{if(!i)return;async function T(){h(!0);try{const z=await oi.getFeaturedImageOptions();w(z.devUrl),C(z.productionUrl)}catch(z){console.error("Failed to load featured image options:",z)}h(!1)}T()},[i]),!i)return null;const g=m||D;return r("div",{css:$t.overlay,onClick:s,children:b("div",{css:$t.modal,onClick:T=>T.stopPropagation(),children:[b("div",{css:$t.header,children:[r("h2",{css:$t.title,children:"Generate Screenshot"}),r("p",{css:$t.subtitle,children:"Choose which URL to screenshot"})]}),r("div",{css:$t.body,children:d?r("div",{css:$t.loading,children:r("div",{css:$t.spinner})}):g?b(Pe,{children:[m&&b("button",{css:$t.urlButton,onClick:()=>f(m),children:[r("span",{css:$t.urlLabel,children:"Development"}),r("span",{css:$t.urlValue,children:m})]}),D&&b("button",{css:$t.urlButton,onClick:()=>f(D),children:[r("span",{css:$t.urlLabel,children:"Production"}),r("span",{css:$t.urlValue,children:D})]})]}):b("div",{css:$t.noOptions,children:["No URLs configured. Set ",r("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),r("div",{css:$t.footer,children:r("button",{css:$t.cancelBtn,onClick:s,children:"Cancel"})})]})})}const G1=ln`
|
|
80
|
+
to { transform: rotate(360deg); }
|
|
81
|
+
`,re={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:",G1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",u.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:y("font-size:",V.base,";margin:0 0 4px 0;&:last-child{color:",u.textMuted,";font-size:",V.sm,";}",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",V.base,";font-weight:500;background:",u.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),grid:{name:"el23hk",styles:"display:grid;grid-template-columns:1fr;gap:12px;@media (min-width: 480px){grid-template-columns:repeat(2, 1fr);}@media (min-width: 768px){grid-template-columns:repeat(3, 1fr);}@media (min-width: 1024px){grid-template-columns:repeat(4, 1fr);}@media (min-width: 1280px){grid-template-columns:repeat(5, 1fr);}"},item:y("position:relative;border-radius:8px;border:1px solid ",u.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",u.surface,";user-select:none;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04);&:hover{border-color:#d0d5dd;box-shadow:0 2px 4px rgba(0, 0, 0, 0.06);}",""),itemSelected:y("border-color:",u.primary,";box-shadow:0 0 0 1px ",u.primary,";&:hover{border-color:",u.primary,";box-shadow:0 0 0 1px ",u.primary,";}",""),parentItem:y("cursor:pointer;&:hover{border-color:",u.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:y("width:18px;height:18px;accent-color:",u.primary,";cursor:pointer;",""),content:y("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",u.background,";",""),contentCloud:y("",""),contentRemote:y("",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:y("width:56px;height:56px;color:",u.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:y("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",u.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:y("width:56px;height:56px;color:",u.textMuted,";",""),fileIcon:y("width:40px;height:40px;color:",u.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:y("padding:10px 12px;background-color:",u.surface,";border-top:1px solid ",u.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:y("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",u.textMuted,";background:transparent;border:none;padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",u.text,";}",""),copyIcon:{name:"1eg0rk6",styles:"width:18px;height:18px"},folderStats:{name:"905wvx",styles:"display:flex;align-items:center;gap:8px;margin:2px 0 0 0"},folderStat:y("display:flex;align-items:center;gap:3px;font-size:",V.xs,";",""),folderStatLocal:y("color:",u.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:y("width:14px;height:14px;color:",u.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:y("color:#f59e0b;font-size:",V.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},statusRow:{name:"1b1nq65",styles:"display:flex;align-items:center;justify-content:space-between;margin:2px 0 0 0;gap:4px"},statusLeft:{name:"1j5vobt",styles:"display:flex;align-items:center;gap:4px"},thumbChips:{name:"x2l7ss",styles:"display:flex;align-items:center;gap:3px;margin-left:auto"},thumbChip:y("display:inline-flex;align-items:center;justify-content:center;padding:1px 4px;font-size:9px;font-weight:600;border-radius:3px;background:rgba(0, 0, 0, 0.08);color:",u.textMuted,";text-transform:uppercase;letter-spacing:0.02em;",""),storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"qoyfdh",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::before{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},openBtn:y("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",V.sm,";font-weight:500;color:",u.primary,";background:",u.surface,";border:1px solid ",u.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:",u.primaryLight,";border-color:",u.primary,";}",""),featuredPlaceholder:y("position:relative;border-radius:8px;border:2px dashed ",u.success,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",u.background,";&:hover{border-color:",u.success,";background-color:",u.successLight,";}",""),featuredContent:{name:"y8o17o",styles:"position:relative;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:8px"},featuredIcon:y("width:40px;height:40px;color:",u.success,";",""),featuredText:y("font-size:",V.sm,";color:",u.success,";text-align:center;font-weight:500;",""),featuredLabel:y("padding:10px 12px;background-color:",u.surface,";border-top:1px solid ",u.borderLight,";",""),name:y("font-size:",V.sm,";font-weight:500;color:",u.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:y("font-size:",V.xs,";color:",u.textMuted,";margin:2px 0 0 0;",""),selectAllRow:y("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",u.surface,";border-radius:8px;border:1px solid ",u.border,";",""),selectAllLabel:y("display:flex;align-items:center;gap:10px;font-size:",V.base,";font-weight:500;color:",u.textSecondary,";cursor:pointer;&:hover{color:",u.text,";}",""),selectAllCheckbox:y("width:16px;height:16px;accent-color:",u.primary,";","")};function X1(){const{loading:i,sortedItems:s,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:w,someItemsSelected:D,selectedItems:C,navigateUp:g,handleItemClick:T,handleOpen:z,handleGenerateThumbnail:B,handleSelectAll:q,triggerScan:H,triggerRefresh:Y,editedImageKey:ie}=Gp(),[Q,ce]=v.useState(!1),[ae,de]=v.useState(!1),[X,P]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),I=()=>{ce(!0)},te=async U=>{ce(!1),de(!0),P({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const Z=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:U})});if(!Z.ok){const pe=await Z.json();P({current:0,total:4,percent:0,status:"error",message:pe.error||"Failed to generate screenshot"});return}const he=Z.body?.getReader(),me=new TextDecoder;if(he){let pe="";for(;;){const{done:ne,value:Oe}=await he.read();if(ne)break;pe+=me.decode(Oe,{stream:!0});const E=pe.split(`
|
|
82
|
+
`);pe=E.pop()||"";for(const $ of E)if($.startsWith("data: "))try{const W=JSON.parse($.slice(6));W.type==="start"?P(De=>({...De,total:W.total,message:`Screenshotting ${W.url}...`})):W.type==="progress"?P({current:W.current,total:W.total,percent:W.percent,status:"processing",message:W.message}):W.type==="complete"?(P({current:W.processed,total:W.processed,percent:100,status:W.errors>0?"error":"complete",message:W.message}),Y()):W.type==="error"&&P(De=>({...De,status:"error",message:W.message}))}catch{}}}}catch(Z){console.error("Featured image generation error:",Z),P({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?b(Pe,{children:[ae&&r(hl,{title:"Generating Screenshot",progress:X,onClose:()=>de(!1)}),r("div",{css:re.loading,children:r("div",{css:re.spinner})})]}):f&&h?b("div",{css:re.empty,children:[r("svg",{css:re.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:re.emptyText,children:"No files tracked yet"}),r("p",{css:re.emptyText,children:"Click Scan to discover files in your public folder"}),r("button",{css:re.scanButton,onClick:H,children:"Scan for Files"})]}):s.length===0&&h?b("div",{css:re.empty,children:[r("svg",{css:re.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:re.emptyText,children:"No files in this folder"}),r("p",{css:re.emptyText,children:"Upload images or click Scan in the toolbar"})]}):b(Pe,{children:[r(Xp,{isOpen:Q,onClose:()=>ce(!1),onSelect:te}),ae&&r(hl,{title:"Generating Screenshot",progress:X,onClose:()=>de(!1)}),b("div",{children:[s.length>0&&r("div",{css:re.selectAllRow,children:b("label",{css:re.selectAllLabel,children:[r("input",{type:"checkbox",css:re.selectAllCheckbox,checked:w,ref:U=>{U&&(U.indeterminate=D&&!w)},onChange:q}),"Select all (",s.length,")"]})}),b("div",{css:re.grid,children:[!h&&!m&&b("div",{css:[re.item,re.parentItem,"",""],onClick:g,children:[r("div",{css:re.content,children:r("svg",{css:re.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),b("div",{css:re.label,children:[r("p",{css:re.name,children:".."}),r("p",{css:re.size,children:"Parent folder"})]})]}),s.map(U=>r(Q1,{item:U,isSelected:C.has(U.path),onClick:Z=>T(U,Z),onOpen:()=>z(U),onGenerateThumbnail:()=>B(U),editedImageKey:ie},U.path)),h&&d&&!m&&b("div",{css:re.featuredPlaceholder,onClick:I,title:`Generate ${d.filename}`,children:[b("div",{css:re.featuredContent,children:[r("svg",{css:re.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:re.featuredText,children:"Generate Screenshot"})]}),b("div",{css:re.featuredLabel,children:[r("p",{css:re.name,children:d.filename}),r("p",{css:re.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function V1(i){return i.includes("/images/sm/")?"SM":i.includes("/images/md/")?"MD":i.includes("/images/lg/")?"LG":i.includes("/images/full/")?"FULL":null}function Q1({item:i,isSelected:s,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[w,D]=v.useState(!1),C=i.type==="folder",g=!C&&i.thumbnail!==void 0,T=i.thumbnail&&m&&m.path===i.path?`${i.thumbnail}?v=${m.key}`:i.thumbnail,z=i.isProtected||C&&i.name==="images"&&i.path==="public/images",B=V1(i.path),q=!C&&(i.hasSm||i.hasMd||i.hasLg||i.hasFull||B),H=ie=>{ie.stopPropagation();const Q="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(Q),D(!0),setTimeout(()=>D(!1),1500)},Y=ie=>{if(z){ie.stopPropagation(),d();return}f(ie)};return b("div",{css:[re.item,s&&!z&&re.itemSelected,"",""],onClick:Y,children:[!z&&r("div",{css:re.checkboxWrapper,onClick:ie=>ie.stopPropagation(),children:r("input",{type:"checkbox",css:re.checkbox,checked:s,onChange:()=>f({})})}),b("div",{css:[re.content,i.isCloud&&re.contentCloud,i.isRemote&&re.contentRemote,"",""],children:[b("button",{css:re.copyBtn,onClick:H,title:"Copy file path",children:[w&&r("span",{css:re.tooltip,children:"Copied!"}),r("svg",{css:re.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:re.openBtn,onClick:ie=>{ie.stopPropagation(),d()},children:"Open"}),C?z?b("div",{css:re.imagesFolderWrapper,children:[r("svg",{css:re.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:re.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:re.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}):g&&T?r("img",{css:re.image,src:T,alt:i.name,loading:"lazy"}):r("svg",{css:re.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:re.label,children:r("div",{css:re.labelRow,children:b("div",{css:re.labelText,children:[r("p",{css:re.name,title:i.name,children:i.name}),C?b("div",{css:re.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[re.folderStat,re.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:re.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),i.localCount]}),i.cloudCount!==void 0&&i.cloudCount>0&&b("span",{css:[re.folderStat,re.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:re.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),i.cloudCount]}),i.remoteCount!==void 0&&i.remoteCount>0&&b("span",{css:[re.folderStat,re.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:re.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),i.remoteCount]}),i.updateCount!==void 0&&i.updateCount>0&&b("span",{css:[re.folderStat,re.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:re.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),i.updateCount]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount!==void 0&&b("span",{css:re.size,children:[i.fileCount," files"]})]}):b("div",{css:re.statusRow,children:[r("div",{css:re.statusLeft,children:i.hasUpdate?b(Pe,{children:[r("svg",{css:re.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:re.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:re.updateLabel,children:"update"})]}):i.cdnPushed?r("svg",{css:i.isRemote?re.storedIconRemote:re.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:re.size,children:K1(i.size)}):null}),q&&r("span",{css:re.thumbChips,children:B?r("span",{css:re.thumbChip,children:B}):b(Pe,{children:[i.hasSm&&r("span",{css:re.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:re.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:re.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:re.thumbChip,children:"FULL"})]})})]})]})})})]})}function K1(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const Z1=ln`
|
|
83
|
+
to { transform: rotate(360deg); }
|
|
84
|
+
`,J={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:",Z1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",u.textSecondary,";",""),emptyHint:y("font-size:",V.sm,";color:",u.textMuted,";margin-top:4px;",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",V.base,";font-weight:500;background:",u.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:y("background:",u.surface,";border-radius:8px;border:1px solid ",u.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:y("text-align:left;font-size:11px;color:",u.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",u.background,";border-bottom:1px solid ",u.border,";",""),thCheckbox:{name:"5iz1wr",styles:"width:48px"},thSize:{name:"yct5co",styles:"width:96px"},thDimensions:{name:"gu2s0e",styles:"width:128px"},thCdn:{name:"yct5co",styles:"width:96px"},tbody:y("",""),row:y("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",u.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",u.borderLight,";}",""),rowSelected:y("background-color:",u.primaryLight,";&:hover{background-color:",u.primaryLight,";}",""),parentRow:y("cursor:pointer;border-bottom:1px solid ",u.border,";&:hover{background-color:",u.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:y("width:18px;height:18px;accent-color:",u.primary,";cursor:pointer;display:block;",""),actionsCell:{name:"1w56d5c",styles:"display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-shrink:0"},copyBtn:y("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",V.xs,";color:",u.textSecondary,";background:",u.surface,";border:1px solid ",u.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",u.surfaceHover,";border-color:",u.borderHover,";color:",u.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:y("display:flex;align-items:center;gap:3px;font-size:",V.xs,";",""),folderStatLocal:y("color:",u.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:y("width:14px;height:14px;color:",u.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:y("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",V.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},storedLabel:{name:"s5xdrg",styles:"display:flex;align-items:center"},storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"1bu1odp",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},thumbnailWrapper:{name:"f01c4l",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:4px"},thumbnailCloud:y("",""),thumbnailRemote:y("",""),folderIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},folderIcon:{name:"a45yt2",styles:"width:24px;height:24px;color:#f9935e"},imagesFolderWrapper:{name:"iqqile",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;align-items:center"},imagesFolderIcon:y("width:24px;height:24px;color:",u.imagesFolder,";",""),lockIcon:y("width:10px;height:10px;color:",u.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:y("width:20px;height:20px;color:",u.textMuted,";flex-shrink:0;",""),fileIcon:y("width:20px;height:20px;color:",u.textMuted,";flex-shrink:0;",""),thumbnail:y("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",u.borderLight,";",""),name:y("font-size:",V.base,";font-weight:500;color:",u.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:y("font-size:",V.sm,";color:",u.textSecondary,";",""),cdnBadge:y("display:inline-flex;align-items:center;gap:4px;font-size:",V.xs,";font-weight:500;color:",u.success,";",""),cdnBadgeRemote:y("display:inline-flex;align-items:center;font-size:",V.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:y("font-size:",V.sm,";color:",u.textMuted,";",""),featuredRow:y("cursor:pointer;transition:background-color 0.15s ease;border:2px dashed ",u.success,";&:hover{background-color:",u.successLight,";}td{border-bottom:none!important;}",""),featuredIcon:y("width:24px;height:24px;color:",u.success,";",""),featuredText:y("color:",u.success,";font-weight:500;",""),openBtn:y("height:32px;font-size:",V.sm,";font-weight:500;color:",u.primary,";background:",u.surface,";border:1px solid ",u.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",u.primaryLight,";border-color:",u.primary,";}","")};function F1(){const{loading:i,sortedItems:s,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:w,someItemsSelected:D,selectedItems:C,navigateUp:g,handleItemClick:T,handleOpen:z,handleGenerateThumbnail:B,handleSelectAll:q,triggerScan:H,triggerRefresh:Y,editedImageKey:ie}=Gp(),[Q,ce]=v.useState(!1),[ae,de]=v.useState(!1),[X,P]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),I=()=>{ce(!0)},te=async U=>{ce(!1),de(!0),P({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const Z=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:U})});if(!Z.ok){const pe=await Z.json();P({current:0,total:4,percent:0,status:"error",message:pe.error||"Failed to generate screenshot"});return}const he=Z.body?.getReader(),me=new TextDecoder;if(he){let pe="";for(;;){const{done:ne,value:Oe}=await he.read();if(ne)break;pe+=me.decode(Oe,{stream:!0});const E=pe.split(`
|
|
85
|
+
`);pe=E.pop()||"";for(const $ of E)if($.startsWith("data: "))try{const W=JSON.parse($.slice(6));W.type==="start"?P(De=>({...De,total:W.total,message:`Screenshotting ${W.url}...`})):W.type==="progress"?P({current:W.current,total:W.total,percent:W.percent,status:"processing",message:W.message}):W.type==="complete"?(P({current:W.processed,total:W.processed,percent:100,status:W.errors>0?"error":"complete",message:W.message}),Y()):W.type==="error"&&P(De=>({...De,status:"error",message:W.message}))}catch{}}}}catch(Z){console.error("Featured image generation error:",Z),P({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?r("div",{css:J.loading,children:r("div",{css:J.spinner})}):f&&h?b("div",{css:J.empty,children:[r("p",{children:"No files tracked yet"}),r("p",{css:J.emptyHint,children:"Click Scan to discover files in your public folder"}),r("button",{css:J.scanButton,onClick:H,children:"Scan for Files"})]}):s.length===0&&h?b("div",{css:J.empty,children:[r("p",{children:"No files in this folder"}),r("p",{css:J.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):b(Pe,{children:[r(Xp,{isOpen:Q,onClose:()=>ce(!1),onSelect:te}),ae&&r(hl,{title:"Generating Screenshot",progress:X,onClose:()=>de(!1)}),r("div",{css:J.tableWrapper,children:b("table",{css:J.table,children:[r("thead",{children:b("tr",{children:[r("th",{css:[J.th,J.thCheckbox,"",""],children:s.length>0&&r("input",{type:"checkbox",css:J.checkbox,checked:w,ref:U=>{U&&(U.indeterminate=D&&!w)},onChange:q})}),r("th",{css:J.th,children:"Name"}),r("th",{css:[J.th,J.thSize,"",""],children:"Size"}),r("th",{css:[J.th,J.thDimensions,"",""],children:"Dimensions"}),r("th",{css:[J.th,J.thCdn,"",""],children:"CDN"})]})}),b("tbody",{css:J.tbody,children:[!h&&!m&&b("tr",{css:J.parentRow,onClick:g,children:[r("td",{css:J.td}),r("td",{css:J.td,children:b("div",{css:J.nameCell,children:[r("svg",{css:J.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),r("span",{css:J.name,children:".."})]})}),r("td",{css:[J.td,J.meta,"",""],children:"--"}),r("td",{css:[J.td,J.meta,"",""],children:"Parent folder"}),r("td",{css:J.td,children:"--"})]}),s.map(U=>r(J1,{item:U,isSelected:C.has(U.path),onClick:Z=>T(U,Z),onOpen:()=>z(U),onGenerateThumbnail:()=>B(U),editedImageKey:ie},U.path)),h&&d&&!m&&b("tr",{css:J.featuredRow,onClick:I,title:`Generate ${d.filename}`,children:[r("td",{css:J.td}),r("td",{css:J.td,children:b("div",{css:J.nameCell,children:[r("div",{css:J.folderIconWrapper,children:r("svg",{css:J.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),r("span",{css:[J.name,J.featuredText,"",""],children:d.filename})]})}),r("td",{css:[J.td,J.meta,J.featuredText,"",""],children:"--"}),r("td",{css:[J.td,J.meta,J.featuredText,"",""],children:"Click to generate"}),r("td",{css:[J.td,J.featuredText,"",""],children:"--"})]})]})]})})]})}function J1({item:i,isSelected:s,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[w,D]=v.useState(!1),C=i.type==="folder",g=!C&&i.thumbnail!==void 0,T=i.thumbnail&&m&&m.path===i.path?`${i.thumbnail}?v=${m.key}`:i.thumbnail,z=i.isProtected||C&&i.name==="images"&&i.path==="public/images",B=H=>{H.stopPropagation();const Y="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(Y),D(!0),setTimeout(()=>D(!1),1500)},q=H=>{if(z){H.stopPropagation(),d();return}f(H)};return b("tr",{css:[J.row,s&&!z&&J.rowSelected,"",""],onClick:q,children:[r("td",{css:[J.td,J.checkboxCell,"",""],onClick:H=>H.stopPropagation(),children:!z&&r("input",{type:"checkbox",css:J.checkbox,checked:s,onChange:()=>f({})})}),r("td",{css:J.td,children:b("div",{css:J.nameCell,children:[C?z?b("div",{css:J.imagesFolderWrapper,children:[r("svg",{css:J.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),r("svg",{css:J.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):r("div",{css:J.folderIconWrapper,children:r("svg",{css:J.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):g&&T?r("div",{css:[J.thumbnailWrapper,i.isCloud&&J.thumbnailCloud,i.isRemote&&J.thumbnailRemote,"",""],children:r("img",{css:J.thumbnail,src:T,alt:i.name,loading:"lazy"})}):r("div",{css:[J.thumbnailWrapper,i.isCloud&&J.thumbnailCloud,i.isRemote&&J.thumbnailRemote,"",""],children:r("svg",{css:J.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),r("span",{css:J.name,title:i.name,children:$1(i.name)}),b("div",{css:J.actionsCell,children:[b("button",{css:J.copyBtn,onClick:B,title:"Copy file path",children:[w&&r("span",{css:J.tooltip,children:"Copied!"}),r("svg",{css:J.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:J.openBtn,onClick:H=>{H.stopPropagation(),d()},children:"Open"})]})]})}),r("td",{css:[J.td,J.meta,"",""],children:C?b("div",{css:J.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[J.folderStat,J.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:J.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),i.localCount]}),i.cloudCount!==void 0&&i.cloudCount>0&&b("span",{css:[J.folderStat,J.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:J.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),i.cloudCount]}),i.remoteCount!==void 0&&i.remoteCount>0&&b("span",{css:[J.folderStat,J.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:J.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),i.remoteCount]}),i.updateCount!==void 0&&i.updateCount>0&&b("span",{css:[J.folderStat,J.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:J.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),i.updateCount]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount!==void 0&&b("span",{children:[i.fileCount," files"]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount===void 0&&"--"]}):i.hasUpdate?b("span",{css:J.updateLabel,children:[r("svg",{css:J.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("svg",{css:J.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"update"]}):i.cdnPushed?r("span",{css:J.storedLabel,children:r("svg",{css:i.isRemote?J.storedIconRemote:J.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}):i.size!==void 0?wp(i.size):"--"}),r("td",{css:[J.td,J.meta,"",""],children:C?i.totalSize!==void 0?wp(i.totalSize):"--":i.dimensions?`${i.dimensions.width}x${i.dimensions.height}`:"--"}),r("td",{css:J.td,children:i.cdnPushed?i.isRemote?r("span",{css:J.cdnBadgeRemote,children:"Remote"}):b("span",{css:J.cdnBadge,children:[r("svg",{css:J.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Pushed"]}):r("span",{css:J.cdnEmpty,children:"--"})})]})}function wp(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function $1(i,s=32){if(i.length<=s)return i;const f=i.lastIndexOf("."),d=f>0?i.substring(f):"",h=f>0?i.substring(0,f):i,m=s-d.length-3;if(m<6)return i.substring(0,s-3)+"...";const w=Math.ceil(m/2),D=Math.floor(m/2);return h.substring(0,w)+"..."+h.substring(h.length-D)+d}var W1=Object.defineProperty,I1=(i,s,f)=>s in i?W1(i,s,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[s]=f,Mt=(i,s,f)=>I1(i,typeof s!="symbol"?s+"":s,f);const Or={x:0,y:0,width:0,height:0,unit:"px"},Il=(i,s,f)=>Math.min(Math.max(i,s),f),P1=(...i)=>i.filter(s=>s&&typeof s=="string").join(" "),kp=(i,s)=>i===s||i.width===s.width&&i.height===s.height&&i.x===s.x&&i.y===s.y&&i.unit===s.unit;function Pl(i,s,f){return i.unit==="%"?{...Or,...i,unit:"%"}:{unit:"%",x:i.x?i.x/s*100:0,y:i.y?i.y/f*100:0,width:i.width?i.width/s*100:0,height:i.height?i.height/f*100:0}}function Xa(i,s,f){return i.unit?i.unit==="px"?{...Or,...i,unit:"px"}:{unit:"px",x:i.x?i.x*s/100:0,y:i.y?i.y*f/100:0,width:i.width?i.width*s/100:0,height:i.height?i.height*f/100:0}:{...Or,...i,unit:"px"}}function zp(i,s,f,d,h,m=0,w=0,D=d,C=h){const g={...i};let T=Math.min(m,d),z=Math.min(w,h),B=Math.min(D,d),q=Math.min(C,h);s&&(s>1?(T=w?w*s:T,z=T/s,B=D*s):(z=m?m/s:z,T=z*s,q=C/s)),g.y<0&&(g.height=Math.max(g.height+g.y,z),g.y=0),g.x<0&&(g.width=Math.max(g.width+g.x,T),g.x=0);const H=d-(g.x+g.width);H<0&&(g.x=Math.min(g.x,d-T),g.width+=H);const Y=h-(g.y+g.height);if(Y<0&&(g.y=Math.min(g.y,h-z),g.height+=Y),g.width<T&&((f==="sw"||f=="nw")&&(g.x-=T-g.width),g.width=T),g.height<z&&((f==="nw"||f=="ne")&&(g.y-=z-g.height),g.height=z),g.width>B&&((f==="sw"||f=="nw")&&(g.x-=B-g.width),g.width=B),g.height>q&&((f==="nw"||f=="ne")&&(g.y-=q-g.height),g.height=q),s){const ie=g.width/g.height;if(ie<s){const Q=Math.max(g.width/s,z);(f==="nw"||f=="ne")&&(g.y-=Q-g.height),g.height=Q}else if(ie>s){const Q=Math.max(g.height*s,T);(f==="sw"||f=="nw")&&(g.x-=Q-g.width),g.width=Q}}return g}function e2(i,s,f,d){const h={...i};return s==="ArrowLeft"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="w"?(h.x-=f,h.width+=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="e"?h.width-=f:d==="se"&&(h.width-=f,h.height-=f):s==="ArrowRight"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="w"?(h.x+=f,h.width-=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="e"?h.width+=f:d==="se"&&(h.width+=f,h.height+=f)),s==="ArrowUp"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="n"?(h.y-=f,h.height+=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="s"?h.height-=f:d==="se"&&(h.width-=f,h.height-=f):s==="ArrowDown"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="n"?(h.y+=f,h.height-=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="s"?h.height+=f:d==="se"&&(h.width+=f,h.height+=f)),h}const eo={capture:!0,passive:!1};let t2=0;const Va=class qn extends v.PureComponent{constructor(){super(...arguments),Mt(this,"docMoveBound",!1),Mt(this,"mouseDownOnCrop",!1),Mt(this,"dragStarted",!1),Mt(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),Mt(this,"componentRef",v.createRef()),Mt(this,"mediaRef",v.createRef()),Mt(this,"resizeObserver"),Mt(this,"initChangeCalled",!1),Mt(this,"instanceId",`rc-${t2++}`),Mt(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),Mt(this,"onCropPointerDown",s=>{const{crop:f,disabled:d}=this.props,h=this.getBox();if(!f)return;const m=Xa(f,h.width,h.height);if(d)return;s.cancelable&&s.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const w=s.target.dataset.ord,D=!!w;let C=s.clientX,g=s.clientY,T=m.x,z=m.y;if(w){const B=s.clientX-h.x,q=s.clientY-h.y;let H=0,Y=0;w==="ne"||w=="e"?(H=B-(m.x+m.width),Y=q-m.y,T=m.x,z=m.y+m.height):w==="se"||w==="s"?(H=B-(m.x+m.width),Y=q-(m.y+m.height),T=m.x,z=m.y):w==="sw"||w=="w"?(H=B-m.x,Y=q-(m.y+m.height),T=m.x+m.width,z=m.y):(w==="nw"||w=="n")&&(H=B-m.x,Y=q-m.y,T=m.x+m.width,z=m.y+m.height),C=T+h.x+H,g=z+h.y+Y}this.evData={startClientX:C,startClientY:g,startCropX:T,startCropY:z,clientX:s.clientX,clientY:s.clientY,isResize:D,ord:w},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),Mt(this,"onComponentPointerDown",s=>{const{crop:f,disabled:d,locked:h,keepSelection:m,onChange:w}=this.props,D=this.getBox();if(d||h||m&&f)return;s.cancelable&&s.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const C=s.clientX-D.x,g=s.clientY-D.y,T={unit:"px",x:C,y:g,width:0,height:0};this.evData={startClientX:s.clientX,startClientY:s.clientY,startCropX:C,startCropY:g,clientX:s.clientX,clientY:s.clientY,isResize:!0},this.mouseDownOnCrop=!0,w(Xa(T,D.width,D.height),Pl(T,D.width,D.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),Mt(this,"onDocPointerMove",s=>{const{crop:f,disabled:d,onChange:h,onDragStart:m}=this.props,w=this.getBox();if(d||!f||!this.mouseDownOnCrop)return;s.cancelable&&s.preventDefault(),this.dragStarted||(this.dragStarted=!0,m&&m(s));const{evData:D}=this;D.clientX=s.clientX,D.clientY=s.clientY;let C;D.isResize?C=this.resizeCrop():C=this.dragCrop(),kp(f,C)||h(Xa(C,w.width,w.height),Pl(C,w.width,w.height))}),Mt(this,"onComponentKeyDown",s=>{const{crop:f,disabled:d,onChange:h,onComplete:m}=this.props;if(d)return;const w=s.key;let D=!1;if(!f)return;const C=this.getBox(),g=this.makePixelCrop(C),T=(navigator.platform.match("Mac")?s.metaKey:s.ctrlKey)?qn.nudgeStepLarge:s.shiftKey?qn.nudgeStepMedium:qn.nudgeStep;if(w==="ArrowLeft"?(g.x-=T,D=!0):w==="ArrowRight"?(g.x+=T,D=!0):w==="ArrowUp"?(g.y-=T,D=!0):w==="ArrowDown"&&(g.y+=T,D=!0),D){s.cancelable&&s.preventDefault(),g.x=Il(g.x,0,C.width-g.width),g.y=Il(g.y,0,C.height-g.height);const z=Xa(g,C.width,C.height),B=Pl(g,C.width,C.height);h(z,B),m&&m(z,B)}}),Mt(this,"onHandlerKeyDown",(s,f)=>{const{aspect:d=0,crop:h,disabled:m,minWidth:w=0,minHeight:D=0,maxWidth:C,maxHeight:g,onChange:T,onComplete:z}=this.props,B=this.getBox();if(m||!h)return;if(s.key==="ArrowUp"||s.key==="ArrowDown"||s.key==="ArrowLeft"||s.key==="ArrowRight")s.stopPropagation(),s.preventDefault();else return;const q=(navigator.platform.match("Mac")?s.metaKey:s.ctrlKey)?qn.nudgeStepLarge:s.shiftKey?qn.nudgeStepMedium:qn.nudgeStep,H=Xa(h,B.width,B.height),Y=e2(H,s.key,q,f),ie=zp(Y,d,f,B.width,B.height,w,D,C,g);if(!kp(h,ie)){const Q=Pl(ie,B.width,B.height);T(ie,Q),z&&z(ie,Q)}}),Mt(this,"onDocPointerDone",s=>{const{crop:f,disabled:d,onComplete:h,onDragEnd:m}=this.props,w=this.getBox();this.unbindDocMove(),!(d||!f)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,m&&m(s),h&&h(Xa(f,w.width,w.height),Pl(f,w.width,w.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),Mt(this,"onDragFocus",()=>{var s;(s=this.componentRef.current)==null||s.scrollTo(0,0)})}get document(){return document}getBox(){const s=this.mediaRef.current;if(!s)return{x:0,y:0,width:0,height:0};const{x:f,y:d,width:h,height:m}=s.getBoundingClientRect();return{x:f,y:d,width:h,height:m}}componentDidUpdate(s){const{crop:f,onComplete:d}=this.props;if(d&&!s.crop&&f){const{width:h,height:m}=this.getBox();h&&m&&d(Xa(f,h,m),Pl(f,h,m))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,eo),this.document.addEventListener("pointerup",this.onDocPointerDone,eo),this.document.addEventListener("pointercancel",this.onDocPointerDone,eo),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,eo),this.document.removeEventListener("pointerup",this.onDocPointerDone,eo),this.document.removeEventListener("pointercancel",this.onDocPointerDone,eo),this.docMoveBound=!1)}getCropStyle(){const{crop:s}=this.props;if(s)return{top:`${s.y}${s.unit}`,left:`${s.x}${s.unit}`,width:`${s.width}${s.unit}`,height:`${s.height}${s.unit}`}}dragCrop(){const{evData:s}=this,f=this.getBox(),d=this.makePixelCrop(f),h=s.clientX-s.startClientX,m=s.clientY-s.startClientY;return d.x=Il(s.startCropX+h,0,f.width-d.width),d.y=Il(s.startCropY+m,0,f.height-d.height),d}getPointRegion(s,f,d,h){const{evData:m}=this,w=m.clientX-s.x,D=m.clientY-s.y;let C;h&&f?C=f==="nw"||f==="n"||f==="ne":C=D<m.startCropY;let g;return d&&f?g=f==="nw"||f==="w"||f==="sw":g=w<m.startCropX,g?C?"nw":"sw":C?"ne":"se"}resolveMinDimensions(s,f,d=0,h=0){const m=Math.min(d,s.width),w=Math.min(h,s.height);return!f||!m&&!w?[m,w]:f>1?m?[m,m/f]:[w*f,w]:w?[w*f,w]:[m,m/f]}resizeCrop(){const{evData:s}=this,{aspect:f=0,maxWidth:d,maxHeight:h}=this.props,m=this.getBox(),[w,D]=this.resolveMinDimensions(m,f,this.props.minWidth,this.props.minHeight);let C=this.makePixelCrop(m);const g=this.getPointRegion(m,s.ord,w,D),T=s.ord||g;let z=s.clientX-s.startClientX,B=s.clientY-s.startClientY;(w&&T==="nw"||T==="w"||T==="sw")&&(z=Math.min(z,-w)),(D&&T==="nw"||T==="n"||T==="ne")&&(B=Math.min(B,-D));const q={unit:"px",x:0,y:0,width:0,height:0};g==="ne"?(q.x=s.startCropX,q.width=z,f?(q.height=q.width/f,q.y=s.startCropY-q.height):(q.height=Math.abs(B),q.y=s.startCropY-q.height)):g==="se"?(q.x=s.startCropX,q.y=s.startCropY,q.width=z,f?q.height=q.width/f:q.height=B):g==="sw"?(q.x=s.startCropX+z,q.y=s.startCropY,q.width=Math.abs(z),f?q.height=q.width/f:q.height=B):g==="nw"&&(q.x=s.startCropX+z,q.width=Math.abs(z),f?(q.height=q.width/f,q.y=s.startCropY-q.height):(q.height=Math.abs(B),q.y=s.startCropY+B));const H=zp(q,f,g,m.width,m.height,w,D,d,h);return f||qn.xyOrds.indexOf(T)>-1?C=H:qn.xOrds.indexOf(T)>-1?(C.x=H.x,C.width=H.width):qn.yOrds.indexOf(T)>-1&&(C.y=H.y,C.height=H.height),C.x=Il(C.x,0,m.width-C.width),C.y=Il(C.y,0,m.height-C.height),C}renderCropSelection(){const{ariaLabels:s=qn.defaultProps.ariaLabels,disabled:f,locked:d,renderSelectionAddon:h,ruleOfThirds:m,crop:w}=this.props,D=this.getCropStyle();if(w)return rt.createElement("div",{style:D,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":s.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!d&&rt.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},rt.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),rt.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),rt.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),rt.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":s.nwDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"nw"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":s.nDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"n"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":s.neDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"ne"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":s.eDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"e"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":s.seDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"se"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":s.sDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"s"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":s.swDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"sw"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":s.wDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"w"),role:"button"})),h&&rt.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:C=>C.stopPropagation()},h(this.state)),m&&rt.createElement(rt.Fragment,null,rt.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),rt.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(s){const f={...Or,...this.props.crop||{}};return Xa(f,s.width,s.height)}render(){const{aspect:s,children:f,circularCrop:d,className:h,crop:m,disabled:w,locked:D,style:C,ruleOfThirds:g}=this.props,{cropIsActive:T,newCropIsBeingDrawn:z}=this.state,B=m?this.renderCropSelection():null,q=P1("ReactCrop",h,T&&"ReactCrop--active",w&&"ReactCrop--disabled",D&&"ReactCrop--locked",z&&"ReactCrop--new-crop",m&&s&&"ReactCrop--fixed-aspect",m&&d&&"ReactCrop--circular-crop",m&&g&&"ReactCrop--rule-of-thirds",!this.dragStarted&&m&&!m.width&&!m.height&&"ReactCrop--invisible-crop",d&&"ReactCrop--no-animate");return rt.createElement("div",{ref:this.componentRef,className:q,style:C},rt.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),m?rt.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},rt.createElement("defs",null,rt.createElement("mask",{id:`hole-${this.instanceId}`},rt.createElement("rect",{width:"100%",height:"100%",fill:"white"}),d?rt.createElement("ellipse",{cx:`${m.x+m.width/2}${m.unit}`,cy:`${m.y+m.height/2}${m.unit}`,rx:`${m.width/2}${m.unit}`,ry:`${m.height/2}${m.unit}`,fill:"black"}):rt.createElement("rect",{x:`${m.x}${m.unit}`,y:`${m.y}${m.unit}`,width:`${m.width}${m.unit}`,height:`${m.height}${m.unit}`,fill:"black"}))),rt.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,B)}};Mt(Va,"xOrds",["e","w"]),Mt(Va,"yOrds",["n","s"]),Mt(Va,"xyOrds",["nw","ne","se","sw"]),Mt(Va,"nudgeStep",1),Mt(Va,"nudgeStepMedium",10),Mt(Va,"nudgeStepLarge",100),Mt(Va,"defaultProps",{ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}});let n2=Va;const a2=ln`
|
|
86
|
+
from { opacity: 0; }
|
|
87
|
+
to { opacity: 1; }
|
|
88
|
+
`,xe={overlay:y("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",a2," 0.15s ease-out;font-family:",fi,";",""),container:y(ro," display:flex;flex:1;margin:24px;background:",u.surface,";border:1px solid ",u.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:y("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",u.background,";overflow:hidden;.ReactCrop__crop-selection{border:2px solid ",u.primary,";}",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},closeBtn:y("padding:8px;background:",u.surface,";border:1px solid ",u.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:",u.surfaceHover,";border-color:",u.borderHover,";}",""),closeIcon:y("width:20px;height:20px;color:",u.textSecondary,";",""),rotationWrapper:{name:"1xwnw1d",styles:"transition:transform 0.3s ease;position:relative;cursor:pointer"},cropHint:y("position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0, 0, 0, 0.7);color:white;padding:12px 20px;border-radius:8px;font-size:",V.sm,";pointer-events:none;white-space:nowrap;",""),successBanner:y("position:absolute;top:24px;left:50%;transform:translateX(-50%);background:#22c55e;color:#fff;padding:12px 24px;border-radius:8px;font-size:",V.sm,";font-weight:600;pointer-events:none;z-index:10;animation:fadeInOut 3s ease-in-out forwards;@keyframes fadeInOut{0%{opacity:0;transform:translateX(-50%) scale(0.9);}10%{opacity:1;transform:translateX(-50%) scale(1);}90%{opacity:1;transform:translateX(-50%) scale(1);}100%{opacity:0;transform:translateX(-50%) scale(0.9);}}",""),cropWrapper:{name:"12wysvm",styles:"max-width:100%;max-height:calc(100vh - 150px);img{max-width:100%;max-height:calc(100vh - 150px);display:block;}"},sidebar:y("width:280px;background:",u.surface,";border-left:1px solid ",u.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",u.border,";",""),sidebarTitle:y("font-size:",V.base,";font-weight:600;color:",u.text,";margin:0;",""),sidebarContent:{name:"1uv1qvv",styles:"flex:1;padding:20px;overflow:auto;display:flex;flex-direction:column;gap:20px"},section:{name:"1c3pogw",styles:"display:flex;flex-direction:column;gap:10px"},sectionLabel:y("font-size:",V.sm,";font-weight:600;color:",u.text,";",""),subSectionLabel:y("font-size:",V.xs,";font-weight:500;color:",u.textMuted,";text-transform:uppercase;letter-spacing:0.5px;",""),aspectButtons:{name:"13l5m7f",styles:"display:flex;gap:6px;flex-wrap:wrap"},aspectBtn:y("padding:6px 10px;font-size:",V.sm,";border:1px solid ",u.border,";background:",u.surface,";color:",u.text,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),aspectBtnActive:y("background-color:",u.primary,";border-color:",u.primary,";color:white;&:hover:not(:disabled){background-color:",u.primary,";border-color:",u.primary,";}",""),rotateButtons:{name:"11jf4ye",styles:"display:flex;gap:8px"},rotateBtn:y("flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;font-size:",V.sm,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),rotateIcon:{name:"157xhr7",styles:"width:16px;height:16px"},rotatePreview:y("width:80px;height:80px;border:1px solid ",u.border,";border-radius:6px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:",u.background,";margin:8px auto;img{max-width:100%;max-height:100%;object-fit:contain;transition:transform 0.3s ease;}",""),resizeRow:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},resizeInput:y("width:80px;min-width:0;padding:8px 6px;font-size:",V.sm,";border:1px solid ",u.border,";border-radius:6px;background:",u.surface,";color:",u.text,";text-align:center;&:focus{outline:none;border-color:",u.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;background:",u.surfaceHover,";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}-moz-appearance:textfield;",""),resizeX:y("font-size:",V.sm,";color:",u.textMuted,";",""),qualitySlider:y("width:100%;height:6px;border-radius:3px;background:",u.border,";outline:none;cursor:pointer;&::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:",u.primary,";cursor:pointer;}&::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:",u.primary,";cursor:pointer;border:none;}",""),qualityRow:{name:"uh5xjc",styles:"display:flex;align-items:center;gap:12px"},qualityValue:y("min-width:40px;font-size:",V.sm,";color:",u.text,";text-align:right;",""),fileSize:y("font-size:",V.sm,";color:",u.textMuted,";padding:8px 0;",""),sidebarFooter:y("padding:16px 20px;border-top:1px solid ",u.border,";display:flex;flex-direction:column;gap:8px;",""),actionBtn:y("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",V.base,";font-weight:500;background:",u.primary,";border:1px solid ",u.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:white;&:hover:not(:disabled){background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),cancelBtn:y("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",V.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),spinner:{name:"1b4712p",styles:"width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin 0.75s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}"},hint:y("font-size:",V.xs,";color:",u.textMuted,";font-style:italic;",""),clearBtn:y("margin-top:8px;padding:6px 12px;font-size:",V.xs,";color:",u.textSecondary,";background:transparent;border:1px solid ",u.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";color:",u.text,";}","")},l2=[{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 o2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(2)} MB`}function i2({imagePath:i,imageSrc:s,dimensions:f,fileSize:d,onClose:h,onSaveComplete:m,triggerRefresh:w}){const D=v.useRef(null),[C,g]=v.useState(),[T,z]=v.useState(),[B,q]=v.useState(void 0),[H,Y]=v.useState(f.width),[ie,Q]=v.useState(f.height),[ce,ae]=v.useState(!1),[de,X]=v.useState(!1),[P,I]=v.useState({width:f.width,height:f.height}),[te,U]=v.useState(1),[Z,he]=v.useState(!1),[me,pe]=v.useState(0),[ne,Oe]=v.useState(!1),E=H!==P.width||ie!==P.height,[$,W]=v.useState(0),[De,qe]=v.useState(0),[x,_]=v.useState(!1),[ee,oe]=v.useState(0),[Se,K]=v.useState(null),[Ce,Ye]=v.useState(d),[ze,Rt]=v.useState(95),[Ze,ut]=v.useState(0),mt=Ze!==0,qt=F=>{const se=F.currentTarget,{naturalWidth:Ge,naturalHeight:et,width:Be,height:Ee}=se;I({width:Ge,height:et}),U(Ge/Be),X(!0),Y(Ge),Q(et)},Yt=()=>{if(!de||!D.current||Z||E||mt)return;const F=D.current.width,se=D.current.height;if(he(!0),B){const Ge=F/se;let et,Be;B>Ge?(et=100,Be=Ge/B*100):(Be=100,et=B/Ge*100);const Ee={unit:"%",x:(100-et)/2,y:(100-Be)/2,width:et,height:Be};g(Ee);const xt={unit:"px",x:Math.round(Ee.x/100*F),y:Math.round(Ee.y/100*se),width:Math.round(Ee.width/100*F),height:Math.round(Ee.height/100*se)};z(xt)}else g({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:F,height:se})},tn=()=>{he(!1),g(void 0),z(void 0)};v.useEffect(()=>{if(T&&de&&te>0){const F=Math.round(T.width*te),se=Math.round(T.height*te);W(F),qe(se)}else Z||(W(0),qe(0))},[T,de,te,Z]);const Qt=()=>{ut(F=>(F+90)%360)},hn=()=>{ut(F=>(F-90+360)%360)},It=()=>{ut(0)},dt=()=>{ne&&m({name:i.split("/").pop()||"",path:i,type:"file",dimensions:P}),h()},Xt=F=>{if(q(F),!de||!D.current)return;const se=D.current.width,Ge=D.current.height;if(F){const et=se/Ge;let Be,Ee;F>et?(Be=100,Ee=et/F*100):(Ee=100,Be=F/et*100);const xt={unit:"%",x:(100-Be)/2,y:(100-Ee)/2,width:Be,height:Ee};g(xt);const gt={unit:"px",x:Math.round(xt.x/100*se),y:Math.round(xt.y/100*Ge),width:Math.round(xt.width/100*se),height:Math.round(xt.height/100*Ge)};z(gt)}else g({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:se,height:Ge})},wt=P.width/P.height,Re=F=>{if(Z)return;const se=parseInt(F.target.value)||0;Y(se),se>0&&Q(Math.round(se/wt))},Dt=F=>{if(Z)return;const se=parseInt(F.target.value)||0;Q(se),se>0&&Y(Math.round(se*wt))},wn=()=>{Y(P.width),Q(P.height)},Yn=F=>{if(!T||!D.current)return;const se=parseInt(F.target.value)||0;if(se<=0)return;let Ge=De;B&&(Ge=Math.round(se/B));const et=se/te,Be=Ge/te,Ee={unit:"px",x:T.x,y:T.y,width:et,height:Be},xt=D.current.width-Ee.x,gt=D.current.height-Ee.y;Ee.width=Math.min(et,xt),Ee.height=Math.min(Be,gt),z(Ee),g({unit:"px",x:Ee.x,y:Ee.y,width:Ee.width,height:Ee.height})},Hn=F=>{if(!T||!D.current)return;const se=parseInt(F.target.value)||0;if(se<=0)return;let Ge=$;B&&(Ge=Math.round(se*B));const et=Ge/te,Be=se/te,Ee={unit:"px",x:T.x,y:T.y,width:et,height:Be},xt=D.current.width-Ee.x,gt=D.current.height-Ee.y;Ee.width=Math.min(et,xt),Ee.height=Math.min(Be,gt),z(Ee),g({unit:"px",x:Ee.x,y:Ee.y,width:Ee.width,height:Ee.height})},kn=async()=>{if(de){ae(!0);try{const F=T?{x:Math.round(T.x*te),y:Math.round(T.y*te),width:Math.round(T.width*te),height:Math.round(T.height*te)}:{x:0,y:0,width:P.width,height:P.height};let se=Z?$:E?H:P.width,Ge=Z?De:E?ie:P.height;if(Ze===90||Ze===270){const Ee=se;se=Ge,Ge=Ee}const Be=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:i,crop:F,rotation:Ze,resize:{width:se,height:Ge},quality:ze})})).json();Be.success?(w(),m(Be.updatedItem),I({width:Be.dimensions.width,height:Be.dimensions.height}),Y(Be.dimensions.width),Q(Be.dimensions.height),Be.updatedItem?.size&&Ye(Be.updatedItem.size),he(!1),g(void 0),z(void 0),ut(0),Oe(!0),pe(Date.now()),oe(Ee=>Ee+1),_(!0),setTimeout(()=>_(!1),3e3)):(console.error("Edit failed:",Be.error),K(Be.error||"Failed to save image"))}catch(F){console.error("Edit error:",F),K("An error occurred while saving the image")}finally{ae(!1)}}};return b("div",{css:xe.overlay,children:[b("div",{css:xe.container,children:[b("div",{css:xe.main,children:[r("div",{css:xe.headerButtons,children:r("button",{css:xe.closeBtn,onClick:dt,children:r("svg",{css:xe.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})}),b("div",{css:xe.rotationWrapper,onClick:Yt,children:[r(n2,{crop:Z?C:void 0,onChange:F=>g(F),onComplete:F=>z(F),aspect:B,css:xe.cropWrapper,disabled:!Z,children:r("img",{ref:D,src:me?`${s}?v=${me}`:s,alt:"Edit",onLoad:qt,style:{cursor:Z?"crosshair":"pointer"}})}),!Z&&de&&r("div",{css:xe.cropHint,children:mt?"Save rotation first to enable crop":E?"Save resize first to enable crop":"Click to enable crop selection"}),x&&r("div",{css:xe.successBanner,children:"Image updated"},ee)]})]}),b("div",{css:xe.sidebar,children:[r("div",{css:xe.sidebarHeader,children:r("h2",{css:xe.sidebarTitle,children:"Edit Image"})}),b("div",{css:xe.sidebarContent,children:[b("div",{css:xe.section,children:[r("span",{css:xe.sectionLabel,children:"Crop Selection"}),r("span",{css:xe.subSectionLabel,children:"Aspect Ratio"}),r("div",{css:xe.aspectButtons,children:l2.map(F=>r("button",{css:[xe.aspectBtn,B===F.value&&xe.aspectBtnActive,"",""],onClick:()=>Xt(F.value),disabled:E||mt,children:F.label},F.label))}),Z&&b(Pe,{children:[r("span",{css:xe.subSectionLabel,children:"Selection Size"}),b("div",{css:xe.resizeRow,children:[r("input",{type:"number",css:xe.resizeInput,value:$,onChange:Yn,min:1}),r("span",{css:xe.resizeX,children:"×"}),r("input",{type:"number",css:xe.resizeInput,value:De,onChange:Hn,min:1}),r("span",{css:xe.resizeX,children:"px"})]})]}),r("p",{css:xe.hint,children:mt?"Save rotation first to enable crop":E?"Save resize first to enable crop":Z?"Drag corners to resize crop area":"Click image to enable crop"}),Z&&r("button",{css:xe.clearBtn,onClick:tn,children:"Clear Selection"})]}),b("div",{css:xe.section,children:[r("span",{css:xe.sectionLabel,children:"Rotation"}),r("div",{css:xe.rotatePreview,children:r("img",{src:me?`${s}?v=${me}`:s,alt:"Rotation preview",style:{transform:`rotate(${Ze}deg)`}})}),b("div",{css:xe.rotateButtons,children:[b("button",{css:xe.rotateBtn,onClick:hn,disabled:ce||Z||E,children:[r("svg",{css:xe.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),"CCW"]}),b("button",{css:xe.rotateBtn,onClick:Qt,disabled:ce||Z||E,children:[r("svg",{css:xe.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"]})]}),mt&&r("button",{css:xe.clearBtn,onClick:It,children:"Reset Rotation"}),r("p",{css:xe.hint,children:Z||E?"Save other changes first to rotate":mt?"Click Save Changes to apply rotation":"Preview rotation before saving"})]}),b("div",{css:xe.section,children:[r("span",{css:xe.sectionLabel,children:"Resize Image"}),b("div",{css:xe.resizeRow,children:[r("input",{type:"number",css:xe.resizeInput,value:H,onChange:Re,min:1,disabled:Z||mt}),r("span",{css:xe.resizeX,children:"×"}),r("input",{type:"number",css:xe.resizeInput,value:ie,onChange:Dt,min:1,disabled:Z||mt}),r("span",{css:xe.resizeX,children:"px"})]}),E&&!Z&&!mt&&r("button",{css:xe.clearBtn,onClick:wn,children:"Reset to Original"}),mt?r("p",{css:xe.hint,children:"Save rotation first to resize"}):Z?r("p",{css:xe.hint,children:"Clear crop selection to resize"}):E?r("p",{css:xe.hint,children:"Save to apply resize, then crop"}):r("p",{css:xe.hint,children:"Maintains aspect ratio"})]}),b("div",{css:xe.section,children:[r("span",{css:xe.sectionLabel,children:"Quality"}),b("div",{css:xe.qualityRow,children:[r("input",{type:"range",css:xe.qualitySlider,min:1,max:100,value:ze,onChange:F=>Rt(parseInt(F.target.value))}),b("span",{css:xe.qualityValue,children:[ze,"%"]})]}),r("p",{css:xe.hint,children:"Lower quality = smaller file size"})]}),b("div",{css:xe.section,children:[r("span",{css:xe.sectionLabel,children:"File Size"}),r("p",{css:xe.fileSize,children:o2(Ce)})]})]}),b("div",{css:xe.sidebarFooter,children:[r("button",{css:xe.actionBtn,onClick:kn,disabled:ce||!de,children:ce?b(Pe,{children:[r("span",{css:xe.spinner}),"Saving..."]}):"Save Changes"}),r("button",{css:xe.cancelBtn,onClick:dt,disabled:ce,children:"Close"})]})]})]}),Se&&r(pu,{title:"Error",message:Se,onClose:()=>K(null)})]})}const r2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],s2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function c2(i){const s=i.toLowerCase().substring(i.lastIndexOf("."));return r2.includes(s)}function u2(i){const s=i.toLowerCase().substring(i.lastIndexOf("."));return s2.includes(s)}const ue={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:y("display:flex;flex:1;margin:24px;background:",u.surface,";border:1px solid ",u.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:y("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",u.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:y("position:relative;padding:8px;background:",u.surface,";border:1px solid ",u.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:",u.surfaceHover,";border-color:",u.borderHover,";}",""),copyIcon:y("width:20px;height:20px;color:",u.textSecondary,";",""),statusIcon:y("display:flex;align-items:center;justify-content:center;padding:8px;background:",u.surface,";border:1px solid ",u.border,";border-radius:8px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);",""),cloudIcon:{name:"1byef48",styles:"width:22px;height:22px;color:#f59e0b;transform:translateY(1px)"},globeIcon:{name:"jso3j5",styles:"width:20px;height:20px;color:#ef4444"},tooltip:{name:"1w9prgf",styles:"position:absolute;right:100%;top:50%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:8px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},mainCloseBtn:y("padding:8px;background:",u.surface,";border:1px solid ",u.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:",u.surfaceHover,";border-color:",u.borderHover,";}",""),mainCloseIcon:y("width:20px;height:20px;color:",u.textSecondary,";",""),mediaWrapper:{name:"zr0bjt",styles:"max-width:100%;max-height:100%;display:flex;align-items:center;justify-content:center"},image:{name:"4gte4n",styles:"max-width:100%;max-height:calc(100vh - 200px);object-fit:contain;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},video:{name:"1talud7",styles:"max-width:100%;max-height:calc(100vh - 200px);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},filePlaceholder:y("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",u.surface,";border-radius:12px;border:1px solid ",u.border,";",""),fileIcon:y("width:80px;height:80px;color:",u.textMuted,";margin-bottom:16px;",""),fileName:y("font-size:",V.lg,";font-weight:600;color:",u.text,";margin:0;",""),sidebar:y("width:280px;background:",u.surface,";border-left:1px solid ",u.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",u.border,";",""),sidebarTitle:y("font-size:",V.base,";font-weight:600;color:",u.text,";margin:0;",""),sidebarContent:{name:"esl95u",styles:"flex:1;padding:20px;overflow:auto"},info:{name:"bh1r16",styles:"display:flex;flex-direction:column;gap:12px;margin-bottom:24px"},infoRow:y("display:flex;justify-content:space-between;font-size:",V.sm,";",""),infoLabel:y("color:",u.textSecondary,";",""),infoValue:y("color:",u.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:y("color:",u.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:y("color:",u.primary,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;text-decoration:none;&:hover{text-decoration:underline;}",""),thumbChips:{name:"1w7hks3",styles:"display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end"},thumbChip:y("font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:",u.primary,";color:white;",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:y("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",V.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";text-align:left;&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:y("color:",u.danger,";&:hover:not(:disabled){background-color:",u.dangerLight,";border-color:",u.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 d2(){const{focusedItem:i,setFocusedItem:s,triggerRefresh:f,fileItems:d,setEditedImageKey:h,requestDelete:m,requestMove:w,requestSync:D,requestDownload:C,requestProcess:g,setProcessMode:T,actionState:z}=oo(),[B,q]=v.useState(!1),[H,Y]=v.useState(!1),[ie,Q]=v.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[ce,ae]=v.useState(!1),[de,X]=v.useState(null),[P,I]=v.useState(!1),[te,U]=v.useState(!1),[Z,he]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[me,pe]=v.useState(!1),[ne,Oe]=v.useState(0),E=z.showProgress,$=i?i.name.toLowerCase()==="favicon.png"||i.name.toLowerCase()==="favicon.jpg":!1,W=i&&!i.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(i.name)&&(!i.isCloud||i.hasUpdate),De=ut=>{s(ut),Oe(Date.now()),h(ut.path)};if(!i)return null;const qe=c2(i.name),x=u2(i.name),_="/"+i.path.replace(/^public\//,""),ee=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${_}`:_,oe=ne?`${ee}?v=${ne}`:ee,Se=typeof window<"u"?window.location.origin:"",K=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${_}`:`${Se}${_}`,Ce=()=>{s(null)},Ye=()=>{navigator.clipboard.writeText(K),I(!0),setTimeout(()=>I(!1),1500)},ze=async ut=>{if(ut&&ut!==i.name){q(!1),Y(!0),Q({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const mt=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:i.path,newName:ut})});if(!mt.body)throw new Error("No response body");const qt=mt.body.getReader(),Yt=new TextDecoder;let tn="",Qt="";for(;;){const{done:hn,value:It}=await qt.read();if(hn)break;tn+=Yt.decode(It,{stream:!0});const dt=tn.split(`
|
|
89
|
+
`);tn=dt.pop()||"";for(const Xt of dt){if(!Xt.startsWith("data: "))continue;const wt=JSON.parse(Xt.slice(6));wt.type==="start"?Q({current:0,total:wt.total,percent:0,status:"processing",message:wt.message}):wt.type==="progress"?Q({current:wt.current,total:wt.total,percent:Math.round(wt.current/wt.total*100),status:"processing",message:wt.message}):wt.type==="complete"?(Qt=wt.newPath,Q({current:wt.renamed,total:wt.renamed,percent:100,status:"complete",message:"Renamed successfully"})):wt.type==="error"&&(Q(Re=>({...Re,status:"error",message:wt.message})),X({title:"Rename Failed",message:wt.message}))}}Qt&&(s({...i,path:Qt,name:Qt.split("/").pop()||ut}),f())}catch(mt){console.error("Rename error:",mt),Q(qt=>({...qt,status:"error",message:"Failed to rename"})),X({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},Rt=async()=>{if(i){U(!0),he({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const ut=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+i.path.replace(/^public\//,"")})});if(!ut.ok){const Yt=await ut.json();he({current:0,total:3,percent:0,status:"error",message:Yt.error||"Failed to generate favicons"});return}const mt=ut.body?.getReader(),qt=new TextDecoder;if(mt){let Yt="";for(;;){const{done:tn,value:Qt}=await mt.read();if(tn)break;Yt+=qt.decode(Qt,{stream:!0});const hn=Yt.split(`
|
|
90
|
+
`);Yt=hn.pop()||"";for(const It of hn)if(It.startsWith("data: "))try{const dt=JSON.parse(It.slice(6));dt.type==="start"?he(Xt=>({...Xt,total:dt.total})):dt.type==="progress"?he({current:dt.current,total:dt.total,percent:dt.percent,status:"processing",message:dt.message}):dt.type==="complete"?he({current:dt.processed,total:dt.processed,percent:100,status:dt.errors>0?"error":"complete",message:dt.message}):dt.type==="error"&&he(Xt=>({...Xt,status:"error",message:dt.message}))}catch{}}}}catch(ut){console.error("Favicon generation error:",ut),he({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},Ze=()=>qe?r("img",{css:ue.image,src:oe,alt:i.name}):x?r("video",{css:ue.video,src:oe,controls:!0}):b("div",{css:ue.filePlaceholder,children:[r("svg",{css:ue.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:ue.fileName,children:i.name})]});return b(Pe,{children:[de&&r(pu,{title:de.title,message:de.message,onClose:()=>X(null)}),r(Yp,{isOpen:ce,onClose:()=>ae(!1)}),B&&r(ao,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:i.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:ze,onCancel:()=>q(!1)}),H&&r(hl,{title:"Renaming",progress:ie,onClose:()=>{Y(!1),f()}}),te&&r(hl,{title:"Generating Favicons",progress:Z,onClose:()=>U(!1)}),r("div",{css:ue.overlay,onClick:Ce,children:b("div",{css:ue.container,onClick:ut=>ut.stopPropagation(),children:[b("div",{css:ue.main,children:[b("div",{css:ue.headerButtons,children:[i.cdnPushed&&!i.isRemote&&r("span",{css:ue.statusIcon,title:"Pushed to CDN",children:r("svg",{css:ue.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:ue.statusIcon,title:"Remote image",children:r("svg",{css:ue.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})})}),b("button",{css:ue.copyBtn,onClick:Ye,title:"Copy file path",children:[P&&r("span",{css:ue.tooltip,children:"Copied!"}),r("svg",{css:ue.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:ue.mainCloseBtn,onClick:Ce,"aria-label":"Close",children:r("svg",{css:ue.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:ue.mediaWrapper,children:Ze()})]}),b("div",{css:ue.sidebar,children:[r("div",{css:ue.sidebarHeader,children:r("h3",{css:ue.sidebarTitle,children:"Details"})}),b("div",{css:ue.sidebarContent,children:[b("div",{css:ue.info,children:[b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"Name"}),r("span",{css:ue.infoValueWrap,children:i.name})]}),b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"Path"}),r("span",{css:ue.infoValueWrap,children:i.path.replace(/^public\//,"")})]}),i.size!==void 0&&b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"Size"}),r("span",{css:ue.infoValue,children:f2(i.size)})]}),i.dimensions&&b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"Dimensions"}),b("span",{css:ue.infoValue,children:[i.dimensions.width," × ",i.dimensions.height]})]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"Thumbnails"}),r("span",{css:ue.infoValue,children:b("span",{css:ue.thumbChips,children:[i.hasSm&&r("span",{css:ue.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:ue.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:ue.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:ue.thumbChip,children:"FULL"})]})})]}),b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"CDN Status"}),r("span",{css:ue.infoValue,children:i.cdnPushed?i.isRemote?"Remote":"Pushed":"Local"})]}),b("div",{css:ue.infoRow,children:[r("span",{css:ue.infoLabel,children:"URL"}),r("a",{href:K,target:"_blank",rel:"noopener noreferrer",css:ue.infoLink,title:K,children:K})]})]}),b("div",{css:ue.actions,children:[b("button",{css:ue.actionBtn,onClick:()=>q(!0),disabled:i.isProtected,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Rename"]}),qe&&b("button",{css:ue.actionBtn,onClick:()=>pe(!0),disabled:E||!W,title:W?void 0:"Download image first to edit",children:[r("svg",{css:ue.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"})}),W?"Edit Image":"Download to Edit"]}),b("button",{css:ue.actionBtn,onClick:()=>w([i.path]),disabled:E||i.isProtected,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"Move"]}),b("button",{css:[ue.actionBtn,ue.actionBtnCloud,"",""],onClick:()=>D([i.path],d),disabled:E||i.isProtected||i.cdnPushed&&!i.isRemote,title:i.cdnPushed&&!i.isRemote?"Already in R2":void 0,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Push to CDN"]}),b("button",{css:[ue.actionBtn,ue.actionBtnCloud,"",""],onClick:()=>C([i.path],d),disabled:E||!i.cdnPushed||i.isRemote,title:i.cdnPushed?i.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})}),"Download from CDN"]}),b("button",{css:ue.actionBtn,onClick:()=>{T("generate"),g([i.path])},disabled:E||i.isProtected,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Generate Thumbnails"]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("button",{css:ue.actionBtn,onClick:()=>{T("remove"),g([i.path])},disabled:E||i.isProtected,children:[r("svg",{css:ue.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"]}),$&&b("button",{css:ue.actionBtn,onClick:Rt,disabled:te||i.isProtected,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),"Generate Favicons"]}),b("button",{css:[ue.actionBtn,ue.actionBtnDanger,"",""],onClick:()=>m([i.path]),disabled:E||i.isProtected,children:[r("svg",{css:ue.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete"]})]})]})]})]})}),me&&i.dimensions&&r(i2,{imagePath:i.path,imageSrc:oe,dimensions:i.dimensions,fileSize:i.size||0,onClose:()=>pe(!1),onSaveComplete:De,triggerRefresh:f})]})}function f2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const fl={overlay:{name:"1u8n9cx",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1100"},modal:y("background:",u.surface,";border-radius:12px;padding:24px;max-width:400px;width:90%;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),header:{name:"c6eghz",styles:"display:flex;align-items:center;gap:12px;margin-bottom:12px"},icon:y("width:24px;height:24px;color:",u.danger,";flex-shrink:0;",""),title:y("font-size:",V.lg,";font-weight:600;color:",u.text,";margin:0;",""),message:y("font-size:",V.base,";color:",u.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:y("width:100%;padding:10px 16px;border-radius:6px;font-size:",V.base,";font-weight:500;border:none;background:",u.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",u.primaryHover,";}","")};function h2(){const{error:i,clearError:s}=oo();return i?r("div",{css:fl.overlay,onClick:s,children:b("div",{css:fl.modal,onClick:f=>f.stopPropagation(),children:[b("div",{css:fl.header,children:[r("svg",{css:fl.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),r("h3",{css:fl.title,children:i.title})]}),r("p",{css:fl.message,children:i.message}),r("button",{css:fl.button,onClick:s,children:"OK"})]})}):null}const Mp={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0};function p2({triggerRefresh:i,clearSelection:s,setFocusedItem:f,showError:d}){const[h,m]=v.useState(Mp),w=v.useCallback(te=>{m(U=>({...U,progressState:typeof te=="function"?te(U.progressState):{...U.progressState,...te}}))},[]),D=v.useCallback(te=>{m(U=>({...U,showProgress:te}))},[]),C=v.useCallback(te=>{m(U=>({...U,progressTitle:te}))},[]),g=jp({setShowProgress:D,setProgressTitle:C,setProgressState:w,triggerRefresh:i}),T=v.useCallback(te=>{m(U=>({...U,actionPaths:te,showDeleteConfirm:!0}))},[]),z=v.useCallback(te=>{m(U=>({...U,actionPaths:te,showMoveModal:!0}))},[]),B=v.useCallback((te,U)=>{const Z=te.map(pe=>"/"+pe.replace(/^public\//,""));let he=!1,me=!1;for(const pe of te){const ne=U.find(Oe=>Oe.path===pe);ne&&(ne.isRemote?he=!0:ne.cdnPushed||(me=!0))}m(pe=>({...pe,actionPaths:te,syncImageCount:Z.length,syncHasRemote:he,syncHasLocal:me,showSyncConfirm:!0}))},[]),q=v.useCallback((te,U)=>{const Z=[];for(const he of te){const me=U.find(pe=>pe.path===he);me&&me.cdnPushed&&!me.isRemote&&Z.push(he)}m(he=>({...he,actionPaths:Z,downloadImageCount:Z.length,downloadTotalSelected:te.length,showDownloadConfirm:!0}))},[]),H=v.useCallback(te=>{m(U=>({...U,actionPaths:te,showProcessConfirm:!0}))},[]),Y=v.useCallback(te=>{m(U=>({...U,processMode:te}))},[]),ie=v.useCallback(()=>{m(te=>({...te,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),Q=v.useCallback(()=>{m(Mp)},[]),ce=v.useCallback(()=>{g.stop()},[g]),ae=v.useCallback(async()=>{const te=h.actionPaths;m(U=>({...U,showDeleteConfirm:!1}));try{const U=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:te})});if(U.ok)s(),f(null),i();else{const Z=await U.json();d("Delete Failed",Z.error||"Unknown error")}}catch(U){console.error("Delete error:",U),d("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,s,f,i,d]),de=v.useCallback(async te=>{const U=h.actionPaths;m(Z=>({...Z,showMoveModal:!1})),await g.execute({endpoint:"/api/studio/move",body:{paths:U,destination:te},title:"Moving Files",onComplete:Z=>{Z.errors&&Z.errors>0&&Z.errorMessages?.length&&d("Move Failed",Z.errorMessages.join(`
|
|
91
|
+
`)),s(),f(null)}})},[h.actionPaths,s,f,d,g]),X=v.useCallback(async()=>{const U=h.actionPaths.map(me=>"/"+me.replace(/^public\//,""));m(me=>({...me,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:U.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let Z=0;const he=[];for(let me=0;me<U.length;me++){const pe=U[me];try{const ne=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[pe]})});if(ne.ok)Z++;else{const Oe=await ne.json();he.push(`${pe}: ${Oe.error||"Unknown error"}`)}}catch(ne){he.push(`${pe}: ${ne instanceof Error?ne.message:"Unknown error"}`)}w({current:me+1,total:U.length,percent:Math.round((me+1)/U.length*100),status:"processing",message:`Pushed ${pe}`})}w({current:U.length,total:U.length,percent:100,status:he.length>0?"error":"complete",message:`Pushed ${Z} file${Z!==1?"s":""}${he.length>0?`, ${he.length} error${he.length!==1?"s":""}`:""}`}),he.length>0&&d("Push Errors",he.join(`
|
|
92
|
+
`)),s(),i()},[h.actionPaths,s,i,d,w]),P=v.useCallback(async()=>{const te=h.actionPaths,U=h.processMode,Z=te.map(ne=>{const Oe=ne.replace(/^public\//,"");return Oe.startsWith("/")?Oe:`/${Oe}`}),he=U==="remove",me=he?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",pe=he?"Removing Thumbnails":"Generating Thumbnails";m(ne=>({...ne,showProcessConfirm:!1})),await g.execute({endpoint:me,body:{imageKeys:Z},title:pe})},[h.actionPaths,h.processMode,g]),I=v.useCallback(async()=>{const te=h.progressState.orphanedFiles;if(!(!te||te.length===0))try{const U=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:te})});if(U.ok)w(Z=>({...Z,orphanedFiles:void 0,message:Z.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),i();else{const Z=await U.json();d("Delete Failed",Z.error||"Failed to delete orphaned files")}}catch(U){console.error("Delete orphans error:",U),d("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[h.progressState.orphanedFiles,i,d,w]);return{actionState:h,setActionState:m,requestDelete:T,requestMove:z,requestSync:B,requestDownload:q,requestProcess:H,setProcessMode:Y,cancelAction:ie,closeProgress:Q,stopProcessing:ce,confirmDelete:ae,confirmMove:de,confirmSync:X,confirmProcess:P,deleteOrphans:I}}const m2="36px",g2=ln`
|
|
93
|
+
to { transform: rotate(360deg); }
|
|
94
|
+
`,Te={container:{name:"xt6tct",styles:"flex:1;display:flex;flex-direction:column;overflow:hidden"},toolbar:y("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",u.surface,";border-bottom:1px solid ",u.border,";@media (min-width: 768px){padding:12px 24px;}",""),toolbarLeft:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},toolbarRight:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},btn:y("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",m2,";padding:0 14px;border-radius:6px;font-size:",V.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";cursor:pointer;transition:all 0.15s ease;color:",u.text,";&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:y("background:",u.primary,";border-color:",u.primary,";color:white;&:hover:not(:disabled){background:",u.primaryHover,";border-color:",u.primaryHover,";}",""),btnDanger:y("color:",u.danger,";&:hover:not(:disabled){background-color:",u.dangerLight,";border-color:",u.danger,";}",""),btnIcon:{name:"157xhr7",styles:"width:16px;height:16px"},content:{name:"1tznmxd",styles:"flex:1;overflow:auto;padding:20px 24px"},loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:",g2," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",u.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:y("font-size:",V.base,";margin:0 0 4px 0;&:last-child{color:",u.textMuted,";font-size:",V.sm,";}",""),selectAllRow:y("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",u.surface,";border-radius:8px;border:1px solid ",u.border,";",""),selectAllLabel:y("display:flex;align-items:center;gap:10px;font-size:",V.base,";font-weight:500;color:",u.textSecondary,";cursor:pointer;&:hover{color:",u.text,";}",""),selectAllCheckbox:y("width:16px;height:16px;accent-color:",u.primary,";",""),grid:{name:"el23hk",styles:"display:grid;grid-template-columns:1fr;gap:12px;@media (min-width: 480px){grid-template-columns:repeat(2, 1fr);}@media (min-width: 768px){grid-template-columns:repeat(3, 1fr);}@media (min-width: 1024px){grid-template-columns:repeat(4, 1fr);}@media (min-width: 1280px){grid-template-columns:repeat(5, 1fr);}"},item:y("position:relative;border-radius:8px;border:1px solid ",u.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",u.surface,";user-select:none;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04);&:hover{border-color:#d0d5dd;box-shadow:0 2px 4px rgba(0, 0, 0, 0.06);}",""),itemSelected:y("border-color:",u.primary,";box-shadow:0 0 0 1px ",u.primary,";",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:y("width:18px;height:18px;accent-color:",u.primary,";cursor:pointer;",""),itemContent:y("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",u.background,";",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},parentIcon:y("width:56px;height:56px;color:",u.textMuted,";",""),fileIcon:y("width:40px;height:40px;color:",u.textMuted,";",""),openBtn:y("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",V.sm,";font-weight:500;color:",u.primary,";background:",u.surface,";border:1px solid ",u.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:",u.primaryLight,";border-color:",u.primary,";}",""),label:y("padding:10px 12px;background-color:",u.surface,";border-top:1px solid ",u.borderLight,";",""),labelName:y("font-size:",V.sm,";font-weight:500;color:",u.text,";margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),labelMeta:y("font-size:",V.xs,";color:",u.textMuted,";margin:2px 0 0 0;",""),dropOverlay:y("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",u.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:y("display:flex;flex-direction:column;align-items:center;gap:12px;color:",u.primary,";font-size:",V.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"},createBtn:y("margin-top:16px;padding:10px 24px;font-size:",V.base,";font-weight:500;background:",u.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover{background:",u.primaryHover,";}","")};function y2(i){return i<1024?i+" B":i<1024*1024?(i/1024).toFixed(1)+" KB":(i/(1024*1024)).toFixed(1)+" MB"}function b2({currentPath:i,setCurrentPath:s,refreshKey:f,triggerRefresh:d}){const[h,m]=v.useState([]),[w,D]=v.useState(!0),[C,g]=v.useState(new Set),[T,z]=v.useState(!1),[B,q]=v.useState(!1),[H,Y]=v.useState(!1),[ie,Q]=v.useState(!1),[ce,ae]=v.useState(!1),de=v.useCallback(async()=>{try{D(!0);const K=await fetch(`/api/studio/fonts/list?path=${encodeURIComponent(i)}`);if(K.ok){const Ce=await K.json();m(Ce.items||[]),z(Ce.canCreate===!0)}}catch(K){console.error("Failed to fetch fonts:",K),m([])}finally{D(!1)}},[i]);v.useEffect(()=>{de(),g(new Set)},[de,f]);const X=i==="_fonts";i==="src"||i.startsWith("src/");const P=v.useCallback((K,Ce)=>{Ce.stopPropagation(),g(Ye=>{const ze=new Set(Ye);return ze.has(K.path)?ze.delete(K.path):ze.add(K.path),ze})},[]),I=v.useCallback(K=>{K.type==="folder"&&(s(K.path),g(new Set))},[s]),te=v.useCallback(()=>{const K=i.split("/");K.pop();const Ce=K.join("/")||"_fonts";s(Ce),g(new Set)},[i,s]),U=h.length>0&&C.size===h.length,Z=C.size>0,he=v.useCallback(()=>{g(U?new Set:new Set(h.map(K=>K.path)))},[U,h]),me=Array.from(C),pe=me.length===1&&h.find(K=>K.path===me[0])?.type==="folder",ne=pe?me[0]:null,Oe=ne&&ne.split("/").pop()||"",E=v.useCallback(async K=>{if(ne){Y(!1);try{(await fetch("/api/studio/fonts/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:ne,newName:K})})).ok&&(g(new Set),d())}catch(Ce){console.error("Rename failed:",Ce)}}},[ne,d]),$=v.useCallback(()=>{C.size!==0&&ae(!0)},[C.size]),W=v.useCallback(async()=>{ae(!1);try{(await fetch("/api/studio/fonts/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Array.from(C)})})).ok&&(g(new Set),d())}catch(K){console.error("Delete failed:",K)}},[C,d]),De=v.useCallback(()=>{Q(!0)},[]),qe=v.useCallback(async K=>{Q(!1);try{(await fetch("/api/studio/fonts/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:i,name:K})})).ok&&d()}catch(Ce){console.error("Create folder failed:",Ce)}},[i,d]),x=v.useCallback(K=>{K.preventDefault(),K.stopPropagation(),i.startsWith("_fonts")&&q(!0)},[i]),_=v.useCallback(K=>{K.preventDefault(),K.stopPropagation(),q(!1)},[]),ee=v.useCallback(async K=>{if(K.preventDefault(),K.stopPropagation(),q(!1),!i.startsWith("_fonts"))return;const Ce=Array.from(K.dataTransfer.files).filter(Ye=>Ye.name.toLowerCase().endsWith(".ttf"));if(Ce.length!==0){for(const Ye of Ce){const ze=new FormData;ze.append("file",Ye),ze.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:ze})}catch(Rt){console.error("Upload failed:",Rt)}}d()}},[i,d]),oe=v.useCallback(K=>{K&&K.addEventListener("change",async Ce=>{const Ye=Ce.target.files;if(!(!Ye||Ye.length===0)){for(const ze of Array.from(Ye)){if(!ze.name.toLowerCase().endsWith(".ttf"))continue;const Rt=new FormData;Rt.append("file",ze),Rt.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:Rt})}catch(Ze){console.error("Upload failed:",Ze)}}d(),K.value=""}})},[i,d]);if(w)return b("div",{css:Te.container,children:[r("div",{css:Te.toolbar}),r("div",{css:Te.loading,children:r("div",{css:Te.spinner})})]});const Se=i.startsWith("_fonts");return b("div",{css:Te.container,children:[b("div",{css:Te.toolbar,children:[b("div",{css:Te.toolbarLeft,children:[Se&&b(Pe,{children:[b("button",{css:[Te.btn,Te.btnPrimary,"",""],onClick:()=>document.getElementById("font-file-input")?.click(),children:[r(v2,{}),"Add New"]}),r("input",{id:"font-file-input",type:"file",accept:".ttf",multiple:!0,style:{display:"none"},ref:oe})]}),b("button",{css:Te.btn,onClick:()=>{pe?Y(!0):De()},children:[pe?r(C2,{}):r(x2,{}),pe?"Rename":"New Folder"]}),b("button",{css:[Te.btn,Te.btnDanger,"",""],onClick:$,disabled:C.size===0,children:[r(S2,{}),"Delete"]})]}),r("div",{css:Te.toolbarRight,children:b("span",{style:{color:u.textSecondary,fontSize:V.sm},children:[h.length," item",h.length!==1?"s":""]})})]}),b("div",{css:Te.content,onDragOver:x,onDragLeave:_,onDrop:ee,style:{position:"relative"},children:[B&&r("div",{css:Te.dropOverlay,children:b("div",{css:Te.dropMessage,children:[r(w2,{}),r("span",{children:"Drop TTF files to upload"})]})}),h.length===0&&!T?b("div",{css:Te.empty,children:[r(lu,{css:Te.emptyIcon}),r("p",{css:Te.emptyText,children:"No files yet"}),r("p",{css:Te.emptyText,children:Se?'Drop TTF files here or click "Add New"':"This folder is empty"})]}):h.length===0&&T?b("div",{css:Te.empty,children:[r(lu,{css:Te.emptyIcon}),r("p",{css:Te.emptyText,children:"Folder doesn't exist"}),r("button",{css:Te.createBtn,onClick:De,children:"Create Folder"})]}):b(Pe,{children:[h.length>0&&r("div",{css:Te.selectAllRow,children:b("label",{css:Te.selectAllLabel,children:[r("input",{type:"checkbox",css:Te.selectAllCheckbox,checked:U,ref:K=>{K&&(K.indeterminate=Z&&!U)},onChange:he}),"Select all (",h.length,")"]})}),b("div",{css:Te.grid,children:[!X&&b("div",{css:Te.item,onClick:te,onDoubleClick:te,children:[r("div",{css:Te.itemContent,children:r(k2,{})}),b("div",{css:Te.label,children:[r("p",{css:Te.labelName,children:".."}),r("p",{css:Te.labelMeta,children:"Parent folder"})]})]}),h.map(K=>{const Ce=C.has(K.path);return b("div",{css:[Te.item,Ce&&Te.itemSelected,"",""],onClick:Ye=>P(K,Ye),onDoubleClick:()=>I(K),children:[r("div",{css:Te.checkboxWrapper,onClick:Ye=>{Ye.stopPropagation(),P(K,Ye)},children:r("input",{type:"checkbox",css:Te.checkbox,checked:Ce,onChange:()=>{}})}),b("div",{css:Te.itemContent,children:[r("button",{css:Te.openBtn,onClick:Ye=>{Ye.stopPropagation(),I(K)},children:"Open"}),K.type==="folder"?r(lu,{}):r(z2,{})]}),b("div",{css:Te.label,children:[r("p",{css:Te.labelName,children:K.name}),r("p",{css:Te.labelMeta,children:K.type==="folder"?`${K.fileCount||0} files`:K.size?y2(K.size):""})]})]},K.path)})]})]})]}),ie&&r(ao,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:qe,onCancel:()=>Q(!1)}),H&&ne&&r(ao,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:Oe,defaultValue:Oe,confirmLabel:"Rename",onConfirm:E,onCancel:()=>Y(!1)}),ce&&r(no,{title:"Delete Items",message:`Are you sure you want to delete ${C.size} item${C.size!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:W,onCancel:()=>ae(!1)})]})}function v2(){return r("svg",{css:Te.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}function x2(){return r("svg",{css:Te.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})})}function S2(){return r("svg",{css:Te.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}function C2(){return r("svg",{css:Te.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function w2(){return r("svg",{css:Te.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function lu(){return r("svg",{css:Te.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}function k2(){return r("svg",{css:Te.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}function z2(){return r("svg",{css:Te.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}const M2="36px",vt={container:y(ro," display:flex;flex-direction:column;height:100%;background:",u.background,";",""),header:y("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",u.surface,";border-bottom:1px solid ",u.border,";position:relative;",""),titleDropdown:{name:"bjn8wh",styles:"position:relative"},titleButton:y("display:flex;align-items:center;gap:6px;font-size:19px!important;font-weight:600;color:",u.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:",u.surfaceHover,";}",""),titleChevron:y("width:18px;height:18px;color:",u.textSecondary,";transition:transform 0.15s ease;margin-top:2px;stroke-width:2.5;",""),titleChevronOpen:{name:"21xn5r",styles:"transform:rotate(180deg)"},dropdownMenu:y("position:absolute;top:calc(100% + 8px);left:0;background:",u.surface,";border:1px solid ",u.border,";border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);padding:4px;z-index:100;",""),dropdownItem:y("display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;white-space:nowrap;position:relative;top:1px;font-size:19px!important;font-weight:600;letter-spacing:-0.02em;color:",u.text,";cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover{background:",u.surfaceHover,";}",""),dropdownItemActive:y("&::after{content:'';display:inline-block;width:8px;height:8px;background:",u.primary,";border-radius:50%;position:relative;top:1px;}",""),headerLeft:{name:"16ur2v6",styles:"display:flex;align-items:center;gap:12px;flex:1;min-width:0"},headerCenter:{name:"1fsejhz",styles:"position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;max-width:50%"},breadcrumbs:y("display:flex;align-items:center;gap:6px;font-size:",V.base,";color:",u.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:y("color:",u.border,";flex-shrink:0;",""),breadcrumbItem:y("color:",u.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",u.primary,";}",""),breadcrumbCurrent:y("color:",u.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:y("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",u.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",u.text,";background:",u.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:y("height:",M2,";padding:0 12px;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),headerIcon:y("width:16px;height:16px;color:",u.textSecondary,";",""),content:{name:"1rtaly3",styles:"flex:1;display:flex;overflow:hidden"},fileBrowser:{name:"upomw9",styles:"flex:1;min-width:0;overflow:auto;padding:20px 24px;display:flex;flex-direction:column"},dropOverlay:y("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",u.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:y("display:flex;flex-direction:column;align-items:center;gap:12px;color:",u.primary,";font-size:",V.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function D2({onClose:i,isVisible:s=!0,standaloneMode:f=!1,workspacePath:d,siteUrl:h}){const m=i||(()=>{}),[w,D]=v.useState("public"),[C,g]=v.useState(new Set),[T,z]=v.useState(null),[B,q]=v.useState("grid"),[H,Y]=v.useState(null),[ie,Q]=v.useState(null),[ce,ae]=v.useState(!1),[de,X]=v.useState(0),[P,I]=v.useState(!1),[te,U]=v.useState(""),[Z,he]=v.useState(null),[me,pe]=v.useState([]),[ne,Oe]=v.useState(!1),[E,$]=v.useState(()=>{if(typeof window<"u"){const F=window.location.hash.slice(1);if(F==="fonts")return"fonts";if(F==="media")return"media"}return"media"}),[W,De]=v.useState(!1),qe=v.useRef(null);v.useEffect(()=>{const F=()=>{const se=window.location.hash.slice(1);se==="fonts"?$("fonts"):se==="media"&&$("media")};return window.addEventListener("hashchange",F),()=>window.removeEventListener("hashchange",F)},[]);const[x,_]=v.useState("_fonts"),[ee,oe]=v.useState(0),Se=v.useCallback(()=>{X(F=>F+1)},[]),[K,Ce]=v.useState(null),Ye=v.useCallback(F=>{Ce({path:F,key:Date.now()})},[]);v.useEffect(()=>{if(H&&me.length>0){const F=me.find(se=>se.path===H.path);F&&JSON.stringify(F)!==JSON.stringify(H)&&Y(F)}},[me,H]);const ze=v.useCallback(()=>{I(!0)},[]),Rt=v.useCallback(()=>{I(!1)},[]),Ze=v.useCallback((F,se)=>{he({title:F,message:se})},[]),ut=v.useCallback(()=>{he(null)},[]),mt=v.useCallback(F=>{F.preventDefault(),F.stopPropagation(),Oe(!0)},[]),qt=v.useCallback(F=>{F.preventDefault(),F.stopPropagation(),Oe(!1)},[]),Yt=v.useCallback(async F=>{F.preventDefault(),F.stopPropagation(),Oe(!1);const se=Array.from(F.dataTransfer.files);if(se.length!==0&&!(w==="public/images"||w.startsWith("public/images/"))){for(const Ge of se){const et=new FormData;et.append("file",Ge),et.append("path",w);try{await fetch("/api/studio/upload",{method:"POST",body:et})}catch(Be){console.error("Upload error:",Be)}}Se()}},[w,Se]),tn=v.useCallback(()=>{if(w==="public")return;const F=w.split("/");F.pop(),D(F.join("/")||"public"),g(new Set)},[w]),Qt=v.useCallback(F=>{D(F),g(new Set),Y(null)},[]),hn=v.useCallback(F=>{g(se=>{const Ge=new Set(se);return Ge.has(F)?Ge.delete(F):Ge.add(F),Ge}),z(F)},[]),It=v.useCallback((F,se,Ge)=>{const et=Ge.findIndex(gt=>gt.path===F),Be=Ge.findIndex(gt=>gt.path===se);if(et===-1||Be===-1)return;const Ee=Math.min(et,Be),xt=Math.max(et,Be);g(gt=>{const pl=new Set(gt);for(let Qa=Ee;Qa<=xt;Qa++)pl.add(Ge[Qa].path);return pl}),z(se)},[]),dt=v.useCallback(F=>{g(new Set(F.map(se=>se.path)))},[]),Xt=v.useCallback(()=>{g(new Set)},[]),wt=v.useCallback(F=>{Y(F)},[]),Re=p2({triggerRefresh:Se,clearSelection:Xt,setFocusedItem:wt,showError:Ze}),Dt=v.useCallback(F=>{if(F.key==="Escape"){const se=F.target;if(se.tagName==="INPUT"||se.tagName==="TEXTAREA")return;H?Y(null):f||m()}},[m,H,f]);v.useEffect(()=>(s&&(document.addEventListener("keydown",Dt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",Dt),document.body.style.overflow=""}),[Dt,s]),v.useEffect(()=>{const F=se=>{qe.current&&!qe.current.contains(se.target)&&De(!1)};return W&&document.addEventListener("mousedown",F),()=>{document.removeEventListener("mousedown",F)}},[W]);const wn=v.useCallback(()=>{De(F=>!F)},[]),Yn=v.useCallback(F=>{$(F),De(!1),window.location.hash=F},[]),Hn=v.useCallback(()=>{oe(F=>F+1)},[]),kn={isOpen:!0,openStudio:()=>{},closeStudio:m,toggleStudio:m,currentPath:w,setCurrentPath:Qt,navigateUp:tn,selectedItems:C,toggleSelection:hn,selectRange:It,selectAll:dt,clearSelection:Xt,lastSelectedPath:T,viewMode:B,setViewMode:q,focusedItem:H,setFocusedItem:Y,meta:ie,setMeta:Q,isLoading:ce,setIsLoading:ae,refreshKey:de,triggerRefresh:Se,editedImageKey:K,setEditedImageKey:Ye,scanRequested:P,triggerScan:ze,clearScanRequest:Rt,searchQuery:te,setSearchQuery:U,error:Z,showError:Ze,clearError:ut,fileItems:me,setFileItems:pe,actionState:Re.actionState,requestDelete:Re.requestDelete,requestMove:Re.requestMove,requestSync:Re.requestSync,requestDownload:Re.requestDownload,requestProcess:Re.requestProcess,setProcessMode:Re.setProcessMode,confirmDelete:Re.confirmDelete,confirmMove:Re.confirmMove,confirmSync:Re.confirmSync,confirmProcess:Re.confirmProcess,cancelAction:Re.cancelAction,closeProgress:Re.closeProgress,stopProcessing:Re.stopProcessing,deleteOrphans:Re.deleteOrphans};return r(Np.Provider,{value:kn,children:b("div",{css:vt.container,children:[b("div",{css:vt.header,children:[r("div",{css:vt.headerLeft,children:b("div",{css:vt.titleDropdown,ref:qe,children:[b("button",{css:vt.titleButton,onClick:wn,children:[r("span",{children:"gallop.studio"}),r(O2,{isOpen:W})]}),W&&b("div",{css:vt.dropdownMenu,children:[r("button",{css:[vt.dropdownItem,E==="media"&&vt.dropdownItemActive,"",""],onClick:()=>Yn("media"),children:"media & files"}),r("button",{css:[vt.dropdownItem,E==="fonts"&&vt.dropdownItemActive,"",""],onClick:()=>Yn("fonts"),children:"fonts"})]})]})}),r("div",{css:vt.headerCenter,children:r(R2,{currentPath:w,onNavigate:Qt,projectName:d?d.split("/").pop():void 0})}),b("div",{css:vt.headerActions,children:[h&&r("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:vt.headerIconBtn,title:`Open ${h}`,children:r(L2,{})}),!f&&r("button",{css:vt.headerBtn,onClick:m,"aria-label":"Close Studio",children:r(_2,{})})]})]}),E==="media"?b(Pe,{children:[r(C1,{}),b("div",{css:vt.content,onDragOver:mt,onDragLeave:qt,onDrop:Yt,children:[ne&&r("div",{css:vt.dropOverlay,children:b("div",{css:vt.dropMessage,children:[r("svg",{css:vt.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:vt.fileBrowser,children:B==="grid"?r(X1,{}):r(F1,{})})]}),H&&r(d2,{}),r(h2,{}),Re.actionState.showDeleteConfirm&&r(no,{title:"Delete Files",message:`Are you sure you want to delete ${Re.actionState.actionPaths.length} item${Re.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Re.confirmDelete,onCancel:Re.cancelAction}),Re.actionState.showSyncConfirm&&r(no,{title:"Push to CDN",message:`Push ${Re.actionState.syncImageCount} image${Re.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${Re.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${Re.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:Re.confirmSync,onCancel:Re.cancelAction}),Re.actionState.showProcessConfirm&&r(T2,{imageCount:Re.actionState.actionPaths.length,mode:Re.actionState.processMode,onConfirm:Re.confirmProcess,onCancel:Re.cancelAction}),Re.actionState.showMoveModal&&r(qp,{selectedItems:new Set(Re.actionState.actionPaths),currentPath:w,onMove:F=>Re.confirmMove(F),onCancel:Re.cancelAction}),Re.actionState.showProgress&&r(hl,{title:Re.actionState.progressTitle,progress:Re.actionState.progressState,onStop:Re.stopProcessing,onDeleteOrphans:Re.deleteOrphans,onClose:Re.closeProgress})]}):r(b2,{currentPath:x,setCurrentPath:_,refreshKey:ee,triggerRefresh:Hn})]})})}var E2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},A2={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 T2({imageCount:i,mode:s,onConfirm:f,onCancel:d}){const h={overlay:A2,container:y("background:",u.surface,";border-radius:12px;padding:24px;max-width:420px;width:90%;box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.1),0 10px 10px -5px rgba(0, 0, 0, 0.04);",""),title:y("font-size:",V.lg,";font-weight:600;color:",u.text,";margin:0 0 16px;",""),message:y("font-size:",V.base,";color:",u.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:E2,cancelBtn:y("padding:10px 20px;border:1px solid ",u.border,";border-radius:8px;background:",u.background,";color:",u.text,";font-size:",V.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";border-color:",u.borderHover,";}",""),confirmBtn:y("padding:10px 20px;border:none;border-radius:8px;background:",u.primary,";color:white;font-size:",V.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",u.primaryHover,";}",""),confirmBtnDanger:y("background:",u.danger,";&:hover{background:#dc2626;}","")},m=s==="remove",w=m?"Remove Thumbnails":"Generate Thumbnails",D=m?`Remove generated thumbnails for ${i} image${i!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${i} image${i!==1?"s":""}?`,C=m?"Remove":"Generate";return r("div",{css:h.overlay,onClick:d,children:b("div",{css:h.container,onClick:g=>g.stopPropagation(),children:[r("h2",{css:h.title,children:w}),r("p",{css:h.message,children:D}),b("div",{css:h.actions,children:[r("button",{css:h.cancelBtn,onClick:d,children:"Cancel"}),r("button",{css:[h.confirmBtn,m&&h.confirmBtnDanger,"",""],onClick:f,children:C})]})]})})}function R2({currentPath:i,onNavigate:s,projectName:f}){const d=i.split("/").filter(Boolean),h=d.map((m,w)=>({name:w===0&&m==="public"&&f?f:m,path:d.slice(0,w+1).join("/")}));return r("div",{css:vt.breadcrumbs,children:h.map((m,w)=>b("span",{style:{display:"flex",alignItems:"center",gap:6},children:[w>0&&r("span",{css:vt.breadcrumbSeparator,children:"/"}),w===h.length-1?r("span",{css:vt.breadcrumbCurrent,children:m.name}):r("span",{css:vt.breadcrumbItem,onClick:()=>s(m.path),children:m.name})]},m.path))})}function L2(){return b("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"10"}),r("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),r("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function _2(){return b("svg",{css:vt.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 O2({isOpen:i}){return r("svg",{css:[vt.titleChevron,i&&vt.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 Vp=document.getElementById("root");if(!Vp)throw new Error("Root element not found");const H2=window.__STUDIO_WORKSPACE__||"Unknown",U2=window.__STUDIO_SITE_URL__||"";l1.createRoot(Vp).render(r(v.StrictMode,{children:r("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:r(D2,{isVisible:!0,standaloneMode:!0,workspacePath:H2,siteUrl:U2})})}));
|