@zhin.js/console 1.0.48 → 1.0.49

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.
package/dist/client.js CHANGED
@@ -1 +1 @@
1
- import*as X from"./react.js";import fn,{useMemo as we,useCallback as z,useEffect as me,useState as Z}from"./react.js";import{jsx as it}from"./react-jsx-runtime.js";import{createBrowserRouter as pn,RouterProvider as hn,Outlet as mn}from"./react-router.js";import{Link as Ui,Outlet as $i,useNavigate as Gi,useOutlet as Bi,useParams as Vi}from"./react-router.js";function _r(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=_r(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function gn(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=_r(e))&&(n&&(n+=" "),n+=t);return n}const yn=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},bn=(e,t)=>({classGroupId:e,validator:t}),xr=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),We="-",Xt=[],wn="arbitrary..",vn=e=>{const t=kn(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Sn(i);const c=i.split(We),a=c[0]===""&&c.length>1?1:0;return Cr(c,a,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const a=n[i],l=r[i];return a?l?yn(l,a):a:l||Xt}return r[i]||Xt}}},Cr=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const l=Cr(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const c=t===0?e.join(We):e.slice(t).join(We),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(c))return u.classGroupId}},Sn=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?wn+n:void 0})(),kn=e=>{const{theme:t,classGroups:r}=e;return _n(r,t)},_n=(e,t)=>{const r=xr();for(const n in e){const o=e[n];Ot(o,r,n,t)}return r},Ot=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];xn(i,t,r,n)}},xn=(e,t,r,n)=>{if(typeof e=="string"){Cn(e,t,r);return}if(typeof e=="function"){En(e,t,r,n);return}Rn(e,t,r,n)},Cn=(e,t,r)=>{const n=e===""?t:Er(t,e);n.classGroupId=r},En=(e,t,r,n)=>{if(On(e)){Ot(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(bn(r,e))},Rn=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[c,a]=o[i];Ot(a,Er(t,c),r,n)}},Er=(e,t)=>{let r=e;const n=t.split(We),o=n.length;for(let s=0;s<o;s++){const i=n[s];let c=r.nextPart.get(i);c||(c=xr(),r.nextPart.set(i,c)),r=c}return r},On=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Pn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,i)=>{r[s]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let i=r[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return o(s,i),i},set(s,i){s in r?r[s]=i:o(s,i)}}},yt="!",Jt=":",An=[],Qt=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Tn=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,c=0,a=0,l;const u=o.length;for(let m=0;m<u;m++){const b=o[m];if(i===0&&c===0){if(b===Jt){s.push(o.slice(a,m)),a=m+1;continue}if(b==="/"){l=m;continue}}b==="["?i++:b==="]"?i--:b==="("?c++:b===")"&&c--}const d=s.length===0?o:o.slice(a);let f=d,p=!1;d.endsWith(yt)?(f=d.slice(0,-1),p=!0):d.startsWith(yt)&&(f=d.slice(1),p=!0);const _=l&&l>a?l-a:void 0;return Qt(s,p,f,_)};if(t){const o=t+Jt,s=n;n=i=>i.startsWith(o)?s(i.slice(o.length)):Qt(An,!1,i,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},In=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const i=r[s],c=i[0]==="[",a=t.has(i);c||a?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},Mn=e=>({cache:Pn(e.cacheSize),parseClassName:Tn(e),sortModifiers:In(e),...vn(e)}),zn=/\s+/,Nn=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],c=e.trim().split(zn);let a="";for(let l=c.length-1;l>=0;l-=1){const u=c[l],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:_,maybePostfixModifierPosition:m}=r(u);if(d){a=u+(a.length>0?" "+a:a);continue}let b=!!m,E=n(b?_.substring(0,m):_);if(!E){if(!b){a=u+(a.length>0?" "+a:a);continue}if(E=n(_),!E){a=u+(a.length>0?" "+a:a);continue}b=!1}const O=f.length===0?"":f.length===1?f[0]:s(f).join(":"),S=p?O+yt:O,w=S+E;if(i.indexOf(w)>-1)continue;i.push(w);const v=o(E,b);for(let x=0;x<v.length;++x){const R=v[x];i.push(S+R)}a=u+(a.length>0?" "+a:a)}return a},Dn=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Rr(r))&&(o&&(o+=" "),o+=n);return o},Rr=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Rr(e[n]))&&(r&&(r+=" "),r+=t);return r},jn=(e,...t)=>{let r,n,o,s;const i=a=>{const l=t.reduce((u,d)=>d(u),e());return r=Mn(l),n=r.cache.get,o=r.cache.set,s=c,c(a)},c=a=>{const l=n(a);if(l)return l;const u=Nn(a,r);return o(a,u),u};return s=i,(...a)=>s(Dn(...a))},Fn=[],T=e=>{const t=r=>r[e]||Fn;return t.isThemeGetter=!0,t},Or=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Wn=/^\d+\/\d+$/,Ln=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Un=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$n=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,se=e=>Wn.test(e),C=e=>!!e&&!Number.isNaN(Number(e)),Y=e=>!!e&&Number.isInteger(Number(e)),at=e=>e.endsWith("%")&&C(e.slice(0,-1)),G=e=>Ln.test(e),Bn=()=>!0,Vn=e=>qn.test(e)&&!Un.test(e),Ar=()=>!1,Hn=e=>$n.test(e),Kn=e=>Gn.test(e),Yn=e=>!g(e)&&!y(e),Xn=e=>ce(e,Mr,Ar),g=e=>Or.test(e),Q=e=>ce(e,zr,Vn),ct=e=>ce(e,to,C),Zt=e=>ce(e,Tr,Ar),Jn=e=>ce(e,Ir,Kn),Pe=e=>ce(e,Nr,Hn),y=e=>Pr.test(e),de=e=>le(e,zr),Qn=e=>le(e,ro),er=e=>le(e,Tr),Zn=e=>le(e,Mr),eo=e=>le(e,Ir),Ae=e=>le(e,Nr,!0),ce=(e,t,r)=>{const n=Or.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},le=(e,t,r=!1)=>{const n=Pr.exec(e);return n?n[1]?t(n[1]):r:!1},Tr=e=>e==="position"||e==="percentage",Ir=e=>e==="image"||e==="url",Mr=e=>e==="length"||e==="size"||e==="bg-size",zr=e=>e==="length",to=e=>e==="number",ro=e=>e==="family-name",Nr=e=>e==="shadow",no=()=>{const e=T("color"),t=T("font"),r=T("text"),n=T("font-weight"),o=T("tracking"),s=T("leading"),i=T("breakpoint"),c=T("container"),a=T("spacing"),l=T("radius"),u=T("shadow"),d=T("inset-shadow"),f=T("text-shadow"),p=T("drop-shadow"),_=T("blur"),m=T("perspective"),b=T("aspect"),E=T("ease"),O=T("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...w(),y,g],x=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],h=()=>[y,g,a],A=()=>[se,"full","auto",...h()],ue=()=>[Y,"none","subgrid",y,g],_e=()=>["auto",{span:["full",Y,y,g]},Y,y,g],xe=()=>[Y,"auto",y,g],Gt=()=>["auto","min","max","fr",y,g],nt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...h()],J=()=>[se,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...h()],k=()=>[e,y,g],Bt=()=>[...w(),er,Zt,{position:[y,g]}],Vt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ht=()=>["auto","cover","contain",Zn,Xn,{size:[y,g]}],ot=()=>[at,de,Q],N=()=>["","none","full",l,y,g],F=()=>["",C,de,Q],Ce=()=>["solid","dashed","dotted","double"],Kt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[C,at,er,Zt],Yt=()=>["","none",_,y,g],Ee=()=>["none",C,y,g],Re=()=>["none",C,y,g],st=()=>[C,y,g],Oe=()=>[se,"full",...h()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[G],breakpoint:[G],color:[Bn],container:[G],"drop-shadow":[G],ease:["in","out","in-out"],font:[Yn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[G],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[G],shadow:[G],spacing:["px",C],text:[G],"text-shadow":[G],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",se,g,y,b]}],container:["container"],columns:[{columns:[C,g,y,c]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Y,"auto",y,g]}],basis:[{basis:[se,"full","auto",c,...h()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,se,"auto","initial","none",g]}],grow:[{grow:["",C,y,g]}],shrink:[{shrink:["",C,y,g]}],order:[{order:[Y,"first","last","none",y,g]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:_e()}],"col-start":[{"col-start":xe()}],"col-end":[{"col-end":xe()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:_e()}],"row-start":[{"row-start":xe()}],"row-end":[{"row-end":xe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Gt()}],"auto-rows":[{"auto-rows":Gt()}],gap:[{gap:h()}],"gap-x":[{"gap-x":h()}],"gap-y":[{"gap-y":h()}],"justify-content":[{justify:[...nt(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...nt()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":nt()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:h()}],px:[{px:h()}],py:[{py:h()}],ps:[{ps:h()}],pe:[{pe:h()}],pt:[{pt:h()}],pr:[{pr:h()}],pb:[{pb:h()}],pl:[{pl:h()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":h()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":h()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[c,"screen",...J()]}],"min-w":[{"min-w":[c,"screen","none",...J()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,de,Q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,y,ct]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",at,g]}],"font-family":[{font:[Qn,g,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,y,g]}],"line-clamp":[{"line-clamp":[C,"none",y,ct]}],leading:[{leading:[s,...h()]}],"list-image":[{"list-image":["none",y,g]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",y,g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[C,"from-font","auto",y,Q]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[C,"auto",y,g]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:h()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",y,g]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",y,g]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Bt()}],"bg-repeat":[{bg:Vt()}],"bg-size":[{bg:Ht()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Y,y,g],radial:["",y,g],conic:[Y,y,g]},eo,Jn]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ot()}],"gradient-via-pos":[{via:ot()}],"gradient-to-pos":[{to:ot()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[C,y,g]}],"outline-w":[{outline:["",C,de,Q]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,Ae,Pe]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,Ae,Pe]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[C,Q]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,Ae,Pe]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[C,y,g]}],"mix-blend":[{"mix-blend":[...Kt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Kt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[C]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[y,g]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[C]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Bt()}],"mask-repeat":[{mask:Vt()}],"mask-size":[{mask:Ht()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",y,g]}],filter:[{filter:["","none",y,g]}],blur:[{blur:Yt()}],brightness:[{brightness:[C,y,g]}],contrast:[{contrast:[C,y,g]}],"drop-shadow":[{"drop-shadow":["","none",p,Ae,Pe]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",C,y,g]}],"hue-rotate":[{"hue-rotate":[C,y,g]}],invert:[{invert:["",C,y,g]}],saturate:[{saturate:[C,y,g]}],sepia:[{sepia:["",C,y,g]}],"backdrop-filter":[{"backdrop-filter":["","none",y,g]}],"backdrop-blur":[{"backdrop-blur":Yt()}],"backdrop-brightness":[{"backdrop-brightness":[C,y,g]}],"backdrop-contrast":[{"backdrop-contrast":[C,y,g]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,y,g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,y,g]}],"backdrop-invert":[{"backdrop-invert":["",C,y,g]}],"backdrop-opacity":[{"backdrop-opacity":[C,y,g]}],"backdrop-saturate":[{"backdrop-saturate":[C,y,g]}],"backdrop-sepia":[{"backdrop-sepia":["",C,y,g]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":h()}],"border-spacing-x":[{"border-spacing-x":h()}],"border-spacing-y":[{"border-spacing-y":h()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",y,g]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[C,"initial",y,g]}],ease:[{ease:["linear","initial",E,y,g]}],delay:[{delay:[C,y,g]}],animate:[{animate:["none",O,y,g]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,y,g]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:Re()}],"scale-x":[{"scale-x":Re()}],"scale-y":[{"scale-y":Re()}],"scale-z":[{"scale-z":Re()}],"scale-3d":["scale-3d"],skew:[{skew:st()}],"skew-x":[{"skew-x":st()}],"skew-y":[{"skew-y":st()}],transform:[{transform:[y,g,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",y,g]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-mt":[{"scroll-mt":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",y,g]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[C,de,Q,ct]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},oo=jn(no);function M(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var so=typeof Symbol=="function"&&Symbol.observable||"@@observable",tr=so,lt=()=>Math.random().toString(36).substring(7).split("").join("."),io={INIT:`@@redux/INIT${lt()}`,REPLACE:`@@redux/REPLACE${lt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lt()}`},Le=io;function Pt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function At(e,t,r){if(typeof e!="function")throw new Error(M(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(M(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(M(1));return r(At)(e,t)}let n=e,o=t,s=new Map,i=s,c=0,a=!1;function l(){i===s&&(i=new Map,s.forEach((b,E)=>{i.set(E,b)}))}function u(){if(a)throw new Error(M(3));return o}function d(b){if(typeof b!="function")throw new Error(M(4));if(a)throw new Error(M(5));let E=!0;l();const O=c++;return i.set(O,b),function(){if(E){if(a)throw new Error(M(6));E=!1,l(),i.delete(O),s=null}}}function f(b){if(!Pt(b))throw new Error(M(7));if(typeof b.type>"u")throw new Error(M(8));if(typeof b.type!="string")throw new Error(M(17));if(a)throw new Error(M(9));try{a=!0,o=n(o,b)}finally{a=!1}return(s=i).forEach(O=>{O()}),b}function p(b){if(typeof b!="function")throw new Error(M(10));n=b,f({type:Le.REPLACE})}function _(){const b=d;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(M(11));function O(){const w=E;w.next&&w.next(u())}return O(),{unsubscribe:b(O)}},[tr](){return this}}}return f({type:Le.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[tr]:_}}function ao(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Le.INIT})>"u")throw new Error(M(12));if(typeof r(void 0,{type:Le.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(M(13))})}function Tt(e){const t=Object.keys(e),r={};for(let s=0;s<t.length;s++){const i=t[s];typeof e[i]=="function"&&(r[i]=e[i])}const n=Object.keys(r);let o;try{ao(r)}catch(s){o=s}return function(i={},c){if(o)throw o;let a=!1;const l={};for(let u=0;u<n.length;u++){const d=n[u],f=r[d],p=i[d],_=f(p,c);if(typeof _>"u")throw c&&c.type,new Error(M(14));l[d]=_,a=a||_!==p}return a=a||n.length!==Object.keys(i).length,a?l:i}}function qe(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function co(...e){return t=>(r,n)=>{const o=t(r,n);let s=()=>{throw new Error(M(15))};const i={getState:o.getState,dispatch:(a,...l)=>s(a,...l)},c=e.map(a=>a(i));return s=qe(...c)(o.dispatch),{...o,dispatch:s}}}function lo(e){return Pt(e)&&"type"in e&&typeof e.type=="string"}var Dr=Symbol.for("immer-nothing"),rr=Symbol.for("immer-draftable"),D=Symbol.for("immer-state");function q(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var W=Object,ae=W.getPrototypeOf,Ue="constructor",Ke="prototype",bt="configurable",$e="enumerable",Ne="writable",ge="value",K=e=>!!e&&!!e[D];function U(e){return e?jr(e)||Xe(e)||!!e[rr]||!!e[Ue]?.[rr]||Je(e)||Qe(e):!1}var uo=W[Ke][Ue].toString(),nr=new WeakMap;function jr(e){if(!e||!It(e))return!1;const t=ae(e);if(t===null||t===W[Ke])return!0;const r=W.hasOwnProperty.call(t,Ue)&&t[Ue];if(r===Object)return!0;if(!ie(r))return!1;let n=nr.get(r);return n===void 0&&(n=Function.toString.call(r),nr.set(r,n)),n===uo}function Ye(e,t,r=!0){ve(e)===0?(r?Reflect.ownKeys(e):W.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function ve(e){const t=e[D];return t?t.type_:Xe(e)?1:Je(e)?2:Qe(e)?3:0}var or=(e,t,r=ve(e))=>r===2?e.has(t):W[Ke].hasOwnProperty.call(e,t),wt=(e,t,r=ve(e))=>r===2?e.get(t):e[t],Ge=(e,t,r,n=ve(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function fo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Xe=Array.isArray,Je=e=>e instanceof Map,Qe=e=>e instanceof Set,It=e=>typeof e=="object",ie=e=>typeof e=="function",ut=e=>typeof e=="boolean";function po(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var V=e=>e.copy_||e.base_,Mt=e=>e.modified_?e.copy_:e.base_;function vt(e,t){if(Je(e))return new Map(e);if(Qe(e))return new Set(e);if(Xe(e))return Array[Ke].slice.call(e);const r=jr(e);if(t===!0||t==="class_only"&&!r){const n=W.getOwnPropertyDescriptors(e);delete n[D];let o=Reflect.ownKeys(n);for(let s=0;s<o.length;s++){const i=o[s],c=n[i];c[Ne]===!1&&(c[Ne]=!0,c[bt]=!0),(c.get||c.set)&&(n[i]={[bt]:!0,[Ne]:!0,[$e]:c[$e],[ge]:e[i]})}return W.create(ae(e),n)}else{const n=ae(e);if(n!==null&&r)return{...e};const o=W.create(n);return W.assign(o,e)}}function zt(e,t=!1){return Ze(e)||K(e)||!U(e)||(ve(e)>1&&W.defineProperties(e,{set:Te,add:Te,clear:Te,delete:Te}),W.freeze(e),t&&Ye(e,(r,n)=>{zt(n,!0)},!1)),e}function ho(){q(2)}var Te={[ge]:ho};function Ze(e){return e===null||!It(e)?!0:W.isFrozen(e)}var Be="MapSet",St="Patches",sr="ArrayMethods",Fr={};function re(e){const t=Fr[e];return t||q(0,e),t}var ir=e=>!!Fr[e],ye,Wr=()=>ye,mo=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ir(Be)?re(Be):void 0,arrayMethodsPlugin_:ir(sr)?re(sr):void 0});function ar(e,t){t&&(e.patchPlugin_=re(St),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function kt(e){_t(e),e.drafts_.forEach(go),e.drafts_=null}function _t(e){e===ye&&(ye=e.parent_)}var cr=e=>ye=mo(ye,e);function go(e){const t=e[D];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lr(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[D].modified_&&(kt(t),q(4)),U(e)&&(e=ur(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[D].base_,e,t)}else e=ur(t,r);return yo(t,e,!0),kt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Dr?e:void 0}function ur(e,t){if(Ze(t))return t;const r=t[D];if(!r)return Ve(t,e.handledSet_,e);if(!et(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Ur(r,e)}return r.copy_}function yo(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zt(t,r)}function Lr(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var et=(e,t)=>e.scope_===t,bo=[];function qr(e,t,r,n){const o=V(e),s=e.type_;if(n!==void 0&&wt(o,n,s)===t){Ge(o,n,r,s);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Ye(o,(a,l)=>{if(K(l)){const u=c.get(l)||[];u.push(a),c.set(l,u)}})}const i=e.draftLocations_.get(t)??bo;for(const c of i)Ge(o,c,r,s)}function wo(e,t,r){e.callbacks_.push(function(o){const s=t;if(!s||!et(s,o))return;o.mapSetPlugin_?.fixSetContents(s);const i=Mt(s);qr(e,s.draft_??s,i,r),Ur(s,o)})}function Ur(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const o=n.getPath(e);o&&n.generatePatches_(e,o,t)}Lr(e)}}function vo(e,t,r){const{scope_:n}=e;if(K(r)){const o=r[D];et(o,n)&&o.callbacks_.push(function(){De(e);const i=Mt(o);qr(e,r,i,t)})}else U(r)&&e.callbacks_.push(function(){const s=V(e);e.type_===3?s.has(r)&&Ve(r,n.handledSet_,n):wt(s,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ve(wt(e.copy_,t,e.type_),n.handledSet_,n)})}function Ve(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||K(e)||t.has(e)||!U(e)||Ze(e)||(t.add(e),Ye(e,(n,o)=>{if(K(o)){const s=o[D];if(et(s,r)){const i=Mt(s);Ge(e,n,i,e.type_),Lr(s)}}else U(o)&&Ve(o,t,r)})),e}function So(e,t){const r=Xe(e),n={type_:r?1:0,scope_:t?t.scope_:Wr(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=n,s=He;r&&(o=[n],s=be);const{revoke:i,proxy:c}=Proxy.revocable(o,s);return n.draft_=c,n.revoke_=i,[c,n]}var He={get(e,t){if(t===D)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const o=V(e);if(!or(o,t,e.type_))return ko(e,o,t);const s=o[t];if(e.finalized_||!U(s)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&po(t))return s;if(s===dt(e.base_,t)){De(e);const i=e.type_===1?+t:t,c=Ct(e.scope_,s,e,i);return e.copy_[i]=c}return s},has(e,t){return t in V(e)},ownKeys(e){return Reflect.ownKeys(V(e))},set(e,t,r){const n=$r(V(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=dt(V(e),t),s=o?.[D];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(fo(r,o)&&(r!==void 0||or(e.base_,t,e.type_)))return!0;De(e),xt(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),vo(e,t,r)),!0},deleteProperty(e,t){return De(e),dt(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),xt(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=V(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Ne]:!0,[bt]:e.type_!==1||t!=="length",[$e]:n[$e],[ge]:r[t]}},defineProperty(){q(11)},getPrototypeOf(e){return ae(e.base_)},setPrototypeOf(){q(12)}},be={};for(let e in He){let t=He[e];be[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}be.deleteProperty=function(e,t){return be.set.call(this,e,t,void 0)};be.set=function(e,t,r){return He.set.call(this,e[0],t,r,e[0])};function dt(e,t){const r=e[D];return(r?V(r):e)[t]}function ko(e,t,r){const n=$r(t,r);return n?ge in n?n[ge]:n.get?.call(e.draft_):void 0}function $r(e,t){if(!(t in e))return;let r=ae(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ae(r)}}function xt(e){e.modified_||(e.modified_=!0,e.parent_&&xt(e.parent_))}function De(e){e.copy_||(e.assigned_=new Map,e.copy_=vt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var _o=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(ie(t)&&!ie(r)){const s=r;r=t;const i=this;return function(a=s,...l){return i.produce(a,u=>r.call(this,u,...l))}}ie(r)||q(6),n!==void 0&&!ie(n)&&q(7);let o;if(U(t)){const s=cr(this),i=Ct(s,t,void 0);let c=!0;try{o=r(i),c=!1}finally{c?kt(s):_t(s)}return ar(s,n),lr(o,s)}else if(!t||!It(t)){if(o=r(t),o===void 0&&(o=t),o===Dr&&(o=void 0),this.autoFreeze_&&zt(o,!0),n){const s=[],i=[];re(St).generateReplacementPatches_(t,o,{patches_:s,inversePatches_:i}),n(s,i)}return o}else q(1,t)},this.produceWithPatches=(t,r)=>{if(ie(t))return(i,...c)=>this.produceWithPatches(i,a=>t(a,...c));let n,o;return[this.produce(t,r,(i,c)=>{n=i,o=c}),n,o]},ut(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ut(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ut(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){U(e)||q(8),K(e)&&(e=xo(e));const t=cr(this),r=Ct(t,e,void 0);return r[D].isManual_=!0,_t(t),r}finishDraft(e,t){const r=e&&e[D];(!r||!r.isManual_)&&q(9);const{scope_:n}=r;return ar(n,t),lr(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=re(St).applyPatches_;return K(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Ct(e,t,r,n){const[o,s]=Je(t)?re(Be).proxyMap_(t,r):Qe(t)?re(Be).proxySet_(t,r):So(t,r);return(r?.scope_??Wr()).drafts_.push(o),s.callbacks_=r?.callbacks_??[],s.key_=n,r&&n!==void 0?wo(r,s,n):s.callbacks_.push(function(a){a.mapSetPlugin_?.fixSetContents(s);const{patchPlugin_:l}=a;s.modified_&&l&&l.generatePatches_(s,[],a)}),o}function xo(e){return K(e)||q(10,e),Gr(e)}function Gr(e){if(!U(e)||Ze(e))return e;const t=e[D];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=vt(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=vt(e,!0);return Ye(r,(o,s)=>{Ge(r,o,Gr(s))},n),t&&(t.finalized_=!1),r}var Co=new _o,Br=Co.produce;function Vr(e){return({dispatch:r,getState:n})=>o=>s=>typeof s=="function"?s(r,n,e):o(s)}var Eo=Vr(),Ro=Vr,Oo=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?qe:qe.apply(null,arguments)},Po=e=>e&&typeof e.match=="function";function he(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(H(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>lo(n)&&n.type===e,r}var Hr=class fe extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,fe.prototype)}static get[Symbol.species](){return fe}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new fe(...t[0].concat(this)):new fe(...t.concat(this))}};function dr(e){return U(e)?Br(e,()=>{}):e}function Ie(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Ao(e){return typeof e=="boolean"}var To=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new Hr;return r&&(Ao(r)?i.push(Eo):i.push(Ro(r.extraArgument))),i},Io="RTK_autoBatch",fr=e=>t=>{setTimeout(t,e)},Mo=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let o=!0,s=!1,i=!1;const c=new Set,a=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:fr(10):e.type==="callback"?e.queueNotification:fr(e.timeout),l=()=>{i=!1,s&&(s=!1,c.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const d=()=>o&&u(),f=n.subscribe(d);return c.add(u),()=>{f(),c.delete(u)}},dispatch(u){try{return o=!u?.meta?.[Io],s=!o,s&&(i||(i=!0,a(l))),n.dispatch(u)}finally{o=!0}}})},zo=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new Hr(e);return n&&o.push(Mo(typeof n=="object"?n:void 0)),o};function No(e){const t=To(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(Pt(r))c=Tt(r);else throw new Error(H(1));let a;typeof n=="function"?a=n(t):a=t();let l=qe;o&&(l=Oo({trace:!1,...typeof o=="object"&&o}));const u=co(...a),d=zo(u);let f=typeof i=="function"?i(d):d();const p=l(...f);return At(c,s,p)}function Kr(e){const t={},r=[];let n;const o={addCase(s,i){const c=typeof s=="string"?s:s.type;if(!c)throw new Error(H(28));if(c in t)throw new Error(H(29));return t[c]=i,o},addAsyncThunk(s,i){return i.pending&&(t[s.pending.type]=i.pending),i.rejected&&(t[s.rejected.type]=i.rejected),i.fulfilled&&(t[s.fulfilled.type]=i.fulfilled),i.settled&&r.push({matcher:s.settled,reducer:i.settled}),o},addMatcher(s,i){return r.push({matcher:s,reducer:i}),o},addDefaultCase(s){return n=s,o}};return e(o),[t,r,n]}function Do(e){return typeof e=="function"}function jo(e,t){let[r,n,o]=Kr(t),s;if(Do(e))s=()=>dr(e());else{const c=dr(e);s=()=>c}function i(c=s(),a){let l=[r[a.type],...n.filter(({matcher:u})=>u(a)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[o]),l.reduce((u,d)=>{if(d)if(K(u)){const p=d(u,a);return p===void 0?u:p}else{if(U(u))return Br(u,f=>d(f,a));{const f=d(u,a);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},c)}return i.getInitialState=s,i}var Fo=(e,t)=>Po(e)?e.match(t):e(t);function Wo(...e){return t=>e.some(r=>Fo(r,t))}var Lo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qo=(e=21)=>{let t="",r=e;for(;r--;)t+=Lo[Math.random()*64|0];return t},Uo=["name","message","stack","code"],ft=class{constructor(e,t){this.payload=e,this.meta=t}_type},pr=class{constructor(e,t){this.payload=e,this.meta=t}_type},$o=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of Uo)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},hr="External signal was aborted",Nt=(()=>{function e(t,r,n){const o=he(t+"/fulfilled",(a,l,u,d)=>({payload:a,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),s=he(t+"/pending",(a,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:a,requestStatus:"pending"}})),i=he(t+"/rejected",(a,l,u,d,f)=>({payload:d,error:(n&&n.serializeError||$o)(a||"Rejected"),meta:{...f||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:a?.name==="AbortError",condition:a?.name==="ConditionError"}}));function c(a,{signal:l}={}){return(u,d,f)=>{const p=n?.idGenerator?n.idGenerator(a):qo(),_=new AbortController;let m,b;function E(S){b=S,_.abort()}l&&(l.aborted?E(hr):l.addEventListener("abort",()=>E(hr),{once:!0}));const O=(async function(){let S;try{let v=n?.condition?.(a,{getState:d,extra:f});if(Bo(v)&&(v=await v),v===!1||_.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const x=new Promise((R,h)=>{m=()=>{h({name:"AbortError",message:b||"Aborted"})},_.signal.addEventListener("abort",m,{once:!0})});u(s(p,a,n?.getPendingMeta?.({requestId:p,arg:a},{getState:d,extra:f}))),S=await Promise.race([x,Promise.resolve(r(a,{dispatch:u,getState:d,extra:f,requestId:p,signal:_.signal,abort:E,rejectWithValue:(R,h)=>new ft(R,h),fulfillWithValue:(R,h)=>new pr(R,h)})).then(R=>{if(R instanceof ft)throw R;return R instanceof pr?o(R.payload,p,a,R.meta):o(R,p,a)})])}catch(v){S=v instanceof ft?i(null,p,a,v.payload,v.meta):i(v,p,a)}finally{m&&_.signal.removeEventListener("abort",m)}return n&&!n.dispatchConditionRejection&&i.match(S)&&S.meta.condition||u(S),S})();return Object.assign(O,{abort:E,requestId:p,arg:a,unwrap(){return O.then(Go)}})}}return Object.assign(c,{pending:s,rejected:i,fulfilled:o,settled:Wo(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Go(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Bo(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Vo=Symbol.for("rtk-slice-createasyncthunk");function Ho(e,t){return`${e}/${t}`}function Ko({creators:e}={}){const t=e?.asyncThunk?.[Vo];return function(n){const{name:o,reducerPath:s=o}=n;if(!o)throw new Error(H(11));const i=(typeof n.reducers=="function"?n.reducers(Xo()):n.reducers)||{},c=Object.keys(i),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(S,w){const v=typeof S=="string"?S:S.type;if(!v)throw new Error(H(12));if(v in a.sliceCaseReducersByType)throw new Error(H(13));return a.sliceCaseReducersByType[v]=w,l},addMatcher(S,w){return a.sliceMatchers.push({matcher:S,reducer:w}),l},exposeAction(S,w){return a.actionCreators[S]=w,l},exposeCaseReducer(S,w){return a.sliceCaseReducersByName[S]=w,l}};c.forEach(S=>{const w=i[S],v={reducerName:S,type:Ho(o,S),createNotation:typeof n.reducers=="function"};Qo(w)?es(v,w,l,t):Jo(v,w,l)});function u(){const[S={},w=[],v=void 0]=typeof n.extraReducers=="function"?Kr(n.extraReducers):[n.extraReducers],x={...S,...a.sliceCaseReducersByType};return jo(n.initialState,R=>{for(let h in x)R.addCase(h,x[h]);for(let h of a.sliceMatchers)R.addMatcher(h.matcher,h.reducer);for(let h of w)R.addMatcher(h.matcher,h.reducer);v&&R.addDefaultCase(v)})}const d=S=>S,f=new Map,p=new WeakMap;let _;function m(S,w){return _||(_=u()),_(S,w)}function b(){return _||(_=u()),_.getInitialState()}function E(S,w=!1){function v(R){let h=R[S];return typeof h>"u"&&w&&(h=Ie(p,v,b)),h}function x(R=d){const h=Ie(f,w,()=>new WeakMap);return Ie(h,R,()=>{const A={};for(const[ue,_e]of Object.entries(n.selectors??{}))A[ue]=Yo(_e,R,()=>Ie(p,R,b),w);return A})}return{reducerPath:S,getSelectors:x,get selectors(){return x(v)},selectSlice:v}}const O={name:o,reducer:m,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:b,...E(s),injectInto(S,{reducerPath:w,...v}={}){const x=w??s;return S.inject({reducerPath:x,reducer:m},v),{...O,...E(x,!0)}}};return O}}function Yo(e,t,r,n){function o(s,...i){let c=t(s);return typeof c>"u"&&n&&(c=r()),e(c,...i)}return o.unwrapped=e,o}var tt=Ko();function Xo(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Jo({type:e,reducerName:t,createNotation:r},n,o){let s,i;if("reducer"in n){if(r&&!Zo(n))throw new Error(H(17));s=n.reducer,i=n.prepare}else s=n;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?he(e,i):he(e))}function Qo(e){return e._reducerDefinitionType==="asyncThunk"}function Zo(e){return e._reducerDefinitionType==="reducerWithPrepare"}function es({type:e,reducerName:t},r,n,o){if(!o)throw new Error(H(18));const{payloadCreator:s,fulfilled:i,pending:c,rejected:a,settled:l,options:u}=r,d=o(e,s,u);n.exposeAction(t,d),i&&n.addCase(d.fulfilled,i),c&&n.addCase(d.pending,c),a&&n.addCase(d.rejected,a),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:i||Me,pending:c||Me,rejected:a||Me,settled:l||Me})}function Me(){}function H(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Dt="persist:",jt="persist/FLUSH",rt="persist/REHYDRATE",Ft="persist/PAUSE",Wt="persist/PERSIST",Lt="persist/PURGE",qt="persist/REGISTER",ts=-1;function je(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?je=function(r){return typeof r}:je=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},je(e)}function mr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mr(r,!0).forEach(function(n){ns(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mr(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ns(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function os(e,t,r,n){n.debug;var o=rs({},r);return e&&je(e)==="object"&&Object.keys(e).forEach(function(s){s!=="_persist"&&t[s]===r[s]&&(o[s]=e[s])}),o}function ss(e){var t=e.blacklist||null,r=e.whitelist||null,n=e.transforms||[],o=e.throttle||0,s="".concat(e.keyPrefix!==void 0?e.keyPrefix:Dt).concat(e.key),i=e.storage,c;e.serialize===!1?c=function(v){return v}:typeof e.serialize=="function"?c=e.serialize:c=is;var a=e.writeFailHandler||null,l={},u={},d=[],f=null,p=null,_=function(v){Object.keys(v).forEach(function(x){E(x)&&l[x]!==v[x]&&d.indexOf(x)===-1&&d.push(x)}),Object.keys(l).forEach(function(x){v[x]===void 0&&E(x)&&d.indexOf(x)===-1&&l[x]!==void 0&&d.push(x)}),f===null&&(f=setInterval(m,o)),l=v};function m(){if(d.length===0){f&&clearInterval(f),f=null;return}var w=d.shift(),v=n.reduce(function(x,R){return R.in(x,w,l)},l[w]);if(v!==void 0)try{u[w]=c(v)}catch(x){console.error("redux-persist/createPersistoid: error serializing state",x)}else delete u[w];d.length===0&&b()}function b(){Object.keys(u).forEach(function(w){l[w]===void 0&&delete u[w]}),p=i.setItem(s,c(u)).catch(O)}function E(w){return!(r&&r.indexOf(w)===-1&&w!=="_persist"||t&&t.indexOf(w)!==-1)}function O(w){a&&a(w)}var S=function(){for(;d.length!==0;)m();return p||Promise.resolve()};return{update:_,flush:S}}function is(e){return JSON.stringify(e)}function as(e){var t=e.transforms||[],r="".concat(e.keyPrefix!==void 0?e.keyPrefix:Dt).concat(e.key),n=e.storage;e.debug;var o;return e.deserialize===!1?o=function(i){return i}:typeof e.deserialize=="function"?o=e.deserialize:o=cs,n.getItem(r).then(function(s){if(s)try{var i={},c=o(s);return Object.keys(c).forEach(function(a){i[a]=t.reduceRight(function(l,u){return u.out(l,a,c)},o(c[a]))}),i}catch(a){throw a}else return})}function cs(e){return JSON.parse(e)}function ls(e){var t=e.storage,r="".concat(e.keyPrefix!==void 0?e.keyPrefix:Dt).concat(e.key);return t.removeItem(r,us)}function us(e){}function gr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gr(r,!0).forEach(function(n){ds(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gr(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ds(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fs(e,t){if(e==null)return{};var r=ps(e,t),n,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ps(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,s;for(s=0;s<n.length;s++)o=n[s],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var hs=5e3;function Yr(e,t){var r=e.version!==void 0?e.version:ts;e.debug;var n=e.stateReconciler===void 0?os:e.stateReconciler,o=e.getStoredState||as,s=e.timeout!==void 0?e.timeout:hs,i=null,c=!1,a=!0,l=function(d){return d._persist.rehydrated&&i&&!a&&i.update(d),d};return function(u,d){var f=u||{},p=f._persist,_=fs(f,["_persist"]),m=_;if(d.type===Wt){var b=!1,E=function(h,A){b||(d.rehydrate(e.key,h,A),b=!0)};if(s&&setTimeout(function(){!b&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},s),a=!1,i||(i=ss(e)),p)return B({},t(m,d),{_persist:p});if(typeof d.rehydrate!="function"||typeof d.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return d.register(e.key),o(e).then(function(R){var h=e.migrate||function(A,ue){return Promise.resolve(A)};h(R,r).then(function(A){E(A)},function(A){E(void 0,A)})},function(R){E(void 0,R)}),B({},t(m,d),{_persist:{version:r,rehydrated:!1}})}else{if(d.type===Lt)return c=!0,d.result(ls(e)),B({},t(m,d),{_persist:p});if(d.type===jt)return d.result(i&&i.flush()),B({},t(m,d),{_persist:p});if(d.type===Ft)a=!0;else if(d.type===rt){if(c)return B({},m,{_persist:B({},p,{rehydrated:!0})});if(d.key===e.key){var O=t(m,d),S=d.payload,w=n!==!1&&S!==void 0?n(S,u,O,e):O,v=B({},w,{_persist:B({},p,{rehydrated:!0})});return l(v)}}}if(!p)return t(u,d);var x=t(m,d);return x===m?u:l(B({},x,{_persist:p}))}}function yr(e){return ys(e)||gs(e)||ms()}function ms(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function gs(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function ys(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?br(r,!0).forEach(function(n){bs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):br(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Xr={registry:[],bootstrapped:!1},ws=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case qt:return Et({},t,{registry:[].concat(yr(t.registry),[r.key])});case rt:var n=t.registry.indexOf(r.key),o=yr(t.registry);return o.splice(n,1),Et({},t,{registry:o,bootstrapped:o.length===0});default:return t}};function vs(e,t,r){var n=At(ws,Xr,void 0),o=function(a){n.dispatch({type:qt,key:a})},s=function(a,l,u){var d={type:rt,payload:l,err:u,key:a};e.dispatch(d),n.dispatch(d)},i=Et({},n,{purge:function(){var a=[];return e.dispatch({type:Lt,result:function(u){a.push(u)}}),Promise.all(a)},flush:function(){var a=[];return e.dispatch({type:jt,result:function(u){a.push(u)}}),Promise.all(a)},pause:function(){e.dispatch({type:Ft})},persist:function(){e.dispatch({type:Wt,register:o,rehydrate:s})}});return i.persist(),i}function Jr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.whitelist||null,o=r.blacklist||null;function s(i){return!!(n&&n.indexOf(i)===-1||o&&o.indexOf(i)!==-1)}return{in:function(c,a,l){return!s(a)&&e?e(c,a,l):c},out:function(c,a,l){return!s(a)&&t?t(c,a,l):c}}}function Fe(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fe=function(r){return typeof r}:Fe=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fe(e)}function pt(){}var Ss={getItem:pt,setItem:pt,removeItem:pt};function ks(e){if((typeof self>"u"?"undefined":Fe(self))!=="object"||!(e in self))return!1;try{var t=self[e],r="redux-persist ".concat(e," test");t.setItem(r,"test"),t.getItem(r),t.removeItem(r)}catch{return!1}return!0}function _s(e){var t="".concat(e,"Storage");return ks(t)?self[t]:Ss}function xs(e){var t=_s(e);return{getItem:function(n){return new Promise(function(o,s){o(t.getItem(n))})},setItem:function(n,o){return new Promise(function(s,i){s(t.setItem(n,o))})},removeItem:function(n){return new Promise(function(o,s){o(t.removeItem(n))})}}}const Cs=xs("local"),Es={sidebarOpen:!0,activeMenu:"home"},Qr=tt({name:"ui",initialState:Es,reducers:{toggleSidebar:e=>{e.sidebarOpen=!e.sidebarOpen},setSidebarOpen:(e,t)=>{e.sidebarOpen=t.payload},setActiveMenu:(e,t)=>{e.activeMenu=t.payload}}}),{toggleSidebar:bi,setSidebarOpen:wi,setActiveMenu:vi}=Qr.actions,Rs=Qr.reducer,Os={routes:[]},Ps=(e,t)=>{const r=t.split("/").filter(Boolean);for(let n=r.length-1;n>0;n--){const o="/"+r.slice(0,n).join("/"),s=e.find(i=>i.path===o);if(s)return s}return e.find(n=>n.path==="/")||null},As=(e,t)=>e==="/"?t:t.replace(e+"/",""),Zr=tt({name:"route",initialState:Os,reducers:{addRoute:(e,t)=>{const r=t.payload,n=Ps(e.routes,r.path);if(n){n.children||(n.children=[]);const o=As(n.path,r.path);n.children.push({...r,path:o})}else e.routes.push(r);e.routes.sort((o,s)=>(o.meta?.order||999)-(s.meta?.order||999))},removeRoute:(e,t)=>{const r=t.payload,n=o=>{const s=o.findIndex(i=>i.path===r);if(s>=0)return o.splice(s,1),!0;for(const i of o)if(i.children&&n(i.children))return!0;return!1};n(e.routes)},updateRoute:(e,t)=>{const{path:r,updates:n}=t.payload,o=s=>{const i=s.findIndex(c=>c.path===r);if(i>=0)return s[i]={...s[i],...n},!0;for(const c of s)if(c.children&&o(c.children))return!0;return!1};o(e.routes)},setRoutes:(e,t)=>{e.routes=t.payload,e.routes.sort((r,n)=>(r.meta?.order||999)-(n.meta?.order||999))},clearRoutes:e=>{e.routes=[]}}}),{addRoute:Ts,removeRoute:Is,updateRoute:Ms,setRoutes:Si,clearRoutes:zs}=Zr.actions,Ns=Zr.reducer,Ds={entries:[],loadedScripts:[],synced:!1},Ut=Nt("script/loadScript",async e=>new Promise((t,r)=>{const n=document.createElement("script");n.type="module",n.src=e,n.dataset.dynamicEntry="true",n.onload=()=>t(e),n.onerror=o=>{console.error("[Script] Load failed:",e),r(o)},document.body.appendChild(n)})),en=Nt("script/loadScripts",async(e,{dispatch:t})=>(await Promise.allSettled(e.map(n=>t(Ut(n)).unwrap()))).filter(n=>n.status==="fulfilled").map(n=>n.value)),tn=Nt("script/unloadScript",async e=>(document.querySelectorAll(`script[src="${e}"][data-dynamic-entry="true"]`).forEach(r=>r.remove()),e)),rn=tt({name:"script",initialState:Ds,reducers:{syncEntries:(e,t)=>{e.entries=t.payload,e.synced=!0},addEntry:(e,t)=>{e.entries.includes(t.payload)||e.entries.push(t.payload)},removeEntry:(e,t)=>{e.entries=e.entries.filter(r=>r!==t.payload),e.loadedScripts=e.loadedScripts.filter(r=>r!==t.payload)}},extraReducers:e=>{e.addCase(Ut.fulfilled,(t,r)=>{t.loadedScripts.includes(r.payload)||t.loadedScripts.push(r.payload)}),e.addCase(en.fulfilled,(t,r)=>{r.payload.forEach(n=>{t.loadedScripts.includes(n)||t.loadedScripts.push(n)})}),e.addCase(tn.fulfilled,(t,r)=>{t.loadedScripts=t.loadedScripts.filter(n=>n!==r.payload)})}}),{syncEntries:js,addEntry:Fs,removeEntry:Ws}=rn.actions,Ls=rn.reducer,qs={configs:{},schemas:{},loading:{},errors:{},connected:!1},nn=tt({name:"config",initialState:qs,reducers:{setConnected:(e,t)=>{e.connected=t.payload},setLoading:(e,t)=>{const{pluginName:r,loading:n}=t.payload;e.loading[r]=n},setError:(e,t)=>{const{pluginName:r,error:n}=t.payload;e.errors[r]=n},updateConfig:(e,t)=>{const{pluginName:r,config:n}=t.payload;e.configs[r]=n,e.loading[r]=!1,e.errors[r]=null},updateSchema:(e,t)=>{const{pluginName:r,schema:n}=t.payload;e.schemas[r]=n},updateConfigs:(e,t)=>{e.configs={...e.configs,...t.payload}},updateSchemas:(e,t)=>{e.schemas={...e.schemas,...t.payload}},removeConfig:(e,t)=>{const r=t.payload;delete e.configs[r],delete e.schemas[r],delete e.loading[r],delete e.errors[r]},clearConfigs:e=>{e.configs={},e.schemas={},e.loading={},e.errors={}}}}),{setConnected:ht,setLoading:ze,setError:pe,updateConfig:on,updateSchema:sn,updateConfigs:an,updateSchemas:cn,removeConfig:ki,clearConfigs:_i}=nn.actions,Us=nn.reducer,$s=(e,t)=>e.config.configs[t],Gs=(e,t)=>e.config.schemas[t],Bs=(e,t)=>e.config.loading[t]||!1,Vs=(e,t)=>e.config.errors[t]||null,Se=e=>e.config.connected,Hs=e=>e.config.configs,Ks=e=>e.config.schemas,Rt={ui:Rs,route:Ns,script:Ls,config:Us};var mt={exports:{}},gt={};var wr;function Ys(){if(wr)return gt;wr=1;var e=fn;function t(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,i=e.useMemo,c=e.useDebugValue;return gt.useSyncExternalStoreWithSelector=function(a,l,u,d,f){var p=o(null);if(p.current===null){var _={hasValue:!1,value:null};p.current=_}else _=p.current;p=i(function(){function b(v){if(!E){if(E=!0,O=v,v=d(v),f!==void 0&&_.hasValue){var x=_.value;if(f(x,v))return S=x}return S=v}if(x=S,r(O,v))return x;var R=d(v);return f!==void 0&&f(x,R)?(O=v,x):(O=v,S=R)}var E=!1,O,S,w=u===void 0?null:u;return[function(){return b(l())},w===null?void 0:function(){return b(w())}]},[l,u,d,f]);var m=n(a,p[0],p[1]);return s(function(){_.hasValue=!0,_.value=m},[m]),c(m),m},gt}var vr;function Xs(){return vr||(vr=1,mt.exports=Ys()),mt.exports}var Js=Xs(),Qs=Symbol.for("react-redux-context"),Zs=typeof globalThis<"u"?globalThis:{};function ei(){if(!X.createContext)return{};const e=Zs[Qs]??=new Map;let t=e.get(X.createContext);return t||(t=X.createContext(null),e.set(X.createContext,t)),t}var ne=ei();function $t(e=ne){return function(){return X.useContext(e)}}var ln=$t();function un(e=ne){const t=e===ne?ln:$t(e),r=()=>{const{store:n}=t();return n};return Object.assign(r,{withTypes:()=>r}),r}var ti=un();function ri(e=ne){const t=e===ne?ti:un(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var ni=ri(),oi=(e,t)=>e===t;function si(e=ne){const t=e===ne?ln:$t(e),r=(n,o={})=>{const{equalityFn:s=oi}=typeof o=="function"?{equalityFn:o}:o,i=t(),{store:c,subscription:a,getServerState:l}=i;X.useRef(!0);const u=X.useCallback({[n.name](f){return n(f)}}[n.name],[n]),d=Js.useSyncExternalStoreWithSelector(a.addNestedSub,c.getState,l||c.getState,u,s);return X.useDebugValue(d),d};return Object.assign(r,{withTypes:()=>r}),r}var ii=si();const ai=Jr(e=>{const{routes:t,...r}=e;return r},e=>({...e,routes:[]}),{whitelist:["route"]}),ci=Jr(e=>{const{entries:t,loadedScripts:r,synced:n,...o}=e;return o},e=>({...e,entries:[],loadedScripts:[],synced:!1}),{whitelist:["script"]}),dn={key:"root",storage:Cs,transforms:[ai,ci]},li=Yr(dn,Tt(Rt)),P=No({reducer:li,middleware:e=>e({serializableCheck:{ignoredActions:[jt,rt,Ft,Wt,Lt,qt,"route/addRoute","route/updateRoute","route/setRoutes"],ignoredPaths:["route.routes"]}})}),xi=vs(P);typeof window<"u"&&(window.__REDUX_STORE__=P);function Ci(e,t){Rt[e]=t;const r=Yr(dn,Tt(Rt));P.replaceReducer(r)}const ui=ni,j=ii,Ei=e=>P.dispatch(Ts(e)),Ri=e=>P.dispatch(Is(e)),Oi=(e,t)=>P.dispatch(Ms({path:e,updates:t})),Pi=e=>P.getState().route.routes.find(t=>t.path===e),Ai=()=>P.getState().route.routes,Ti=()=>P.dispatch(zs());function Ii(){const e=j(r=>r.route.routes),t=we(()=>{const r=s=>{const i={path:s.path,element:s.element,Component:s.Component};return s.children&&s.children.length>0&&(i.children=s.children.map(c=>r(c))),i},n=e.map(r);return pn([{path:"/",element:it(mn,{}),children:n},{path:"*",element:it("div",{children:"404 - Page Not Found"})}])},[e]);return it(hn,{router:t})}var L=(e=>(e.DISCONNECTED="disconnected",e.CONNECTING="connecting",e.CONNECTED="connected",e.RECONNECTING="reconnecting",e.ERROR="error",e))(L||{});class ee extends Error{constructor(t,r,n){super(t),this.code=r,this.originalError=n,this.name="WebSocketError"}}class di extends ee{constructor(t){super(`Request ${t} timed out`,"REQUEST_TIMEOUT")}}class Sr extends ee{constructor(t,r){super(t,"CONNECTION_ERROR",r)}}class kr extends ee{constructor(t,r){super(t,"MESSAGE_ERROR",r)}}class fi{static handle(t){try{switch(t.type){case"sync":this.handleScriptSync(t);break;case"add":this.handleScriptAdd(t);break;case"delete":this.handleScriptDelete(t);break;case"config:updated":this.handleConfigUpdated(t);break;case"config:batch":this.handleConfigBatch(t);break;case"config:error":this.handleConfigError(t);break;case"schema:updated":this.handleSchemaUpdated(t);break;case"schema:batch":this.handleSchemaBatch(t);break;case"hmr:reload":this.handleHmrReload(t);break;case"init-data":case"data-update":this.handleSystemMessage(t);break;default:console.warn("[WebSocket] Unknown message type:",t.type)}}catch(r){console.error("[WebSocket] Message handling error:",r)}}static handleScriptSync(t){if(t.data?.key==="entries"){const r=Array.isArray(t.data.value)?t.data.value:[t.data.value];P.dispatch(js(r)),P.dispatch(en(r))}}static handleScriptAdd(t){t.data?.key==="entries"&&(P.dispatch(Fs(t.data.value)),P.dispatch(Ut(t.data.value)))}static handleScriptDelete(t){t.data?.key==="entries"&&(P.dispatch(Ws(t.data.value)),P.dispatch(tn(t.data.value)))}static handleConfigUpdated(t){t.pluginName&&t.data!==void 0&&P.dispatch(on({pluginName:t.pluginName,config:t.data}))}static handleConfigBatch(t){t.data&&P.dispatch(an(t.data))}static handleConfigError(t){t.pluginName&&t.error&&P.dispatch(pe({pluginName:t.pluginName,error:t.error}))}static handleSchemaUpdated(t){t.pluginName&&t.data!==void 0&&P.dispatch(sn({pluginName:t.pluginName,schema:t.data}))}static handleSchemaBatch(t){t.data&&P.dispatch(cn(t.data))}static handleHmrReload(t){const r=t.data?.file||"";console.info(`[HMR] 文件变更: ${r},正在刷新页面...`),window.location.reload()}static handleSystemMessage(t){}}class pi{ws=null;config;callbacks;state=L.DISCONNECTED;reconnectAttempts=0;reconnectTimer=null;requestId=0;pendingRequests=new Map;constructor(t={},r={}){this.config={url:this.buildWebSocketUrl(t.url),reconnectInterval:t.reconnectInterval??3e3,maxReconnectAttempts:t.maxReconnectAttempts??10,requestTimeout:t.requestTimeout??1e4},this.callbacks=r}connect(){if(!(this.state===L.CONNECTED||this.state===L.CONNECTING)){this.setState(L.CONNECTING);try{this.ws=new WebSocket(this.config.url),this.attachEventHandlers()}catch(t){this.handleConnectionError(new Sr("Failed to create WebSocket",t))}}}disconnect(){this.clearReconnectTimer(),this.clearPendingRequests(),this.ws&&(this.ws.close(),this.ws=null),this.setState(L.DISCONNECTED),P.dispatch(ht(!1))}send(t){if(!this.isConnected())throw new ee("WebSocket is not connected","NOT_CONNECTED");try{this.ws.send(JSON.stringify(t))}catch(r){throw new kr("Failed to send message",r)}}async sendRequest(t){if(!this.isConnected())throw new ee("WebSocket is not connected","NOT_CONNECTED");return new Promise((r,n)=>{const o=++this.requestId,s={...t,requestId:o},i=setTimeout(()=>{this.pendingRequests.delete(o),n(new di(o))},this.config.requestTimeout);this.pendingRequests.set(o,{resolve:r,reject:n,timer:i});try{this.ws.send(JSON.stringify(s))}catch(c){this.pendingRequests.delete(o),clearTimeout(i),n(new kr("Failed to send request",c))}})}isConnected(){return this.ws?.readyState===WebSocket.OPEN}getState(){return this.state}async getConfig(t){return this.sendRequest({type:"config:get",pluginName:t})}async setConfig(t,r){return this.sendRequest({type:"config:set",pluginName:t,data:r})}async getSchema(t){return this.sendRequest({type:"schema:get",pluginName:t})}async getAllConfigs(){return this.sendRequest({type:"config:get-all"})}async getAllSchemas(){return this.sendRequest({type:"schema:get-all"})}async getConfigYaml(){return this.sendRequest({type:"config:get-yaml"})}async saveConfigYaml(t){return this.sendRequest({type:"config:save-yaml",yaml:t})}async getEnvList(){return this.sendRequest({type:"env:list"})}async getEnvFile(t){return this.sendRequest({type:"env:get",filename:t})}async saveEnvFile(t,r){return this.sendRequest({type:"env:save",filename:t,content:r})}buildWebSocketUrl(t){if(t)return t;const r=window.location.protocol==="https:"?"wss:":"ws:",n=window.location.host;return`${r}//${n}/server`}setState(t){const r=this.state;this.state=t,console.debug(`[WebSocket] State changed: ${r} -> ${t}`)}attachEventHandlers(){this.ws&&(this.ws.onopen=()=>{this.handleConnectionOpen()},this.ws.onmessage=t=>{this.handleMessage(t)},this.ws.onclose=t=>{this.handleConnectionClose(t)},this.ws.onerror=t=>{this.handleConnectionError(new Sr("WebSocket error",t))})}handleConnectionOpen(){this.setState(L.CONNECTED),this.reconnectAttempts=0,P.dispatch(ht(!0)),this.initializeData(),this.callbacks.onConnect?.()}handleMessage(t){try{const r=JSON.parse(t.data);if(r.requestId&&this.pendingRequests.has(r.requestId)){this.handleRequestResponse(r);return}fi.handle(r),this.callbacks.onMessage?.(r)}catch(r){console.error("[WebSocket] Message parsing error:",r)}}handleRequestResponse(t){const{requestId:r}=t,n=this.pendingRequests.get(r);n&&(this.pendingRequests.delete(r),clearTimeout(n.timer),t.error?n.reject(new ee(t.error,"SERVER_ERROR")):n.resolve(t.data))}handleConnectionClose(t){this.ws=null,P.dispatch(ht(!1)),this.state!==L.DISCONNECTED&&(this.setState(L.RECONNECTING),this.callbacks.onDisconnect?.(),this.scheduleReconnect())}handleConnectionError(t){this.clearReconnectTimer(),this.setState(L.ERROR),console.error("[WebSocket] Connection error:",t),this.callbacks.onError?.(t)}scheduleReconnect(){if(this.reconnectAttempts>=this.config.maxReconnectAttempts){console.error("[WebSocket] Max reconnect attempts reached"),this.setState(L.ERROR);return}this.reconnectAttempts++;const t=this.config.reconnectInterval*this.reconnectAttempts;console.debug(`[WebSocket] Reconnecting in ${t}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`),this.reconnectTimer=setTimeout(()=>{this.state===L.RECONNECTING&&this.connect()},t)}clearReconnectTimer(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}clearPendingRequests(){for(const[t,{reject:r,timer:n}]of this.pendingRequests)clearTimeout(n),r(new ee("Connection closed","CONNECTION_CLOSED"));this.pendingRequests.clear()}async initializeData(){try{const[t,r]=await Promise.all([this.getAllConfigs().catch(n=>(console.warn("[WebSocket] Failed to load configs:",n),{})),this.getAllSchemas().catch(n=>(console.warn("[WebSocket] Failed to load schemas:",n),{}))]);P.dispatch(an(t)),P.dispatch(cn(r))}catch(t){console.error("[WebSocket] Data initialization failed:",t)}}}let te=null;function ke(){return te||(te=new pi,typeof window<"u"&&te.connect()),te}function hi(){te&&(te.disconnect(),te=null)}function Mi(){hi()}function zi(e={}){const{autoConnect:t=!0}=e,r=ke(),n=j(Se),o=j(f=>f.script?.entries||[]),s=j(f=>f.script?.loadedScripts||[]),i=z(()=>{r.connect()},[r]),c=z(()=>{r.disconnect()},[r]),a=z(f=>{r.send(f)},[r]),l=z(async f=>r.sendRequest(f),[r]),u=z(()=>r.isConnected(),[r]),d=z(()=>r.isConnected()?"connected":"disconnected",[r]);return me(()=>{t&&!n&&i()},[t,n,i]),{connected:n,entries:o,loadedScripts:s,connect:i,disconnect:c,send:a,sendRequest:l,isConnected:u,getState:d,manager:r}}function Ni(e,t={}){const{autoLoad:r=!0,autoLoadSchema:n=!0}=t,o=ui(),s=ke(),i=j(m=>$s(m,e)),c=j(m=>Gs(m,e)),a=j(m=>Bs(m,e)),l=j(m=>Vs(m,e)),u=j(Se),d=z(async()=>{o(ze({pluginName:e,loading:!0})),o(pe({pluginName:e,error:null}));try{const m=await s.getConfig(e);return o(on({pluginName:e,config:m})),m}catch(m){console.error("[useConfig] getConfig failed:",m);const b=m instanceof Error?m.message:"Unknown error";throw o(pe({pluginName:e,error:b})),m}finally{o(ze({pluginName:e,loading:!1}))}},[e,s,o]),f=z(async m=>{o(ze({pluginName:e,loading:!0})),o(pe({pluginName:e,error:null}));try{const b=await s.setConfig(e,m);return{reloaded:b?.reloaded,message:b?.message}}catch(b){console.error("[useConfig] setConfig failed:",b);const E=b instanceof Error?b.message:"Unknown error";throw o(pe({pluginName:e,error:E})),b}finally{o(ze({pluginName:e,loading:!1}))}},[e,s,o]),p=z(async()=>{try{const m=await s.getSchema(e);return m&&o(sn({pluginName:e,schema:m})),m}catch(m){throw console.error(`Failed to get schema for plugin ${e}:`,m),m}},[e,s,o]),_=z(async()=>{const m=[];r&&m.push(d()),n&&m.push(p()),await Promise.all(m)},[r,n,d,p]);return me(()=>{u&&r&&!i&&!a&&d().catch(console.error)},[u,r,i,a,d]),me(()=>{u&&n&&!c&&p().catch(console.error)},[u,n,c,p]),we(()=>({config:i,schema:c,loading:a,error:l,connected:u,getConfig:d,setConfig:f,getSchema:p,reload:_}),[i,c,a,l,u,d,f,p,_])}function Di(){const e=ke(),t=j(Hs),r=j(Ks),n=j(Se),o=z(async()=>{try{const[s,i]=await Promise.all([e.getAllConfigs(),e.getAllSchemas()]);return{configs:s,schemas:i}}catch(s){throw console.error("Failed to refresh all configs:",s),s}},[e]);return we(()=>({configs:t,schemas:r,connected:n,refreshAll:o}),[t,r,n,o])}function ji(){const e=ke(),t=j(Se),[r,n]=Z(""),[o,s]=Z([]),[i,c]=Z(!1),[a,l]=Z(null),u=z(async()=>{c(!0),l(null);try{const f=await e.getConfigYaml();return n(f.yaml),s(f.pluginKeys),f}catch(f){const p=f instanceof Error?f.message:"Unknown error";throw l(p),f}finally{c(!1)}},[e]),d=z(async f=>{c(!0),l(null);try{const p=await e.saveConfigYaml(f);return n(f),p}catch(p){const _=p instanceof Error?p.message:"Unknown error";throw l(_),p}finally{c(!1)}},[e]);return me(()=>{t&&!r&&!i&&u().catch(()=>{})},[t,r,i,u]),we(()=>({yaml:r,pluginKeys:o,loading:i,error:a,load:u,save:d}),[r,o,i,a,u,d])}function Fi(){const e=ke(),t=j(Se),[r,n]=Z([]),[o,s]=Z(!1),[i,c]=Z(null),a=z(async()=>{s(!0),c(null);try{const d=await e.getEnvList();return n(d.files),d.files}catch(d){const f=d instanceof Error?d.message:"Unknown error";throw c(f),d}finally{s(!1)}},[e]),l=z(async d=>{try{return(await e.getEnvFile(d)).content}catch(f){const p=f instanceof Error?f.message:"Unknown error";throw c(p),f}},[e]),u=z(async(d,f)=>{s(!0),c(null);try{return await e.saveEnvFile(d,f)}catch(p){const _=p instanceof Error?p.message:"Unknown error";throw c(_),p}finally{s(!1)}},[e]);return me(()=>{t&&r.length===0&&!o&&a().catch(()=>{})},[t,r.length,o,a]),we(()=>({files:r,loading:o,error:i,listFiles:a,getFile:l,saveFile:u}),[r,o,i,a,l,u])}function Wi(...e){return oo(gn(e))}export{Sr as ConnectionError,L as ConnectionState,Ii as DynamicRouter,Ui as Link,kr as MessageError,fi as MessageHandler,$i as Outlet,di as RequestTimeoutError,ee as WebSocketError,pi as WebSocketManager,Fs as addEntry,Ei as addPage,Ci as addReducer,Ts as addRoute,_i as clearConfigs,Ti as clearPages,zs as clearRoutes,Wi as cn,hi as destroyWebSocketManager,Ai as getAllPages,Pi as getPage,ke as getWebSocketManager,Ut as loadScript,en as loadScripts,xi as persistor,ki as removeConfig,Ws as removeEntry,Ri as removePage,Is as removeRoute,Mi as resetWebSocketManager,Hs as selectAllConfigs,Ks as selectAllSchemas,$s as selectConfig,Se as selectConfigConnected,Vs as selectConfigError,Bs as selectConfigLoading,Gs as selectSchema,vi as setActiveMenu,ht as setConnected,pe as setError,ze as setLoading,Si as setRoutes,wi as setSidebarOpen,P as store,js as syncEntries,bi as toggleSidebar,tn as unloadScript,on as updateConfig,an as updateConfigs,Oi as updatePage,Ms as updateRoute,sn as updateSchema,cn as updateSchemas,Di as useAllConfigs,Ni as useConfig,ji as useConfigYaml,ui as useDispatch,Fi as useEnvFiles,Gi as useNavigate,Bi as useOutlet,Vi as useParams,j as useSelector,zi as useWebSocket};
1
+ import*as Q from"./react.js";import fn,{useMemo as ie,useCallback as T,useEffect as ne,useState as F}from"./react.js";import{jsx as it}from"./react-jsx-runtime.js";import{createBrowserRouter as pn,RouterProvider as hn,Outlet as mn}from"./react-router.js";import{Link as $i,Outlet as Bi,useNavigate as Vi,useOutlet as Hi,useParams as Ki}from"./react-router.js";function _r(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=_r(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function gn(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=_r(e))&&(n&&(n+=" "),n+=t);return n}const yn=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},bn=(e,t)=>({classGroupId:e,validator:t}),xr=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Ue="-",Xt=[],wn="arbitrary..",vn=e=>{const t=kn(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Sn(i);const c=i.split(Ue),a=c[0]===""&&c.length>1?1:0;return Er(c,a,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const a=n[i],l=r[i];return a?l?yn(l,a):a:l||Xt}return r[i]||Xt}}},Er=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const l=Er(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const c=t===0?e.join(Ue):e.slice(t).join(Ue),a=i.length;for(let l=0;l<a;l++){const d=i[l];if(d.validator(c))return d.classGroupId}},Sn=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?wn+n:void 0})(),kn=e=>{const{theme:t,classGroups:r}=e;return _n(r,t)},_n=(e,t)=>{const r=xr();for(const n in e){const o=e[n];Ot(o,r,n,t)}return r},Ot=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];xn(i,t,r,n)}},xn=(e,t,r,n)=>{if(typeof e=="string"){En(e,t,r);return}if(typeof e=="function"){Cn(e,t,r,n);return}Rn(e,t,r,n)},En=(e,t,r)=>{const n=e===""?t:Cr(t,e);n.classGroupId=r},Cn=(e,t,r,n)=>{if(On(e)){Ot(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(bn(r,e))},Rn=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[c,a]=o[i];Ot(a,Cr(t,c),r,n)}},Cr=(e,t)=>{let r=e;const n=t.split(Ue),o=n.length;for(let s=0;s<o;s++){const i=n[s];let c=r.nextPart.get(i);c||(c=xr(),r.nextPart.set(i,c)),r=c}return r},On=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Pn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,i)=>{r[s]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let i=r[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return o(s,i),i},set(s,i){s in r?r[s]=i:o(s,i)}}},yt="!",Jt=":",Tn=[],Qt=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),An=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,c=0,a=0,l;const d=o.length;for(let y=0;y<d;y++){const S=o[y];if(i===0&&c===0){if(S===Jt){s.push(o.slice(a,y)),a=y+1;continue}if(S==="/"){l=y;continue}}S==="["?i++:S==="]"?i--:S==="("?c++:S===")"&&c--}const u=s.length===0?o:o.slice(a);let f=u,m=!1;u.endsWith(yt)?(f=u.slice(0,-1),m=!0):u.startsWith(yt)&&(f=u.slice(1),m=!0);const x=l&&l>a?l-a:void 0;return Qt(s,m,f,x)};if(t){const o=t+Jt,s=n;n=i=>i.startsWith(o)?s(i.slice(o.length)):Qt(Tn,!1,i,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},In=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const i=r[s],c=i[0]==="[",a=t.has(i);c||a?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},Mn=e=>({cache:Pn(e.cacheSize),parseClassName:An(e),sortModifiers:In(e),...vn(e)}),zn=/\s+/,Dn=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],c=e.trim().split(zn);let a="";for(let l=c.length-1;l>=0;l-=1){const d=c[l],{isExternal:u,modifiers:f,hasImportantModifier:m,baseClassName:x,maybePostfixModifierPosition:y}=r(d);if(u){a=d+(a.length>0?" "+a:a);continue}let S=!!y,C=n(S?x.substring(0,y):x);if(!C){if(!S){a=d+(a.length>0?" "+a:a);continue}if(C=n(x),!C){a=d+(a.length>0?" "+a:a);continue}S=!1}const O=f.length===0?"":f.length===1?f[0]:s(f).join(":"),_=m?O+yt:O,k=_+C;if(i.indexOf(k)>-1)continue;i.push(k);const p=o(C,S);for(let g=0;g<p.length;++g){const b=p[g];i.push(_+b)}a=d+(a.length>0?" "+a:a)}return a},Nn=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Rr(r))&&(o&&(o+=" "),o+=n);return o},Rr=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Rr(e[n]))&&(r&&(r+=" "),r+=t);return r},jn=(e,...t)=>{let r,n,o,s;const i=a=>{const l=t.reduce((d,u)=>u(d),e());return r=Mn(l),n=r.cache.get,o=r.cache.set,s=c,c(a)},c=a=>{const l=n(a);if(l)return l;const d=Dn(a,r);return o(a,d),d};return s=i,(...a)=>s(Nn(...a))},Fn=[],I=e=>{const t=r=>r[e]||Fn;return t.isThemeGetter=!0,t},Or=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Un=/^\d+\/\d+$/,Wn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ln=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Gn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$n=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ue=e=>Un.test(e),R=e=>!!e&&!Number.isNaN(Number(e)),J=e=>!!e&&Number.isInteger(Number(e)),at=e=>e.endsWith("%")&&R(e.slice(0,-1)),V=e=>Wn.test(e),Bn=()=>!0,Vn=e=>qn.test(e)&&!Ln.test(e),Tr=()=>!1,Hn=e=>Gn.test(e),Kn=e=>$n.test(e),Yn=e=>!w(e)&&!v(e),Xn=e=>pe(e,Mr,Tr),w=e=>Or.test(e),ee=e=>pe(e,zr,Vn),ct=e=>pe(e,to,R),Zt=e=>pe(e,Ar,Tr),Jn=e=>pe(e,Ir,Kn),Pe=e=>pe(e,Dr,Hn),v=e=>Pr.test(e),me=e=>he(e,zr),Qn=e=>he(e,ro),er=e=>he(e,Ar),Zn=e=>he(e,Mr),eo=e=>he(e,Ir),Te=e=>he(e,Dr,!0),pe=(e,t,r)=>{const n=Or.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},he=(e,t,r=!1)=>{const n=Pr.exec(e);return n?n[1]?t(n[1]):r:!1},Ar=e=>e==="position"||e==="percentage",Ir=e=>e==="image"||e==="url",Mr=e=>e==="length"||e==="size"||e==="bg-size",zr=e=>e==="length",to=e=>e==="number",ro=e=>e==="family-name",Dr=e=>e==="shadow",no=()=>{const e=I("color"),t=I("font"),r=I("text"),n=I("font-weight"),o=I("tracking"),s=I("leading"),i=I("breakpoint"),c=I("container"),a=I("spacing"),l=I("radius"),d=I("shadow"),u=I("inset-shadow"),f=I("text-shadow"),m=I("drop-shadow"),x=I("blur"),y=I("perspective"),S=I("aspect"),C=I("ease"),O=I("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],p=()=>[...k(),v,w],g=()=>["auto","hidden","clip","visible","scroll"],b=()=>["auto","contain","none"],h=()=>[v,w,a],P=()=>[ue,"full","auto",...h()],$=()=>[J,"none","subgrid",v,w],_e=()=>["auto",{span:["full",J,v,w]},J,v,w],xe=()=>[J,"auto",v,w],$t=()=>["auto","min","max","fr",v,w],nt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...h()],Z=()=>[ue,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...h()],E=()=>[e,v,w],Bt=()=>[...k(),er,Zt,{position:[v,w]}],Vt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ht=()=>["auto","cover","contain",Zn,Xn,{size:[v,w]}],ot=()=>[at,me,ee],N=()=>["","none","full",l,v,w],U=()=>["",R,me,ee],Ee=()=>["solid","dashed","dotted","double"],Kt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>[R,at,er,Zt],Yt=()=>["","none",x,v,w],Ce=()=>["none",R,v,w],Re=()=>["none",R,v,w],st=()=>[R,v,w],Oe=()=>[ue,"full",...h()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[V],breakpoint:[V],color:[Bn],container:[V],"drop-shadow":[V],ease:["in","out","in-out"],font:[Yn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[V],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[V],shadow:[V],spacing:["px",R],text:[V],"text-shadow":[V],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ue,w,v,S]}],container:["container"],columns:[{columns:[R,w,v,c]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:p()}],overflow:[{overflow:g()}],"overflow-x":[{"overflow-x":g()}],"overflow-y":[{"overflow-y":g()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[J,"auto",v,w]}],basis:[{basis:[ue,"full","auto",c,...h()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[R,ue,"auto","initial","none",w]}],grow:[{grow:["",R,v,w]}],shrink:[{shrink:["",R,v,w]}],order:[{order:[J,"first","last","none",v,w]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:_e()}],"col-start":[{"col-start":xe()}],"col-end":[{"col-end":xe()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:_e()}],"row-start":[{"row-start":xe()}],"row-end":[{"row-end":xe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$t()}],"auto-rows":[{"auto-rows":$t()}],gap:[{gap:h()}],"gap-x":[{"gap-x":h()}],"gap-y":[{"gap-y":h()}],"justify-content":[{justify:[...nt(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...nt()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":nt()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:h()}],px:[{px:h()}],py:[{py:h()}],ps:[{ps:h()}],pe:[{pe:h()}],pt:[{pt:h()}],pr:[{pr:h()}],pb:[{pb:h()}],pl:[{pl:h()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":h()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":h()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[c,"screen",...Z()]}],"min-w":[{"min-w":[c,"screen","none",...Z()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",r,me,ee]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,v,ct]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",at,w]}],"font-family":[{font:[Qn,w,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,v,w]}],"line-clamp":[{"line-clamp":[R,"none",v,ct]}],leading:[{leading:[s,...h()]}],"list-image":[{"list-image":["none",v,w]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",v,w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[R,"from-font","auto",v,ee]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[R,"auto",v,w]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:h()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",v,w]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",v,w]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Bt()}],"bg-repeat":[{bg:Vt()}],"bg-size":[{bg:Ht()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},J,v,w],radial:["",v,w],conic:[J,v,w]},eo,Jn]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:ot()}],"gradient-via-pos":[{via:ot()}],"gradient-to-pos":[{to:ot()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[R,v,w]}],"outline-w":[{outline:["",R,me,ee]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",d,Te,Pe]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",u,Te,Pe]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[R,ee]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",f,Te,Pe]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[R,v,w]}],"mix-blend":[{"mix-blend":[...Kt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Kt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[R]}],"mask-image-linear-from-pos":[{"mask-linear-from":M()}],"mask-image-linear-to-pos":[{"mask-linear-to":M()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":M()}],"mask-image-t-to-pos":[{"mask-t-to":M()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":M()}],"mask-image-r-to-pos":[{"mask-r-to":M()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":M()}],"mask-image-b-to-pos":[{"mask-b-to":M()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":M()}],"mask-image-l-to-pos":[{"mask-l-to":M()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":M()}],"mask-image-x-to-pos":[{"mask-x-to":M()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":M()}],"mask-image-y-to-pos":[{"mask-y-to":M()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[v,w]}],"mask-image-radial-from-pos":[{"mask-radial-from":M()}],"mask-image-radial-to-pos":[{"mask-radial-to":M()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[R]}],"mask-image-conic-from-pos":[{"mask-conic-from":M()}],"mask-image-conic-to-pos":[{"mask-conic-to":M()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Bt()}],"mask-repeat":[{mask:Vt()}],"mask-size":[{mask:Ht()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",v,w]}],filter:[{filter:["","none",v,w]}],blur:[{blur:Yt()}],brightness:[{brightness:[R,v,w]}],contrast:[{contrast:[R,v,w]}],"drop-shadow":[{"drop-shadow":["","none",m,Te,Pe]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",R,v,w]}],"hue-rotate":[{"hue-rotate":[R,v,w]}],invert:[{invert:["",R,v,w]}],saturate:[{saturate:[R,v,w]}],sepia:[{sepia:["",R,v,w]}],"backdrop-filter":[{"backdrop-filter":["","none",v,w]}],"backdrop-blur":[{"backdrop-blur":Yt()}],"backdrop-brightness":[{"backdrop-brightness":[R,v,w]}],"backdrop-contrast":[{"backdrop-contrast":[R,v,w]}],"backdrop-grayscale":[{"backdrop-grayscale":["",R,v,w]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[R,v,w]}],"backdrop-invert":[{"backdrop-invert":["",R,v,w]}],"backdrop-opacity":[{"backdrop-opacity":[R,v,w]}],"backdrop-saturate":[{"backdrop-saturate":[R,v,w]}],"backdrop-sepia":[{"backdrop-sepia":["",R,v,w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":h()}],"border-spacing-x":[{"border-spacing-x":h()}],"border-spacing-y":[{"border-spacing-y":h()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",v,w]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[R,"initial",v,w]}],ease:[{ease:["linear","initial",C,v,w]}],delay:[{delay:[R,v,w]}],animate:[{animate:["none",O,v,w]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,v,w]}],"perspective-origin":[{"perspective-origin":p()}],rotate:[{rotate:Ce()}],"rotate-x":[{"rotate-x":Ce()}],"rotate-y":[{"rotate-y":Ce()}],"rotate-z":[{"rotate-z":Ce()}],scale:[{scale:Re()}],"scale-x":[{"scale-x":Re()}],"scale-y":[{"scale-y":Re()}],"scale-z":[{"scale-z":Re()}],"scale-3d":["scale-3d"],skew:[{skew:st()}],"skew-x":[{"skew-x":st()}],"skew-y":[{"skew-y":st()}],transform:[{transform:[v,w,"","none","gpu","cpu"]}],"transform-origin":[{origin:p()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",v,w]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-mt":[{"scroll-mt":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",v,w]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[R,me,ee,ct]}],stroke:[{stroke:["none",...E()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},oo=jn(no);function z(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var so=typeof Symbol=="function"&&Symbol.observable||"@@observable",tr=so,lt=()=>Math.random().toString(36).substring(7).split("").join("."),io={INIT:`@@redux/INIT${lt()}`,REPLACE:`@@redux/REPLACE${lt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lt()}`},We=io;function Pt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Tt(e,t,r){if(typeof e!="function")throw new Error(z(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(z(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(z(1));return r(Tt)(e,t)}let n=e,o=t,s=new Map,i=s,c=0,a=!1;function l(){i===s&&(i=new Map,s.forEach((S,C)=>{i.set(C,S)}))}function d(){if(a)throw new Error(z(3));return o}function u(S){if(typeof S!="function")throw new Error(z(4));if(a)throw new Error(z(5));let C=!0;l();const O=c++;return i.set(O,S),function(){if(C){if(a)throw new Error(z(6));C=!1,l(),i.delete(O),s=null}}}function f(S){if(!Pt(S))throw new Error(z(7));if(typeof S.type>"u")throw new Error(z(8));if(typeof S.type!="string")throw new Error(z(17));if(a)throw new Error(z(9));try{a=!0,o=n(o,S)}finally{a=!1}return(s=i).forEach(O=>{O()}),S}function m(S){if(typeof S!="function")throw new Error(z(10));n=S,f({type:We.REPLACE})}function x(){const S=u;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(z(11));function O(){const k=C;k.next&&k.next(d())}return O(),{unsubscribe:S(O)}},[tr](){return this}}}return f({type:We.INIT}),{dispatch:f,subscribe:u,getState:d,replaceReducer:m,[tr]:x}}function ao(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:We.INIT})>"u")throw new Error(z(12));if(typeof r(void 0,{type:We.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(z(13))})}function At(e){const t=Object.keys(e),r={};for(let s=0;s<t.length;s++){const i=t[s];typeof e[i]=="function"&&(r[i]=e[i])}const n=Object.keys(r);let o;try{ao(r)}catch(s){o=s}return function(i={},c){if(o)throw o;let a=!1;const l={};for(let d=0;d<n.length;d++){const u=n[d],f=r[u],m=i[u],x=f(m,c);if(typeof x>"u")throw c&&c.type,new Error(z(14));l[u]=x,a=a||x!==m}return a=a||n.length!==Object.keys(i).length,a?l:i}}function qe(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function co(...e){return t=>(r,n)=>{const o=t(r,n);let s=()=>{throw new Error(z(15))};const i={getState:o.getState,dispatch:(a,...l)=>s(a,...l)},c=e.map(a=>a(i));return s=qe(...c)(o.dispatch),{...o,dispatch:s}}}function lo(e){return Pt(e)&&"type"in e&&typeof e.type=="string"}var Nr=Symbol.for("immer-nothing"),rr=Symbol.for("immer-draftable"),j=Symbol.for("immer-state");function L(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var W=Object,fe=W.getPrototypeOf,Le="constructor",Ke="prototype",bt="configurable",Ge="enumerable",De="writable",we="value",X=e=>!!e&&!!e[j];function G(e){return e?jr(e)||Xe(e)||!!e[rr]||!!e[Le]?.[rr]||Je(e)||Qe(e):!1}var uo=W[Ke][Le].toString(),nr=new WeakMap;function jr(e){if(!e||!It(e))return!1;const t=fe(e);if(t===null||t===W[Ke])return!0;const r=W.hasOwnProperty.call(t,Le)&&t[Le];if(r===Object)return!0;if(!de(r))return!1;let n=nr.get(r);return n===void 0&&(n=Function.toString.call(r),nr.set(r,n)),n===uo}function Ye(e,t,r=!0){ke(e)===0?(r?Reflect.ownKeys(e):W.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function ke(e){const t=e[j];return t?t.type_:Xe(e)?1:Je(e)?2:Qe(e)?3:0}var or=(e,t,r=ke(e))=>r===2?e.has(t):W[Ke].hasOwnProperty.call(e,t),wt=(e,t,r=ke(e))=>r===2?e.get(t):e[t],$e=(e,t,r,n=ke(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function fo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Xe=Array.isArray,Je=e=>e instanceof Map,Qe=e=>e instanceof Set,It=e=>typeof e=="object",de=e=>typeof e=="function",ut=e=>typeof e=="boolean";function po(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var K=e=>e.copy_||e.base_,Mt=e=>e.modified_?e.copy_:e.base_;function vt(e,t){if(Je(e))return new Map(e);if(Qe(e))return new Set(e);if(Xe(e))return Array[Ke].slice.call(e);const r=jr(e);if(t===!0||t==="class_only"&&!r){const n=W.getOwnPropertyDescriptors(e);delete n[j];let o=Reflect.ownKeys(n);for(let s=0;s<o.length;s++){const i=o[s],c=n[i];c[De]===!1&&(c[De]=!0,c[bt]=!0),(c.get||c.set)&&(n[i]={[bt]:!0,[De]:!0,[Ge]:c[Ge],[we]:e[i]})}return W.create(fe(e),n)}else{const n=fe(e);if(n!==null&&r)return{...e};const o=W.create(n);return W.assign(o,e)}}function zt(e,t=!1){return Ze(e)||X(e)||!G(e)||(ke(e)>1&&W.defineProperties(e,{set:Ae,add:Ae,clear:Ae,delete:Ae}),W.freeze(e),t&&Ye(e,(r,n)=>{zt(n,!0)},!1)),e}function ho(){L(2)}var Ae={[we]:ho};function Ze(e){return e===null||!It(e)?!0:W.isFrozen(e)}var Be="MapSet",St="Patches",sr="ArrayMethods",Fr={};function oe(e){const t=Fr[e];return t||L(0,e),t}var ir=e=>!!Fr[e],ve,Ur=()=>ve,mo=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ir(Be)?oe(Be):void 0,arrayMethodsPlugin_:ir(sr)?oe(sr):void 0});function ar(e,t){t&&(e.patchPlugin_=oe(St),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function kt(e){_t(e),e.drafts_.forEach(go),e.drafts_=null}function _t(e){e===ve&&(ve=e.parent_)}var cr=e=>ve=mo(ve,e);function go(e){const t=e[j];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lr(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[j].modified_&&(kt(t),L(4)),G(e)&&(e=ur(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[j].base_,e,t)}else e=ur(t,r);return yo(t,e,!0),kt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Nr?e:void 0}function ur(e,t){if(Ze(t))return t;const r=t[j];if(!r)return Ve(t,e.handledSet_,e);if(!et(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Lr(r,e)}return r.copy_}function yo(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zt(t,r)}function Wr(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var et=(e,t)=>e.scope_===t,bo=[];function qr(e,t,r,n){const o=K(e),s=e.type_;if(n!==void 0&&wt(o,n,s)===t){$e(o,n,r,s);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Ye(o,(a,l)=>{if(X(l)){const d=c.get(l)||[];d.push(a),c.set(l,d)}})}const i=e.draftLocations_.get(t)??bo;for(const c of i)$e(o,c,r,s)}function wo(e,t,r){e.callbacks_.push(function(o){const s=t;if(!s||!et(s,o))return;o.mapSetPlugin_?.fixSetContents(s);const i=Mt(s);qr(e,s.draft_??s,i,r),Lr(s,o)})}function Lr(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const o=n.getPath(e);o&&n.generatePatches_(e,o,t)}Wr(e)}}function vo(e,t,r){const{scope_:n}=e;if(X(r)){const o=r[j];et(o,n)&&o.callbacks_.push(function(){Ne(e);const i=Mt(o);qr(e,r,i,t)})}else G(r)&&e.callbacks_.push(function(){const s=K(e);e.type_===3?s.has(r)&&Ve(r,n.handledSet_,n):wt(s,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ve(wt(e.copy_,t,e.type_),n.handledSet_,n)})}function Ve(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||X(e)||t.has(e)||!G(e)||Ze(e)||(t.add(e),Ye(e,(n,o)=>{if(X(o)){const s=o[j];if(et(s,r)){const i=Mt(s);$e(e,n,i,e.type_),Wr(s)}}else G(o)&&Ve(o,t,r)})),e}function So(e,t){const r=Xe(e),n={type_:r?1:0,scope_:t?t.scope_:Ur(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=n,s=He;r&&(o=[n],s=Se);const{revoke:i,proxy:c}=Proxy.revocable(o,s);return n.draft_=c,n.revoke_=i,[c,n]}var He={get(e,t){if(t===j)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const o=K(e);if(!or(o,t,e.type_))return ko(e,o,t);const s=o[t];if(e.finalized_||!G(s)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&po(t))return s;if(s===dt(e.base_,t)){Ne(e);const i=e.type_===1?+t:t,c=Et(e.scope_,s,e,i);return e.copy_[i]=c}return s},has(e,t){return t in K(e)},ownKeys(e){return Reflect.ownKeys(K(e))},set(e,t,r){const n=Gr(K(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=dt(K(e),t),s=o?.[j];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(fo(r,o)&&(r!==void 0||or(e.base_,t,e.type_)))return!0;Ne(e),xt(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),vo(e,t,r)),!0},deleteProperty(e,t){return Ne(e),dt(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),xt(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=K(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[De]:!0,[bt]:e.type_!==1||t!=="length",[Ge]:n[Ge],[we]:r[t]}},defineProperty(){L(11)},getPrototypeOf(e){return fe(e.base_)},setPrototypeOf(){L(12)}},Se={};for(let e in He){let t=He[e];Se[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Se.deleteProperty=function(e,t){return Se.set.call(this,e,t,void 0)};Se.set=function(e,t,r){return He.set.call(this,e[0],t,r,e[0])};function dt(e,t){const r=e[j];return(r?K(r):e)[t]}function ko(e,t,r){const n=Gr(t,r);return n?we in n?n[we]:n.get?.call(e.draft_):void 0}function Gr(e,t){if(!(t in e))return;let r=fe(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=fe(r)}}function xt(e){e.modified_||(e.modified_=!0,e.parent_&&xt(e.parent_))}function Ne(e){e.copy_||(e.assigned_=new Map,e.copy_=vt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var _o=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(de(t)&&!de(r)){const s=r;r=t;const i=this;return function(a=s,...l){return i.produce(a,d=>r.call(this,d,...l))}}de(r)||L(6),n!==void 0&&!de(n)&&L(7);let o;if(G(t)){const s=cr(this),i=Et(s,t,void 0);let c=!0;try{o=r(i),c=!1}finally{c?kt(s):_t(s)}return ar(s,n),lr(o,s)}else if(!t||!It(t)){if(o=r(t),o===void 0&&(o=t),o===Nr&&(o=void 0),this.autoFreeze_&&zt(o,!0),n){const s=[],i=[];oe(St).generateReplacementPatches_(t,o,{patches_:s,inversePatches_:i}),n(s,i)}return o}else L(1,t)},this.produceWithPatches=(t,r)=>{if(de(t))return(i,...c)=>this.produceWithPatches(i,a=>t(a,...c));let n,o;return[this.produce(t,r,(i,c)=>{n=i,o=c}),n,o]},ut(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ut(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ut(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){G(e)||L(8),X(e)&&(e=xo(e));const t=cr(this),r=Et(t,e,void 0);return r[j].isManual_=!0,_t(t),r}finishDraft(e,t){const r=e&&e[j];(!r||!r.isManual_)&&L(9);const{scope_:n}=r;return ar(n,t),lr(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=oe(St).applyPatches_;return X(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Et(e,t,r,n){const[o,s]=Je(t)?oe(Be).proxyMap_(t,r):Qe(t)?oe(Be).proxySet_(t,r):So(t,r);return(r?.scope_??Ur()).drafts_.push(o),s.callbacks_=r?.callbacks_??[],s.key_=n,r&&n!==void 0?wo(r,s,n):s.callbacks_.push(function(a){a.mapSetPlugin_?.fixSetContents(s);const{patchPlugin_:l}=a;s.modified_&&l&&l.generatePatches_(s,[],a)}),o}function xo(e){return X(e)||L(10,e),$r(e)}function $r(e){if(!G(e)||Ze(e))return e;const t=e[j];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=vt(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=vt(e,!0);return Ye(r,(o,s)=>{$e(r,o,$r(s))},n),t&&(t.finalized_=!1),r}var Eo=new _o,Br=Eo.produce;function Vr(e){return({dispatch:r,getState:n})=>o=>s=>typeof s=="function"?s(r,n,e):o(s)}var Co=Vr(),Ro=Vr,Oo=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?qe:qe.apply(null,arguments)},Po=e=>e&&typeof e.match=="function";function be(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Y(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>lo(n)&&n.type===e,r}var Hr=class ge extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ge.prototype)}static get[Symbol.species](){return ge}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ge(...t[0].concat(this)):new ge(...t.concat(this))}};function dr(e){return G(e)?Br(e,()=>{}):e}function Ie(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function To(e){return typeof e=="boolean"}var Ao=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new Hr;return r&&(To(r)?i.push(Co):i.push(Ro(r.extraArgument))),i},Io="RTK_autoBatch",fr=e=>t=>{setTimeout(t,e)},Mo=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let o=!0,s=!1,i=!1;const c=new Set,a=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:fr(10):e.type==="callback"?e.queueNotification:fr(e.timeout),l=()=>{i=!1,s&&(s=!1,c.forEach(d=>d()))};return Object.assign({},n,{subscribe(d){const u=()=>o&&d(),f=n.subscribe(u);return c.add(d),()=>{f(),c.delete(d)}},dispatch(d){try{return o=!d?.meta?.[Io],s=!o,s&&(i||(i=!0,a(l))),n.dispatch(d)}finally{o=!0}}})},zo=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new Hr(e);return n&&o.push(Mo(typeof n=="object"?n:void 0)),o};function Do(e){const t=Ao(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(Pt(r))c=At(r);else throw new Error(Y(1));let a;typeof n=="function"?a=n(t):a=t();let l=qe;o&&(l=Oo({trace:!1,...typeof o=="object"&&o}));const d=co(...a),u=zo(d);let f=typeof i=="function"?i(u):u();const m=l(...f);return Tt(c,s,m)}function Kr(e){const t={},r=[];let n;const o={addCase(s,i){const c=typeof s=="string"?s:s.type;if(!c)throw new Error(Y(28));if(c in t)throw new Error(Y(29));return t[c]=i,o},addAsyncThunk(s,i){return i.pending&&(t[s.pending.type]=i.pending),i.rejected&&(t[s.rejected.type]=i.rejected),i.fulfilled&&(t[s.fulfilled.type]=i.fulfilled),i.settled&&r.push({matcher:s.settled,reducer:i.settled}),o},addMatcher(s,i){return r.push({matcher:s,reducer:i}),o},addDefaultCase(s){return n=s,o}};return e(o),[t,r,n]}function No(e){return typeof e=="function"}function jo(e,t){let[r,n,o]=Kr(t),s;if(No(e))s=()=>dr(e());else{const c=dr(e);s=()=>c}function i(c=s(),a){let l=[r[a.type],...n.filter(({matcher:d})=>d(a)).map(({reducer:d})=>d)];return l.filter(d=>!!d).length===0&&(l=[o]),l.reduce((d,u)=>{if(u)if(X(d)){const m=u(d,a);return m===void 0?d:m}else{if(G(d))return Br(d,f=>u(f,a));{const f=u(d,a);if(f===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return d},c)}return i.getInitialState=s,i}var Fo=(e,t)=>Po(e)?e.match(t):e(t);function Uo(...e){return t=>e.some(r=>Fo(r,t))}var Wo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qo=(e=21)=>{let t="",r=e;for(;r--;)t+=Wo[Math.random()*64|0];return t},Lo=["name","message","stack","code"],ft=class{constructor(e,t){this.payload=e,this.meta=t}_type},pr=class{constructor(e,t){this.payload=e,this.meta=t}_type},Go=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of Lo)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},hr="External signal was aborted",Dt=(()=>{function e(t,r,n){const o=be(t+"/fulfilled",(a,l,d,u)=>({payload:a,meta:{...u||{},arg:d,requestId:l,requestStatus:"fulfilled"}})),s=be(t+"/pending",(a,l,d)=>({payload:void 0,meta:{...d||{},arg:l,requestId:a,requestStatus:"pending"}})),i=be(t+"/rejected",(a,l,d,u,f)=>({payload:u,error:(n&&n.serializeError||Go)(a||"Rejected"),meta:{...f||{},arg:d,requestId:l,rejectedWithValue:!!u,requestStatus:"rejected",aborted:a?.name==="AbortError",condition:a?.name==="ConditionError"}}));function c(a,{signal:l}={}){return(d,u,f)=>{const m=n?.idGenerator?n.idGenerator(a):qo(),x=new AbortController;let y,S;function C(_){S=_,x.abort()}l&&(l.aborted?C(hr):l.addEventListener("abort",()=>C(hr),{once:!0}));const O=(async function(){let _;try{let p=n?.condition?.(a,{getState:u,extra:f});if(Bo(p)&&(p=await p),p===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const g=new Promise((b,h)=>{y=()=>{h({name:"AbortError",message:S||"Aborted"})},x.signal.addEventListener("abort",y,{once:!0})});d(s(m,a,n?.getPendingMeta?.({requestId:m,arg:a},{getState:u,extra:f}))),_=await Promise.race([g,Promise.resolve(r(a,{dispatch:d,getState:u,extra:f,requestId:m,signal:x.signal,abort:C,rejectWithValue:(b,h)=>new ft(b,h),fulfillWithValue:(b,h)=>new pr(b,h)})).then(b=>{if(b instanceof ft)throw b;return b instanceof pr?o(b.payload,m,a,b.meta):o(b,m,a)})])}catch(p){_=p instanceof ft?i(null,m,a,p.payload,p.meta):i(p,m,a)}finally{y&&x.signal.removeEventListener("abort",y)}return n&&!n.dispatchConditionRejection&&i.match(_)&&_.meta.condition||d(_),_})();return Object.assign(O,{abort:C,requestId:m,arg:a,unwrap(){return O.then($o)}})}}return Object.assign(c,{pending:s,rejected:i,fulfilled:o,settled:Uo(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function $o(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Bo(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Vo=Symbol.for("rtk-slice-createasyncthunk");function Ho(e,t){return`${e}/${t}`}function Ko({creators:e}={}){const t=e?.asyncThunk?.[Vo];return function(n){const{name:o,reducerPath:s=o}=n;if(!o)throw new Error(Y(11));const i=(typeof n.reducers=="function"?n.reducers(Xo()):n.reducers)||{},c=Object.keys(i),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(_,k){const p=typeof _=="string"?_:_.type;if(!p)throw new Error(Y(12));if(p in a.sliceCaseReducersByType)throw new Error(Y(13));return a.sliceCaseReducersByType[p]=k,l},addMatcher(_,k){return a.sliceMatchers.push({matcher:_,reducer:k}),l},exposeAction(_,k){return a.actionCreators[_]=k,l},exposeCaseReducer(_,k){return a.sliceCaseReducersByName[_]=k,l}};c.forEach(_=>{const k=i[_],p={reducerName:_,type:Ho(o,_),createNotation:typeof n.reducers=="function"};Qo(k)?es(p,k,l,t):Jo(p,k,l)});function d(){const[_={},k=[],p=void 0]=typeof n.extraReducers=="function"?Kr(n.extraReducers):[n.extraReducers],g={..._,...a.sliceCaseReducersByType};return jo(n.initialState,b=>{for(let h in g)b.addCase(h,g[h]);for(let h of a.sliceMatchers)b.addMatcher(h.matcher,h.reducer);for(let h of k)b.addMatcher(h.matcher,h.reducer);p&&b.addDefaultCase(p)})}const u=_=>_,f=new Map,m=new WeakMap;let x;function y(_,k){return x||(x=d()),x(_,k)}function S(){return x||(x=d()),x.getInitialState()}function C(_,k=!1){function p(b){let h=b[_];return typeof h>"u"&&k&&(h=Ie(m,p,S)),h}function g(b=u){const h=Ie(f,k,()=>new WeakMap);return Ie(h,b,()=>{const P={};for(const[$,_e]of Object.entries(n.selectors??{}))P[$]=Yo(_e,b,()=>Ie(m,b,S),k);return P})}return{reducerPath:_,getSelectors:g,get selectors(){return g(p)},selectSlice:p}}const O={name:o,reducer:y,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:S,...C(s),injectInto(_,{reducerPath:k,...p}={}){const g=k??s;return _.inject({reducerPath:g,reducer:y},p),{...O,...C(g,!0)}}};return O}}function Yo(e,t,r,n){function o(s,...i){let c=t(s);return typeof c>"u"&&n&&(c=r()),e(c,...i)}return o.unwrapped=e,o}var tt=Ko();function Xo(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Jo({type:e,reducerName:t,createNotation:r},n,o){let s,i;if("reducer"in n){if(r&&!Zo(n))throw new Error(Y(17));s=n.reducer,i=n.prepare}else s=n;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?be(e,i):be(e))}function Qo(e){return e._reducerDefinitionType==="asyncThunk"}function Zo(e){return e._reducerDefinitionType==="reducerWithPrepare"}function es({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Y(18));const{payloadCreator:s,fulfilled:i,pending:c,rejected:a,settled:l,options:d}=r,u=o(e,s,d);n.exposeAction(t,u),i&&n.addCase(u.fulfilled,i),c&&n.addCase(u.pending,c),a&&n.addCase(u.rejected,a),l&&n.addMatcher(u.settled,l),n.exposeCaseReducer(t,{fulfilled:i||Me,pending:c||Me,rejected:a||Me,settled:l||Me})}function Me(){}function Y(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Nt="persist:",jt="persist/FLUSH",rt="persist/REHYDRATE",Ft="persist/PAUSE",Ut="persist/PERSIST",Wt="persist/PURGE",qt="persist/REGISTER",ts=-1;function je(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?je=function(r){return typeof r}:je=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},je(e)}function mr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mr(r,!0).forEach(function(n){ns(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mr(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ns(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function os(e,t,r,n){n.debug;var o=rs({},r);return e&&je(e)==="object"&&Object.keys(e).forEach(function(s){s!=="_persist"&&t[s]===r[s]&&(o[s]=e[s])}),o}function ss(e){var t=e.blacklist||null,r=e.whitelist||null,n=e.transforms||[],o=e.throttle||0,s="".concat(e.keyPrefix!==void 0?e.keyPrefix:Nt).concat(e.key),i=e.storage,c;e.serialize===!1?c=function(p){return p}:typeof e.serialize=="function"?c=e.serialize:c=is;var a=e.writeFailHandler||null,l={},d={},u=[],f=null,m=null,x=function(p){Object.keys(p).forEach(function(g){C(g)&&l[g]!==p[g]&&u.indexOf(g)===-1&&u.push(g)}),Object.keys(l).forEach(function(g){p[g]===void 0&&C(g)&&u.indexOf(g)===-1&&l[g]!==void 0&&u.push(g)}),f===null&&(f=setInterval(y,o)),l=p};function y(){if(u.length===0){f&&clearInterval(f),f=null;return}var k=u.shift(),p=n.reduce(function(g,b){return b.in(g,k,l)},l[k]);if(p!==void 0)try{d[k]=c(p)}catch(g){console.error("redux-persist/createPersistoid: error serializing state",g)}else delete d[k];u.length===0&&S()}function S(){Object.keys(d).forEach(function(k){l[k]===void 0&&delete d[k]}),m=i.setItem(s,c(d)).catch(O)}function C(k){return!(r&&r.indexOf(k)===-1&&k!=="_persist"||t&&t.indexOf(k)!==-1)}function O(k){a&&a(k)}var _=function(){for(;u.length!==0;)y();return m||Promise.resolve()};return{update:x,flush:_}}function is(e){return JSON.stringify(e)}function as(e){var t=e.transforms||[],r="".concat(e.keyPrefix!==void 0?e.keyPrefix:Nt).concat(e.key),n=e.storage;e.debug;var o;return e.deserialize===!1?o=function(i){return i}:typeof e.deserialize=="function"?o=e.deserialize:o=cs,n.getItem(r).then(function(s){if(s)try{var i={},c=o(s);return Object.keys(c).forEach(function(a){i[a]=t.reduceRight(function(l,d){return d.out(l,a,c)},o(c[a]))}),i}catch(a){throw a}else return})}function cs(e){return JSON.parse(e)}function ls(e){var t=e.storage,r="".concat(e.keyPrefix!==void 0?e.keyPrefix:Nt).concat(e.key);return t.removeItem(r,us)}function us(e){}function gr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gr(r,!0).forEach(function(n){ds(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gr(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ds(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fs(e,t){if(e==null)return{};var r=ps(e,t),n,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ps(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,s;for(s=0;s<n.length;s++)o=n[s],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var hs=5e3;function Yr(e,t){var r=e.version!==void 0?e.version:ts;e.debug;var n=e.stateReconciler===void 0?os:e.stateReconciler,o=e.getStoredState||as,s=e.timeout!==void 0?e.timeout:hs,i=null,c=!1,a=!0,l=function(u){return u._persist.rehydrated&&i&&!a&&i.update(u),u};return function(d,u){var f=d||{},m=f._persist,x=fs(f,["_persist"]),y=x;if(u.type===Ut){var S=!1,C=function(h,P){S||(u.rehydrate(e.key,h,P),S=!0)};if(s&&setTimeout(function(){!S&&C(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},s),a=!1,i||(i=ss(e)),m)return H({},t(y,u),{_persist:m});if(typeof u.rehydrate!="function"||typeof u.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return u.register(e.key),o(e).then(function(b){var h=e.migrate||function(P,$){return Promise.resolve(P)};h(b,r).then(function(P){C(P)},function(P){C(void 0,P)})},function(b){C(void 0,b)}),H({},t(y,u),{_persist:{version:r,rehydrated:!1}})}else{if(u.type===Wt)return c=!0,u.result(ls(e)),H({},t(y,u),{_persist:m});if(u.type===jt)return u.result(i&&i.flush()),H({},t(y,u),{_persist:m});if(u.type===Ft)a=!0;else if(u.type===rt){if(c)return H({},y,{_persist:H({},m,{rehydrated:!0})});if(u.key===e.key){var O=t(y,u),_=u.payload,k=n!==!1&&_!==void 0?n(_,d,O,e):O,p=H({},k,{_persist:H({},m,{rehydrated:!0})});return l(p)}}}if(!m)return t(d,u);var g=t(y,u);return g===y?d:l(H({},g,{_persist:m}))}}function yr(e){return ys(e)||gs(e)||ms()}function ms(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function gs(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function ys(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ct(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?br(r,!0).forEach(function(n){bs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):br(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Xr={registry:[],bootstrapped:!1},ws=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case qt:return Ct({},t,{registry:[].concat(yr(t.registry),[r.key])});case rt:var n=t.registry.indexOf(r.key),o=yr(t.registry);return o.splice(n,1),Ct({},t,{registry:o,bootstrapped:o.length===0});default:return t}};function vs(e,t,r){var n=Tt(ws,Xr,void 0),o=function(a){n.dispatch({type:qt,key:a})},s=function(a,l,d){var u={type:rt,payload:l,err:d,key:a};e.dispatch(u),n.dispatch(u)},i=Ct({},n,{purge:function(){var a=[];return e.dispatch({type:Wt,result:function(d){a.push(d)}}),Promise.all(a)},flush:function(){var a=[];return e.dispatch({type:jt,result:function(d){a.push(d)}}),Promise.all(a)},pause:function(){e.dispatch({type:Ft})},persist:function(){e.dispatch({type:Ut,register:o,rehydrate:s})}});return i.persist(),i}function Jr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.whitelist||null,o=r.blacklist||null;function s(i){return!!(n&&n.indexOf(i)===-1||o&&o.indexOf(i)!==-1)}return{in:function(c,a,l){return!s(a)&&e?e(c,a,l):c},out:function(c,a,l){return!s(a)&&t?t(c,a,l):c}}}function Fe(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fe=function(r){return typeof r}:Fe=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fe(e)}function pt(){}var Ss={getItem:pt,setItem:pt,removeItem:pt};function ks(e){if((typeof self>"u"?"undefined":Fe(self))!=="object"||!(e in self))return!1;try{var t=self[e],r="redux-persist ".concat(e," test");t.setItem(r,"test"),t.getItem(r),t.removeItem(r)}catch{return!1}return!0}function _s(e){var t="".concat(e,"Storage");return ks(t)?self[t]:Ss}function xs(e){var t=_s(e);return{getItem:function(n){return new Promise(function(o,s){o(t.getItem(n))})},setItem:function(n,o){return new Promise(function(s,i){s(t.setItem(n,o))})},removeItem:function(n){return new Promise(function(o,s){o(t.removeItem(n))})}}}const Es=xs("local"),Cs={sidebarOpen:!0,activeMenu:"home"},Qr=tt({name:"ui",initialState:Cs,reducers:{toggleSidebar:e=>{e.sidebarOpen=!e.sidebarOpen},setSidebarOpen:(e,t)=>{e.sidebarOpen=t.payload},setActiveMenu:(e,t)=>{e.activeMenu=t.payload}}}),{toggleSidebar:bi,setSidebarOpen:wi,setActiveMenu:vi}=Qr.actions,Rs=Qr.reducer,Os={routes:[]},Ps=(e,t)=>{const r=t.split("/").filter(Boolean);for(let n=r.length-1;n>0;n--){const o="/"+r.slice(0,n).join("/"),s=e.find(i=>i.path===o);if(s)return s}return e.find(n=>n.path==="/")||null},Ts=(e,t)=>e==="/"?t:t.replace(e+"/",""),Zr=tt({name:"route",initialState:Os,reducers:{addRoute:(e,t)=>{const r=t.payload,n=Ps(e.routes,r.path);if(n){n.children||(n.children=[]);const o=Ts(n.path,r.path);n.children.push({...r,path:o})}else e.routes.push(r);e.routes.sort((o,s)=>(o.meta?.order||999)-(s.meta?.order||999))},removeRoute:(e,t)=>{const r=t.payload,n=o=>{const s=o.findIndex(i=>i.path===r);if(s>=0)return o.splice(s,1),!0;for(const i of o)if(i.children&&n(i.children))return!0;return!1};n(e.routes)},updateRoute:(e,t)=>{const{path:r,updates:n}=t.payload,o=s=>{const i=s.findIndex(c=>c.path===r);if(i>=0)return s[i]={...s[i],...n},!0;for(const c of s)if(c.children&&o(c.children))return!0;return!1};o(e.routes)},setRoutes:(e,t)=>{e.routes=t.payload,e.routes.sort((r,n)=>(r.meta?.order||999)-(n.meta?.order||999))},clearRoutes:e=>{e.routes=[]}}}),{addRoute:As,removeRoute:Is,updateRoute:Ms,setRoutes:Si,clearRoutes:zs}=Zr.actions,Ds=Zr.reducer,Ns={entries:[],loadedScripts:[],synced:!1},Lt=Dt("script/loadScript",async e=>new Promise((t,r)=>{const n=document.createElement("script");n.type="module",n.src=e,n.dataset.dynamicEntry="true",n.onload=()=>t(e),n.onerror=o=>{console.error("[Script] Load failed:",e),r(o)},document.body.appendChild(n)})),en=Dt("script/loadScripts",async(e,{dispatch:t})=>(await Promise.allSettled(e.map(n=>t(Lt(n)).unwrap()))).filter(n=>n.status==="fulfilled").map(n=>n.value)),tn=Dt("script/unloadScript",async e=>(document.querySelectorAll(`script[src="${e}"][data-dynamic-entry="true"]`).forEach(r=>r.remove()),e)),rn=tt({name:"script",initialState:Ns,reducers:{syncEntries:(e,t)=>{e.entries=t.payload,e.synced=!0},addEntry:(e,t)=>{e.entries.includes(t.payload)||e.entries.push(t.payload)},removeEntry:(e,t)=>{e.entries=e.entries.filter(r=>r!==t.payload),e.loadedScripts=e.loadedScripts.filter(r=>r!==t.payload)}},extraReducers:e=>{e.addCase(Lt.fulfilled,(t,r)=>{t.loadedScripts.includes(r.payload)||t.loadedScripts.push(r.payload)}),e.addCase(en.fulfilled,(t,r)=>{r.payload.forEach(n=>{t.loadedScripts.includes(n)||t.loadedScripts.push(n)})}),e.addCase(tn.fulfilled,(t,r)=>{t.loadedScripts=t.loadedScripts.filter(n=>n!==r.payload)})}}),{syncEntries:js,addEntry:Fs,removeEntry:Us}=rn.actions,Ws=rn.reducer,qs={configs:{},schemas:{},loading:{},errors:{},connected:!1},nn=tt({name:"config",initialState:qs,reducers:{setConnected:(e,t)=>{e.connected=t.payload},setLoading:(e,t)=>{const{pluginName:r,loading:n}=t.payload;e.loading[r]=n},setError:(e,t)=>{const{pluginName:r,error:n}=t.payload;e.errors[r]=n},updateConfig:(e,t)=>{const{pluginName:r,config:n}=t.payload;e.configs[r]=n,e.loading[r]=!1,e.errors[r]=null},updateSchema:(e,t)=>{const{pluginName:r,schema:n}=t.payload;e.schemas[r]=n},updateConfigs:(e,t)=>{e.configs={...e.configs,...t.payload}},updateSchemas:(e,t)=>{e.schemas={...e.schemas,...t.payload}},removeConfig:(e,t)=>{const r=t.payload;delete e.configs[r],delete e.schemas[r],delete e.loading[r],delete e.errors[r]},clearConfigs:e=>{e.configs={},e.schemas={},e.loading={},e.errors={}}}}),{setConnected:ht,setLoading:ze,setError:ye,updateConfig:on,updateSchema:sn,updateConfigs:an,updateSchemas:cn,removeConfig:ki,clearConfigs:_i}=nn.actions,Ls=nn.reducer,Gs=(e,t)=>e.config.configs[t],$s=(e,t)=>e.config.schemas[t],Bs=(e,t)=>e.config.loading[t]||!1,Vs=(e,t)=>e.config.errors[t]||null,ae=e=>e.config.connected,Hs=e=>e.config.configs,Ks=e=>e.config.schemas,Rt={ui:Rs,route:Ds,script:Ws,config:Ls};var mt={exports:{}},gt={};var wr;function Ys(){if(wr)return gt;wr=1;var e=fn;function t(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,i=e.useMemo,c=e.useDebugValue;return gt.useSyncExternalStoreWithSelector=function(a,l,d,u,f){var m=o(null);if(m.current===null){var x={hasValue:!1,value:null};m.current=x}else x=m.current;m=i(function(){function S(p){if(!C){if(C=!0,O=p,p=u(p),f!==void 0&&x.hasValue){var g=x.value;if(f(g,p))return _=g}return _=p}if(g=_,r(O,p))return g;var b=u(p);return f!==void 0&&f(g,b)?(O=p,g):(O=p,_=b)}var C=!1,O,_,k=d===void 0?null:d;return[function(){return S(l())},k===null?void 0:function(){return S(k())}]},[l,d,u,f]);var y=n(a,m[0],m[1]);return s(function(){x.hasValue=!0,x.value=y},[y]),c(y),y},gt}var vr;function Xs(){return vr||(vr=1,mt.exports=Ys()),mt.exports}var Js=Xs(),Qs=Symbol.for("react-redux-context"),Zs=typeof globalThis<"u"?globalThis:{};function ei(){if(!Q.createContext)return{};const e=Zs[Qs]??=new Map;let t=e.get(Q.createContext);return t||(t=Q.createContext(null),e.set(Q.createContext,t)),t}var se=ei();function Gt(e=se){return function(){return Q.useContext(e)}}var ln=Gt();function un(e=se){const t=e===se?ln:Gt(e),r=()=>{const{store:n}=t();return n};return Object.assign(r,{withTypes:()=>r}),r}var ti=un();function ri(e=se){const t=e===se?ti:un(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var ni=ri(),oi=(e,t)=>e===t;function si(e=se){const t=e===se?ln:Gt(e),r=(n,o={})=>{const{equalityFn:s=oi}=typeof o=="function"?{equalityFn:o}:o,i=t(),{store:c,subscription:a,getServerState:l}=i;Q.useRef(!0);const d=Q.useCallback({[n.name](f){return n(f)}}[n.name],[n]),u=Js.useSyncExternalStoreWithSelector(a.addNestedSub,c.getState,l||c.getState,d,s);return Q.useDebugValue(u),u};return Object.assign(r,{withTypes:()=>r}),r}var ii=si();const ai=Jr(e=>{const{routes:t,...r}=e;return r},e=>({...e,routes:[]}),{whitelist:["route"]}),ci=Jr(e=>{const{entries:t,loadedScripts:r,synced:n,...o}=e;return o},e=>({...e,entries:[],loadedScripts:[],synced:!1}),{whitelist:["script"]}),dn={key:"root",storage:Es,transforms:[ai,ci]},li=Yr(dn,At(Rt)),A=Do({reducer:li,middleware:e=>e({serializableCheck:{ignoredActions:[jt,rt,Ft,Ut,Wt,qt,"route/addRoute","route/updateRoute","route/setRoutes"],ignoredPaths:["route.routes"]}})}),xi=vs(A);typeof window<"u"&&(window.__REDUX_STORE__=A);function Ei(e,t){Rt[e]=t;const r=Yr(dn,At(Rt));A.replaceReducer(r)}const ui=ni,D=ii,Ci=e=>A.dispatch(As(e)),Ri=e=>A.dispatch(Is(e)),Oi=(e,t)=>A.dispatch(Ms({path:e,updates:t})),Pi=e=>A.getState().route.routes.find(t=>t.path===e),Ti=()=>A.getState().route.routes,Ai=()=>A.dispatch(zs());function Ii(){const e=D(r=>r.route.routes),t=ie(()=>{const r=s=>{const i={path:s.path,element:s.element,Component:s.Component};return s.children&&s.children.length>0&&(i.children=s.children.map(c=>r(c))),i},n=e.map(r);return pn([{path:"/",element:it(mn,{}),children:n},{path:"*",element:it("div",{children:"404 - Page Not Found"})}])},[e]);return it(hn,{router:t})}var q=(e=>(e.DISCONNECTED="disconnected",e.CONNECTING="connecting",e.CONNECTED="connected",e.RECONNECTING="reconnecting",e.ERROR="error",e))(q||{});class te extends Error{constructor(t,r,n){super(t),this.code=r,this.originalError=n,this.name="WebSocketError"}}class di extends te{constructor(t){super(`Request ${t} timed out`,"REQUEST_TIMEOUT")}}class Sr extends te{constructor(t,r){super(t,"CONNECTION_ERROR",r)}}class kr extends te{constructor(t,r){super(t,"MESSAGE_ERROR",r)}}class fi{static handle(t){try{switch(t.type){case"sync":this.handleScriptSync(t);break;case"add":this.handleScriptAdd(t);break;case"delete":this.handleScriptDelete(t);break;case"config:updated":this.handleConfigUpdated(t);break;case"config:batch":this.handleConfigBatch(t);break;case"config:error":this.handleConfigError(t);break;case"schema:updated":this.handleSchemaUpdated(t);break;case"schema:batch":this.handleSchemaBatch(t);break;case"hmr:reload":this.handleHmrReload(t);break;case"init-data":case"data-update":this.handleSystemMessage(t);break;default:console.warn("[WebSocket] Unknown message type:",t.type)}}catch(r){console.error("[WebSocket] Message handling error:",r)}}static handleScriptSync(t){if(t.data?.key==="entries"){const r=Array.isArray(t.data.value)?t.data.value:[t.data.value];A.dispatch(js(r)),A.dispatch(en(r))}}static handleScriptAdd(t){t.data?.key==="entries"&&(A.dispatch(Fs(t.data.value)),A.dispatch(Lt(t.data.value)))}static handleScriptDelete(t){t.data?.key==="entries"&&(A.dispatch(Us(t.data.value)),A.dispatch(tn(t.data.value)))}static handleConfigUpdated(t){t.pluginName&&t.data!==void 0&&A.dispatch(on({pluginName:t.pluginName,config:t.data}))}static handleConfigBatch(t){t.data&&A.dispatch(an(t.data))}static handleConfigError(t){t.pluginName&&t.error&&A.dispatch(ye({pluginName:t.pluginName,error:t.error}))}static handleSchemaUpdated(t){t.pluginName&&t.data!==void 0&&A.dispatch(sn({pluginName:t.pluginName,schema:t.data}))}static handleSchemaBatch(t){t.data&&A.dispatch(cn(t.data))}static handleHmrReload(t){const r=t.data?.file||"";console.info(`[HMR] 文件变更: ${r},正在刷新页面...`),window.location.reload()}static handleSystemMessage(t){}}class pi{ws=null;config;callbacks;state=q.DISCONNECTED;reconnectAttempts=0;reconnectTimer=null;requestId=0;pendingRequests=new Map;constructor(t={},r={}){this.config={url:this.buildWebSocketUrl(t.url),reconnectInterval:t.reconnectInterval??3e3,maxReconnectAttempts:t.maxReconnectAttempts??10,requestTimeout:t.requestTimeout??1e4},this.callbacks=r}connect(){if(!(this.state===q.CONNECTED||this.state===q.CONNECTING)){this.setState(q.CONNECTING);try{this.ws=new WebSocket(this.config.url),this.attachEventHandlers()}catch(t){this.handleConnectionError(new Sr("Failed to create WebSocket",t))}}}disconnect(){this.clearReconnectTimer(),this.clearPendingRequests(),this.ws&&(this.ws.close(),this.ws=null),this.setState(q.DISCONNECTED),A.dispatch(ht(!1))}send(t){if(!this.isConnected())throw new te("WebSocket is not connected","NOT_CONNECTED");try{this.ws.send(JSON.stringify(t))}catch(r){throw new kr("Failed to send message",r)}}async sendRequest(t){if(!this.isConnected())throw new te("WebSocket is not connected","NOT_CONNECTED");return new Promise((r,n)=>{const o=++this.requestId,s={...t,requestId:o},i=setTimeout(()=>{this.pendingRequests.delete(o),n(new di(o))},this.config.requestTimeout);this.pendingRequests.set(o,{resolve:r,reject:n,timer:i});try{this.ws.send(JSON.stringify(s))}catch(c){this.pendingRequests.delete(o),clearTimeout(i),n(new kr("Failed to send request",c))}})}isConnected(){return this.ws?.readyState===WebSocket.OPEN}getState(){return this.state}async getConfig(t){return this.sendRequest({type:"config:get",pluginName:t})}async setConfig(t,r){return this.sendRequest({type:"config:set",pluginName:t,data:r})}async getSchema(t){return this.sendRequest({type:"schema:get",pluginName:t})}async getAllConfigs(){return this.sendRequest({type:"config:get-all"})}async getAllSchemas(){return this.sendRequest({type:"schema:get-all"})}async getConfigYaml(){return this.sendRequest({type:"config:get-yaml"})}async saveConfigYaml(t){return this.sendRequest({type:"config:save-yaml",yaml:t})}async getEnvList(){return this.sendRequest({type:"env:list"})}async getEnvFile(t){return this.sendRequest({type:"env:get",filename:t})}async saveEnvFile(t,r){return this.sendRequest({type:"env:save",filename:t,content:r})}async getFileTree(){return this.sendRequest({type:"files:tree"})}async readFile(t){return this.sendRequest({type:"files:read",filePath:t})}async saveFile(t,r){return this.sendRequest({type:"files:save",filePath:t,content:r})}async getDbInfo(){return this.sendRequest({type:"db:info"})}async getDbTables(){return this.sendRequest({type:"db:tables"})}async dbSelect(t,r,n,o){return this.sendRequest({type:"db:select",table:t,page:r,pageSize:n,where:o})}async dbInsert(t,r){return this.sendRequest({type:"db:insert",table:t,row:r})}async dbUpdate(t,r,n){return this.sendRequest({type:"db:update",table:t,row:r,where:n})}async dbDelete(t,r){return this.sendRequest({type:"db:delete",table:t,where:r})}async dbDropTable(t){return this.sendRequest({type:"db:drop-table",table:t})}async kvGet(t,r){return this.sendRequest({type:"db:kv:get",table:t,key:r})}async kvSet(t,r,n,o){return this.sendRequest({type:"db:kv:set",table:t,key:r,value:n,ttl:o})}async kvDelete(t,r){return this.sendRequest({type:"db:kv:delete",table:t,key:r})}async kvGetEntries(t){return this.sendRequest({type:"db:kv:entries",table:t})}buildWebSocketUrl(t){if(t)return t;const r=window.location.protocol==="https:"?"wss:":"ws:",n=window.location.host;return`${r}//${n}/server`}setState(t){const r=this.state;this.state=t,console.debug(`[WebSocket] State changed: ${r} -> ${t}`)}attachEventHandlers(){this.ws&&(this.ws.onopen=()=>{this.handleConnectionOpen()},this.ws.onmessage=t=>{this.handleMessage(t)},this.ws.onclose=t=>{this.handleConnectionClose(t)},this.ws.onerror=t=>{this.handleConnectionError(new Sr("WebSocket error",t))})}handleConnectionOpen(){this.setState(q.CONNECTED),this.reconnectAttempts=0,A.dispatch(ht(!0)),this.initializeData(),this.callbacks.onConnect?.()}handleMessage(t){try{const r=JSON.parse(t.data);if(r.requestId&&this.pendingRequests.has(r.requestId)){this.handleRequestResponse(r);return}fi.handle(r),this.callbacks.onMessage?.(r)}catch(r){console.error("[WebSocket] Message parsing error:",r)}}handleRequestResponse(t){const{requestId:r}=t,n=this.pendingRequests.get(r);n&&(this.pendingRequests.delete(r),clearTimeout(n.timer),t.error?n.reject(new te(t.error,"SERVER_ERROR")):n.resolve(t.data))}handleConnectionClose(t){this.ws=null,A.dispatch(ht(!1)),this.state!==q.DISCONNECTED&&(this.setState(q.RECONNECTING),this.callbacks.onDisconnect?.(),this.scheduleReconnect())}handleConnectionError(t){this.clearReconnectTimer(),this.setState(q.ERROR),console.error("[WebSocket] Connection error:",t),this.callbacks.onError?.(t)}scheduleReconnect(){if(this.reconnectAttempts>=this.config.maxReconnectAttempts){console.error("[WebSocket] Max reconnect attempts reached"),this.setState(q.ERROR);return}this.reconnectAttempts++;const t=this.config.reconnectInterval*this.reconnectAttempts;console.debug(`[WebSocket] Reconnecting in ${t}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`),this.reconnectTimer=setTimeout(()=>{this.state===q.RECONNECTING&&this.connect()},t)}clearReconnectTimer(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}clearPendingRequests(){for(const[t,{reject:r,timer:n}]of this.pendingRequests)clearTimeout(n),r(new te("Connection closed","CONNECTION_CLOSED"));this.pendingRequests.clear()}async initializeData(){try{const[t,r]=await Promise.all([this.getAllConfigs().catch(n=>(console.warn("[WebSocket] Failed to load configs:",n),{})),this.getAllSchemas().catch(n=>(console.warn("[WebSocket] Failed to load schemas:",n),{}))]);A.dispatch(an(t)),A.dispatch(cn(r))}catch(t){console.error("[WebSocket] Data initialization failed:",t)}}}let re=null;function ce(){return re||(re=new pi,typeof window<"u"&&re.connect()),re}function hi(){re&&(re.disconnect(),re=null)}function Mi(){hi()}function zi(e={}){const{autoConnect:t=!0}=e,r=ce(),n=D(ae),o=D(f=>f.script?.entries||[]),s=D(f=>f.script?.loadedScripts||[]),i=T(()=>{r.connect()},[r]),c=T(()=>{r.disconnect()},[r]),a=T(f=>{r.send(f)},[r]),l=T(async f=>r.sendRequest(f),[r]),d=T(()=>r.isConnected(),[r]),u=T(()=>r.isConnected()?"connected":"disconnected",[r]);return ne(()=>{t&&!n&&i()},[t,n,i]),{connected:n,entries:o,loadedScripts:s,connect:i,disconnect:c,send:a,sendRequest:l,isConnected:d,getState:u,manager:r}}function Di(e,t={}){const{autoLoad:r=!0,autoLoadSchema:n=!0}=t,o=ui(),s=ce(),i=D(y=>Gs(y,e)),c=D(y=>$s(y,e)),a=D(y=>Bs(y,e)),l=D(y=>Vs(y,e)),d=D(ae),u=T(async()=>{o(ze({pluginName:e,loading:!0})),o(ye({pluginName:e,error:null}));try{const y=await s.getConfig(e);return o(on({pluginName:e,config:y})),y}catch(y){console.error("[useConfig] getConfig failed:",y);const S=y instanceof Error?y.message:"Unknown error";throw o(ye({pluginName:e,error:S})),y}finally{o(ze({pluginName:e,loading:!1}))}},[e,s,o]),f=T(async y=>{o(ze({pluginName:e,loading:!0})),o(ye({pluginName:e,error:null}));try{const S=await s.setConfig(e,y);return{reloaded:S?.reloaded,message:S?.message}}catch(S){console.error("[useConfig] setConfig failed:",S);const C=S instanceof Error?S.message:"Unknown error";throw o(ye({pluginName:e,error:C})),S}finally{o(ze({pluginName:e,loading:!1}))}},[e,s,o]),m=T(async()=>{try{const y=await s.getSchema(e);return y&&o(sn({pluginName:e,schema:y})),y}catch(y){throw console.error(`Failed to get schema for plugin ${e}:`,y),y}},[e,s,o]),x=T(async()=>{const y=[];r&&y.push(u()),n&&y.push(m()),await Promise.all(y)},[r,n,u,m]);return ne(()=>{d&&r&&!i&&!a&&u().catch(console.error)},[d,r,i,a,u]),ne(()=>{d&&n&&!c&&m().catch(console.error)},[d,n,c,m]),ie(()=>({config:i,schema:c,loading:a,error:l,connected:d,getConfig:u,setConfig:f,getSchema:m,reload:x}),[i,c,a,l,d,u,f,m,x])}function Ni(){const e=ce(),t=D(Hs),r=D(Ks),n=D(ae),o=T(async()=>{try{const[s,i]=await Promise.all([e.getAllConfigs(),e.getAllSchemas()]);return{configs:s,schemas:i}}catch(s){throw console.error("Failed to refresh all configs:",s),s}},[e]);return ie(()=>({configs:t,schemas:r,connected:n,refreshAll:o}),[t,r,n,o])}function ji(){const e=ce(),t=D(ae),[r,n]=F(""),[o,s]=F([]),[i,c]=F(!1),[a,l]=F(null),d=T(async()=>{c(!0),l(null);try{const f=await e.getConfigYaml();return n(f.yaml),s(f.pluginKeys),f}catch(f){const m=f instanceof Error?f.message:"Unknown error";throw l(m),f}finally{c(!1)}},[e]),u=T(async f=>{c(!0),l(null);try{const m=await e.saveConfigYaml(f);return n(f),m}catch(m){const x=m instanceof Error?m.message:"Unknown error";throw l(x),m}finally{c(!1)}},[e]);return ne(()=>{t&&!r&&!i&&d().catch(()=>{})},[t,r,i,d]),ie(()=>({yaml:r,pluginKeys:o,loading:i,error:a,load:d,save:u}),[r,o,i,a,d,u])}function Fi(){const e=ce(),t=D(ae),[r,n]=F([]),[o,s]=F(!1),[i,c]=F(null),a=T(async()=>{s(!0),c(null);try{const u=await e.getEnvList();return n(u.files),u.files}catch(u){const f=u instanceof Error?u.message:"Unknown error";throw c(f),u}finally{s(!1)}},[e]),l=T(async u=>{try{return(await e.getEnvFile(u)).content}catch(f){const m=f instanceof Error?f.message:"Unknown error";throw c(m),f}},[e]),d=T(async(u,f)=>{s(!0),c(null);try{return await e.saveEnvFile(u,f)}catch(m){const x=m instanceof Error?m.message:"Unknown error";throw c(x),m}finally{s(!1)}},[e]);return ne(()=>{t&&r.length===0&&!o&&a().catch(()=>{})},[t,r.length,o,a]),ie(()=>({files:r,loading:o,error:i,listFiles:a,getFile:l,saveFile:d}),[r,o,i,a,l,d])}function Ui(){const e=ce(),t=D(ae),[r,n]=F([]),[o,s]=F(!1),[i,c]=F(null),a=T(async()=>{s(!0),c(null);try{const u=await e.getFileTree();return n(u.tree),u.tree}catch(u){const f=u instanceof Error?u.message:"Unknown error";throw c(f),u}finally{s(!1)}},[e]),l=T(async u=>{try{return(await e.readFile(u)).content}catch(f){const m=f instanceof Error?f.message:"Unknown error";throw c(m),f}},[e]),d=T(async(u,f)=>{s(!0),c(null);try{return await e.saveFile(u,f)}catch(m){const x=m instanceof Error?m.message:"Unknown error";throw c(x),m}finally{s(!1)}},[e]);return ne(()=>{t&&r.length===0&&!o&&a().catch(()=>{})},[t,r.length,o,a]),ie(()=>({tree:r,loading:o,error:i,loadTree:a,readFile:l,saveFile:d}),[r,o,i,a,l,d])}function Wi(){const e=ce(),t=D(ae),[r,n]=F(null),[o,s]=F([]),[i,c]=F(!1),[a,l]=F(null),d=T(async()=>{c(!0),l(null);try{const p=await e.getDbInfo();return n(p),p}catch(p){const g=p instanceof Error?p.message:"Unknown error";throw l(g),p}finally{c(!1)}},[e]),u=T(async()=>{c(!0),l(null);try{const p=await e.getDbTables();return s(p.tables),p.tables}catch(p){const g=p instanceof Error?p.message:"Unknown error";throw l(g),p}finally{c(!1)}},[e]),f=T(async(p,g,b,h)=>{try{return await e.dbSelect(p,g,b,h)}catch(P){const $=P instanceof Error?P.message:"Unknown error";throw l($),P}},[e]),m=T(async(p,g)=>{try{return await e.dbInsert(p,g)}catch(b){const h=b instanceof Error?b.message:"Unknown error";throw l(h),b}},[e]),x=T(async(p,g,b)=>{try{return await e.dbUpdate(p,g,b)}catch(h){const P=h instanceof Error?h.message:"Unknown error";throw l(P),h}},[e]),y=T(async(p,g)=>{try{return await e.dbDelete(p,g)}catch(b){const h=b instanceof Error?b.message:"Unknown error";throw l(h),b}},[e]),S=T(async p=>{try{const g=await e.dbDropTable(p);return await u(),g}catch(g){const b=g instanceof Error?g.message:"Unknown error";throw l(b),g}},[e,u]),C=T(async(p,g)=>{try{return await e.kvGet(p,g)}catch(b){const h=b instanceof Error?b.message:"Unknown error";throw l(h),b}},[e]),O=T(async(p,g,b,h)=>{try{return await e.kvSet(p,g,b,h)}catch(P){const $=P instanceof Error?P.message:"Unknown error";throw l($),P}},[e]),_=T(async(p,g)=>{try{return await e.kvDelete(p,g)}catch(b){const h=b instanceof Error?b.message:"Unknown error";throw l(h),b}},[e]),k=T(async p=>{try{return await e.kvGetEntries(p)}catch(g){const b=g instanceof Error?g.message:"Unknown error";throw l(b),g}},[e]);return ne(()=>{t&&!r&&!i&&(d().catch(()=>{}),u().catch(()=>{}))},[t,r,i,d,u]),ie(()=>({info:r,tables:o,loading:i,error:a,loadInfo:d,loadTables:u,dropTable:S,select:f,insert:m,update:x,remove:y,kvGet:C,kvSet:O,kvDelete:_,kvEntries:k}),[r,o,i,a,d,u,S,f,m,x,y,C,O,_,k])}function qi(...e){return oo(gn(e))}export{Sr as ConnectionError,q as ConnectionState,Ii as DynamicRouter,$i as Link,kr as MessageError,fi as MessageHandler,Bi as Outlet,di as RequestTimeoutError,te as WebSocketError,pi as WebSocketManager,Fs as addEntry,Ci as addPage,Ei as addReducer,As as addRoute,_i as clearConfigs,Ai as clearPages,zs as clearRoutes,qi as cn,hi as destroyWebSocketManager,Ti as getAllPages,Pi as getPage,ce as getWebSocketManager,Lt as loadScript,en as loadScripts,xi as persistor,ki as removeConfig,Us as removeEntry,Ri as removePage,Is as removeRoute,Mi as resetWebSocketManager,Hs as selectAllConfigs,Ks as selectAllSchemas,Gs as selectConfig,ae as selectConfigConnected,Vs as selectConfigError,Bs as selectConfigLoading,$s as selectSchema,vi as setActiveMenu,ht as setConnected,ye as setError,ze as setLoading,Si as setRoutes,wi as setSidebarOpen,A as store,js as syncEntries,bi as toggleSidebar,tn as unloadScript,on as updateConfig,an as updateConfigs,Oi as updatePage,Ms as updateRoute,sn as updateSchema,cn as updateSchemas,Ni as useAllConfigs,Di as useConfig,ji as useConfigYaml,Wi as useDatabase,ui as useDispatch,Fi as useEnvFiles,Ui as useFiles,Vi as useNavigate,Hi as useOutlet,Ki as useParams,D as useSelector,zi as useWebSocket};
package/dist/index.html CHANGED
@@ -5,6 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Zhin</title>
7
7
  <script src="https://cdn.jsdelivr.net.cn/npm/@tailwindcss/browser@4"></script>
8
+ <script src="https://cdn.jsdelivr.net.cn/npm/@highlightjs/cdn-assets@11/highlight.min.js"></script>
8
9
 
9
10
  <script type="importmap">
10
11
  {