diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Config-f974d420.js b/FILES/etc/config/clash/clash-dashboard/assets/Config-df73f8b7.js similarity index 89% rename from FILES/etc/config/clash/clash-dashboard/assets/Config-f974d420.js rename to FILES/etc/config/clash/clash-dashboard/assets/Config-df73f8b7.js index dcb54a6..6e5a92c 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Config-f974d420.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Config-df73f8b7.js @@ -1 +1 @@ -import{j as e,s as P,e as v,c as U,h as D,i as S,k as w,l as V,b as N,n as z,g as L,o as F,q as G,t as j,v as q,w as H,u as J,C as W,x as K,y as Q,z as X}from"./index-c925a4cb.js";import{r as Y}from"./logs-8c8b4d84.js";import{S as C,T as I}from"./Select-1e3e2920.js";const{useState:Z,useRef:ee,useEffect:te,useCallback:se}=v;function ne({value:t,...n}){const[o,c]=Z(t),a=ee(t);te(()=>{a.current!==t&&c(t),a.current=t},[t]);const r=se(u=>c(u.target.value),[c]);return e.jsx("input",{className:P.input,value:o,onChange:r,...n})}const ae="_root_1s1gc_1",le="_section_1s1gc_2",oe="_item_1s1gc_14",ce="_sep_1s1gc_34",re="_label_1s1gc_47",d={root:ae,section:le,item:oe,sep:ce,label:re},ie="_fieldset_1ghjp_1",de="_input_1ghjp_9",ue="_cnt_1ghjp_9",_={fieldset:ie,input:de,cnt:ue};function ge({OptionComponent:t,optionPropsList:n,selectedIndex:o,onChange:c}){const a=U("visually-hidden",_.input),r=u=>{c(u.target.value)};return e.jsx("fieldset",{className:_.fieldset,children:n.map((u,p)=>e.jsxs("label",{children:[e.jsx("input",{type:"radio",checked:o===p,name:"selection",value:p,"aria-labelledby":"traffic chart type "+p,onChange:r,className:a}),e.jsx("div",{className:_.cnt,children:e.jsx(t,{...u})})]},p))})}const{useMemo:pe}=v,he={plugins:{legend:{display:!1}},scales:{x:{display:!1,type:"category"},y:{display:!1,type:"linear"}}},T=[23e3,35e3,46e3,33e3,9e4,68e3,23e3,45e3],me=[184e3,183e3,196e3,182e3,19e4,186e3,182e3,189e3],fe=T;function xe({id:t}){const n=D.read(),o=pe(()=>({labels:fe,datasets:[{...S,...w[t].up,data:T},{...S,...w[t].down,data:me}]}),[t]),c="chart-"+t;return V(n.Chart,c,o,null,he),e.jsx("div",{style:{width:100,padding:5},children:e.jsx("canvas",{id:c})})}const{useEffect:R,useState:je,useCallback:h,useRef:Ce,useMemo:_e}=v,ve=[{id:0},{id:1},{id:2},{id:3}],be=[["debug","Debug"],["info","Info"],["warning","Warning"],["error","Error"],["silent","Silent"]],ye=[["zh","中文"],["en","English"]],ke=[["Global","Global"],["Rule","Rule"],["Direct","Direct"]],Se=t=>({configs:z(t),apiConfig:L(t)}),we=t=>({selectedChartStyleIndex:Q(t),latencyTestUrl:X(t),apiConfig:L(t)}),Ie=N(we)(Le),Ee=N(Se)(Ne);function Ne({dispatch:t,configs:n,apiConfig:o}){return R(()=>{t(F(o))},[t,o]),e.jsx(Ie,{configs:n})}function Le({dispatch:t,configs:n,selectedChartStyleIndex:o,latencyTestUrl:c,apiConfig:a}){const[r,u]=je(n),p=Ce(n);R(()=>{p.current!==n&&u(n),p.current=n},[n]),h(()=>{t(G("apiConfig"))},[t]);const m=h((s,l)=>{u({...r,[s]:l})},[r]),$=h(s=>{const l="allow-lan",i=s;m(l,i),t(j(a,{"allow-lan":i}))},[a,t,m]),f=h(({name:s,value:l})=>{switch(s){case"mode":case"log-level":m(s,l),t(j(a,{[s]:l})),s==="log-level"&&Y({...a,logLevel:l});break;case"redir-port":case"socks-port":case"mixed-port":case"port":if(l!==""){const i=parseInt(l,10);if(i<0||i>65535)return}m(s,l);break;default:return}},[a,t,m]);h(s=>f(s.target),[f]);const{selectChartStyleIndex:E,updateAppConfig:b}=q(),M=h(s=>{const l=s.target,{name:i,value:k}=l;switch(i){case"port":case"socks-port":case"mixed-port":case"redir-port":{const x=parseInt(k,10);if(x<0||x>65535)return;t(j(a,{[i]:x}));break}case"latencyTestUrl":{b(i,k);break}default:throw new Error(`unknown input name ${i}`)}},[a,t,b]),O=_e(()=>{const s=r.mode;return typeof s=="string"&&s[0].toUpperCase()+s.slice(1)},[r.mode]),[A,B]=H(K),{t:g,i18n:y}=J();return e.jsxs("div",{children:[e.jsx(W,{title:g("Config")}),e.jsxs("div",{className:d.root,children:[e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("Mode")}),e.jsx(C,{options:ke,selected:O,onChange:s=>f({name:"mode",value:s.target.value})})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("LogLevel")}),e.jsx(C,{options:be,selected:r["log-level"],onChange:s=>f({name:"log-level",value:s.target.value})})]}),e.jsxs("div",{className:d.item,children:[e.jsx(I,{id:"config-allow-lan",checked:r["allow-lan"],onChange:$}),e.jsx("label",{htmlFor:"config-allow-lan",children:g("allow_lan_mixed")})]})]}),e.jsx("div",{className:d.sep,children:e.jsx("div",{})}),e.jsxs("div",{className:d.section,children:[e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("latency_test_url")}),e.jsx(ne,{name:"latencyTestUrl",type:"text",value:c,onBlur:M})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("lang")}),e.jsx("div",{children:e.jsx(C,{options:ye,selected:y.language,onChange:s=>y.changeLanguage(s.target.value)})})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("chart_style")}),e.jsx(ge,{OptionComponent:xe,optionPropsList:ve,selectedIndex:o,onChange:E})]}),e.jsxs("div",{className:d.item,children:[e.jsx(I,{id:"dark-mode-pure-black-toggle",checked:A,onChange:B}),e.jsx("label",{htmlFor:"dark-mode-pure-black-toggle",children:g("dark_mode_pure_black_toggle_label")})]})]})]})}export{Ee as default}; +import{j as e,s as P,e as v,c as U,h as D,i as S,k as w,l as V,b as N,m as F,g as L,n as G,o as q,q as j,t as z,v as H,u as J,C as W,w as K,x as Q,y as X}from"./index-2d443e7c.js";import{r as Y}from"./logs-293a1f45.js";import{S as C,T as I}from"./Select-4003d0aa.js";const{useState:Z,useRef:ee,useEffect:te,useCallback:se}=v;function ne({value:t,...n}){const[o,c]=Z(t),a=ee(t);te(()=>{a.current!==t&&c(t),a.current=t},[t]);const r=se(u=>c(u.target.value),[c]);return e.jsx("input",{className:P.input,value:o,onChange:r,...n})}const ae="_root_1s1gc_1",le="_section_1s1gc_2",oe="_item_1s1gc_14",ce="_sep_1s1gc_34",re="_label_1s1gc_47",d={root:ae,section:le,item:oe,sep:ce,label:re},ie="_fieldset_1ghjp_1",de="_input_1ghjp_9",ue="_cnt_1ghjp_9",_={fieldset:ie,input:de,cnt:ue};function ge({OptionComponent:t,optionPropsList:n,selectedIndex:o,onChange:c}){const a=U("visually-hidden",_.input),r=u=>{c(u.target.value)};return e.jsx("fieldset",{className:_.fieldset,children:n.map((u,p)=>e.jsxs("label",{children:[e.jsx("input",{type:"radio",checked:o===p,name:"selection",value:p,"aria-labelledby":"traffic chart type "+p,onChange:r,className:a}),e.jsx("div",{className:_.cnt,children:e.jsx(t,{...u})})]},p))})}const{useMemo:pe}=v,he={plugins:{legend:{display:!1}},scales:{x:{display:!1,type:"category"},y:{display:!1,type:"linear"}}},T=[23e3,35e3,46e3,33e3,9e4,68e3,23e3,45e3],me=[184e3,183e3,196e3,182e3,19e4,186e3,182e3,189e3],fe=T;function xe({id:t}){const n=D.read(),o=pe(()=>({labels:fe,datasets:[{...S,...w[t].up,data:T},{...S,...w[t].down,data:me}]}),[t]),c="chart-"+t;return V(n.Chart,c,o,null,he),e.jsx("div",{style:{width:100,padding:5},children:e.jsx("canvas",{id:c})})}const{useEffect:R,useState:je,useCallback:h,useRef:Ce,useMemo:_e}=v,ve=[{id:0},{id:1},{id:2},{id:3}],be=[["debug","Debug"],["info","Info"],["warning","Warning"],["error","Error"],["silent","Silent"]],ye=[["zh","中文"],["en","English"]],ke=[["Global","Global"],["Rule","Rule"],["Direct","Direct"]],Se=t=>({configs:F(t),apiConfig:L(t)}),we=t=>({selectedChartStyleIndex:Q(t),latencyTestUrl:X(t),apiConfig:L(t)}),Ie=N(we)(Le),Ee=N(Se)(Ne);function Ne({dispatch:t,configs:n,apiConfig:o}){return R(()=>{t(G(o))},[t,o]),e.jsx(Ie,{configs:n})}function Le({dispatch:t,configs:n,selectedChartStyleIndex:o,latencyTestUrl:c,apiConfig:a}){const[r,u]=je(n),p=Ce(n);R(()=>{p.current!==n&&u(n),p.current=n},[n]),h(()=>{t(q("apiConfig"))},[t]);const m=h((s,l)=>{u({...r,[s]:l})},[r]),$=h(s=>{const l="allow-lan",i=s;m(l,i),t(j(a,{"allow-lan":i}))},[a,t,m]),f=h(({name:s,value:l})=>{switch(s){case"mode":case"log-level":m(s,l),t(j(a,{[s]:l})),s==="log-level"&&Y({...a,logLevel:l});break;case"redir-port":case"socks-port":case"mixed-port":case"port":if(l!==""){const i=parseInt(l,10);if(i<0||i>65535)return}m(s,l);break;default:return}},[a,t,m]);h(s=>f(s.target),[f]);const{selectChartStyleIndex:E,updateAppConfig:b}=z(),M=h(s=>{const l=s.target,{name:i,value:k}=l;switch(i){case"port":case"socks-port":case"mixed-port":case"redir-port":{const x=parseInt(k,10);if(x<0||x>65535)return;t(j(a,{[i]:x}));break}case"latencyTestUrl":{b(i,k);break}default:throw new Error(`unknown input name ${i}`)}},[a,t,b]),O=_e(()=>{const s=r.mode;return typeof s=="string"&&s[0].toUpperCase()+s.slice(1)},[r.mode]),[A,B]=H(K),{t:g,i18n:y}=J();return e.jsxs("div",{children:[e.jsx(W,{title:g("Config")}),e.jsxs("div",{className:d.root,children:[e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("Mode")}),e.jsx(C,{options:ke,selected:O,onChange:s=>f({name:"mode",value:s.target.value})})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("LogLevel")}),e.jsx(C,{options:be,selected:r["log-level"],onChange:s=>f({name:"log-level",value:s.target.value})})]}),e.jsxs("div",{className:d.item,children:[e.jsx(I,{id:"config-allow-lan",checked:r["allow-lan"],onChange:$}),e.jsx("label",{htmlFor:"config-allow-lan",children:g("allow_lan_mixed")})]})]}),e.jsx("div",{className:d.sep,children:e.jsx("div",{})}),e.jsxs("div",{className:d.section,children:[e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("latency_test_url")}),e.jsx(ne,{name:"latencyTestUrl",type:"text",value:c,onBlur:M})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("lang")}),e.jsx("div",{children:e.jsx(C,{options:ye,selected:y.language,onChange:s=>y.changeLanguage(s.target.value)})})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("chart_style")}),e.jsx(ge,{OptionComponent:xe,optionPropsList:ve,selectedIndex:o,onChange:E})]}),e.jsxs("div",{className:d.item,children:[e.jsx(I,{id:"dark-mode-pure-black-toggle",checked:A,onChange:B}),e.jsx("label",{htmlFor:"dark-mode-pure-black-toggle",children:g("dark_mode_pure_black_toggle_label")})]})]})]})}export{Ee as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Connections-91974c4c.js b/FILES/etc/config/clash/clash-dashboard/assets/Connections-91974c4c.js deleted file mode 100644 index a40aaff..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Connections-91974c4c.js +++ /dev/null @@ -1,22 +0,0 @@ -import{r as y,R as b,c as z,p as J,M as et,j as S,m as je,a as vt,B as Ne,b as ht,d as Rt,f as wt,u as _t,C as $t,I as yt,g as xt,S as Ft}from"./index-c925a4cb.js";import{u as Pt}from"./useRemainingViewPortHeight-1aa045aa.js";import{f as At}from"./index-778e0b6c.js";import{C as Mt}from"./chevron-down-6e2632b9.js";import{F as It,p as Vt,A as bt}from"./Fab-4f386fe2.js";import{P as Et,a as Dt}from"./play-512d0bd5.js";function Pe(e){return n=>!!n.type&&n.type.tabsRole===e}const ue=Pe("Tab"),Ae=Pe("TabList"),Me=Pe("TabPanel");function Ht(e){return ue(e)||Ae(e)||Me(e)}function we(e,n){return y.Children.map(e,t=>t===null?null:Ht(t)?n(t):t.props&&t.props.children&&typeof t.props.children=="object"?y.cloneElement(t,{...t.props,children:we(t.props.children,n)}):t)}function tt(e,n){return y.Children.forEach(e,t=>{t!==null&&(ue(t)||Me(t)?n(t):t.props&&t.props.children&&typeof t.props.children=="object"&&(Ae(t)&&n(t),tt(t.props.children,n)))})}function nt(e){let n=0;return tt(e,t=>{ue(t)&&n++}),n}function ot(e){return e&&"getAttribute"in e}function Be(e){return ot(e)&&e.getAttribute("data-rttab")}function q(e){return ot(e)&&e.getAttribute("aria-disabled")==="true"}let re;function Lt(e){const n=e||(typeof window<"u"?window:void 0);try{re=!!(typeof n<"u"&&n.document&&n.document.activeElement)}catch{re=!1}}const Gt={className:"react-tabs",focus:!1},rt=e=>{let n=y.useRef([]),t=y.useRef([]);const o=y.useRef();function r(C,R){if(C<0||C>=d())return;const{onSelect:F,selectedIndex:U}=e;F(C,U,R)}function l(C){const R=d();for(let F=C+1;FC;)if(!q(u(R)))return R;return C}function s(){const C=d();for(let R=0;R{let de=B;if(Ae(B)){let O=0,Oe=!1;re==null&&Lt(Ge);const Te=Ge||(typeof window<"u"?window:void 0);re&&Te&&(Oe=b.Children.toArray(B.props.children).filter(ue).some((ke,ge)=>Te.document.activeElement===u(ge))),de=y.cloneElement(B,{children:we(B.props.children,ke=>{const ge=`tabs-${O}`,ze=E===O,ce={tabRef:St=>{n.current[ge]=St},id:t.current[O],selected:ze,focus:ze&&(U||Oe)};return D&&(ce.selectedClassName=D),F&&(ce.disabledClassName=F),O++,y.cloneElement(ke,ce)})})}else if(Me(B)){const O={id:t.current[C],selected:E===C};A&&(O.forceRender=A),Le&&(O.selectedClassName=Le),C++,de=y.cloneElement(B,O)}return de})}function f(C){const{direction:R,disableUpDownKeys:F,disableLeftRightKeys:U}=e;if(m(C.target)){let{selectedIndex:A}=e,E=!1,D=!1;(C.code==="Space"||C.keyCode===32||C.code==="Enter"||C.keyCode===13)&&(E=!0,D=!1,c(C)),!U&&(C.keyCode===37||C.code==="ArrowLeft")||!F&&(C.keyCode===38||C.code==="ArrowUp")?(R==="rtl"?A=l(A):A=i(A),E=!0,D=!0):!U&&(C.keyCode===39||C.code==="ArrowRight")||!F&&(C.keyCode===40||C.code==="ArrowDown")?(R==="rtl"?A=i(A):A=l(A),E=!0,D=!0):C.keyCode===35||C.code==="End"?(A=a(),E=!0,D=!0):(C.keyCode===36||C.code==="Home")&&(A=s(),E=!0,D=!0),E&&C.preventDefault(),D&&r(A,C)}}function c(C){let R=C.target;do if(m(R)){if(q(R))return;const F=[].slice.call(R.parentNode.children).filter(Be).indexOf(R);r(F,C);return}while((R=R.parentNode)!=null)}function m(C){if(!Be(C))return!1;let R=C.parentElement;do{if(R===o.current)return!0;if(R.getAttribute("data-rttabs"))break;R=R.parentElement}while(R);return!1}const{children:p,className:h,disabledTabClassName:w,domRef:P,focus:_,forceRenderTabPanel:$,onSelect:x,selectedIndex:I,selectedTabClassName:L,selectedTabPanelClassName:K,environment:He,disableUpDownKeys:N,disableLeftRightKeys:ae,...G}={...Gt,...e};return b.createElement("div",Object.assign({},G,{className:z(h),onClick:c,onKeyDown:f,ref:C=>{o.current=C,P&&P(C)},"data-rttabs":!0}),g())};rt.propTypes={};const Ot=0,oe=1,Tt={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},kt=e=>e.selectedIndex===null?oe:Ot,Ie=e=>{const{children:n,defaultFocus:t,defaultIndex:o,focusTabOnClick:r,onSelect:l,...i}={...Tt,...e},[s,a]=y.useState(t),[d]=y.useState(kt(i)),[u,g]=y.useState(d===oe?o||0:null);if(y.useEffect(()=>{a(!1)},[]),d===oe){const m=nt(n);y.useEffect(()=>{if(u!=null){const p=Math.max(0,m-1);g(Math.min(u,p))}},[m])}const f=(m,p,h)=>{typeof l=="function"&&l(m,p,h)===!1||(r&&a(!0),d===oe&&g(m))};let c={...e,...i};return c.focus=s,c.onSelect=f,u!=null&&(c.selectedIndex=u),delete c.defaultFocus,delete c.defaultIndex,delete c.focusTabOnClick,b.createElement(rt,c,n)};Ie.propTypes={};Ie.tabsRole="Tabs";const zt={className:"react-tabs__tab-list"},Ve=e=>{const{children:n,className:t,...o}={...zt,...e};return b.createElement("ul",Object.assign({},o,{className:z(t),role:"tablist"}),n)};Ve.tabsRole="TabList";Ve.propTypes={};const fe="react-tabs__tab",jt={className:fe,disabledClassName:`${fe}--disabled`,focus:!1,id:null,selected:!1,selectedClassName:`${fe}--selected`},le=e=>{let n=y.useRef();const{children:t,className:o,disabled:r,disabledClassName:l,focus:i,id:s,selected:a,selectedClassName:d,tabIndex:u,tabRef:g,...f}={...jt,...e};return y.useEffect(()=>{a&&i&&n.current.focus()},[a,i]),b.createElement("li",Object.assign({},f,{className:z(o,{[d]:a,[l]:r}),ref:c=>{n.current=c,g&&g(c)},role:"tab",id:`tab${s}`,"aria-selected":a?"true":"false","aria-disabled":r?"true":"false","aria-controls":`panel${s}`,tabIndex:u||(a?"0":null),"data-rttab":!0}),t)};le.propTypes={};le.tabsRole="Tab";const qe="react-tabs__tab-panel",Nt={className:qe,forceRender:!1,selectedClassName:`${qe}--selected`},ie=e=>{const{children:n,className:t,forceRender:o,id:r,selected:l,selectedClassName:i,...s}={...Nt,...e};return b.createElement("div",Object.assign({},s,{className:z(t,{[i]:l}),role:"tabpanel",id:`panel${r}`,"aria-labelledby":`tab${r}`}),o||l?n:null)};ie.tabsRole="TabPanel";ie.propTypes={};const Bt="_placeHolder_1mf9d_1",qt="_connQty_1mf9d_10",Ut="_inputWrapper_1mf9d_22",Kt="_input_1mf9d_22",Y={placeHolder:Bt,connQty:qt,inputWrapper:Ut,input:Kt};/** - * table-core - * - * Copyright (c) TanStack - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function k(e,n){return typeof e=="function"?e(n):e}function M(e,n){return t=>{n.setState(o=>({...o,[e]:k(t,o[e])}))}}function se(e){return e instanceof Function}function Wt(e){return Array.isArray(e)&&e.every(n=>typeof n=="number")}function Xt(e,n){const t=[],o=r=>{r.forEach(l=>{t.push(l);const i=n(l);i!=null&&i.length&&o(i)})};return o(e),t}function v(e,n,t){let o=[],r;return()=>{let l;t.key&&t.debug&&(l=Date.now());const i=e();if(!(i.length!==o.length||i.some((d,u)=>o[u]!==d)))return r;o=i;let a;if(t.key&&t.debug&&(a=Date.now()),r=n(...i),t==null||t.onChange==null||t.onChange(r),t.key&&t.debug&&t!=null&&t.debug()){const d=Math.round((Date.now()-l)*100)/100,u=Math.round((Date.now()-a)*100)/100,g=u/16,f=(c,m)=>{for(c=String(c);c.length{let c=f;for(const p of a.split(".")){var m;c=(m=c)==null?void 0:m[p]}return c}:u=f=>f[s.accessorKey]),!d)throw new Error;let g={id:`${String(d)}`,accessorFn:u,parent:o,depth:t,columnDef:s,columns:[],getFlatColumns:v(()=>[!0],()=>{var f;return[g,...(f=g.columns)==null?void 0:f.flatMap(c=>c.getFlatColumns())]},{key:"column.getFlatColumns",debug:()=>{var f;return(f=e.options.debugAll)!=null?f:e.options.debugColumns}}),getLeafColumns:v(()=>[e._getOrderColumnsFn()],f=>{var c;if((c=g.columns)!=null&&c.length){let m=g.columns.flatMap(p=>p.getLeafColumns());return f(m)}return[g]},{key:"column.getLeafColumns",debug:()=>{var f;return(f=e.options.debugAll)!=null?f:e.options.debugColumns}})};for(const f of e._features)f.createColumn==null||f.createColumn(g,e);return g}function Ue(e,n,t){var o;let l={id:(o=t.id)!=null?o:n.id,column:n,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],s=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(s),i.push(a)};return s(l),i},getContext:()=>({table:e,header:l,column:n})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(l,e)}),l}const Yt={createTable:e=>{e.getHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o,r)=>{var l,i;const s=(l=o==null?void 0:o.map(g=>t.find(f=>f.id===g)).filter(Boolean))!=null?l:[],a=(i=r==null?void 0:r.map(g=>t.find(f=>f.id===g)).filter(Boolean))!=null?i:[],d=t.filter(g=>!(o!=null&&o.includes(g.id))&&!(r!=null&&r.includes(g.id)));return Z(n,[...s,...d,...a],e)},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getCenterHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o,r)=>(t=t.filter(l=>!(o!=null&&o.includes(l.id))&&!(r!=null&&r.includes(l.id))),Z(n,t,e,"center")),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeftHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(n,t,o)=>{var r;const l=(r=o==null?void 0:o.map(i=>t.find(s=>s.id===i)).filter(Boolean))!=null?r:[];return Z(n,l,e,"left")},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getRightHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(n,t,o)=>{var r;const l=(r=o==null?void 0:o.map(i=>t.find(s=>s.id===i)).filter(Boolean))!=null?r:[];return Z(n,l,e,"right")},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getFooterGroups=v(()=>[e.getHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeftFooterGroups=v(()=>[e.getLeftHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getCenterFooterGroups=v(()=>[e.getCenterHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getRightFooterGroups=v(()=>[e.getRightHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getFlatHeaders=v(()=>[e.getHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeftFlatHeaders=v(()=>[e.getLeftHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getCenterFlatHeaders=v(()=>[e.getCenterHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getRightFlatHeaders=v(()=>[e.getRightHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getCenterLeafHeaders=v(()=>[e.getCenterFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeftLeafHeaders=v(()=>[e.getLeftFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getRightLeafHeaders=v(()=>[e.getRightFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeafHeaders=v(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(n,t,o)=>{var r,l,i,s,a,d;return[...(r=(l=n[0])==null?void 0:l.headers)!=null?r:[],...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(a=(d=o[0])==null?void 0:d.headers)!=null?a:[]].map(u=>u.getLeafHeaders()).flat()},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}})}};function Z(e,n,t,o){var r,l;let i=0;const s=function(f,c){c===void 0&&(c=1),i=Math.max(i,c),f.filter(m=>m.getIsVisible()).forEach(m=>{var p;(p=m.columns)!=null&&p.length&&s(m.columns,c+1)},0)};s(e);let a=[];const d=(f,c)=>{const m={depth:c,id:[o,`${c}`].filter(Boolean).join("_"),headers:[]},p=[];f.forEach(h=>{const w=[...p].reverse()[0],P=h.column.depth===m.depth;let _,$=!1;if(P&&h.column.parent?_=h.column.parent:(_=h.column,$=!0),w&&(w==null?void 0:w.column)===_)w.subHeaders.push(h);else{const x=Ue(t,_,{id:[o,c,_.id,h==null?void 0:h.id].filter(Boolean).join("_"),isPlaceholder:$,placeholderId:$?`${p.filter(I=>I.column===_).length}`:void 0,depth:c,index:p.length});x.subHeaders.push(h),p.push(x)}m.headers.push(h),h.headerGroup=m}),a.push(m),c>0&&d(p,c-1)},u=n.map((f,c)=>Ue(t,f,{depth:i,index:c}));d(u,i-1),a.reverse();const g=f=>f.filter(m=>m.column.getIsVisible()).map(m=>{let p=0,h=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],g(m.subHeaders).forEach(_=>{let{colSpan:$,rowSpan:x}=_;p+=$,w.push(x)})):p=1;const P=Math.min(...w);return h=h+P,m.colSpan=p,m.rowSpan=h,{colSpan:p,rowSpan:h}});return g((r=(l=a[0])==null?void 0:l.headers)!=null?r:[]),a}const ee={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},pe=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Jt={getDefaultColumnDef:()=>ee,getInitialState:e=>({columnSizing:{},columnSizingInfo:pe(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:M("columnSizing",e),onColumnSizingInfoChange:M("columnSizingInfo",e)}),createColumn:(e,n)=>{e.getSize=()=>{var t,o,r;const l=n.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:ee.minSize,(o=l??e.columnDef.size)!=null?o:ee.size),(r=e.columnDef.maxSize)!=null?r:ee.maxSize)},e.getStart=t=>{const o=t?t==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns(),r=o.findIndex(l=>l.id===e.id);if(r>0){const l=o[r-1];return l.getStart(t)+l.getSize()}return 0},e.resetSize=()=>{n.setColumnSizing(t=>{let{[e.id]:o,...r}=t;return r})},e.getCanResize=()=>{var t,o;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((o=n.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>n.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,n)=>{e.getSize=()=>{let t=0;const o=r=>{if(r.subHeaders.length)r.subHeaders.forEach(o);else{var l;t+=(l=r.column.getSize())!=null?l:0}};return o(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=()=>{const t=n.getColumn(e.column.id),o=t==null?void 0:t.getCanResize();return r=>{if(!t||!o||(r.persist==null||r.persist(),me(r)&&r.touches&&r.touches.length>1))return;const l=e.getSize(),i=e?e.getLeafHeaders().map(p=>[p.column.id,p.column.getSize()]):[[t.id,t.getSize()]],s=me(r)?Math.round(r.touches[0].clientX):r.clientX,a={},d=(p,h)=>{typeof h=="number"&&(n.setColumnSizingInfo(w=>{var P,_;const $=h-((P=w==null?void 0:w.startOffset)!=null?P:0),x=Math.max($/((_=w==null?void 0:w.startSize)!=null?_:0),-.999999);return w.columnSizingStart.forEach(I=>{let[L,K]=I;a[L]=Math.round(Math.max(K+K*x,0)*100)/100}),{...w,deltaOffset:$,deltaPercentage:x}}),(n.options.columnResizeMode==="onChange"||p==="end")&&n.setColumnSizing(w=>({...w,...a})))},u=p=>d("move",p),g=p=>{d("end",p),n.setColumnSizingInfo(h=>({...h,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f={moveHandler:p=>u(p.clientX),upHandler:p=>{document.removeEventListener("mousemove",f.moveHandler),document.removeEventListener("mouseup",f.upHandler),g(p.clientX)}},c={moveHandler:p=>(p.cancelable&&(p.preventDefault(),p.stopPropagation()),u(p.touches[0].clientX),!1),upHandler:p=>{var h;document.removeEventListener("touchmove",c.moveHandler),document.removeEventListener("touchend",c.upHandler),p.cancelable&&(p.preventDefault(),p.stopPropagation()),g((h=p.touches[0])==null?void 0:h.clientX)}},m=Zt()?{passive:!1}:!1;me(r)?(document.addEventListener("touchmove",c.moveHandler,m),document.addEventListener("touchend",c.upHandler,m)):(document.addEventListener("mousemove",f.moveHandler,m),document.addEventListener("mouseup",f.upHandler,m)),n.setColumnSizingInfo(p=>({...p,startOffset:s,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,isResizingColumn:t.id}))}}},createTable:e=>{e.setColumnSizing=n=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(n),e.setColumnSizingInfo=n=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(n),e.resetColumnSizing=n=>{var t;e.setColumnSizing(n?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=n=>{var t;e.setColumnSizingInfo(n?pe():(t=e.initialState.columnSizingInfo)!=null?t:pe())},e.getTotalSize=()=>{var n,t;return(n=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0},e.getLeftTotalSize=()=>{var n,t;return(n=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0},e.getCenterTotalSize=()=>{var n,t;return(n=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0},e.getRightTotalSize=()=>{var n,t;return(n=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0}}};let te=null;function Zt(){if(typeof te=="boolean")return te;let e=!1;try{const n={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,n),window.removeEventListener("test",t)}catch{e=!1}return te=e,te}function me(e){return e.type==="touchstart"}const en={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:M("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let n=!1,t=!1;e._autoResetExpanded=()=>{var o,r;if(!n){e._queue(()=>{n=!0});return}if((o=(r=e.options.autoResetAll)!=null?r:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var r,l;e.setExpanded(o?{}:(r=(l=e.initialState)==null?void 0:l.expanded)!=null?r:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{const o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(r=>!r.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(l=>{const i=l.split(".");o=Math.max(o,i.length)}),o},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,n)=>{e.toggleExpanded=t=>{n.setExpanded(o=>{var r;const l=o===!0?!0:!!(o!=null&&o[e.id]);let i={};if(o===!0?Object.keys(n.getRowModel().rowsById).forEach(s=>{i[s]=!0}):i=o,t=(r=t)!=null?r:!l,!l&&t)return{...i,[e.id]:!0};if(l&&!t){const{[e.id]:s,...a}=i;return a}return o})},e.getIsExpanded=()=>{var t;const o=n.getState().expanded;return!!((t=n.options.getIsRowExpanded==null?void 0:n.options.getIsRowExpanded(e))!=null?t:o===!0||o!=null&&o[e.id])},e.getCanExpand=()=>{var t,o,r;return(t=n.options.getRowCanExpand==null?void 0:n.options.getRowCanExpand(e))!=null?t:((o=n.options.enableExpanding)!=null?o:!0)&&!!((r=e.subRows)!=null&&r.length)},e.getIsAllParentsExpanded=()=>{let t=!0,o=e;for(;t&&o.parentId;)o=n.getRow(o.parentId,!0),t=o.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},lt=(e,n,t)=>{var o;const r=t.toLowerCase();return!!(!((o=e.getValue(n))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(r))};lt.autoRemove=e=>V(e);const it=(e,n,t)=>{var o;return!!(!((o=e.getValue(n))==null||(o=o.toString())==null)&&o.includes(t))};it.autoRemove=e=>V(e);const st=(e,n,t)=>{var o;return((o=e.getValue(n))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(t==null?void 0:t.toLowerCase())};st.autoRemove=e=>V(e);const ut=(e,n,t)=>{var o;return(o=e.getValue(n))==null?void 0:o.includes(t)};ut.autoRemove=e=>V(e)||!(e!=null&&e.length);const at=(e,n,t)=>!t.some(o=>{var r;return!((r=e.getValue(n))!=null&&r.includes(o))});at.autoRemove=e=>V(e)||!(e!=null&&e.length);const dt=(e,n,t)=>t.some(o=>{var r;return(r=e.getValue(n))==null?void 0:r.includes(o)});dt.autoRemove=e=>V(e)||!(e!=null&&e.length);const gt=(e,n,t)=>e.getValue(n)===t;gt.autoRemove=e=>V(e);const ct=(e,n,t)=>e.getValue(n)==t;ct.autoRemove=e=>V(e);const be=(e,n,t)=>{let[o,r]=t;const l=e.getValue(n);return l>=o&&l<=r};be.resolveFilterValue=e=>{let[n,t]=e,o=typeof n!="number"?parseFloat(n):n,r=typeof t!="number"?parseFloat(t):t,l=n===null||Number.isNaN(o)?-1/0:o,i=t===null||Number.isNaN(r)?1/0:r;if(l>i){const s=l;l=i,i=s}return[l,i]};be.autoRemove=e=>V(e)||V(e[0])&&V(e[1]);const H={includesString:lt,includesStringSensitive:it,equalsString:st,arrIncludes:ut,arrIncludesAll:at,arrIncludesSome:dt,equals:gt,weakEquals:ct,inNumberRange:be};function V(e){return e==null||e===""}const tn={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:M("columnFilters",e),onGlobalFilterChange:M("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:n=>{var t;const o=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[n.id])==null?void 0:t.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,n)=>{e.getAutoFilterFn=()=>{const t=n.getCoreRowModel().flatRows[0],o=t==null?void 0:t.getValue(e.id);return typeof o=="string"?H.includesString:typeof o=="number"?H.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?H.equals:Array.isArray(o)?H.arrIncludes:H.weakEquals},e.getFilterFn=()=>{var t,o;return se(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(o=n.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?t:H[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,o,r;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((o=n.options.enableColumnFilters)!=null?o:!0)&&((r=n.options.enableFilters)!=null?r:!0)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var t,o,r,l;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((o=n.options.enableGlobalFilter)!=null?o:!0)&&((r=n.options.enableFilters)!=null?r:!0)&&((l=n.options.getColumnCanGlobalFilter==null?void 0:n.options.getColumnCanGlobalFilter(e))!=null?l:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=n.getState().columnFilters)==null||(t=t.find(o=>o.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,o;return(t=(o=n.getState().columnFilters)==null?void 0:o.findIndex(r=>r.id===e.id))!=null?t:-1},e.setFilterValue=t=>{n.setColumnFilters(o=>{const r=e.getFilterFn(),l=o==null?void 0:o.find(u=>u.id===e.id),i=k(t,l?l.value:void 0);if(Ke(r,i,e)){var s;return(s=o==null?void 0:o.filter(u=>u.id!==e.id))!=null?s:[]}const a={id:e.id,value:i};if(l){var d;return(d=o==null?void 0:o.map(u=>u.id===e.id?a:u))!=null?d:[]}return o!=null&&o.length?[...o,a]:[a]})},e._getFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),e._getFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}},createRow:(e,n)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>H.includesString,e.getGlobalFilterFn=()=>{var n,t;const{globalFilterFn:o}=e.options;return se(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(n=(t=e.options.filterFns)==null?void 0:t[o])!=null?n:H[o]},e.setColumnFilters=n=>{const t=e.getAllLeafColumns(),o=r=>{var l;return(l=k(n,r))==null?void 0:l.filter(i=>{const s=t.find(a=>a.id===i.id);if(s){const a=s.getFilterFn();if(Ke(a,i.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.setGlobalFilter=n=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(n)},e.resetGlobalFilter=n=>{e.setGlobalFilter(n?void 0:e.initialState.globalFilter)},e.resetColumnFilters=n=>{var t,o;e.setColumnFilters(n?[]:(t=(o=e.initialState)==null?void 0:o.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}};function Ke(e,n,t){return(e&&e.autoRemove?e.autoRemove(n,t):!1)||typeof n>"u"||typeof n=="string"&&!n}const nn=(e,n,t)=>t.reduce((o,r)=>{const l=r.getValue(e);return o+(typeof l=="number"?l:0)},0),on=(e,n,t)=>{let o;return t.forEach(r=>{const l=r.getValue(e);l!=null&&(o>l||o===void 0&&l>=l)&&(o=l)}),o},rn=(e,n,t)=>{let o;return t.forEach(r=>{const l=r.getValue(e);l!=null&&(o=l)&&(o=l)}),o},ln=(e,n,t)=>{let o,r;return t.forEach(l=>{const i=l.getValue(e);i!=null&&(o===void 0?i>=i&&(o=r=i):(o>i&&(o=i),r{let t=0,o=0;if(n.forEach(r=>{let l=r.getValue(e);l!=null&&(l=+l)>=l&&(++t,o+=l)}),t)return o/t},un=(e,n)=>{if(!n.length)return;const t=n.map(l=>l.getValue(e));if(!Wt(t))return;if(t.length===1)return t[0];const o=Math.floor(t.length/2),r=t.sort((l,i)=>l-i);return t.length%2!==0?r[o]:(r[o-1]+r[o])/2},an=(e,n)=>Array.from(new Set(n.map(t=>t.getValue(e))).values()),dn=(e,n)=>new Set(n.map(t=>t.getValue(e))).size,gn=(e,n)=>n.length,Ce={sum:nn,min:on,max:rn,extent:ln,mean:sn,median:un,unique:an,uniqueCount:dn,count:gn},cn={getDefaultColumnDef:()=>({aggregatedCell:e=>{var n,t;return(n=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?n:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:M("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,n)=>{e.toggleGrouping=()=>{n.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(o=>o!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,o,r,l;return(t=(o=(r=(l=e.columnDef.enableGrouping)!=null?l:!0)!=null?r:n.options.enableGrouping)!=null?o:!0)!=null?t:!!e.accessorFn},e.getIsGrouped=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=n.getCoreRowModel().flatRows[0],o=t==null?void 0:t.getValue(e.id);if(typeof o=="number")return Ce.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Ce.extent},e.getAggregationFn=()=>{var t,o;if(!e)throw new Error;return se(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(o=n.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?t:Ce[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=n=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(n),e.resetGrouping=n=>{var t,o;e.setGrouping(n?[]:(t=(o=e.initialState)==null?void 0:o.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,n)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const o=n.getColumn(t);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[t]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,n,t,o)=>{e.getIsGrouped=()=>n.getIsGrouped()&&n.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&n.getIsGrouped(),e.getIsAggregated=()=>{var r;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((r=t.subRows)!=null&&r.length)}}};function fn(e,n,t){if(!(n!=null&&n.length)||!t)return e;const o=e.filter(l=>!n.includes(l.id));return t==="remove"?o:[...n.map(l=>e.find(i=>i.id===l)).filter(Boolean),...o]}const pn={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:M("columnOrder",e)}),createTable:e=>{e.setColumnOrder=n=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(n),e.resetColumnOrder=n=>{var t;e.setColumnOrder(n?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=v(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(n,t,o)=>r=>{let l=[];if(!(n!=null&&n.length))l=r;else{const i=[...n],s=[...r];for(;s.length&&i.length;){const a=i.shift(),d=s.findIndex(u=>u.id===a);d>-1&&l.push(s.splice(d,1)[0])}l=[...l,...s]}return fn(l,t,o)},{key:!1})}},_e=0,$e=10,Se=()=>({pageIndex:_e,pageSize:$e}),mn={getInitialState:e=>({...e,pagination:{...Se(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:M("pagination",e)}),createTable:e=>{let n=!1,t=!1;e._autoResetPageIndex=()=>{var o,r;if(!n){e._queue(()=>{n=!0});return}if((o=(r=e.options.autoResetAll)!=null?r:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=o=>{const r=l=>k(o,l);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(r)},e.resetPagination=o=>{var r;e.setPagination(o?Se():(r=e.initialState.pagination)!=null?r:Se())},e.setPageIndex=o=>{e.setPagination(r=>{let l=k(o,r.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return l=Math.max(0,Math.min(l,i)),{...r,pageIndex:l}})},e.resetPageIndex=o=>{var r,l;e.setPageIndex(o?_e:(r=(l=e.initialState)==null||(l=l.pagination)==null?void 0:l.pageIndex)!=null?r:_e)},e.resetPageSize=o=>{var r,l;e.setPageSize(o?$e:(r=(l=e.initialState)==null||(l=l.pagination)==null?void 0:l.pageSize)!=null?r:$e)},e.setPageSize=o=>{e.setPagination(r=>{const l=Math.max(1,k(o,r.pageSize)),i=r.pageSize*r.pageIndex,s=Math.floor(i/l);return{...r,pageIndex:s,pageSize:l}})},e.setPageCount=o=>e.setPagination(r=>{var l;let i=k(o,(l=e.options.pageCount)!=null?l:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...r,pageCount:i}}),e.getPageOptions=v(()=>[e.getPageCount()],o=>{let r=[];return o&&o>0&&(r=[...new Array(o)].fill(null).map((l,i)=>i)),r},{key:!1,debug:()=>{var o;return(o=e.options.debugAll)!=null?o:e.options.debugTable}}),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,r=e.getPageCount();return r===-1?!0:r===0?!1:oe.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}},ve=()=>({left:[],right:[]}),he=()=>({top:[],bottom:[]}),Cn={getInitialState:e=>({columnPinning:ve(),rowPinning:he(),...e}),getDefaultOptions:e=>({onColumnPinningChange:M("columnPinning",e),onRowPinningChange:M("rowPinning",e)}),createColumn:(e,n)=>{e.pin=t=>{const o=e.getLeafColumns().map(r=>r.id).filter(Boolean);n.setColumnPinning(r=>{var l,i;if(t==="right"){var s,a;return{left:((s=r==null?void 0:r.left)!=null?s:[]).filter(g=>!(o!=null&&o.includes(g))),right:[...((a=r==null?void 0:r.right)!=null?a:[]).filter(g=>!(o!=null&&o.includes(g))),...o]}}if(t==="left"){var d,u;return{left:[...((d=r==null?void 0:r.left)!=null?d:[]).filter(g=>!(o!=null&&o.includes(g))),...o],right:((u=r==null?void 0:r.right)!=null?u:[]).filter(g=>!(o!=null&&o.includes(g)))}}return{left:((l=r==null?void 0:r.left)!=null?l:[]).filter(g=>!(o!=null&&o.includes(g))),right:((i=r==null?void 0:r.right)!=null?i:[]).filter(g=>!(o!=null&&o.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var r,l,i;return((r=o.columnDef.enablePinning)!=null?r:!0)&&((l=(i=n.options.enableColumnPinning)!=null?i:n.options.enablePinning)!=null?l:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(s=>s.id),{left:o,right:r}=n.getState().columnPinning,l=t.some(s=>o==null?void 0:o.includes(s)),i=t.some(s=>r==null?void 0:r.includes(s));return l?"left":i?"right":!1},e.getPinnedIndex=()=>{var t,o;const r=e.getIsPinned();return r?(t=(o=n.getState().columnPinning)==null||(o=o[r])==null?void 0:o.indexOf(e.id))!=null?t:-1:0}},createRow:(e,n)=>{e.pin=(t,o,r)=>{const l=o?e.getLeafRows().map(a=>{let{id:d}=a;return d}):[],i=r?e.getParentRows().map(a=>{let{id:d}=a;return d}):[],s=new Set([...i,e.id,...l]);n.setRowPinning(a=>{var d,u;if(t==="bottom"){var g,f;return{top:((g=a==null?void 0:a.top)!=null?g:[]).filter(p=>!(s!=null&&s.has(p))),bottom:[...((f=a==null?void 0:a.bottom)!=null?f:[]).filter(p=>!(s!=null&&s.has(p))),...Array.from(s)]}}if(t==="top"){var c,m;return{top:[...((c=a==null?void 0:a.top)!=null?c:[]).filter(p=>!(s!=null&&s.has(p))),...Array.from(s)],bottom:((m=a==null?void 0:a.bottom)!=null?m:[]).filter(p=>!(s!=null&&s.has(p)))}}return{top:((d=a==null?void 0:a.top)!=null?d:[]).filter(p=>!(s!=null&&s.has(p))),bottom:((u=a==null?void 0:a.bottom)!=null?u:[]).filter(p=>!(s!=null&&s.has(p)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:o,enablePinning:r}=n.options;return typeof o=="function"?o(e):(t=o??r)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:o,bottom:r}=n.getState().rowPinning,l=t.some(s=>o==null?void 0:o.includes(s)),i=t.some(s=>r==null?void 0:r.includes(s));return l?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var t,o;const r=e.getIsPinned();if(!r)return-1;const l=(t=n._getPinnedRows(r))==null?void 0:t.map(i=>{let{id:s}=i;return s});return(o=l==null?void 0:l.indexOf(e.id))!=null?o:-1},e.getCenterVisibleCells=v(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,n.getState().columnPinning.right],(t,o,r)=>{const l=[...o??[],...r??[]];return t.filter(i=>!l.includes(i.column.id))},{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}}),e.getLeftVisibleCells=v(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,,],(t,o)=>(o??[]).map(l=>t.find(i=>i.column.id===l)).filter(Boolean).map(l=>({...l,position:"left"})),{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}}),e.getRightVisibleCells=v(()=>[e._getAllVisibleCells(),n.getState().columnPinning.right],(t,o)=>(o??[]).map(l=>t.find(i=>i.column.id===l)).filter(Boolean).map(l=>({...l,position:"right"})),{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}})},createTable:e=>{e.setColumnPinning=n=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(n),e.resetColumnPinning=n=>{var t,o;return e.setColumnPinning(n?ve():(t=(o=e.initialState)==null?void 0:o.columnPinning)!=null?t:ve())},e.getIsSomeColumnsPinned=n=>{var t;const o=e.getState().columnPinning;if(!n){var r,l;return!!((r=o.left)!=null&&r.length||(l=o.right)!=null&&l.length)}return!!((t=o[n])!=null&&t.length)},e.getLeftLeafColumns=v(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(n,t)=>(t??[]).map(o=>n.find(r=>r.id===o)).filter(Boolean),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugColumns}}),e.getRightLeafColumns=v(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(n,t)=>(t??[]).map(o=>n.find(r=>r.id===o)).filter(Boolean),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugColumns}}),e.getCenterLeafColumns=v(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o)=>{const r=[...t??[],...o??[]];return n.filter(l=>!r.includes(l.id))},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugColumns}}),e.setRowPinning=n=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(n),e.resetRowPinning=n=>{var t,o;return e.setRowPinning(n?he():(t=(o=e.initialState)==null?void 0:o.rowPinning)!=null?t:he())},e.getIsSomeRowsPinned=n=>{var t;const o=e.getState().rowPinning;if(!n){var r,l;return!!((r=o.top)!=null&&r.length||(l=o.bottom)!=null&&l.length)}return!!((t=o[n])!=null&&t.length)},e._getPinnedRows=n=>v(()=>[e.getRowModel().rows,e.getState().rowPinning[n]],(t,o)=>{var r;return((r=e.options.keepPinnedRows)==null||r?(o??[]).map(i=>{const s=e.getRow(i,!0);return s.getIsAllParentsExpanded()?s:null}):(o??[]).map(i=>t.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:n}))},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugRows}})(),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=v(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(n,t,o)=>{const r=new Set([...t??[],...o??[]]);return n.filter(l=>!r.has(l.id))},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}})}},Sn={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:M("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=n=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(n),e.resetRowSelection=n=>{var t;return e.setRowSelection(n?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=n=>{e.setRowSelection(t=>{n=typeof n<"u"?n:!e.getIsAllRowsSelected();const o={...t},r=e.getPreGroupedRowModel().flatRows;return n?r.forEach(l=>{l.getCanSelect()&&(o[l.id]=!0)}):r.forEach(l=>{delete o[l.id]}),o})},e.toggleAllPageRowsSelected=n=>e.setRowSelection(t=>{const o=typeof n<"u"?n:!e.getIsAllPageRowsSelected(),r={...t};return e.getRowModel().rows.forEach(l=>{ye(r,l.id,o,!0,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=v(()=>[e.getState().rowSelection,e.getCoreRowModel()],(n,t)=>Object.keys(n).length?Re(e,t):{rows:[],flatRows:[],rowsById:{}},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}}),e.getFilteredSelectedRowModel=v(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(n,t)=>Object.keys(n).length?Re(e,t):{rows:[],flatRows:[],rowsById:{}},{key:"getFilteredSelectedRowModel",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}}),e.getGroupedSelectedRowModel=v(()=>[e.getState().rowSelection,e.getSortedRowModel()],(n,t)=>Object.keys(n).length?Re(e,t):{rows:[],flatRows:[],rowsById:{}},{key:"getGroupedSelectedRowModel",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}}),e.getIsAllRowsSelected=()=>{const n=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let o=!!(n.length&&Object.keys(t).length);return o&&n.some(r=>r.getCanSelect()&&!t[r.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows.filter(r=>r.getCanSelect()),{rowSelection:t}=e.getState();let o=!!n.length;return o&&n.some(r=>!t[r.id])&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var n;const t=Object.keys((n=e.getState().rowSelection)!=null?n:{}).length;return t>0&&t{const n=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:n.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>n=>{e.toggleAllRowsSelected(n.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>n=>{e.toggleAllPageRowsSelected(n.target.checked)}},createRow:(e,n)=>{e.toggleSelected=(t,o)=>{const r=e.getIsSelected();n.setRowSelection(l=>{var i;if(t=typeof t<"u"?t:!r,e.getCanSelect()&&r===t)return l;const s={...l};return ye(s,e.id,t,(i=o==null?void 0:o.selectChildren)!=null?i:!0,n),s})},e.getIsSelected=()=>{const{rowSelection:t}=n.getState();return Ee(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=n.getState();return xe(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=n.getState();return xe(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof n.options.enableRowSelection=="function"?n.options.enableRowSelection(e):(t=n.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof n.options.enableSubRowSelection=="function"?n.options.enableSubRowSelection(e):(t=n.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof n.options.enableMultiRowSelection=="function"?n.options.enableMultiRowSelection(e):(t=n.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return o=>{var r;t&&e.toggleSelected((r=o.target)==null?void 0:r.checked)}}}},ye=(e,n,t,o,r)=>{var l;const i=r.getRow(n);t?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[n]=!0)):delete e[n],o&&(l=i.subRows)!=null&&l.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>ye(e,s.id,t,o,r))};function Re(e,n){const t=e.getState().rowSelection,o=[],r={},l=function(i,s){return i.map(a=>{var d;const u=Ee(a,t);if(u&&(o.push(a),r[a.id]=a),(d=a.subRows)!=null&&d.length&&(a={...a,subRows:l(a.subRows)}),u)return a}).filter(Boolean)};return{rows:l(n.rows),flatRows:o,rowsById:r}}function Ee(e,n){var t;return(t=n[e.id])!=null?t:!1}function xe(e,n,t){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let r=!0,l=!1;return e.subRows.forEach(i=>{if(!(l&&!r)&&(i.getCanSelect()&&(Ee(i,n)?l=!0:r=!1),i.subRows&&i.subRows.length)){const s=xe(i,n);s==="all"?l=!0:(s==="some"&&(l=!0),r=!1)}}),r?"all":l?"some":!1}const Fe=/([0-9]+)/gm,vn=(e,n,t)=>ft(j(e.getValue(t)).toLowerCase(),j(n.getValue(t)).toLowerCase()),hn=(e,n,t)=>ft(j(e.getValue(t)),j(n.getValue(t))),Rn=(e,n,t)=>De(j(e.getValue(t)).toLowerCase(),j(n.getValue(t)).toLowerCase()),wn=(e,n,t)=>De(j(e.getValue(t)),j(n.getValue(t))),_n=(e,n,t)=>{const o=e.getValue(t),r=n.getValue(t);return o>r?1:oDe(e.getValue(t),n.getValue(t));function De(e,n){return e===n?0:e>n?1:-1}function j(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function ft(e,n){const t=e.split(Fe).filter(Boolean),o=n.split(Fe).filter(Boolean);for(;t.length&&o.length;){const r=t.shift(),l=o.shift(),i=parseInt(r,10),s=parseInt(l,10),a=[i,s].sort();if(isNaN(a[0])){if(r>l)return 1;if(l>r)return-1;continue}if(isNaN(a[1]))return isNaN(i)?-1:1;if(i>s)return 1;if(s>i)return-1}return t.length-o.length}const W={alphanumeric:vn,alphanumericCaseSensitive:hn,text:Rn,textCaseSensitive:wn,datetime:_n,basic:$n},yn={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:M("sorting",e),isMultiSortEvent:n=>n.shiftKey}),createColumn:(e,n)=>{e.getAutoSortingFn=()=>{const t=n.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const r of t){const l=r==null?void 0:r.getValue(e.id);if(Object.prototype.toString.call(l)==="[object Date]")return W.datetime;if(typeof l=="string"&&(o=!0,l.split(Fe).length>1))return W.alphanumeric}return o?W.text:W.basic},e.getAutoSortDir=()=>{const t=n.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,o;if(!e)throw new Error;return se(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(o=n.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?t:W[e.columnDef.sortingFn]},e.toggleSorting=(t,o)=>{const r=e.getNextSortingOrder(),l=typeof t<"u"&&t!==null;n.setSorting(i=>{const s=i==null?void 0:i.find(c=>c.id===e.id),a=i==null?void 0:i.findIndex(c=>c.id===e.id);let d=[],u,g=l?t:r==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&o?s?u="toggle":u="add":i!=null&&i.length&&a!==i.length-1?u="replace":s?u="toggle":u="replace",u==="toggle"&&(l||r||(u="remove")),u==="add"){var f;d=[...i,{id:e.id,desc:g}],d.splice(0,d.length-((f=n.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?d=i.map(c=>c.id===e.id?{...c,desc:g}:c):u==="remove"?d=i.filter(c=>c.id!==e.id):d=[{id:e.id,desc:g}];return d})},e.getFirstSortDir=()=>{var t,o;return((t=(o=e.columnDef.sortDescFirst)!=null?o:n.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var o,r;const l=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==l&&((o=n.options.enableSortingRemoval)==null||o)&&(!(t&&(r=n.options.enableMultiRemove)!=null)||r)?!1:i==="desc"?"asc":"desc":l},e.getCanSort=()=>{var t,o;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((o=n.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,o;return(t=(o=e.columnDef.enableMultiSort)!=null?o:n.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const o=(t=n.getState().sorting)==null?void 0:t.find(r=>r.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,o;return(t=(o=n.getState().sorting)==null?void 0:o.findIndex(r=>r.id===e.id))!=null?t:-1},e.clearSorting=()=>{n.setSorting(t=>t!=null&&t.length?t.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return o=>{t&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?n.options.isMultiSortEvent==null?void 0:n.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=n=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(n),e.resetSorting=n=>{var t,o;e.setSorting(n?[]:(t=(o=e.initialState)==null?void 0:o.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},xn={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:M("columnVisibility",e)}),createColumn:(e,n)=>{e.toggleVisibility=t=>{e.getCanHide()&&n.setColumnVisibility(o=>({...o,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,o;return(t=(o=n.getState().columnVisibility)==null?void 0:o[e.id])!=null?t:!0},e.getCanHide=()=>{var t,o;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((o=n.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,n)=>{e._getAllVisibleCells=v(()=>[e.getAllCells(),n.getState().columnVisibility],t=>t.filter(o=>o.column.getIsVisible()),{key:"row._getAllVisibleCells",debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}}),e.getVisibleCells=v(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,o,r)=>[...t,...o,...r],{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}})},createTable:e=>{const n=(t,o)=>v(()=>[o(),o().filter(r=>r.getIsVisible()).map(r=>r.id).join("_")],r=>r.filter(l=>l.getIsVisible==null?void 0:l.getIsVisible()),{key:t,debug:()=>{var r;return(r=e.options.debugAll)!=null?r:e.options.debugColumns}});e.getVisibleFlatColumns=n("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=n("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=n("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=n("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=n("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var o;e.setColumnVisibility(t?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=t=>{var o;t=(o=t)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((r,l)=>({...r,[l.id]:t||!(l.getCanHide!=null&&l.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var o;e.toggleAllColumnsVisible((o=t.target)==null?void 0:o.checked)}}},We=[Yt,xn,pn,Cn,tn,yn,cn,en,mn,Sn,Jt];function Fn(e){var n;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let t={_features:We};const o=t._features.reduce((u,g)=>Object.assign(u,g.getDefaultOptions==null?void 0:g.getDefaultOptions(t)),{}),r=u=>t.options.mergeOptions?t.options.mergeOptions(o,u):{...o,...u};let i={...{},...(n=e.initialState)!=null?n:{}};t._features.forEach(u=>{var g;i=(g=u.getInitialState==null?void 0:u.getInitialState(i))!=null?g:i});const s=[];let a=!1;const d={_features:We,options:{...o,...e},initialState:i,_queue:u=>{s.push(u),a||(a=!0,Promise.resolve().then(()=>{for(;s.length;)s.shift()();a=!1}).catch(g=>setTimeout(()=>{throw g})))},reset:()=>{t.setState(t.initialState)},setOptions:u=>{const g=k(u,t.options);t.options=r(g)},getState:()=>t.options.state,setState:u=>{t.options.onStateChange==null||t.options.onStateChange(u)},_getRowId:(u,g,f)=>{var c;return(c=t.options.getRowId==null?void 0:t.options.getRowId(u,g,f))!=null?c:`${f?[f.id,g].join("."):g}`},getCoreRowModel:()=>(t._getCoreRowModel||(t._getCoreRowModel=t.options.getCoreRowModel(t)),t._getCoreRowModel()),getRowModel:()=>t.getPaginationRowModel(),getRow:(u,g)=>{const f=(g?t.getCoreRowModel():t.getRowModel()).rowsById[u];if(!f)throw new Error;return f},_getDefaultColumnDef:v(()=>[t.options.defaultColumn],u=>{var g;return u=(g=u)!=null?g:{},{header:f=>{const c=f.header.column.columnDef;return c.accessorKey?c.accessorKey:c.accessorFn?c.id:null},cell:f=>{var c,m;return(c=(m=f.renderValue())==null||m.toString==null?void 0:m.toString())!=null?c:null},...t._features.reduce((f,c)=>Object.assign(f,c.getDefaultColumnDef==null?void 0:c.getDefaultColumnDef()),{}),...u}},{debug:()=>{var u;return(u=t.options.debugAll)!=null?u:t.options.debugColumns},key:!1}),_getColumnDefs:()=>t.options.columns,getAllColumns:v(()=>[t._getColumnDefs()],u=>{const g=function(f,c,m){return m===void 0&&(m=0),f.map(p=>{const h=Qt(t,p,m,c),w=p;return h.columns=w.columns?g(w.columns,h,m+1):[],h})};return g(u)},{key:!1,debug:()=>{var u;return(u=t.options.debugAll)!=null?u:t.options.debugColumns}}),getAllFlatColumns:v(()=>[t.getAllColumns()],u=>u.flatMap(g=>g.getFlatColumns()),{key:!1,debug:()=>{var u;return(u=t.options.debugAll)!=null?u:t.options.debugColumns}}),_getAllFlatColumnsById:v(()=>[t.getAllFlatColumns()],u=>u.reduce((g,f)=>(g[f.id]=f,g),{}),{key:!1,debug:()=>{var u;return(u=t.options.debugAll)!=null?u:t.options.debugColumns}}),getAllLeafColumns:v(()=>[t.getAllColumns(),t._getOrderColumnsFn()],(u,g)=>{let f=u.flatMap(c=>c.getLeafColumns());return g(f)},{key:!1,debug:()=>{var u;return(u=t.options.debugAll)!=null?u:t.options.debugColumns}}),getColumn:u=>t._getAllFlatColumnsById()[u]};Object.assign(t,d);for(let u=0;u{var i;return(i=l.getValue())!=null?i:e.options.renderFallbackValue},l={id:`${n.id}_${t.id}`,row:n,column:t,getValue:()=>n.getValue(o),renderValue:r,getContext:v(()=>[e,t,n,l],(i,s,a,d)=>({table:i,column:s,row:a,cell:d,getValue:d.getValue,renderValue:d.renderValue}),{key:!1,debug:()=>e.options.debugAll})};return e._features.forEach(i=>{i.createCell==null||i.createCell(l,t,n,e)},{}),l}const An=(e,n,t,o,r,l,i)=>{let s={id:n,index:o,original:t,depth:r,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(s._valuesCache.hasOwnProperty(a))return s._valuesCache[a];const d=e.getColumn(a);if(d!=null&&d.accessorFn)return s._valuesCache[a]=d.accessorFn(s.original,o),s._valuesCache[a]},getUniqueValues:a=>{if(s._uniqueValuesCache.hasOwnProperty(a))return s._uniqueValuesCache[a];const d=e.getColumn(a);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(s._uniqueValuesCache[a]=d.columnDef.getUniqueValues(s.original,o),s._uniqueValuesCache[a]):(s._uniqueValuesCache[a]=[s.getValue(a)],s._uniqueValuesCache[a])},renderValue:a=>{var d;return(d=s.getValue(a))!=null?d:e.options.renderFallbackValue},subRows:l??[],getLeafRows:()=>Xt(s.subRows,a=>a.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId):void 0,getParentRows:()=>{let a=[],d=s;for(;;){const u=d.getParentRow();if(!u)break;a.push(u),d=u}return a.reverse()},getAllCells:v(()=>[e.getAllLeafColumns()],a=>a.map(d=>Pn(e,s,d,d.id)),{key:!1,debug:()=>{var a;return(a=e.options.debugAll)!=null?a:e.options.debugRows}}),_getAllCellsByColumnId:v(()=>[s.getAllCells()],a=>a.reduce((d,u)=>(d[u.column.id]=u,d),{}),{key:"row.getAllCellsByColumnId",debug:()=>{var a;return(a=e.options.debugAll)!=null?a:e.options.debugRows}})};for(let a=0;av(()=>[e.options.data],n=>{const t={rows:[],flatRows:[],rowsById:{}},o=function(r,l,i){l===void 0&&(l=0);const s=[];for(let d=0;d{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})}function In(){return e=>v(()=>[e.getState().sorting,e.getPreSortedRowModel()],(n,t)=>{if(!t.rows.length||!(n!=null&&n.length))return t;const o=e.getState().sorting,r=[],l=o.filter(a=>{var d;return(d=e.getColumn(a.id))==null?void 0:d.getCanSort()}),i={};l.forEach(a=>{const d=e.getColumn(a.id);d&&(i[a.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const s=a=>{const d=[...a];return d.sort((u,g)=>{for(let c=0;c{var g;r.push(u),(g=u.subRows)!=null&&g.length&&(u.subRows=s(u.subRows))}),d};return{rows:s(t.rows),flatRows:r,rowsById:t.rowsById}},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})}/** - * react-table - * - * Copyright (c) TanStack - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Xe(e,n){return e?Vn(e)?y.createElement(e,n):e:null}function Vn(e){return bn(e)||typeof e=="function"||En(e)}function bn(e){return typeof e=="function"&&(()=>{const n=Object.getPrototypeOf(e);return n.prototype&&n.prototype.isReactComponent})()}function En(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Dn(e){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=y.useState(()=>({current:Fn(n)})),[o,r]=y.useState(()=>t.current.initialState);return t.current.setOptions(l=>({...l,...e,state:{...o,...e.state},onStateChange:i=>{r(i),e.onStateChange==null||e.onStateChange(i)}})),t.current}const Hn="_tr_ludqf_1",Ln="_pointer_ludqf_6",Gn="_table_ludqf_10",On="_thWrap_ludqf_38",Tn="_sortIconContainer_ludqf_48",kn="_rotate180_ludqf_55",T={tr:Hn,pointer:Ln,table:Gn,thWrap:On,sortIconContainer:Tn,rotate180:kn},pt=[{header:"Id",accessorKey:"id"},{header:"Host",accessorKey:"host"},{header:"Process",accessorKey:"process"},{header:"DL",accessorKey:"download",cell:e=>J(e.getValue())},{header:"UL",accessorKey:"upload",cell:e=>J(e.getValue())},{header:"DL Speed",accessorKey:"downloadSpeedCurr",cell:e=>J(e.getValue())+"/s"},{header:"UL Speed",accessorKey:"uploadSpeedCurr",cell:e=>J(e.getValue())+"/s"},{header:"Chains",accessorKey:"chains"},{header:"Rule",accessorKey:"rule"},{header:"Time",accessorKey:"start",cell:e=>At(e.getValue(),0)},{header:"Source",accessorKey:"source"},{header:"Destination IP",accessorKey:"destinationIP"},{header:"Type",accessorKey:"type"}],zn=[{id:"id",desc:!0}],jn=pt,Nn=pt.filter(e=>e.accessorKey!=="process");function Bn({data:e}){const n=b.useContext(et),[t,o]=b.useState(zn),r=Dn({columns:n.hasProcessPath?jn:Nn,data:e,state:{sorting:t,columnVisibility:{id:!1}},onSortingChange:o,getCoreRowModel:Mn(),getSortedRowModel:In()});return S.jsxs("table",{className:T.table,children:[S.jsx("thead",{children:r.getHeaderGroups().map(l=>S.jsx("tr",{children:l.headers.map(i=>S.jsx("th",{className:i.column.getCanSort()?z(T.th,T.pointer):T.th,onClick:i.column.getToggleSortingHandler(),children:S.jsxs("span",{className:T.thWrap,children:[S.jsx("span",{children:Xe(i.column.columnDef.header,i.getContext())}),i.column.getIsSorted()?S.jsx("span",{className:i.column.getIsSorted()==="desc"?T.sortIconContainer:z(T.rotate180,T.sortIconContainer),children:S.jsx(Mt,{size:16})}):null]})},i.id))},l.id))}),S.jsx("tbody",{children:r.getRowModel().rows.map(l=>S.jsx("tr",{children:l.getVisibleCells().map(i=>S.jsx("td",{children:Xe(i.column.columnDef.cell,i.getContext())},i.id))},l.id))})]})}const qn="_overlay_148w6_1",Un="_cnt_148w6_5",Kn="_afterOpen_148w6_15",Wn="_btngrp_148w6_20",ne={overlay:qn,cnt:Un,afterOpen:Kn,btngrp:Wn},{useRef:Xn,useCallback:Qn,useMemo:Yn}=b;function Jn({isOpen:e,onRequestClose:n,primaryButtonOnTap:t}){const o=Xn(null),r=Qn(()=>{o.current.focus()},[]),l=Yn(()=>({base:z(je.content,ne.cnt),afterOpen:ne.afterOpen,beforeClose:""}),[]);return S.jsxs(vt,{isOpen:e,onRequestClose:n,onAfterOpen:r,className:l,overlayClassName:z(je.overlay,ne.overlay),children:[S.jsx("p",{children:"Are you sure you want to close all connections?"}),S.jsxs("div",{className:ne.btngrp,children:[S.jsx(Ne,{onClick:t,ref:o,children:"I'm sure"}),S.jsx("div",{style:{width:20}}),S.jsx(Ne,{onClick:n,children:"No"})]})]})}const{useEffect:Zn,useState:X,useRef:eo,useCallback:Q}=b,Qe=30;function to(e){const n={};for(let t=0;t[t.host,t.sourceIP,t.sourcePort,t.destinationIP,t.chains,t.rule,t.type,t.network,t.processPath].some(o=>oo(o,n))):e}function ro(e,n,t,o){const{id:r,metadata:l,upload:i,download:s,start:a,chains:d,rule:u,rulePayload:g}=e,{host:f,destinationPort:c,destinationIP:m,network:p,type:h,sourceIP:w,sourcePort:P}=l,_=l.processPath;o.hasProcessPath===!1&&typeof _<"u"&&(o.hasProcessPath=!0);let $=f;$===""&&($=m);const x=n[r];return{id:r,upload:i,download:s,start:t-new Date(a).valueOf(),chains:d.reverse().join(" / "),rule:g?`${u}(${g})`:u,...l,host:`${$}:${c}`,type:`${h}(${p})`,source:`${w}:${P}`,downloadSpeedCurr:s-(x?x.download:0),uploadSpeedCurr:i-(x?x.upload:0),process:no(_)}}function Je(e){return e.length>0?S.jsx(Bn,{data:e}):S.jsx("div",{className:Y.placeHolder,children:S.jsx(Ft,{width:200,height:200,c1:"var(--color-text)"})})}function Ze({qty:e}){return e<100?""+e:"99+"}function lo({apiConfig:e}){const[n,t]=Pt(),[o,r]=X([]),[l,i]=X([]),[s,a]=X(""),d=Ye(o,s),u=Ye(l,s),[g,f]=X(!1),c=Q(()=>f(!0),[]),m=Q(()=>f(!1),[]),[p,h]=X(!1),w=Q(()=>h(L=>!L),[]),P=Q(()=>{Rt(e),m()},[e,m]),_=eo(o),$=b.useContext(et),x=Q(({connections:L})=>{const K=to(_.current),He=Date.now(),N=L.map(G=>ro(G,K,He,$)),ae=[];for(const G of _.current)N.findIndex(R=>R.id===G.id)<0&&ae.push(G);i(G=>[...ae,...G].slice(0,101)),N&&(N.length!==0||_.current.length!==0)&&!p?(_.current=N,r(N)):_.current=N},[r,p,$]);Zn(()=>wt(e,x),[e,x]);const{t:I}=_t();return S.jsxs("div",{children:[S.jsx($t,{title:I("Connections")}),S.jsxs(Ie,{children:[S.jsxs("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"space-between"},children:[S.jsxs(Ve,{children:[S.jsxs(le,{children:[S.jsx("span",{children:I("Active")}),S.jsx("span",{className:Y.connQty,children:Ze({qty:d.length})})]}),S.jsxs(le,{children:[S.jsx("span",{children:I("Closed")}),S.jsx("span",{className:Y.connQty,children:Ze({qty:u.length})})]})]}),S.jsx("div",{className:Y.inputWrapper,children:S.jsx("input",{type:"text",name:"filter",autoComplete:"off",className:Y.input,placeholder:"Filter",onChange:L=>a(L.target.value)})})]}),S.jsx("div",{ref:n,style:{padding:30,paddingBottom:Qe,paddingTop:0},children:S.jsxs("div",{style:{height:t-Qe,overflow:"auto"},children:[S.jsxs(ie,{children:[S.jsx(S.Fragment,{children:Je(d)}),S.jsx(It,{icon:p?S.jsx(Et,{size:16}):S.jsx(Dt,{size:16}),mainButtonStyles:p?{background:"#e74c3c"}:{},style:Vt,text:I(p?"Resume Refresh":"Pause Refresh"),onClick:w,children:S.jsx(bt,{text:"Close All Connections",onClick:c,children:S.jsx(yt,{size:10})})})]}),S.jsx(ie,{children:Je(u)})]})}),S.jsx(Jn,{isOpen:g,primaryButtonOnTap:P,onRequestClose:m})]})]})}const io=e=>({apiConfig:xt(e)}),po=ht(io)(lo);export{po as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Connections-af4e9b01.js b/FILES/etc/config/clash/clash-dashboard/assets/Connections-af4e9b01.js new file mode 100644 index 0000000..4d9a4f8 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Connections-af4e9b01.js @@ -0,0 +1,22 @@ +import{r as $,R as M,P as J,c as z,p as Z,M as ot,j as S,a as wt,B as qe,b as _t,d as $t,f as yt,u as xt,C as Ft,g as Pt,S as At}from"./index-2d443e7c.js";import{u as Mt}from"./useRemainingViewPortHeight-60d26854.js";import{f as It}from"./index-4bcbc835.js";import{C as Vt,m as Ue}from"./Modal.module-32e7ee6a.js";import{F as bt,p as Et,A as Dt}from"./Fab-a6cf5682.js";import{P as Ht,a as Lt}from"./play-19a8b29d.js";function _e(){return _e=Object.assign||function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(t[o]=e[o])}return t}function Gt(e,n){if(e==null)return{};var t={},o=Object.keys(e),r,l;for(l=0;l=0)&&(t[r]=e[r]);return t}var Me=$.forwardRef(function(e,n){var t=e.color,o=t===void 0?"currentColor":t,r=e.size,l=r===void 0?24:r,i=Ot(e,["color","size"]);return M.createElement("svg",_e({ref:n,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},i),M.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),M.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});Me.propTypes={color:J.string,size:J.oneOfType([J.string,J.number])};Me.displayName="X";const Tt=Me;function Ie(e){return n=>!!n.type&&n.type.tabsRole===e}const ae=Ie("Tab"),Ve=Ie("TabList"),be=Ie("TabPanel");function kt(e){return ae(e)||Ve(e)||be(e)}function $e(e,n){return $.Children.map(e,t=>t===null?null:kt(t)?n(t):t.props&&t.props.children&&typeof t.props.children=="object"?$.cloneElement(t,{...t.props,children:$e(t.props.children,n)}):t)}function rt(e,n){return $.Children.forEach(e,t=>{t!==null&&(ae(t)||be(t)?n(t):t.props&&t.props.children&&typeof t.props.children=="object"&&(Ve(t)&&n(t),rt(t.props.children,n)))})}function lt(e){let n=0;return rt(e,t=>{ae(t)&&n++}),n}function it(e){return e&&"getAttribute"in e}function Ke(e){return it(e)&&e.getAttribute("data-rttab")}function q(e){return it(e)&&e.getAttribute("aria-disabled")==="true"}let le;function zt(e){const n=e||(typeof window<"u"?window:void 0);try{le=!!(typeof n<"u"&&n.document&&n.document.activeElement)}catch{le=!1}}const jt={className:"react-tabs",focus:!1},st=e=>{let n=$.useRef([]),t=$.useRef([]);const o=$.useRef();function r(C,R){if(C<0||C>=d())return;const{onSelect:F,selectedIndex:U}=e;F(C,U,R)}function l(C){const R=d();for(let F=C+1;FC;)if(!q(u(R)))return R;return C}function s(){const C=d();for(let R=0;R{let ge=B;if(Ve(B)){let G=0,ze=!1;le==null&&zt(ke);const je=ke||(typeof window<"u"?window:void 0);le&&je&&(ze=M.Children.toArray(B.props.children).filter(ae).some((Ne,ce)=>je.document.activeElement===u(ce))),ge=$.cloneElement(B,{children:$e(B.props.children,Ne=>{const ce=`tabs-${G}`,Be=E===G,fe={tabRef:Rt=>{n.current[ce]=Rt},id:t.current[G],selected:Be,focus:Be&&(U||ze)};return D&&(fe.selectedClassName=D),F&&(fe.disabledClassName=F),G++,$.cloneElement(Ne,fe)})})}else if(be(B)){const G={id:t.current[C],selected:E===C};A&&(G.forceRender=A),Te&&(G.selectedClassName=Te),C++,ge=$.cloneElement(B,G)}return ge})}function f(C){const{direction:R,disableUpDownKeys:F,disableLeftRightKeys:U}=e;if(m(C.target)){let{selectedIndex:A}=e,E=!1,D=!1;(C.code==="Space"||C.keyCode===32||C.code==="Enter"||C.keyCode===13)&&(E=!0,D=!1,c(C)),!U&&(C.keyCode===37||C.code==="ArrowLeft")||!F&&(C.keyCode===38||C.code==="ArrowUp")?(R==="rtl"?A=l(A):A=i(A),E=!0,D=!0):!U&&(C.keyCode===39||C.code==="ArrowRight")||!F&&(C.keyCode===40||C.code==="ArrowDown")?(R==="rtl"?A=i(A):A=l(A),E=!0,D=!0):C.keyCode===35||C.code==="End"?(A=a(),E=!0,D=!0):(C.keyCode===36||C.code==="Home")&&(A=s(),E=!0,D=!0),E&&C.preventDefault(),D&&r(A,C)}}function c(C){let R=C.target;do if(m(R)){if(q(R))return;const F=[].slice.call(R.parentNode.children).filter(Ke).indexOf(R);r(F,C);return}while((R=R.parentNode)!=null)}function m(C){if(!Ke(C))return!1;let R=C.parentElement;do{if(R===o.current)return!0;if(R.getAttribute("data-rttabs"))break;R=R.parentElement}while(R);return!1}const{children:p,className:h,disabledTabClassName:w,domRef:P,focus:_,forceRenderTabPanel:y,onSelect:x,selectedIndex:V,selectedTabClassName:L,selectedTabPanelClassName:K,environment:Ge,disableUpDownKeys:N,disableLeftRightKeys:de,...O}={...jt,...e};return M.createElement("div",Object.assign({},O,{className:z(h),onClick:c,onKeyDown:f,ref:C=>{o.current=C,P&&P(C)},"data-rttabs":!0}),g())};st.propTypes={};const Nt=0,re=1,Bt={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},qt=e=>e.selectedIndex===null?re:Nt,Ee=e=>{const{children:n,defaultFocus:t,defaultIndex:o,focusTabOnClick:r,onSelect:l,...i}={...Bt,...e},[s,a]=$.useState(t),[d]=$.useState(qt(i)),[u,g]=$.useState(d===re?o||0:null);if($.useEffect(()=>{a(!1)},[]),d===re){const m=lt(n);$.useEffect(()=>{if(u!=null){const p=Math.max(0,m-1);g(Math.min(u,p))}},[m])}const f=(m,p,h)=>{typeof l=="function"&&l(m,p,h)===!1||(r&&a(!0),d===re&&g(m))};let c={...e,...i};return c.focus=s,c.onSelect=f,u!=null&&(c.selectedIndex=u),delete c.defaultFocus,delete c.defaultIndex,delete c.focusTabOnClick,M.createElement(st,c,n)};Ee.propTypes={};Ee.tabsRole="Tabs";const Ut={className:"react-tabs__tab-list"},De=e=>{const{children:n,className:t,...o}={...Ut,...e};return M.createElement("ul",Object.assign({},o,{className:z(t),role:"tablist"}),n)};De.tabsRole="TabList";De.propTypes={};const pe="react-tabs__tab",Kt={className:pe,disabledClassName:`${pe}--disabled`,focus:!1,id:null,selected:!1,selectedClassName:`${pe}--selected`},ie=e=>{let n=$.useRef();const{children:t,className:o,disabled:r,disabledClassName:l,focus:i,id:s,selected:a,selectedClassName:d,tabIndex:u,tabRef:g,...f}={...Kt,...e};return $.useEffect(()=>{a&&i&&n.current.focus()},[a,i]),M.createElement("li",Object.assign({},f,{className:z(o,{[d]:a,[l]:r}),ref:c=>{n.current=c,g&&g(c)},role:"tab",id:`tab${s}`,"aria-selected":a?"true":"false","aria-disabled":r?"true":"false","aria-controls":`panel${s}`,tabIndex:u||(a?"0":null),"data-rttab":!0}),t)};ie.propTypes={};ie.tabsRole="Tab";const We="react-tabs__tab-panel",Wt={className:We,forceRender:!1,selectedClassName:`${We}--selected`},se=e=>{const{children:n,className:t,forceRender:o,id:r,selected:l,selectedClassName:i,...s}={...Wt,...e};return M.createElement("div",Object.assign({},s,{className:z(t,{[i]:l}),role:"tabpanel",id:`panel${r}`,"aria-labelledby":`tab${r}`}),o||l?n:null)};se.tabsRole="TabPanel";se.propTypes={};const Xt="_placeHolder_1mf9d_1",Qt="_connQty_1mf9d_10",Yt="_inputWrapper_1mf9d_22",Jt="_input_1mf9d_22",Y={placeHolder:Xt,connQty:Qt,inputWrapper:Yt,input:Jt};/** + * table-core + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function k(e,n){return typeof e=="function"?e(n):e}function I(e,n){return t=>{n.setState(o=>({...o,[e]:k(t,o[e])}))}}function ue(e){return e instanceof Function}function Zt(e){return Array.isArray(e)&&e.every(n=>typeof n=="number")}function en(e,n){const t=[],o=r=>{r.forEach(l=>{t.push(l);const i=n(l);i!=null&&i.length&&o(i)})};return o(e),t}function v(e,n,t){let o=[],r;return()=>{let l;t.key&&t.debug&&(l=Date.now());const i=e();if(!(i.length!==o.length||i.some((d,u)=>o[u]!==d)))return r;o=i;let a;if(t.key&&t.debug&&(a=Date.now()),r=n(...i),t==null||t.onChange==null||t.onChange(r),t.key&&t.debug&&t!=null&&t.debug()){const d=Math.round((Date.now()-l)*100)/100,u=Math.round((Date.now()-a)*100)/100,g=u/16,f=(c,m)=>{for(c=String(c);c.length{let c=f;for(const p of a.split(".")){var m;c=(m=c)==null?void 0:m[p]}return c}:u=f=>f[s.accessorKey]),!d)throw new Error;let g={id:`${String(d)}`,accessorFn:u,parent:o,depth:t,columnDef:s,columns:[],getFlatColumns:v(()=>[!0],()=>{var f;return[g,...(f=g.columns)==null?void 0:f.flatMap(c=>c.getFlatColumns())]},{key:"column.getFlatColumns",debug:()=>{var f;return(f=e.options.debugAll)!=null?f:e.options.debugColumns}}),getLeafColumns:v(()=>[e._getOrderColumnsFn()],f=>{var c;if((c=g.columns)!=null&&c.length){let m=g.columns.flatMap(p=>p.getLeafColumns());return f(m)}return[g]},{key:"column.getLeafColumns",debug:()=>{var f;return(f=e.options.debugAll)!=null?f:e.options.debugColumns}})};for(const f of e._features)f.createColumn==null||f.createColumn(g,e);return g}function Xe(e,n,t){var o;let l={id:(o=t.id)!=null?o:n.id,column:n,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],s=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(s),i.push(a)};return s(l),i},getContext:()=>({table:e,header:l,column:n})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(l,e)}),l}const nn={createTable:e=>{e.getHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o,r)=>{var l,i;const s=(l=o==null?void 0:o.map(g=>t.find(f=>f.id===g)).filter(Boolean))!=null?l:[],a=(i=r==null?void 0:r.map(g=>t.find(f=>f.id===g)).filter(Boolean))!=null?i:[],d=t.filter(g=>!(o!=null&&o.includes(g.id))&&!(r!=null&&r.includes(g.id)));return ee(n,[...s,...d,...a],e)},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getCenterHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o,r)=>(t=t.filter(l=>!(o!=null&&o.includes(l.id))&&!(r!=null&&r.includes(l.id))),ee(n,t,e,"center")),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeftHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(n,t,o)=>{var r;const l=(r=o==null?void 0:o.map(i=>t.find(s=>s.id===i)).filter(Boolean))!=null?r:[];return ee(n,l,e,"left")},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getRightHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(n,t,o)=>{var r;const l=(r=o==null?void 0:o.map(i=>t.find(s=>s.id===i)).filter(Boolean))!=null?r:[];return ee(n,l,e,"right")},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getFooterGroups=v(()=>[e.getHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeftFooterGroups=v(()=>[e.getLeftHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getCenterFooterGroups=v(()=>[e.getCenterHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getRightFooterGroups=v(()=>[e.getRightHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getFlatHeaders=v(()=>[e.getHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeftFlatHeaders=v(()=>[e.getLeftHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getCenterFlatHeaders=v(()=>[e.getCenterHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getRightFlatHeaders=v(()=>[e.getRightHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getCenterLeafHeaders=v(()=>[e.getCenterFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeftLeafHeaders=v(()=>[e.getLeftFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getRightLeafHeaders=v(()=>[e.getRightFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeafHeaders=v(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(n,t,o)=>{var r,l,i,s,a,d;return[...(r=(l=n[0])==null?void 0:l.headers)!=null?r:[],...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(a=(d=o[0])==null?void 0:d.headers)!=null?a:[]].map(u=>u.getLeafHeaders()).flat()},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}})}};function ee(e,n,t,o){var r,l;let i=0;const s=function(f,c){c===void 0&&(c=1),i=Math.max(i,c),f.filter(m=>m.getIsVisible()).forEach(m=>{var p;(p=m.columns)!=null&&p.length&&s(m.columns,c+1)},0)};s(e);let a=[];const d=(f,c)=>{const m={depth:c,id:[o,`${c}`].filter(Boolean).join("_"),headers:[]},p=[];f.forEach(h=>{const w=[...p].reverse()[0],P=h.column.depth===m.depth;let _,y=!1;if(P&&h.column.parent?_=h.column.parent:(_=h.column,y=!0),w&&(w==null?void 0:w.column)===_)w.subHeaders.push(h);else{const x=Xe(t,_,{id:[o,c,_.id,h==null?void 0:h.id].filter(Boolean).join("_"),isPlaceholder:y,placeholderId:y?`${p.filter(V=>V.column===_).length}`:void 0,depth:c,index:p.length});x.subHeaders.push(h),p.push(x)}m.headers.push(h),h.headerGroup=m}),a.push(m),c>0&&d(p,c-1)},u=n.map((f,c)=>Xe(t,f,{depth:i,index:c}));d(u,i-1),a.reverse();const g=f=>f.filter(m=>m.column.getIsVisible()).map(m=>{let p=0,h=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],g(m.subHeaders).forEach(_=>{let{colSpan:y,rowSpan:x}=_;p+=y,w.push(x)})):p=1;const P=Math.min(...w);return h=h+P,m.colSpan=p,m.rowSpan=h,{colSpan:p,rowSpan:h}});return g((r=(l=a[0])==null?void 0:l.headers)!=null?r:[]),a}const te={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},me=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),on={getDefaultColumnDef:()=>te,getInitialState:e=>({columnSizing:{},columnSizingInfo:me(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:I("columnSizing",e),onColumnSizingInfoChange:I("columnSizingInfo",e)}),createColumn:(e,n)=>{e.getSize=()=>{var t,o,r;const l=n.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:te.minSize,(o=l??e.columnDef.size)!=null?o:te.size),(r=e.columnDef.maxSize)!=null?r:te.maxSize)},e.getStart=t=>{const o=t?t==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns(),r=o.findIndex(l=>l.id===e.id);if(r>0){const l=o[r-1];return l.getStart(t)+l.getSize()}return 0},e.resetSize=()=>{n.setColumnSizing(t=>{let{[e.id]:o,...r}=t;return r})},e.getCanResize=()=>{var t,o;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((o=n.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>n.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,n)=>{e.getSize=()=>{let t=0;const o=r=>{if(r.subHeaders.length)r.subHeaders.forEach(o);else{var l;t+=(l=r.column.getSize())!=null?l:0}};return o(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=()=>{const t=n.getColumn(e.column.id),o=t==null?void 0:t.getCanResize();return r=>{if(!t||!o||(r.persist==null||r.persist(),Ce(r)&&r.touches&&r.touches.length>1))return;const l=e.getSize(),i=e?e.getLeafHeaders().map(p=>[p.column.id,p.column.getSize()]):[[t.id,t.getSize()]],s=Ce(r)?Math.round(r.touches[0].clientX):r.clientX,a={},d=(p,h)=>{typeof h=="number"&&(n.setColumnSizingInfo(w=>{var P,_;const y=h-((P=w==null?void 0:w.startOffset)!=null?P:0),x=Math.max(y/((_=w==null?void 0:w.startSize)!=null?_:0),-.999999);return w.columnSizingStart.forEach(V=>{let[L,K]=V;a[L]=Math.round(Math.max(K+K*x,0)*100)/100}),{...w,deltaOffset:y,deltaPercentage:x}}),(n.options.columnResizeMode==="onChange"||p==="end")&&n.setColumnSizing(w=>({...w,...a})))},u=p=>d("move",p),g=p=>{d("end",p),n.setColumnSizingInfo(h=>({...h,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f={moveHandler:p=>u(p.clientX),upHandler:p=>{document.removeEventListener("mousemove",f.moveHandler),document.removeEventListener("mouseup",f.upHandler),g(p.clientX)}},c={moveHandler:p=>(p.cancelable&&(p.preventDefault(),p.stopPropagation()),u(p.touches[0].clientX),!1),upHandler:p=>{var h;document.removeEventListener("touchmove",c.moveHandler),document.removeEventListener("touchend",c.upHandler),p.cancelable&&(p.preventDefault(),p.stopPropagation()),g((h=p.touches[0])==null?void 0:h.clientX)}},m=rn()?{passive:!1}:!1;Ce(r)?(document.addEventListener("touchmove",c.moveHandler,m),document.addEventListener("touchend",c.upHandler,m)):(document.addEventListener("mousemove",f.moveHandler,m),document.addEventListener("mouseup",f.upHandler,m)),n.setColumnSizingInfo(p=>({...p,startOffset:s,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,isResizingColumn:t.id}))}}},createTable:e=>{e.setColumnSizing=n=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(n),e.setColumnSizingInfo=n=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(n),e.resetColumnSizing=n=>{var t;e.setColumnSizing(n?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=n=>{var t;e.setColumnSizingInfo(n?me():(t=e.initialState.columnSizingInfo)!=null?t:me())},e.getTotalSize=()=>{var n,t;return(n=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0},e.getLeftTotalSize=()=>{var n,t;return(n=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0},e.getCenterTotalSize=()=>{var n,t;return(n=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0},e.getRightTotalSize=()=>{var n,t;return(n=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0}}};let ne=null;function rn(){if(typeof ne=="boolean")return ne;let e=!1;try{const n={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,n),window.removeEventListener("test",t)}catch{e=!1}return ne=e,ne}function Ce(e){return e.type==="touchstart"}const ln={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:I("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let n=!1,t=!1;e._autoResetExpanded=()=>{var o,r;if(!n){e._queue(()=>{n=!0});return}if((o=(r=e.options.autoResetAll)!=null?r:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var r,l;e.setExpanded(o?{}:(r=(l=e.initialState)==null?void 0:l.expanded)!=null?r:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{const o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(r=>!r.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(l=>{const i=l.split(".");o=Math.max(o,i.length)}),o},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,n)=>{e.toggleExpanded=t=>{n.setExpanded(o=>{var r;const l=o===!0?!0:!!(o!=null&&o[e.id]);let i={};if(o===!0?Object.keys(n.getRowModel().rowsById).forEach(s=>{i[s]=!0}):i=o,t=(r=t)!=null?r:!l,!l&&t)return{...i,[e.id]:!0};if(l&&!t){const{[e.id]:s,...a}=i;return a}return o})},e.getIsExpanded=()=>{var t;const o=n.getState().expanded;return!!((t=n.options.getIsRowExpanded==null?void 0:n.options.getIsRowExpanded(e))!=null?t:o===!0||o!=null&&o[e.id])},e.getCanExpand=()=>{var t,o,r;return(t=n.options.getRowCanExpand==null?void 0:n.options.getRowCanExpand(e))!=null?t:((o=n.options.enableExpanding)!=null?o:!0)&&!!((r=e.subRows)!=null&&r.length)},e.getIsAllParentsExpanded=()=>{let t=!0,o=e;for(;t&&o.parentId;)o=n.getRow(o.parentId,!0),t=o.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},ut=(e,n,t)=>{var o;const r=t.toLowerCase();return!!(!((o=e.getValue(n))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(r))};ut.autoRemove=e=>b(e);const at=(e,n,t)=>{var o;return!!(!((o=e.getValue(n))==null||(o=o.toString())==null)&&o.includes(t))};at.autoRemove=e=>b(e);const dt=(e,n,t)=>{var o;return((o=e.getValue(n))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(t==null?void 0:t.toLowerCase())};dt.autoRemove=e=>b(e);const gt=(e,n,t)=>{var o;return(o=e.getValue(n))==null?void 0:o.includes(t)};gt.autoRemove=e=>b(e)||!(e!=null&&e.length);const ct=(e,n,t)=>!t.some(o=>{var r;return!((r=e.getValue(n))!=null&&r.includes(o))});ct.autoRemove=e=>b(e)||!(e!=null&&e.length);const ft=(e,n,t)=>t.some(o=>{var r;return(r=e.getValue(n))==null?void 0:r.includes(o)});ft.autoRemove=e=>b(e)||!(e!=null&&e.length);const pt=(e,n,t)=>e.getValue(n)===t;pt.autoRemove=e=>b(e);const mt=(e,n,t)=>e.getValue(n)==t;mt.autoRemove=e=>b(e);const He=(e,n,t)=>{let[o,r]=t;const l=e.getValue(n);return l>=o&&l<=r};He.resolveFilterValue=e=>{let[n,t]=e,o=typeof n!="number"?parseFloat(n):n,r=typeof t!="number"?parseFloat(t):t,l=n===null||Number.isNaN(o)?-1/0:o,i=t===null||Number.isNaN(r)?1/0:r;if(l>i){const s=l;l=i,i=s}return[l,i]};He.autoRemove=e=>b(e)||b(e[0])&&b(e[1]);const H={includesString:ut,includesStringSensitive:at,equalsString:dt,arrIncludes:gt,arrIncludesAll:ct,arrIncludesSome:ft,equals:pt,weakEquals:mt,inNumberRange:He};function b(e){return e==null||e===""}const sn={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:I("columnFilters",e),onGlobalFilterChange:I("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:n=>{var t;const o=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[n.id])==null?void 0:t.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,n)=>{e.getAutoFilterFn=()=>{const t=n.getCoreRowModel().flatRows[0],o=t==null?void 0:t.getValue(e.id);return typeof o=="string"?H.includesString:typeof o=="number"?H.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?H.equals:Array.isArray(o)?H.arrIncludes:H.weakEquals},e.getFilterFn=()=>{var t,o;return ue(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(o=n.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?t:H[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,o,r;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((o=n.options.enableColumnFilters)!=null?o:!0)&&((r=n.options.enableFilters)!=null?r:!0)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var t,o,r,l;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((o=n.options.enableGlobalFilter)!=null?o:!0)&&((r=n.options.enableFilters)!=null?r:!0)&&((l=n.options.getColumnCanGlobalFilter==null?void 0:n.options.getColumnCanGlobalFilter(e))!=null?l:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=n.getState().columnFilters)==null||(t=t.find(o=>o.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,o;return(t=(o=n.getState().columnFilters)==null?void 0:o.findIndex(r=>r.id===e.id))!=null?t:-1},e.setFilterValue=t=>{n.setColumnFilters(o=>{const r=e.getFilterFn(),l=o==null?void 0:o.find(u=>u.id===e.id),i=k(t,l?l.value:void 0);if(Qe(r,i,e)){var s;return(s=o==null?void 0:o.filter(u=>u.id!==e.id))!=null?s:[]}const a={id:e.id,value:i};if(l){var d;return(d=o==null?void 0:o.map(u=>u.id===e.id?a:u))!=null?d:[]}return o!=null&&o.length?[...o,a]:[a]})},e._getFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),e._getFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}},createRow:(e,n)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>H.includesString,e.getGlobalFilterFn=()=>{var n,t;const{globalFilterFn:o}=e.options;return ue(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(n=(t=e.options.filterFns)==null?void 0:t[o])!=null?n:H[o]},e.setColumnFilters=n=>{const t=e.getAllLeafColumns(),o=r=>{var l;return(l=k(n,r))==null?void 0:l.filter(i=>{const s=t.find(a=>a.id===i.id);if(s){const a=s.getFilterFn();if(Qe(a,i.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.setGlobalFilter=n=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(n)},e.resetGlobalFilter=n=>{e.setGlobalFilter(n?void 0:e.initialState.globalFilter)},e.resetColumnFilters=n=>{var t,o;e.setColumnFilters(n?[]:(t=(o=e.initialState)==null?void 0:o.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}};function Qe(e,n,t){return(e&&e.autoRemove?e.autoRemove(n,t):!1)||typeof n>"u"||typeof n=="string"&&!n}const un=(e,n,t)=>t.reduce((o,r)=>{const l=r.getValue(e);return o+(typeof l=="number"?l:0)},0),an=(e,n,t)=>{let o;return t.forEach(r=>{const l=r.getValue(e);l!=null&&(o>l||o===void 0&&l>=l)&&(o=l)}),o},dn=(e,n,t)=>{let o;return t.forEach(r=>{const l=r.getValue(e);l!=null&&(o=l)&&(o=l)}),o},gn=(e,n,t)=>{let o,r;return t.forEach(l=>{const i=l.getValue(e);i!=null&&(o===void 0?i>=i&&(o=r=i):(o>i&&(o=i),r{let t=0,o=0;if(n.forEach(r=>{let l=r.getValue(e);l!=null&&(l=+l)>=l&&(++t,o+=l)}),t)return o/t},fn=(e,n)=>{if(!n.length)return;const t=n.map(l=>l.getValue(e));if(!Zt(t))return;if(t.length===1)return t[0];const o=Math.floor(t.length/2),r=t.sort((l,i)=>l-i);return t.length%2!==0?r[o]:(r[o-1]+r[o])/2},pn=(e,n)=>Array.from(new Set(n.map(t=>t.getValue(e))).values()),mn=(e,n)=>new Set(n.map(t=>t.getValue(e))).size,Cn=(e,n)=>n.length,Se={sum:un,min:an,max:dn,extent:gn,mean:cn,median:fn,unique:pn,uniqueCount:mn,count:Cn},Sn={getDefaultColumnDef:()=>({aggregatedCell:e=>{var n,t;return(n=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?n:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:I("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,n)=>{e.toggleGrouping=()=>{n.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(o=>o!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,o,r,l;return(t=(o=(r=(l=e.columnDef.enableGrouping)!=null?l:!0)!=null?r:n.options.enableGrouping)!=null?o:!0)!=null?t:!!e.accessorFn},e.getIsGrouped=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=n.getCoreRowModel().flatRows[0],o=t==null?void 0:t.getValue(e.id);if(typeof o=="number")return Se.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Se.extent},e.getAggregationFn=()=>{var t,o;if(!e)throw new Error;return ue(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(o=n.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?t:Se[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=n=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(n),e.resetGrouping=n=>{var t,o;e.setGrouping(n?[]:(t=(o=e.initialState)==null?void 0:o.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,n)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const o=n.getColumn(t);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[t]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,n,t,o)=>{e.getIsGrouped=()=>n.getIsGrouped()&&n.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&n.getIsGrouped(),e.getIsAggregated=()=>{var r;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((r=t.subRows)!=null&&r.length)}}};function vn(e,n,t){if(!(n!=null&&n.length)||!t)return e;const o=e.filter(l=>!n.includes(l.id));return t==="remove"?o:[...n.map(l=>e.find(i=>i.id===l)).filter(Boolean),...o]}const hn={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:I("columnOrder",e)}),createTable:e=>{e.setColumnOrder=n=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(n),e.resetColumnOrder=n=>{var t;e.setColumnOrder(n?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=v(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(n,t,o)=>r=>{let l=[];if(!(n!=null&&n.length))l=r;else{const i=[...n],s=[...r];for(;s.length&&i.length;){const a=i.shift(),d=s.findIndex(u=>u.id===a);d>-1&&l.push(s.splice(d,1)[0])}l=[...l,...s]}return vn(l,t,o)},{key:!1})}},ye=0,xe=10,ve=()=>({pageIndex:ye,pageSize:xe}),Rn={getInitialState:e=>({...e,pagination:{...ve(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:I("pagination",e)}),createTable:e=>{let n=!1,t=!1;e._autoResetPageIndex=()=>{var o,r;if(!n){e._queue(()=>{n=!0});return}if((o=(r=e.options.autoResetAll)!=null?r:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=o=>{const r=l=>k(o,l);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(r)},e.resetPagination=o=>{var r;e.setPagination(o?ve():(r=e.initialState.pagination)!=null?r:ve())},e.setPageIndex=o=>{e.setPagination(r=>{let l=k(o,r.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return l=Math.max(0,Math.min(l,i)),{...r,pageIndex:l}})},e.resetPageIndex=o=>{var r,l;e.setPageIndex(o?ye:(r=(l=e.initialState)==null||(l=l.pagination)==null?void 0:l.pageIndex)!=null?r:ye)},e.resetPageSize=o=>{var r,l;e.setPageSize(o?xe:(r=(l=e.initialState)==null||(l=l.pagination)==null?void 0:l.pageSize)!=null?r:xe)},e.setPageSize=o=>{e.setPagination(r=>{const l=Math.max(1,k(o,r.pageSize)),i=r.pageSize*r.pageIndex,s=Math.floor(i/l);return{...r,pageIndex:s,pageSize:l}})},e.setPageCount=o=>e.setPagination(r=>{var l;let i=k(o,(l=e.options.pageCount)!=null?l:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...r,pageCount:i}}),e.getPageOptions=v(()=>[e.getPageCount()],o=>{let r=[];return o&&o>0&&(r=[...new Array(o)].fill(null).map((l,i)=>i)),r},{key:!1,debug:()=>{var o;return(o=e.options.debugAll)!=null?o:e.options.debugTable}}),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,r=e.getPageCount();return r===-1?!0:r===0?!1:oe.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}},he=()=>({left:[],right:[]}),Re=()=>({top:[],bottom:[]}),wn={getInitialState:e=>({columnPinning:he(),rowPinning:Re(),...e}),getDefaultOptions:e=>({onColumnPinningChange:I("columnPinning",e),onRowPinningChange:I("rowPinning",e)}),createColumn:(e,n)=>{e.pin=t=>{const o=e.getLeafColumns().map(r=>r.id).filter(Boolean);n.setColumnPinning(r=>{var l,i;if(t==="right"){var s,a;return{left:((s=r==null?void 0:r.left)!=null?s:[]).filter(g=>!(o!=null&&o.includes(g))),right:[...((a=r==null?void 0:r.right)!=null?a:[]).filter(g=>!(o!=null&&o.includes(g))),...o]}}if(t==="left"){var d,u;return{left:[...((d=r==null?void 0:r.left)!=null?d:[]).filter(g=>!(o!=null&&o.includes(g))),...o],right:((u=r==null?void 0:r.right)!=null?u:[]).filter(g=>!(o!=null&&o.includes(g)))}}return{left:((l=r==null?void 0:r.left)!=null?l:[]).filter(g=>!(o!=null&&o.includes(g))),right:((i=r==null?void 0:r.right)!=null?i:[]).filter(g=>!(o!=null&&o.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var r,l,i;return((r=o.columnDef.enablePinning)!=null?r:!0)&&((l=(i=n.options.enableColumnPinning)!=null?i:n.options.enablePinning)!=null?l:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(s=>s.id),{left:o,right:r}=n.getState().columnPinning,l=t.some(s=>o==null?void 0:o.includes(s)),i=t.some(s=>r==null?void 0:r.includes(s));return l?"left":i?"right":!1},e.getPinnedIndex=()=>{var t,o;const r=e.getIsPinned();return r?(t=(o=n.getState().columnPinning)==null||(o=o[r])==null?void 0:o.indexOf(e.id))!=null?t:-1:0}},createRow:(e,n)=>{e.pin=(t,o,r)=>{const l=o?e.getLeafRows().map(a=>{let{id:d}=a;return d}):[],i=r?e.getParentRows().map(a=>{let{id:d}=a;return d}):[],s=new Set([...i,e.id,...l]);n.setRowPinning(a=>{var d,u;if(t==="bottom"){var g,f;return{top:((g=a==null?void 0:a.top)!=null?g:[]).filter(p=>!(s!=null&&s.has(p))),bottom:[...((f=a==null?void 0:a.bottom)!=null?f:[]).filter(p=>!(s!=null&&s.has(p))),...Array.from(s)]}}if(t==="top"){var c,m;return{top:[...((c=a==null?void 0:a.top)!=null?c:[]).filter(p=>!(s!=null&&s.has(p))),...Array.from(s)],bottom:((m=a==null?void 0:a.bottom)!=null?m:[]).filter(p=>!(s!=null&&s.has(p)))}}return{top:((d=a==null?void 0:a.top)!=null?d:[]).filter(p=>!(s!=null&&s.has(p))),bottom:((u=a==null?void 0:a.bottom)!=null?u:[]).filter(p=>!(s!=null&&s.has(p)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:o,enablePinning:r}=n.options;return typeof o=="function"?o(e):(t=o??r)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:o,bottom:r}=n.getState().rowPinning,l=t.some(s=>o==null?void 0:o.includes(s)),i=t.some(s=>r==null?void 0:r.includes(s));return l?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var t,o;const r=e.getIsPinned();if(!r)return-1;const l=(t=n._getPinnedRows(r))==null?void 0:t.map(i=>{let{id:s}=i;return s});return(o=l==null?void 0:l.indexOf(e.id))!=null?o:-1},e.getCenterVisibleCells=v(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,n.getState().columnPinning.right],(t,o,r)=>{const l=[...o??[],...r??[]];return t.filter(i=>!l.includes(i.column.id))},{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}}),e.getLeftVisibleCells=v(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,,],(t,o)=>(o??[]).map(l=>t.find(i=>i.column.id===l)).filter(Boolean).map(l=>({...l,position:"left"})),{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}}),e.getRightVisibleCells=v(()=>[e._getAllVisibleCells(),n.getState().columnPinning.right],(t,o)=>(o??[]).map(l=>t.find(i=>i.column.id===l)).filter(Boolean).map(l=>({...l,position:"right"})),{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}})},createTable:e=>{e.setColumnPinning=n=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(n),e.resetColumnPinning=n=>{var t,o;return e.setColumnPinning(n?he():(t=(o=e.initialState)==null?void 0:o.columnPinning)!=null?t:he())},e.getIsSomeColumnsPinned=n=>{var t;const o=e.getState().columnPinning;if(!n){var r,l;return!!((r=o.left)!=null&&r.length||(l=o.right)!=null&&l.length)}return!!((t=o[n])!=null&&t.length)},e.getLeftLeafColumns=v(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(n,t)=>(t??[]).map(o=>n.find(r=>r.id===o)).filter(Boolean),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugColumns}}),e.getRightLeafColumns=v(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(n,t)=>(t??[]).map(o=>n.find(r=>r.id===o)).filter(Boolean),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugColumns}}),e.getCenterLeafColumns=v(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o)=>{const r=[...t??[],...o??[]];return n.filter(l=>!r.includes(l.id))},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugColumns}}),e.setRowPinning=n=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(n),e.resetRowPinning=n=>{var t,o;return e.setRowPinning(n?Re():(t=(o=e.initialState)==null?void 0:o.rowPinning)!=null?t:Re())},e.getIsSomeRowsPinned=n=>{var t;const o=e.getState().rowPinning;if(!n){var r,l;return!!((r=o.top)!=null&&r.length||(l=o.bottom)!=null&&l.length)}return!!((t=o[n])!=null&&t.length)},e._getPinnedRows=n=>v(()=>[e.getRowModel().rows,e.getState().rowPinning[n]],(t,o)=>{var r;return((r=e.options.keepPinnedRows)==null||r?(o??[]).map(i=>{const s=e.getRow(i,!0);return s.getIsAllParentsExpanded()?s:null}):(o??[]).map(i=>t.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:n}))},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugRows}})(),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=v(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(n,t,o)=>{const r=new Set([...t??[],...o??[]]);return n.filter(l=>!r.has(l.id))},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}})}},_n={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:I("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=n=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(n),e.resetRowSelection=n=>{var t;return e.setRowSelection(n?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=n=>{e.setRowSelection(t=>{n=typeof n<"u"?n:!e.getIsAllRowsSelected();const o={...t},r=e.getPreGroupedRowModel().flatRows;return n?r.forEach(l=>{l.getCanSelect()&&(o[l.id]=!0)}):r.forEach(l=>{delete o[l.id]}),o})},e.toggleAllPageRowsSelected=n=>e.setRowSelection(t=>{const o=typeof n<"u"?n:!e.getIsAllPageRowsSelected(),r={...t};return e.getRowModel().rows.forEach(l=>{Fe(r,l.id,o,!0,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=v(()=>[e.getState().rowSelection,e.getCoreRowModel()],(n,t)=>Object.keys(n).length?we(e,t):{rows:[],flatRows:[],rowsById:{}},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}}),e.getFilteredSelectedRowModel=v(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(n,t)=>Object.keys(n).length?we(e,t):{rows:[],flatRows:[],rowsById:{}},{key:"getFilteredSelectedRowModel",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}}),e.getGroupedSelectedRowModel=v(()=>[e.getState().rowSelection,e.getSortedRowModel()],(n,t)=>Object.keys(n).length?we(e,t):{rows:[],flatRows:[],rowsById:{}},{key:"getGroupedSelectedRowModel",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}}),e.getIsAllRowsSelected=()=>{const n=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let o=!!(n.length&&Object.keys(t).length);return o&&n.some(r=>r.getCanSelect()&&!t[r.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows.filter(r=>r.getCanSelect()),{rowSelection:t}=e.getState();let o=!!n.length;return o&&n.some(r=>!t[r.id])&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var n;const t=Object.keys((n=e.getState().rowSelection)!=null?n:{}).length;return t>0&&t{const n=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:n.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>n=>{e.toggleAllRowsSelected(n.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>n=>{e.toggleAllPageRowsSelected(n.target.checked)}},createRow:(e,n)=>{e.toggleSelected=(t,o)=>{const r=e.getIsSelected();n.setRowSelection(l=>{var i;if(t=typeof t<"u"?t:!r,e.getCanSelect()&&r===t)return l;const s={...l};return Fe(s,e.id,t,(i=o==null?void 0:o.selectChildren)!=null?i:!0,n),s})},e.getIsSelected=()=>{const{rowSelection:t}=n.getState();return Le(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=n.getState();return Pe(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=n.getState();return Pe(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof n.options.enableRowSelection=="function"?n.options.enableRowSelection(e):(t=n.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof n.options.enableSubRowSelection=="function"?n.options.enableSubRowSelection(e):(t=n.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof n.options.enableMultiRowSelection=="function"?n.options.enableMultiRowSelection(e):(t=n.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return o=>{var r;t&&e.toggleSelected((r=o.target)==null?void 0:r.checked)}}}},Fe=(e,n,t,o,r)=>{var l;const i=r.getRow(n);t?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[n]=!0)):delete e[n],o&&(l=i.subRows)!=null&&l.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>Fe(e,s.id,t,o,r))};function we(e,n){const t=e.getState().rowSelection,o=[],r={},l=function(i,s){return i.map(a=>{var d;const u=Le(a,t);if(u&&(o.push(a),r[a.id]=a),(d=a.subRows)!=null&&d.length&&(a={...a,subRows:l(a.subRows)}),u)return a}).filter(Boolean)};return{rows:l(n.rows),flatRows:o,rowsById:r}}function Le(e,n){var t;return(t=n[e.id])!=null?t:!1}function Pe(e,n,t){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let r=!0,l=!1;return e.subRows.forEach(i=>{if(!(l&&!r)&&(i.getCanSelect()&&(Le(i,n)?l=!0:r=!1),i.subRows&&i.subRows.length)){const s=Pe(i,n);s==="all"?l=!0:(s==="some"&&(l=!0),r=!1)}}),r?"all":l?"some":!1}const Ae=/([0-9]+)/gm,$n=(e,n,t)=>Ct(j(e.getValue(t)).toLowerCase(),j(n.getValue(t)).toLowerCase()),yn=(e,n,t)=>Ct(j(e.getValue(t)),j(n.getValue(t))),xn=(e,n,t)=>Oe(j(e.getValue(t)).toLowerCase(),j(n.getValue(t)).toLowerCase()),Fn=(e,n,t)=>Oe(j(e.getValue(t)),j(n.getValue(t))),Pn=(e,n,t)=>{const o=e.getValue(t),r=n.getValue(t);return o>r?1:oOe(e.getValue(t),n.getValue(t));function Oe(e,n){return e===n?0:e>n?1:-1}function j(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Ct(e,n){const t=e.split(Ae).filter(Boolean),o=n.split(Ae).filter(Boolean);for(;t.length&&o.length;){const r=t.shift(),l=o.shift(),i=parseInt(r,10),s=parseInt(l,10),a=[i,s].sort();if(isNaN(a[0])){if(r>l)return 1;if(l>r)return-1;continue}if(isNaN(a[1]))return isNaN(i)?-1:1;if(i>s)return 1;if(s>i)return-1}return t.length-o.length}const W={alphanumeric:$n,alphanumericCaseSensitive:yn,text:xn,textCaseSensitive:Fn,datetime:Pn,basic:An},Mn={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:I("sorting",e),isMultiSortEvent:n=>n.shiftKey}),createColumn:(e,n)=>{e.getAutoSortingFn=()=>{const t=n.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const r of t){const l=r==null?void 0:r.getValue(e.id);if(Object.prototype.toString.call(l)==="[object Date]")return W.datetime;if(typeof l=="string"&&(o=!0,l.split(Ae).length>1))return W.alphanumeric}return o?W.text:W.basic},e.getAutoSortDir=()=>{const t=n.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,o;if(!e)throw new Error;return ue(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(o=n.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?t:W[e.columnDef.sortingFn]},e.toggleSorting=(t,o)=>{const r=e.getNextSortingOrder(),l=typeof t<"u"&&t!==null;n.setSorting(i=>{const s=i==null?void 0:i.find(c=>c.id===e.id),a=i==null?void 0:i.findIndex(c=>c.id===e.id);let d=[],u,g=l?t:r==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&o?s?u="toggle":u="add":i!=null&&i.length&&a!==i.length-1?u="replace":s?u="toggle":u="replace",u==="toggle"&&(l||r||(u="remove")),u==="add"){var f;d=[...i,{id:e.id,desc:g}],d.splice(0,d.length-((f=n.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?d=i.map(c=>c.id===e.id?{...c,desc:g}:c):u==="remove"?d=i.filter(c=>c.id!==e.id):d=[{id:e.id,desc:g}];return d})},e.getFirstSortDir=()=>{var t,o;return((t=(o=e.columnDef.sortDescFirst)!=null?o:n.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var o,r;const l=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==l&&((o=n.options.enableSortingRemoval)==null||o)&&(!(t&&(r=n.options.enableMultiRemove)!=null)||r)?!1:i==="desc"?"asc":"desc":l},e.getCanSort=()=>{var t,o;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((o=n.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,o;return(t=(o=e.columnDef.enableMultiSort)!=null?o:n.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const o=(t=n.getState().sorting)==null?void 0:t.find(r=>r.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,o;return(t=(o=n.getState().sorting)==null?void 0:o.findIndex(r=>r.id===e.id))!=null?t:-1},e.clearSorting=()=>{n.setSorting(t=>t!=null&&t.length?t.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return o=>{t&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?n.options.isMultiSortEvent==null?void 0:n.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=n=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(n),e.resetSorting=n=>{var t,o;e.setSorting(n?[]:(t=(o=e.initialState)==null?void 0:o.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},In={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:I("columnVisibility",e)}),createColumn:(e,n)=>{e.toggleVisibility=t=>{e.getCanHide()&&n.setColumnVisibility(o=>({...o,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,o;return(t=(o=n.getState().columnVisibility)==null?void 0:o[e.id])!=null?t:!0},e.getCanHide=()=>{var t,o;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((o=n.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,n)=>{e._getAllVisibleCells=v(()=>[e.getAllCells(),n.getState().columnVisibility],t=>t.filter(o=>o.column.getIsVisible()),{key:"row._getAllVisibleCells",debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}}),e.getVisibleCells=v(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,o,r)=>[...t,...o,...r],{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}})},createTable:e=>{const n=(t,o)=>v(()=>[o(),o().filter(r=>r.getIsVisible()).map(r=>r.id).join("_")],r=>r.filter(l=>l.getIsVisible==null?void 0:l.getIsVisible()),{key:t,debug:()=>{var r;return(r=e.options.debugAll)!=null?r:e.options.debugColumns}});e.getVisibleFlatColumns=n("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=n("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=n("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=n("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=n("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var o;e.setColumnVisibility(t?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=t=>{var o;t=(o=t)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((r,l)=>({...r,[l.id]:t||!(l.getCanHide!=null&&l.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var o;e.toggleAllColumnsVisible((o=t.target)==null?void 0:o.checked)}}},Ye=[nn,In,hn,wn,sn,Mn,Sn,ln,Rn,_n,on];function Vn(e){var n;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let t={_features:Ye};const o=t._features.reduce((u,g)=>Object.assign(u,g.getDefaultOptions==null?void 0:g.getDefaultOptions(t)),{}),r=u=>t.options.mergeOptions?t.options.mergeOptions(o,u):{...o,...u};let i={...{},...(n=e.initialState)!=null?n:{}};t._features.forEach(u=>{var g;i=(g=u.getInitialState==null?void 0:u.getInitialState(i))!=null?g:i});const s=[];let a=!1;const d={_features:Ye,options:{...o,...e},initialState:i,_queue:u=>{s.push(u),a||(a=!0,Promise.resolve().then(()=>{for(;s.length;)s.shift()();a=!1}).catch(g=>setTimeout(()=>{throw g})))},reset:()=>{t.setState(t.initialState)},setOptions:u=>{const g=k(u,t.options);t.options=r(g)},getState:()=>t.options.state,setState:u=>{t.options.onStateChange==null||t.options.onStateChange(u)},_getRowId:(u,g,f)=>{var c;return(c=t.options.getRowId==null?void 0:t.options.getRowId(u,g,f))!=null?c:`${f?[f.id,g].join("."):g}`},getCoreRowModel:()=>(t._getCoreRowModel||(t._getCoreRowModel=t.options.getCoreRowModel(t)),t._getCoreRowModel()),getRowModel:()=>t.getPaginationRowModel(),getRow:(u,g)=>{const f=(g?t.getCoreRowModel():t.getRowModel()).rowsById[u];if(!f)throw new Error;return f},_getDefaultColumnDef:v(()=>[t.options.defaultColumn],u=>{var g;return u=(g=u)!=null?g:{},{header:f=>{const c=f.header.column.columnDef;return c.accessorKey?c.accessorKey:c.accessorFn?c.id:null},cell:f=>{var c,m;return(c=(m=f.renderValue())==null||m.toString==null?void 0:m.toString())!=null?c:null},...t._features.reduce((f,c)=>Object.assign(f,c.getDefaultColumnDef==null?void 0:c.getDefaultColumnDef()),{}),...u}},{debug:()=>{var u;return(u=t.options.debugAll)!=null?u:t.options.debugColumns},key:!1}),_getColumnDefs:()=>t.options.columns,getAllColumns:v(()=>[t._getColumnDefs()],u=>{const g=function(f,c,m){return m===void 0&&(m=0),f.map(p=>{const h=tn(t,p,m,c),w=p;return h.columns=w.columns?g(w.columns,h,m+1):[],h})};return g(u)},{key:!1,debug:()=>{var u;return(u=t.options.debugAll)!=null?u:t.options.debugColumns}}),getAllFlatColumns:v(()=>[t.getAllColumns()],u=>u.flatMap(g=>g.getFlatColumns()),{key:!1,debug:()=>{var u;return(u=t.options.debugAll)!=null?u:t.options.debugColumns}}),_getAllFlatColumnsById:v(()=>[t.getAllFlatColumns()],u=>u.reduce((g,f)=>(g[f.id]=f,g),{}),{key:!1,debug:()=>{var u;return(u=t.options.debugAll)!=null?u:t.options.debugColumns}}),getAllLeafColumns:v(()=>[t.getAllColumns(),t._getOrderColumnsFn()],(u,g)=>{let f=u.flatMap(c=>c.getLeafColumns());return g(f)},{key:!1,debug:()=>{var u;return(u=t.options.debugAll)!=null?u:t.options.debugColumns}}),getColumn:u=>t._getAllFlatColumnsById()[u]};Object.assign(t,d);for(let u=0;u{var i;return(i=l.getValue())!=null?i:e.options.renderFallbackValue},l={id:`${n.id}_${t.id}`,row:n,column:t,getValue:()=>n.getValue(o),renderValue:r,getContext:v(()=>[e,t,n,l],(i,s,a,d)=>({table:i,column:s,row:a,cell:d,getValue:d.getValue,renderValue:d.renderValue}),{key:!1,debug:()=>e.options.debugAll})};return e._features.forEach(i=>{i.createCell==null||i.createCell(l,t,n,e)},{}),l}const En=(e,n,t,o,r,l,i)=>{let s={id:n,index:o,original:t,depth:r,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(s._valuesCache.hasOwnProperty(a))return s._valuesCache[a];const d=e.getColumn(a);if(d!=null&&d.accessorFn)return s._valuesCache[a]=d.accessorFn(s.original,o),s._valuesCache[a]},getUniqueValues:a=>{if(s._uniqueValuesCache.hasOwnProperty(a))return s._uniqueValuesCache[a];const d=e.getColumn(a);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(s._uniqueValuesCache[a]=d.columnDef.getUniqueValues(s.original,o),s._uniqueValuesCache[a]):(s._uniqueValuesCache[a]=[s.getValue(a)],s._uniqueValuesCache[a])},renderValue:a=>{var d;return(d=s.getValue(a))!=null?d:e.options.renderFallbackValue},subRows:l??[],getLeafRows:()=>en(s.subRows,a=>a.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId):void 0,getParentRows:()=>{let a=[],d=s;for(;;){const u=d.getParentRow();if(!u)break;a.push(u),d=u}return a.reverse()},getAllCells:v(()=>[e.getAllLeafColumns()],a=>a.map(d=>bn(e,s,d,d.id)),{key:!1,debug:()=>{var a;return(a=e.options.debugAll)!=null?a:e.options.debugRows}}),_getAllCellsByColumnId:v(()=>[s.getAllCells()],a=>a.reduce((d,u)=>(d[u.column.id]=u,d),{}),{key:"row.getAllCellsByColumnId",debug:()=>{var a;return(a=e.options.debugAll)!=null?a:e.options.debugRows}})};for(let a=0;av(()=>[e.options.data],n=>{const t={rows:[],flatRows:[],rowsById:{}},o=function(r,l,i){l===void 0&&(l=0);const s=[];for(let d=0;d{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})}function Hn(){return e=>v(()=>[e.getState().sorting,e.getPreSortedRowModel()],(n,t)=>{if(!t.rows.length||!(n!=null&&n.length))return t;const o=e.getState().sorting,r=[],l=o.filter(a=>{var d;return(d=e.getColumn(a.id))==null?void 0:d.getCanSort()}),i={};l.forEach(a=>{const d=e.getColumn(a.id);d&&(i[a.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const s=a=>{const d=[...a];return d.sort((u,g)=>{for(let c=0;c{var g;r.push(u),(g=u.subRows)!=null&&g.length&&(u.subRows=s(u.subRows))}),d};return{rows:s(t.rows),flatRows:r,rowsById:t.rowsById}},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})}/** + * react-table + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Je(e,n){return e?Ln(e)?$.createElement(e,n):e:null}function Ln(e){return On(e)||typeof e=="function"||Gn(e)}function On(e){return typeof e=="function"&&(()=>{const n=Object.getPrototypeOf(e);return n.prototype&&n.prototype.isReactComponent})()}function Gn(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Tn(e){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=$.useState(()=>({current:Vn(n)})),[o,r]=$.useState(()=>t.current.initialState);return t.current.setOptions(l=>({...l,...e,state:{...o,...e.state},onStateChange:i=>{r(i),e.onStateChange==null||e.onStateChange(i)}})),t.current}const kn="_tr_ludqf_1",zn="_pointer_ludqf_6",jn="_table_ludqf_10",Nn="_thWrap_ludqf_38",Bn="_sortIconContainer_ludqf_48",qn="_rotate180_ludqf_55",T={tr:kn,pointer:zn,table:jn,thWrap:Nn,sortIconContainer:Bn,rotate180:qn},St=[{header:"Id",accessorKey:"id"},{header:"Host",accessorKey:"host"},{header:"Process",accessorKey:"process"},{header:"DL",accessorKey:"download",cell:e=>Z(e.getValue())},{header:"UL",accessorKey:"upload",cell:e=>Z(e.getValue())},{header:"DL Speed",accessorKey:"downloadSpeedCurr",cell:e=>Z(e.getValue())+"/s"},{header:"UL Speed",accessorKey:"uploadSpeedCurr",cell:e=>Z(e.getValue())+"/s"},{header:"Chains",accessorKey:"chains"},{header:"Rule",accessorKey:"rule"},{header:"Time",accessorKey:"start",cell:e=>It(e.getValue(),0)},{header:"Source",accessorKey:"source"},{header:"Destination IP",accessorKey:"destinationIP"},{header:"Type",accessorKey:"type"}],Un=[{id:"id",desc:!0}],Kn=St,Wn=St.filter(e=>e.accessorKey!=="process");function Xn({data:e}){const n=M.useContext(ot),[t,o]=M.useState(Un),r=Tn({columns:n.hasProcessPath?Kn:Wn,data:e,state:{sorting:t,columnVisibility:{id:!1}},onSortingChange:o,getCoreRowModel:Dn(),getSortedRowModel:Hn()});return S.jsxs("table",{className:T.table,children:[S.jsx("thead",{children:r.getHeaderGroups().map(l=>S.jsx("tr",{children:l.headers.map(i=>S.jsx("th",{className:i.column.getCanSort()?z(T.th,T.pointer):T.th,onClick:i.column.getToggleSortingHandler(),children:S.jsxs("span",{className:T.thWrap,children:[S.jsx("span",{children:Je(i.column.columnDef.header,i.getContext())}),i.column.getIsSorted()?S.jsx("span",{className:i.column.getIsSorted()==="desc"?T.sortIconContainer:z(T.rotate180,T.sortIconContainer),children:S.jsx(Vt,{size:16})}):null]})},i.id))},l.id))}),S.jsx("tbody",{children:r.getRowModel().rows.map(l=>S.jsx("tr",{children:l.getVisibleCells().map(i=>S.jsx("td",{children:Je(i.column.columnDef.cell,i.getContext())},i.id))},l.id))})]})}const Qn="_overlay_148w6_1",Yn="_cnt_148w6_5",Jn="_afterOpen_148w6_15",Zn="_btngrp_148w6_20",oe={overlay:Qn,cnt:Yn,afterOpen:Jn,btngrp:Zn},{useRef:eo,useCallback:to,useMemo:no}=M;function oo({isOpen:e,onRequestClose:n,primaryButtonOnTap:t}){const o=eo(null),r=to(()=>{o.current.focus()},[]),l=no(()=>({base:z(Ue.content,oe.cnt),afterOpen:oe.afterOpen,beforeClose:""}),[]);return S.jsxs(wt,{isOpen:e,onRequestClose:n,onAfterOpen:r,className:l,overlayClassName:z(Ue.overlay,oe.overlay),children:[S.jsx("p",{children:"Are you sure you want to close all connections?"}),S.jsxs("div",{className:oe.btngrp,children:[S.jsx(qe,{onClick:t,ref:o,children:"I'm sure"}),S.jsx("div",{style:{width:20}}),S.jsx(qe,{onClick:n,children:"No"})]})]})}const{useEffect:ro,useState:X,useRef:lo,useCallback:Q}=M,Ze=30;function io(e){const n={};for(let t=0;t[t.host,t.sourceIP,t.sourcePort,t.destinationIP,t.chains,t.rule,t.type,t.network,t.processPath].some(o=>uo(o,n))):e}function ao(e,n,t,o){const{id:r,metadata:l,upload:i,download:s,start:a,chains:d,rule:u,rulePayload:g}=e,{host:f,destinationPort:c,destinationIP:m,network:p,type:h,sourceIP:w,sourcePort:P}=l,_=l.processPath;o.hasProcessPath===!1&&typeof _<"u"&&(o.hasProcessPath=!0);let y=f;y===""&&(y=m);const x=n[r];return{id:r,upload:i,download:s,start:t-new Date(a).valueOf(),chains:d.reverse().join(" / "),rule:g?`${u}(${g})`:u,...l,host:`${y}:${c}`,type:`${h}(${p})`,source:`${w}:${P}`,downloadSpeedCurr:s-(x?x.download:0),uploadSpeedCurr:i-(x?x.upload:0),process:so(_)}}function tt(e){return e.length>0?S.jsx(Xn,{data:e}):S.jsx("div",{className:Y.placeHolder,children:S.jsx(At,{width:200,height:200,c1:"var(--color-text)"})})}function nt({qty:e}){return e<100?""+e:"99+"}function go({apiConfig:e}){const[n,t]=Mt(),[o,r]=X([]),[l,i]=X([]),[s,a]=X(""),d=et(o,s),u=et(l,s),[g,f]=X(!1),c=Q(()=>f(!0),[]),m=Q(()=>f(!1),[]),[p,h]=X(!1),w=Q(()=>h(L=>!L),[]),P=Q(()=>{$t(e),m()},[e,m]),_=lo(o),y=M.useContext(ot),x=Q(({connections:L})=>{const K=io(_.current),Ge=Date.now(),N=L.map(O=>ao(O,K,Ge,y)),de=[];for(const O of _.current)N.findIndex(R=>R.id===O.id)<0&&de.push(O);i(O=>[...de,...O].slice(0,101)),N&&(N.length!==0||_.current.length!==0)&&!p?(_.current=N,r(N)):_.current=N},[r,p,y]);ro(()=>yt(e,x),[e,x]);const{t:V}=xt();return S.jsxs("div",{children:[S.jsx(Ft,{title:V("Connections")}),S.jsxs(Ee,{children:[S.jsxs("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"space-between"},children:[S.jsxs(De,{children:[S.jsxs(ie,{children:[S.jsx("span",{children:V("Active")}),S.jsx("span",{className:Y.connQty,children:nt({qty:d.length})})]}),S.jsxs(ie,{children:[S.jsx("span",{children:V("Closed")}),S.jsx("span",{className:Y.connQty,children:nt({qty:u.length})})]})]}),S.jsx("div",{className:Y.inputWrapper,children:S.jsx("input",{type:"text",name:"filter",autoComplete:"off",className:Y.input,placeholder:"Filter",onChange:L=>a(L.target.value)})})]}),S.jsx("div",{ref:n,style:{padding:30,paddingBottom:Ze,paddingTop:0},children:S.jsxs("div",{style:{height:t-Ze,overflow:"auto"},children:[S.jsxs(se,{children:[S.jsx(S.Fragment,{children:tt(d)}),S.jsx(bt,{icon:p?S.jsx(Ht,{size:16}):S.jsx(Lt,{size:16}),mainButtonStyles:p?{background:"#e74c3c"}:{},style:Et,text:V(p?"Resume Refresh":"Pause Refresh"),onClick:w,children:S.jsx(Dt,{text:"Close All Connections",onClick:c,children:S.jsx(Tt,{size:10})})})]}),S.jsx(se,{children:tt(u)})]})}),S.jsx(oo,{isOpen:g,primaryButtonOnTap:P,onRequestClose:m})]})]})}const co=e=>({apiConfig:Pt(e)}),ho=_t(co)(go);export{ho as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Fab-4f386fe2.js b/FILES/etc/config/clash/clash-dashboard/assets/Fab-a6cf5682.js similarity index 96% rename from FILES/etc/config/clash/clash-dashboard/assets/Fab-4f386fe2.js rename to FILES/etc/config/clash/clash-dashboard/assets/Fab-a6cf5682.js index c7e5410..9f2acab 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Fab-4f386fe2.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Fab-a6cf5682.js @@ -1 +1 @@ -import{j as t,e as C,r as l}from"./index-c925a4cb.js";const E="_spining_4i8sg_1",I="_spining_keyframes_4i8sg_1",y={spining:E,spining_keyframes:I},{useState:F}=C;function A({children:n}){return t.jsx("span",{className:y.spining,children:n})}const B={right:10,bottom:10},R=({children:n,...e})=>t.jsx("button",{type:"button",...e,className:"rtf--ab",children:n}),M=({children:n,...e})=>t.jsx("button",{type:"button",className:"rtf--mb",...e,children:n}),v={bottom:24,right:24},H=({event:n="hover",style:e=v,alwaysShowTitle:o=!1,children:b,icon:f,mainButtonStyles:g,onClick:p,text:u,...x})=>{const[a,r]=F(!1),c=o||!a,d=()=>r(!0),m=()=>r(!1),h=()=>n==="hover"&&d(),_=()=>n==="hover"&&m(),j=s=>p?p(s):(s.persist(),n==="click"?a?m():d():null),k=(s,i)=>{s.persist(),r(!1),setTimeout(()=>{i(s)},1)},N=()=>l.Children.map(b,(s,i)=>l.isValidElement(s)?t.jsxs("li",{className:`rtf--ab__c ${"top"in e?"top":""}`,children:[l.cloneElement(s,{"data-testid":`action-button-${i}`,"aria-label":s.props.text||`Menu button ${i+1}`,"aria-hidden":c,tabIndex:a?0:-1,...s.props,onClick:$=>{s.props.onClick&&k($,s.props.onClick)}}),s.props.text&&t.jsx("span",{className:`${"right"in e?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:s.props.text})]}):null);return t.jsx("ul",{onMouseEnter:h,onMouseLeave:_,className:`rtf ${a?"open":"closed"}`,"data-testid":"fab",style:e,...x,children:t.jsxs("li",{className:"rtf--mb__c",children:[t.jsx(M,{onClick:j,style:g,"data-testid":"main-button",role:"button","aria-label":"Floating menu",tabIndex:0,children:f}),u&&t.jsx("span",{className:`${"right"in e?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:u}),t.jsx("ul",{children:N()})]})})};export{R as A,H as F,A as I,B as p}; +import{j as t,e as C,r as l}from"./index-2d443e7c.js";const E="_spining_4i8sg_1",I="_spining_keyframes_4i8sg_1",y={spining:E,spining_keyframes:I},{useState:F}=C;function A({children:n}){return t.jsx("span",{className:y.spining,children:n})}const B={right:10,bottom:10},R=({children:n,...e})=>t.jsx("button",{type:"button",...e,className:"rtf--ab",children:n}),M=({children:n,...e})=>t.jsx("button",{type:"button",className:"rtf--mb",...e,children:n}),v={bottom:24,right:24},H=({event:n="hover",style:e=v,alwaysShowTitle:o=!1,children:b,icon:f,mainButtonStyles:g,onClick:p,text:u,...x})=>{const[a,r]=F(!1),c=o||!a,d=()=>r(!0),m=()=>r(!1),h=()=>n==="hover"&&d(),_=()=>n==="hover"&&m(),j=s=>p?p(s):(s.persist(),n==="click"?a?m():d():null),k=(s,i)=>{s.persist(),r(!1),setTimeout(()=>{i(s)},1)},N=()=>l.Children.map(b,(s,i)=>l.isValidElement(s)?t.jsxs("li",{className:`rtf--ab__c ${"top"in e?"top":""}`,children:[l.cloneElement(s,{"data-testid":`action-button-${i}`,"aria-label":s.props.text||`Menu button ${i+1}`,"aria-hidden":c,tabIndex:a?0:-1,...s.props,onClick:$=>{s.props.onClick&&k($,s.props.onClick)}}),s.props.text&&t.jsx("span",{className:`${"right"in e?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:s.props.text})]}):null);return t.jsx("ul",{onMouseEnter:h,onMouseLeave:_,className:`rtf ${a?"open":"closed"}`,"data-testid":"fab",style:e,...x,children:t.jsxs("li",{className:"rtf--mb__c",children:[t.jsx(M,{onClick:j,style:g,"data-testid":"main-button",role:"button","aria-label":"Floating menu",tabIndex:0,children:f}),u&&t.jsx("span",{className:`${"right"in e?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:u}),t.jsx("ul",{children:N()})]})})};export{R as A,H as F,A as I,B as p}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Logs-f067d536.js b/FILES/etc/config/clash/clash-dashboard/assets/Logs-00f3c89f.js similarity index 83% rename from FILES/etc/config/clash/clash-dashboard/assets/Logs-f067d536.js rename to FILES/etc/config/clash/clash-dashboard/assets/Logs-00f3c89f.js index 41be675..68b387f 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Logs-f067d536.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Logs-00f3c89f.js @@ -1 +1 @@ -import{r as u,R as x,P as h,j as t,b as y,A as R,D as T,v as P,E as w,u as L,C as N,S as C,F as W,G as O,g as k,H as z,e as I,c as E}from"./index-c925a4cb.js";import{a as F,F as M}from"./index.esm-e73720de.js";import{r as $,s as A,f as D}from"./logs-8c8b4d84.js";import{d as H}from"./debounce-c1ba2006.js";import{u as B}from"./useRemainingViewPortHeight-1aa045aa.js";import{F as q,p as G}from"./Fab-4f386fe2.js";import{P as K,a as V}from"./play-512d0bd5.js";function f(){return f=Object.assign||function(e){for(var r=1;r=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function J(e,r){if(e==null)return{};var s={},o=Object.keys(e),a,n;for(n=0;n=0)&&(s[a]=e[a]);return s}var _=u.forwardRef(function(e,r){var s=e.color,o=s===void 0?"currentColor":s,a=e.size,n=a===void 0?24:a,l=Y(e,["color","size"]);return x.createElement("svg",f({ref:r,xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),x.createElement("circle",{cx:"11",cy:"11",r:"8"}),x.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}))});_.propTypes={color:h.string,size:h.oneOfType([h.string,h.number])};_.displayName="Search";const Q=_,U="_RuleSearch_bd30s_1",X="_RuleSearchContainer_bd30s_5",Z="_inputWrapper_bd30s_10",ee="_input_bd30s_10",te="_iconWrapper_bd30s_36",p={RuleSearch:U,RuleSearchContainer:X,inputWrapper:Z,input:ee,iconWrapper:te};function se({dispatch:e,searchText:r,updateSearchText:s}){const[o,a]=u.useState(r),n=u.useCallback(i=>{e(s(i))},[e,s]),l=u.useMemo(()=>H(n,300),[n]),g=i=>{a(i.target.value),l(i.target.value)};return t.jsx("div",{className:p.RuleSearch,children:t.jsxs("div",{className:p.RuleSearchContainer,children:[t.jsx("div",{className:p.inputWrapper,children:t.jsx("input",{type:"text",value:o,onChange:g,className:p.input})}),t.jsx("div",{className:p.iconWrapper,children:t.jsx(Q,{size:20})})]})})}const oe=e=>({searchText:R(e),updateSearchText:T}),re=y(oe)(se),ae="_logMeta_7a1x3_1",ne="_logType_7a1x3_8",ce="_logTime_7a1x3_18",ie="_logText_7a1x3_24",le="_logsWrapper_7a1x3_37",pe="_logPlaceholder_7a1x3_51",ge="_logPlaceholderIcon_7a1x3_64",de="_search_7a1x3_68",c={logMeta:ae,logType:ne,logTime:ce,logText:ie,logsWrapper:le,logPlaceholder:pe,logPlaceholderIcon:ge,search:de},{useCallback:v,memo:he,useEffect:ue}=I,m=30,xe={debug:"#28792c",info:"var(--bg-log-info-tag)",warning:"#b99105",error:"#c11c1c"};function me({time:e,even:r,payload:s,type:o}){const a=E({even:r},"log");return t.jsx("div",{className:a,children:t.jsxs("div",{className:c.logMeta,children:[t.jsx("div",{className:c.logTime,children:e}),t.jsx("div",{className:c.logType,style:{backgroundColor:xe[o]},children:o}),t.jsx("div",{className:c.logText,children:s})]})})}function fe(e,r){return r[e].id}const b=he(({index:e,style:r,data:s})=>{const o=s[e];return t.jsx("div",{style:r,children:t.jsx(me,{...o})})},F);b.displayName="MemoRow";function _e({dispatch:e,logLevel:r,apiConfig:s,logs:o,logStreamingPaused:a}){const n=P(),l=v(()=>{a?$({...s,logLevel:r}):A(),n.app.updateAppConfig("logStreamingPaused",!a)},[s,r,a,n.app]),g=v(S=>e(w(S)),[e]);ue(()=>{D({...s,logLevel:r},g)},[s,r,g]);const[i,j]=B(),{t:d}=L();return t.jsxs("div",{children:[t.jsx(N,{title:d("Logs")}),t.jsx("div",{className:c.search,children:t.jsx(re,{})}),t.jsx("div",{ref:i,style:{paddingBottom:m},children:o.length===0?t.jsxs("div",{className:c.logPlaceholder,style:{height:j-m},children:[t.jsx("div",{className:c.logPlaceholderIcon,children:t.jsx(C,{width:200,height:200})}),t.jsx("div",{children:d("no_logs")})]}):t.jsxs("div",{className:c.logsWrapper,children:[t.jsx(M,{height:j-m,width:"100%",itemCount:o.length,itemSize:80,itemData:o,itemKey:fe,children:b}),t.jsx(q,{icon:a?t.jsx(K,{size:16}):t.jsx(V,{size:16}),mainButtonStyles:a?{background:"#e74c3c"}:{},style:G,text:d(a?"Resume Refresh":"Pause Refresh"),onClick:l})]})})]})}const je=e=>({logs:W(e),logLevel:O(e),apiConfig:k(e),logStreamingPaused:z(e)}),we=y(je)(_e);export{we as default}; +import{r as u,R as x,P as h,j as t,b as y,z as R,A as T,t as P,D as w,u as L,C as N,S as C,E as W,F as O,g as z,G as k,e as I,c as E}from"./index-2d443e7c.js";import{a as F,F as M}from"./index.esm-d09f413d.js";import{r as $,s as A,f as D}from"./logs-293a1f45.js";import{d as B}from"./debounce-c1ba2006.js";import{u as H}from"./useRemainingViewPortHeight-60d26854.js";import{F as q,p as G}from"./Fab-a6cf5682.js";import{P as K,a as V}from"./play-19a8b29d.js";function f(){return f=Object.assign||function(e){for(var r=1;r=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function J(e,r){if(e==null)return{};var s={},o=Object.keys(e),a,n;for(n=0;n=0)&&(s[a]=e[a]);return s}var _=u.forwardRef(function(e,r){var s=e.color,o=s===void 0?"currentColor":s,a=e.size,n=a===void 0?24:a,l=Y(e,["color","size"]);return x.createElement("svg",f({ref:r,xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),x.createElement("circle",{cx:"11",cy:"11",r:"8"}),x.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}))});_.propTypes={color:h.string,size:h.oneOfType([h.string,h.number])};_.displayName="Search";const Q=_,U="_RuleSearch_bd30s_1",X="_RuleSearchContainer_bd30s_5",Z="_inputWrapper_bd30s_10",ee="_input_bd30s_10",te="_iconWrapper_bd30s_36",p={RuleSearch:U,RuleSearchContainer:X,inputWrapper:Z,input:ee,iconWrapper:te};function se({dispatch:e,searchText:r,updateSearchText:s}){const[o,a]=u.useState(r),n=u.useCallback(i=>{e(s(i))},[e,s]),l=u.useMemo(()=>B(n,300),[n]),g=i=>{a(i.target.value),l(i.target.value)};return t.jsx("div",{className:p.RuleSearch,children:t.jsxs("div",{className:p.RuleSearchContainer,children:[t.jsx("div",{className:p.inputWrapper,children:t.jsx("input",{type:"text",value:o,onChange:g,className:p.input})}),t.jsx("div",{className:p.iconWrapper,children:t.jsx(Q,{size:20})})]})})}const oe=e=>({searchText:R(e),updateSearchText:T}),re=y(oe)(se),ae="_logMeta_7a1x3_1",ne="_logType_7a1x3_8",ce="_logTime_7a1x3_18",ie="_logText_7a1x3_24",le="_logsWrapper_7a1x3_37",pe="_logPlaceholder_7a1x3_51",ge="_logPlaceholderIcon_7a1x3_64",de="_search_7a1x3_68",c={logMeta:ae,logType:ne,logTime:ce,logText:ie,logsWrapper:le,logPlaceholder:pe,logPlaceholderIcon:ge,search:de},{useCallback:v,memo:he,useEffect:ue}=I,m=30,xe={debug:"#28792c",info:"var(--bg-log-info-tag)",warning:"#b99105",error:"#c11c1c"};function me({time:e,even:r,payload:s,type:o}){const a=E({even:r},"log");return t.jsx("div",{className:a,children:t.jsxs("div",{className:c.logMeta,children:[t.jsx("div",{className:c.logTime,children:e}),t.jsx("div",{className:c.logType,style:{backgroundColor:xe[o]},children:o}),t.jsx("div",{className:c.logText,children:s})]})})}function fe(e,r){return r[e].id}const b=he(({index:e,style:r,data:s})=>{const o=s[e];return t.jsx("div",{style:r,children:t.jsx(me,{...o})})},F);b.displayName="MemoRow";function _e({dispatch:e,logLevel:r,apiConfig:s,logs:o,logStreamingPaused:a}){const n=P(),l=v(()=>{a?$({...s,logLevel:r}):A(),n.app.updateAppConfig("logStreamingPaused",!a)},[s,r,a,n.app]),g=v(S=>e(w(S)),[e]);ue(()=>{D({...s,logLevel:r},g)},[s,r,g]);const[i,j]=H(),{t:d}=L();return t.jsxs("div",{children:[t.jsx(N,{title:d("Logs")}),t.jsx("div",{className:c.search,children:t.jsx(re,{})}),t.jsx("div",{ref:i,style:{paddingBottom:m},children:o.length===0?t.jsxs("div",{className:c.logPlaceholder,style:{height:j-m},children:[t.jsx("div",{className:c.logPlaceholderIcon,children:t.jsx(C,{width:200,height:200})}),t.jsx("div",{children:d("no_logs")})]}):t.jsxs("div",{className:c.logsWrapper,children:[t.jsx(M,{height:j-m,width:"100%",itemCount:o.length,itemSize:80,itemData:o,itemKey:fe,children:b}),t.jsx(q,{icon:a?t.jsx(K,{size:16}):t.jsx(V,{size:16}),mainButtonStyles:a?{background:"#e74c3c"}:{},style:G,text:d(a?"Resume Refresh":"Pause Refresh"),onClick:l})]})})]})}const je=e=>({logs:W(e),logLevel:O(e),apiConfig:z(e),logStreamingPaused:k(e)}),we=y(je)(_e);export{we as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Modal-86bce5c3.css b/FILES/etc/config/clash/clash-dashboard/assets/Modal-86bce5c3.css new file mode 100644 index 0000000..241cbbb --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Modal-86bce5c3.css @@ -0,0 +1 @@ +._overlay_1i06e_1{position:fixed;top:0;right:0;left:0;bottom:0;background:#444}._content_1i06e_10{outline:none;position:relative;color:var(--color-text);background:#444;top:50%;left:50%;transform:translate(-50%,-50%);padding:20px;border-radius:10px} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Modal.module-32e7ee6a.js b/FILES/etc/config/clash/clash-dashboard/assets/Modal.module-32e7ee6a.js new file mode 100644 index 0000000..2cb20ad --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Modal.module-32e7ee6a.js @@ -0,0 +1 @@ +import{r as f,R as c,P as a}from"./index-2d443e7c.js";function s(){return s=Object.assign||function(e){for(var o=1;o=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function u(e,o){if(e==null)return{};var r={},t=Object.keys(e),n,i;for(i=0;i=0)&&(r[n]=e[n]);return r}var l=f.forwardRef(function(e,o){var r=e.color,t=r===void 0?"currentColor":r,n=e.size,i=n===void 0?24:n,p=v(e,["color","size"]);return c.createElement("svg",s({ref:o,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},p),c.createElement("polyline",{points:"6 9 12 15 18 9"}))});l.propTypes={color:a.string,size:a.oneOfType([a.string,a.number])};l.displayName="ChevronDown";const m=l,y="_overlay_1i06e_1",g="_content_1i06e_10",w={overlay:y,content:g};export{m as C,w as m}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Proxies-3133a480.js b/FILES/etc/config/clash/clash-dashboard/assets/Proxies-3133a480.js new file mode 100644 index 0000000..22c60da --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Proxies-3133a480.js @@ -0,0 +1 @@ +import{r as _,R as K,P as S,c as b,K as fe,j as s,B as v,e as m,L as je,v as _e,N as ee,O as te,b as w,Q as ve,T as ge,U as se,V as E,t as A,W as be,X as $,Y as ne,Z as M,_ as U,$ as we,a0 as Ce,u as H,a1 as ke,a2 as Pe,a3 as Se,g as re,C as oe,a4 as Ne,a as Oe,a5 as $e,a6 as Ae,a7 as Le,a8 as Te}from"./index-2d443e7c.js";import{C as De,m as V}from"./Modal.module-32e7ee6a.js";import{F as Fe,p as Be,A as Ie,I as Re}from"./Fab-a6cf5682.js";import{R as Ee,a as Me,T as Ue}from"./TextFilter-a62f489f.js";import{f as He}from"./index-4bcbc835.js";import{S as qe,T as W}from"./Select-4003d0aa.js";import"./debounce-c1ba2006.js";function R(){return R=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ke(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var q=_.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,l=ze(e,["color","size"]);return K.createElement("svg",R({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),K.createElement("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"}))});q.propTypes={color:S.string,size:S.oneOfType([S.string,S.number])};q.displayName="Zap";const Z=q;function ae(e){const t=e.size||24,n=b({[fe.animate]:e.animate});return s.jsx("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}const Ve="_FlexCenter_1380a_1",We={FlexCenter:Ve};function Ze({children:e}){return s.jsx("div",{className:We.FlexCenter,children:e})}const{useRef:G,useEffect:Ge}=m;function Ye({onClickPrimaryButton:e,onClickSecondaryButton:t}){const n=G(null),r=G(null);Ge(()=>{n.current.focus()},[]);const o=a=>{a.code==="ArrowRight"?r.current.focus():a.code==="ArrowLeft"&&n.current.focus()};return s.jsxs("div",{onKeyDown:o,children:[s.jsx("h2",{children:"Close Connections?"}),s.jsx("p",{children:"Click [Yes] to close those connections that are still using the old selected proxy in this group"}),s.jsx("div",{style:{height:30}}),s.jsxs(Ze,{children:[s.jsx(v,{onClick:e,ref:n,children:"Yes"}),s.jsx("div",{style:{width:20}}),s.jsx(v,{onClick:t,ref:r,children:"No"})]})]})}const Xe="_header_1y9js_1",Qe="_arrow_1y9js_8",Je="_isOpen_1y9js_13",et="_btn_1y9js_20",tt="_qty_1y9js_25",C={header:Xe,arrow:Qe,isOpen:Je,btn:et,qty:tt};function le({name:e,type:t,toggle:n,isOpen:r,qty:o}){const a=_.useCallback(l=>{l.preventDefault(),(l.key==="Enter"||l.key===" ")&&n()},[n]);return s.jsxs("div",{className:C.header,onClick:n,style:{cursor:"pointer"},tabIndex:0,onKeyDown:a,role:"button",children:[s.jsx("div",{children:s.jsx(je,{name:e,type:t})}),typeof o=="number"?s.jsx("span",{className:C.qty,children:o}):null,s.jsx(v,{kind:"minimal",onClick:n,className:C.btn,title:"Toggle collapsible section",children:s.jsx("span",{className:b(C.arrow,{[C.isOpen]:r}),children:s.jsx(De,{size:20})})})]})}const{useState:st,useCallback:Ns}=m;function ce(e){const[t,n]=st(e);return{value:t,set:n}}const{useMemo:nt}=m;function rt(e,t){return e.filter(n=>{const r=t[n];return r===void 0?!0:!("number"in r&&r.number===0)})}const N=(e,t)=>{if(e&&"number"in e&&e.number>0)return e.number;const n=t&&t.type;return n&&te.indexOf(n)>-1?-1:999999},ot={Natural:e=>e,LatencyAsc:(e,t,n)=>e.sort((r,o)=>{const a=N(t[r],n&&n[r]),l=N(t[o],n&&n[o]);return a-l}),LatencyDesc:(e,t,n)=>e.sort((r,o)=>{const a=N(t[r],n&&n[r]);return N(t[o],n&&n[o])-a}),NameAsc:e=>e.sort(),NameDesc:e=>e.sort((t,n)=>t>n?-1:tr.trim()).filter(r=>!!r);return n.length===0?e:e.filter(r=>{let o=0;for(;o-1)return!0}return!1})}function lt(e,t,n,r,o,a){let l=[...e];return n&&(l=rt(e,t)),typeof r=="string"&&r!==""&&(l=at(l,r)),ot[o](l,t,a)}function ie(e,t,n,r,o){const[a]=_e(ee);return nt(()=>lt(e,t,n,a,r,o),[e,t,n,a,r,o])}const ct="_header_5pmv2_1",it="_groupHead_5pmv2_5",ut="_action_5pmv2_11",D={header:ct,groupHead:it,action:ut},dt="_proxy_5mgcm_1",xt="_now_5mgcm_25",pt="_error_5mgcm_29",mt="_selectable_5mgcm_32",ht="_proxyType_5mgcm_40",yt="_row_5mgcm_51",ft="_proxyName_5mgcm_57",jt="_proxySmall_5mgcm_66",h={proxy:dt,now:xt,error:pt,selectable:mt,proxyType:ht,row:yt,proxyName:ft,proxySmall:jt},_t="_proxyLatency_pw0sa_1",vt={proxyLatency:_t};function gt({latency:e,color:t}){let n=" ";if(e)switch(e.kind){case"Error":case"Testing":n="- ms";break;case"Result":n=(e.number!==0?e.number:"-")+" ms";break}return s.jsx("span",{className:vt.proxyLatency,style:{color:t},children:n})}const{useMemo:P}=m,g={good:"#67c23a",normal:"#d4b75c",bad:"#e67f3c",na:"#909399"};function ue(e){if(!e||e.kind!=="Result")return g.na;const t=e.number;return t===0?g.na:t<200?g.good:t<400?g.normal:typeof t=="number"?g.bad:g.na}function bt(e,t){return te.indexOf(t)>-1?{border:"1px dotted #777"}:{background:ue(e)}}function wt({now:e,name:t,proxy:n,latency:r,isSelectable:o,onClick:a}){const l=P(()=>bt(r,n.type),[r,n]),c=P(()=>{let u=t;return r&&r.kind==="Result"&&typeof r.number=="number"&&(u+=" "+r.number+" ms"),u},[t,r]),i=_.useCallback(()=>{o&&a&&a(t)},[t,a,o]),d=P(()=>b(h.proxySmall,{[h.now]:e,[h.selectable]:o}),[o,e]),x=_.useCallback(u=>{u.key==="Enter"&&i()},[i]);return s.jsx("div",{title:c,className:d,style:l,onClick:i,onKeyDown:x,role:o?"menuitem":""})}function Ct(e){return e==="Shadowsocks"?"SS":e}const kt=e=>({left:e.left+window.scrollX-5,top:e.top+window.scrollY-38});function Pt({children:e,label:t,"aria-label":n}){const[r,o]=ve();return s.jsxs(s.Fragment,{children:[_.cloneElement(e,r),s.jsx(ge,{...o,label:t,"aria-label":n,position:kt})]})}function St({now:e,name:t,proxy:n,latency:r,isSelectable:o,onClick:a}){const l=P(()=>ue(r),[r]),c=_.useCallback(()=>{o&&a&&a(t)},[t,a,o]),i=_.useCallback(x=>{x.key==="Enter"&&c()},[c]),d=P(()=>b(h.proxy,{[h.now]:e,[h.selectable]:o}),[o,e]);return s.jsxs("div",{tabIndex:0,className:d,onClick:c,onKeyDown:i,role:o?"menuitem":"",children:[s.jsx("div",{className:h.proxyName,children:s.jsx(Pt,{label:t,"aria-label":"proxy name: "+t,children:s.jsx("span",{children:t})})}),s.jsxs("div",{className:h.row,children:[s.jsx("span",{className:h.proxyType,style:{opacity:e?.6:.2},children:Ct(n.type)}),s.jsx(gt,{latency:r,color:l})]})]})}const de=(e,{name:t})=>{const n=se(e),r=E(e);return{proxy:n[t]||{name:t,type:"Unknown",history:[]},latency:r[t]}},Nt=w(de)(St),Ot=w(de)(wt),$t="_list_1oy7w_1",At="_listSummaryView_1oy7w_8",xe={list:$t,listSummaryView:At};function pe({all:e,now:t,isSelectable:n,itemOnTapCallback:r}){const o=e;return s.jsx("div",{className:xe.list,children:o.map(a=>s.jsx(Nt,{onClick:r,isSelectable:n,name:a,now:a===t},a))})}function me({all:e,now:t,isSelectable:n,itemOnTapCallback:r}){return s.jsx("div",{className:xe.listSummaryView,children:e.map(o=>s.jsx(Ot,{onClick:r,isSelectable:n,name:o,now:o===t},o))})}const{createElement:Lt,useCallback:F,useMemo:Tt}=m;function Dt({name:e,all:t,delay:n,hideUnavailableProxies:r,proxySortBy:o,proxies:a,type:l,now:c,isOpen:i,apiConfig:d,dispatch:x}){const u=ie(t,n,r,o,a),f=Tt(()=>l==="Selector",[l]),{app:{updateCollapsibleIsOpen:j},proxies:{requestDelayForProxies:p}}=A(),L=F(()=>{j("proxyGroup",e,!i)},[i,j,e]),T=F(z=>{f&&x(be(d,e,z))},[d,x,e,f]),y=ce(!1),ye=F(async()=>{if(!y.value){y.set(!0);try{await p(d,u)}catch{}y.set(!1)}},[u,d,p,y]);return s.jsxs("div",{className:D.group,children:[s.jsxs("div",{className:D.groupHead,children:[s.jsx(le,{name:e,type:l,toggle:L,qty:u.length,isOpen:i}),s.jsx("div",{className:D.action,children:s.jsx($,{label:"Test latency",children:s.jsx(v,{kind:"circular",onClick:ye,children:s.jsx(ae,{animate:y.value,size:16})})})})]}),Lt(i?pe:me,{all:u,now:c,isSelectable:f,itemOnTapCallback:T})]})}const Ft=w((e,{name:t,delay:n})=>{const r=se(e),o=ne(e),a=M(e),l=U(e),c=r[t],{all:i,type:d,now:x}=c;return{all:i,delay:n,hideUnavailableProxies:l,proxySortBy:a,proxies:r,type:d,now:x,isOpen:o[`proxyGroup:${t}`]}})(Dt),{useCallback:he,useState:Bt}=m;function It({dispatch:e,apiConfig:t,name:n}){return he(()=>e(we(t,n)),[t,e,n])}function Rt({dispatch:e,apiConfig:t,names:n}){const[r,o]=Bt(!1);return[he(async()=>{if(!r){o(!0);try{await e(Ce(t,n))}catch{}o(!1)}},[t,e,n,r]),r]}const{useState:Et,useCallback:Mt}=m;function Ut({isLoading:e}){return e?s.jsx(Re,{children:s.jsx(Z,{width:16,height:16})}):s.jsx(Z,{width:16,height:16})}function Ht({dispatch:e,apiConfig:t}){const[n,r]=Et(!1);return[Mt(()=>{n||(r(!0),e(ke(t)).then(()=>r(!1),()=>r(!1)))},[t,e,n]),n]}function qt({dispatch:e,apiConfig:t,proxyProviders:n}){const{t:r}=H(),[o,a]=Ht({dispatch:e,apiConfig:t}),[l,c]=Rt({apiConfig:t,dispatch:e,names:n.map(i=>i.name)});return s.jsx(Fe,{icon:s.jsx(Ut,{isLoading:a}),onClick:o,text:r("Test Latency"),style:Be,children:n.length>0?s.jsx(Ie,{text:r("update_all_proxy_provider"),onClick:l,children:s.jsx(Ee,{isRotating:c})}):null})}const zt="_updatedAt_919yi_1",Kt="_main_919yi_8",Vt="_head_919yi_17",Wt="_action_919yi_23",Zt="_refresh_919yi_31",k={updatedAt:zt,main:Kt,head:Vt,action:Wt,refresh:Zt},{useCallback:Y}=m;function Gt({name:e,proxies:t,delay:n,hideUnavailableProxies:r,proxySortBy:o,vehicleType:a,updatedAt:l,isOpen:c,dispatch:i,apiConfig:d}){const x=ie(t,n,r,o),u=ce(!1),f=It({dispatch:i,apiConfig:d,name:e}),j=Y(()=>{if(u.value)return;u.set(!0);const y=()=>u.set(!1);i(Pe(d,e)).then(y,y)},[d,i,e,u]),{app:{updateCollapsibleIsOpen:p}}=A(),L=Y(()=>{p("proxyProvider",e,!c)},[c,p,e]),T=He(new Date(l),new Date);return s.jsxs("div",{className:k.main,children:[s.jsxs("div",{className:k.head,children:[s.jsx(le,{name:e,toggle:L,type:a,isOpen:c,qty:x.length}),s.jsxs("div",{className:k.action,children:[s.jsx($,{label:"Update",children:s.jsx(v,{kind:"circular",onClick:f,children:s.jsx(Qt,{})})}),s.jsx($,{label:"Health Check",children:s.jsx(v,{kind:"circular",onClick:j,children:s.jsx(ae,{animate:u.value,size:16})})})]})]}),s.jsx("div",{className:k.updatedAt,children:s.jsxs("small",{children:["Updated ",T," ago"]})}),c?s.jsx(pe,{all:x}):s.jsx(me,{all:x})]})}const Yt={rest:{scale:1},pressed:{scale:.95}},Xt={rest:{rotate:0},hover:{rotate:360,transition:{duration:.3}}};function Qt(){const t=Se.read().motion;return s.jsx(t.div,{className:k.refresh,variants:Yt,initial:"rest",whileHover:"hover",whileTap:"pressed",children:s.jsx(t.div,{className:"flexCenter",variants:Xt,children:s.jsx(Me,{size:16})})})}const Jt=(e,{proxies:t,name:n})=>{const r=U(e),o=E(e),a=ne(e),l=re(e),c=M(e);return{apiConfig:l,proxies:t,delay:o,hideUnavailableProxies:r,proxySortBy:c,isOpen:a[`proxyProvider:${n}`]}},es=w(Jt)(Gt);function ts({items:e}){return e.length===0?null:s.jsxs(s.Fragment,{children:[s.jsx(oe,{title:"Proxy Provider"}),s.jsx("div",{children:e.map(t=>s.jsx(es,{name:t.name,proxies:t.proxies,type:t.type,vehicleType:t.vehicleType,updatedAt:t.updatedAt},t.name))})]})}const ss="_labeledInput_cmki0_1",B={labeledInput:ss},ns=[["Natural","order_natural"],["LatencyAsc","order_latency_asc"],["LatencyDesc","order_latency_desc"],["NameAsc","order_name_asc"],["NameDesc","order_name_desc"]],{useCallback:X}=m;function rs({appConfig:e}){const{app:{updateAppConfig:t}}=A(),n=X(a=>{t("proxySortBy",a.target.value)},[t]),r=X(a=>{t("hideUnavailableProxies",a)},[t]),{t:o}=H();return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:B.labeledInput,children:[s.jsx("span",{children:o("sort_in_grp")}),s.jsx("div",{children:s.jsx(qe,{options:ns.map(a=>[a[0],o(a[1])]),selected:e.proxySortBy,onChange:n})})]}),s.jsx("hr",{}),s.jsxs("div",{className:B.labeledInput,children:[s.jsx("label",{htmlFor:"hideUnavailableProxies",children:o("hide_unavail_proxies")}),s.jsx("div",{children:s.jsx(W,{id:"hideUnavailableProxies",checked:e.hideUnavailableProxies,onChange:r})})]}),s.jsxs("div",{className:B.labeledInput,children:[s.jsx("label",{htmlFor:"autoCloseOldConns",children:o("auto_close_conns")}),s.jsx("div",{children:s.jsx(W,{id:"autoCloseOldConns",checked:e.autoCloseOldConns,onChange:a=>t("autoCloseOldConns",a)})})]})]})}const os=e=>{const t=M(e),n=U(e),r=Ne(e);return{appConfig:{proxySortBy:t,hideUnavailableProxies:n,autoCloseOldConns:r}}},as=w(os)(rs),ls="_overlay_uuk3b_1",cs="_cnt_uuk3b_5",is="_afterOpen_uuk3b_16",I={overlay:ls,cnt:cs,afterOpen:is},{useMemo:us}=m;function Q({isOpen:e,onRequestClose:t,children:n}){const r=us(()=>({base:b(V.content,I.cnt),afterOpen:I.afterOpen,beforeClose:""}),[]);return s.jsx(Oe,{isOpen:e,onRequestClose:t,className:r,overlayClassName:b(V.overlay,I.overlay),children:n})}function ds({color:e="currentColor",size:t=24}){return s.jsxs("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M2 6h9M18.5 6H22"}),s.jsx("circle",{cx:"16",cy:"6",r:"2"}),s.jsx("path",{d:"M22 18h-9M6 18H2"}),s.jsx("circle",{r:"2",transform:"matrix(-1 0 0 1 8 18)"})]})}const xs="_topBar_16fpp_1",ps="_topBarRight_16fpp_13",ms="_textFilterContainer_16fpp_22",hs="_group_16fpp_29",O={topBar:xs,topBarRight:ps,textFilterContainer:ms,group:hs},{useState:ys,useEffect:fs,useCallback:J,useRef:js}=m;function _s({dispatch:e,groupNames:t,delay:n,proxyProviders:r,apiConfig:o,showModalClosePrevConns:a}){const l=js({}),c=J(()=>{l.current.startAt=Date.now(),e($e(o)).then(()=>{l.current.completeAt=Date.now()})},[o,e]);fs(()=>{c();const p=()=>{l.current.startAt&&Date.now()-l.current.startAt>3e4&&c()};return window.addEventListener("focus",p,!1),()=>window.removeEventListener("focus",p,!1)},[c]);const[i,d]=ys(!1),x=J(()=>{d(!1)},[]),{proxies:{closeModalClosePrevConns:u,closePrevConnsAndTheModal:f}}=A(),{t:j}=H();return s.jsxs(s.Fragment,{children:[s.jsx(Q,{isOpen:i,onRequestClose:x,children:s.jsx(as,{})}),s.jsxs("div",{className:O.topBar,children:[s.jsx(oe,{title:j("Proxies")}),s.jsxs("div",{className:O.topBarRight,children:[s.jsx("div",{className:O.textFilterContainer,children:s.jsx(Ue,{textAtom:ee})}),s.jsx($,{label:j("settings"),children:s.jsx(v,{kind:"minimal",onClick:()=>d(!0),children:s.jsx(ds,{size:16})})})]})]}),s.jsx("div",{children:t.map(p=>s.jsx("div",{className:O.group,children:s.jsx(Ft,{name:p,delay:n,apiConfig:o,dispatch:e})},p))}),s.jsx(ts,{items:r}),s.jsx("div",{style:{height:60}}),s.jsx(qt,{dispatch:e,apiConfig:o,proxyProviders:r}),s.jsx(Q,{isOpen:a,onRequestClose:u,children:s.jsx(Ye,{onClickPrimaryButton:()=>f(o),onClickSecondaryButton:u})})]})}const vs=e=>({apiConfig:re(e),groupNames:Ae(e),proxyProviders:Le(e),delay:E(e),showModalClosePrevConns:Te(e)}),Os=w(vs)(_s);export{Os as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Proxies-d20d6e05.js b/FILES/etc/config/clash/clash-dashboard/assets/Proxies-d20d6e05.js deleted file mode 100644 index 48ab39b..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Proxies-d20d6e05.js +++ /dev/null @@ -1 +0,0 @@ -import{r as _,R as K,P as N,c as b,N as fe,j as s,B as v,e as m,O as je,w as _e,Q as ee,T as te,b as w,U as ve,V as ge,W as se,X as E,v as $,Y as be,Z as ne,_ as A,$ as re,a0 as M,a1 as U,a2 as we,a3 as Ce,u as H,a4 as ke,a5 as Pe,a6 as Ne,g as oe,C as ae,a7 as Se,m as V,a as Oe,a8 as Ae,a9 as $e,aa as Le,ab as Te}from"./index-c925a4cb.js";import{C as De}from"./chevron-down-6e2632b9.js";import{F as Fe,p as Be,A as Ie,I as Re}from"./Fab-4f386fe2.js";import{R as Ee,a as Me,T as Ue}from"./TextFilter-3f06e7b6.js";import{f as He}from"./index-778e0b6c.js";import{S as qe,T as W}from"./Select-1e3e2920.js";import"./debounce-c1ba2006.js";function R(){return R=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ke(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var q=_.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,l=ze(e,["color","size"]);return K.createElement("svg",R({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),K.createElement("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"}))});q.propTypes={color:N.string,size:N.oneOfType([N.string,N.number])};q.displayName="Zap";const Z=q;function le(e){const t=e.size||24,n=b({[fe.animate]:e.animate});return s.jsx("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}const Ve="_FlexCenter_1380a_1",We={FlexCenter:Ve};function Ze({children:e}){return s.jsx("div",{className:We.FlexCenter,children:e})}const{useRef:G,useEffect:Ge}=m;function Ye({onClickPrimaryButton:e,onClickSecondaryButton:t}){const n=G(null),r=G(null);Ge(()=>{n.current.focus()},[]);const o=a=>{a.code==="ArrowRight"?r.current.focus():a.code==="ArrowLeft"&&n.current.focus()};return s.jsxs("div",{onKeyDown:o,children:[s.jsx("h2",{children:"Close Connections?"}),s.jsx("p",{children:"Click [Yes] to close those connections that are still using the old selected proxy in this group"}),s.jsx("div",{style:{height:30}}),s.jsxs(Ze,{children:[s.jsx(v,{onClick:e,ref:n,children:"Yes"}),s.jsx("div",{style:{width:20}}),s.jsx(v,{onClick:t,ref:r,children:"No"})]})]})}const Xe="_header_1y9js_1",Qe="_arrow_1y9js_8",Je="_isOpen_1y9js_13",et="_btn_1y9js_20",tt="_qty_1y9js_25",C={header:Xe,arrow:Qe,isOpen:Je,btn:et,qty:tt};function ce({name:e,type:t,toggle:n,isOpen:r,qty:o}){const a=_.useCallback(l=>{l.preventDefault(),(l.key==="Enter"||l.key===" ")&&n()},[n]);return s.jsxs("div",{className:C.header,onClick:n,style:{cursor:"pointer"},tabIndex:0,onKeyDown:a,role:"button",children:[s.jsx("div",{children:s.jsx(je,{name:e,type:t})}),typeof o=="number"?s.jsx("span",{className:C.qty,children:o}):null,s.jsx(v,{kind:"minimal",onClick:n,className:C.btn,title:"Toggle collapsible section",children:s.jsx("span",{className:b(C.arrow,{[C.isOpen]:r}),children:s.jsx(De,{size:20})})})]})}const{useMemo:st}=m;function nt(e,t){return e.filter(n=>{const r=t[n];return r===void 0?!0:!("number"in r&&r.number===0)})}const S=(e,t)=>{if(e&&"number"in e&&e.number>0)return e.number;const n=t&&t.type;return n&&te.indexOf(n)>-1?-1:999999},rt={Natural:e=>e,LatencyAsc:(e,t,n)=>e.sort((r,o)=>{const a=S(t[r],n&&n[r]),l=S(t[o],n&&n[o]);return a-l}),LatencyDesc:(e,t,n)=>e.sort((r,o)=>{const a=S(t[r],n&&n[r]);return S(t[o],n&&n[o])-a}),NameAsc:e=>e.sort(),NameDesc:e=>e.sort((t,n)=>t>n?-1:tr.trim()).filter(r=>!!r);return n.length===0?e:e.filter(r=>{let o=0;for(;o-1)return!0}return!1})}function at(e,t,n,r,o,a){let l=[...e];return n&&(l=nt(e,t)),typeof r=="string"&&r!==""&&(l=ot(l,r)),rt[o](l,t,a)}function ie(e,t,n,r,o){const[a]=_e(ee);return st(()=>at(e,t,n,a,r,o),[e,t,n,a,r,o])}const lt="_header_5pmv2_1",ct="_groupHead_5pmv2_5",it="_action_5pmv2_11",D={header:lt,groupHead:ct,action:it},ut="_proxy_5mgcm_1",dt="_now_5mgcm_25",xt="_error_5mgcm_29",pt="_selectable_5mgcm_32",mt="_proxyType_5mgcm_40",ht="_row_5mgcm_51",yt="_proxyName_5mgcm_57",ft="_proxySmall_5mgcm_66",h={proxy:ut,now:dt,error:xt,selectable:pt,proxyType:mt,row:ht,proxyName:yt,proxySmall:ft},jt="_proxyLatency_pw0sa_1",_t={proxyLatency:jt};function vt({latency:e,color:t}){let n=" ";if(e)switch(e.kind){case"Error":case"Testing":n="- ms";break;case"Result":n=(e.number!==0?e.number:"-")+" ms";break}return s.jsx("span",{className:_t.proxyLatency,style:{color:t},children:n})}const{useMemo:P}=m,g={good:"#67c23a",normal:"#d4b75c",bad:"#e67f3c",na:"#909399"};function ue(e){if(!e||e.kind!=="Result")return g.na;const t=e.number;return t===0?g.na:t<200?g.good:t<400?g.normal:typeof t=="number"?g.bad:g.na}function gt(e,t){return te.indexOf(t)>-1?{border:"1px dotted #777"}:{background:ue(e)}}function bt({now:e,name:t,proxy:n,latency:r,isSelectable:o,onClick:a}){const l=P(()=>gt(r,n.type),[r,n]),c=P(()=>{let u=t;return r&&r.kind==="Result"&&typeof r.number=="number"&&(u+=" "+r.number+" ms"),u},[t,r]),i=_.useCallback(()=>{o&&a&&a(t)},[t,a,o]),d=P(()=>b(h.proxySmall,{[h.now]:e,[h.selectable]:o}),[o,e]),x=_.useCallback(u=>{u.key==="Enter"&&i()},[i]);return s.jsx("div",{title:c,className:d,style:l,onClick:i,onKeyDown:x,role:o?"menuitem":""})}function wt(e){return e==="Shadowsocks"?"SS":e}const Ct=e=>({left:e.left+window.scrollX-5,top:e.top+window.scrollY-38});function kt({children:e,label:t,"aria-label":n}){const[r,o]=ve();return s.jsxs(s.Fragment,{children:[_.cloneElement(e,r),s.jsx(ge,{...o,label:t,"aria-label":n,position:Ct})]})}function Pt({now:e,name:t,proxy:n,latency:r,isSelectable:o,onClick:a}){const l=P(()=>ue(r),[r]),c=_.useCallback(()=>{o&&a&&a(t)},[t,a,o]),i=_.useCallback(x=>{x.key==="Enter"&&c()},[c]),d=P(()=>b(h.proxy,{[h.now]:e,[h.selectable]:o}),[o,e]);return s.jsxs("div",{tabIndex:0,className:d,onClick:c,onKeyDown:i,role:o?"menuitem":"",children:[s.jsx("div",{className:h.proxyName,children:s.jsx(kt,{label:t,"aria-label":"proxy name: "+t,children:s.jsx("span",{children:t})})}),s.jsxs("div",{className:h.row,children:[s.jsx("span",{className:h.proxyType,style:{opacity:e?.6:.2},children:wt(n.type)}),s.jsx(vt,{latency:r,color:l})]})]})}const de=(e,{name:t})=>{const n=se(e),r=E(e);return{proxy:n[t]||{name:t,type:"Unknown",history:[]},latency:r[t]}},Nt=w(de)(Pt),St=w(de)(bt),Ot="_list_1oy7w_1",At="_listSummaryView_1oy7w_8",xe={list:Ot,listSummaryView:At};function pe({all:e,now:t,isSelectable:n,itemOnTapCallback:r}){const o=e;return s.jsx("div",{className:xe.list,children:o.map(a=>s.jsx(Nt,{onClick:r,isSelectable:n,name:a,now:a===t},a))})}function me({all:e,now:t,isSelectable:n,itemOnTapCallback:r}){return s.jsx("div",{className:xe.listSummaryView,children:e.map(o=>s.jsx(St,{onClick:r,isSelectable:n,name:o,now:o===t},o))})}const{createElement:$t,useCallback:F,useMemo:Lt}=m;function Tt({name:e,all:t,delay:n,hideUnavailableProxies:r,proxySortBy:o,proxies:a,type:l,now:c,isOpen:i,apiConfig:d,dispatch:x}){const u=ie(t,n,r,o,a),f=Lt(()=>l==="Selector",[l]),{app:{updateCollapsibleIsOpen:j},proxies:{requestDelayForProxies:p}}=$(),L=F(()=>{j("proxyGroup",e,!i)},[i,j,e]),T=F(z=>{f&&x(be(d,e,z))},[d,x,e,f]),y=ne(!1),ye=F(async()=>{if(!y.value){y.set(!0);try{await p(d,u)}catch{}y.set(!1)}},[u,d,p,y]);return s.jsxs("div",{className:D.group,children:[s.jsxs("div",{className:D.groupHead,children:[s.jsx(ce,{name:e,type:l,toggle:L,qty:u.length,isOpen:i}),s.jsx("div",{className:D.action,children:s.jsx(A,{label:"Test latency",children:s.jsx(v,{kind:"circular",onClick:ye,children:s.jsx(le,{animate:y.value,size:16})})})})]}),$t(i?pe:me,{all:u,now:c,isSelectable:f,itemOnTapCallback:T})]})}const Dt=w((e,{name:t,delay:n})=>{const r=se(e),o=re(e),a=M(e),l=U(e),c=r[t],{all:i,type:d,now:x}=c;return{all:i,delay:n,hideUnavailableProxies:l,proxySortBy:a,proxies:r,type:d,now:x,isOpen:o[`proxyGroup:${t}`]}})(Tt),{useCallback:he,useState:Ft}=m;function Bt({dispatch:e,apiConfig:t,name:n}){return he(()=>e(we(t,n)),[t,e,n])}function It({dispatch:e,apiConfig:t,names:n}){const[r,o]=Ft(!1);return[he(async()=>{if(!r){o(!0);try{await e(Ce(t,n))}catch{}o(!1)}},[t,e,n,r]),r]}const{useState:Rt,useCallback:Et}=m;function Mt({isLoading:e}){return e?s.jsx(Re,{children:s.jsx(Z,{width:16,height:16})}):s.jsx(Z,{width:16,height:16})}function Ut({dispatch:e,apiConfig:t}){const[n,r]=Rt(!1);return[Et(()=>{n||(r(!0),e(ke(t)).then(()=>r(!1),()=>r(!1)))},[t,e,n]),n]}function Ht({dispatch:e,apiConfig:t,proxyProviders:n}){const{t:r}=H(),[o,a]=Ut({dispatch:e,apiConfig:t}),[l,c]=It({apiConfig:t,dispatch:e,names:n.map(i=>i.name)});return s.jsx(Fe,{icon:s.jsx(Mt,{isLoading:a}),onClick:o,text:r("Test Latency"),style:Be,children:n.length>0?s.jsx(Ie,{text:r("update_all_proxy_provider"),onClick:l,children:s.jsx(Ee,{isRotating:c})}):null})}const qt="_updatedAt_919yi_1",zt="_main_919yi_8",Kt="_head_919yi_17",Vt="_action_919yi_23",Wt="_refresh_919yi_31",k={updatedAt:qt,main:zt,head:Kt,action:Vt,refresh:Wt},{useCallback:Y}=m;function Zt({name:e,proxies:t,delay:n,hideUnavailableProxies:r,proxySortBy:o,vehicleType:a,updatedAt:l,isOpen:c,dispatch:i,apiConfig:d}){const x=ie(t,n,r,o),u=ne(!1),f=Bt({dispatch:i,apiConfig:d,name:e}),j=Y(()=>{if(u.value)return;u.set(!0);const y=()=>u.set(!1);i(Pe(d,e)).then(y,y)},[d,i,e,u]),{app:{updateCollapsibleIsOpen:p}}=$(),L=Y(()=>{p("proxyProvider",e,!c)},[c,p,e]),T=He(new Date(l),new Date);return s.jsxs("div",{className:k.main,children:[s.jsxs("div",{className:k.head,children:[s.jsx(ce,{name:e,toggle:L,type:a,isOpen:c,qty:x.length}),s.jsxs("div",{className:k.action,children:[s.jsx(A,{label:"Update",children:s.jsx(v,{kind:"circular",onClick:f,children:s.jsx(Xt,{})})}),s.jsx(A,{label:"Health Check",children:s.jsx(v,{kind:"circular",onClick:j,children:s.jsx(le,{animate:u.value,size:16})})})]})]}),s.jsx("div",{className:k.updatedAt,children:s.jsxs("small",{children:["Updated ",T," ago"]})}),c?s.jsx(pe,{all:x}):s.jsx(me,{all:x})]})}const Gt={rest:{scale:1},pressed:{scale:.95}},Yt={rest:{rotate:0},hover:{rotate:360,transition:{duration:.3}}};function Xt(){const t=Ne.read().motion;return s.jsx(t.div,{className:k.refresh,variants:Gt,initial:"rest",whileHover:"hover",whileTap:"pressed",children:s.jsx(t.div,{className:"flexCenter",variants:Yt,children:s.jsx(Me,{size:16})})})}const Qt=(e,{proxies:t,name:n})=>{const r=U(e),o=E(e),a=re(e),l=oe(e),c=M(e);return{apiConfig:l,proxies:t,delay:o,hideUnavailableProxies:r,proxySortBy:c,isOpen:a[`proxyProvider:${n}`]}},Jt=w(Qt)(Zt);function es({items:e}){return e.length===0?null:s.jsxs(s.Fragment,{children:[s.jsx(ae,{title:"Proxy Provider"}),s.jsx("div",{children:e.map(t=>s.jsx(Jt,{name:t.name,proxies:t.proxies,type:t.type,vehicleType:t.vehicleType,updatedAt:t.updatedAt},t.name))})]})}const ts="_labeledInput_cmki0_1",B={labeledInput:ts},ss=[["Natural","order_natural"],["LatencyAsc","order_latency_asc"],["LatencyDesc","order_latency_desc"],["NameAsc","order_name_asc"],["NameDesc","order_name_desc"]],{useCallback:X}=m;function ns({appConfig:e}){const{app:{updateAppConfig:t}}=$(),n=X(a=>{t("proxySortBy",a.target.value)},[t]),r=X(a=>{t("hideUnavailableProxies",a)},[t]),{t:o}=H();return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:B.labeledInput,children:[s.jsx("span",{children:o("sort_in_grp")}),s.jsx("div",{children:s.jsx(qe,{options:ss.map(a=>[a[0],o(a[1])]),selected:e.proxySortBy,onChange:n})})]}),s.jsx("hr",{}),s.jsxs("div",{className:B.labeledInput,children:[s.jsx("label",{htmlFor:"hideUnavailableProxies",children:o("hide_unavail_proxies")}),s.jsx("div",{children:s.jsx(W,{id:"hideUnavailableProxies",checked:e.hideUnavailableProxies,onChange:r})})]}),s.jsxs("div",{className:B.labeledInput,children:[s.jsx("label",{htmlFor:"autoCloseOldConns",children:o("auto_close_conns")}),s.jsx("div",{children:s.jsx(W,{id:"autoCloseOldConns",checked:e.autoCloseOldConns,onChange:a=>t("autoCloseOldConns",a)})})]})]})}const rs=e=>{const t=M(e),n=U(e),r=Se(e);return{appConfig:{proxySortBy:t,hideUnavailableProxies:n,autoCloseOldConns:r}}},os=w(rs)(ns),as="_overlay_uuk3b_1",ls="_cnt_uuk3b_5",cs="_afterOpen_uuk3b_16",I={overlay:as,cnt:ls,afterOpen:cs},{useMemo:is}=m;function Q({isOpen:e,onRequestClose:t,children:n}){const r=is(()=>({base:b(V.content,I.cnt),afterOpen:I.afterOpen,beforeClose:""}),[]);return s.jsx(Oe,{isOpen:e,onRequestClose:t,className:r,overlayClassName:b(V.overlay,I.overlay),children:n})}function us({color:e="currentColor",size:t=24}){return s.jsxs("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M2 6h9M18.5 6H22"}),s.jsx("circle",{cx:"16",cy:"6",r:"2"}),s.jsx("path",{d:"M22 18h-9M6 18H2"}),s.jsx("circle",{r:"2",transform:"matrix(-1 0 0 1 8 18)"})]})}const ds="_topBar_16fpp_1",xs="_topBarRight_16fpp_13",ps="_textFilterContainer_16fpp_22",ms="_group_16fpp_29",O={topBar:ds,topBarRight:xs,textFilterContainer:ps,group:ms},{useState:hs,useEffect:ys,useCallback:J,useRef:fs}=m;function js({dispatch:e,groupNames:t,delay:n,proxyProviders:r,apiConfig:o,showModalClosePrevConns:a}){const l=fs({}),c=J(()=>{l.current.startAt=Date.now(),e(Ae(o)).then(()=>{l.current.completeAt=Date.now()})},[o,e]);ys(()=>{c();const p=()=>{l.current.startAt&&Date.now()-l.current.startAt>3e4&&c()};return window.addEventListener("focus",p,!1),()=>window.removeEventListener("focus",p,!1)},[c]);const[i,d]=hs(!1),x=J(()=>{d(!1)},[]),{proxies:{closeModalClosePrevConns:u,closePrevConnsAndTheModal:f}}=$(),{t:j}=H();return s.jsxs(s.Fragment,{children:[s.jsx(Q,{isOpen:i,onRequestClose:x,children:s.jsx(os,{})}),s.jsxs("div",{className:O.topBar,children:[s.jsx(ae,{title:j("Proxies")}),s.jsxs("div",{className:O.topBarRight,children:[s.jsx("div",{className:O.textFilterContainer,children:s.jsx(Ue,{textAtom:ee})}),s.jsx(A,{label:j("settings"),children:s.jsx(v,{kind:"minimal",onClick:()=>d(!0),children:s.jsx(us,{size:16})})})]})]}),s.jsx("div",{children:t.map(p=>s.jsx("div",{className:O.group,children:s.jsx(Dt,{name:p,delay:n,apiConfig:o,dispatch:e})},p))}),s.jsx(es,{items:r}),s.jsx("div",{style:{height:60}}),s.jsx(Ht,{dispatch:e,apiConfig:o,proxyProviders:r}),s.jsx(Q,{isOpen:a,onRequestClose:u,children:s.jsx(Ye,{onClickPrimaryButton:()=>f(o),onClickSecondaryButton:u})})]})}const _s=e=>({apiConfig:oe(e),groupNames:$e(e),proxyProviders:Le(e),delay:E(e),showModalClosePrevConns:Te(e)}),Ns=w(_s)(js);export{Ns as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Rec-a8cd22ef.js b/FILES/etc/config/clash/clash-dashboard/assets/Rec-6eb4676c.js similarity index 93% rename from FILES/etc/config/clash/clash-dashboard/assets/Rec-a8cd22ef.js rename to FILES/etc/config/clash/clash-dashboard/assets/Rec-6eb4676c.js index 7008e81..4111b14 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Rec-a8cd22ef.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Rec-6eb4676c.js @@ -1,2 +1,2 @@ -import{u as o,j as n}from"./index-c925a4cb.js";const l="_body_1ygfj_3",c="_h1_1ygfj_7",h="_h3_1ygfj_13",i="_h4_1ygfj_17",r="_link_1ygfj_22",s={body:l,h1:c,h3:h,h4:i,link:r};function _(){const{t:e}=o();function a(t){t.button===0&&(alert(`请右键点击链接并选择 '另存为' 来下载表格文件,并修改后缀为CSV。 +import{u as o,j as n}from"./index-2d443e7c.js";const l="_body_1ygfj_3",c="_h1_1ygfj_7",h="_h3_1ygfj_13",i="_h4_1ygfj_17",r="_link_1ygfj_22",s={body:l,h1:c,h3:h,h4:i,link:r};function _(){const{t:e}=o();function a(t){t.button===0&&(alert(`请右键点击链接并选择 '另存为' 来下载表格文件,并修改后缀为CSV。 Please right-click on the link and select 'Save As' to download the CSV.`),t.preventDefault())}return n.jsxs("body",{className:s.body,children:[" ",n.jsx("h1",{className:s.h1,children:e("netrec")}),n.jsx("h3",{className:s.h4,children:e("netrec_data_no")}),n.jsx("h3",{className:s.h3,children:e("netrec_data")}),n.jsxs("p",{children:[n.jsx("a",{href:"./data.csv",id:"downloadLink",onMouseDown:a,className:s.link,children:e("downcsv")})," "]}),n.jsxs("p",{children:[n.jsx("a",{href:"./net_rec_show.html",target:"_blank",className:s.link,children:e("loadonline")})," "]})]})}export{_ as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Rules-772735c2.js b/FILES/etc/config/clash/clash-dashboard/assets/Rules-4f85f942.js similarity index 80% rename from FILES/etc/config/clash/clash-dashboard/assets/Rules-772735c2.js rename to FILES/etc/config/clash/clash-dashboard/assets/Rules-4f85f942.js index 9c5b4a3..83781e5 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Rules-772735c2.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Rules-4f85f942.js @@ -1 +1 @@ -import{ad as N,ae as S,af as E,ag as y,ah as k,ai as p,r as f,aj as O,ak as B,K as R,al as A,am as T,an as x,w as L,j as o,O as F,B as D,u as b,b as U,g as z,C as Q,e as q}from"./index-c925a4cb.js";import{a as V,V as W}from"./index.esm-e73720de.js";import{R as j,T as H}from"./TextFilter-3f06e7b6.js";import{f as K}from"./index-778e0b6c.js";import{F as G,p as J}from"./Fab-4f386fe2.js";import{u as X}from"./useRemainingViewPortHeight-1aa045aa.js";import"./debounce-c1ba2006.js";class Y extends N{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const r=this.options;this.options=this.client.defaultMutationOptions(e),S(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(t=this.currentMutation)==null||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const t={listeners:!0};e.type==="success"?t.onSuccess=!0:e.type==="error"&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:E(),t={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){y.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var t,r,n,i;(t=(r=this.mutateOptions).onSuccess)==null||t.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(n=(i=this.mutateOptions).onSettled)==null||n.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var a,l,u,c;(a=(l=this.mutateOptions).onError)==null||a.call(l,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(u=(c=this.mutateOptions).onSettled)==null||u.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:m})=>{m(this.currentResult)})})}}function _(s,e,t){const r=k(s,e,t),n=p({context:r.context}),[i]=f.useState(()=>new Y(n,r));f.useEffect(()=>{i.setOptions(r)},[i,r]);const a=O(f.useCallback(u=>i.subscribe(y.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=f.useCallback((u,c)=>{i.mutate(u,c).catch(Z)},[i]);if(a.error&&B(i.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}function Z(){}function $(s){const e=s.providers,t=Object.keys(e),r={};for(let n=0;n=0,"there is no valid rules list in the rules API response"),s.rules.map((e,t)=>({...e,id:t}))}async function oe(s,e){let t={rules:[]};try{const{url:r,init:n}=R(e),i=await fetch(r+s,n);i.ok&&(t=await i.json())}catch(r){console.log("failed to fetch rules",r)}return ie(t)}const w=T("");function ae(s,e){const t=p(),{mutate:r,isLoading:n}=_(P,{onSuccess:()=>{t.invalidateQueries(["/providers/rules"])}});return[a=>{a.preventDefault(),r({name:s,apiConfig:e})},n]}function ue(s){const e=p(),{data:t}=C(s),{mutate:r,isLoading:n}=_(te,{onSuccess:()=>{e.invalidateQueries(["/providers/rules"])}});return[a=>{a.preventDefault(),r({names:t.names,apiConfig:s})},n]}function C(s){return x(["/providers/rules",s],()=>ee("/providers/rules",s))}function le(s){const{data:e,isFetching:t}=x(["/rules",s],()=>oe("/rules",s)),{data:r}=C(s),[n]=L(w);if(n==="")return{rules:e,provider:r,isFetching:t};{const i=n.toLowerCase();return{rules:e.filter(a=>a.payload.toLowerCase().indexOf(i)>=0),isFetching:t,provider:{byName:r.byName,names:r.names.filter(a=>a.toLowerCase().indexOf(i)>=0)}}}}const ce="_RuleProviderItem_12aid_1",de="_left_12aid_7",he="_middle_12aid_14",fe="_gray_12aid_21",me="_action_12aid_25",ve="_refreshBtn_12aid_32",d={RuleProviderItem:ce,left:de,middle:he,gray:fe,action:me,refreshBtn:ve};function pe({idx:s,name:e,vehicleType:t,behavior:r,updatedAt:n,ruleCount:i,apiConfig:a}){const[l,u]=ae(e,a),c=K(new Date(n),new Date);return o.jsxs("div",{className:d.RuleProviderItem,children:[o.jsx("span",{className:d.left,children:s}),o.jsxs("div",{className:d.middle,children:[o.jsx(F,{name:e,type:`${t} / ${r}`}),o.jsx("div",{className:d.gray,children:i<2?`${i} rule`:`${i} rules`}),o.jsxs("div",{className:d.action,children:[o.jsxs(D,{onClick:l,disabled:u,className:d.refreshBtn,children:[o.jsx(j,{isRotating:u,size:13}),o.jsx("span",{className:"visually-hidden",children:"Refresh"})]}),o.jsxs("small",{className:d.gray,children:["Updated ",c," ago"]})]})]})]})}function Re({apiConfig:s}){const[e,t]=ue(s),{t:r}=b();return o.jsx(G,{icon:o.jsx(j,{isRotating:t}),text:r("update_all_rule_provider"),style:J,onClick:e})}const ge="_rule_1kxgd_1",ye="_left_1kxgd_12",xe="_a_1kxgd_19",be="_b_1kxgd_26",je="_type_1kxgd_37",h={rule:ge,left:ye,a:xe,b:be,type:je},v={_default:"#59caf9",DIRECT:"#f5bc41",REJECT:"#cb3166"};function _e({proxy:s}){let e=v._default;return v[s]&&(e=v[s]),{color:e}}function Pe({type:s,payload:e,proxy:t,id:r}){const n=_e({proxy:t});return o.jsxs("div",{className:h.rule,children:[o.jsx("div",{className:h.left,children:r}),o.jsxs("div",{children:[o.jsx("div",{className:h.b,children:e}),o.jsxs("div",{className:h.a,children:[o.jsx("div",{className:h.type,children:s}),o.jsx("div",{style:n,children:t})]})]})]})}const we="_header_n1m95_1",Ce="_RuleProviderItemWrapper_n1m95_17",M={header:we,RuleProviderItemWrapper:Ce},{memo:Me}=q,g=30;function Ie(s,{rules:e,provider:t}){const r=t.names.length;return s{const{rules:r,provider:n,apiConfig:i}=t,a=n.names.length;if(s({apiConfig:z(s)}),De=U(Se)(Ee);function Ee({apiConfig:s}){const[e,t]=X(),{rules:r,provider:n}=le(s),i=Ne({provider:n}),{t:a}=b();return o.jsxs("div",{children:[o.jsxs("div",{className:M.header,children:[o.jsx(Q,{title:a("Rules")}),o.jsx(H,{placeholder:"Filter",textAtom:w})]}),o.jsx("div",{ref:e,style:{paddingBottom:g},children:o.jsx(W,{height:t-g,width:"100%",itemCount:r.length+n.names.length,itemSize:i,itemData:{rules:r,provider:n,apiConfig:s},itemKey:Ie,children:I})}),n&&n.names&&n.names.length>0?o.jsx(Re,{apiConfig:s}):null]})}export{De as default}; +import{aa as N,ab as S,ac as E,ad as y,ae as k,af as p,r as f,ag as B,ah as O,I as R,ai as A,aj as T,ak as x,v as L,j as o,L as F,B as D,u as b,b as U,g as z,C as Q,e as q}from"./index-2d443e7c.js";import{a as V,V as W}from"./index.esm-d09f413d.js";import{R as j,T as H}from"./TextFilter-a62f489f.js";import{f as G}from"./index-4bcbc835.js";import{F as J,p as K}from"./Fab-a6cf5682.js";import{u as X}from"./useRemainingViewPortHeight-60d26854.js";import"./debounce-c1ba2006.js";class Y extends N{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const r=this.options;this.options=this.client.defaultMutationOptions(e),S(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(t=this.currentMutation)==null||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const t={listeners:!0};e.type==="success"?t.onSuccess=!0:e.type==="error"&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:E(),t={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){y.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var t,r,n,i;(t=(r=this.mutateOptions).onSuccess)==null||t.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(n=(i=this.mutateOptions).onSettled)==null||n.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var a,l,u,c;(a=(l=this.mutateOptions).onError)==null||a.call(l,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(u=(c=this.mutateOptions).onSettled)==null||u.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:m})=>{m(this.currentResult)})})}}function _(s,e,t){const r=k(s,e,t),n=p({context:r.context}),[i]=f.useState(()=>new Y(n,r));f.useEffect(()=>{i.setOptions(r)},[i,r]);const a=B(f.useCallback(u=>i.subscribe(y.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=f.useCallback((u,c)=>{i.mutate(u,c).catch(Z)},[i]);if(a.error&&O(i.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}function Z(){}function $(s){const e=s.providers,t=Object.keys(e),r={};for(let n=0;n=0,"there is no valid rules list in the rules API response"),s.rules.map((e,t)=>({...e,id:t}))}async function oe(s,e){let t={rules:[]};try{const{url:r,init:n}=R(e),i=await fetch(r+s,n);i.ok&&(t=await i.json())}catch(r){console.log("failed to fetch rules",r)}return ie(t)}const C=T("");function ae(s,e){const t=p(),{mutate:r,isLoading:n}=_(P,{onSuccess:()=>{t.invalidateQueries(["/providers/rules"])}});return[a=>{a.preventDefault(),r({name:s,apiConfig:e})},n]}function ue(s){const e=p(),{data:t}=w(s),{mutate:r,isLoading:n}=_(te,{onSuccess:()=>{e.invalidateQueries(["/providers/rules"])}});return[a=>{a.preventDefault(),r({names:t.names,apiConfig:s})},n]}function w(s){return x(["/providers/rules",s],()=>ee("/providers/rules",s))}function le(s){const{data:e,isFetching:t}=x(["/rules",s],()=>oe("/rules",s)),{data:r}=w(s),[n]=L(C);if(n==="")return{rules:e,provider:r,isFetching:t};{const i=n.toLowerCase();return{rules:e.filter(a=>a.payload.toLowerCase().indexOf(i)>=0),isFetching:t,provider:{byName:r.byName,names:r.names.filter(a=>a.toLowerCase().indexOf(i)>=0)}}}}const ce="_RuleProviderItem_12aid_1",de="_left_12aid_7",he="_middle_12aid_14",fe="_gray_12aid_21",me="_action_12aid_25",ve="_refreshBtn_12aid_32",d={RuleProviderItem:ce,left:de,middle:he,gray:fe,action:me,refreshBtn:ve};function pe({idx:s,name:e,vehicleType:t,behavior:r,updatedAt:n,ruleCount:i,apiConfig:a}){const[l,u]=ae(e,a),c=G(new Date(n),new Date);return o.jsxs("div",{className:d.RuleProviderItem,children:[o.jsx("span",{className:d.left,children:s}),o.jsxs("div",{className:d.middle,children:[o.jsx(F,{name:e,type:`${t} / ${r}`}),o.jsx("div",{className:d.gray,children:i<2?`${i} rule`:`${i} rules`}),o.jsxs("div",{className:d.action,children:[o.jsxs(D,{onClick:l,disabled:u,className:d.refreshBtn,children:[o.jsx(j,{isRotating:u,size:13}),o.jsx("span",{className:"visually-hidden",children:"Refresh"})]}),o.jsxs("small",{className:d.gray,children:["Updated ",c," ago"]})]})]})]})}function Re({apiConfig:s}){const[e,t]=ue(s),{t:r}=b();return o.jsx(J,{icon:o.jsx(j,{isRotating:t}),text:r("update_all_rule_provider"),style:K,onClick:e})}const ge="_rule_1kxgd_1",ye="_left_1kxgd_12",xe="_a_1kxgd_19",be="_b_1kxgd_26",je="_type_1kxgd_37",h={rule:ge,left:ye,a:xe,b:be,type:je},v={_default:"#59caf9",DIRECT:"#f5bc41",REJECT:"#cb3166"};function _e({proxy:s}){let e=v._default;return v[s]&&(e=v[s]),{color:e}}function Pe({type:s,payload:e,proxy:t,id:r}){const n=_e({proxy:t});return o.jsxs("div",{className:h.rule,children:[o.jsx("div",{className:h.left,children:r}),o.jsxs("div",{children:[o.jsx("div",{className:h.b,children:e}),o.jsxs("div",{className:h.a,children:[o.jsx("div",{className:h.type,children:s}),o.jsx("div",{style:n,children:t})]})]})]})}const Ce="_header_n1m95_1",we="_RuleProviderItemWrapper_n1m95_17",I={header:Ce,RuleProviderItemWrapper:we},{memo:Ie}=q,g=30;function Me(s,{rules:e,provider:t}){const r=t.names.length;return s{const{rules:r,provider:n,apiConfig:i}=t,a=n.names.length;if(s({apiConfig:z(s)}),De=U(Se)(Ee);function Ee({apiConfig:s}){const[e,t]=X(),{rules:r,provider:n}=le(s),i=Ne({provider:n}),{t:a}=b();return o.jsxs("div",{children:[o.jsxs("div",{className:I.header,children:[o.jsx(Q,{title:a("Rules")}),o.jsx(H,{placeholder:"Filter",textAtom:C})]}),o.jsx("div",{ref:e,style:{paddingBottom:g},children:o.jsx(W,{height:t-g,width:"100%",itemCount:r.length+n.names.length,itemSize:i,itemData:{rules:r,provider:n,apiConfig:s},itemKey:Me,children:M})}),n&&n.names&&n.names.length>0?o.jsx(Re,{apiConfig:s}):null]})}export{De as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Select-1e3e2920.js b/FILES/etc/config/clash/clash-dashboard/assets/Select-4003d0aa.js similarity index 90% rename from FILES/etc/config/clash/clash-dashboard/assets/Select-1e3e2920.js rename to FILES/etc/config/clash/clash-dashboard/assets/Select-4003d0aa.js index 571177f..24120f3 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Select-1e3e2920.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Select-4003d0aa.js @@ -1 +1 @@ -import{r as a,j as t,ac as r}from"./index-c925a4cb.js";function g({id:o,checked:s,disabled:c,onChange:e}){const[l,u]=a.useState(!!s),p=a.useRef(!!s);a.useEffect(()=>{p.current!==s&&u(!!s),p.current=!!s},[s]);const f=a.useCallback(n=>{c||(u(n),e&&e(n))},[c,e]);return t.jsxs("label",{className:r.toggle,children:[t.jsx("input",{className:r.input,id:o,type:"checkbox",onChange:n=>f(n.target.checked),checked:l,disabled:c}),t.jsx("span",{className:r.track})]})}const x="_select_13zm8_1",m={select:x};function i({options:o,selected:s,onChange:c}){return t.jsx("select",{className:m.select,value:s,onChange:c,children:o.map(([e,l])=>t.jsx("option",{value:e,children:l},e))})}export{i as S,g as T}; +import{r as a,j as t,a9 as r}from"./index-2d443e7c.js";function g({id:o,checked:s,disabled:c,onChange:e}){const[l,u]=a.useState(!!s),p=a.useRef(!!s);a.useEffect(()=>{p.current!==s&&u(!!s),p.current=!!s},[s]);const f=a.useCallback(n=>{c||(u(n),e&&e(n))},[c,e]);return t.jsxs("label",{className:r.toggle,children:[t.jsx("input",{className:r.input,id:o,type:"checkbox",onChange:n=>f(n.target.checked),checked:l,disabled:c}),t.jsx("span",{className:r.track})]})}const x="_select_13zm8_1",m={select:x};function i({options:o,selected:s,onChange:c}){return t.jsx("select",{className:m.select,value:s,onChange:c,children:o.map(([e,l])=>t.jsx("option",{value:e,children:l},e))})}export{i as S,g as T}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-3f06e7b6.js b/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-3f06e7b6.js deleted file mode 100644 index f789efc..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-3f06e7b6.js +++ /dev/null @@ -1 +0,0 @@ -import{r as g,R as c,P as i,c as m,j as l,w as x,e as d}from"./index-c925a4cb.js";import{d as h}from"./debounce-c1ba2006.js";function u(){return u=Object.assign||function(t){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function b(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,s;for(s=0;s=0)&&(e[r]=t[r]);return e}var p=g.forwardRef(function(t,n){var e=t.color,o=e===void 0?"currentColor":e,r=t.size,s=r===void 0?24:r,a=v(t,["color","size"]);return c.createElement("svg",u({ref:n,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),c.createElement("polyline",{points:"23 4 23 10 17 10"}),c.createElement("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"}))});p.propTypes={color:i.string,size:i.oneOfType([i.string,i.number])};p.displayName="RotateCw";const y=p,R="_rotate_1dspl_1",_="_isRotating_1dspl_5",j="_rotating_1dspl_1",f={rotate:R,isRotating:_,rotating:j};function $(t){const n=t.size||16,e=m(f.rotate,{[f.isRotating]:t.isRotating});return l.jsx("span",{className:e,children:l.jsx(y,{size:n})})}const{useCallback:w,useState:O,useMemo:T}=d;function C(t){const[,n]=x(t),[e,o]=O(""),r=T(()=>h(n,300),[n]);return[w(a=>{o(a.target.value),r(a.target.value)},[r]),e]}const z="_input_16a1f_1",P={input:z};function L(t){const[n,e]=C(t.textAtom);return l.jsx("input",{className:P.input,type:"text",value:e,onChange:n,placeholder:t.placeholder})}export{$ as R,L as T,y as a}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-a62f489f.js b/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-a62f489f.js new file mode 100644 index 0000000..67cfe56 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-a62f489f.js @@ -0,0 +1 @@ +import{r as g,R as c,P as i,c as m,j as l,v as x,e as v}from"./index-2d443e7c.js";import{d}from"./debounce-c1ba2006.js";function u(){return u=Object.assign||function(t){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function b(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,s;for(s=0;s=0)&&(e[r]=t[r]);return e}var p=g.forwardRef(function(t,n){var e=t.color,o=e===void 0?"currentColor":e,r=t.size,s=r===void 0?24:r,a=h(t,["color","size"]);return c.createElement("svg",u({ref:n,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),c.createElement("polyline",{points:"23 4 23 10 17 10"}),c.createElement("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"}))});p.propTypes={color:i.string,size:i.oneOfType([i.string,i.number])};p.displayName="RotateCw";const y=p,R="_rotate_1dspl_1",_="_isRotating_1dspl_5",j="_rotating_1dspl_1",f={rotate:R,isRotating:_,rotating:j};function $(t){const n=t.size||16,e=m(f.rotate,{[f.isRotating]:t.isRotating});return l.jsx("span",{className:e,children:l.jsx(y,{size:n})})}const{useCallback:w,useState:O,useMemo:T}=v;function C(t){const[,n]=x(t),[e,o]=O(""),r=T(()=>d(n,300),[n]);return[w(a=>{o(a.target.value),r(a.target.value)},[r]),e]}const z="_input_16a1f_1",P={input:z};function L(t){const[n,e]=C(t.textAtom);return l.jsx("input",{className:P.input,type:"text",value:e,onChange:n,placeholder:t.placeholder})}export{$ as R,L as T,y as a}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/chevron-down-6e2632b9.js b/FILES/etc/config/clash/clash-dashboard/assets/chevron-down-6e2632b9.js deleted file mode 100644 index 3004ea8..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/chevron-down-6e2632b9.js +++ /dev/null @@ -1 +0,0 @@ -import{r as c,R as p,P as a}from"./index-c925a4cb.js";function s(){return s=Object.assign||function(r){for(var o=1;o=0)&&Object.prototype.propertyIsEnumerable.call(r,e)&&(t[e]=r[e])}return t}function u(r,o){if(r==null)return{};var t={},e=Object.keys(r),n,i;for(i=0;i=0)&&(t[n]=r[n]);return t}var l=c.forwardRef(function(r,o){var t=r.color,e=t===void 0?"currentColor":t,n=r.size,i=n===void 0?24:n,f=v(r,["color","size"]);return p.createElement("svg",s({ref:o,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},f),p.createElement("polyline",{points:"6 9 12 15 18 9"}))});l.propTypes={color:a.string,size:a.oneOfType([a.string,a.number])};l.displayName="ChevronDown";const h=l;export{h as C}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index-2d443e7c.js b/FILES/etc/config/clash/clash-dashboard/assets/index-2d443e7c.js new file mode 100644 index 0000000..3652d37 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/index-2d443e7c.js @@ -0,0 +1,127 @@ +var ly=Object.defineProperty;var ay=(e,t,n)=>t in e?ly(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Jc=(e,t,n)=>(ay(e,typeof t!="symbol"?t+"":t,n),n);function uy(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const cy="modulepreload",fy=function(e,t){return new URL(e,t).href},Xc={},ct=function(t,n,r){if(!n||n.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=fy(i,r),i in Xc)return;Xc[i]=!0;const s=i.endsWith(".css"),l=s?'[rel="stylesheet"]':"";if(!!r)for(let c=o.length-1;c>=0;c--){const d=o[c];if(d.href===i&&(!s||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${l}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":cy,s||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),s)return new Promise((c,d)=>{u.addEventListener("load",c),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})};function As(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dy(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Dp={exports:{}},Fs={},Mp={exports:{}},W={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Mo=Symbol.for("react.element"),py=Symbol.for("react.portal"),hy=Symbol.for("react.fragment"),my=Symbol.for("react.strict_mode"),gy=Symbol.for("react.profiler"),vy=Symbol.for("react.provider"),yy=Symbol.for("react.context"),wy=Symbol.for("react.forward_ref"),Sy=Symbol.for("react.suspense"),xy=Symbol.for("react.memo"),Ey=Symbol.for("react.lazy"),Zc=Symbol.iterator;function Cy(e){return e===null||typeof e!="object"?null:(e=Zc&&e[Zc]||e["@@iterator"],typeof e=="function"?e:null)}var Ap={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Fp=Object.assign,jp={};function Sr(e,t,n){this.props=e,this.context=t,this.refs=jp,this.updater=n||Ap}Sr.prototype.isReactComponent={};Sr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Sr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Up(){}Up.prototype=Sr.prototype;function Ru(e,t,n){this.props=e,this.context=t,this.refs=jp,this.updater=n||Ap}var bu=Ru.prototype=new Up;bu.constructor=Ru;Fp(bu,Sr.prototype);bu.isPureReactComponent=!0;var ef=Array.isArray,$p=Object.prototype.hasOwnProperty,Lu={current:null},zp={key:!0,ref:!0,__self:!0,__source:!0};function Bp(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)$p.call(t,r)&&!zp.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(11&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Dy,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(r=>r!==n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{s(...r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(s=>{s.apply(s,[t,...r])})}}function Lr(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function nf(e){return e==null?"":""+e}function My(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}function Nu(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}const i=typeof t!="string"?[].concat(t):t.split(".");for(;i.length>1;){if(o())return{};const s=r(i.shift());!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={}}return o()?{}:{obj:e,k:r(i.shift())}}function rf(e,t,n){const{obj:r,k:o}=Nu(e,t,Object);r[o]=n}function Ay(e,t,n,r){const{obj:o,k:i}=Nu(e,t,Object);o[i]=o[i]||[],r&&(o[i]=o[i].concat(n)),r||o[i].push(n)}function Qi(e,t){const{obj:n,k:r}=Nu(e,t);if(n)return n[r]}function Fy(e,t,n){const r=Qi(e,n);return r!==void 0?r:Qi(t,n)}function Vp(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):Vp(e[r],t[r],n):e[r]=t[r]);return e}function An(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var jy={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Uy(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>jy[t]):e}const $y=[" ",",","?","!",";"];function zy(e,t,n){t=t||"",n=n||"";const r=$y.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const o=new RegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(e);if(!i){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i}function Ki(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;ii+s;)s++,l=r.slice(i,i+s).join(n),a=o[l];if(a===void 0)return;if(a===null)return null;if(t.endsWith(l)){if(typeof a=="string")return a;if(l&&typeof a[l]=="string")return a[l]}const u=r.slice(i+s).join(n);return u?Ki(a,u,n):void 0}o=o[r[i]]}return o}function qi(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class of extends js{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let l=[t,n];r&&typeof r!="string"&&(l=l.concat(r)),r&&typeof r=="string"&&(l=l.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(l=t.split("."));const a=Qi(this.data,l);return a||!s||typeof r!="string"?a:Ki(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(l=t.split("."),o=n,n=l[1]),this.addNamespaces(n),rf(this.data,l,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Object.prototype.toString.apply(r[i])==="[object Array]")&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),o=r,r=n,n=l[1]),this.addNamespaces(n);let a=Qi(this.data,l)||{};o?Vp(a,r,i):a={...a,...r},rf(this.data,l,a),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Hp={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,o))}),t}};const sf={};class Gi extends js{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),My(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=yt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!zy(t,r,o);if(s&&!l){const a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:i};const u=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),t=u.join(o)}return typeof i=="string"&&(i=[i]),{key:t,namespaces:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(t[t.length-1],n),a=l[l.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const x=n.nsSeparator||this.options.nsSeparator;return o?{res:`${a}${x}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:a}:`${a}${x}${s}`}return o?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:a}:s}const d=this.resolve(t,n);let f=d&&d.res;const g=d&&d.usedKey||s,y=d&&d.exactUsedKey||s,w=Object.prototype.toString.apply(f),_=["[object Number]","[object Function]","[object RegExp]"],m=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,p=!this.i18nFormat||this.i18nFormat.handleAsObject;if(p&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&_.indexOf(w)<0&&!(typeof m=="string"&&w==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,f,{...n,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(d.res=x,d):x}if(i){const x=w==="[object Array]",R=x?[]:{},O=x?y:g;for(const P in f)if(Object.prototype.hasOwnProperty.call(f,P)){const S=`${O}${i}${P}`;R[P]=this.translate(S,{...n,joinArrays:!1,ns:l}),R[P]===S&&(R[P]=f[P])}f=R}}else if(p&&typeof m=="string"&&w==="[object Array]")f=f.join(m),f&&(f=this.extendTranslation(f,t,n,r));else{let x=!1,R=!1;const O=n.count!==void 0&&typeof n.count!="string",P=Gi.hasDefaultValue(n),S=O?this.pluralResolver.getSuffix(u,n.count,n):"",b=n.ordinal&&O?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",L=n[`defaultValue${S}`]||n[`defaultValue${b}`]||n.defaultValue;!this.isValidLookup(f)&&P&&(x=!0,f=L),this.isValidLookup(f)||(R=!0,f=s);const F=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:f,A=P&&L!==f&&this.options.updateMissing;if(R||x||A){if(this.logger.log(A?"updateKey":"missingKey",u,a,s,A?L:f),i){const E=this.resolve(s,{...n,keySeparator:!1});E&&E.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&N&&N[0])for(let E=0;E{const $=P&&M!==f?M:F;this.options.missingKeyHandler?this.options.missingKeyHandler(E,a,k,$,A,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(E,a,k,$,A,n),this.emit("missingKey",E,a,k,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?T.forEach(E=>{this.pluralResolver.getSuffixes(E,n).forEach(k=>{j([E],s+k,n[`defaultValue${k}`]||L)})}):j(T,s,L))}f=this.extendTranslation(f,t,n,d,r),R&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${a}:${s}`),(R||x)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${s}`:s,x?f:void 0):f=this.options.parseMissingKeyHandler(f))}return o?(d.res=f,d):f}extendTranslation(t,n,r,o,i){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=t.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language,r),u){const f=t.match(this.interpolator.nestingRegexp),g=f&&f.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,s,l;return typeof t=="string"&&(t=[t]),t.forEach(a=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(a,n),c=u.key;o=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",g=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),y=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(_=>{this.isValidLookup(r)||(l=_,!sf[`${w[0]}-${_}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(sf[`${w[0]}-${_}`]=!0,this.logger.warn(`key "${o}" for languages "${w.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(m=>{if(this.isValidLookup(r))return;s=m;const p=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(p,c,m,_,n);else{let x;f&&(x=this.pluralResolver.getSuffix(m,n.count,n));const R=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(p.push(c+x),n.ordinal&&x.indexOf(O)===0&&p.push(c+x.replace(O,this.options.pluralSeparator)),g&&p.push(c+R)),y){const P=`${c}${this.options.contextSeparator}${n.context}`;p.push(P),f&&(p.push(P+x),n.ordinal&&x.indexOf(O)===0&&p.push(P+x.replace(O,this.options.pluralSeparator)),g&&p.push(P+R))}}let h;for(;h=p.pop();)this.isValidLookup(r)||(i=h,r=this.getResource(m,_,h,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function hl(e){return e.charAt(0).toUpperCase()+e.slice(1)}class lf{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=yt.create("languageUtils")}getScriptPartFromCode(t){if(t=qi(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=qi(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=hl(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=hl(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=hl(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&i.indexOf(o)===0)return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):typeof t=="string"&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.indexOf(s)<0&&i(this.formatLanguageCode(s))}),o}}let By=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Wy={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const Vy=["v1","v2","v3"],Hy=["v4"],af={zero:0,one:1,two:2,few:3,many:4,other:5};function Qy(){const e={};return By.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:Wy[t.fc]}})}),e}class Ky{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=yt.create("pluralResolver"),(!this.options.compatibilityJSON||Hy.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Qy()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(qi(t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>af[o]-af[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!Vy.includes(this.options.compatibilityJSON)}}function uf(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=Fy(e,t,n);return!i&&o&&typeof n=="string"&&(i=Ki(e,n,r),i===void 0&&(i=Ki(t,n,r))),i}class qy{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=yt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:Uy,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?An(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?An(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?An(n.nestingPrefix):n.nestingPrefixEscaped||An("$t("),this.nestingSuffix=n.nestingSuffix?An(n.nestingSuffix):n.nestingSuffixEscaped||An(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(t,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(t,n,r,o){let i,s,l;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(y){return y.replace(/\$/g,"$$$$")}const c=y=>{if(y.indexOf(this.formatSeparator)<0){const p=uf(n,a,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(p,void 0,r,{...o,...n,interpolationkey:y}):p}const w=y.split(this.formatSeparator),_=w.shift().trim(),m=w.join(this.formatSeparator).trim();return this.format(uf(n,a,_,this.options.keySeparator,this.options.ignoreJSONStructure),m,r,{...o,...n,interpolationkey:_})};this.resetRegExp();const d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>u(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?u(this.escape(y)):u(y)}].forEach(y=>{for(l=0;i=y.regex.exec(t);){const w=i[1].trim();if(s=c(w),s===void 0)if(typeof d=="function"){const m=d(t,i,o);s=typeof m=="string"?m:""}else if(o&&Object.prototype.hasOwnProperty.call(o,w))s="";else if(f){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=nf(s));const _=y.safeValue(s);if(t=t.replace(i[0],_),f?(y.regex.lastIndex+=s.length,y.regex.lastIndex-=i[0].length):y.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,s;function l(a,u){const c=this.nestingOptionsSeparator;if(a.indexOf(c)<0)return a;const d=a.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;a=d[0],f=this.interpolate(f,s);const g=f.match(/'/g),y=f.match(/"/g);(g&&g.length%2===0&&!y||y.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),u&&(s={...u,...s})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${a}`,w),`${a}${c}${f}`}return delete s.defaultValue,a}for(;o=this.nestingRegexp.exec(t);){let a=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const c=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=c.shift(),a=c,u=!0}if(i=n(l.call(this,o[1].trim(),s),s),i&&o[0]===t&&typeof i!="string")return i;typeof i!="string"&&(i=nf(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),u&&(i=a.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}function Gy(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(!s)return;const[l,...a]=s.split(":"),u=a.join(":").trim().replace(/^'+|'+$/g,"");n[l.trim()]||(n[l.trim()]=u),u==="false"&&(n[l.trim()]=!1),u==="true"&&(n[l.trim()]=!0),isNaN(u)||(n[l.trim()]=parseInt(u,10))})}return{formatName:t,formatOptions:n}}function Fn(e){const t={};return function(r,o,i){const s=o+JSON.stringify(i);let l=t[s];return l||(l=e(qi(o),i),t[s]=l),l(r)}}class Yy{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=yt.create("formatter"),this.options=t,this.formats={number:Fn((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:Fn((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:Fn((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:Fn((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:Fn((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Fn(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((l,a)=>{const{formatName:u,formatOptions:c}=Gy(a);if(this.formats[u]){let d=l;try{const f=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},g=f.locale||f.lng||o.locale||o.lng||r;d=this.formats[u](l,g,{...c,...o,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}function Jy(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class Xy extends js{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=yt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const i={},s={},l={},a={};return t.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,c=!1,s[f]===void 0&&(s[f]=!0),i[f]===void 0&&(i[f]=!0),a[d]===void 0&&(a[d]=!0)))}),c||(l[u]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(a)}}loaded(t,n,r){const o=t.split("|"),i=o[0],s=o[1];n&&this.emit("failedLoading",i,s,n),r&&this.store.addResourceBundle(i,s,r),this.state[t]=n?-1:2;const l={};this.queue.forEach(a=>{Ay(a.loaded,[i],s),Jy(a,t),n&&a.errors.push(n),a.pendingCount===0&&!a.done&&(Object.keys(a.loaded).forEach(u=>{l[u]||(l[u]={});const c=a.loaded[u];c.length&&c.forEach(d=>{l[u][d]===void 0&&(l[u][d]=!0)})}),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(a=>!a.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const l=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&o{this.read.call(this,t,n,r,o+1,i*2,s)},i);return}s(u,c)},a=this.backend[r].bind(this.backend);if(a.length===2){try{const u=a(t,n);u&&typeof u.then=="function"?u.then(c=>l(null,c)).catch(l):l(null,u)}catch(u){l(u)}return}return a(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,s),!s&&l&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,l),this.loaded(t,s,l)})}saveMissing(t,n,r,o,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const a={...s,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,n,r,o,a):c=u(t,n,r,o),c&&typeof c.then=="function"?c.then(d=>l(null,d)).catch(l):l(null,c)}catch(c){l(c)}else u(t,n,r,o,l,a)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}function cf(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ff(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ii(){}function Zy(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class io extends js{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ff(t),this.services={},this.logger=yt,this.modules={external:[]},Zy(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=cf();this.options={...o,...this.options,...ff(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function i(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?yt.init(i(this.modules.logger),this.options):yt.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=Yy);const d=new lf(this.options);this.store=new of(this.options.resources,this.options);const f=this.services;f.logger=yt,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Ky(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=i(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new qy(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Xy(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(g){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_1?y-1:0),_=1;_{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,r||(r=ii),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const a=Lr(),u=()=>{const c=(d,f)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),a}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ii;const o=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],s=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(a=>s(a)),this.options.preload&&this.options.preload.forEach(l=>s(l)),this.services.backendConnector.load(i,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const o=Lr();return t||(t=this.languages),n||(n=this.options.ns),r||(r=ii),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Hp.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Lr();this.emit("languageChanging",t);const i=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},s=(a,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(a,function(){return r.t(...arguments)})},l=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=typeof a=="string"?a:this.services.languageUtils.getBestMatchFromCodes(a);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{s(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),o}getFixedT(t,n,r){var o=this;const i=function(s,l){let a;if(typeof l!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d`${a.keyPrefix}${f}${y}`):g=a.keyPrefix?`${a.keyPrefix}${f}${s}`:s,o.t(g,a)};return typeof t=="string"?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(l,a)=>{const u=this.services.backendConnector.state[`${l}|${a}`];return u===-1||u===2};if(n.precheck){const l=n.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(i,t)))}loadNamespaces(t,n){const r=Lr();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Lr();typeof t=="string"&&(t=[t]);const o=this.options.preload||[],i=t.filter(s=>o.indexOf(s)<0);return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new lf(cf());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new io(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ii;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new io(o);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(l=>{i[l]=this[l]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new of(this.store.data,o),i.services.resourceStore=i.store),i.translator=new Gi(i.services,o),i.translator.on("*",function(l){for(var a=arguments.length,u=new Array(a>1?a-1:0),c=1;c0){var l=o.maxAge-0;if(Number.isNaN(l))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(l))}if(o.domain){if(!pf.test(o.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(o.domain)}if(o.path){if(!pf.test(o.path))throw new TypeError("option path is invalid");s+="; Path=".concat(o.path)}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(o.expires.toUTCString())}if(o.httpOnly&&(s+="; HttpOnly"),o.secure&&(s+="; Secure"),o.sameSite){var a=typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite;switch(a){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},hf={create:function(t,n,r,o){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),o&&(i.domain=o),document.cookie=l0(t,encodeURIComponent(n),i)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),o=0;o-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var o=r.substring(1),i=o.split("&"),s=0;s0){var a=i[s].substring(0,l);a===t.lookupQuerystring&&(n=i[s].substring(l+1))}}}return n}},Tr=null,mf=function(){if(Tr!==null)return Tr;try{Tr=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Tr=!1}return Tr},c0={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&mf()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&mf()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},Nr=null,gf=function(){if(Nr!==null)return Nr;try{Nr=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Nr=!1}return Nr},f0={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&gf()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&gf()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},d0={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},p0={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},h0={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},m0={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function g0(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}}var Kp=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};e0(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return r0(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=s0(r,this.options||{},g0()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(i){return i.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(a0),this.addDetector(u0),this.addDetector(c0),this.addDetector(f0),this.addDetector(d0),this.addDetector(p0),this.addDetector(h0),this.addDetector(m0)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var o=[];return n.forEach(function(i){if(r.detectors[i]){var s=r.detectors[i].lookup(r.options);s&&typeof s=="string"&&(s=[s]),s&&(o=o.concat(s))}}),o=o.map(function(i){return r.options.convertDetectedLanguage(i)}),this.services.languageUtils.getBestMatchFromCodes?o:o.length>0?o[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var o=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(i){o.detectors[i]&&o.detectors[i].cacheUserLanguage(n,o.options)}))}}]),e}();Kp.type="languageDetector";function v0(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function yf(e,t,n){e.loadNamespaces(t,qp(e,n))}function wf(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,qp(e,r))}function y0(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],o=t.options?t.options.fallbackLng:!1,i=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(l,a)=>{const u=t.services.backendConnector.state[`${l}|${a}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!o||s(i,e)))}function w0(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(ea("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(o,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!i(o.isLanguageChangingTo,e))return!1}}):y0(e,t,n)}const S0=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,x0={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},E0=e=>x0[e],C0=e=>e.replace(S0,E0);let ta={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:C0};function _0(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ta={...ta,...e}}function k0(){return ta}let Gp;function P0(e){Gp=e}function O0(){return Gp}const R0={type:"3rdParty",init(e){_0(e.options.react),P0(e)}},b0=v.createContext();class L0{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const T0=(e,t)=>{const n=v.useRef();return v.useEffect(()=>{n.current=t?n.current:e},[e,t]),n.current};function Ao(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=v.useContext(b0)||{},i=n||r||O0();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new L0),!i){ea("You will need to pass in an i18next instance by using initReactI18next");const h=(R,O)=>typeof O=="string"?O:O&&typeof O=="object"&&typeof O.defaultValue=="string"?O.defaultValue:Array.isArray(R)?R[R.length-1]:R,x=[h,{},!1];return x.t=h,x.i18n={},x.ready=!1,x}i.options.react&&i.options.react.wait!==void 0&&ea("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...k0(),...i.options.react,...t},{useSuspense:l,keyPrefix:a}=s;let u=e||o||i.options&&i.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(u);const c=(i.isInitialized||i.initializedStoreOnce)&&u.every(h=>w0(h,i,s));function d(){return i.getFixedT(t.lng||null,s.nsMode==="fallback"?u:u[0],a)}const[f,g]=v.useState(d);let y=u.join();t.lng&&(y=`${t.lng}${y}`);const w=T0(y),_=v.useRef(!0);v.useEffect(()=>{const{bindI18n:h,bindI18nStore:x}=s;_.current=!0,!c&&!l&&(t.lng?wf(i,t.lng,u,()=>{_.current&&g(d)}):yf(i,u,()=>{_.current&&g(d)})),c&&w&&w!==y&&_.current&&g(d);function R(){_.current&&g(d)}return h&&i&&i.on(h,R),x&&i&&i.store.on(x,R),()=>{_.current=!1,h&&i&&h.split(" ").forEach(O=>i.off(O,R)),x&&i&&x.split(" ").forEach(O=>i.store.off(O,R))}},[i,y]);const m=v.useRef(!0);v.useEffect(()=>{_.current&&!m.current&&g(d),m.current=!1},[i,a]);const p=[f,i,c];if(p.t=f,p.i18n=i,p.ready=c,c||!c&&!l)return p;throw new Promise(h=>{t.lng?wf(i,t.lng,u,()=>h()):yf(i,u,()=>h())})}const N0={type:"backend",read:(e,t,n)=>{let r;switch(e){case"zh":case"zh-CN":r=ct(()=>import("./zh-39651f1e.js"),[],import.meta.url);break;case"en":default:r=ct(()=>import("./en-b634b939.js"),[],import.meta.url);break}r?r.then(o=>n(null,o.data),o=>n(o,null)):n(new Error(`unable to load translation file for language ${e}`),null)}};Ee.use(R0).use(Kp).use(N0).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1}});const Yp=""+new URL("TwemojiCountryFlags-9f04f144.woff2",import.meta.url).href;var Jp={exports:{}},$e={},Xp={exports:{}},Zp={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(e){function t(k,M){var $=k.length;k.push(M);e:for(;0<$;){var B=$-1>>>1,K=k[B];if(0>>1;Bo(cn,$))Zeo(H,cn)?(k[B]=H,k[Ze]=$,B=Ze):(k[B]=cn,k[Re]=$,B=Re);else if(Zeo(H,$))k[B]=H,k[Ze]=$,B=Ze;else break e}}return M}function o(k,M){var $=k.sortIndex-M.sortIndex;return $!==0?$:k.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,f=3,g=!1,y=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(k){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=k)r(u),M.sortIndex=M.expirationTime,t(a,M);else break;M=n(u)}}function x(k){if(w=!1,h(k),!y)if(n(a)!==null)y=!0,j(R);else{var M=n(u);M!==null&&E(x,M.startTime-k)}}function R(k,M){y=!1,w&&(w=!1,m(S),S=-1),g=!0;var $=f;try{for(h(M),d=n(a);d!==null&&(!(d.expirationTime>M)||k&&!D());){var B=d.callback;if(typeof B=="function"){d.callback=null,f=d.priorityLevel;var K=B(d.expirationTime<=M);M=e.unstable_now(),typeof K=="function"?d.callback=K:d===n(a)&&r(a),h(M)}else r(a);d=n(a)}if(d!==null)var Oe=!0;else{var Re=n(u);Re!==null&&E(x,Re.startTime-M),Oe=!1}return Oe}finally{d=null,f=$,g=!1}}var O=!1,P=null,S=-1,b=5,L=-1;function D(){return!(e.unstable_now()-Lk||125B?(k.sortIndex=$,t(u,k),n(a)===null&&k===n(u)&&(w?(m(S),S=-1):w=!0,E(x,$-B))):(k.sortIndex=K,t(a,k),y||g||(y=!0,j(R))),k},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(k){var M=f;return function(){var $=f;f=M;try{return k.apply(this,arguments)}finally{f=$}}}})(Zp);Xp.exports=Zp;var I0=Xp.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var eh=v,Fe=I0;function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),na=Object.prototype.hasOwnProperty,D0=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Sf={},xf={};function M0(e){return na.call(xf,e)?!0:na.call(Sf,e)?!1:D0.test(e)?xf[e]=!0:(Sf[e]=!0,!1)}function A0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function F0(e,t,n,r){if(t===null||typeof t>"u"||A0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Pe(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ge[e]=new Pe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ge[t]=new Pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ge[e]=new Pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ge[e]=new Pe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ge[e]=new Pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ge[e]=new Pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ge[e]=new Pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ge[e]=new Pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ge[e]=new Pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Iu=/[\-:]([a-z])/g;function Du(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Iu,Du);ge[t]=new Pe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Iu,Du);ge[t]=new Pe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Iu,Du);ge[t]=new Pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ge[e]=new Pe(e,1,!1,e.toLowerCase(),null,!1,!1)});ge.xlinkHref=new Pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ge[e]=new Pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mu(e,t,n,r){var o=ge.hasOwnProperty(t)?ge[t]:null;(o!==null?o.type!==0:r||!(2l||o[s]!==i[l]){var a=` +`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{gl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Br(e):""}function j0(e){switch(e.tag){case 5:return Br(e.type);case 16:return Br("Lazy");case 13:return Br("Suspense");case 19:return Br("SuspenseList");case 0:case 2:case 15:return e=vl(e.type,!1),e;case 11:return e=vl(e.type.render,!1),e;case 1:return e=vl(e.type,!0),e;default:return""}}function sa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case zn:return"Fragment";case $n:return"Portal";case ra:return"Profiler";case Au:return"StrictMode";case oa:return"Suspense";case ia:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rh:return(e.displayName||"Context")+".Consumer";case nh:return(e._context.displayName||"Context")+".Provider";case Fu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ju:return t=e.displayName||null,t!==null?t:sa(e.type)||"Memo";case Mt:t=e._payload,e=e._init;try{return sa(e(t))}catch{}}return null}function U0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return sa(t);case 8:return t===Au?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function rn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ih(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $0(e){var t=ih(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function li(e){e._valueTracker||(e._valueTracker=$0(e))}function sh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ih(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Yi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function la(e,t){var n=t.checked;return te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Cf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lh(e,t){t=t.checked,t!=null&&Mu(e,"checked",t,!1)}function aa(e,t){lh(e,t);var n=rn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ua(e,t.type,n):t.hasOwnProperty("defaultValue")&&ua(e,t.type,rn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _f(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ua(e,t,n){(t!=="number"||Yi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wr=Array.isArray;function tr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=ai.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ao(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},z0=["Webkit","ms","Moz","O"];Object.keys(qr).forEach(function(e){z0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qr[t]=qr[e]})});function fh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||qr.hasOwnProperty(e)&&qr[e]?(""+t).trim():t+"px"}function dh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=fh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var B0=te({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function da(e,t){if(t){if(B0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function pa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ha=null;function Uu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ma=null,nr=null,rr=null;function Of(e){if(e=Uo(e)){if(typeof ma!="function")throw Error(I(280));var t=e.stateNode;t&&(t=Ws(t),ma(e.stateNode,e.type,t))}}function ph(e){nr?rr?rr.push(e):rr=[e]:nr=e}function hh(){if(nr){var e=nr,t=rr;if(rr=nr=null,Of(e),t)for(e=0;e>>=0,e===0?32:31-(Z0(e)/e1|0)|0}var ui=64,ci=4194304;function Vr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function es(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=Vr(l):(i&=s,i!==0&&(r=Vr(i)))}else s=n&~o,s!==0?r=Vr(s):i!==0&&(r=Vr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Fo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-lt(t),e[t]=n}function o1(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Yr),Af=String.fromCharCode(32),Ff=!1;function Dh(e,t){switch(e){case"keyup":return N1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bn=!1;function D1(e,t){switch(e){case"compositionend":return Mh(t);case"keypress":return t.which!==32?null:(Ff=!0,Af);case"textInput":return e=t.data,e===Af&&Ff?null:e;default:return null}}function M1(e,t){if(Bn)return e==="compositionend"||!Ku&&Dh(e,t)?(e=Nh(),Ni=Vu=Bt=null,Bn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=zf(n)}}function Uh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Uh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $h(){for(var e=window,t=Yi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yi(e.document)}return t}function qu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function V1(e){var t=$h(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Uh(n.ownerDocument.documentElement,n)){if(r!==null&&qu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Bf(n,i);var s=Bf(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Wn=null,xa=null,Xr=null,Ea=!1;function Wf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ea||Wn==null||Wn!==Yi(r)||(r=Wn,"selectionStart"in r&&qu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xr&&mo(Xr,r)||(Xr=r,r=rs(xa,"onSelect"),0Qn||(e.current=Ra[Qn],Ra[Qn]=null,Qn--)}function G(e,t){Qn++,Ra[Qn]=e.current,e.current=t}var on={},xe=an(on),Te=an(!1),En=on;function ur(e,t){var n=e.type.contextTypes;if(!n)return on;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ne(e){return e=e.childContextTypes,e!=null}function is(){J(Te),J(xe)}function Yf(e,t,n){if(xe.current!==on)throw Error(I(168));G(xe,t),G(Te,n)}function Gh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(I(108,U0(e)||"Unknown",o));return te({},n,r)}function ss(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||on,En=xe.current,G(xe,e),G(Te,Te.current),!0}function Jf(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=Gh(e,t,En),r.__reactInternalMemoizedMergedChildContext=e,J(Te),J(xe),G(xe,e)):J(Te),G(Te,n)}var Ct=null,Vs=!1,Tl=!1;function Yh(e){Ct===null?Ct=[e]:Ct.push(e)}function nw(e){Vs=!0,Yh(e)}function un(){if(!Tl&&Ct!==null){Tl=!0;var e=0,t=Q;try{var n=Ct;for(Q=1;e>=s,o-=s,_t=1<<32-lt(t)+o|n<S?(b=P,P=null):b=P.sibling;var L=f(m,P,h[S],x);if(L===null){P===null&&(P=b);break}e&&P&&L.alternate===null&&t(m,P),p=i(L,p,S),O===null?R=L:O.sibling=L,O=L,P=b}if(S===h.length)return n(m,P),X&&fn(m,S),R;if(P===null){for(;SS?(b=P,P=null):b=P.sibling;var D=f(m,P,L.value,x);if(D===null){P===null&&(P=b);break}e&&P&&D.alternate===null&&t(m,P),p=i(D,p,S),O===null?R=D:O.sibling=D,O=D,P=b}if(L.done)return n(m,P),X&&fn(m,S),R;if(P===null){for(;!L.done;S++,L=h.next())L=d(m,L.value,x),L!==null&&(p=i(L,p,S),O===null?R=L:O.sibling=L,O=L);return X&&fn(m,S),R}for(P=r(m,P);!L.done;S++,L=h.next())L=g(P,m,S,L.value,x),L!==null&&(e&&L.alternate!==null&&P.delete(L.key===null?S:L.key),p=i(L,p,S),O===null?R=L:O.sibling=L,O=L);return e&&P.forEach(function(F){return t(m,F)}),X&&fn(m,S),R}function _(m,p,h,x){if(typeof h=="object"&&h!==null&&h.type===zn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case si:e:{for(var R=h.key,O=p;O!==null;){if(O.key===R){if(R=h.type,R===zn){if(O.tag===7){n(m,O.sibling),p=o(O,h.props.children),p.return=m,m=p;break e}}else if(O.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Mt&&od(R)===O.type){n(m,O.sibling),p=o(O,h.props),p.ref=jr(m,O,h),p.return=m,m=p;break e}n(m,O);break}else t(m,O);O=O.sibling}h.type===zn?(p=Sn(h.props.children,m.mode,x,h.key),p.return=m,m=p):(x=$i(h.type,h.key,h.props,null,m.mode,x),x.ref=jr(m,p,h),x.return=m,m=x)}return s(m);case $n:e:{for(O=h.key;p!==null;){if(p.key===O)if(p.tag===4&&p.stateNode.containerInfo===h.containerInfo&&p.stateNode.implementation===h.implementation){n(m,p.sibling),p=o(p,h.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=Ul(h,m.mode,x),p.return=m,m=p}return s(m);case Mt:return O=h._init,_(m,p,O(h._payload),x)}if(Wr(h))return y(m,p,h,x);if(Ir(h))return w(m,p,h,x);vi(m,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,p!==null&&p.tag===6?(n(m,p.sibling),p=o(p,h),p.return=m,m=p):(n(m,p),p=jl(h,m.mode,x),p.return=m,m=p),s(m)):n(m,p)}return _}var fr=om(!0),im=om(!1),$o={},St=an($o),wo=an($o),So=an($o);function vn(e){if(e===$o)throw Error(I(174));return e}function rc(e,t){switch(G(So,t),G(wo,e),G(St,$o),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=fa(t,e)}J(St),G(St,t)}function dr(){J(St),J(wo),J(So)}function sm(e){vn(So.current);var t=vn(St.current),n=fa(t,e.type);t!==n&&(G(wo,e),G(St,n))}function oc(e){wo.current===e&&(J(St),J(wo))}var Z=an(0);function ds(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Nl=[];function ic(){for(var e=0;en?n:4,e(!0);var r=Il.transition;Il.transition={};try{e(!1),t()}finally{Q=n,Il.transition=r}}function Em(){return Xe().memoizedState}function sw(e,t,n){var r=Zt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Cm(e))_m(t,n);else if(n=em(e,t,n,r),n!==null){var o=_e();at(n,e,r,o),km(n,t,r)}}function lw(e,t,n){var r=Zt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cm(e))_m(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,ft(l,s)){var a=t.interleaved;a===null?(o.next=o,tc(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=em(e,t,o,r),n!==null&&(o=_e(),at(n,e,r,o),km(n,t,r))}}function Cm(e){var t=e.alternate;return e===ee||t!==null&&t===ee}function _m(e,t){Zr=ps=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function km(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zu(e,n)}}var hs={readContext:Je,useCallback:ve,useContext:ve,useEffect:ve,useImperativeHandle:ve,useInsertionEffect:ve,useLayoutEffect:ve,useMemo:ve,useReducer:ve,useRef:ve,useState:ve,useDebugValue:ve,useDeferredValue:ve,useTransition:ve,useMutableSource:ve,useSyncExternalStore:ve,useId:ve,unstable_isNewReconciler:!1},aw={readContext:Je,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:sd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ai(4194308,4,vm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ai(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ai(4,2,e,t)},useMemo:function(e,t){var n=gt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=sw.bind(null,ee,e),[r.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:id,useDebugValue:cc,useDeferredValue:function(e){return gt().memoizedState=e},useTransition:function(){var e=id(!1),t=e[0];return e=iw.bind(null,e[1]),gt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ee,o=gt();if(X){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),fe===null)throw Error(I(349));_n&30||um(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,sd(fm.bind(null,r,i,e),[e]),r.flags|=2048,Co(9,cm.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=gt(),t=fe.identifierPrefix;if(X){var n=kt,r=_t;n=(r&~(1<<32-lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=xo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[vt]=t,e[yo]=r,Dm(e,t,!1,!1),t.stateNode=e;e:{switch(s=pa(n,r),n){case"dialog":Y("cancel",e),Y("close",e),o=r;break;case"iframe":case"object":case"embed":Y("load",e),o=r;break;case"video":case"audio":for(o=0;ohr&&(t.flags|=128,r=!0,Ur(i,!1),t.lanes=4194304)}else{if(!r)if(e=ds(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ur(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!X)return ye(t),null}else 2*oe()-i.renderingStartTime>hr&&n!==1073741824&&(t.flags|=128,r=!0,Ur(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=oe(),t.sibling=null,n=Z.current,G(Z,r?n&1|2:n&1),t):(ye(t),null);case 22:case 23:return gc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?De&1073741824&&(ye(t),t.subtreeFlags&6&&(t.flags|=8192)):ye(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function gw(e,t){switch(Yu(t),t.tag){case 1:return Ne(t.type)&&is(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dr(),J(Te),J(xe),ic(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return oc(t),null;case 13:if(J(Z),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));cr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return J(Z),null;case 4:return dr(),null;case 10:return ec(t.type._context),null;case 22:case 23:return gc(),null;case 24:return null;default:return null}}var wi=!1,Se=!1,vw=typeof WeakSet=="function"?WeakSet:Set,U=null;function Yn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ne(e,t,r)}else n.current=null}function $a(e,t,n){try{n()}catch(r){ne(e,t,r)}}var md=!1;function yw(e,t){if(Ca=ts,e=$h(),qu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var g;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(g=d.firstChild)!==null;)f=d,d=g;for(;;){if(d===e)break t;if(f===n&&++u===o&&(l=s),f===i&&++c===r&&(a=s),(g=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=g}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(_a={focusedElem:e,selectionRange:n},ts=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,_=y.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:tt(t.type,w),_);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(x){ne(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return y=md,md=!1,y}function eo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&$a(t,n,i)}o=o.next}while(o!==r)}}function Ks(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function za(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Fm(e){var t=e.alternate;t!==null&&(e.alternate=null,Fm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vt],delete t[yo],delete t[Oa],delete t[ew],delete t[tw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jm(e){return e.tag===5||e.tag===3||e.tag===4}function gd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ba(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=os));else if(r!==4&&(e=e.child,e!==null))for(Ba(e,t,n),e=e.sibling;e!==null;)Ba(e,t,n),e=e.sibling}function Wa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wa(e,t,n),e=e.sibling;e!==null;)Wa(e,t,n),e=e.sibling}var pe=null,ot=!1;function It(e,t,n){for(n=n.child;n!==null;)Um(e,t,n),n=n.sibling}function Um(e,t,n){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(Us,n)}catch{}switch(n.tag){case 5:Se||Yn(n,t);case 6:var r=pe,o=ot;pe=null,It(e,t,n),pe=r,ot=o,pe!==null&&(ot?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(ot?(e=pe,n=n.stateNode,e.nodeType===8?Ll(e.parentNode,n):e.nodeType===1&&Ll(e,n),po(e)):Ll(pe,n.stateNode));break;case 4:r=pe,o=ot,pe=n.stateNode.containerInfo,ot=!0,It(e,t,n),pe=r,ot=o;break;case 0:case 11:case 14:case 15:if(!Se&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&$a(n,t,s),o=o.next}while(o!==r)}It(e,t,n);break;case 1:if(!Se&&(Yn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ne(n,t,l)}It(e,t,n);break;case 21:It(e,t,n);break;case 22:n.mode&1?(Se=(r=Se)||n.memoizedState!==null,It(e,t,n),Se=r):It(e,t,n);break;default:It(e,t,n)}}function vd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vw),t.forEach(function(r){var o=Ow.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function et(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=oe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sw(r/1960))-r,10e?16:e,Wt===null)var r=!1;else{if(e=Wt,Wt=null,vs=0,V&6)throw Error(I(331));var o=V;for(V|=4,U=e.current;U!==null;){var i=U,s=i.child;if(U.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aoe()-hc?wn(e,0):pc|=n),Ie(e,t)}function Km(e,t){t===0&&(e.mode&1?(t=ci,ci<<=1,!(ci&130023424)&&(ci=4194304)):t=1);var n=_e();e=bt(e,t),e!==null&&(Fo(e,t,n),Ie(e,n))}function Pw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Km(e,n)}function Ow(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),Km(e,n)}var qm;qm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Te.current)Le=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Le=!1,hw(e,t,n);Le=!!(e.flags&131072)}else Le=!1,X&&t.flags&1048576&&Jh(t,as,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Fi(e,t),e=t.pendingProps;var o=ur(t,xe.current);ir(t,n),o=lc(null,t,r,e,o,n);var i=ac();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ne(r)?(i=!0,ss(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,nc(t),o.updater=Hs,t.stateNode=o,o._reactInternals=t,Ia(t,r,e,n),t=Aa(null,t,r,!0,i,n)):(t.tag=0,X&&i&&Gu(t),Ce(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Fi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=bw(r),e=tt(r,e),o){case 0:t=Ma(null,t,r,e,n);break e;case 1:t=dd(null,t,r,e,n);break e;case 11:t=cd(null,t,r,e,n);break e;case 14:t=fd(null,t,r,tt(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tt(r,o),Ma(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tt(r,o),dd(e,t,r,o,n);case 3:e:{if(Tm(t),e===null)throw Error(I(387));r=t.pendingProps,i=t.memoizedState,o=i.element,tm(e,t),fs(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=pr(Error(I(423)),t),t=pd(e,t,r,n,o);break e}else if(r!==o){o=pr(Error(I(424)),t),t=pd(e,t,r,n,o);break e}else for(Me=Yt(t.stateNode.containerInfo.firstChild),Ae=t,X=!0,it=null,n=im(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(cr(),r===o){t=Lt(e,t,n);break e}Ce(e,t,r,n)}t=t.child}return t;case 5:return sm(t),e===null&&La(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,ka(r,o)?s=null:i!==null&&ka(r,i)&&(t.flags|=32),Lm(e,t),Ce(e,t,s,n),t.child;case 6:return e===null&&La(t),null;case 13:return Nm(e,t,n);case 4:return rc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fr(t,null,r,n):Ce(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tt(r,o),cd(e,t,r,o,n);case 7:return Ce(e,t,t.pendingProps,n),t.child;case 8:return Ce(e,t,t.pendingProps.children,n),t.child;case 12:return Ce(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,G(us,r._currentValue),r._currentValue=s,i!==null)if(ft(i.value,s)){if(i.children===o.children&&!Te.current){t=Lt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Pt(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Ta(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(I(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ta(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Ce(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ir(t,n),o=Je(o),r=r(o),t.flags|=1,Ce(e,t,r,n),t.child;case 14:return r=t.type,o=tt(r,t.pendingProps),o=tt(r.type,o),fd(e,t,r,o,n);case 15:return Rm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tt(r,o),Fi(e,t),t.tag=1,Ne(r)?(e=!0,ss(t)):e=!1,ir(t,n),rm(t,r,o),Ia(t,r,o,n),Aa(null,t,r,!0,e,n);case 19:return Im(e,t,n);case 22:return bm(e,t,n)}throw Error(I(156,t.tag))};function Gm(e,t){return xh(e,t)}function Rw(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ke(e,t,n,r){return new Rw(e,t,n,r)}function yc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bw(e){if(typeof e=="function")return yc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fu)return 11;if(e===ju)return 14}return 2}function en(e,t){var n=e.alternate;return n===null?(n=Ke(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function $i(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")yc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case zn:return Sn(n.children,o,i,t);case Au:s=8,o|=8;break;case ra:return e=Ke(12,n,t,o|2),e.elementType=ra,e.lanes=i,e;case oa:return e=Ke(13,n,t,o),e.elementType=oa,e.lanes=i,e;case ia:return e=Ke(19,n,t,o),e.elementType=ia,e.lanes=i,e;case oh:return Gs(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nh:s=10;break e;case rh:s=9;break e;case Fu:s=11;break e;case ju:s=14;break e;case Mt:s=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=Ke(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Sn(e,t,n,r){return e=Ke(7,e,r,t),e.lanes=n,e}function Gs(e,t,n,r){return e=Ke(22,e,r,t),e.elementType=oh,e.lanes=n,e.stateNode={isHidden:!1},e}function jl(e,t,n){return e=Ke(6,e,null,t),e.lanes=n,e}function Ul(e,t,n){return t=Ke(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lw(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wl(0),this.expirationTimes=wl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function wc(e,t,n,r,o,i,s,l,a){return e=new Lw(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ke(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},nc(i),e}function Tw(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Zm)}catch(e){console.error(e)}}Zm(),Jp.exports=$e;var Cc=Jp.exports,eg,kd=Cc;eg=kd.createRoot,kd.hydrateRoot;var qa={exports:{}},On={},tg={exports:{}},Aw="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Fw=Aw,jw=Fw;function ng(){}function rg(){}rg.resetWarningCache=ng;var Uw=function(){function e(r,o,i,s,l,a){if(a!==jw){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:rg,resetWarningCache:ng};return n.PropTypes=n,n};tg.exports=Uw();var _c=tg.exports;const qe=As(_c);var Ga={exports:{}},dt={},Ya={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;/*! + * Adapted from jQuery UI core + * + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/ui-core/ + */var n="none",r="contents",o=/input|select|textarea|button|object|iframe/;function i(d,f){return f.getPropertyValue("overflow")!=="visible"||d.scrollWidth<=0&&d.scrollHeight<=0}function s(d){var f=d.offsetWidth<=0&&d.offsetHeight<=0;if(f&&!d.innerHTML)return!0;try{var g=window.getComputedStyle(d),y=g.getPropertyValue("display");return f?y!==r&&i(d,g):y===n}catch{return console.warn("Failed to inspect element style"),!1}}function l(d){for(var f=d,g=d.getRootNode&&d.getRootNode();f&&f!==document.body;){if(g&&f===g&&(f=g.host.parentNode),s(f))return!1;f=f.parentNode}return!0}function a(d,f){var g=d.nodeName.toLowerCase(),y=o.test(g)&&!d.disabled||g==="a"&&d.href||f;return y&&l(d)}function u(d){var f=d.getAttribute("tabindex");f===null&&(f=void 0);var g=isNaN(f);return(g||f>=0)&&a(d,!g)}function c(d){var f=[].slice.call(d.querySelectorAll("*"),0).reduce(function(g,y){return g.concat(y.shadowRoot?c(y.shadowRoot):[y])},[]);return f.filter(u)}e.exports=t.default})(Ya,Ya.exports);var og=Ya.exports;Object.defineProperty(dt,"__esModule",{value:!0});dt.resetState=Ww;dt.log=Vw;dt.handleBlur=ko;dt.handleFocus=Po;dt.markForFocusLater=Hw;dt.returnFocus=Qw;dt.popWithoutFocus=Kw;dt.setupScopedFocus=qw;dt.teardownScopedFocus=Gw;var $w=og,zw=Bw($w);function Bw(e){return e&&e.__esModule?e:{default:e}}var mr=[],Xn=null,Ja=!1;function Ww(){mr=[]}function Vw(){}function ko(){Ja=!0}function Po(){if(Ja){if(Ja=!1,!Xn)return;setTimeout(function(){if(!Xn.contains(document.activeElement)){var e=(0,zw.default)(Xn)[0]||Xn;e.focus()}},0)}}function Hw(){mr.push(document.activeElement)}function Qw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=null;try{mr.length!==0&&(t=mr.pop(),t.focus({preventScroll:e}));return}catch{console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}}function Kw(){mr.length>0&&mr.pop()}function qw(e){Xn=e,window.addEventListener?(window.addEventListener("blur",ko,!1),document.addEventListener("focus",Po,!0)):(window.attachEvent("onBlur",ko),document.attachEvent("onFocus",Po))}function Gw(){Xn=null,window.addEventListener?(window.removeEventListener("blur",ko),document.removeEventListener("focus",Po)):(window.detachEvent("onBlur",ko),document.detachEvent("onFocus",Po))}var Xa={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=og,r=o(n);function o(l){return l&&l.__esModule?l:{default:l}}function i(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;return l.activeElement.shadowRoot?i(l.activeElement.shadowRoot):l.activeElement}function s(l,a){var u=(0,r.default)(l);if(!u.length){a.preventDefault();return}var c=void 0,d=a.shiftKey,f=u[0],g=u[u.length-1],y=i();if(l===y){if(!d)return;c=g}if(g===y&&!d&&(c=f),f===y&&d&&(c=g),c){a.preventDefault(),c.focus();return}var w=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),_=w!=null&&w[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(_){var m=u.indexOf(y);if(m>-1&&(m+=d?-1:1),c=u[m],typeof c>"u"){a.preventDefault(),c=d?g:f,c.focus();return}a.preventDefault(),c.focus()}}e.exports=t.default})(Xa,Xa.exports);var Yw=Xa.exports,pt={},Jw=function(){},Xw=Jw,ut={},ig={exports:{}};/*! + Copyright (c) 2015 Jed Watson. + Based on code that is Copyright 2013-2015, Facebook, Inc. + All rights reserved. +*/(function(e){(function(){var t=!!(typeof window<"u"&&window.document&&window.document.createElement),n={canUseDOM:t,canUseWorkers:typeof Worker<"u",canUseEventListeners:t&&!!(window.addEventListener||window.attachEvent),canUseViewport:t&&!!window.screen};e.exports?e.exports=n:window.ExecutionEnvironment=n})()})(ig);var Zw=ig.exports;Object.defineProperty(ut,"__esModule",{value:!0});ut.canUseDOM=ut.SafeNodeList=ut.SafeHTMLCollection=void 0;var eS=Zw,tS=nS(eS);function nS(e){return e&&e.__esModule?e:{default:e}}var el=tS.default,rS=el.canUseDOM?window.HTMLElement:{};ut.SafeHTMLCollection=el.canUseDOM?window.HTMLCollection:{};ut.SafeNodeList=el.canUseDOM?window.NodeList:{};ut.canUseDOM=el.canUseDOM;ut.default=rS;Object.defineProperty(pt,"__esModule",{value:!0});pt.resetState=aS;pt.log=uS;pt.assertNodeList=sg;pt.setElement=cS;pt.validateElement=kc;pt.hide=fS;pt.show=dS;pt.documentNotReadyOrSSRTesting=pS;var oS=Xw,iS=lS(oS),sS=ut;function lS(e){return e&&e.__esModule?e:{default:e}}var Ve=null;function aS(){Ve&&(Ve.removeAttribute?Ve.removeAttribute("aria-hidden"):Ve.length!=null?Ve.forEach(function(e){return e.removeAttribute("aria-hidden")}):document.querySelectorAll(Ve).forEach(function(e){return e.removeAttribute("aria-hidden")})),Ve=null}function uS(){}function sg(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function cS(e){var t=e;if(typeof t=="string"&&sS.canUseDOM){var n=document.querySelectorAll(t);sg(n,t),t=n}return Ve=t||Ve,Ve}function kc(e){var t=e||Ve;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,iS.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}function fS(e){var t=!0,n=!1,r=void 0;try{for(var o=kc(e)[Symbol.iterator](),i;!(t=(i=o.next()).done);t=!0){var s=i.value;s.setAttribute("aria-hidden","true")}}catch(l){n=!0,r=l}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}function dS(e){var t=!0,n=!1,r=void 0;try{for(var o=kc(e)[Symbol.iterator](),i;!(t=(i=o.next()).done);t=!0){var s=i.value;s.removeAttribute("aria-hidden")}}catch(l){n=!0,r=l}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}function pS(){Ve=null}var _r={};Object.defineProperty(_r,"__esModule",{value:!0});_r.resetState=hS;_r.log=mS;var ro={},oo={};function Pd(e,t){e.classList.remove(t)}function hS(){var e=document.getElementsByTagName("html")[0];for(var t in ro)Pd(e,ro[t]);var n=document.body;for(var r in oo)Pd(n,oo[r]);ro={},oo={}}function mS(){}var gS=function(t,n){return t[n]||(t[n]=0),t[n]+=1,n},vS=function(t,n){return t[n]&&(t[n]-=1),n},yS=function(t,n,r){r.forEach(function(o){gS(n,o),t.add(o)})},wS=function(t,n,r){r.forEach(function(o){vS(n,o),n[o]===0&&t.remove(o)})};_r.add=function(t,n){return yS(t.classList,t.nodeName.toLowerCase()=="html"?ro:oo,n.split(" "))};_r.remove=function(t,n){return wS(t.classList,t.nodeName.toLowerCase()=="html"?ro:oo,n.split(" "))};var kr={};Object.defineProperty(kr,"__esModule",{value:!0});kr.log=xS;kr.resetState=ES;function SS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var lg=function e(){var t=this;SS(this,e),this.register=function(n){t.openInstances.indexOf(n)===-1&&(t.openInstances.push(n),t.emit("register"))},this.deregister=function(n){var r=t.openInstances.indexOf(n);r!==-1&&(t.openInstances.splice(r,1),t.emit("deregister"))},this.subscribe=function(n){t.subscribers.push(n)},this.emit=function(n){t.subscribers.forEach(function(r){return r(n,t.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},Ss=new lg;function xS(){console.log("portalOpenInstances ----------"),console.log(Ss.openInstances.length),Ss.openInstances.forEach(function(e){return console.log(e)}),console.log("end portalOpenInstances ----------")}function ES(){Ss=new lg}kr.default=Ss;var Pc={};Object.defineProperty(Pc,"__esModule",{value:!0});Pc.resetState=PS;Pc.log=OS;var CS=kr,_S=kS(CS);function kS(e){return e&&e.__esModule?e:{default:e}}var we=void 0,nt=void 0,xn=[];function PS(){for(var e=[we,nt],t=0;t0?(document.body.firstChild!==we&&document.body.insertBefore(we,document.body.firstChild),document.body.lastChild!==nt&&document.body.appendChild(nt)):(we.parentElement&&we.parentElement.removeChild(we),nt.parentElement&&nt.parentElement.removeChild(nt))}_S.default.subscribe(RS);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(T){for(var N=1;N0&&(F-=1,F===0&&g.show(M)),E.props.shouldFocusAfterRender&&(E.props.shouldReturnFocusAfterClose?(u.returnFocus(E.props.preventScroll),u.teardownScopedFocus()):u.popWithoutFocus()),E.props.onAfterClose&&E.props.onAfterClose(),h.default.deregister(E)},E.open=function(){E.beforeOpen(),E.state.afterOpen&&E.state.beforeClose?(clearTimeout(E.closeTimer),E.setState({beforeClose:!1})):(E.props.shouldFocusAfterRender&&(u.setupScopedFocus(E.node),u.markForFocusLater()),E.setState({isOpen:!0},function(){E.openAnimationFrame=requestAnimationFrame(function(){E.setState({afterOpen:!0}),E.props.isOpen&&E.props.onAfterOpen&&E.props.onAfterOpen({overlayEl:E.overlay,contentEl:E.content})})}))},E.close=function(){E.props.closeTimeoutMS>0?E.closeWithTimeout():E.closeWithoutTimeout()},E.focusContent=function(){return E.content&&!E.contentHasFocus()&&E.content.focus({preventScroll:!0})},E.closeWithTimeout=function(){var k=Date.now()+E.props.closeTimeoutMS;E.setState({beforeClose:!0,closesAt:k},function(){E.closeTimer=setTimeout(E.closeWithoutTimeout,E.state.closesAt-Date.now())})},E.closeWithoutTimeout=function(){E.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},E.afterClose)},E.handleKeyDown=function(k){L(k)&&(0,d.default)(E.content,k),E.props.shouldCloseOnEsc&&D(k)&&(k.stopPropagation(),E.requestClose(k))},E.handleOverlayOnClick=function(k){E.shouldClose===null&&(E.shouldClose=!0),E.shouldClose&&E.props.shouldCloseOnOverlayClick&&(E.ownerHandlesClose()?E.requestClose(k):E.focusContent()),E.shouldClose=null},E.handleContentOnMouseUp=function(){E.shouldClose=!1},E.handleOverlayOnMouseDown=function(k){!E.props.shouldCloseOnOverlayClick&&k.target==E.overlay&&k.preventDefault()},E.handleContentOnClick=function(){E.shouldClose=!1},E.handleContentOnMouseDown=function(){E.shouldClose=!1},E.requestClose=function(k){return E.ownerHandlesClose()&&E.props.onRequestClose(k)},E.ownerHandlesClose=function(){return E.props.onRequestClose},E.shouldBeClosed=function(){return!E.state.isOpen&&!E.state.beforeClose},E.contentHasFocus=function(){return document.activeElement===E.content||E.content.contains(document.activeElement)},E.buildClassName=function(k,M){var $=(typeof M>"u"?"undefined":r(M))==="object"?M:{base:b[k],afterOpen:b[k]+"--after-open",beforeClose:b[k]+"--before-close"},B=$.base;return E.state.afterOpen&&(B=B+" "+$.afterOpen),E.state.beforeClose&&(B=B+" "+$.beforeClose),typeof M=="string"&&M?B+" "+M:B},E.attributesFromObject=function(k,M){return Object.keys(M).reduce(function($,B){return $[k+"-"+B]=M[B],$},{})},E.state={afterOpen:!1,beforeClose:!1},E.shouldClose=null,E.moveFromContentToOverlay=null,E}return o(N,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(E,k){this.props.isOpen&&!E.isOpen?this.open():!this.props.isOpen&&E.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!k.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var E=this.props,k=E.appElement,M=E.ariaHideApp,$=E.htmlOpenClassName,B=E.bodyOpenClassName,K=E.parentSelector,Oe=K&&K().ownerDocument||document;B&&w.add(Oe.body,B),$&&w.add(Oe.getElementsByTagName("html")[0],$),M&&(F+=1,g.hide(k)),h.default.register(this)}},{key:"render",value:function(){var E=this.props,k=E.id,M=E.className,$=E.overlayClassName,B=E.defaultStyles,K=E.children,Oe=M?{}:B.content,Re=$?{}:B.overlay;if(this.shouldBeClosed())return null;var cn={ref:this.setOverlayRef,className:this.buildClassName("overlay",$),style:n({},Re,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},Ze=n({id:k,ref:this.setContentRef,style:n({},Oe,this.props.style.content),className:this.buildClassName("content",M),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",n({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),H=this.props.contentElement(Ze,K);return this.props.overlayElement(cn,H)}}]),N}(i.Component);A.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},A.propTypes={isOpen:l.default.bool.isRequired,defaultStyles:l.default.shape({content:l.default.object,overlay:l.default.object}),style:l.default.shape({content:l.default.object,overlay:l.default.object}),className:l.default.oneOfType([l.default.string,l.default.object]),overlayClassName:l.default.oneOfType([l.default.string,l.default.object]),parentSelector:l.default.func,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,ariaHideApp:l.default.bool,appElement:l.default.oneOfType([l.default.instanceOf(m.default),l.default.instanceOf(_.SafeHTMLCollection),l.default.instanceOf(_.SafeNodeList),l.default.arrayOf(l.default.instanceOf(m.default))]),onAfterOpen:l.default.func,onAfterClose:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,role:l.default.string,contentLabel:l.default.string,aria:l.default.object,data:l.default.object,children:l.default.node,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func,testId:l.default.string},t.default=A,e.exports=t.default})(Ga,Ga.exports);var bS=Ga.exports;function ag(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function ug(e){function t(n){var r=this.constructor.getDerivedStateFromProps(e,n);return r??null}this.setState(t.bind(this))}function cg(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}ag.__suppressDeprecationWarning=!0;ug.__suppressDeprecationWarning=!0;cg.__suppressDeprecationWarning=!0;function LS(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function")return e;var n=null,r=null,o=null;if(typeof t.componentWillMount=="function"?n="componentWillMount":typeof t.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof t.componentWillReceiveProps=="function"?r="componentWillReceiveProps":typeof t.UNSAFE_componentWillReceiveProps=="function"&&(r="UNSAFE_componentWillReceiveProps"),typeof t.componentWillUpdate=="function"?o="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(o="UNSAFE_componentWillUpdate"),n!==null||r!==null||o!==null){var i=e.displayName||e.name,s=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. + +`+i+" uses "+s+" but also contains the following legacy lifecycles:"+(n!==null?` + `+n:"")+(r!==null?` + `+r:"")+(o!==null?` + `+o:"")+` + +The above lifecycles should be removed. Learn more about this warning here: +https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=ag,t.componentWillReceiveProps=ug),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=cg;var l=t.componentDidUpdate;t.componentDidUpdate=function(u,c,d){var f=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:d;l.call(this,u,c,f)}}return e}const TS=Object.freeze(Object.defineProperty({__proto__:null,polyfill:LS},Symbol.toStringTag,{value:"Module"})),NS=dy(TS);Object.defineProperty(On,"__esModule",{value:!0});On.bodyOpenClassName=On.portalClassName=void 0;var Rd=Object.assign||function(e){for(var t=1;t{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Oo=typeof window>"u"||"Deno"in window;function We(){}function KS(e,t){return typeof e=="function"?e(t):e}function Za(e){return typeof e=="number"&&e>=0&&e!==1/0}function dg(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Qr(e,t,n){return Vo(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function SO(e,t,n){return Vo(e)?typeof t=="function"?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function Ft(e,t,n){return Vo(e)?[{...t,queryKey:e},n]:[e||{},t]}function Dd(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:l}=e;if(Vo(s)){if(r){if(t.queryHash!==Oc(s,t.options))return!1}else if(!Cs(t.queryKey,s))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof o<"u"&&o!==t.state.fetchStatus||i&&!i(t))}function Md(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:i}=e;if(Vo(i)){if(!t.options.mutationKey)return!1;if(n){if(yn(t.options.mutationKey)!==yn(i))return!1}else if(!Cs(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||o&&!o(t))}function Oc(e,t){return((t==null?void 0:t.queryKeyHashFn)||yn)(e)}function yn(e){return JSON.stringify(e,(t,n)=>tu(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Cs(e,t){return pg(e,t)}function pg(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!pg(e[n],t[n])):!1}function hg(e,t){if(e===t)return e;const n=Ad(e)&&Ad(t);if(n||tu(e)&&tu(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,s=n?[]:{};let l=0;for(let a=0;a"u")return!0;const n=t.prototype;return!(!Fd(n)||!n.hasOwnProperty("isPrototypeOf"))}function Fd(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vo(e){return Array.isArray(e)}function mg(e){return new Promise(t=>{setTimeout(t,e)})}function jd(e){mg(0).then(e)}function qS(){if(typeof AbortController=="function")return new AbortController}function nu(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?hg(e,t):t}class GS extends Wo{constructor(){super(),this.setup=t=>{if(!Oo&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const _s=new GS,Ud=["online","offline"];class YS extends Wo{constructor(){super(),this.setup=t=>{if(!Oo&&window.addEventListener){const n=()=>t();return Ud.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{Ud.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const ks=new YS;function JS(e){return Math.min(1e3*2**e,3e4)}function tl(e){return(e??"online")==="online"?ks.isOnline():!0}class gg{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function zi(e){return e instanceof gg}function vg(e){let t=!1,n=0,r=!1,o,i,s;const l=new Promise((_,m)=>{i=_,s=m}),a=_=>{r||(g(new gg(_)),e.abort==null||e.abort())},u=()=>{t=!0},c=()=>{t=!1},d=()=>!_s.isFocused()||e.networkMode!=="always"&&!ks.isOnline(),f=_=>{r||(r=!0,e.onSuccess==null||e.onSuccess(_),o==null||o(),i(_))},g=_=>{r||(r=!0,e.onError==null||e.onError(_),o==null||o(),s(_))},y=()=>new Promise(_=>{o=m=>{const p=r||!d();return p&&_(m),p},e.onPause==null||e.onPause()}).then(()=>{o=void 0,r||e.onContinue==null||e.onContinue()}),w=()=>{if(r)return;let _;try{_=e.fn()}catch(m){_=Promise.reject(m)}Promise.resolve(_).then(f).catch(m=>{var p,h;if(r)return;const x=(p=e.retry)!=null?p:3,R=(h=e.retryDelay)!=null?h:JS,O=typeof R=="function"?R(n,m):R,P=x===!0||typeof x=="number"&&n{if(d())return y()}).then(()=>{t?g(m):w()})})};return tl(e.networkMode)?w():y().then(w),{promise:l,cancel:a,continue:()=>(o==null?void 0:o())?l:Promise.resolve(),cancelRetry:u,continueRetry:c}}const Rc=console;function XS(){let e=[],t=0,n=c=>{c()},r=c=>{c()};const o=c=>{let d;t++;try{d=c()}finally{t--,t||l()}return d},i=c=>{t?e.push(c):jd(()=>{n(c)})},s=c=>(...d)=>{i(()=>{c(...d)})},l=()=>{const c=e;e=[],c.length&&jd(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:o,batchCalls:s,schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c}}}const se=XS();class yg{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Za(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(Oo?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class ZS extends yg{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Rc,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||ex(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=nu(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(We).catch(We):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!dg(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(y=>y.options.queryFn);g&&this.setOptions(g.options)}const s=qS(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},a=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};a(l);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),c={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(a(c),(r=this.options.behavior)==null||r.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=c.fetchOptions)==null?void 0:o.meta)){var d;this.dispatch({type:"fetch",meta:(d=c.fetchOptions)==null?void 0:d.meta})}const f=g=>{if(zi(g)&&g.silent||this.dispatch({type:"error",error:g}),!zi(g)){var y,w,_,m;(y=(w=this.cache.config).onError)==null||y.call(w,g,this),(_=(m=this.cache.config).onSettled)==null||_.call(m,this.state.data,g,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=vg({fn:c.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:g=>{var y,w,_,m;if(typeof g>"u"){f(new Error(this.queryHash+" data is undefined"));return}this.setData(g),(y=(w=this.cache.config).onSuccess)==null||y.call(w,g,this),(_=(m=this.cache.config).onSettled)==null||_.call(m,g,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:f,onFail:(g,y)=>{this.dispatch({type:"failed",failureCount:g,error:y})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var o,i;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:tl(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=t.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return zi(s)&&s.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),se.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function ex(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class wg extends Wo{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var o;const i=n.queryKey,s=(o=n.queryHash)!=null?o:Oc(i,n);let l=this.get(s);return l||(l=new ZS({cache:this,logger:t.getLogger(),queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){se.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Ft(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(o=>Dd(r,o))}findAll(t,n){const[r]=Ft(t,n);return Object.keys(r).length>0?this.queries.filter(o=>Dd(r,o)):this.queries}notify(t){se.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){se.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){se.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class tx extends yg{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Rc,this.observers=[],this.state=t.state||nx(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var P;return this.retryer=vg({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(S,b)=>{this.dispatch({type:"failed",failureCount:S,error:b})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(P=this.options.retry)!=null?P:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,o,i,s,l,a,u,c;if(!n){var d,f,g,y;this.dispatch({type:"loading",variables:this.options.variables}),await((d=(f=this.mutationCache.config).onMutate)==null?void 0:d.call(f,this.state.variables,this));const S=await((g=(y=this.options).onMutate)==null?void 0:g.call(y,this.state.variables));S!==this.state.context&&this.dispatch({type:"loading",context:S,variables:this.state.variables})}const P=await t();return await((r=(o=this.mutationCache.config).onSuccess)==null?void 0:r.call(o,P,this.state.variables,this.state.context,this)),await((i=(s=this.options).onSuccess)==null?void 0:i.call(s,P,this.state.variables,this.state.context)),await((l=(a=this.mutationCache.config).onSettled)==null?void 0:l.call(a,P,null,this.state.variables,this.state.context,this)),await((u=(c=this.options).onSettled)==null?void 0:u.call(c,P,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:P}),P}catch(P){try{var w,_,m,p,h,x,R,O;throw await((w=(_=this.mutationCache.config).onError)==null?void 0:w.call(_,P,this.state.variables,this.state.context,this)),await((m=(p=this.options).onError)==null?void 0:m.call(p,P,this.state.variables,this.state.context)),await((h=(x=this.mutationCache.config).onSettled)==null?void 0:h.call(x,void 0,P,this.state.variables,this.state.context,this)),await((R=(O=this.options).onSettled)==null?void 0:R.call(O,void 0,P,this.state.variables,this.state.context)),P}finally{this.dispatch({type:"error",error:P})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!tl(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),se.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function nx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class rx extends Wo{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const o=new tx({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){se.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>Md(t,n))}findAll(t){return this.mutations.filter(n=>Md(t,n))}notify(t){se.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return se.batch(()=>n.reduce((r,o)=>r.then(()=>o.continue().catch(We)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function ox(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,i,s;const l=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,a=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=a==null?void 0:a.pageParam,c=(a==null?void 0:a.direction)==="forward",d=(a==null?void 0:a.direction)==="backward",f=((i=e.state.data)==null?void 0:i.pages)||[],g=((s=e.state.data)==null?void 0:s.pageParams)||[];let y=g,w=!1;const _=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>{var P;if((P=e.signal)!=null&&P.aborted)w=!0;else{var S;(S=e.signal)==null||S.addEventListener("abort",()=>{w=!0})}return e.signal}})},m=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),p=(O,P,S,b)=>(y=b?[P,...y]:[...y,P],b?[S,...O]:[...O,S]),h=(O,P,S,b)=>{if(w)return Promise.reject("Cancelled");if(typeof S>"u"&&!P&&O.length)return Promise.resolve(O);const L={queryKey:e.queryKey,pageParam:S,meta:e.options.meta};_(L);const D=m(L);return Promise.resolve(D).then(A=>p(O,S,A,b))};let x;if(!f.length)x=h([]);else if(c){const O=typeof u<"u",P=O?u:$d(e.options,f);x=h(f,O,P)}else if(d){const O=typeof u<"u",P=O?u:ix(e.options,f);x=h(f,O,P,!0)}else{y=[];const O=typeof e.options.getNextPageParam>"u";x=(l&&f[0]?l(f[0],0,f):!0)?h([],O,g[0]):Promise.resolve(p([],g[0],f[0]));for(let S=1;S{if(l&&f[S]?l(f[S],S,f):!0){const D=O?g[S]:$d(e.options,b);return h(b,O,D)}return Promise.resolve(p(b,g[S],f[S]))})}return x.then(O=>({pages:O,pageParams:y}))}}}}function $d(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function ix(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class sx{constructor(t={}){this.queryCache=t.queryCache||new wg,this.mutationCache=t.mutationCache||new rx,this.logger=t.logger||Rc,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=_s.subscribe(()=>{_s.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=ks.subscribe(()=>{ks.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Ft(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const o=Qr(t,n,r),i=this.getQueryData(o.queryKey);return i?Promise.resolve(i):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.queryCache.find(t),i=o==null?void 0:o.state.data,s=KS(n,i);if(typeof s>"u")return;const l=Qr(t),a=this.defaultQueryOptions(l);return this.queryCache.build(this,a).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return se.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Ft(t,n),o=this.queryCache;se.batch(()=>{o.findAll(r).forEach(i=>{o.remove(i)})})}resetQueries(t,n,r){const[o,i]=Ft(t,n,r),s=this.queryCache,l={type:"active",...o};return se.batch(()=>(s.findAll(o).forEach(a=>{a.reset()}),this.refetchQueries(l,i)))}cancelQueries(t,n,r){const[o,i={}]=Ft(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const s=se.batch(()=>this.queryCache.findAll(o).map(l=>l.cancel(i)));return Promise.all(s).then(We).catch(We)}invalidateQueries(t,n,r){const[o,i]=Ft(t,n,r);return se.batch(()=>{var s,l;if(this.queryCache.findAll(o).forEach(u=>{u.invalidate()}),o.refetchType==="none")return Promise.resolve();const a={...o,type:(s=(l=o.refetchType)!=null?l:o.type)!=null?s:"active"};return this.refetchQueries(a,i)})}refetchQueries(t,n,r){const[o,i]=Ft(t,n,r),s=se.batch(()=>this.queryCache.findAll(o).filter(a=>!a.isDisabled()).map(a=>{var u;return a.fetch(void 0,{...i,cancelRefetch:(u=i==null?void 0:i.cancelRefetch)!=null?u:!0,meta:{refetchPage:o.refetchPage}})}));let l=Promise.all(s).then(We);return i!=null&&i.throwOnError||(l=l.catch(We)),l}fetchQuery(t,n,r){const o=Qr(t,n,r),i=this.defaultQueryOptions(o);typeof i.retry>"u"&&(i.retry=!1);const s=this.queryCache.build(this,i);return s.isStaleByTime(i.staleTime)?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(We).catch(We)}fetchInfiniteQuery(t,n,r){const o=Qr(t,n,r);return o.behavior=ox(),this.fetchQuery(o)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(We).catch(We)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(o=>yn(t)===yn(o.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Cs(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(o=>yn(t)===yn(o.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Cs(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=Oc(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class lx extends Wo{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),zd(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ru(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ru(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),eu(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const i=this.hasListeners();i&&Bd(this.currentQuery,o,this.options,r)&&this.executeFetch(),this.updateResult(n),i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return ux(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(We)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Oo||this.currentResult.isStale||!Za(this.options.staleTime))return;const n=dg(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Oo||this.options.enabled===!1||!Za(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||_s.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,o=this.options,i=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,a=t!==r,u=a?t.state:this.currentQueryInitialState,c=a?this.currentResult:this.previousQueryResult,{state:d}=t;let{dataUpdatedAt:f,error:g,errorUpdatedAt:y,fetchStatus:w,status:_}=d,m=!1,p=!1,h;if(n._optimisticResults){const S=this.hasListeners(),b=!S&&zd(t,n),L=S&&Bd(t,r,n,o);(b||L)&&(w=tl(t.options.networkMode)?"fetching":"paused",f||(_="loading")),n._optimisticResults==="isRestoring"&&(w="idle")}if(n.keepPreviousData&&!d.dataUpdatedAt&&c!=null&&c.isSuccess&&_!=="error")h=c.data,f=c.dataUpdatedAt,_=c.status,m=!0;else if(n.select&&typeof d.data<"u")if(i&&d.data===(s==null?void 0:s.data)&&n.select===this.selectFn)h=this.selectResult;else try{this.selectFn=n.select,h=n.select(d.data),h=nu(i==null?void 0:i.data,h,n),this.selectResult=h,this.selectError=null}catch(S){this.selectError=S}else h=d.data;if(typeof n.placeholderData<"u"&&typeof h>"u"&&_==="loading"){let S;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))S=i.data;else if(S=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof S<"u")try{S=n.select(S),this.selectError=null}catch(b){this.selectError=b}typeof S<"u"&&(_="success",h=nu(i==null?void 0:i.data,S,n),p=!0)}this.selectError&&(g=this.selectError,h=this.selectResult,y=Date.now(),_="error");const x=w==="fetching",R=_==="loading",O=_==="error";return{status:_,fetchStatus:w,isLoading:R,isSuccess:_==="success",isError:O,isInitialLoading:R&&x,data:h,dataUpdatedAt:f,error:g,errorUpdatedAt:y,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!R,isLoadingError:O&&d.dataUpdatedAt===0,isPaused:w==="paused",isPlaceholderData:p,isPreviousData:m,isRefetchError:O&&d.dataUpdatedAt!==0,isStale:bc(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,eu(r,n))return;this.currentResult=r;const o={cache:!0},i=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,l=typeof s=="function"?s():s;if(l==="all"||!l&&!this.trackedProps.size)return!0;const a=new Set(l??this.trackedProps);return this.options.useErrorBoundary&&a.add("error"),Object.keys(this.currentResult).some(u=>{const c=u;return this.currentResult[c]!==n[c]&&a.has(c)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),this.notify({...o,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!zi(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){se.batch(()=>{if(t.onSuccess){var n,r,o,i;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(o=(i=this.options).onSettled)==null||o.call(i,this.currentResult.data,null)}else if(t.onError){var s,l,a,u;(s=(l=this.options).onError)==null||s.call(l,this.currentResult.error),(a=(u=this.options).onSettled)==null||a.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function ax(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function zd(e,t){return ax(e,t)||e.state.dataUpdatedAt>0&&ru(e,t,t.refetchOnMount)}function ru(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&bc(e,t)}return!1}function Bd(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&bc(e,n)}function bc(e,t){return e.isStaleByTime(t.staleTime)}function ux(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!eu(e.getCurrentResult(),t)}var Sg={exports:{}},xg={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var gr=v;function cx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fx=typeof Object.is=="function"?Object.is:cx,dx=gr.useState,px=gr.useEffect,hx=gr.useLayoutEffect,mx=gr.useDebugValue;function gx(e,t){var n=t(),r=dx({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return hx(function(){o.value=n,o.getSnapshot=t,$l(o)&&i({inst:o})},[e,n,t]),px(function(){return $l(o)&&i({inst:o}),e(function(){$l(o)&&i({inst:o})})},[e]),mx(n),n}function $l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fx(e,n)}catch{return!0}}function vx(e,t){return t()}var yx=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?vx:gx;xg.useSyncExternalStore=gr.useSyncExternalStore!==void 0?gr.useSyncExternalStore:yx;Sg.exports=xg;var wx=Sg.exports;const Sx=wx.useSyncExternalStore,Wd=v.createContext(void 0),Eg=v.createContext(!1);function Cg(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Wd),window.ReactQueryClientContext):Wd)}const xx=({context:e}={})=>{const t=v.useContext(Cg(e,v.useContext(Eg)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ex=({client:e,children:t,context:n,contextSharing:r=!1})=>{v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=Cg(n,r);return v.createElement(Eg.Provider,{value:!n&&r},v.createElement(o.Provider,{value:e},t))},_g=v.createContext(!1),Cx=()=>v.useContext(_g);_g.Provider;function _x(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const kx=v.createContext(_x()),Px=()=>v.useContext(kx);function Ox(e,t){return typeof e=="function"?e(...t):!!e}const Rx=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},bx=e=>{v.useEffect(()=>{e.clearReset()},[e])},Lx=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Ox(n,[e.error,r]),Tx=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Nx=(e,t)=>e.isLoading&&e.isFetching&&!t,Ix=(e,t,n)=>(e==null?void 0:e.suspense)&&Nx(t,n),Dx=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function Mx(e,t){const n=xx({context:e.context}),r=Cx(),o=Px(),i=n.defaultQueryOptions(e);i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=se.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=se.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=se.batchCalls(i.onSettled)),Tx(i),Rx(i,o),bx(o);const[s]=v.useState(()=>new t(n,i)),l=s.getOptimisticResult(i);if(Sx(v.useCallback(a=>{const u=r?()=>{}:s.subscribe(se.batchCalls(a));return s.updateResult(),u},[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),v.useEffect(()=>{s.setOptions(i,{listeners:!1})},[i,s]),Ix(i,l,r))throw Dx(i,s,o);if(Lx({result:l,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:s.getCurrentQuery()}))throw l.error;return i.notifyOnChangeProps?l:s.trackResult(l)}function Ax(e,t,n){const r=Qr(e,t,n);return Mx(r,lx)}function kg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tn};return typeof e=="function"?r.read=e:(r.init=e,r.read=o=>o(r),r.write=(o,i,s)=>i(r,typeof s=="function"?s(o(r)):s)),t&&(r.write=t),r}const Vd=e=>"init"in e,Hd=e=>!!e.write,Ps=new WeakMap,jx=(e,t)=>{Ps.set(e,t),e.catch(()=>{}).finally(()=>Ps.delete(e))},Qd=(e,t)=>{const n=Ps.get(e);n&&(Ps.delete(e),n(t))},Kd=(e,t)=>{e.status="fulfilled",e.value=t},qd=(e,t)=>{e.status="rejected",e.reason=t},Ux=e=>typeof(e==null?void 0:e.then)=="function",Ci=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),Gd=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),zr=e=>"v"in e&&e.v instanceof Promise,$x=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,_i=e=>{if("e"in e)throw e.e;return e.v},zx=()=>{const e=new WeakMap,t=new WeakMap,n=new Map;let r,o;const i=S=>e.get(S),s=(S,b)=>{const L=e.get(S);if(e.set(S,b),n.has(S)||n.set(S,L),L&&zr(L)){const D="v"in b?b.v instanceof Promise?b.v:Promise.resolve(b.v):Promise.reject(b.e);L.v!==D&&Qd(L.v,D)}},l=(S,b,L)=>{const D=new Map;let F=!1;L.forEach((A,T)=>{!A&&T===S&&(A=b),A&&(D.set(T,A),b.d.get(T)!==A&&(F=!0))}),(F||b.d.size!==D.size)&&(b.d=D)},a=(S,b,L)=>{const D=i(S),F={d:(D==null?void 0:D.d)||new Map,v:b};if(L&&l(S,F,L),D&&Ci(D,F)&&D.d===F.d)return D;if(D&&zr(D)&&zr(F)&&$x(D,F)){if(D.d===F.d)return D;F.v=D.v}return s(S,F),F},u=(S,b,L,D)=>{if(Ux(b)){let F;const A=new Promise((T,N)=>{let j=!1;b.then(E=>{if(!j){j=!0;const k=i(S),M=a(S,A,L);Kd(A,E),T(E),t.has(S)&&(k==null?void 0:k.d)!==M.d&&R(S,M,k==null?void 0:k.d)}},E=>{if(!j){j=!0;const k=i(S),M=a(S,A,L);qd(A,E),N(E),t.has(S)&&(k==null?void 0:k.d)!==M.d&&R(S,M,k==null?void 0:k.d)}}),F=E=>{j||(j=!0,E.then(k=>Kd(A,k),k=>qd(A,k)),T(E))}});return A.orig=b,A.status="pending",jx(A,T=>{T&&F(T),D==null||D()}),a(S,A,L)}return a(S,b,L)},c=(S,b,L)=>{const D=i(S),F={d:(D==null?void 0:D.d)||new Map,e:b};return L&&l(S,F,L),D&&Gd(D,F)&&D.d===F.d?D:(s(S,F),F)},d=(S,b)=>{const L=i(S);if(!b&&L&&(t.has(S)||Array.from(L.d).every(([E,k])=>E===S||d(E)===k)))return L;const D=new Map;let F=!0;const A=E=>{if(E===S){const M=i(E);if(M)return D.set(E,M),_i(M);if(Vd(E))return D.set(E,void 0),E.init;throw new Error("no atom init")}const k=d(E);return D.set(E,k),_i(k)};let T,N;const j={get signal(){return T||(T=new AbortController),T.signal},get setSelf(){return!N&&Hd(S)&&(N=(...E)=>{if(!F)return p(S,...E)}),N}};try{const E=S.read(A,j);return u(S,E,D,()=>T==null?void 0:T.abort())}catch(E){return c(S,E,D)}finally{F=!1}},f=S=>_i(d(S)),g=S=>{let b=t.get(S);return b||(b=h(S)),b},y=(S,b)=>!b.l.size&&(!b.t.size||b.t.size===1&&b.t.has(S)),w=S=>{const b=t.get(S);b&&y(S,b)&&x(S)},_=S=>{const b=new Map,L=new WeakMap,D=T=>{var N;const j=new Set((N=t.get(T))==null?void 0:N.t);return n.forEach((E,k)=>{var M;(M=i(k))!=null&&M.d.has(T)&&j.add(k)}),j},F=T=>{D(T).forEach(N=>{N!==T&&(b.set(N,(b.get(N)||new Set).add(T)),L.set(N,(L.get(N)||0)+1),F(N))})};F(S);const A=T=>{D(T).forEach(N=>{var j;if(N!==T){let E=L.get(N);if(E&&L.set(N,--E),!E){let k=!!((j=b.get(N))!=null&&j.size);if(k){const M=i(N),$=d(N,!0);k=!M||!Ci(M,$)}k||b.forEach(M=>M.delete(N))}A(N)}})};A(S)},m=(S,...b)=>{let L=!0;const D=T=>_i(d(T)),F=(T,...N)=>{let j;if(T===S){if(!Vd(T))throw new Error("atom not writable");const E=i(T),k=u(T,N[0]);(!E||!Ci(E,k))&&_(T)}else j=m(T,...N);if(!L){const E=O()}return j},A=S.write(D,F,...b);return L=!1,A},p=(S,...b)=>{const L=m(S,...b),D=O();return L},h=(S,b,L)=>{var D;const F=L||[];(D=i(S))==null||D.d.forEach((T,N)=>{const j=t.get(N);j?j.t.add(S):N!==S&&h(N,S,F)}),d(S);const A={t:new Set(b&&[b]),l:new Set};if(t.set(S,A),Hd(S)&&S.onMount){const{onMount:T}=S;F.push(()=>{const N=T((...j)=>p(S,...j));N&&(A.u=N)})}return L||F.forEach(T=>T()),A},x=S=>{var b;const L=(b=t.get(S))==null?void 0:b.u;L&&L(),t.delete(S);const D=i(S);D&&(zr(D)&&Qd(D.v),D.d.forEach((F,A)=>{if(A!==S){const T=t.get(A);T&&(T.t.delete(S),y(A,T)&&x(A))}}))},R=(S,b,L)=>{const D=new Set(b.d.keys());L==null||L.forEach((F,A)=>{if(D.has(A)){D.delete(A);return}const T=t.get(A);T&&(T.t.delete(S),y(A,T)&&x(A))}),D.forEach(F=>{const A=t.get(F);A?A.t.add(S):t.has(S)&&h(F,S)})},O=()=>{let S;for(;n.size;){const b=Array.from(n);n.clear(),b.forEach(([L,D])=>{const F=i(L);if(F){const A=t.get(L);A&&F.d!==(D==null?void 0:D.d)&&R(L,F,D==null?void 0:D.d),A&&!(D&&!zr(D)&&(Ci(D,F)||Gd(D,F)))&&A.l.forEach(T=>T())}})}};return{get:f,set:p,sub:(S,b)=>{const L=g(S),D=O(),F=L.l;return F.add(b),()=>{F.delete(b),w(S)}}}};let zl;const Bx=()=>(zl||(zl=zx()),zl),Wx=v.createContext(void 0),Pg=e=>{const t=v.useContext(Wx);return(e==null?void 0:e.store)||t||Bx()},Vx=e=>typeof(e==null?void 0:e.then)=="function",Hx=ie.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function Qx(e,t){const n=Pg(t),[[r,o,i],s]=v.useReducer(u=>{const c=n.get(e);return Object.is(u[0],c)&&u[1]===n&&u[2]===e?u:[c,n,e]},void 0,()=>[n.get(e),n,e]);let l=r;(o!==n||i!==e)&&(s(),l=n.get(e));const a=t==null?void 0:t.delay;return v.useEffect(()=>{const u=n.sub(e,()=>{if(typeof a=="number"){setTimeout(s,a);return}s()});return s(),u},[n,e,a]),v.useDebugValue(l),Vx(l)?Hx(l):l}function Kx(e,t){const n=Pg(t);return v.useCallback((...o)=>n.set(e,...o),[n,e])}function qx(e,t){return[Qx(e,t),Kx(e,t)]}/** + * @remix-run/router v1.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ro(){return Ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function nl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Yx(){return Math.random().toString(36).substr(2,8)}function Jd(e,t){return{usr:e.state,key:e.key,idx:t}}function iu(e,t,n,r){return n===void 0&&(n=null),Ro({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Nn(t):t,{state:n,key:t&&t.key||r||Yx()})}function Os(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Nn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Jx(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,l=Ht.Pop,a=null,u=c();u==null&&(u=0,s.replaceState(Ro({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){l=Ht.Pop;let _=c(),m=_==null?null:_-u;u=_,a&&a({action:l,location:w.location,delta:m})}function f(_,m){l=Ht.Push;let p=iu(w.location,_,m);n&&n(p,_),u=c()+1;let h=Jd(p,u),x=w.createHref(p);try{s.pushState(h,"",x)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;o.location.assign(x)}i&&a&&a({action:l,location:w.location,delta:1})}function g(_,m){l=Ht.Replace;let p=iu(w.location,_,m);n&&n(p,_),u=c();let h=Jd(p,u),x=w.createHref(p);s.replaceState(h,"",x),i&&a&&a({action:l,location:w.location,delta:0})}function y(_){let m=o.location.origin!=="null"?o.location.origin:o.location.href,p=typeof _=="string"?_:Os(_);return me(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let w={get action(){return l},get location(){return e(o,s)},listen(_){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(Yd,d),a=_,()=>{o.removeEventListener(Yd,d),a=null}},createHref(_){return t(o,_)},createURL:y,encodeLocation(_){let m=y(_);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:g,go(_){return s.go(_)}};return w}var Xd;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Xd||(Xd={}));function Xx(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Nn(t):t,o=Lc(r.pathname||"/",n);if(o==null)return null;let i=Og(e);Zx(i);let s=null;for(let l=0;s==null&&l{let a={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};a.relativePath.startsWith("/")&&(me(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=tn([r,a.relativePath]),c=n.concat(a);i.children&&i.children.length>0&&(me(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Og(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:sE(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,s);else for(let a of Rg(i.path))o(i,s,a)}),t}function Rg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Rg(r.join("/")),l=[];return l.push(...s.map(a=>a===""?i:[i,a].join("/"))),o&&l.push(...s),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function Zx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:lE(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const eE=/^:\w+$/,tE=3,nE=2,rE=1,oE=10,iE=-2,Zd=e=>e==="*";function sE(e,t){let n=e.split("/"),r=n.length;return n.some(Zd)&&(r+=iE),t&&(r+=nE),n.filter(o=>!Zd(o)).reduce((o,i)=>o+(eE.test(i)?tE:i===""?rE:oE),r)}function lE(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function aE(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s{if(c==="*"){let f=l[d]||"";s=i.slice(0,i.length-f.length).replace(/(.)\/+$/,"$1")}return u[c]=dE(l[d]||"",c),u},{}),pathname:i,pathnameBase:s,pattern:e}}function cE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),nl(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,l)=>(r.push(l),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function fE(e){try{return decodeURI(e)}catch(t){return nl(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function dE(e,t){try{return decodeURIComponent(e)}catch(n){return nl(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Lc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function pE(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Nn(e):e;return{pathname:n?n.startsWith("/")?n:hE(n,t):t,search:gE(r),hash:vE(o)}}function hE(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Bl(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function bg(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Lg(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Nn(e):(o=Ro({},e),me(!o.pathname||!o.pathname.includes("?"),Bl("?","pathname","search",o)),me(!o.pathname||!o.pathname.includes("#"),Bl("#","pathname","hash",o)),me(!o.search||!o.search.includes("#"),Bl("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,l;if(r||s==null)l=n;else{let d=t.length-1;if(s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}l=d>=0?t[d]:"/"}let a=pE(o,l),u=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const tn=e=>e.join("/").replace(/\/\/+/g,"/"),mE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),gE=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,vE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function yE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Tg=["post","put","patch","delete"];new Set(Tg);const wE=["get",...Tg];new Set(wE);/** + * React Router v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Rs(){return Rs=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.pathnameBase)),s=v.useRef(!1);return Ig(()=>{s.current=!0}),v.useCallback(function(a,u){if(u===void 0&&(u={}),!s.current)return;if(typeof a=="number"){n.go(a);return}let c=Lg(a,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:tn([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}function Dg(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=v.useContext(In),{pathname:o}=Ko(),i=JSON.stringify(bg(r).map(s=>s.pathnameBase));return v.useMemo(()=>Lg(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function Mg(e,t){return _E(e,t)}function _E(e,t,n){Qo()||me(!1);let{navigator:r}=v.useContext(Pr),{matches:o}=v.useContext(In),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let a=Ko(),u;if(t){var c;let w=typeof t=="string"?Nn(t):t;l==="/"||(c=w.pathname)!=null&&c.startsWith(l)||me(!1),u=w}else u=a;let d=u.pathname||"/",f=l==="/"?d:d.slice(l.length)||"/",g=Xx(e,{pathname:f}),y=bE(g&&g.map(w=>Object.assign({},w,{params:Object.assign({},s,w.params),pathname:tn([l,r.encodeLocation?r.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:tn([l,r.encodeLocation?r.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n);return t&&y?v.createElement(rl.Provider,{value:{location:Rs({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ht.Pop}},y):y}function kE(){let e=IE(),t=yE(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:o},n):null,i)}const PE=v.createElement(kE,null);class OE extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?v.createElement(In.Provider,{value:this.props.routeContext},v.createElement(Ng.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function RE(e){let{routeContext:t,match:n,children:r}=e,o=v.useContext(Tc);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(In.Provider,{value:t},r)}function bE(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let l=i.findIndex(a=>a.route.id&&(s==null?void 0:s[a.route.id]));l>=0||me(!1),i=i.slice(0,Math.min(i.length,l+1))}return i.reduceRight((l,a,u)=>{let c=a.route.id?s==null?void 0:s[a.route.id]:null,d=null;n&&(d=a.route.errorElement||PE);let f=t.concat(i.slice(0,u+1)),g=()=>{let y;return c?y=d:a.route.Component?y=v.createElement(a.route.Component,null):a.route.element?y=a.route.element:y=l,v.createElement(RE,{match:a,routeContext:{outlet:l,matches:f,isDataRoute:n!=null},children:y})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?v.createElement(OE,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:g(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):g()},null)}var Ag=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Ag||{}),bs=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(bs||{});function LE(e){let t=v.useContext(Tc);return t||me(!1),t}function TE(e){let t=v.useContext(SE);return t||me(!1),t}function NE(e){let t=v.useContext(In);return t||me(!1),t}function Fg(e){let t=NE(),n=t.matches[t.matches.length-1];return n.route.id||me(!1),n.route.id}function IE(){var e;let t=v.useContext(Ng),n=TE(bs.UseRouteError),r=Fg(bs.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function DE(){let{router:e}=LE(Ag.UseNavigateStable),t=Fg(bs.UseNavigateStable),n=v.useRef(!1);return Ig(()=>{n.current=!0}),v.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Rs({fromRouteId:t},i)))},[e,t])}function ME(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Ht.Pop,navigator:i,static:s=!1}=e;Qo()&&me(!1);let l=t.replace(/^\/*/,"/"),a=v.useMemo(()=>({basename:l,navigator:i,static:s}),[l,i,s]);typeof r=="string"&&(r=Nn(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:g="default"}=r,y=v.useMemo(()=>{let w=Lc(u,l);return w==null?null:{location:{pathname:w,search:c,hash:d,state:f,key:g},navigationType:o}},[l,u,c,d,f,g,o]);return y==null?null:v.createElement(Pr.Provider,{value:a},v.createElement(rl.Provider,{children:n,value:y}))}new Promise(()=>{});/** + * React Router DOM v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function su(){return su=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function FE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jE(e,t){return e.button===0&&(!t||t==="_self")&&!FE(e)}const UE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],$E="startTransition",ep=xr[$E];function zE(e){let{basename:t,children:n,future:r,window:o}=e,i=v.useRef();i.current==null&&(i.current=Gx({window:o,v5Compat:!0}));let s=i.current,[l,a]=v.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=v.useCallback(d=>{u&&ep?ep(()=>a(d)):a(d)},[a,u]);return v.useLayoutEffect(()=>s.listen(c),[s,c]),v.createElement(ME,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s})}const BE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",WE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jg=v.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:l,target:a,to:u,preventScrollReset:c}=t,d=AE(t,UE),{basename:f}=v.useContext(Pr),g,y=!1;if(typeof u=="string"&&WE.test(u)&&(g=u,BE))try{let p=new URL(window.location.href),h=u.startsWith("//")?new URL(p.protocol+u):new URL(u),x=Lc(h.pathname,f);h.origin===p.origin&&x!=null?u=x+h.search+h.hash:y=!0}catch{}let w=xE(u,{relative:o}),_=VE(u,{replace:s,state:l,target:a,preventScrollReset:c,relative:o});function m(p){r&&r(p),p.defaultPrevented||_(p)}return v.createElement("a",su({},d,{href:g||w,onClick:y||i?r:m,ref:n,target:a}))});var tp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(tp||(tp={}));var np;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(np||(np={}));function VE(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s}=t===void 0?{}:t,l=EE(),a=Ko(),u=Dg(e,{relative:s});return v.useCallback(c=>{if(jE(c,n)){c.preventDefault();let d=r!==void 0?r:Os(a)===Os(u);l(e,{replace:d,state:o,preventScrollReset:i,relative:s})}},[a,l,u,r,o,n,e,i,s])}function lu(){return lu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QE(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Nc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=HE(e,["color","size"]);return ie.createElement("svg",lu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),ie.createElement("polyline",{points:"20 6 9 17 4 12"}))});Nc.propTypes={color:qe.string,size:qe.oneOfType([qe.string,qe.number])};Nc.displayName="Check";const KE=Nc;function au(){return au=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GE(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Ic=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=qE(e,["color","size"]);return ie.createElement("svg",au({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),ie.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"}))});Ic.propTypes={color:qe.string,size:qe.oneOfType([qe.string,qe.number])};Ic.displayName="GitHub";const YE=Ic;function uu(){return uu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XE(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Dc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=JE(e,["color","size"]);return ie.createElement("svg",uu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),ie.createElement("circle",{cx:"12",cy:"12",r:"10"}),ie.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),ie.createElement("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))});Dc.propTypes={color:qe.string,size:qe.oneOfType([qe.string,qe.number])};Dc.displayName="Info";const ZE=Dc;function e2(e,t){let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function Ug(e){return e.replace(/\/$/,"")}function xO(e,t){let n=String(e);for(;n.length{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function ol(e){const t=e[je];return t?t.type_:Array.isArray(e)?1:il(e)?2:sl(e)?3:0}function cu(e,t){return ol(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Hg(e,t,n){const r=ol(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function a2(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function il(e){return e instanceof Map}function sl(e){return e instanceof Set}function hn(e){return e.copy_||e.base_}function fu(e,t){if(il(e))return new Map(e);if(sl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Vg(e))return vr(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[je];let r=Reflect.ownKeys(n);for(let o=0;o1&&(e.set=e.add=e.clear=e.delete=u2),Object.freeze(e),t&&bo(e,(n,r)=>Mc(r,!0))),e}function u2(){st(2)}function ll(e){return Object.isFrozen(e)}var c2={};function bn(e){const t=c2[e];return t||st(0,e),t}var Lo;function Qg(){return Lo}function f2(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ip(e,t){t&&(bn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function du(e){pu(e),e.drafts_.forEach(d2),e.drafts_=null}function pu(e){e===Lo&&(Lo=e.parent_)}function sp(e){return Lo=f2(Lo,e)}function d2(e){const t=e[je];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lp(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[je].modified_&&(du(t),st(4)),Rn(e)&&(e=Ls(t,e),t.parent_||Ts(t,e)),t.patches_&&bn("Patches").generateReplacementPatches_(n[je].base_,e,t.patches_,t.inversePatches_)):e=Ls(t,n,[]),du(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Wg?e:void 0}function Ls(e,t,n){if(ll(t))return t;const r=t[je];if(!r)return bo(t,(o,i)=>ap(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ts(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let i=o,s=!1;r.type_===3&&(i=new Set(o),o.clear(),s=!0),bo(i,(l,a)=>ap(e,r,o,l,a,n,s)),Ts(e,o,!1),n&&e.patches_&&bn("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function ap(e,t,n,r,o,i,s){if(yr(o)){const l=i&&t&&t.type_!==3&&!cu(t.assigned_,r)?i.concat(r):void 0,a=Ls(e,o,l);if(Hg(n,r,a),yr(a))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(Rn(o)&&!ll(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ls(e,o),(!t||!t.scope_.parent_)&&Ts(e,o)}}function Ts(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Mc(t,n)}function p2(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Qg(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=Ac;n&&(o=[r],i=To);const{revoke:s,proxy:l}=Proxy.revocable(o,i);return r.draft_=l,r.revoke_=s,l}var Ac={get(e,t){if(t===je)return e;const n=hn(e);if(!cu(n,t))return h2(e,n,t);const r=n[t];return e.finalized_||!Rn(r)?r:r===Wl(e.base_,t)?(Vl(e),e.copy_[t]=mu(r,e)):r},has(e,t){return t in hn(e)},ownKeys(e){return Reflect.ownKeys(hn(e))},set(e,t,n){const r=Kg(hn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Wl(hn(e),t),i=o==null?void 0:o[je];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(a2(n,o)&&(n!==void 0||cu(e.base_,t)))return!0;Vl(e),hu(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Wl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Vl(e),hu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=hn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){st(11)},getPrototypeOf(e){return vr(e.base_)},setPrototypeOf(){st(12)}},To={};bo(Ac,(e,t)=>{To[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});To.deleteProperty=function(e,t){return To.set.call(this,e,t,void 0)};To.set=function(e,t,n){return Ac.set.call(this,e[0],t,n,e[0])};function Wl(e,t){const n=e[je];return(n?hn(n):e)[t]}function h2(e,t,n){var o;const r=Kg(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Kg(e,t){if(!(t in e))return;let n=vr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=vr(n)}}function hu(e){e.modified_||(e.modified_=!0,e.parent_&&hu(e.parent_))}function Vl(e){e.copy_||(e.copy_=fu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var m2=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const s=this;return function(a=i,...u){return s.produce(a,c=>n.call(this,c,...u))}}typeof n!="function"&&st(6),r!==void 0&&typeof r!="function"&&st(7);let o;if(Rn(t)){const i=sp(this),s=mu(t,void 0);let l=!0;try{o=n(s),l=!1}finally{l?du(i):pu(i)}return ip(i,r),lp(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Wg&&(o=void 0),this.autoFreeze_&&Mc(o,!0),r){const i=[],s=[];bn("Patches").generateReplacementPatches_(t,o,i,s),r(i,s)}return o}else st(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...l)=>this.produceWithPatches(s,a=>t(a,...l));let r,o;return[this.produce(t,n,(s,l)=>{r=s,o=l}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Rn(e)||st(8),yr(e)&&(e=g2(e));const t=sp(this),n=mu(e,void 0);return n[je].isManual_=!0,pu(t),n}finishDraft(e,t){const n=e&&e[je];(!n||!n.isManual_)&&st(9);const{scope_:r}=n;return ip(r,t),lp(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=bn("Patches").applyPatches_;return yr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function mu(e,t){const n=il(e)?bn("MapSet").proxyMap_(e,t):sl(e)?bn("MapSet").proxySet_(e,t):p2(e,t);return(t?t.scope_:Qg()).drafts_.push(n),n}function g2(e){return yr(e)||st(10,e),qg(e)}function qg(e){if(!Rn(e)||ll(e))return e;const t=e[je];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=fu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=fu(e,!0);return bo(n,(r,o)=>{Hg(n,r,qg(o))}),t&&(t.finalized_=!1),n}var Ue=new m2,v2=Ue.produce;Ue.produceWithPatches.bind(Ue);var y2=Ue.setAutoFreeze.bind(Ue);Ue.setUseStrictShallowCopy.bind(Ue);Ue.applyPatches.bind(Ue);Ue.createDraft.bind(Ue);Ue.finishDraft.bind(Ue);y2(!1);const{createContext:Fc,memo:w2,useMemo:S2,useRef:x2,useEffect:E2,useCallback:up,useContext:gu,useState:C2}=ie,Gg=Fc(null),Yg=Fc(null),Jg=Fc(null);function CO(){return gu(Jg)}function _2({initialState:e,actions:t={},children:n}){const r=x2(e),[o,i]=C2(e),s=up(()=>r.current,[]);E2(()=>{},[s]);const l=up((u,c)=>{if(typeof u=="function")return u(l,s);const d=v2(s(),c);d!==r.current&&(r.current=d,i(d))},[s]),a=S2(()=>Xg(t,l),[t,l]);return C.jsx(Gg.Provider,{value:o,children:C.jsx(Yg.Provider,{value:l,children:C.jsx(Jg.Provider,{value:a,children:n})})})}function al(e){return t=>{const n=w2(t);function r(o){const i=gu(Gg),s=gu(Yg),l=e(i,o),a={dispatch:s,...o,...l};return C.jsx(n,{...a})}return r}}function k2(e,t){return function(...n){return t(e.apply(this,n))}}function Xg(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"?n[r]=k2(o,t):typeof o=="object"&&(n[r]=Xg(o,t))}return n}const P2=Symbol(),O2=e=>typeof(e==null?void 0:e.then)=="function";function R2(e){let t,n;const r={getItem:(o,i)=>{var s,l;const a=c=>{if(c=c||"",t!==c){try{n=JSON.parse(c)}catch{return i}t=c}return n},u=(l=(s=e())==null?void 0:s.getItem(o))!=null?l:null;return O2(u)?u.then(a):a(u)},setItem:(o,i)=>{var s;return(s=e())==null?void 0:s.setItem(o,JSON.stringify(i))},removeItem:o=>{var i;return(i=e())==null?void 0:i.removeItem(o)}};return typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(r.subscribe=(o,i,s)=>{if(!(e()instanceof window.Storage))return()=>{};const l=a=>{if(a.storageArea===e()&&a.key===o){let u;try{u=JSON.parse(a.newValue||"")}catch{u=s}i(u)}};return window.addEventListener("storage",l),()=>{window.removeEventListener("storage",l)}}),r}const b2=R2(()=>typeof window<"u"?window.localStorage:void 0);function L2(e,t,n=b2,r){const o=r==null?void 0:r.unstable_getOnInit,i=ou(o?n.getItem(e,t):t);return i.onMount=l=>{o||l(n.getItem(e,t));let a;return n.subscribe&&(a=n.subscribe(e,l,t)),a},ou(l=>l(i),(l,a,u)=>{const c=typeof u=="function"?u(l(i)):u;return c===P2?(a(i,t),n.removeItem(e)):c instanceof Promise?c.then(d=>(a(i,d),n.setItem(e,d))):(a(i,c),n.setItem(e,c))})}const Zg="PaoPaoGateWay";function T2(){try{const e=localStorage.getItem(Zg);return e?JSON.parse(e):void 0}catch{return}}function Or(e){try{const t=JSON.stringify(e);localStorage.setItem(Zg,t)}catch{}}const ev="/configs";async function N2(e){const{url:t,init:n}=Be(e);return await fetch(t+ev,n)}function I2(e){return"socks-port"in e&&(e["socket-port"]=e["socks-port"]),e}async function D2(e,t){const{url:n,init:r}=Be(e),o=JSON.stringify(I2(t));return await fetch(n+ev,{...r,body:o,method:"PATCH"})}const tv="/traffic",M2=new TextDecoder("utf-8"),ki=150,$t={labels:Array(ki).fill(0),up:Array(ki),down:Array(ki),size:ki,subscribers:[],appendData(e){this.up.shift(),this.down.shift(),this.labels.shift();const t=Date.now();this.up.push(e.up),this.down.push(e.down),this.labels.push(t),this.subscribers.forEach(n=>n(e))},subscribe(e){return this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}}};let Zn=!1,Pi="";function vu(e){$t.appendData(JSON.parse(e))}function nv(e){return e.read().then(({done:t,value:n})=>{const r=M2.decode(n,{stream:!t});Pi+=r;const o=Pi.split(` +`),i=o[o.length-1];for(let s=0;s{r=!0,n.close()},i=()=>{r=!1,$t.up.fill(void 0),$t.down.fill(void 0),$t.labels.fill(0),cp(e)};return document.addEventListener("freeze",o,{capture:!0,once:!0}),document.addEventListener("resume",i,{capture:!0,once:!0}),n.addEventListener("error",function(s){Oi=3}),n.addEventListener("close",function(s){Oi=3,r||(document.removeEventListener("freeze",o),document.removeEventListener("resume",i),cp(e))}),n.addEventListener("message",function(s){vu(s.data)}),$t}function cp(e){if(Zn)return $t;Zn=!0;const{url:t,init:n}=Be(e);return fetch(t+tv,n).then(r=>{if(r.ok){const o=r.body.getReader();nv(o)}else Zn=!1},r=>{console.log("fetch /traffic error",r),Zn=!1}),$t}function fp(e){return t=>{t(`openModal:${e}`,n=>{n.modals[e]=!0})}}const A2={apiConfig:!1},_O=e=>e.configs.configs,F2=e=>e.configs.haveFetchedConfig,kO=e=>e.configs.configs["log-level"];function j2(e){return async(t,n)=>{let r;try{r=await N2(e)}catch{t(fp("apiConfig"));return}if(!r.ok){console.log("Error fetch configs",r.statusText),t(fp("apiConfig"));return}const o=await r.json();t("store/configs#fetchConfigs",s=>{s.configs.configs=o}),F2(n())?jc(e):t(U2())}}function U2(){return e=>{e("store/configs#markHaveFetchedConfig",t=>{t.configs.haveFetchedConfig=!0})}}function PO(e,t){return async n=>{D2(e,t).then(r=>{r.ok===!1&&console.log("Error update configs",r.statusText)},r=>{throw console.log("Error update configs",r),r}).then(()=>{n(j2(e))}),n("storeConfigsOptimisticUpdateConfigs",r=>{r.configs.configs={...r.configs.configs,...t}})}}const $2={configs:{port:7890,"socks-port":7891,"redir-port":0,"allow-lan":!1,mode:"Rule","log-level":"uninit"},haveFetchedConfig:!1},z2={darkModePureBlackToggle:"yacd_darkModePureBlackToggle"},Uc=e=>{const t=e.app.selectedClashAPIConfigIndex;return e.app.clashAPIConfigs[t]},B2=e=>e.app.selectedClashAPIConfigIndex,W2=e=>e.app.clashAPIConfigs,rv=e=>e.app.theme,V2=e=>e.app.selectedChartStyleIndex,ov=e=>e.app.latencyTestUrl,OO=e=>e.app.collapsibleIsOpen,RO=e=>e.app.proxySortBy,bO=e=>e.app.hideUnavailableProxies,H2=e=>e.app.autoCloseOldConns,LO=e=>e.app.logStreamingPaused,Q2=e2(Or,600);function iv(e,{baseURL:t,secret:n,metaLabel:r}){const o=W2(e());for(let i=0;i{const r=iv(n,e);t("removeClashAPIConfig",o=>{o.app.clashAPIConfigs.splice(r,1),r===o.app.selectedClashAPIConfigIndex?o.app.selectedClashAPIConfigIndex=0:r{const r=iv(n,e);B2(n())!==r&&t("selectClashAPIConfig",i=>{i.app.selectedClashAPIConfigIndex=r}),Or(n().app);try{window.location.reload()}catch{}}}const Hl=document.querySelector("html");function Ql(e,t){const n=document.createElement("meta");n.setAttribute("name","theme-color"),n.setAttribute("content",e),t&&n.setAttribute("media",t),document.head.appendChild(n)}function G2(e){const t=Array.from(document.querySelectorAll("meta[name=theme-color]"));let n;for(const r of t)r.getAttribute("media")?document.head.removeChild(r):n=r;if(e==="auto")if(Ql("#eeeeee","(prefers-color-scheme: light)"),Ql("#202020","(prefers-color-scheme: dark)"),n)document.head.removeChild(n);else return;else{const r=e==="light"?"#eeeeee":"#202020";n?n.setAttribute("content",r):Ql(r)}}function sv(e="dark"){e==="auto"?Hl.setAttribute("data-theme","auto"):e==="dark"?Hl.setAttribute("data-theme","dark"):Hl.setAttribute("data-theme","light"),G2(e)}function Y2(e="auto"){return(t,n)=>{rv(n())!==e&&(sv(e),t("storeSwitchTheme",o=>{o.app.theme=e}),Or(n().app))}}function J2(e){return(t,n)=>{t("appSelectChartStyleIndex",r=>{r.app.selectedChartStyleIndex=Number(e)}),Or(n().app)}}function dp(e,t){return(n,r)=>{n("appUpdateAppConfig",o=>{o.app[e]=t}),Or(r().app)}}function X2(e,t,n){return(r,o)=>{r("updateCollapsibleIsOpen",i=>{i.app.collapsibleIsOpen[`${e}:${t}`]=n}),Q2(o().app)}}var Ip;const Z2={baseURL:((Ip=document.getElementById("app"))==null?void 0:Ip.getAttribute("data-base-url"))??"http://127.0.0.1:9090",secret:"",addedAt:0},eC={selectedClashAPIConfigIndex:0,clashAPIConfigs:[Z2],latencyTestUrl:"http://www.gstatic.com/generate_204",selectedChartStyleIndex:0,theme:"dark",collapsibleIsOpen:{},proxySortBy:"Natural",hideUnavailableProxies:!1,autoCloseOldConns:!1,logStreamingPaused:!1},tC=["hostname","port","secret","theme"];function nC(){const{search:e}=window.location,t={},n=new URLSearchParams(e);let r=!1;if(typeof e!="string"||e==="")return[t,n,r];for(const o of tC){const i=n.get(o);i&&(r=!0,t[o]=i,n.delete(o))}return[t,n,r]}function rC(){let e=T2();e={...eC,...e};const[t,n,r]=nC();if(r&&(history!=null&&history.replaceState)){const i=location.pathname+location.hash+(n.size>0?`?${n}`:"");history.replaceState(null,"",i)}const o=e.clashAPIConfigs[e.selectedClashAPIConfigIndex];if(o){const i=new URL(o.baseURL);t.hostname&&(t.hostname.indexOf("http")===0?i.href=decodeURIComponent(t.hostname):i.hostname=t.hostname),t.port&&(i.port=t.port),o.baseURL=Ug(i.href),t.secret&&(o.secret=t.secret)}return(t.theme==="dark"||t.theme==="light")&&(e.theme=t.theme),sv(e.theme),e}const oC=L2(z2.darkModePureBlackToggle,!1),iC="_root_1392e_1",sC="_mono_1392e_10",lC="_link_1392e_14",Kl={root:iC,mono:sC,link:lC};function ql({name:e,link:t,version:n}){return C.jsxs("div",{className:Kl.root,children:[C.jsx("h2",{children:e}),C.jsxs("p",{children:[C.jsx("span",{children:"Version "}),C.jsx("span",{className:Kl.mono,children:n})]}),C.jsx("p",{children:C.jsxs("a",{className:Kl.link,href:t,target:"_blank",rel:"noopener noreferrer",children:[C.jsx(YE,{size:20}),C.jsx("span",{children:"Source"})]})})]})}function aC(e){const{data:t}=Ax(["/version",e.apiConfig],()=>r2("/version",e.apiConfig));return C.jsxs(C.Fragment,{children:[C.jsx(Bg,{title:"PaoPao GateWay"}),C.jsx(ql,{name:"PaoPao GateWay",version:"PPGW_version",link:"https://github.com/kkkgo/PaoPaoGateWay"})," ",t&&t.version?C.jsx(ql,{name:"Clash",version:t.version,link:"https://github.com/Dreamacro/clash"}):null,C.jsx(ql,{name:"Yacd",version:"0.3.8",link:"https://github.com/haishanh/yacd"})]})}const uC=e=>({apiConfig:Uc(e)}),cC=al(uC)(aC),fC="_loading_74j3j_1",dC="_spinner_74j3j_9",pC="_rotate_74j3j_1",pp={loading:fC,spinner:dC,rotate:pC},lv=({height:e})=>{const t=e?{height:e}:{};return C.jsx("div",{className:pp.loading,style:t,children:C.jsx("div",{className:pp.spinner})})},hC=new wg,mC=new sx({queryCache:hC,defaultOptions:{queries:{suspense:!0}}});var Ns="NOT_FOUND";function gC(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:Ns},put:function(r,o){t={key:r,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function vC(e,t){var n=[];function r(l){var a=n.findIndex(function(c){return t(l,c.key)});if(a>-1){var u=n[a];return a>0&&(n.splice(a,1),n.unshift(u)),u.value}return Ns}function o(l,a){r(l)===Ns&&(n.unshift({key:l,value:a}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var yC=function(t,n){return t===n};function wC(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var o=n.length,i=0;i1?t-1:0),r=1;re.logs.logs,uv=e=>e.logs.tail,_C=e=>e.logs.searchText,TO=CC(av,uv,_C,(e,t,n)=>{const r=[];for(let o=t;o>=0;o--)r.push(e[o]);if(e.length===yu)for(let o=yu-1;o>t;o--)r.push(e[o]);return n===""?r:r.filter(o=>o.payload.toLowerCase().indexOf(n)>=0)});function NO(e){return t=>{t("logsUpdateSearchText",n=>{n.logs.searchText=e.toLowerCase()})}}function IO(e){return(t,n)=>{const r=n(),o=av(r),i=uv(r),s=i>=yu-1?0:i+1;o[s]=e,t("logsAppendLog",l=>{l.logs.tail=s})}}const kC={searchText:"",logs:[],tail:-1},ul="/connections",Bi=[];function PC(e){let t;try{t=JSON.parse(e)}catch{console.log("JSON.parse error",JSON.parse(e))}Bi.forEach(n=>n(t))}let Ri;function wu(e,t){if(Ri===1&&t)return hp(t);Ri=1;const n=zg(e,ul),r=new WebSocket(n);let o=!1;const i=()=>{o=!0,r.close()},s=()=>{o=!1,wu(e,void 0)};if(document.addEventListener("freeze",i,{capture:!0,once:!0}),document.addEventListener("resume",s,{capture:!0,once:!0}),r.addEventListener("error",()=>Ri=3),r.addEventListener("close",function(l){Ri=3,o||(document.removeEventListener("freeze",i),document.removeEventListener("resume",s),wu(e,void 0))}),r.addEventListener("message",l=>PC(l.data)),t)return hp(t)}function hp(e){return Bi.push(e),function(){const n=Bi.indexOf(e);Bi.splice(n,1)}}async function DO(e){const{url:t,init:n}=Be(e);return await fetch(t+ul,{...n,method:"DELETE"})}async function OC(e){const{url:t,init:n}=Be(e);return await fetch(t+ul,{...n})}async function RC(e,t){const{url:n,init:r}=Be(e),o=`${n}${ul}/${t}`;return await fetch(o,{...r,method:"DELETE"})}const $c="/proxies";async function bC(e){const{url:t,init:n}=Be(e);return await(await fetch(t+$c,n)).json()}async function LC(e,t,n){const r={name:n},{url:o,init:i}=Be(e),s=encodeURIComponent(t),l=`${o}${$c}/${s}`;return await fetch(l,{...i,method:"PUT",body:JSON.stringify(r)})}async function cv(e,t,n="http://www.gstatic.com/generate_204"){const{url:r,init:o}=Be(e),i=`timeout=5000&url=${encodeURIComponent(n)}`,s=`${r}${$c}/${encodeURIComponent(t)}/delay?${i}`;return await fetch(s,o)}async function TC(e){const{url:t,init:n}=Be(e),r=await fetch(t+"/providers/proxies",n);return r.status===404?{providers:{}}:await r.json()}async function fv(e,t){const{url:n,init:r}=Be(e),o={...r,method:"PUT"};return await fetch(n+"/providers/proxies/"+encodeURIComponent(t),o)}async function NC(e,t){const{url:n,init:r}=Be(e),o={...r,method:"GET"};return await fetch(n+"/providers/proxies/"+encodeURIComponent(t)+"/healthcheck",o)}const IC={proxies:{},delay:{},groupNames:[],showModalClosePrevConns:!1},dv=()=>null,DC=["Direct","Reject","Relay","Selector","Fallback","URLTest","LoadBalance","Unknown"],pv=e=>e.proxies.proxies,er=e=>e.proxies.delay,MO=e=>e.proxies.groupNames,MC=e=>e.proxies.proxyProviders||[],AC=e=>e.proxies.dangleProxyNames,AO=e=>e.proxies.showModalClosePrevConns;function FC(e,t){const n={};for(const r of e){const i=(t(r)||{history:[]}).history,s=i[i.length-1];s&&typeof s.delay=="number"&&(n[r]={kind:"Result",number:s.delay})}return n}function Rr(e){return async(t,n)=>{const[r,o]=await Promise.all([bC(e),TC(e)]),{proxyProviders:i,providerProxyRecord:s}=HC(o.providers),l={...s,...r.proxies},[a,u]=VC(l),c={...er(n()),...FC(Object.keys(l),f=>l[f])},d=[];for(const f of u)s[f]||d.push(f);t("store/proxies#fetchProxies",f=>{f.proxies.proxies=l,f.proxies.groupNames=a,f.proxies.dangleProxyNames=d,f.proxies.delay=c,f.proxies.proxyProviders=i})}}function FO(e,t){return async n=>{try{await fv(e,t)}catch{}n(Rr(e))}}function jO(e,t){return async n=>{for(let r=0;r{await zc(e,t),await n(Rr(e))}}async function jC(e,t,n){const r=await OC(e);r.ok||console.log("unable to fetch all connections",r.statusText);const i=(await r.json()).connections,s=[];for(const l of i)l.chains.indexOf(t)>-1&&l.chains.indexOf(n)<0&&s.push(l.id);await Promise.all(s.map(l=>RC(e,l).catch(dv)))}function UC(e,t,n){const r=[n,t];let o,i=n;for(;(o=e[i])&&o.now;)r.unshift(o.now),i=o.now;return r}async function $C(e,t,n,r,o){try{if((await LC(n,r,o)).ok===!1)throw new Error("failed to switch proxy: res.statusText")}catch(s){throw console.log(s,"failed to switch proxy"),s}if(e(Rr(n)),H2(t())){const s=pv(t());mv(n,s,{groupName:r,itemName:o})}}function hv(){return e=>{e("closeModalClosePrevConns",t=>{t.proxies.showModalClosePrevConns=!1})}}function mv(e,t,n){const r=UC(t,n.groupName,n.itemName);jC(e,n.groupName,r[0])}function zC(e){return async(t,n)=>{var s;const r=n(),o=(s=r.proxies.switchProxyCtx)==null?void 0:s.to;if(!o){t(hv());return}const i=r.proxies.proxies;mv(e,i,o),t("closePrevConnsAndTheModal",l=>{l.proxies.showModalClosePrevConns=!1,l.proxies.switchProxyCtx=void 0})}}function $O(e,t,n){return async(r,o)=>{$C(r,o,e,t,n).catch(dv),r("store/proxies#switchProxy",i=>{const s=i.proxies.proxies;s[t]&&s[t].now&&(s[t].now=n)})}}function BC(e,t){return async(n,r)=>{n("set latency state to testing in progress",i=>{i.proxies.delay={...er(r()),[t]:{kind:"Testing"}}});const o=ov(r());try{const i=await cv(e,t,o);if(i.ok){const{delay:s}=await i.json();n("set latency result",l=>{l.proxies.delay={...er(r()),[t]:{kind:"Result",number:s}}})}else n("set latency testing error",s=>{s.proxies.delay={...er(r()),[t]:{kind:"Error",message:i.statusText}}})}catch(i){n("set latency testing networkish error",s=>{s.proxies.delay={...er(r()),[t]:{kind:"Error",message:i.message||i.type}}})}}}function WC(e,t){return async(n,r)=>{const o=pv(r()),i=new Map,s=new Map,l=[];t.forEach(a=>{const u=o[a];u.__provider?u.__provider&&(i.get(a)||(i.set(a,!0),n("set latency state to testing in progress",c=>{c.proxies.delay={...er(r()),[a]:{kind:"Testing"}}})),s.get(u.__provider)||(s.set(u.__provider,!0),l.push(zc(e,u.__provider)))):i.get(a)||(i.set(a,!0),n(BC(e,a)))}),await Promise.all(l),await n(Rr(e))}}function zO(e){return async(t,n)=>{const r=AC(n()),o=ov(n());await Promise.all(r.map(s=>cv(e,s,o)));const i=MC(n());for(const s of i)await zc(e,s.name);await t(Rr(e))}}function VC(e){let t=[],n;const r=[];for(const o in e){const i=e[o];i.all&&Array.isArray(i.all)?(t.push(o),o==="GLOBAL"&&(n=Array.from(i.all))):DC.indexOf(i.type)<0&&r.push(o)}return n&&(n.push("GLOBAL"),t=t.map(o=>[n.indexOf(o),o]).sort((o,i)=>o[0]-i[0]).map(o=>o[1])),[t,r]}function HC(e){const t=Object.keys(e),n=[],r={};for(let o=0;oi.response=s??!0).catch(s=>i.error=s??"unknown error").then(()=>{r>0&&setTimeout(()=>{const s=t.indexOf(i);s!==-1&&t.splice(s,1)},r)})};if(t.push(i),!o)throw i.promise}function d_(e,...t){if(t===void 0||t.length===0)e.splice(0,e.length);else{const n=e.find(r=>Bc(t,r.args));if(n){const r=e.indexOf(n);r!==-1&&e.splice(r,1)}}}function p_(e,t=0){const n=[];return{read:(...r)=>vp(e,n,r,t),preload:(...r)=>void vp(e,n,r,t,!0),clear:(...r)=>d_(n,...r),peek:(...r)=>{var o;return(o=n.find(i=>Bc(r,i.args)))==null?void 0:o.response}}}const yp=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];function No(e){if(e<1e3)return e+" B";const t=Math.min(Math.floor(Math.log10(e)/3),yp.length-1);e=Number((e/Math.pow(1e3,t)).toPrecision(3));const n=yp[t];return e+" "+n}const h_=p_(()=>ct(()=>import("./chart-lib-da3c73a9.js"),[],import.meta.url)),wp={borderWidth:1,pointRadius:0,tension:.2,fill:!0},m_={responsive:!0,maintainAspectRatio:!0,plugins:{legend:{labels:{boxWidth:20}}},scales:{x:{display:!1,type:"category"},y:{type:"linear",display:!0,grid:{display:!0,color:"#555",drawTicks:!1},border:{display:!1,dash:[3,6]},ticks:{callback(e){return No(e)+"/s "}}}}},Sp=[{down:{backgroundColor:"rgba(176, 209, 132, 0.8)",borderColor:"rgb(176, 209, 132)"},up:{backgroundColor:"rgba(181, 220, 231, 0.8)",borderColor:"rgb(181, 220, 231)"}},{up:{backgroundColor:"rgb(98, 190, 100)",borderColor:"rgb(78,146,79)"},down:{backgroundColor:"rgb(160, 230, 66)",borderColor:"rgb(110, 156, 44)"}},{up:{backgroundColor:"rgba(94, 175, 223, 0.3)",borderColor:"rgb(94, 175, 223)"},down:{backgroundColor:"rgba(139, 227, 195, 0.3)",borderColor:"rgb(139, 227, 195)"}},{up:{backgroundColor:"rgba(242, 174, 62, 0.3)",borderColor:"rgb(242, 174, 62)"},down:{backgroundColor:"rgba(69, 154, 248, 0.3)",borderColor:"rgb(69, 154, 248)"}}],{useEffect:g_}=ie;function v_(e,t,n,r,o={}){g_(()=>{const i=document.getElementById(t).getContext("2d"),s={...m_,...o},l=new e(i,{type:"line",data:n,options:s}),a=r&&r.subscribe(()=>l.update());return()=>{a&&a(),l.destroy()}},[e,t,n,r,o])}const{useMemo:y_}=xr,w_={position:"relative",maxWidth:1e3},S_=e=>({apiConfig:Uc(e),selectedChartStyleIndex:V2(e)}),x_=al(S_)(E_);function E_({apiConfig:e,selectedChartStyleIndex:t}){const n=h_.read(),r=jc(e),{t:o}=Ao(),i=y_(()=>({labels:r.labels,datasets:[{...wp,...Sp[t].up,label:o("Up"),data:r.up},{...wp,...Sp[t].down,label:o("Down"),data:r.down}]}),[r,t,o]);return v_(n.Chart,"trafficChart",i,r),C.jsx("div",{style:w_,children:C.jsx("canvas",{id:"trafficChart"})})}const C_="_TrafficNow_hzna1_1",__="_sec_hzna1_10",Un={TrafficNow:C_,sec:__},{useState:vv,useEffect:yv,useCallback:k_}=xr,P_=e=>({apiConfig:Uc(e)}),O_=al(P_)(R_);function R_({apiConfig:e}){const{t}=Ao(),{upStr:n,downStr:r}=b_(e),{upTotal:o,dlTotal:i,connNumber:s}=L_(e);return C.jsxs("div",{className:Un.TrafficNow,children:[C.jsxs("div",{className:Un.sec,children:[C.jsx("div",{children:t("Upload")}),C.jsx("div",{children:n})]}),C.jsxs("div",{className:Un.sec,children:[C.jsx("div",{children:t("Download")}),C.jsx("div",{children:r})]}),C.jsxs("div",{className:Un.sec,children:[C.jsx("div",{children:t("Upload Total")}),C.jsx("div",{children:o})]}),C.jsxs("div",{className:Un.sec,children:[C.jsx("div",{children:t("Download Total")}),C.jsx("div",{children:i})]}),C.jsxs("div",{className:Un.sec,children:[C.jsx("div",{children:t("Active Connections")}),C.jsx("div",{children:s})]})]})}function b_(e){const[t,n]=vv({upStr:"0 B/s",downStr:"0 B/s"});return yv(()=>jc(e).subscribe(r=>n({upStr:No(r.up)+"/s",downStr:No(r.down)+"/s"})),[e]),t}function L_(e){const[t,n]=vv({upTotal:"0 B",dlTotal:"0 B",connNumber:0}),r=k_(({downloadTotal:o,uploadTotal:i,connections:s})=>{n({upTotal:No(i),dlTotal:No(o),connNumber:s.length})},[n]);return yv(()=>wu(e,r),[e,r]),t}function T_(){const{t:e}=Ao();return C.jsxs("div",{children:[C.jsx(Bg,{title:e("Overview")}),C.jsxs("div",{className:gp.root,children:[C.jsx("div",{children:C.jsx(O_,{})}),C.jsx("div",{className:gp.chart,children:C.jsx(v.Suspense,{fallback:C.jsx(lv,{height:"200px"}),children:C.jsx(x_,{})})})]})]})}const N_="_lo_pmly2_1",I_={lo:N_};function D_(){return C.jsx("div",{className:I_.lo,children:C.jsx(gv,{width:280,height:280,animate:!0,c0:"transparent",c1:"#646464"})})}const M_="_app_1s3k7_1",A_="_content_1s3k7_18",wv={app:M_,content:A_};/** + * @reach/utils v0.18.0 + * + * Copyright (c) 2018-2022, React Training LLC + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Sv(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function re(e,t){return n=>{if(e&&e(n),!n.defaultPrevented)return t(n)}}function xp(e){return typeof e=="boolean"}function Is(e){return!!(e&&{}.toString.call(e)=="[object Function]")}function F_(e){return typeof e=="string"}function j_(e,t){if(e!=null)if(Is(e))e(t);else try{e.current=t}catch{throw new Error(`Cannot assign value "${t}" to ref "${e}"`)}}function Dn(...e){return v.useCallback(t=>{for(let n of e)j_(n,t)},e)}function sn(e){return Sv()?e?e.ownerDocument:document:null}function U_(e,t){let n=v.createContext(t);function r(i){let{children:s,...l}=i,a=v.useMemo(()=>l,Object.values(l));return v.createElement(n.Provider,{value:a},s)}function o(i){let s=v.useContext(n);if(s)return s;if(t)return t;throw Error(`${i} must be rendered inside of a ${e} component.`)}return n.displayName=`${e}Context`,r.displayName=`${e}Provider`,[r,o]}function $_(e){let t=sn(e),n=t.defaultView||window;return t?{width:t.documentElement.clientWidth??n.innerWidth,height:t.documentElement.clientHeight??n.innerHeight}:{width:0,height:0}}function Wi(e){return"which"in e?e.which===3:"button"in e?e.button===2:!1}function wr(...e){return e.filter(t=>t!=null).join("--")}function Wc(){}function xv(){let[,e]=v.useState(Object.create(null));return v.useCallback(()=>{e(Object.create(null))},[])}var lr=Sv()?v.useLayoutEffect:v.useEffect;function Yl(e){const t=v.useRef(null);return v.useEffect(()=>{t.current=e},[e]),t.current}function z_(e,t){let[n,r]=v.useState(t),o=v.useCallback(i=>{e.current=i,r(i)},[]);return[n,o]}var Jl=!1,B_=0;function Ep(){return++B_}var Cp=xr["useId".toString()];function Ev(e){if(Cp!==void 0){let o=Cp();return e??o}let t=e??(Jl?Ep():null),[n,r]=v.useState(t);return lr(()=>{n===null&&r(Ep())},[]),v.useEffect(()=>{Jl===!1&&(Jl=!0)},[]),e??n??void 0}var W_=({children:e,type:t="reach-portal",containerRef:n})=>{let r=v.useRef(null),o=v.useRef(null),i=xv();return v.useEffect(()=>{n!=null&&(typeof n!="object"||!("current"in n)?console.warn("@reach/portal: Invalid value passed to the `containerRef` of a `Portal`. The portal will be appended to the document body, but if you want to attach it to another DOM node you must pass a valid React ref object to `containerRef`."):n.current==null&&console.warn("@reach/portal: A ref was passed to the `containerRef` prop of a `Portal`, but no DOM node was attached to it. Be sure to pass the ref to a DOM component.\n\nIf you are forwarding the ref from another component, be sure to use the React.forwardRef API. See https://reactjs.org/docs/forwarding-refs.html."))},[n]),lr(()=>{if(!r.current)return;let s=r.current.ownerDocument,l=(n==null?void 0:n.current)||s.body;return o.current=s==null?void 0:s.createElement(t),l.appendChild(o.current),i(),()=>{o.current&&l&&l.removeChild(o.current)}},[t,i,n]),o.current?Cc.createPortal(e,o.current):v.createElement("span",{ref:r})},Vc=({unstable_skipInitialRender:e,...t})=>{let[n,r]=v.useState(!1);return v.useEffect(()=>{e&&r(!0)},[e]),e&&!n?null:v.createElement(W_,{...t})};Vc.displayName="Portal";var Cv=v.forwardRef(function({as:t="span",style:n={},...r},o){return v.createElement(t,{ref:o,style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal",...n},...r})});Cv.displayName="VisuallyHidden";var V_=["bottom","height","left","right","top","width"],H_=function(t,n){return t===void 0&&(t={}),n===void 0&&(n={}),V_.some(function(r){return t[r]!==n[r]})},Dt=new Map,_v,Q_=function e(){var t=[];Dt.forEach(function(n,r){var o=r.getBoundingClientRect();H_(o,n.rect)&&(n.rect=o,t.push(n))}),t.forEach(function(n){n.callbacks.forEach(function(r){return r(n.rect)})}),_v=window.requestAnimationFrame(e)};function K_(e,t){return{observe:function(){var r=Dt.size===0;Dt.has(e)?Dt.get(e).callbacks.push(t):Dt.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),r&&Q_()},unobserve:function(){var r=Dt.get(e);if(r){var o=r.callbacks.indexOf(t);o>=0&&r.callbacks.splice(o,1),r.callbacks.length||Dt.delete(e),Dt.size||cancelAnimationFrame(_v)}}}}function Ds(e,t,n){let r,o;xp(t)?r=t:(r=(t==null?void 0:t.observe)??!0,o=t==null?void 0:t.onChange),Is(n)&&(o=n),v.useEffect(()=>{xp(t)&&console.warn("Passing `observe` as the second argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `observe` property as the second argument (`useRect(ref, { observe })`).\nSee https://reach.tech/rect#userect-observe")},[t]),v.useEffect(()=>{Is(n)&&console.warn("Passing `onChange` as the third argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `onChange` property as the second argument (`useRect(ref, { onChange })`).\nSee https://reach.tech/rect#userect-onchange")},[n]);let[i,s]=v.useState(e.current),l=v.useRef(!1),a=v.useRef(!1),[u,c]=v.useState(null),d=v.useRef(o);return lr(()=>{d.current=o,e.current!==i&&s(e.current)}),lr(()=>{i&&!l.current&&(l.current=!0,c(i.getBoundingClientRect()))},[i]),lr(()=>{if(!r)return;let f=i;if(a.current||(a.current=!0,f=e.current),!f){console.warn("You need to place the ref");return}let g=K_(f,y=>{var w;(w=d.current)==null||w.call(d,y),c(y)});return g.observe(),()=>{g.unobserve()}},[r,i,e]),u}var q_=100,G_=500,Su={initial:"IDLE",states:{IDLE:{enter:Xl,on:{MOUSE_ENTER:"FOCUSED",FOCUS:"VISIBLE"}},FOCUSED:{enter:X_,leave:Z_,on:{MOUSE_MOVE:"FOCUSED",MOUSE_LEAVE:"IDLE",MOUSE_DOWN:"DISMISSED",BLUR:"IDLE",REST:"VISIBLE"}},VISIBLE:{on:{FOCUS:"FOCUSED",MOUSE_ENTER:"FOCUSED",MOUSE_LEAVE:"LEAVING_VISIBLE",BLUR:"LEAVING_VISIBLE",MOUSE_DOWN:"DISMISSED",SELECT_WITH_KEYBOARD:"DISMISSED",GLOBAL_MOUSE_MOVE:"LEAVING_VISIBLE"}},LEAVING_VISIBLE:{enter:ek,leave:()=>{tk(),Xl()},on:{MOUSE_ENTER:"VISIBLE",FOCUS:"VISIBLE",TIME_COMPLETE:"IDLE"}},DISMISSED:{leave:()=>{Xl()},on:{MOUSE_LEAVE:"IDLE",BLUR:"IDLE"}}}},Ge={value:Su.initial,context:{id:null}},Vi=[];function Y_(e){return Vi.push(e),()=>{Vi.splice(Vi.indexOf(e),1)}}function J_(){Vi.forEach(e=>e(Ge))}var xu;function X_(){window.clearTimeout(xu),xu=window.setTimeout(()=>{rt({type:"REST"})},q_)}function Z_(){window.clearTimeout(xu)}var Eu;function ek(){window.clearTimeout(Eu),Eu=window.setTimeout(()=>rt({type:"TIME_COMPLETE"}),G_)}function tk(){window.clearTimeout(Eu)}function Xl(){Ge.context.id=null}function nk({id:e,onPointerEnter:t,onPointerMove:n,onPointerLeave:r,onPointerDown:o,onMouseEnter:i,onMouseMove:s,onMouseLeave:l,onMouseDown:a,onFocus:u,onBlur:c,onKeyDown:d,disabled:f,ref:g,DEBUG_STYLE:y}={}){let w=String(Ev(e)),[_,m]=v.useState(y?!0:_p(w,!0)),p=v.useRef(null),h=Dn(g,p),x=Ds(p,{observe:_});v.useEffect(()=>Y_(()=>{m(_p(w))}),[w]),v.useEffect(()=>{let j=sn(p.current);function E(k){(k.key==="Escape"||k.key==="Esc")&&Ge.value==="VISIBLE"&&rt({type:"SELECT_WITH_KEYBOARD"})}return j.addEventListener("keydown",E),()=>j.removeEventListener("keydown",E)},[]),sk({disabled:f,isVisible:_,ref:p});function R(j,E){return typeof window<"u"&&"PointerEvent"in window?j:re(j,E)}function O(j){return function(k){k.pointerType==="mouse"&&j(k)}}function P(){rt({type:"MOUSE_ENTER",id:w})}function S(){rt({type:"MOUSE_MOVE",id:w})}function b(){rt({type:"MOUSE_LEAVE"})}function L(){Ge.context.id===w&&rt({type:"MOUSE_DOWN"})}function D(){window.__REACH_DISABLE_TOOLTIPS||rt({type:"FOCUS",id:w})}function F(){Ge.context.id===w&&rt({type:"BLUR"})}function A(j){(j.key==="Enter"||j.key===" ")&&rt({type:"SELECT_WITH_KEYBOARD"})}return[{"aria-describedby":_?wr("tooltip",w):void 0,"data-state":_?"tooltip-visible":"tooltip-hidden","data-reach-tooltip-trigger":"",ref:h,onPointerEnter:re(t,O(P)),onPointerMove:re(n,O(S)),onPointerLeave:re(r,O(b)),onPointerDown:re(o,O(L)),onMouseEnter:R(i,P),onMouseMove:R(s,S),onMouseLeave:R(l,b),onMouseDown:R(a,L),onFocus:re(u,D),onBlur:re(c,F),onKeyDown:re(d,A)},{id:w,triggerRect:x,isVisible:_},_]}var Hc=v.forwardRef(function({children:e,label:t,ariaLabel:n,id:r,DEBUG_STYLE:o,...i},s){let l=v.Children.only(e);v.useEffect(()=>{n&&console.warn("The `ariaLabel prop is deprecated and will be removed from @reach/tooltip in a future version of Reach UI. Please use `aria-label` instead.")},[n]);let[a,u]=nk({id:r,onPointerEnter:l.props.onPointerEnter,onPointerMove:l.props.onPointerMove,onPointerLeave:l.props.onPointerLeave,onPointerDown:l.props.onPointerDown,onMouseEnter:l.props.onMouseEnter,onMouseMove:l.props.onMouseMove,onMouseLeave:l.props.onMouseLeave,onMouseDown:l.props.onMouseDown,onFocus:l.props.onFocus,onBlur:l.props.onBlur,onKeyDown:l.props.onKeyDown,disabled:l.props.disabled,ref:l.ref,DEBUG_STYLE:o});return v.createElement(v.Fragment,null,v.cloneElement(l,a),v.createElement(kv,{ref:s,label:t,"aria-label":n,...u,...i}))});Hc.displayName="Tooltip";var kv=v.forwardRef(function({label:t,ariaLabel:n,isVisible:r,id:o,...i},s){return r?v.createElement(Vc,null,v.createElement(Pv,{ref:s,label:t,"aria-label":n,isVisible:r,...i,id:wr("tooltip",String(o))})):null});kv.displayName="TooltipPopup";var Pv=v.forwardRef(function({ariaLabel:t,"aria-label":n,as:r="div",id:o,isVisible:i,label:s,position:l=ik,style:a,triggerRect:u,...c},d){let f=(n||t)!=null,g=v.useRef(null),y=Dn(d,g),w=Ds(g,{observe:i});return v.createElement(v.Fragment,null,v.createElement(r,{role:f?void 0:"tooltip",...c,ref:y,"data-reach-tooltip":"",id:f?void 0:o,style:{...a,...rk(l,u,w)}},s),f&&v.createElement(Cv,{role:"tooltip",id:o},n||t))});Pv.displayName="TooltipContent";function rk(e,t,n){return n?e(t,n):{visibility:"hidden"}}var ok=8,ik=(e,t,n=ok)=>{let{width:r,height:o}=$_();if(!e||!t)return{};let i={top:e.top-t.height<0,right:r{if(!(typeof window<"u"&&"PointerEvent"in window)||!e||!t)return;let r=sn(n.current);function o(i){t&&(i.target instanceof Element&&i.target.closest("[data-reach-tooltip-trigger][data-state='tooltip-visible']")||rt({type:"GLOBAL_MOUSE_MOVE"}))}return r.addEventListener("mousemove",o),()=>{r.removeEventListener("mousemove",o)}},[e,t,n])}function rt(e){let{value:t,context:n,changed:r}=lk(Ge,e);r&&(Ge={value:t,context:n},J_())}function lk(e,t){let n=Su.states[e.value],r=n&&n.on&&n.on[t.type];if(!r)return{...e,changed:!1};n&&n.leave&&n.leave(e.context,t);const{type:o,...i}=t;let s={...Ge.context,...i},l=typeof r=="string"?r:r.target,a=Su.states[l];return a&&a.enter&&a.enter(e.context,t),{value:l,context:s,changed:!0}}function _p(e,t){return Ge.context.id===e&&(t?Ge.value==="VISIBLE":Ge.value==="VISIBLE"||Ge.value==="LEAVING_VISIBLE")}var Ov={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},kp=ie.createContext&&ie.createContext(Ov),nn=globalThis&&globalThis.__assign||function(){return nn=Object.assign||function(e){for(var t,n=1,r=arguments.length;nsummary:first-of-type","details"],Cu=vk.join(","),bv=typeof Element>"u",Io=bv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_u=!bv&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},yk=function(t,n,r){var o=Array.prototype.slice.apply(t.querySelectorAll(Cu));return n&&Io.call(t,Cu)&&o.unshift(t),o=o.filter(r),o},wk=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(s.tagName==="SLOT"){var l=s.assignedElements(),a=l.length?l:s.children,u=e(a,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:s,candidates:u})}else{var c=Io.call(s,Cu);c&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!r.shadowRootFilter||r.shadowRootFilter(s);if(d&&f){var g=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,g):o.push({scope:s,candidates:g})}else i.unshift.apply(i,s.children)}}return o},Lv=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},Sk=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Tv=function(t){return t.tagName==="INPUT"},xk=function(t){return Tv(t)&&t.type==="hidden"},Ek=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Ck=function(t,n){for(var r=0;rsummary:first-of-type"),s=i?t.parentElement:t;if(Io.call(s,"details:not([open]) *"))return!0;var l=_u(t).host,a=(l==null?void 0:l.ownerDocument.contains(l))||t.ownerDocument.contains(t);if(!r||r==="full"){if(typeof o=="function"){for(var u=t;t;){var c=t.parentElement,d=_u(t);if(c&&!c.shadowRoot&&o(c)===!0)return Pp(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=u}if(a)return!t.getClientRects().length}else if(r==="non-zero-area")return Pp(t);return!1},Rk=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},Tk=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scope,l=s?o.scope:o,a=Lv(l,s),u=s?e(o.candidates):l;a===0?s?n.push.apply(n,u):n.push(l):r.push({documentOrder:i,tabIndex:a,item:o,isScope:s,content:u})}),r.sort(Sk).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},xt=function(t,n){n=n||{};var r;return n.getShadowRoot?r=wk([t],n.includeContainer,{filter:Op.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Lk}):r=yk(t,n.includeContainer,Op.bind(null,n)),Tk(r)},Qc=v.forwardRef(function({unstable_skipInitialPortalRender:t,...n},r){return v.createElement(Vc,{unstable_skipInitialRender:t},v.createElement(Nv,{ref:r,...n}))});Qc.displayName="Popover";var Nv=v.forwardRef(function({as:t="div",targetRef:n,position:r=Dk,unstable_observableRefs:o=[],...i},s){const l=v.useRef(null),a=Ds(l,{observe:!i.hidden}),u=Ds(n,{observe:!0}),c=Dn(l,s);return Ak(n,l),v.createElement(t,{"data-reach-popover":"",ref:c,...i,style:{position:"absolute",...Nk(r,u,a,...o),...i.style}})});Nv.displayName="PopoverImpl";function Nk(e,t,n,...r){return n?e(t,n,...r.map(o=>o.current)):{visibility:"hidden"}}function Ik(e,t,n){return{top:n?`${e.top-t.height+window.pageYOffset}px`:`${e.top+e.height+window.pageYOffset}px`}}var Dk=(e,t)=>{if(!e||!t)return{};const{directionRight:n,directionUp:r}=Mk(e,t);return{left:n?`${e.right-t.width+window.pageXOffset}px`:`${e.left+window.pageXOffset}px`,...Ik(e,t,r)}};function Mk(e,t,n=0,r=0){const o={top:e.top-t.height<0,right:window.innerWidth(n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}),[]);function o(){const p=xt(n),h=p&&e.current?p.indexOf(e.current):-1,x=p&&p[h+1];return t.current&&t.current.contains(x||null)?!1:x}function i(){return e.current?e.current===n.activeElement:!1}function s(p){const h=t.current&&xt(t.current);h&&h[0]&&(p.preventDefault(),h[0].focus())}function l(){if(t.current?t.current.contains(n.activeElement||null):!1){const h=t.current&&xt(t.current);return!!(h&&h[h.length-1]===n.activeElement)}return!1}function a(p){const h=o();h&&(p.preventDefault(),h.focus())}function u(p){if(!p.shiftKey)return;const h=o();return p.target===h}function c(p){const h=t.current&&xt(t.current),x=h&&h[h.length-1];x&&(p.preventDefault(),x.focus())}function d(p){const h=t.current&&xt(t.current);return h?h.length===0?!1:p.target===h[0]:!1}function f(p){var h;p.preventDefault(),(h=e.current)==null||h.focus()}function g(p){const h=t.current?xt(n).filter(x=>!t.current.contains(x)):null;return h?p.target===h[h.length-1]:!1}function y(p){return p.target===xt(n)[0]}let w=[];function _(){const p=t.current&&xt(t.current);p&&(p.forEach(h=>{w.push([h,h.tabIndex]),h.tabIndex=-1}),n.addEventListener("focusin",m))}function m(){n.removeEventListener("focusin",m),w.forEach(([p,h])=>{p.tabIndex=h})}}function Fk(e,t={}){const n=[];let r=v.createContext({descendants:n,registerDescendant:()=>Wc,...t});return r.displayName=e,r}function jk(e,t,n){let r=xv(),{registerDescendant:o,descendants:i}=v.useContext(t),s=n??i.findIndex(l=>l.element===e.element);return lr(()=>(e.element||r(),o({...e,index:s})),[e,r,s,o,...Object.values(e)]),s}function Uk(){return v.useState([])}function $k(e){return v.useContext(e).descendants}function zk({context:e,children:t,items:n,set:r}){let o=v.useCallback(({element:i,index:s,...l})=>i?(r(a=>{if(s!=null&&s!==-1)return Rp(a,{element:i,index:s,...l},s);if(a.length===0)return[{...l,element:i,index:0}];if(a.find(d=>d.element===i))return console.warn(`[reach-ui]: \`useDescendant\` was called with an element that was already registered. + +If you are using the \`@reach/descendants\` package directly, make sure to only register descendants once. Registering a descendant more than once will lead to bugs in your app. + +If you are using another \`reach-ui\` package, this is probably our bug! + +To report a bug, open a new issue: + + https://github.com/reach/reach-ui/issues/new?assignees=&labels=&template=Bug_report.md + +IMPORTANT: this check will only run in the development build, so if you see this warning please be aware that your app may crash when deployed.`),Vk(a);let u=Wk(a,i),c;return u===-1?c=[...a,{...l,element:i,index:a.length}]:c=Rp(a,{...l,element:i,index:u},u),c}),()=>{i&&r(a=>a.filter(u=>i!==u.element))}):Wc,[]);return v.createElement(e.Provider,{value:v.useMemo(()=>({descendants:n,registerDescendant:o}),[n,o])},t)}function Bk(e,t){let{descendants:n}=v.useContext(e),{callback:r,currentIndex:o,filter:i,key:s="index",orientation:l="vertical",rotate:a=!0,rtl:u=!1}=t;return function(d){if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(d.key))return;let f=o??-1,g=i?n.filter(i):n;if(!g.length)return;let y=g.findIndex(h=>h.index===o);function w(){return f===p().index?a?m():g[y]:g[(y+1)%g.length]}function _(){return f===m().index?a?p():g[y]:g[(y-1+g.length)%g.length]}function m(){return g[0]}function p(){return g[g.length-1]}switch(d.key){case"ArrowDown":if(l==="vertical"||l==="both"){d.preventDefault();let P=w();r(s==="option"?P:P[s])}break;case"ArrowUp":if(l==="vertical"||l==="both"){d.preventDefault();let P=_();r(s==="option"?P:P[s])}break;case"ArrowLeft":if(l==="horizontal"||l==="both"){d.preventDefault();let P=(u?w:_)();r(s==="option"?P:P[s])}break;case"ArrowRight":if(l==="horizontal"||l==="both"){d.preventDefault();let P=(u?_:w)();r(s==="option"?P:P[s])}break;case"PageUp":d.preventDefault();let h=(d.ctrlKey?_:m)();r(s==="option"?h:h[s]);break;case"Home":d.preventDefault();let x=m();r(s==="option"?x:x[s]);break;case"PageDown":d.preventDefault();let R=(d.ctrlKey?w:p)();r(s==="option"?R:R[s]);break;case"End":d.preventDefault();let O=p();r(s==="option"?O:O[s]);break}}}function Iv(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Wk(e,t){if(!t||!e.length)return-1;let n=e.length;for(;n--;){let r=e[n].element;if(r&&Iv(r,t))return n+1}return-1}function Rp(e,t,n){return n==null||!(n in e)?[...e,t]:[...e.slice(0,n),t,...e.slice(n)]}function Vk(e){return e.sort((t,n)=>!t.element||!n.element?0:Iv(t.element,n.element)?-1:1).map((t,n)=>({...t,index:n}))}var Dv="CLEAR_SELECTION_INDEX",Kc="CLICK_MENU_ITEM",Do="CLOSE_MENU",Hk="OPEN_MENU_AT_FIRST_ITEM",ku="OPEN_MENU_AT_INDEX",Mv="OPEN_MENU_CLEARED",Pu="SEARCH_FOR_ITEM",Qt="SELECT_ITEM_AT_INDEX",Ou="SET_BUTTON_ID",cl=Fk("DropdownDescendantContext"),[Qk,qo]=U_("Dropdown"),Kk={triggerId:null,isExpanded:!1,typeaheadQuery:"",selectionIndex:-1},Av=({id:e,children:t})=>{let n=v.useRef(null),r=v.useRef(null),o=v.useRef(null),[i,s]=Uk(),l=Ev(e),a=e||wr("menu",l),u=wr("menu-button",a),[c,d]=v.useReducer(eP,{...Kk,triggerId:u}),f=v.useRef(!1),g=v.useRef([]),y=v.useRef(!1),w=v.useRef({x:0,y:0});return v.useEffect(()=>{c.isExpanded?(window.__REACH_DISABLE_TOOLTIPS=!0,window.requestAnimationFrame(()=>{Ms(r.current)})):window.__REACH_DISABLE_TOOLTIPS=!1},[c.isExpanded]),v.createElement(zk,{context:cl,items:i,set:s},v.createElement(Qk,{dispatch:d,dropdownId:a,dropdownRef:r,mouseDownStartPosRef:w,popoverRef:o,readyToSelect:y,selectCallbacks:g,state:c,triggerClickedRef:f,triggerRef:n},Is(t)?t({isExpanded:c.isExpanded,isOpen:c.isExpanded}):t))};Av.displayName="DropdownProvider";function Fv({onKeyDown:e,onMouseDown:t,id:n,ref:r,...o}){let{dispatch:i,dropdownId:s,mouseDownStartPosRef:l,triggerClickedRef:a,triggerRef:u,state:{triggerId:c,isExpanded:d}}=qo("useDropdownTrigger"),f=Dn(u,r),g=Bv(),y=v.useMemo(()=>g.findIndex(m=>!m.disabled),[g]);v.useEffect(()=>{n!=null&&n!==c&&i({type:Ou,payload:n})},[c,i,n]),v.useEffect(()=>{n==null&&i({type:Ou,payload:wr("menu-button",s)})},[s,i,n]);function w(m){switch(m.key){case"ArrowDown":case"ArrowUp":m.preventDefault(),i({type:ku,payload:{index:y}});break;case"Enter":case" ":i({type:ku,payload:{index:y}});break}}function _(m){Wi(m.nativeEvent)||(l.current={x:m.clientX,y:m.clientY},d||(a.current=!0),i(d?{type:Do}:{type:Mv}))}return{data:{isExpanded:d,controls:s},props:{...o,ref:f,id:c||void 0,onKeyDown:re(e,w),onMouseDown:re(t,_),type:"button"}}}var qk=v.forwardRef(({as:e="button",...t},n)=>{let{props:r}=Fv({...t,ref:n});return v.createElement(e,{"data-reach-dropdown-trigger":"",...r})});qk.displayName="DropdownTrigger";function jv({index:e,isLink:t=!1,onClick:n,onDragStart:r,onMouseDown:o,onMouseEnter:i,onMouseLeave:s,onMouseMove:l,onMouseUp:a,onSelect:u,disabled:c,onFocus:d,valueText:f,ref:g,...y}){let{dispatch:w,dropdownRef:_,mouseDownStartPosRef:m,readyToSelect:p,selectCallbacks:h,triggerRef:x,state:{selectionIndex:R,isExpanded:O}}=qo("useDropdownItem"),P=v.useRef(null),[S,b]=v.useState(f||""),L=v.useCallback(H=>{!f&&(H!=null&&H.textContent)&&b(H.textContent)},[f]),D=v.useRef(!1),[F,A]=z_(P,null),T=v.useMemo(()=>({element:F,key:S,disabled:c,isLink:t}),[c,F,t,S]),N=jk(T,cl,e),j=N===R&&!c,E=Dn(g,A,L);h.current[N]=u;function k(){Ms(x.current),u&&u(),w({type:Kc})}function M(H){Wi(H.nativeEvent)||t&&(c?H.preventDefault():k())}function $(H){t&&H.preventDefault()}function B(H){Wi(H.nativeEvent)||(t?D.current=!0:H.preventDefault())}function K(H){let Nt=sn(_.current);!j&&N!=null&&!c&&(_!=null&&_.current&&_.current!==Nt.activeElement&&P.current!==Nt.activeElement&&_.current.focus(),w({type:Qt,payload:{index:N}}))}function Oe(H){w({type:Dv})}function Re(H){if(!p.current){let Nt=8,iy=Math.abs(H.clientX-m.current.x),sy=Math.abs(H.clientY-m.current.y);(iy>Nt||sy>Nt)&&(p.current=!0)}!j&&N!=null&&!c&&w({type:Qt,payload:{index:N,dropdownRef:_}})}function cn(){p.current=!0,!j&&N!=null&&!c&&w({type:Qt,payload:{index:N}})}function Ze(H){if(!Wi(H.nativeEvent)){if(!p.current){p.current=!0;return}t?D.current?D.current=!1:P.current&&P.current.click():c||k()}}return v.useEffect(()=>{if(O){let H=window.setTimeout(()=>{p.current=!0},400);return()=>{window.clearTimeout(H)}}else p.current=!1},[O,p]),v.useEffect(()=>{let H=sn(P.current);return H.addEventListener("mouseup",Nt),()=>{H.removeEventListener("mouseup",Nt)};function Nt(){D.current=!1}},[]),{data:{disabled:c},props:{id:zv(N),tabIndex:-1,...y,ref:E,"data-disabled":c?"":void 0,"data-selected":j?"":void 0,"data-valuetext":S,onClick:re(n,M),onDragStart:re(r,$),onMouseDown:re(o,B),onMouseEnter:re(i,K),onMouseLeave:re(s,Oe),onMouseMove:re(l,Re),onFocus:re(d,cn),onMouseUp:re(a,Ze)}}}var Gk=v.forwardRef(({as:e="div",...t},n)=>{let{props:r}=jv({...t,ref:n});return v.createElement(e,{"data-reach-dropdown-item":"",...r})});Gk.displayName="DropdownItem";function Uv({id:e,onKeyDown:t,ref:n,...r}){let{dispatch:o,triggerRef:i,dropdownRef:s,selectCallbacks:l,dropdownId:a,state:{isExpanded:u,triggerId:c,selectionIndex:d,typeaheadQuery:f}}=qo("useDropdownItems"),g=Bv(),y=Dn(s,n);v.useEffect(()=>{let h=Xk(g,f);f&&h!=null&&o({type:Qt,payload:{index:h,dropdownRef:s}});let x=window.setTimeout(()=>f&&o({type:Pu,payload:""}),1e3);return()=>window.clearTimeout(x)},[o,g,f,s]);let w=Yl(g.length),_=Yl(g[d]),m=Yl(d);v.useEffect(()=>{d>g.length-1?o({type:Qt,payload:{index:g.length-1,dropdownRef:s}}):w!==g.length&&d>-1&&_&&m===d&&g[d]!==_&&o({type:Qt,payload:{index:g.findIndex(h=>h.key===(_==null?void 0:_.key)),dropdownRef:s}})},[s,o,g,w,_,m,d]);let p=re(function(x){let{key:R}=x;if(u)switch(R){case"Enter":case" ":let O=g.find(P=>P.index===d);O&&!O.disabled&&(x.preventDefault(),O.isLink&&O.element?O.element.click():(Ms(i.current),l.current[O.index]&&l.current[O.index](),o({type:Kc})));break;case"Escape":Ms(i.current),o({type:Do});break;case"Tab":x.preventDefault();break;default:if(F_(R)&&R.length===1){let P=f+R.toLowerCase();o({type:Pu,payload:P})}break}},Bk(cl,{currentIndex:d,orientation:"vertical",rotate:!1,filter:h=>!h.disabled,callback:h=>{o({type:Qt,payload:{index:h,dropdownRef:s}})},key:"index"}));return{data:{activeDescendant:zv(d)||void 0,triggerId:c},props:{tabIndex:-1,...r,ref:y,id:a,onKeyDown:re(t,p)}}}var Yk=v.forwardRef(({as:e="div",...t},n)=>{let{props:r}=Uv({...t,ref:n});return v.createElement(e,{"data-reach-dropdown-items":"",...r})});Yk.displayName="DropdownItems";function $v({onBlur:e,portal:t=!0,position:n,ref:r,...o}){let{triggerRef:i,triggerClickedRef:s,dispatch:l,dropdownRef:a,popoverRef:u,state:{isExpanded:c}}=qo("useDropdownPopover"),d=Dn(u,r);return v.useEffect(()=>{if(!c)return;let f=sn(u.current);function g(y){s.current?s.current=!1:Zk(u.current,y.target)||l({type:Do})}return f.addEventListener("mousedown",g),()=>{f.removeEventListener("mousedown",g)}},[s,i,l,a,u,c]),{data:{portal:t,position:n,targetRef:i,isExpanded:c},props:{ref:d,hidden:!c,onBlur:re(e,f=>{f.currentTarget.contains(f.relatedTarget)||l({type:Do})}),...o}}}var Jk=v.forwardRef(({as:e="div",...t},n)=>{let{data:{portal:r,targetRef:o,position:i},props:s}=$v({...t,ref:n}),l={"data-reach-dropdown-popover":""};return r?v.createElement(Qc,{...s,...l,as:e,targetRef:o,position:i,unstable_skipInitialPortalRender:!0}):v.createElement(e,{...s,...l})});Jk.displayName="DropdownPopover";function Xk(e,t=""){if(!t)return null;let n=e.find(r=>{var o,i,s;return r.disabled?!1:(s=(i=(o=r.element)==null?void 0:o.dataset)==null?void 0:i.valuetext)==null?void 0:s.toLowerCase().startsWith(t)});return n?e.indexOf(n):null}function zv(e){let{dropdownId:t}=qo("useItemId");return e!=null&&e>-1?wr(`option-${e}`,t):void 0}function Ms(e){e&&e.focus()}function Zk(e,t){return!!(e&&e.contains(t))}function eP(e,t={}){switch(t.type){case Kc:return{...e,isExpanded:!1,selectionIndex:-1};case Do:return{...e,isExpanded:!1,selectionIndex:-1};case Hk:return{...e,isExpanded:!0,selectionIndex:0};case ku:return{...e,isExpanded:!0,selectionIndex:t.payload.index};case Mv:return{...e,isExpanded:!0,selectionIndex:-1};case Qt:{let{dropdownRef:n={current:null}}=t.payload;if(t.payload.index>=0&&t.payload.index!==e.selectionIndex){if(n.current){let r=sn(n.current);n.current!==(r==null?void 0:r.activeElement)&&n.current.focus()}return{...e,selectionIndex:t.payload.max!=null?Math.min(Math.max(t.payload.index,0),t.payload.max):Math.max(t.payload.index,0)}}return e}case Dv:return{...e,selectionIndex:-1};case Ou:return{...e,triggerId:t.payload};case Pu:return typeof t.payload<"u"?{...e,typeaheadQuery:t.payload}:e;default:return e}}function Bv(){return $k(cl)}var Wv={exports:{}},q={};/** @license React v17.0.2 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var fl=60103,dl=60106,Go=60107,Yo=60108,Jo=60114,Xo=60109,Zo=60110,ei=60112,ti=60113,qc=60120,ni=60115,ri=60116,Vv=60121,Hv=60122,Qv=60117,Kv=60129,qv=60131;if(typeof Symbol=="function"&&Symbol.for){var de=Symbol.for;fl=de("react.element"),dl=de("react.portal"),Go=de("react.fragment"),Yo=de("react.strict_mode"),Jo=de("react.profiler"),Xo=de("react.provider"),Zo=de("react.context"),ei=de("react.forward_ref"),ti=de("react.suspense"),qc=de("react.suspense_list"),ni=de("react.memo"),ri=de("react.lazy"),Vv=de("react.block"),Hv=de("react.server.block"),Qv=de("react.fundamental"),Kv=de("react.debug_trace_mode"),qv=de("react.legacy_hidden")}function ht(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case fl:switch(e=e.type,e){case Go:case Jo:case Yo:case ti:case qc:return e;default:switch(e=e&&e.$$typeof,e){case Zo:case ei:case ri:case ni:case Xo:return e;default:return t}}case dl:return t}}}var tP=Xo,nP=fl,rP=ei,oP=Go,iP=ri,sP=ni,lP=dl,aP=Jo,uP=Yo,cP=ti;q.ContextConsumer=Zo;q.ContextProvider=tP;q.Element=nP;q.ForwardRef=rP;q.Fragment=oP;q.Lazy=iP;q.Memo=sP;q.Portal=lP;q.Profiler=aP;q.StrictMode=uP;q.Suspense=cP;q.isAsyncMode=function(){return!1};q.isConcurrentMode=function(){return!1};q.isContextConsumer=function(e){return ht(e)===Zo};q.isContextProvider=function(e){return ht(e)===Xo};q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===fl};q.isForwardRef=function(e){return ht(e)===ei};q.isFragment=function(e){return ht(e)===Go};q.isLazy=function(e){return ht(e)===ri};q.isMemo=function(e){return ht(e)===ni};q.isPortal=function(e){return ht(e)===dl};q.isProfiler=function(e){return ht(e)===Jo};q.isStrictMode=function(e){return ht(e)===Yo};q.isSuspense=function(e){return ht(e)===ti};q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Go||e===Jo||e===Kv||e===Yo||e===ti||e===qc||e===qv||typeof e=="object"&&e!==null&&(e.$$typeof===ri||e.$$typeof===ni||e.$$typeof===Xo||e.$$typeof===Zo||e.$$typeof===ei||e.$$typeof===Qv||e.$$typeof===Vv||e[0]===Hv)};q.typeOf=ht;Wv.exports=q;var fP=Wv.exports,Gv=v.forwardRef(({as:e=v.Fragment,id:t,children:n,...r},o)=>{let s=v.useMemo(()=>{try{return fP.isFragment(v.createElement(e,null))}catch{return!1}},[e])?{}:{ref:o,id:t,"data-reach-menu":"",...r};return v.createElement(e,{...s},v.createElement(Av,{id:t,children:n}))});Gv.displayName="Menu";var Yv=v.forwardRef(({as:e="button",...t},n)=>{let{data:{isExpanded:r,controls:o},props:i}=Fv({...t,ref:n});return v.createElement(e,{"aria-expanded":r?!0:void 0,"aria-haspopup":!0,"aria-controls":o,...i,"data-reach-menu-button":""})});Yv.displayName="MenuButton";var Gc=v.forwardRef(({as:e="div",...t},n)=>{let{data:{disabled:r},props:o}=jv({...t,ref:n});return v.createElement(e,{role:"menuitem",...o,"aria-disabled":r||void 0,"data-reach-menu-item":""})});Gc.displayName="MenuItemImpl";var Jv=v.forwardRef(({as:e="div",...t},n)=>v.createElement(Gc,{...t,ref:n,as:e}));Jv.displayName="MenuItem";var Xv=v.forwardRef(({as:e="div",...t},n)=>{let{data:{activeDescendant:r,triggerId:o},props:i}=Uv({...t,ref:n});return v.createElement(e,{"aria-activedescendant":r,"aria-labelledby":o||void 0,role:"menu",...i,"data-reach-menu-items":""})});Xv.displayName="MenuItems";var dP=v.forwardRef(({as:e="a",component:t,onSelect:n,...r},o)=>(v.useEffect(()=>{t&&console.warn("[@reach/menu-button]: Please use the `as` prop instead of `component`")},[t]),v.createElement(Gc,{...r,ref:o,"data-reach-menu-link":"",as:e,isLink:!0,onSelect:n||Wc})));dP.displayName="MenuLink";var Zv=v.forwardRef(({portal:e=!0,...t},n)=>v.createElement(ey,{portal:e},v.createElement(Xv,{...t,ref:n,"data-reach-menu-list":""})));Zv.displayName="MenuList";var ey=v.forwardRef(({as:e="div",...t},n)=>{let{data:{portal:r,targetRef:o,position:i},props:s}=$v({...t,ref:n}),l={"data-reach-menu-popover":""};return r?v.createElement(Qc,{...s,...l,as:e,targetRef:o,position:i,unstable_skipInitialPortalRender:!0}):v.createElement(e,{...s,...l})});ey.displayName="MenuPopover";function pP(e){let t={};const n={},r={};function o(a="default"){return n[a]=e(a).then(u=>{delete n[a],t[a]=u}).catch(u=>{r[a]=u}),n[a]}function i(a="default"){t[a]!==void 0||n[a]||o(a)}function s(a="default"){if(t[a]!==void 0)return t[a];throw r[a]?r[a]:n[a]?n[a]:o(a)}function l(a){a?delete t[a]:t={}}return{preload:i,read:s,clear:l}}const Yc=pP(()=>ct(()=>import("./index-7030db65.js"),[],import.meta.url)),hP="_checkWrapper_1nrct_45",mP="_active_1nrct_51",bp={checkWrapper:hP,active:mP};function gP({theme:e,dispatch:t}){const{t:n}=Ao(),r=v.useMemo(()=>{switch(e){case"dark":return C.jsx(Lp,{});case"auto":return C.jsx(yP,{});case"light":return C.jsx(vP,{});default:return console.assert(!1,"Unknown theme"),C.jsx(Lp,{})}},[e]),o=v.useCallback(i=>t(Y2(i)),[t]);return C.jsxs(Gv,{children:[C.jsx(Hc,{label:n("switch_theme"),"aria-label":"switch theme",children:C.jsx(Yv,{children:r})}),C.jsxs(Zv,{children:[C.jsx(Zl,{value:"auto",label:"Auto",active:e==="auto",onSelect:o}),C.jsx(Zl,{value:"dark",label:"Dark",active:e==="dark",onSelect:o}),C.jsx(Zl,{value:"light",label:"Light",active:e==="light",onSelect:o})]})]})}function Zl(e){const t=Ho(bp.checkWrapper,{[bp.active]:e.active});return C.jsxs(Jv,{onSelect:()=>e.onSelect(e.value),children:[C.jsx("span",{className:t,children:C.jsx(KE,{size:14})}),C.jsx("span",{children:e.label})]})}function Lp(){const t=Yc.read().motion;return C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:C.jsx(t.path,{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}})})}function vP(){const t=Yc.read().motion;return C.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("circle",{cx:"12",cy:"12",r:"5"}),C.jsxs(t.g,{initial:{scale:.7},animate:{scale:1},transition:{duration:.5},children:[C.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),C.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),C.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),C.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),C.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),C.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),C.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),C.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]})}function yP(){const t=Yc.read().motion;return C.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[C.jsx("circle",{cx:"12",cy:"12",r:"11"}),C.jsx("clipPath",{id:"cut-off-bottom",children:C.jsx(t.rect,{x:"12",y:"0",width:"12",height:"24",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}})}),C.jsx("circle",{cx:"12",cy:"12",r:"6",clipPath:"url(#cut-off-bottom)",fill:"currentColor"})]})}const wP=e=>({theme:rv(e)}),SP=al(wP)(gP),xP="_root_r8ke8_1",EP="_logoPlaceholder_r8ke8_12",CP="_rows_r8ke8_21",_P="_row_r8ke8_21",kP="_rowActive_r8ke8_68",PP="_label_r8ke8_80",OP="_footer_r8ke8_97",RP="_iconWrapper_r8ke8_108",zt={root:xP,logoPlaceholder:EP,rows:CP,row:_P,rowActive:kP,label:PP,footer:OP,iconWrapper:RP},bP={activity:ck,globe:dk,command:mk,file:fk,settings:gk,link:pk,rec:hk},LP=v.memo(function({isActive:t,to:n,iconId:r,labelText:o}){const i=bP[r],s=Ho(zt.row,t?zt.rowActive:null);return C.jsxs(jg,{to:n,className:s,children:[C.jsx(i,{}),C.jsx("div",{className:zt.label,children:o})]})}),TP=[{to:"/",iconId:"activity",labelText:"Overview"},{to:"/proxies",iconId:"globe",labelText:"Proxies"},{to:"/rules",iconId:"command",labelText:"Rules"},{to:"/connections",iconId:"link",labelText:"Conns"},{to:"/configs",iconId:"settings",labelText:"Config"},{to:"/logs",iconId:"file",labelText:"Logs"},{to:"/rec",iconId:"rec",labelText:"Rec"}];function NP(){const{t:e}=Ao(),t=Ko();return C.jsxs("div",{className:zt.root,children:[C.jsx("div",{className:zt.logoPlaceholder}),C.jsx("div",{className:zt.rows,children:TP.map(({to:n,iconId:r,labelText:o})=>C.jsx(LP,{to:n,isActive:t.pathname===n,iconId:r,labelText:e(o)},n))}),C.jsxs("div",{className:zt.footer,children:[C.jsx(SP,{}),C.jsx(Hc,{label:e("about"),children:C.jsx(jg,{to:"/about",className:zt.iconWrapper,children:C.jsx(ZE,{size:20})})})]})]})}const IP="_btn_lzu00_1",DP="_circular_lzu00_27",MP="_minimal_lzu00_30",AP="_btnStart_lzu00_48",FP="_loadingContainer_lzu00_55",Kr={btn:IP,circular:DP,minimal:MP,btnStart:AP,loadingContainer:FP},jP="_sectionNameType_1b9pp_1",UP="_loadingDot_1b9pp_66",$P="_dot2_1b9pp_1",zP="_dot1_1b9pp_1",BP="_dot3_1b9pp_1",ty={sectionNameType:jP,loadingDot:UP,dot2:$P,dot1:zP,dot3:BP};function WO({name:e,type:t}){return C.jsxs("h2",{className:ty.sectionNameType,children:[C.jsx("span",{children:e}),C.jsx("span",{children:t})]})}function WP(){return C.jsx("span",{className:ty.loadingDot})}const{forwardRef:VP,useCallback:HP}=xr;function QP(e,t){const{onClick:n,disabled:r=!1,isLoading:o,kind:i="primary",className:s,children:l,label:a,text:u,start:c,...d}=e,f={children:l,label:a,text:u,start:c},g=HP(w=>{o||n&&n(w)},[o,n]),y=Ho(Kr.btn,{[Kr.minimal]:i==="minimal",[Kr.circular]:i==="circular"},s);return C.jsx("button",{className:y,ref:t,onClick:g,disabled:r,...d,children:o?C.jsxs(C.Fragment,{children:[C.jsx("span",{style:{display:"inline-flex",opacity:0},children:C.jsx(Tp,{...f})}),C.jsx("span",{className:Kr.loadingContainer,children:C.jsx(WP,{})})]}):C.jsx(Tp,{...f})})}function Tp({children:e,label:t,text:n,start:r}){return C.jsxs(C.Fragment,{children:[r?C.jsx("span",{className:Kr.btnStart,children:typeof r=="function"?r():r}):null,e||t||n]})}const VO=VP(QP),KP="_toggle_g6vyf_1",qP="_input_g6vyf_12",GP="_track_g6vyf_16",HO={toggle:KP,input:qP,track:GP},YP="_input_1hkb4_1",QO={input:YP},JP="_animate_1w0e8_1",KO={animate:JP,"zap-pulse":"_zap-pulse_1w0e8_1"},XP="_ToggleSwitch_10mtp_1",ZP="_slider_10mtp_28",Np={ToggleSwitch:XP,slider:ZP};function eO({options:e,value:t,name:n,onChange:r}){const o=v.useMemo(()=>e.map(l=>l.value).indexOf(t),[e,t]),i=v.useCallback(l=>{const a=Math.floor(100/e.length);if(l===e.length-1)return 100-e.length*a+a;if(l>-1)return a},[e]),s=v.useMemo(()=>({width:i(o)+"%",left:o*i(0)+"%"}),[o,i]);return C.jsxs("div",{className:Np.ToggleSwitch,children:[C.jsx("div",{className:Np.slider,style:s}),e.map((l,a)=>{const u=`${n}-${l.label}`,c=a===0?"":"border-left";return C.jsxs("label",{htmlFor:u,className:c,style:{width:i(a)+"%"},children:[C.jsx("input",{id:u,name:n,type:"radio",value:l.value,checked:t===l.value,onChange:r}),C.jsx("div",{children:l.label})]},u)})]})}ie.memo(eO);const{lazy:br,Suspense:ny}=xr,tO=br(()=>ct(()=>import("./Connections-af4e9b01.js"),["./Connections-af4e9b01.js","./useRemainingViewPortHeight-60d26854.js","./index-4bcbc835.js","./Modal.module-32e7ee6a.js","./Modal-86bce5c3.css","./Fab-a6cf5682.js","./Fab-a434d836.css","./play-19a8b29d.js","./Connections-ddae4f70.css"],import.meta.url)),nO=br(()=>ct(()=>import("./Config-df73f8b7.js"),["./Config-df73f8b7.js","./logs-293a1f45.js","./Select-4003d0aa.js","./Select-3de40504.css","./Config-cf41b8ef.css"],import.meta.url)),rO=br(()=>ct(()=>import("./Logs-00f3c89f.js"),["./Logs-00f3c89f.js","./index.esm-d09f413d.js","./logs-293a1f45.js","./debounce-c1ba2006.js","./useRemainingViewPortHeight-60d26854.js","./Fab-a6cf5682.js","./Fab-a434d836.css","./play-19a8b29d.js","./Logs-5e5ee0ad.css"],import.meta.url)),oO=br(()=>ct(()=>import("./Proxies-3133a480.js"),["./Proxies-3133a480.js","./Modal.module-32e7ee6a.js","./Modal-86bce5c3.css","./Fab-a6cf5682.js","./Fab-a434d836.css","./TextFilter-a62f489f.js","./debounce-c1ba2006.js","./TextFilter-ced87fc6.css","./index-4bcbc835.js","./Select-4003d0aa.js","./Select-3de40504.css","./Proxies-40f80166.css"],import.meta.url)),iO=br(()=>ct(()=>import("./Rules-4f85f942.js"),["./Rules-4f85f942.js","./index.esm-d09f413d.js","./TextFilter-a62f489f.js","./debounce-c1ba2006.js","./TextFilter-ced87fc6.css","./index-4bcbc835.js","./Fab-a6cf5682.js","./Fab-a434d836.css","./useRemainingViewPortHeight-60d26854.js","./Rules-e11cb70e.css"],import.meta.url)),sO=br(()=>ct(()=>import("./Rec-6eb4676c.js"),["./Rec-6eb4676c.js","./Rec-7c8e491b.css"],import.meta.url)),lO=[{path:"/",element:C.jsx(T_,{})},{path:"/connections",element:C.jsx(YC.Provider,{value:{hasProcessPath:!1},children:C.jsx(tO,{})})},{path:"/configs",element:C.jsx(nO,{})},{path:"/logs",element:C.jsx(rO,{})},{path:"/proxies",element:C.jsx(oO,{})},{path:"/rules",element:C.jsx(iO,{})},{path:"/rec",element:C.jsx(sO,{})},{path:"/about",element:C.jsx(cC,{})},!1].filter(Boolean);function aO(){return Mg(lO)}function uO(){return C.jsxs(C.Fragment,{children:[C.jsx(NP,{}),C.jsx("div",{className:wv.content,children:C.jsx(ny,{fallback:C.jsx(D_,{}),children:C.jsx(aO,{})})})]})}function cO(){return Mg([{path:"*",element:C.jsx(uO,{})}])}function fO({children:e}){const[t]=qx(oC),n=Ho(wv.app,{pureBlackDark:t});return C.jsx("div",{className:n,children:e})}const dO=()=>C.jsx(a_,{children:C.jsx(_2,{initialState:KC,actions:qC,children:C.jsx(Ex,{client:mC,children:C.jsx(zE,{children:C.jsx(fO,{children:C.jsx(ny,{fallback:C.jsx(lv,{}),children:C.jsx(cO,{})})})})})})}),pO=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function hO(e){if("serviceWorker"in navigator){const t=new URL("",window.location.href);if(t.origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=new URL("sw.js",t.href).href;pO?(mO(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker")})):ry(n,e)})}}function ry(e,t){navigator.serviceWorker.register(e).then(n=>{n.onupdatefound=()=>{const r=n.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(n)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function mO(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(o=>{o.unregister().then(()=>{window.location.reload()})}):ry(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}yO();const oy=document.getElementById("app"),gO=eg(oy);function vO(e){const t=document.createElement("link");t.href=e,t.rel="preload",t.as="font",t.crossOrigin="",document.head.appendChild(t)}function yO(){vO(Yp)}QS.setAppElement(oy);gO.render(C.jsx(v.StrictMode,{children:C.jsx(dO,{})}));setTimeout(()=>{ct(()=>import("./index.modern-c58ff412.js"),[],import.meta.url).then(e=>{e&&e.polyfillCountryFlagEmojis("Twemoji Country Flags",Yp)}).catch(()=>{})},1);hO();export{FO as $,NO as A,VO as B,Bg as C,IO as D,TO as E,kO as F,LO as G,EO as H,Be as I,xO as J,KO as K,WO as L,YC as M,BO as N,DC as O,qe as P,nk as Q,ie as R,gv as S,kv as T,pv as U,er as V,$O as W,Hc as X,OO as Y,RO as Z,bO as _,QS as a,jO as a0,zO as a1,UO as a2,Yc as a3,H2 as a4,Rr as a5,MO as a6,MC as a7,AO as a8,HO as a9,Wo as aa,eu as ab,nx as ac,se as ad,SO as ae,xx as af,Sx as ag,Ox as ah,As as ai,ou as aj,Ax as ak,so as al,al as b,Ho as c,DO as d,xr as e,wu as f,Uc as g,h_ as h,wp as i,C as j,Sp as k,v_ as l,_O as m,j2 as n,fp as o,No as p,PO as q,v as r,QO as s,CO as t,Ao as u,qx as v,oC as w,V2 as x,ov as y,_C as z}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index-454097a7.css b/FILES/etc/config/clash/clash-dashboard/assets/index-454097a7.css new file mode 100644 index 0000000..00f023e --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/index-454097a7.css @@ -0,0 +1 @@ +@charset "UTF-8";.relative,.border-left,.border-top,.border-bottom{position:relative}.border-bottom:after,.border-top:before{position:absolute;content:"";height:1px;width:100%;transform:scaleY(.5) translateZ(0);left:0;right:0;background:#555}.border-left:before{position:absolute;content:"";height:100%;width:1px;transform:scaleX(.5) translateZ(0);top:0;bottom:0;background:#555}.border-top:before{top:0}.border-bottom:after{bottom:0}.border-left:before{left:0}*,*:before,*:after{box-sizing:border-box}:root{--font-mono: "Roboto Mono", Menlo, monospace;--font-normal: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Apple Color Emoji, Twemoji Country Flags, Segoe UI Emoji, Segoe UI Symbol, "PingFang SC", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;--color-focus-blue: #1a73e8;--btn-bg: #387cec}body{font-family:var(--font-normal);-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;padding:0}@media (prefers-color-scheme: dark){:root[data-theme=auto]{--color-background: #202020;--color-background2: rgba(32, 32, 32, .3);--color-bg-card: #2d2d2d;--card-hover-border-lightness: 30%;--color-text: #ddd;--color-text-secondary: #ccc;--color-text-highlight: #fff;--color-bg-sidebar: #2d2d30;--color-input-bg: #2d2d30;--color-input-border: #3f3f3f;--color-toggle-bg: #353535;--color-toggle-selected: #181818;--color-icon: #c7c7c7;--color-separator: #333;--color-btn-bg: #232323;--color-btn-fg: #bebebe;--color-bg-proxy: #303030;--color-row-odd: #333;--bg-log-info-tag: #454545;--bg-modal: #1f1f20;--bg-near-transparent: rgba(255, 255, 255, .1);--bg-tooltip: #111;--bc-tooltip: #555;--select-border-color: #040404;--select-bg-hover: url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);--color-proxy-dot-selected-ind-bo: transparent;--bg-toggle-track: #393939;color-scheme:dark}}@media (prefers-color-scheme: light){:root[data-theme=auto]{--color-background: #eee;--color-background2: rgba(240, 240, 240, .3);--color-bg-card: #fafafa;--card-hover-border-lightness: 80%;--color-text: #222;--color-text-secondary: #646464;--color-text-highlight: #040404;--color-bg-sidebar: #f8f8f8;--color-input-bg: #f0f0f0;--color-input-border: #c0c0c0;--color-toggle-bg: #ffffff;--color-toggle-selected: #d7d7d7;--color-icon: #5b5b5b;--color-separator: #ccc;--color-btn-bg: #f4f4f4;--color-btn-fg: #101010;--color-bg-proxy: #fafafa;--color-row-odd: #e1e1e1;--bg-log-info-tag: #888;--bg-modal: #fbfbfb;--bg-near-transparent: rgba(0, 0, 0, .1);--bg-tooltip: #f0f0f0;--bc-tooltip: #ccc;--select-border-color: #999999;--select-bg-hover: url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23222222%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23222222%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);--color-proxy-dot-selected-ind-bo: #888;--bg-toggle-track: #d0d0d0;color-scheme:light}}:root[data-theme=dark]{--color-background: #202020;--color-background2: rgba(32, 32, 32, .3);--color-bg-card: #2d2d2d;--card-hover-border-lightness: 30%;--color-text: #ddd;--color-text-secondary: #ccc;--color-text-highlight: #fff;--color-bg-sidebar: #2d2d30;--color-input-bg: #2d2d30;--color-input-border: #3f3f3f;--color-toggle-bg: #353535;--color-toggle-selected: #181818;--color-icon: #c7c7c7;--color-separator: #333;--color-btn-bg: #232323;--color-btn-fg: #bebebe;--color-bg-proxy: #303030;--color-row-odd: #333;--bg-log-info-tag: #454545;--bg-modal: #1f1f20;--bg-near-transparent: rgba(255, 255, 255, .1);--bg-tooltip: #111;--bc-tooltip: #555;--select-border-color: #040404;--select-bg-hover: url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);--color-proxy-dot-selected-ind-bo: transparent;--bg-toggle-track: #393939;color-scheme:dark}:root[data-theme=light]{--color-background: #eee;--color-background2: rgba(240, 240, 240, .3);--color-bg-card: #fafafa;--card-hover-border-lightness: 80%;--color-text: #222;--color-text-secondary: #646464;--color-text-highlight: #040404;--color-bg-sidebar: #f8f8f8;--color-input-bg: #f0f0f0;--color-input-border: #c0c0c0;--color-toggle-bg: #ffffff;--color-toggle-selected: #d7d7d7;--color-icon: #5b5b5b;--color-separator: #ccc;--color-btn-bg: #f4f4f4;--color-btn-fg: #101010;--color-bg-proxy: #fafafa;--color-row-odd: #e1e1e1;--bg-log-info-tag: #888;--bg-modal: #fbfbfb;--bg-near-transparent: rgba(0, 0, 0, .1);--bg-tooltip: #f0f0f0;--bc-tooltip: #ccc;--select-border-color: #999999;--select-bg-hover: url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23222222%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23222222%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);--color-proxy-dot-selected-ind-bo: #888;--bg-toggle-track: #d0d0d0;color-scheme:light}:root[data-theme=dark] .pureBlackDark{--color-background: #000000;--color-input-bg: #111111;--color-background2: rgba(0, 0, 0, .3);--color-bg-card: #1c1c1c}@media (prefers-color-scheme: dark){:root[data-theme=auto] .pureBlackDark{--color-background: #000000;--color-input-bg: #111111;--color-background2: rgba(0, 0, 0, .3);--color-bg-card: #1c1c1c}}.flexCenter{display:flex;align-items:center;justify-content:center}.fabgrp{position:fixed;z-index:3;right:20px;bottom:20px}.visually-hidden{position:absolute;overflow:hidden;clip:rect(0 0 0 0);width:1px;height:1px;margin:-1px;border:0;padding:0}:root{--reach-tooltip: 1}[data-reach-tooltip]{z-index:1;pointer-events:none;position:absolute;padding:.25em .5em;box-shadow:2px 2px 10px #0000001a;white-space:nowrap;font-size:85%;background:var(--bg-tooltip);color:var(--color-text);border:solid 1px var(--bc-tooltip);border-radius:4px}._root_5bosw_1{height:76px;display:flex;align-items:center}._h1_5bosw_7{padding:0 15px;font-size:1.7em;text-align:left;margin:0}@media screen and (min-width: 30em){._h1_5bosw_7{padding:0 40px;font-size:2em}}._root_1392e_1{padding:6px 15px}@media screen and (min-width: 30em){._root_1392e_1{padding:10px 40px}}._mono_1392e_10{font-family:var(--font-mono)}._link_1392e_14{color:var(--color-text-secondary);display:inline-flex}._link_1392e_14:hover{color:var(--color-text-highlight)}._loading_74j3j_1{width:100%;height:100%;display:flex;justify-content:center;align-items:center}._spinner_74j3j_9{width:20px;height:20px;display:inline-block;vertical-align:middle;animation:_rotate_74j3j_1 1s steps(12,end) infinite;background:transparent url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E") no-repeat;background-size:100%}@keyframes _rotate_74j3j_1{0%{transform:rotate3d(0,0,1,0)}to{transform:rotate3d(0,0,1,360deg)}}._root_4m2cd_1{position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden;padding:20px;background:var(--color-background);color:var(--color-text);text-align:center}._yacd_4m2cd_14{color:#2a477a;opacity:.6;display:flex;justify-content:center;align-items:center;padding:40px}._link_4m2cd_23{display:inline-flex;align-items:center;color:var(--color-text-secondary)}._link_4m2cd_23:hover,._link_4m2cd_23:active{color:#387cec}._link_4m2cd_23 svg{margin-right:5px}._path_r8pm3_1{stroke-dasharray:890;stroke-dashoffset:890;animation:_dash_r8pm3_1 3s ease-in-out forwards normal infinite}@keyframes _dash_r8pm3_1{0%{stroke-dashoffset:890}to{stroke-dashoffset:0}}._root_4oasi_1{padding:6px 15px}@media screen and (min-width: 30em){._root_4oasi_1{padding:10px 40px}}._chart_4oasi_10{margin-top:15px}._TrafficNow_hzna1_1{color:var(--color-text);display:flex;align-items:center;flex-wrap:wrap;display:grid;grid-template-columns:repeat(auto-fit,180px);grid-gap:10px}._TrafficNow_hzna1_1 ._sec_hzna1_10{padding:10px;background-color:var(--color-bg-card);border-radius:10px;box-shadow:0 1px 5px #0000001a}._TrafficNow_hzna1_1 ._sec_hzna1_10 div:nth-child(1){color:var(--color-text-secondary);font-size:.7em}._TrafficNow_hzna1_1 ._sec_hzna1_10 div:nth-child(2){padding:10px 0 0;font-size:1.8em}._lo_pmly2_1{opacity:.5;width:100%;height:100%;display:flex;justify-content:center;align-items:center}._app_1s3k7_1{position:fixed;top:0;bottom:0;left:0;right:0;display:flex;align-items:stretch;background:var(--color-background);color:var(--color-text)}@media (max-width: 768px){._app_1s3k7_1{flex-direction:column}}._content_1s3k7_18{flex-grow:1;overflow:auto}[data-reach-menu-button]{--sz: 40px;width:var(--sz);height:var(--sz);display:inline-flex;align-items:center;justify-content:center;-webkit-appearance:none;outline:none;-webkit-user-select:none;user-select:none;cursor:pointer;color:var(--color-btn-fg);background:none;border:1px solid transparent;border-radius:20px}[data-reach-menu-button]:hover{opacity:.6}[data-reach-menu-button]:focus{border-color:var(--color-focus-blue)}[data-reach-menu-list]{background:var(--bg-tooltip);color:var(--color-text);border:1px solid #555;padding:4px;border-radius:8px}[data-reach-menu-item]{padding:5px 16px 5px 6px;border-radius:7px;cursor:pointer;display:flex;align-items:center}[data-reach-menu-item][data-selected]{background:var(--color-focus-blue);color:#f7f7f7}._checkWrapper_1nrct_45{display:inline-flex;align-items:center;margin-right:2px;visibility:hidden}._checkWrapper_1nrct_45._active_1nrct_51{visibility:visible}._root_r8ke8_1{display:flex;flex-direction:column;padding:8px}@media (max-width: 768px){._root_r8ke8_1{padding:0}}._logoPlaceholder_r8ke8_12{height:15px}@media (max-width: 768px){._logoPlaceholder_r8ke8_12{display:none}}._rows_r8ke8_21{flex:1}@media (max-width: 768px){._rows_r8ke8_21{display:flex;justify-content:space-between;overflow:auto}}._row_r8ke8_21{color:var(--color-text);text-decoration:none;border-radius:1000px;display:flex;align-items:center;padding:6px 16px}@media screen and (min-width: 30em){._row_r8ke8_21{padding:8px 20px}}@media (max-width: 768px){._row_r8ke8_21{border-radius:0}}@media (max-width: 768px){._row_r8ke8_21{flex-direction:column}}._row_r8ke8_21 svg{color:var(--color-icon);width:22px;height:22px}@media screen and (min-width: 30em){._row_r8ke8_21 svg{width:24px;height:24px}}._rowActive_r8ke8_68{--bg: hsla(217deg, 83%, 57%, .2);--fg: hsl(217deg 83% 57%);color:var(--fg);background:var(--bg)}@media (max-width: 768px){._rowActive_r8ke8_68{background:none}}._label_r8ke8_80{padding-left:14px;font-size:.75em;white-space:nowrap}@media (max-width: 768px){._label_r8ke8_80{padding-left:0;padding-top:5px}}@media screen and (min-width: 30em){._label_r8ke8_80{font-size:1em}}._footer_r8ke8_97{display:flex;flex-direction:column;align-items:center}@media (max-width: 768px){._footer_r8ke8_97{display:none}}._iconWrapper_r8ke8_108{--sz: 40px;width:var(--sz);height:var(--sz);display:flex;justify-content:center;align-items:center;outline:none;padding:5px;color:var(--color-text);border-radius:100%;border:1px solid transparent}._iconWrapper_r8ke8_108:hover{opacity:.6}._iconWrapper_r8ke8_108:focus{border-color:var(--color-focus-blue)}._btn_lzu00_1{-webkit-appearance:none;outline:none;-webkit-user-select:none;user-select:none;position:relative;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:var(--color-btn-fg);background:var(--color-btn-bg);border:1px solid #555;border-radius:100px;padding:10px 13px}._btn_lzu00_1:focus{border-color:var(--color-focus-blue)}._btn_lzu00_1:hover{background:#387cec;border:1px solid #387cec;color:#fff}._btn_lzu00_1:active{transform:scale(.97)}._btn_lzu00_1._circular_lzu00_27{padding:8px}._btn_lzu00_1._minimal_lzu00_30{border-color:transparent;background:none;padding:6px 12px}._btn_lzu00_1._minimal_lzu00_30:focus{border-color:var(--color-focus-blue)}._btn_lzu00_1._minimal_lzu00_30:hover{color:#fff;background:#387cec;border:1px solid #387cec}._btn_lzu00_1:disabled{opacity:.5}._btnStart_lzu00_48{margin-right:5px;display:inline-flex;align-items:center;justify-content:center}._loadingContainer_lzu00_55{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:inline-flex}h2._sectionNameType_1b9pp_1{margin:0;font-size:1.3em}@media screen and (min-width: 30em){h2._sectionNameType_1b9pp_1{font-size:1.5em}}h2._sectionNameType_1b9pp_1 span:nth-child(2){font-size:12px;color:#777;font-weight:400;margin:0 .3em}:root[data-theme=light]{--loading-dot-1-1: rgba(0, 0, 0, .1);--loading-dot-1-2: rgba(0, 0, 0, .5);--loading-dot-1-3: rgba(0, 0, 0, .3);--loading-dot-2-1: rgba(0, 0, 0, .3);--loading-dot-2-2: rgba(0, 0, 0, .1);--loading-dot-2-3: rgba(0, 0, 0, .5);--loading-dot-3-1: rgba(0, 0, 0, .5);--loading-dot-3-2: rgba(0, 0, 0, .3);--loading-dot-3-3: rgba(0, 0, 0, .1)}:root[data-theme=dark]{--loading-dot-1-1: rgba(255, 255, 255, .5);--loading-dot-1-2: rgba(255, 255, 255, .1);--loading-dot-1-3: rgba(255, 255, 255, .3);--loading-dot-2-1: rgba(255, 255, 255, .3);--loading-dot-2-2: rgba(255, 255, 255, .5);--loading-dot-2-3: rgba(255, 255, 255, .1);--loading-dot-3-1: rgba(255, 255, 255, .1);--loading-dot-3-2: rgba(255, 255, 255, .3);--loading-dot-3-3: rgba(255, 255, 255, .5)}._loadingDot_1b9pp_66,._loadingDot_1b9pp_66:before,._loadingDot_1b9pp_66:after{display:inline-block;vertical-align:middle;width:6px;height:6px;border-radius:50%;font-size:0}._loadingDot_1b9pp_66{position:relative;background-color:var(--loading-dot-2-1);animation:_dot2_1b9pp_1 1s step-start infinite}._loadingDot_1b9pp_66:before{content:"";position:absolute;left:-12px;background-color:var(--loading-dot-1-1);animation:_dot1_1b9pp_1 1s step-start infinite}._loadingDot_1b9pp_66:after{content:"";position:absolute;right:-12px;background-color:var(--loading-dot-3-1);animation:_dot3_1b9pp_1 1s step-start infinite}@keyframes _dot1_1b9pp_1{0%,to{background-color:var(--loading-dot-1-1)}33%{background-color:var(--loading-dot-1-2)}66%{background-color:var(--loading-dot-1-3)}}@keyframes _dot2_1b9pp_1{0%,to{background-color:var(--loading-dot-2-1)}33%{background-color:var(--loading-dot-2-2)}66%{background-color:var(--loading-dot-2-3)}}@keyframes _dot3_1b9pp_1{0%,to{background-color:var(--loading-dot-3-1)}33%{background-color:var(--loading-dot-3-2)}66%{background-color:var(--loading-dot-3-3)}}._toggle_g6vyf_1{--height: 28px;--width: 44px;--knob-size: 24px;display:inline-flex;align-items:center;cursor:pointer;position:relative;width:var(--width);height:var(--height)}._toggle_g6vyf_1 ._input_g6vyf_12{opacity:0;width:0}._toggle_g6vyf_1 ._input_g6vyf_12:checked+._track_g6vyf_16{background-color:#047aff}._toggle_g6vyf_1 ._input_g6vyf_12:checked+._track_g6vyf_16:before{transform:translate(calc(var(--width) - var(--height)))}._toggle_g6vyf_1 ._input_g6vyf_12:disabled+._track_g6vyf_16{opacity:.8;cursor:not-allowed}._toggle_g6vyf_1 ._input_g6vyf_12:focus-visible+._track_g6vyf_16{outline:solid 1px var(--color-focus-blue);outline-offset:2px}._toggle_g6vyf_1 ._track_g6vyf_16{width:var(--width);height:var(--height);position:absolute;cursor:pointer;top:0;left:0;bottom:0;transition:transform .15s,background-color .15s;background:var(--bg-toggle-track);border-radius:100px;border-width:1px}._toggle_g6vyf_1 ._track_g6vyf_16:before{position:absolute;content:"";width:var(--knob-size);height:var(--knob-size);background-color:#fff;transition:all .4s;border-radius:100%;top:calc((var(--height) - var(--knob-size)) / 2);left:calc((var(--height) - var(--knob-size)) / 2)}._input_1hkb4_1{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:4px;border:1px solid var(--color-input-border);box-sizing:border-box;color:inherit;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 8px;width:100%}._input_1hkb4_1:focus{box-shadow:#4299e199 0 0 0 3px}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}._animate_1w0e8_1{--saturation: 70%;stroke:hsl(46deg,var(--saturation),45%);transform:scale(1);animation:_zap-pulse_1w0e8_1 .7s 0s ease-in-out none normal infinite}@keyframes _zap-pulse_1w0e8_1{0%{stroke:hsl(46deg,var(--saturation),45%);transform:scale(1)}50%{stroke:hsl(46deg,var(--saturation),95%);transform:scale(1.1)}to{stroke:hsl(46deg,var(--saturation),45%);transform:scale(1)}}._ToggleSwitch_10mtp_1{-webkit-user-select:none;user-select:none;border-radius:4px;border:1px solid #525252;color:var(--color-text);background:var(--color-toggle-bg);display:flex;position:relative;outline:none}._ToggleSwitch_10mtp_1:focus{border-color:var(--color-focus-blue)}._ToggleSwitch_10mtp_1 input{position:absolute;left:0;opacity:0}._ToggleSwitch_10mtp_1 label{z-index:2;display:flex;align-items:center;justify-content:center;padding:10px 0;cursor:pointer}._slider_10mtp_28{z-index:1;position:absolute;display:block;left:0;height:100%;transition:left .2s ease-out;background:var(--color-toggle-selected)} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index-778e0b6c.js b/FILES/etc/config/clash/clash-dashboard/assets/index-4bcbc835.js similarity index 99% rename from FILES/etc/config/clash/clash-dashboard/assets/index-778e0b6c.js rename to FILES/etc/config/clash/clash-dashboard/assets/index-4bcbc835.js index ec6f4d1..7b7ae56 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/index-778e0b6c.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/index-4bcbc835.js @@ -1 +1 @@ -import{ao as x}from"./index-c925a4cb.js";function h(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function s(e){h(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||x(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}var C={};function A(){return C}function P(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function M(e,t){h(2,arguments);var a=s(e),n=s(t),i=a.getTime()-n.getTime();return i<0?-1:i>0?1:i}function X(e,t){h(2,arguments);var a=s(e),n=s(t),i=a.getFullYear()-n.getFullYear(),o=a.getMonth()-n.getMonth();return i*12+o}function _(e,t){return h(2,arguments),s(e).getTime()-s(t).getTime()}var S={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},I="trunc";function j(e){return e?S[e]:S[I]}function R(e){h(1,arguments);var t=s(e);return t.setHours(23,59,59,999),t}function E(e){h(1,arguments);var t=s(e),a=t.getMonth();return t.setFullYear(t.getFullYear(),a+1,0),t.setHours(23,59,59,999),t}function Y(e){h(1,arguments);var t=s(e);return R(t).getTime()===E(t).getTime()}function z(e,t){h(2,arguments);var a=s(e),n=s(t),i=M(a,n),o=Math.abs(X(a,n)),r;if(o<1)r=0;else{a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-i*o);var l=M(a,n)===-i;Y(s(e))&&o===1&&M(e,n)===1&&(l=!1),r=i*(o-Number(l))}return r===0?0:r}function L(e,t,a){h(2,arguments);var n=_(e,t)/1e3;return j(a==null?void 0:a.roundingMethod)(n)}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},q=function(t,a,n){var i,o=V[t];return typeof o=="string"?i=o:a===1?i=o.one:i=o.other.replace("{{count}}",a.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};const H=q;function w(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=t.width?String(t.width):e.defaultWidth,n=e.formats[a]||e.formats[e.defaultWidth];return n}}var J={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},U={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Q={date:w({formats:J,defaultWidth:"full"}),time:w({formats:U,defaultWidth:"full"}),dateTime:w({formats:$,defaultWidth:"full"})};const B=Q;var G={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},K=function(t,a,n,i){return G[t]};const Z=K;function g(e){return function(t,a){var n=a!=null&&a.context?String(a.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,r=a!=null&&a.width?String(a.width):o;i=e.formattingValues[r]||e.formattingValues[o]}else{var l=e.defaultWidth,u=a!=null&&a.width?String(a.width):e.defaultWidth;i=e.values[u]||e.values[l]}var f=e.argumentCallback?e.argumentCallback(t):t;return i[f]}}var ee={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},te={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ae={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ne={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},re={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ie={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},oe=function(t,a){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ue={ordinalNumber:oe,era:g({values:ee,defaultWidth:"wide"}),quarter:g({values:te,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:g({values:ae,defaultWidth:"wide"}),day:g({values:ne,defaultWidth:"wide"}),dayPeriod:g({values:re,defaultWidth:"wide",formattingValues:ie,defaultFormattingWidth:"wide"})};const se=ue;function b(e){return function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var r=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?de(l,function(m){return m.test(r)}):le(l,function(m){return m.test(r)}),f;f=e.valueCallback?e.valueCallback(u):u,f=a.valueCallback?a.valueCallback(f):f;var c=t.slice(r.length);return{value:f,rest:c}}}function le(e,t){for(var a in e)if(e.hasOwnProperty(a)&&t(e[a]))return a}function de(e,t){for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],o=t.match(e.parsePattern);if(!o)return null;var r=e.valueCallback?e.valueCallback(o[0]):o[0];r=a.valueCallback?a.valueCallback(r):r;var l=t.slice(i.length);return{value:r,rest:l}}}var me=/^(\d+)(th|st|nd|rd)?/i,he=/\d+/i,ce={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ve={any:[/^b/i,/^(a|c)/i]},ge={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},be={any:[/1/i,/2/i,/3/i,/4/i]},Me={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ye={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},we={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},pe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},De={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Pe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Se={ordinalNumber:fe({matchPattern:me,parsePattern:he,valueCallback:function(t){return parseInt(t,10)}}),era:b({matchPatterns:ce,defaultMatchWidth:"wide",parsePatterns:ve,defaultParseWidth:"any"}),quarter:b({matchPatterns:ge,defaultMatchWidth:"wide",parsePatterns:be,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:b({matchPatterns:Me,defaultMatchWidth:"wide",parsePatterns:ye,defaultParseWidth:"any"}),day:b({matchPatterns:we,defaultMatchWidth:"wide",parsePatterns:pe,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:De,defaultMatchWidth:"any",parsePatterns:Pe,defaultParseWidth:"any"})};const Te=Se;var We={code:"en-US",formatDistance:H,formatLong:B,formatRelative:Z,localize:se,match:Te,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Ne=We;function W(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}function ke(e){return W({},e)}var T=1440,Oe=2520,p=43200,Fe=86400;function Ce(e,t,a){var n,i;h(2,arguments);var o=A(),r=(n=(i=a==null?void 0:a.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:Ne;if(!r.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=M(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var u=W(ke(a),{addSuffix:!!(a!=null&&a.addSuffix),comparison:l}),f,c;l>0?(f=s(t),c=s(e)):(f=s(e),c=s(t));var m=L(c,f),N=(P(c)-P(f))/1e3,d=Math.round((m-N)/60),v;if(d<2)return a!=null&&a.includeSeconds?m<5?r.formatDistance("lessThanXSeconds",5,u):m<10?r.formatDistance("lessThanXSeconds",10,u):m<20?r.formatDistance("lessThanXSeconds",20,u):m<40?r.formatDistance("halfAMinute",0,u):m<60?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",1,u):d===0?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",d,u);if(d<45)return r.formatDistance("xMinutes",d,u);if(d<90)return r.formatDistance("aboutXHours",1,u);if(d1?"s":"")+" required, but only "+t.length+" present")}function s(e){h(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||x(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}var C={};function A(){return C}function P(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function M(e,t){h(2,arguments);var a=s(e),n=s(t),i=a.getTime()-n.getTime();return i<0?-1:i>0?1:i}function X(e,t){h(2,arguments);var a=s(e),n=s(t),i=a.getFullYear()-n.getFullYear(),o=a.getMonth()-n.getMonth();return i*12+o}function _(e,t){return h(2,arguments),s(e).getTime()-s(t).getTime()}var S={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},I="trunc";function j(e){return e?S[e]:S[I]}function R(e){h(1,arguments);var t=s(e);return t.setHours(23,59,59,999),t}function E(e){h(1,arguments);var t=s(e),a=t.getMonth();return t.setFullYear(t.getFullYear(),a+1,0),t.setHours(23,59,59,999),t}function Y(e){h(1,arguments);var t=s(e);return R(t).getTime()===E(t).getTime()}function z(e,t){h(2,arguments);var a=s(e),n=s(t),i=M(a,n),o=Math.abs(X(a,n)),r;if(o<1)r=0;else{a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-i*o);var l=M(a,n)===-i;Y(s(e))&&o===1&&M(e,n)===1&&(l=!1),r=i*(o-Number(l))}return r===0?0:r}function L(e,t,a){h(2,arguments);var n=_(e,t)/1e3;return j(a==null?void 0:a.roundingMethod)(n)}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},q=function(t,a,n){var i,o=V[t];return typeof o=="string"?i=o:a===1?i=o.one:i=o.other.replace("{{count}}",a.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};const H=q;function w(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=t.width?String(t.width):e.defaultWidth,n=e.formats[a]||e.formats[e.defaultWidth];return n}}var J={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},U={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Q={date:w({formats:J,defaultWidth:"full"}),time:w({formats:U,defaultWidth:"full"}),dateTime:w({formats:$,defaultWidth:"full"})};const B=Q;var G={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},K=function(t,a,n,i){return G[t]};const Z=K;function g(e){return function(t,a){var n=a!=null&&a.context?String(a.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,r=a!=null&&a.width?String(a.width):o;i=e.formattingValues[r]||e.formattingValues[o]}else{var l=e.defaultWidth,u=a!=null&&a.width?String(a.width):e.defaultWidth;i=e.values[u]||e.values[l]}var f=e.argumentCallback?e.argumentCallback(t):t;return i[f]}}var ee={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},te={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ae={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ne={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},re={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ie={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},oe=function(t,a){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ue={ordinalNumber:oe,era:g({values:ee,defaultWidth:"wide"}),quarter:g({values:te,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:g({values:ae,defaultWidth:"wide"}),day:g({values:ne,defaultWidth:"wide"}),dayPeriod:g({values:re,defaultWidth:"wide",formattingValues:ie,defaultFormattingWidth:"wide"})};const se=ue;function b(e){return function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var r=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?de(l,function(m){return m.test(r)}):le(l,function(m){return m.test(r)}),f;f=e.valueCallback?e.valueCallback(u):u,f=a.valueCallback?a.valueCallback(f):f;var c=t.slice(r.length);return{value:f,rest:c}}}function le(e,t){for(var a in e)if(e.hasOwnProperty(a)&&t(e[a]))return a}function de(e,t){for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],o=t.match(e.parsePattern);if(!o)return null;var r=e.valueCallback?e.valueCallback(o[0]):o[0];r=a.valueCallback?a.valueCallback(r):r;var l=t.slice(i.length);return{value:r,rest:l}}}var me=/^(\d+)(th|st|nd|rd)?/i,he=/\d+/i,ce={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ve={any:[/^b/i,/^(a|c)/i]},ge={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},be={any:[/1/i,/2/i,/3/i,/4/i]},Me={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ye={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},we={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},pe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},De={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Pe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Se={ordinalNumber:fe({matchPattern:me,parsePattern:he,valueCallback:function(t){return parseInt(t,10)}}),era:b({matchPatterns:ce,defaultMatchWidth:"wide",parsePatterns:ve,defaultParseWidth:"any"}),quarter:b({matchPatterns:ge,defaultMatchWidth:"wide",parsePatterns:be,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:b({matchPatterns:Me,defaultMatchWidth:"wide",parsePatterns:ye,defaultParseWidth:"any"}),day:b({matchPatterns:we,defaultMatchWidth:"wide",parsePatterns:pe,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:De,defaultMatchWidth:"any",parsePatterns:Pe,defaultParseWidth:"any"})};const Te=Se;var We={code:"en-US",formatDistance:H,formatLong:B,formatRelative:Z,localize:se,match:Te,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Ne=We;function W(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}function ke(e){return W({},e)}var T=1440,Oe=2520,p=43200,Fe=86400;function Ce(e,t,a){var n,i;h(2,arguments);var o=A(),r=(n=(i=a==null?void 0:a.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:Ne;if(!r.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=M(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var u=W(ke(a),{addSuffix:!!(a!=null&&a.addSuffix),comparison:l}),f,c;l>0?(f=s(t),c=s(e)):(f=s(e),c=s(t));var m=L(c,f),N=(P(c)-P(f))/1e3,d=Math.round((m-N)/60),v;if(d<2)return a!=null&&a.includeSeconds?m<5?r.formatDistance("lessThanXSeconds",5,u):m<10?r.formatDistance("lessThanXSeconds",10,u):m<20?r.formatDistance("lessThanXSeconds",20,u):m<40?r.formatDistance("halfAMinute",0,u):m<60?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",1,u):d===0?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",d,u);if(d<45)return r.formatDistance("xMinutes",d,u);if(d<90)return r.formatDistance("aboutXHours",1,u);if(dt,isStatic:!1,reducedMotion:"never"}),Xt=m.createContext({}),Yt=m.createContext(null),Pe=typeof document<"u",xt=Pe?m.useLayoutEffect:m.useEffect,mn=m.createContext({strict:!1});function no(t,e,n,s){const{visualElement:i}=m.useContext(Xt),o=m.useContext(mn),r=m.useContext(Yt),a=m.useContext(at).reducedMotion,c=m.useRef();s=s||o.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:i,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const u=c.current;m.useInsertionEffect(()=>{u&&u.update(n,r)});const l=m.useRef(!!window.HandoffAppearAnimations);return xt(()=>{u&&(u.render(),l.current&&u.animationState&&u.animationState.animateChanges())}),m.useEffect(()=>{u&&(u.updateFeatures(),!l.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,l.current=!1)}),u}function bt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function so(t,e,n){return m.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):bt(n)&&(n.current=s))},[e])}function Wt(t){return typeof t=="string"||Array.isArray(t)}function Te(t){return typeof t=="object"&&typeof t.start=="function"}const pn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gn=["initial",...pn];function be(t){return Te(t.animate)||gn.some(e=>Wt(t[e]))}function li(t){return!!(be(t)||t.variants)}function io(t,e){if(be(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Wt(n)?n:void 0,animate:Wt(s)?s:void 0}}return t.inherit!==!1?e:{}}function ro(t){const{initial:e,animate:n}=io(t,m.useContext(Xt));return m.useMemo(()=>({initial:e,animate:n}),[qn(e),qn(n)])}function qn(t){return Array.isArray(t)?t.join(" "):t}const Zn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ht={};for(const t in Zn)Ht[t]={isEnabled:e=>Zn[t].some(n=>!!e[n])};function Ke(t){for(const e in t)Ht[e]={...Ht[e],...t[e]}}const Gt=m.createContext({}),fi=m.createContext({}),yn=Symbol.for("motionComponentSymbol");function hi({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Ke(t);function o(a,c){let u;const l={...m.useContext(at),...a,layoutId:oo(a)},{isStatic:f}=l,h=ro(a),d=s(a,f);if(!f&&Pe){h.visualElement=no(i,d,l,e);const p=m.useContext(fi),y=m.useContext(mn).strict;h.visualElement&&(u=h.visualElement.loadFeatures(l,y,t,p))}return m.createElement(Xt.Provider,{value:h},u&&h.visualElement?m.createElement(u,{visualElement:h.visualElement,...l}):null,n(i,a,so(d,h.visualElement,c),d,f,h.visualElement))}const r=m.forwardRef(o);return r[yn]=i,r}function oo({layoutId:t}){const e=m.useContext(Gt).id;return e&&t!==void 0?e+"-"+t:t}function di(t){function e(s,i={}){return hi(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const ao=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function vn(t){return typeof t!="string"||t.includes("-")?!1:!!(ao.indexOf(t)>-1||/[A-Z]/.test(t))}const le={};function co(t){Object.assign(le,t)}const qt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],J=new Set(qt);function mi(t,{layout:e,layoutId:n}){return J.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!le[t]||t==="opacity")}const k=t=>!!(t&&t.getVelocity),uo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lo=qt.length;function fo(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;re=>typeof e=="string"&&e.startsWith(t),xn=pi("--"),_e=pi("var(--"),ho=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,mo=(t,e)=>e&&typeof t=="number"?e.transform(t):t,ct=(t,e,n)=>Math.min(Math.max(n,t),e),Pt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},kt={...Pt,transform:t=>ct(0,1,t)},se={...Pt,default:1},Ot=t=>Math.round(t*1e5)/1e5,Se=/(-)?([\d]*\.?[\d])+/g,gi=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,po=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Zt(t){return typeof t=="string"}const Jt=t=>({test:e=>Zt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=Jt("deg"),Z=Jt("%"),S=Jt("px"),go=Jt("vh"),yo=Jt("vw"),Jn={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},Qn={...Pt,transform:Math.round},yi={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,size:S,top:S,right:S,bottom:S,left:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:se,scaleX:se,scaleY:se,scaleZ:se,skew:st,skewX:st,skewY:st,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:kt,originX:Jn,originY:Jn,originZ:S,zIndex:Qn,fillOpacity:kt,strokeOpacity:kt,numOctaves:Qn};function Pn(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let c=!1,u=!1,l=!0;for(const f in e){const h=e[f];if(xn(f)){o[f]=h;continue}const d=yi[f],p=mo(h,d);if(J.has(f)){if(c=!0,r[f]=p,!l)continue;h!==(d.default||0)&&(l=!1)}else f.startsWith("origin")?(u=!0,a[f]=p):i[f]=p}if(e.transform||(c||s?i.transform=fo(t.transform,n,l,s):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:h="50%",originZ:d=0}=a;i.transformOrigin=`${f} ${h} ${d}`}}const Tn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vi(t,e,n){for(const s in e)!k(e[s])&&!mi(s,n)&&(t[s]=e[s])}function vo({transformTemplate:t},e,n){return m.useMemo(()=>{const s=Tn();return Pn(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function xo(t,e,n){const s=t.style||{},i={};return vi(i,s,t),Object.assign(i,vo(t,e,n)),t.transformValues?t.transformValues(i):i}function Po(t,e,n){const s={},i=xo(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const To=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function fe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||To.has(t)}let xi=t=>!fe(t);function Pi(t){t&&(xi=e=>e.startsWith("on")?!fe(e):t(e))}try{Pi(require("@emotion/is-prop-valid").default)}catch{}function bo(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(xi(i)||n===!0&&fe(i)||!e&&!fe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function ts(t,e,n){return typeof t=="string"?t:S.transform(e+n*t)}function So(t,e,n){const s=ts(e,t.x,t.width),i=ts(n,t.y,t.height);return`${s} ${i}`}const Ao={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vo={offset:"strokeDashoffset",array:"strokeDasharray"};function Co(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Ao:Vo;t[o.offset]=S.transform(-s);const r=S.transform(e),a=S.transform(n);t[o.array]=`${r} ${a}`}function bn(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:c=0,...u},l,f,h){if(Pn(t,u,l,h),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:y}=t;d.transform&&(y&&(p.transform=d.transform),delete d.transform),y&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=So(y,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&Co(d,r,a,c,!1)}const Ti=()=>({...Tn(),attrs:{}}),Sn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wo(t,e,n,s){const i=m.useMemo(()=>{const o=Ti();return bn(o,e,{enableHardwareAcceleration:!1},Sn(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};vi(o,t.style,t),i.style={...o,...i.style}}return i}function Mo(t=!1){return(n,s,i,{latestValues:o},r)=>{const c=(vn(n)?wo:Po)(s,o,r,n),l={...bo(s,typeof n=="string",t),...c,ref:i},{children:f}=s,h=m.useMemo(()=>k(f)?f.get():f,[f]);return m.createElement(n,{...l,children:h})}}const $t=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function bi(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Si=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ai(t,e,n,s){bi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Si.has(i)?i:$t(i),e.attrs[i])}function An(t,e){const{style:n}=t,s={};for(const i in n)(k(n[i])||e.style&&k(e.style[i])||mi(i,t))&&(s[i]=n[i]);return s}function Vi(t,e){const n=An(t,e);for(const s in t)if(k(t[s])||k(e[s])){const i=qt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[i]=t[s]}return n}function Vn(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function j(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const he=t=>Array.isArray(t),Do=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Eo=t=>he(t)?t[t.length-1]||0:t;function oe(t){const e=k(t)?t.get():t;return Do(e)?e.toValue():e}function Ro({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Lo(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Cn=t=>(e,n)=>{const s=m.useContext(Xt),i=m.useContext(Yt),o=()=>Ro(t,e,s,i);return n?o():j(o)};function Lo(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=oe(o[h]);let{initial:r,animate:a}=t;const c=be(t),u=li(t);e&&u&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||r===!1;const f=l?a:r;return f&&typeof f!="boolean"&&!Te(f)&&(Array.isArray(f)?f:[f]).forEach(d=>{const p=Vn(t,d);if(!p)return;const{transitionEnd:y,transition:x,...T}=p;for(const v in T){let g=T[v];if(Array.isArray(g)){const P=l?g.length-1:0;g=g[P]}g!==null&&(i[v]=g)}for(const v in y)i[v]=y[v]}),i}const L=t=>t;class es{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Bo(t){let e=new es,n=new es,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(c,u=!1,l=!1)=>{const f=l&&i,h=f?e:n;return u&&r.add(c),h.add(c)&&f&&i&&(s=e.order.length),c},cancel:c=>{n.remove(c),r.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let u=0;u(f[h]=Bo(()=>n=!0),f),{}),r=f=>o[f].process(i),a=()=>{const f=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(f-i.timestamp,Fo),1),i.timestamp=f,i.isProcessing=!0,Ft.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},c=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Ft.reduce((f,h)=>{const d=o[h];return f[h]=(p,y=!1,x=!1)=>(n||c(),d.schedule(p,y,x)),f},{}),cancel:f=>Ft.forEach(h=>o[h].cancel(f)),state:i,steps:o}}const{schedule:V,cancel:N,state:I,steps:Re}=Io(typeof requestAnimationFrame<"u"?requestAnimationFrame:L,!0),ko={useVisualState:Cn({scrapeMotionValuesFromProps:Vi,createRenderState:Ti,onMount:(t,e,{renderState:n,latestValues:s})=>{V.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),V.render(()=>{bn(n,s,{enableHardwareAcceleration:!1},Sn(e.tagName),t.transformTemplate),Ai(e,n)})}})},Oo={useVisualState:Cn({scrapeMotionValuesFromProps:An,createRenderState:Tn})};function wn(t,{forwardMotionProps:e=!1},n,s){return{...vn(t)?ko:Oo,preloadedFeatures:n,useRender:Mo(e),createVisualElement:s,Component:t}}function q(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ci=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Ae(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const jo=t=>e=>Ci(e)&&t(e,Ae(e));function tt(t,e,n,s){return q(t,e,jo(n),s)}const Uo=(t,e)=>n=>e(t(n)),ot=(...t)=>t.reduce(Uo);function wi(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const ns=wi("dragHorizontal"),ss=wi("dragVertical");function Mi(t){let e=!1;if(t==="y")e=ss();else if(t==="x")e=ns();else{const n=ns(),s=ss();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Di(){const t=Mi(!0);return t?(t(),!1):!0}class lt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function is(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End"),i=(o,r)=>{if(o.type==="touch"||Di())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[s]&&V.update(()=>a[s](o,r))};return tt(t.current,n,i,{passive:!t.getProps()[s]})}class No extends lt{mount(){this.unmount=ot(is(this.node,!0),is(this.node,!1))}unmount(){}}class zo extends lt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ot(q(this.node.current,"focus",()=>this.onFocus()),q(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ei=(t,e)=>e?t===e?!0:Ei(t,e.parentElement):!1;function Le(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Ae(n))}class Wo extends lt{constructor(){super(...arguments),this.removeStartListeners=L,this.removeEndListeners=L,this.removeAccessibleListeners=L,this.startPointerPress=(e,n)=>{if(this.removeEndListeners(),this.isPressing)return;const s=this.node.getProps(),o=tt(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:l}=this.node.getProps();V.update(()=>{Ei(this.node.current,a.target)?u&&u(a,c):l&&l(a,c)})},{passive:!(s.onTap||s.onPointerUp)}),r=tt(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=ot(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||Le("up",(c,u)=>{const{onTap:l}=this.node.getProps();l&&V.update(()=>l(c,u))})};this.removeEndListeners(),this.removeEndListeners=q(this.node.current,"keyup",r),Le("down",(a,c)=>{this.startPress(a,c)})},n=q(this.node.current,"keydown",e),s=()=>{this.isPressing&&Le("cancel",(o,r)=>this.cancelPress(o,r))},i=q(this.node.current,"blur",s);this.removeAccessibleListeners=ot(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&V.update(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Di()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&V.update(()=>s(e,n))}mount(){const e=this.node.getProps(),n=tt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=q(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ot(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Xe=new WeakMap,Be=new WeakMap,Ho=t=>{const e=Xe.get(t.target);e&&e(t)},Go=t=>{t.forEach(Ho)};function $o({root:t,...e}){const n=t||document;Be.has(n)||Be.set(n,{});const s=Be.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Go,{root:t,...e})),s[i]}function Ko(t,e,n){const s=$o(e);return Xe.set(t,n),s.observe(t),()=>{Xe.delete(t),s.unobserve(t)}}const _o={some:0,all:1};class Xo extends lt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:_o[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:l,onViewportLeave:f}=this.node.getProps(),h=u?l:f;h&&h(c)};return Ko(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Yo(e,n))&&this.startObserver()}unmount(){}}function Yo({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Ri={inView:{Feature:Xo},tap:{Feature:Wo},focus:{Feature:zo},hover:{Feature:No}};function Li(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;se[s]=n.get()),e}function Zo(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function Ve(t,e,n){const s=t.getProps();return Vn(s,e,n!==void 0?n:s.custom,qo(t),Zo(t))}const Bi="framerAppearId",Jo="data-"+$t(Bi);let Fi=L,Ce=L;const et=t=>t*1e3,_=t=>t/1e3,de={current:!1},Ii=t=>Array.isArray(t)&&typeof t[0]=="number";function ki(t){return!!(!t||typeof t=="string"&&Oi[t]||Ii(t)||Array.isArray(t)&&t.every(ki))}const It=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Oi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:It([0,.65,.55,1]),circOut:It([.55,0,1,.45]),backIn:It([.31,.01,.66,-.59]),backOut:It([.33,1.53,.69,.99])};function ji(t){if(t)return Ii(t)?It(t):Array.isArray(t)?t.map(ji):Oi[t]}function Ye(t,e,n,{delay:s=0,duration:i,repeat:o=0,repeatType:r="loop",ease:a,times:c}={}){const u={[e]:n};c&&(u.offset=c);const l=ji(a);return Array.isArray(l)&&(u.easing=l),t.animate(u,{delay:s,duration:i,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}function Qo(t,{repeat:e,repeatType:n="loop"}){const s=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[s]}const Ui=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ta=1e-7,ea=12;function na(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Ui(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>ta&&++ana(o,0,1,t,n);return o=>o===0||o===1?o:Ui(i(o),e,s)}const sa=Qt(.42,0,1,1),ia=Qt(0,0,.58,1),Ni=Qt(.42,0,.58,1),zi=t=>Array.isArray(t)&&typeof t[0]!="number",Wi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Hi=t=>e=>1-t(1-e),Gi=t=>1-Math.sin(Math.acos(t)),Mn=Hi(Gi),ra=Wi(Mn),$i=Qt(.33,1.53,.69,.99),Dn=Hi($i),oa=Wi(Dn),aa=t=>(t*=2)<1?.5*Dn(t):.5*(2-Math.pow(2,-10*(t-1))),ca={linear:L,easeIn:sa,easeInOut:Ni,easeOut:ia,circIn:Gi,circInOut:ra,circOut:Mn,backIn:Dn,backInOut:oa,backOut:$i,anticipate:aa},qe=t=>{if(Array.isArray(t)){Ce(t.length===4);const[e,n,s,i]=t;return Qt(e,n,s,i)}else if(typeof t=="string")return ca[t];return t},En=(t,e)=>n=>!!(Zt(n)&&po.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ki=(t,e,n)=>s=>{if(!Zt(s))return s;const[i,o,r,a]=s.match(Se);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ua=t=>ct(0,255,t),Fe={...Pt,transform:t=>Math.round(ua(t))},pt={test:En("rgb","red"),parse:Ki("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Fe.transform(t)+", "+Fe.transform(e)+", "+Fe.transform(n)+", "+Ot(kt.transform(s))+")"};function la(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ze={test:En("#"),parse:la,transform:pt.transform},St={test:En("hsl","hue"),parse:Ki("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Z.transform(Ot(e))+", "+Z.transform(Ot(n))+", "+Ot(kt.transform(s))+")"},U={test:t=>pt.test(t)||Ze.test(t)||St.test(t),parse:t=>pt.test(t)?pt.parse(t):St.test(t)?St.parse(t):Ze.parse(t),transform:t=>Zt(t)?t:t.hasOwnProperty("red")?pt.transform(t):St.transform(t)},R=(t,e,n)=>-n*t+n*e+t;function Ie(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function fa({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=Ie(c,a,t+1/3),o=Ie(c,a,t),r=Ie(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}const ke=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},ha=[Ze,pt,St],da=t=>ha.find(e=>e.test(t));function rs(t){const e=da(t);let n=e.parse(t);return e===St&&(n=fa(n)),n}const _i=(t,e)=>{const n=rs(t),s=rs(e),i={...n};return o=>(i.red=ke(n.red,s.red,o),i.green=ke(n.green,s.green,o),i.blue=ke(n.blue,s.blue,o),i.alpha=R(n.alpha,s.alpha,o),pt.transform(i))};function ma(t){var e,n;return isNaN(t)&&Zt(t)&&(((e=t.match(Se))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(gi))===null||n===void 0?void 0:n.length)||0)>0}const Xi={regex:ho,countKey:"Vars",token:"${v}",parse:L},Yi={regex:gi,countKey:"Colors",token:"${c}",parse:U.parse},qi={regex:Se,countKey:"Numbers",token:"${n}",parse:Pt.parse};function Oe(t,{regex:e,countKey:n,token:s,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,s),t.values.push(...o.map(i)))}function me(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Oe(n,Xi),Oe(n,Yi),Oe(n,qi),n}function Zi(t){return me(t).values}function Ji(t){const{values:e,numColors:n,numVars:s,tokenised:i}=me(t),o=e.length;return r=>{let a=i;for(let c=0;ctypeof t=="number"?0:t;function ga(t){const e=Zi(t);return Ji(t)(e.map(pa))}const ut={test:ma,parse:Zi,createTransformer:Ji,getAnimatableNone:ga},Qi=(t,e)=>n=>`${n>0?e:t}`;function tr(t,e){return typeof t=="number"?n=>R(t,e,n):U.test(t)?_i(t,e):t.startsWith("var(")?Qi(t,e):nr(t,e)}const er=(t,e)=>{const n=[...t],s=n.length,i=t.map((o,r)=>tr(o,e[r]));return o=>{for(let r=0;r{const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=tr(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}},nr=(t,e)=>{const n=ut.createTransformer(e),s=me(t),i=me(e);return s.numVars===i.numVars&&s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?ot(er(s.values,i.values),n):Qi(t,e)},yt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},os=(t,e)=>n=>R(t,e,n);function va(t){return typeof t=="number"?os:typeof t=="string"?U.test(t)?_i:nr:Array.isArray(t)?er:typeof t=="object"?ya:os}function xa(t,e,n){const s=[],i=n||va(t[0]),o=t.length-1;for(let r=0;re[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=xa(e,s,i),a=r.length,c=u=>{let l=0;if(a>1)for(;lc(ct(t[0],t[o-1],u)):c}function sr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=yt(0,e,s);t.push(R(n,1,i))}}function Rn(t){const e=[0];return sr(e,t.length-1),e}function Pa(t,e){return t.map(n=>n*e)}function Ta(t,e){return t.map(()=>e||Ni).splice(0,t.length-1)}function pe({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=zi(s)?s.map(qe):qe(s),o={done:!1,value:e[0]},r=Pa(n&&n.length===e.length?n:Rn(e),t),a=we(r,e,{ease:Array.isArray(i)?i:Ta(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}function Ln(t,e){return e?t*(1e3/e):0}const ba=5;function ir(t,e,n){const s=Math.max(e-ba,0);return Ln(n-t(s),e-s)}const je=.001,Sa=.01,as=10,Aa=.05,Va=1;function Ca({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;Fi(t<=et(as));let r=1-e;r=ct(Aa,Va,r),t=ct(Sa,as,_(t)),r<1?(i=u=>{const l=u*r,f=l*t,h=l-n,d=Je(u,r),p=Math.exp(-f);return je-h/d*p},o=u=>{const f=u*r*t,h=f*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,p=Math.exp(-f),y=Je(Math.pow(u,2),r);return(-i(u)+je>0?-1:1)*((h-d)*p)/y}):(i=u=>{const l=Math.exp(-u*t),f=(u-n)*t+1;return-je+l*f},o=u=>{const l=Math.exp(-u*t),f=(n-u)*(t*t);return l*f});const a=5/t,c=Ma(i,o,a);if(t=et(t),isNaN(c))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const wa=12;function Ma(t,e,n){let s=n;for(let i=1;it[n]!==void 0)}function Ra(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!cs(t,Ea)&&cs(t,Da)){const n=Ca(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function Bn({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:c,mass:u,velocity:l,duration:f,isResolvedFromDuration:h}=Ra(s),d=l?-_(l):0,p=c/(2*Math.sqrt(a*u)),y=o-i,x=_(Math.sqrt(a/u)),T=Math.abs(y)<5;n||(n=T?.01:2),e||(e=T?.005:.5);let v;if(p<1){const g=Je(x,p);v=P=>{const A=Math.exp(-p*x*P);return o-A*((d+p*x*y)/g*Math.sin(g*P)+y*Math.cos(g*P))}}else if(p===1)v=g=>o-Math.exp(-x*g)*(y+(d+x*y)*g);else{const g=x*Math.sqrt(p*p-1);v=P=>{const A=Math.exp(-p*x*P),D=Math.min(g*P,300);return o-A*((d+p*x*y)*Math.sinh(D)+g*y*Math.cosh(D))/g}}return{calculatedDuration:h&&f||null,next:g=>{const P=v(g);if(h)r.done=g>=f;else{let A=d;g!==0&&(p<1?A=ir(v,g,P):A=0);const D=Math.abs(A)<=n,C=Math.abs(o-P)<=e;r.done=D&&C}return r.value=r.done?o:P,r}}}function us({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:c,restDelta:u=.5,restSpeed:l}){const f=t[0],h={done:!1,value:f},d=b=>a!==void 0&&bc,p=b=>a===void 0?c:c===void 0||Math.abs(a-b)-y*Math.exp(-b/s),g=b=>T+v(b),P=b=>{const w=v(b),O=g(b);h.done=Math.abs(w)<=u,h.value=h.done?T:O};let A,D;const C=b=>{d(h.value)&&(A=b,D=Bn({keyframes:[h.value,p(h.value)],velocity:ir(g,b,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:l}))};return C(0),{calculatedDuration:null,next:b=>{let w=!1;return!D&&A===void 0&&(w=!0,P(b),C(b)),A!==void 0&&b>A?D.next(b-A):(!w&&P(b),h)}}}const La=t=>{const e=({timestamp:n})=>t(n);return{start:()=>V.update(e,!0),stop:()=>N(e),now:()=>I.isProcessing?I.timestamp:performance.now()}},Qe=2e4;function tn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e=Qe?1/0:e}const Ba={decay:us,inertia:us,tween:pe,keyframes:pe,spring:Bn};function Kt({autoplay:t=!0,delay:e=0,driver:n=La,keyframes:s,type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:c,onStop:u,onComplete:l,onUpdate:f,...h}){let d=1,p=!1,y,x;const T=()=>{x=new Promise(E=>{y=E})};T();let v;const g=Ba[i]||pe;let P;g!==pe&&typeof s[0]!="number"&&(P=we([0,100],s,{clamp:!1}),s=[0,100]);const A=g({...h,keyframes:s});let D;a==="mirror"&&(D=g({...h,keyframes:[...s].reverse(),velocity:-(h.velocity||0)}));let C="idle",b=null,w=null,O=null;A.calculatedDuration===null&&o&&(A.calculatedDuration=tn(A));const{calculatedDuration:H}=A;let X=1/0,G=1/0;H!==null&&(X=H+r,G=X*(o+1)-r);let M=0;const B=E=>{if(w===null)return;d>0&&(w=Math.min(w,E)),d<0&&(w=Math.min(E-G/d,w)),b!==null?M=b:M=Math.round(E-w)*d;const nt=M-e*(d>=0?1:-1),ee=d>=0?nt<0:nt>G;M=Math.max(nt,0),C==="finished"&&b===null&&(M=G);let $n=M,Kn=A;if(o){const Ee=M/X;let ne=Math.floor(Ee),ft=Ee%1;!ft&&Ee>=1&&(ft=1),ft===1&&ne--,ne=Math.min(ne,o+1);const Xn=!!(ne%2);Xn&&(a==="reverse"?(ft=1-ft,r&&(ft-=r/X)):a==="mirror"&&(Kn=D));let Yn=ct(0,1,ft);M>G&&(Yn=a==="reverse"&&Xn?1:0),$n=Yn*X}const Et=ee?{done:!1,value:s[0]}:Kn.next($n);P&&(Et.value=P(Et.value));let{done:_n}=Et;!ee&&H!==null&&(_n=d>=0?M>=G:M<=0);const eo=b===null&&(C==="finished"||C==="running"&&_n);return f&&f(Et.value),eo&&te(),Et},$=()=>{v&&v.stop(),v=void 0},Q=()=>{C="idle",$(),y(),T(),w=O=null},te=()=>{C="finished",l&&l(),$(),y()},Mt=()=>{if(p)return;v||(v=n(B));const E=v.now();c&&c(),b!==null?w=E-b:(!w||C==="finished")&&(w=E),C==="finished"&&T(),O=w,b=null,C="running",v.start()};t&&Mt();const Dt={then(E,nt){return x.then(E,nt)},get time(){return _(M)},set time(E){E=et(E),M=E,b!==null||!v||d===0?b=E:w=v.now()-E/d},get duration(){const E=A.calculatedDuration===null?tn(A):A.calculatedDuration;return _(E)},get speed(){return d},set speed(E){E===d||!v||(d=E,Dt.time=_(M))},get state(){return C},play:Mt,pause:()=>{C="paused",b=M},stop:()=>{p=!0,C!=="idle"&&(C="idle",u&&u(),Q())},cancel:()=>{O!==null&&B(O),Q()},complete:()=>{C="finished"},sample:E=>(w=0,B(E))};return Dt}function rr(t){let e;return()=>(e===void 0&&(e=t()),e)}const Fa=rr(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ia=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ie=10,ka=2e4,Oa=(t,e)=>e.type==="spring"||t==="backgroundColor"||!ki(e.ease);function ja(t,e,{onUpdate:n,onComplete:s,...i}){if(!(Fa()&&Ia.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let r=!1,a,c;const u=()=>{c=new Promise(v=>{a=v})};u();let{keyframes:l,duration:f=300,ease:h,times:d}=i;if(Oa(e,i)){const v=Kt({...i,repeat:0,delay:0});let g={done:!1,value:l[0]};const P=[];let A=0;for(;!g.done&&Ap.cancel(),x=()=>{V.update(y),a(),u()};return p.onfinish=()=>{t.set(Qo(l,i)),s&&s(),x()},{then(v,g){return c.then(v,g)},attachTimeline(v){return p.timeline=v,p.onfinish=null,L},get time(){return _(p.currentTime||0)},set time(v){p.currentTime=et(v)},get speed(){return p.playbackRate},set speed(v){p.playbackRate=v},get duration(){return _(f)},play:()=>{r||(p.play(),N(y))},pause:()=>p.pause(),stop:()=>{if(r=!0,p.playState==="idle")return;const{currentTime:v}=p;if(v){const g=Kt({...i,autoplay:!1});t.setWithVelocity(g.sample(v-ie).value,g.sample(v).value,ie)}x()},complete:()=>p.finish(),cancel:x}}function Ua({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,speed:1,duration:0,play:L,pause:L,stop:L,then:o=>(o(),Promise.resolve()),cancel:L,complete:L});return e?Kt({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const Na={type:"spring",stiffness:500,damping:25,restSpeed:10},za=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Wa={type:"keyframes",duration:.8},Ha={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ga=(t,{keyframes:e})=>e.length>2?Wa:J.has(t)?t.startsWith("scale")?za(e[1]):Na:Ha,en=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ut.test(e)||e==="0")&&!e.startsWith("url(")),$a=new Set(["brightness","contrast","saturate","opacity"]);function Ka(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Se)||[];if(!s)return t;const i=n.replace(s,"");let o=$a.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const _a=/([a-z-]*)\(.*?\)/g,nn={...ut,getAnimatableNone:t=>{const e=t.match(_a);return e?e.map(Ka).join(" "):t}},Xa={...yi,color:U,backgroundColor:U,outlineColor:U,fill:U,stroke:U,borderColor:U,borderTopColor:U,borderRightColor:U,borderBottomColor:U,borderLeftColor:U,filter:nn,WebkitFilter:nn},Fn=t=>Xa[t];function or(t,e){let n=Fn(t);return n!==nn&&(n=ut),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ar=t=>/^0[^.\s]+$/.test(t);function Ya(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||ar(t)}function qa(t,e,n,s){const i=en(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const r=s.from!==void 0?s.from:t.get();let a;const c=[];for(let u=0;ui=>{const o=cr(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a=a-et(r);const c=qa(e,t,n,o),u=c[0],l=c[c.length-1],f=en(t,u),h=en(t,l);let d={keyframes:c,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{e.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(Za(o)||(d={...d,...Ga(t,d)}),d.duration&&(d.duration=et(d.duration)),d.repeatDelay&&(d.repeatDelay=et(d.repeatDelay)),!f||!h||de.current||o.type===!1)return Ua(de.current?{...d,delay:0}:d);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=ja(e,t,d);if(p)return p}return Kt(d)};function ge(t){return!!(k(t)&&t.add)}const ur=t=>/^\-?\d*\.?\d+$/.test(t);function Me(t,e){t.indexOf(e)===-1&&t.push(e)}function Ct(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function Ja([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&sCt(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o!isNaN(parseFloat(t)),jt={current:void 0};class lr{constructor(e,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{this.prev=this.current,this.current=s;const{delta:o,timestamp:r}=I;this.lastUpdated!==r&&(this.timeDelta=o,this.lastUpdated=r,V.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>V.postRender(this.velocityCheck),this.velocityCheck=({timestamp:s})=>{s!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Qa(this.current),this.owner=n.owner}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new kn);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=e,this.timeDelta=s}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return jt.current&&jt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Ln(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function K(t,e){return new lr(t,e)}const fr=t=>e=>e.test(t),tc={test:t=>t==="auto",parse:t=>t},hr=[Pt,S,Z,st,yo,go,tc],Rt=t=>hr.find(fr(t)),ec=[...hr,U,ut],nc=t=>ec.find(fr(t));function sc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,K(n))}function On(t,e){const n=Ve(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const r in o){const a=Eo(o[r]);sc(t,r,a)}}function sn(t,e){[...e].reverse().forEach(s=>{const i=t.getVariant(s);i&&On(t,i),t.variantChildren&&t.variantChildren.forEach(o=>{sn(o,e)})})}function ic(t,e){if(Array.isArray(e))return sn(t,e);if(typeof e=="string")return sn(t,[e]);On(t,e)}function dr(t,e,n){var s,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),r=o.length;if(r)for(let a=0;ac.remove(f))),u.push(y)}return r&&Promise.all(u).then(()=>{r&&On(t,r)}),u}function rn(t,e,n={}){const s=Ve(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(jn(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:l,staggerDirection:f}=i;return ac(t,e,u+c,l,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function ac(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,c=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(cc).forEach((u,l)=>{u.notify("AnimationStart",e),r.push(rn(u,e,{...o,delay:n+c(l)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}function cc(t,e){return t.sortNodePosition(e)}function Un(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>rn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=rn(t,e,n);else{const i=typeof e=="function"?Ve(t,e,n.custom):e;s=Promise.all(jn(t,i,n))}return s.then(()=>t.notify("AnimationComplete",e))}const uc=[...pn].reverse(),lc=pn.length;function fc(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Un(t,n,s)))}function hc(t){let e=fc(t);const n=mc();let s=!0;const i=(c,u)=>{const l=Ve(t,u);if(l){const{transition:f,transitionEnd:h,...d}=l;c={...c,...d,...h}}return c};function o(c){e=c(t)}function r(c,u){const l=t.getProps(),f=t.getVariantContext(!0)||{},h=[],d=new Set;let p={},y=1/0;for(let T=0;Ty&&A;const O=Array.isArray(P)?P:[P];let H=O.reduce(i,{});D===!1&&(H={});const{prevResolvedValues:X={}}=g,G={...X,...H},M=B=>{w=!0,d.delete(B),g.needsAnimating[B]=!0};for(const B in G){const $=H[B],Q=X[B];p.hasOwnProperty(B)||($!==Q?he($)&&he(Q)?!Li($,Q)||b?M(B):g.protectedKeys[B]=!0:$!==void 0?M(B):d.add(B):$!==void 0&&d.has(B)?M(B):g.protectedKeys[B]=!0)}g.prevProp=P,g.prevResolvedValues=H,g.isActive&&(p={...p,...H}),s&&t.blockInitialAnimation&&(w=!1),w&&!C&&h.push(...O.map(B=>({animation:B,options:{type:v,...c}})))}if(d.size){const T={};d.forEach(v=>{const g=t.getBaseTarget(v);g!==void 0&&(T[v]=g)}),h.push({animation:T})}let x=!!h.length;return s&&l.initial===!1&&!t.manuallyAnimateOnMount&&(x=!1),s=!1,x?e(h):Promise.resolve()}function a(c,u,l){var f;if(n[c].isActive===u)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(d=>{var p;return(p=d.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const h=r(l,c);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function dc(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Li(e,t):!1}function ht(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mc(){return{animate:ht(!0),whileInView:ht(),whileHover:ht(),whileTap:ht(),whileDrag:ht(),whileFocus:ht(),exit:ht()}}class pc extends lt{constructor(e){super(e),e.animationState||(e.animationState=hc(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Te(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let gc=0;class yc extends lt{constructor(){super(...arguments),this.id=gc++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:s}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:s??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const pr={animation:{Feature:pc},exit:{Feature:yc}},ls=(t,e)=>Math.abs(t-e);function vc(t,e){const n=ls(t.x,e.x),s=ls(t.y,e.y);return Math.sqrt(n**2+s**2)}class gr{constructor(e,n,{transformPagePoint:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Ne(this.lastMoveEventInfo,this.history),l=this.startEvent!==null,f=vc(u.offset,{x:0,y:0})>=3;if(!l&&!f)return;const{point:h}=u,{timestamp:d}=I;this.history.push({...h,timestamp:d});const{onStart:p,onMove:y}=this.handlers;l||(p&&p(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,u)},this.handlePointerMove=(u,l)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Ue(l,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(u,l)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:h}=this.handlers,d=Ne(u.type==="pointercancel"?this.lastMoveEventInfo:Ue(l,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,d),h&&h(u,d)},!Ci(e))return;this.handlers=n,this.transformPagePoint=s;const i=Ae(e),o=Ue(i,this.transformPagePoint),{point:r}=o,{timestamp:a}=I;this.history=[{...r,timestamp:a}];const{onSessionStart:c}=n;c&&c(e,Ne(o,this.history)),this.removeListeners=ot(tt(window,"pointermove",this.handlePointerMove),tt(window,"pointerup",this.handlePointerUp),tt(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),N(this.updatePoint)}}function Ue(t,e){return e?{point:e(t.point)}:t}function fs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ne({point:t},e){return{point:t,delta:fs(t,yr(e)),offset:fs(t,xc(e)),velocity:Pc(e,.1)}}function xc(t){return t[0]}function yr(t){return t[t.length-1]}function Pc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=yr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>et(e)));)n--;if(!s)return{x:0,y:0};const o=_(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function z(t){return t.max-t.min}function on(t,e=0,n=.01){return Math.abs(t-e)<=n}function hs(t,e,n,s=.5){t.origin=s,t.originPoint=R(e.min,e.max,t.origin),t.scale=z(n)/z(e),(on(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=R(n.min,n.max,t.origin)-t.originPoint,(on(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Ut(t,e,n,s){hs(t.x,e.x,n.x,s?s.originX:void 0),hs(t.y,e.y,n.y,s?s.originY:void 0)}function ds(t,e,n){t.min=n.min+e.min,t.max=t.min+z(e)}function Tc(t,e,n){ds(t.x,e.x,n.x),ds(t.y,e.y,n.y)}function ms(t,e,n){t.min=e.min-n.min,t.max=t.min+z(e)}function Nt(t,e,n){ms(t.x,e.x,n.x),ms(t.y,e.y,n.y)}function bc(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?R(n,t,s.max):Math.min(t,n)),t}function ps(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Sc(t,{top:e,left:n,bottom:s,right:i}){return{x:ps(t.x,n,i),y:ps(t.y,e,s)}}function gs(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=yt(e.min,e.max-s,t.min):s>i&&(n=yt(t.min,t.max-i,e.min)),ct(0,1,n)}function Cc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const an=.35;function wc(t=an){return t===!1?t=0:t===!0&&(t=an),{x:ys(t,"left","right"),y:ys(t,"top","bottom")}}function ys(t,e,n){return{min:vs(t,e),max:vs(t,n)}}function vs(t,e){return typeof t=="number"?t:t[e]||0}const xs=()=>({translate:0,scale:1,origin:0,originPoint:0}),At=()=>({x:xs(),y:xs()}),Ps=()=>({min:0,max:0}),F=()=>({x:Ps(),y:Ps()});function Y(t){return[t("x"),t("y")]}function vr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Mc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Dc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ze(t){return t===void 0||t===1}function cn({scale:t,scaleX:e,scaleY:n}){return!ze(t)||!ze(e)||!ze(n)}function dt(t){return cn(t)||xr(t)||t.z||t.rotate||t.rotateX||t.rotateY}function xr(t){return Ts(t.x)||Ts(t.y)}function Ts(t){return t&&t!=="0%"}function ye(t,e,n){const s=t-n,i=e*s;return n+i}function bs(t,e,n,s,i){return i!==void 0&&(t=ye(t,i,s)),ye(t,n,s)+e}function un(t,e=0,n=1,s,i){t.min=bs(t.min,e,n,s,i),t.max=bs(t.max,e,n,s,i)}function Pr(t,{x:e,y:n}){un(t.x,e.translate,e.scale,e.originPoint),un(t.y,n.translate,n.scale,n.originPoint)}function Ec(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function rt(t,e){t.min=t.min+e,t.max=t.max+e}function As(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=R(t.min,t.max,o);un(t,e[n],e[s],r,e.scale)}const Rc=["x","scaleX","originX"],Lc=["y","scaleY","originY"];function Vt(t,e){As(t.x,e,Rc),As(t.y,e,Lc)}function Tr(t,e){return vr(Dc(t.getBoundingClientRect(),e))}function Bc(t,e,n){const s=Tr(t,n),{scroll:i}=e;return i&&(rt(s.x,i.offset.x),rt(s.y,i.offset.y)),s}const Fc=new WeakMap;class Ic{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=F(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{this.stopAnimation(),n&&this.snapToCursor(Ae(c,"page").point)},o=(c,u)=>{const{drag:l,dragPropagation:f,onDragStart:h}=this.getProps();if(l&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Mi(l),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Y(p=>{let y=this.getAxisMotionValue(p).get()||0;if(Z.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[p];T&&(y=z(T)*(parseFloat(y)/100))}}this.originPoint[p]=y}),h&&V.update(()=>h(c,u),!1,!0);const{animationState:d}=this.visualElement;d&&d.setActive("whileDrag",!0)},r=(c,u)=>{const{dragPropagation:l,dragDirectionLock:f,onDirectionLock:h,onDrag:d}=this.getProps();if(!l&&!this.openGlobalLock)return;const{offset:p}=u;if(f&&this.currentDirection===null){this.currentDirection=kc(p),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),d&&d(c,u)},a=(c,u)=>this.stop(c,u);this.panSession=new gr(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&V.update(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!re(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=bc(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),{layout:s}=this.visualElement.projection||{},i=this.constraints;e&&bt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Sc(s.layoutBox,e):this.constraints=!1,this.elastic=wc(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Y(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Cc(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!bt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Bc(s,i.root,this.visualElement.getTransformPagePoint());let r=Ac(i.layout.layoutBox,o);if(n){const a=n(Mc(r));this.hasMutatedConstraints=!!a,a&&(r=vr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=Y(l=>{if(!re(l,n,this.currentDirection))return;let f=c&&c[l]||{};r&&(f={min:0,max:0});const h=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[l]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(l,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(In(e,s,0,n))}stopAnimation(){Y(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){Y(n=>{const{drag:s}=this.getProps();if(!re(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-R(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!bt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Y(r=>{const a=this.getAxisMotionValue(r);if(a){const c=a.get();i[r]=Vc({min:c,max:c},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Y(r=>{if(!re(r,e,null))return;const a=this.getAxisMotionValue(r),{min:c,max:u}=this.constraints[r];a.set(R(c,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Fc.set(this.visualElement,this);const e=this.visualElement.current,n=tt(e,"pointerdown",c=>{const{drag:u,dragListener:l=!0}=this.getProps();u&&l&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();bt(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const r=q(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Y(l=>{const f=this.getAxisMotionValue(l);f&&(this.originPoint[l]+=c[l].translate,f.set(f.get()+c[l].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=an,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function re(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function kc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Oc extends lt{constructor(e){super(e),this.removeGroupControls=L,this.removeListeners=L,this.controls=new Ic(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||L}unmount(){this.removeGroupControls(),this.removeListeners()}}const Vs=t=>(e,n)=>{t&&V.update(()=>t(e,n))};class jc extends lt{constructor(){super(...arguments),this.removePointerDownListener=L}onPointerDown(e){this.session=new gr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Vs(e),onStart:Vs(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&V.update(()=>i(o,r))}}}mount(){this.removePointerDownListener=tt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Uc(){const t=m.useContext(Yt);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=m.useId();return m.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}function lf(){return Nc(m.useContext(Yt))}function Nc(t){return t===null?!0:t.isPresent}const ae={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Cs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Lt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=Cs(t,e.target.x),s=Cs(t,e.target.y);return`${n}% ${s}%`}},zc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=ut.parse(t);if(i.length>5)return s;const o=ut.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=c;const u=R(a,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};class Wc extends ui.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;co(Hc),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ae.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||V.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function br(t){const[e,n]=Uc(),s=m.useContext(Gt);return ui.createElement(Wc,{...t,layoutGroup:s,switchLayoutGroup:m.useContext(fi),isPresent:e,safeToRemove:n})}const Hc={borderRadius:{...Lt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lt,borderTopRightRadius:Lt,borderBottomLeftRadius:Lt,borderBottomRightRadius:Lt,boxShadow:zc},Sr=["TopLeft","TopRight","BottomLeft","BottomRight"],Gc=Sr.length,ws=t=>typeof t=="string"?parseFloat(t):t,Ms=t=>typeof t=="number"||S.test(t);function $c(t,e,n,s,i,o){i?(t.opacity=R(0,n.opacity!==void 0?n.opacity:1,Kc(s)),t.opacityExit=R(e.opacity!==void 0?e.opacity:1,0,_c(s))):o&&(t.opacity=R(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;rse?1:n(yt(t,e,s))}function Es(t,e){t.min=e.min,t.max=e.max}function W(t,e){Es(t.x,e.x),Es(t.y,e.y)}function Rs(t,e,n,s,i){return t-=e,t=ye(t,1/n,s),i!==void 0&&(t=ye(t,1/i,s)),t}function Xc(t,e=0,n=1,s=.5,i,o=t,r=t){if(Z.test(e)&&(e=parseFloat(e),e=R(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=R(o.min,o.max,s);t===o&&(a-=e),t.min=Rs(t.min,e,n,a,i),t.max=Rs(t.max,e,n,a,i)}function Ls(t,e,[n,s,i],o,r){Xc(t,e[n],e[s],e[i],e.scale,o,r)}const Yc=["x","scaleX","originX"],qc=["y","scaleY","originY"];function Bs(t,e,n,s){Ls(t.x,e,Yc,n?n.x:void 0,s?s.x:void 0),Ls(t.y,e,qc,n?n.y:void 0,s?s.y:void 0)}function Fs(t){return t.translate===0&&t.scale===1}function Vr(t){return Fs(t.x)&&Fs(t.y)}function Zc(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Cr(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Is(t){return z(t.x)/z(t.y)}class Jc{constructor(){this.members=[]}add(e){Me(this.members,e),e.scheduleRender()}remove(e){if(Ct(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ks(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:c,rotateX:u,rotateY:l}=n;c&&(s+=`rotate(${c}deg) `),u&&(s+=`rotateX(${u}deg) `),l&&(s+=`rotateY(${l}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return(r!==1||a!==1)&&(s+=`scale(${r}, ${a})`),s||"none"}const Qc=(t,e)=>t.depth-e.depth;class tu{constructor(){this.children=[],this.isDirty=!1}add(e){Me(this.children,e),this.isDirty=!0}remove(e){Ct(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Qc),this.isDirty=!1,this.children.forEach(e)}}function eu(t,e){const n=performance.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(N(s),t(o-e))};return V.read(s,!0),()=>N(s)}function nu(t){window.MotionDebug&&window.MotionDebug.record(t)}function wr(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Nn(t,e,n){const s=k(t)?t:K(t);return s.start(In("",s,e,n)),s.animation}const Os=["","X","Y","Z"],js=1e3;let su=0;const mt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Mr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=su++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{mt.totalNodes=mt.resolvedTargetDeltas=mt.recalculatedProjection=0,this.nodes.forEach(ou),this.nodes.forEach(fu),this.nodes.forEach(hu),this.nodes.forEach(au),nu(mt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=eu(h,250),ae.hasAnimatedSinceResize&&(ae.hasAnimatedSinceResize=!1,this.nodes.forEach(Ns))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&l&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||yu,{onLayoutAnimationStart:x,onLayoutAnimationComplete:T}=l.getProps(),v=!this.targetLayout||!Cr(this.targetLayout,p)||d,g=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const P={...cr(y,"layout"),onPlay:x,onComplete:T};(l.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else h||Ns(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,N(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(du),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;lthis.update()))}clearAllSnapshots(){this.nodes.forEach(cu),this.sharedNodes.forEach(mu)}scheduleUpdateProjection(){V.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const A=P/1e3;zs(f.x,r.x,A),zs(f.y,r.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pu(this.relativeTarget,this.relativeTargetOrigin,h,A),g&&Zc(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=F()),W(g,this.relativeTarget)),y&&(this.animationValues=l,$c(l,u,this.latestValues,A,v,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(N(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{ae.hasAnimatedSinceResize=!0,this.currentAnimation=Nn(0,js,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(js),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:l}=r;if(!(!a||!c||!u)){if(this!==r&&this.layout&&u&&Dr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||F();const f=z(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+f;const h=z(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+h}W(a,c),Vt(a,l),Ut(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Jc),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:c}=r;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const u={};for(let l=0;l{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Us),this.root.sharedNodes.clear()}}}function iu(t){t.updateLayout()}function ru(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?Y(f=>{const h=r?n.measuredBox[f]:n.layoutBox[f],d=z(h);h.min=s[f].min,h.max=h.min+d}):Dr(o,n.layoutBox,s)&&Y(f=>{const h=r?n.measuredBox[f]:n.layoutBox[f],d=z(s[f]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+d)});const a=At();Ut(a,s,n.layoutBox);const c=At();r?Ut(c,t.applyTransform(i,!0),n.measuredBox):Ut(c,s,n.layoutBox);const u=!Vr(a);let l=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=F();Nt(p,n.layoutBox,h.layoutBox);const y=F();Nt(y,s,d.layoutBox),Cr(p,y)||(l=!0),f.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:l})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function ou(t){mt.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function au(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function cu(t){t.clearSnapshot()}function Us(t){t.clearMeasurements()}function uu(t){t.isLayoutDirty=!1}function lu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ns(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function fu(t){t.resolveTargetDelta()}function hu(t){t.calcProjection()}function du(t){t.resetRotation()}function mu(t){t.removeLeadSnapshot()}function zs(t,e,n){t.translate=R(e.translate,0,n),t.scale=R(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ws(t,e,n,s){t.min=R(e.min,n.min,s),t.max=R(e.max,n.max,s)}function pu(t,e,n,s){Ws(t.x,e.x,n.x,s),Ws(t.y,e.y,n.y,s)}function gu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const yu={duration:.45,ease:[.4,0,.1,1]},Hs=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),Gs=Hs("applewebkit/")&&!Hs("chrome/")?Math.round:L;function $s(t){t.min=Gs(t.min),t.max=Gs(t.max)}function vu(t){$s(t.x),$s(t.y)}function Dr(t,e,n){return t==="position"||t==="preserve-aspect"&&!on(Is(e),Is(n),.2)}const xu=Mr({attachResizeListener:(t,e)=>q(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),gt={current:void 0},Er=Mr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!gt.current){const t=new xu({});t.mount(window),t.setOptions({layoutScroll:!0}),gt.current=t}return gt.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Rr={pan:{Feature:jc},drag:{Feature:Oc,ProjectionNode:Er,MeasureLayout:br}},Pu=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Tu(t){const e=Pu.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}function ln(t,e,n=1){const[s,i]=Tu(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return ur(r)?parseFloat(r):r}else return _e(i)?ln(i,e,n+1):i}function bu(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const o=i.get();if(!_e(o))return;const r=ln(o,s);r&&i.set(r)});for(const i in e){const o=e[i];if(!_e(o))continue;const r=ln(o,s);r&&(e[i]=r,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:e,transitionEnd:n}}const Su=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Lr=t=>Su.has(t),Au=t=>Object.keys(t).some(Lr),Ks=t=>t===Pt||t===S,_s=(t,e)=>parseFloat(t.split(", ")[e]),Xs=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return _s(i[1],e);{const o=s.match(/^matrix\((.+)\)$/);return o?_s(o[1],t):0}},Vu=new Set(["x","y","z"]),Cu=qt.filter(t=>!Vu.has(t));function wu(t){const e=[];return Cu.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const wt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Xs(4,13),y:Xs(5,14)};wt.translateX=wt.x;wt.translateY=wt.y;const Mu=(t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};r==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(u=>{a[u]=wt[u](s,o)}),e.render();const c=e.measureViewportBox();return n.forEach(u=>{const l=e.getValue(u);l&&l.jump(a[u]),t[u]=wt[u](c,o)}),t},Du=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(Lr);let o=[],r=!1;const a=[];if(i.forEach(c=>{const u=t.getValue(c);if(!t.hasValue(c))return;let l=n[c],f=Rt(l);const h=e[c];let d;if(he(h)){const p=h.length,y=h[0]===null?1:0;l=h[y],f=Rt(l);for(let x=y;x=0?window.pageYOffset:null,u=Mu(e,t,a);return o.length&&o.forEach(([l,f])=>{t.getValue(l).set(f)}),t.render(),Pe&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:s}}else return{target:e,transitionEnd:s}};function Eu(t,e,n,s){return Au(e)?Du(t,e,n,s):{target:e,transitionEnd:s}}const Ru=(t,e,n,s)=>{const i=bu(t,e,s);return e=i.target,s=i.transitionEnd,Eu(t,e,n,s)},ve={current:null},zn={current:!1};function Br(){if(zn.current=!0,!!Pe)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ve.current=t.matches;t.addListener(e),e()}else ve.current=!1}function Lu(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(k(o))t.addValue(i,o),ge(s)&&s.add(i);else if(k(r))t.addValue(i,K(o,{owner:t})),ge(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,K(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const _t=new WeakMap,Fr=Object.keys(Ht),Bu=Fr.length,Ys=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Fu=gn.length;class Ir{constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>V.render(this.render,!1,!0);const{latestValues:a,renderState:c}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.isControllingVariants=be(n),this.isVariantNode=li(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...l}=this.scrapeMotionValuesFromProps(n,{});for(const f in l){const h=l[f];a[f]!==void 0&&k(h)&&(h.set(a[f],!1),ge(u)&&u.add(f))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,_t.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),zn.current||Br(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ve.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){_t.delete(this.current),this.projection&&this.projection.unmount(),N(this.notifyUpdate),N(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const s=J.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&V.update(this.notifyUpdate,!1,!0),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,o){let r,a;for(let c=0;cthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):F()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=K(n,{owner:this}),this.addValue(e,s)),s}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props,i=typeof s=="string"||typeof s=="object"?(n=Vn(this.props,s))===null||n===void 0?void 0:n[e]:void 0;if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!k(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new kn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class kr extends Ir{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s},{transformValues:i},o){let r=mr(s,e||{},this);if(i&&(n&&(n=i(n)),s&&(s=i(s)),r&&(r=i(r))),o){dr(this,s,r);const a=Ru(this,s,r,n);n=a.transitionEnd,s=a.target}return{transition:e,transitionEnd:n,...s}}}function Iu(t){return window.getComputedStyle(t)}class Or extends kr{readValueFromInstance(e,n){if(J.has(n)){const s=Fn(n);return s&&s.default||0}else{const s=Iu(e),i=(xn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Tr(e,n)}build(e,n,s,i){Pn(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return An(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;k(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){bi(e,n,s,i)}}class jr extends kr{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(J.has(n)){const s=Fn(n);return s&&s.default||0}return n=Si.has(n)?n:$t(n),e.getAttribute(n)}measureInstanceViewportBox(){return F()}scrapeMotionValuesFromProps(e,n){return Vi(e,n)}build(e,n,s,i){bn(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Ai(e,n,s,i)}mount(e){this.isSVGTag=Sn(e.tagName),super.mount(e)}}const Wn=(t,e)=>vn(t)?new jr(e,{enableHardwareAcceleration:!1}):new Or(e,{enableHardwareAcceleration:!0}),Ur={layout:{ProjectionNode:Er,MeasureLayout:br}},Nr={...pr,...Ri,...Rr,...Ur},zr=di((t,e)=>wn(t,e,Nr,Wn));function hf(t){return hi(wn(t,{forwardMotionProps:!1},Nr,Wn))}const df=di(wn);function Wr(){const t=m.useRef(!1);return xt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Hn(){const t=Wr(),[e,n]=m.useState(0),s=m.useCallback(()=>{t.current&&n(e+1)},[e]);return[m.useCallback(()=>V.postRender(s),[s]),e]}class ku extends m.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ou({children:t,isPresent:e}){const n=m.useId(),s=m.useRef(null),i=m.useRef({width:0,height:0,top:0,left:0});return m.useInsertionEffect(()=>{const{width:o,height:r,top:a,left:c}=i.current;if(e||!s.current||!o||!r)return;s.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` +import{r as m,R as ui}from"./index-2d443e7c.js";const at=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Xt=m.createContext({}),Yt=m.createContext(null),Pe=typeof document<"u",xt=Pe?m.useLayoutEffect:m.useEffect,mn=m.createContext({strict:!1});function no(t,e,n,s){const{visualElement:i}=m.useContext(Xt),o=m.useContext(mn),r=m.useContext(Yt),a=m.useContext(at).reducedMotion,c=m.useRef();s=s||o.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:i,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const u=c.current;m.useInsertionEffect(()=>{u&&u.update(n,r)});const l=m.useRef(!!window.HandoffAppearAnimations);return xt(()=>{u&&(u.render(),l.current&&u.animationState&&u.animationState.animateChanges())}),m.useEffect(()=>{u&&(u.updateFeatures(),!l.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,l.current=!1)}),u}function bt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function so(t,e,n){return m.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):bt(n)&&(n.current=s))},[e])}function Wt(t){return typeof t=="string"||Array.isArray(t)}function Te(t){return typeof t=="object"&&typeof t.start=="function"}const pn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gn=["initial",...pn];function be(t){return Te(t.animate)||gn.some(e=>Wt(t[e]))}function li(t){return!!(be(t)||t.variants)}function io(t,e){if(be(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Wt(n)?n:void 0,animate:Wt(s)?s:void 0}}return t.inherit!==!1?e:{}}function ro(t){const{initial:e,animate:n}=io(t,m.useContext(Xt));return m.useMemo(()=>({initial:e,animate:n}),[qn(e),qn(n)])}function qn(t){return Array.isArray(t)?t.join(" "):t}const Zn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ht={};for(const t in Zn)Ht[t]={isEnabled:e=>Zn[t].some(n=>!!e[n])};function Ke(t){for(const e in t)Ht[e]={...Ht[e],...t[e]}}const Gt=m.createContext({}),fi=m.createContext({}),yn=Symbol.for("motionComponentSymbol");function hi({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Ke(t);function o(a,c){let u;const l={...m.useContext(at),...a,layoutId:oo(a)},{isStatic:f}=l,h=ro(a),d=s(a,f);if(!f&&Pe){h.visualElement=no(i,d,l,e);const p=m.useContext(fi),y=m.useContext(mn).strict;h.visualElement&&(u=h.visualElement.loadFeatures(l,y,t,p))}return m.createElement(Xt.Provider,{value:h},u&&h.visualElement?m.createElement(u,{visualElement:h.visualElement,...l}):null,n(i,a,so(d,h.visualElement,c),d,f,h.visualElement))}const r=m.forwardRef(o);return r[yn]=i,r}function oo({layoutId:t}){const e=m.useContext(Gt).id;return e&&t!==void 0?e+"-"+t:t}function di(t){function e(s,i={}){return hi(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const ao=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function vn(t){return typeof t!="string"||t.includes("-")?!1:!!(ao.indexOf(t)>-1||/[A-Z]/.test(t))}const le={};function co(t){Object.assign(le,t)}const qt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],J=new Set(qt);function mi(t,{layout:e,layoutId:n}){return J.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!le[t]||t==="opacity")}const k=t=>!!(t&&t.getVelocity),uo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lo=qt.length;function fo(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;re=>typeof e=="string"&&e.startsWith(t),xn=pi("--"),_e=pi("var(--"),ho=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,mo=(t,e)=>e&&typeof t=="number"?e.transform(t):t,ct=(t,e,n)=>Math.min(Math.max(n,t),e),Pt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},kt={...Pt,transform:t=>ct(0,1,t)},se={...Pt,default:1},Ot=t=>Math.round(t*1e5)/1e5,Se=/(-)?([\d]*\.?[\d])+/g,gi=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,po=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Zt(t){return typeof t=="string"}const Jt=t=>({test:e=>Zt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=Jt("deg"),Z=Jt("%"),S=Jt("px"),go=Jt("vh"),yo=Jt("vw"),Jn={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},Qn={...Pt,transform:Math.round},yi={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,size:S,top:S,right:S,bottom:S,left:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:se,scaleX:se,scaleY:se,scaleZ:se,skew:st,skewX:st,skewY:st,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:kt,originX:Jn,originY:Jn,originZ:S,zIndex:Qn,fillOpacity:kt,strokeOpacity:kt,numOctaves:Qn};function Pn(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let c=!1,u=!1,l=!0;for(const f in e){const h=e[f];if(xn(f)){o[f]=h;continue}const d=yi[f],p=mo(h,d);if(J.has(f)){if(c=!0,r[f]=p,!l)continue;h!==(d.default||0)&&(l=!1)}else f.startsWith("origin")?(u=!0,a[f]=p):i[f]=p}if(e.transform||(c||s?i.transform=fo(t.transform,n,l,s):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:h="50%",originZ:d=0}=a;i.transformOrigin=`${f} ${h} ${d}`}}const Tn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vi(t,e,n){for(const s in e)!k(e[s])&&!mi(s,n)&&(t[s]=e[s])}function vo({transformTemplate:t},e,n){return m.useMemo(()=>{const s=Tn();return Pn(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function xo(t,e,n){const s=t.style||{},i={};return vi(i,s,t),Object.assign(i,vo(t,e,n)),t.transformValues?t.transformValues(i):i}function Po(t,e,n){const s={},i=xo(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const To=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function fe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||To.has(t)}let xi=t=>!fe(t);function Pi(t){t&&(xi=e=>e.startsWith("on")?!fe(e):t(e))}try{Pi(require("@emotion/is-prop-valid").default)}catch{}function bo(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(xi(i)||n===!0&&fe(i)||!e&&!fe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function ts(t,e,n){return typeof t=="string"?t:S.transform(e+n*t)}function So(t,e,n){const s=ts(e,t.x,t.width),i=ts(n,t.y,t.height);return`${s} ${i}`}const Ao={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vo={offset:"strokeDashoffset",array:"strokeDasharray"};function Co(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Ao:Vo;t[o.offset]=S.transform(-s);const r=S.transform(e),a=S.transform(n);t[o.array]=`${r} ${a}`}function bn(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:c=0,...u},l,f,h){if(Pn(t,u,l,h),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:y}=t;d.transform&&(y&&(p.transform=d.transform),delete d.transform),y&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=So(y,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&Co(d,r,a,c,!1)}const Ti=()=>({...Tn(),attrs:{}}),Sn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wo(t,e,n,s){const i=m.useMemo(()=>{const o=Ti();return bn(o,e,{enableHardwareAcceleration:!1},Sn(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};vi(o,t.style,t),i.style={...o,...i.style}}return i}function Mo(t=!1){return(n,s,i,{latestValues:o},r)=>{const c=(vn(n)?wo:Po)(s,o,r,n),l={...bo(s,typeof n=="string",t),...c,ref:i},{children:f}=s,h=m.useMemo(()=>k(f)?f.get():f,[f]);return m.createElement(n,{...l,children:h})}}const $t=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function bi(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Si=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ai(t,e,n,s){bi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Si.has(i)?i:$t(i),e.attrs[i])}function An(t,e){const{style:n}=t,s={};for(const i in n)(k(n[i])||e.style&&k(e.style[i])||mi(i,t))&&(s[i]=n[i]);return s}function Vi(t,e){const n=An(t,e);for(const s in t)if(k(t[s])||k(e[s])){const i=qt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[i]=t[s]}return n}function Vn(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function j(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const he=t=>Array.isArray(t),Do=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Eo=t=>he(t)?t[t.length-1]||0:t;function oe(t){const e=k(t)?t.get():t;return Do(e)?e.toValue():e}function Ro({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Lo(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Cn=t=>(e,n)=>{const s=m.useContext(Xt),i=m.useContext(Yt),o=()=>Ro(t,e,s,i);return n?o():j(o)};function Lo(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=oe(o[h]);let{initial:r,animate:a}=t;const c=be(t),u=li(t);e&&u&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||r===!1;const f=l?a:r;return f&&typeof f!="boolean"&&!Te(f)&&(Array.isArray(f)?f:[f]).forEach(d=>{const p=Vn(t,d);if(!p)return;const{transitionEnd:y,transition:x,...T}=p;for(const v in T){let g=T[v];if(Array.isArray(g)){const P=l?g.length-1:0;g=g[P]}g!==null&&(i[v]=g)}for(const v in y)i[v]=y[v]}),i}const L=t=>t;class es{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Bo(t){let e=new es,n=new es,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(c,u=!1,l=!1)=>{const f=l&&i,h=f?e:n;return u&&r.add(c),h.add(c)&&f&&i&&(s=e.order.length),c},cancel:c=>{n.remove(c),r.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let u=0;u(f[h]=Bo(()=>n=!0),f),{}),r=f=>o[f].process(i),a=()=>{const f=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(f-i.timestamp,Fo),1),i.timestamp=f,i.isProcessing=!0,Ft.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},c=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Ft.reduce((f,h)=>{const d=o[h];return f[h]=(p,y=!1,x=!1)=>(n||c(),d.schedule(p,y,x)),f},{}),cancel:f=>Ft.forEach(h=>o[h].cancel(f)),state:i,steps:o}}const{schedule:V,cancel:N,state:I,steps:Re}=Io(typeof requestAnimationFrame<"u"?requestAnimationFrame:L,!0),ko={useVisualState:Cn({scrapeMotionValuesFromProps:Vi,createRenderState:Ti,onMount:(t,e,{renderState:n,latestValues:s})=>{V.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),V.render(()=>{bn(n,s,{enableHardwareAcceleration:!1},Sn(e.tagName),t.transformTemplate),Ai(e,n)})}})},Oo={useVisualState:Cn({scrapeMotionValuesFromProps:An,createRenderState:Tn})};function wn(t,{forwardMotionProps:e=!1},n,s){return{...vn(t)?ko:Oo,preloadedFeatures:n,useRender:Mo(e),createVisualElement:s,Component:t}}function q(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ci=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Ae(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const jo=t=>e=>Ci(e)&&t(e,Ae(e));function tt(t,e,n,s){return q(t,e,jo(n),s)}const Uo=(t,e)=>n=>e(t(n)),ot=(...t)=>t.reduce(Uo);function wi(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const ns=wi("dragHorizontal"),ss=wi("dragVertical");function Mi(t){let e=!1;if(t==="y")e=ss();else if(t==="x")e=ns();else{const n=ns(),s=ss();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Di(){const t=Mi(!0);return t?(t(),!1):!0}class lt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function is(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End"),i=(o,r)=>{if(o.type==="touch"||Di())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[s]&&V.update(()=>a[s](o,r))};return tt(t.current,n,i,{passive:!t.getProps()[s]})}class No extends lt{mount(){this.unmount=ot(is(this.node,!0),is(this.node,!1))}unmount(){}}class zo extends lt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ot(q(this.node.current,"focus",()=>this.onFocus()),q(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ei=(t,e)=>e?t===e?!0:Ei(t,e.parentElement):!1;function Le(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Ae(n))}class Wo extends lt{constructor(){super(...arguments),this.removeStartListeners=L,this.removeEndListeners=L,this.removeAccessibleListeners=L,this.startPointerPress=(e,n)=>{if(this.removeEndListeners(),this.isPressing)return;const s=this.node.getProps(),o=tt(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:l}=this.node.getProps();V.update(()=>{Ei(this.node.current,a.target)?u&&u(a,c):l&&l(a,c)})},{passive:!(s.onTap||s.onPointerUp)}),r=tt(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=ot(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||Le("up",(c,u)=>{const{onTap:l}=this.node.getProps();l&&V.update(()=>l(c,u))})};this.removeEndListeners(),this.removeEndListeners=q(this.node.current,"keyup",r),Le("down",(a,c)=>{this.startPress(a,c)})},n=q(this.node.current,"keydown",e),s=()=>{this.isPressing&&Le("cancel",(o,r)=>this.cancelPress(o,r))},i=q(this.node.current,"blur",s);this.removeAccessibleListeners=ot(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&V.update(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Di()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&V.update(()=>s(e,n))}mount(){const e=this.node.getProps(),n=tt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=q(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ot(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Xe=new WeakMap,Be=new WeakMap,Ho=t=>{const e=Xe.get(t.target);e&&e(t)},Go=t=>{t.forEach(Ho)};function $o({root:t,...e}){const n=t||document;Be.has(n)||Be.set(n,{});const s=Be.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Go,{root:t,...e})),s[i]}function Ko(t,e,n){const s=$o(e);return Xe.set(t,n),s.observe(t),()=>{Xe.delete(t),s.unobserve(t)}}const _o={some:0,all:1};class Xo extends lt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:_o[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:l,onViewportLeave:f}=this.node.getProps(),h=u?l:f;h&&h(c)};return Ko(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Yo(e,n))&&this.startObserver()}unmount(){}}function Yo({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Ri={inView:{Feature:Xo},tap:{Feature:Wo},focus:{Feature:zo},hover:{Feature:No}};function Li(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;se[s]=n.get()),e}function Zo(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function Ve(t,e,n){const s=t.getProps();return Vn(s,e,n!==void 0?n:s.custom,qo(t),Zo(t))}const Bi="framerAppearId",Jo="data-"+$t(Bi);let Fi=L,Ce=L;const et=t=>t*1e3,_=t=>t/1e3,de={current:!1},Ii=t=>Array.isArray(t)&&typeof t[0]=="number";function ki(t){return!!(!t||typeof t=="string"&&Oi[t]||Ii(t)||Array.isArray(t)&&t.every(ki))}const It=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Oi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:It([0,.65,.55,1]),circOut:It([.55,0,1,.45]),backIn:It([.31,.01,.66,-.59]),backOut:It([.33,1.53,.69,.99])};function ji(t){if(t)return Ii(t)?It(t):Array.isArray(t)?t.map(ji):Oi[t]}function Ye(t,e,n,{delay:s=0,duration:i,repeat:o=0,repeatType:r="loop",ease:a,times:c}={}){const u={[e]:n};c&&(u.offset=c);const l=ji(a);return Array.isArray(l)&&(u.easing=l),t.animate(u,{delay:s,duration:i,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}function Qo(t,{repeat:e,repeatType:n="loop"}){const s=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[s]}const Ui=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ta=1e-7,ea=12;function na(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Ui(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>ta&&++ana(o,0,1,t,n);return o=>o===0||o===1?o:Ui(i(o),e,s)}const sa=Qt(.42,0,1,1),ia=Qt(0,0,.58,1),Ni=Qt(.42,0,.58,1),zi=t=>Array.isArray(t)&&typeof t[0]!="number",Wi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Hi=t=>e=>1-t(1-e),Gi=t=>1-Math.sin(Math.acos(t)),Mn=Hi(Gi),ra=Wi(Mn),$i=Qt(.33,1.53,.69,.99),Dn=Hi($i),oa=Wi(Dn),aa=t=>(t*=2)<1?.5*Dn(t):.5*(2-Math.pow(2,-10*(t-1))),ca={linear:L,easeIn:sa,easeInOut:Ni,easeOut:ia,circIn:Gi,circInOut:ra,circOut:Mn,backIn:Dn,backInOut:oa,backOut:$i,anticipate:aa},qe=t=>{if(Array.isArray(t)){Ce(t.length===4);const[e,n,s,i]=t;return Qt(e,n,s,i)}else if(typeof t=="string")return ca[t];return t},En=(t,e)=>n=>!!(Zt(n)&&po.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ki=(t,e,n)=>s=>{if(!Zt(s))return s;const[i,o,r,a]=s.match(Se);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ua=t=>ct(0,255,t),Fe={...Pt,transform:t=>Math.round(ua(t))},pt={test:En("rgb","red"),parse:Ki("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Fe.transform(t)+", "+Fe.transform(e)+", "+Fe.transform(n)+", "+Ot(kt.transform(s))+")"};function la(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ze={test:En("#"),parse:la,transform:pt.transform},St={test:En("hsl","hue"),parse:Ki("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Z.transform(Ot(e))+", "+Z.transform(Ot(n))+", "+Ot(kt.transform(s))+")"},U={test:t=>pt.test(t)||Ze.test(t)||St.test(t),parse:t=>pt.test(t)?pt.parse(t):St.test(t)?St.parse(t):Ze.parse(t),transform:t=>Zt(t)?t:t.hasOwnProperty("red")?pt.transform(t):St.transform(t)},R=(t,e,n)=>-n*t+n*e+t;function Ie(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function fa({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=Ie(c,a,t+1/3),o=Ie(c,a,t),r=Ie(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}const ke=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},ha=[Ze,pt,St],da=t=>ha.find(e=>e.test(t));function rs(t){const e=da(t);let n=e.parse(t);return e===St&&(n=fa(n)),n}const _i=(t,e)=>{const n=rs(t),s=rs(e),i={...n};return o=>(i.red=ke(n.red,s.red,o),i.green=ke(n.green,s.green,o),i.blue=ke(n.blue,s.blue,o),i.alpha=R(n.alpha,s.alpha,o),pt.transform(i))};function ma(t){var e,n;return isNaN(t)&&Zt(t)&&(((e=t.match(Se))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(gi))===null||n===void 0?void 0:n.length)||0)>0}const Xi={regex:ho,countKey:"Vars",token:"${v}",parse:L},Yi={regex:gi,countKey:"Colors",token:"${c}",parse:U.parse},qi={regex:Se,countKey:"Numbers",token:"${n}",parse:Pt.parse};function Oe(t,{regex:e,countKey:n,token:s,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,s),t.values.push(...o.map(i)))}function me(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Oe(n,Xi),Oe(n,Yi),Oe(n,qi),n}function Zi(t){return me(t).values}function Ji(t){const{values:e,numColors:n,numVars:s,tokenised:i}=me(t),o=e.length;return r=>{let a=i;for(let c=0;ctypeof t=="number"?0:t;function ga(t){const e=Zi(t);return Ji(t)(e.map(pa))}const ut={test:ma,parse:Zi,createTransformer:Ji,getAnimatableNone:ga},Qi=(t,e)=>n=>`${n>0?e:t}`;function tr(t,e){return typeof t=="number"?n=>R(t,e,n):U.test(t)?_i(t,e):t.startsWith("var(")?Qi(t,e):nr(t,e)}const er=(t,e)=>{const n=[...t],s=n.length,i=t.map((o,r)=>tr(o,e[r]));return o=>{for(let r=0;r{const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=tr(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}},nr=(t,e)=>{const n=ut.createTransformer(e),s=me(t),i=me(e);return s.numVars===i.numVars&&s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?ot(er(s.values,i.values),n):Qi(t,e)},yt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},os=(t,e)=>n=>R(t,e,n);function va(t){return typeof t=="number"?os:typeof t=="string"?U.test(t)?_i:nr:Array.isArray(t)?er:typeof t=="object"?ya:os}function xa(t,e,n){const s=[],i=n||va(t[0]),o=t.length-1;for(let r=0;re[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=xa(e,s,i),a=r.length,c=u=>{let l=0;if(a>1)for(;lc(ct(t[0],t[o-1],u)):c}function sr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=yt(0,e,s);t.push(R(n,1,i))}}function Rn(t){const e=[0];return sr(e,t.length-1),e}function Pa(t,e){return t.map(n=>n*e)}function Ta(t,e){return t.map(()=>e||Ni).splice(0,t.length-1)}function pe({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=zi(s)?s.map(qe):qe(s),o={done:!1,value:e[0]},r=Pa(n&&n.length===e.length?n:Rn(e),t),a=we(r,e,{ease:Array.isArray(i)?i:Ta(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}function Ln(t,e){return e?t*(1e3/e):0}const ba=5;function ir(t,e,n){const s=Math.max(e-ba,0);return Ln(n-t(s),e-s)}const je=.001,Sa=.01,as=10,Aa=.05,Va=1;function Ca({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;Fi(t<=et(as));let r=1-e;r=ct(Aa,Va,r),t=ct(Sa,as,_(t)),r<1?(i=u=>{const l=u*r,f=l*t,h=l-n,d=Je(u,r),p=Math.exp(-f);return je-h/d*p},o=u=>{const f=u*r*t,h=f*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,p=Math.exp(-f),y=Je(Math.pow(u,2),r);return(-i(u)+je>0?-1:1)*((h-d)*p)/y}):(i=u=>{const l=Math.exp(-u*t),f=(u-n)*t+1;return-je+l*f},o=u=>{const l=Math.exp(-u*t),f=(n-u)*(t*t);return l*f});const a=5/t,c=Ma(i,o,a);if(t=et(t),isNaN(c))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const wa=12;function Ma(t,e,n){let s=n;for(let i=1;it[n]!==void 0)}function Ra(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!cs(t,Ea)&&cs(t,Da)){const n=Ca(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function Bn({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:c,mass:u,velocity:l,duration:f,isResolvedFromDuration:h}=Ra(s),d=l?-_(l):0,p=c/(2*Math.sqrt(a*u)),y=o-i,x=_(Math.sqrt(a/u)),T=Math.abs(y)<5;n||(n=T?.01:2),e||(e=T?.005:.5);let v;if(p<1){const g=Je(x,p);v=P=>{const A=Math.exp(-p*x*P);return o-A*((d+p*x*y)/g*Math.sin(g*P)+y*Math.cos(g*P))}}else if(p===1)v=g=>o-Math.exp(-x*g)*(y+(d+x*y)*g);else{const g=x*Math.sqrt(p*p-1);v=P=>{const A=Math.exp(-p*x*P),D=Math.min(g*P,300);return o-A*((d+p*x*y)*Math.sinh(D)+g*y*Math.cosh(D))/g}}return{calculatedDuration:h&&f||null,next:g=>{const P=v(g);if(h)r.done=g>=f;else{let A=d;g!==0&&(p<1?A=ir(v,g,P):A=0);const D=Math.abs(A)<=n,C=Math.abs(o-P)<=e;r.done=D&&C}return r.value=r.done?o:P,r}}}function us({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:c,restDelta:u=.5,restSpeed:l}){const f=t[0],h={done:!1,value:f},d=b=>a!==void 0&&bc,p=b=>a===void 0?c:c===void 0||Math.abs(a-b)-y*Math.exp(-b/s),g=b=>T+v(b),P=b=>{const w=v(b),O=g(b);h.done=Math.abs(w)<=u,h.value=h.done?T:O};let A,D;const C=b=>{d(h.value)&&(A=b,D=Bn({keyframes:[h.value,p(h.value)],velocity:ir(g,b,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:l}))};return C(0),{calculatedDuration:null,next:b=>{let w=!1;return!D&&A===void 0&&(w=!0,P(b),C(b)),A!==void 0&&b>A?D.next(b-A):(!w&&P(b),h)}}}const La=t=>{const e=({timestamp:n})=>t(n);return{start:()=>V.update(e,!0),stop:()=>N(e),now:()=>I.isProcessing?I.timestamp:performance.now()}},Qe=2e4;function tn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e=Qe?1/0:e}const Ba={decay:us,inertia:us,tween:pe,keyframes:pe,spring:Bn};function Kt({autoplay:t=!0,delay:e=0,driver:n=La,keyframes:s,type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:c,onStop:u,onComplete:l,onUpdate:f,...h}){let d=1,p=!1,y,x;const T=()=>{x=new Promise(E=>{y=E})};T();let v;const g=Ba[i]||pe;let P;g!==pe&&typeof s[0]!="number"&&(P=we([0,100],s,{clamp:!1}),s=[0,100]);const A=g({...h,keyframes:s});let D;a==="mirror"&&(D=g({...h,keyframes:[...s].reverse(),velocity:-(h.velocity||0)}));let C="idle",b=null,w=null,O=null;A.calculatedDuration===null&&o&&(A.calculatedDuration=tn(A));const{calculatedDuration:H}=A;let X=1/0,G=1/0;H!==null&&(X=H+r,G=X*(o+1)-r);let M=0;const B=E=>{if(w===null)return;d>0&&(w=Math.min(w,E)),d<0&&(w=Math.min(E-G/d,w)),b!==null?M=b:M=Math.round(E-w)*d;const nt=M-e*(d>=0?1:-1),ee=d>=0?nt<0:nt>G;M=Math.max(nt,0),C==="finished"&&b===null&&(M=G);let $n=M,Kn=A;if(o){const Ee=M/X;let ne=Math.floor(Ee),ft=Ee%1;!ft&&Ee>=1&&(ft=1),ft===1&&ne--,ne=Math.min(ne,o+1);const Xn=!!(ne%2);Xn&&(a==="reverse"?(ft=1-ft,r&&(ft-=r/X)):a==="mirror"&&(Kn=D));let Yn=ct(0,1,ft);M>G&&(Yn=a==="reverse"&&Xn?1:0),$n=Yn*X}const Et=ee?{done:!1,value:s[0]}:Kn.next($n);P&&(Et.value=P(Et.value));let{done:_n}=Et;!ee&&H!==null&&(_n=d>=0?M>=G:M<=0);const eo=b===null&&(C==="finished"||C==="running"&&_n);return f&&f(Et.value),eo&&te(),Et},$=()=>{v&&v.stop(),v=void 0},Q=()=>{C="idle",$(),y(),T(),w=O=null},te=()=>{C="finished",l&&l(),$(),y()},Mt=()=>{if(p)return;v||(v=n(B));const E=v.now();c&&c(),b!==null?w=E-b:(!w||C==="finished")&&(w=E),C==="finished"&&T(),O=w,b=null,C="running",v.start()};t&&Mt();const Dt={then(E,nt){return x.then(E,nt)},get time(){return _(M)},set time(E){E=et(E),M=E,b!==null||!v||d===0?b=E:w=v.now()-E/d},get duration(){const E=A.calculatedDuration===null?tn(A):A.calculatedDuration;return _(E)},get speed(){return d},set speed(E){E===d||!v||(d=E,Dt.time=_(M))},get state(){return C},play:Mt,pause:()=>{C="paused",b=M},stop:()=>{p=!0,C!=="idle"&&(C="idle",u&&u(),Q())},cancel:()=>{O!==null&&B(O),Q()},complete:()=>{C="finished"},sample:E=>(w=0,B(E))};return Dt}function rr(t){let e;return()=>(e===void 0&&(e=t()),e)}const Fa=rr(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ia=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ie=10,ka=2e4,Oa=(t,e)=>e.type==="spring"||t==="backgroundColor"||!ki(e.ease);function ja(t,e,{onUpdate:n,onComplete:s,...i}){if(!(Fa()&&Ia.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let r=!1,a,c;const u=()=>{c=new Promise(v=>{a=v})};u();let{keyframes:l,duration:f=300,ease:h,times:d}=i;if(Oa(e,i)){const v=Kt({...i,repeat:0,delay:0});let g={done:!1,value:l[0]};const P=[];let A=0;for(;!g.done&&Ap.cancel(),x=()=>{V.update(y),a(),u()};return p.onfinish=()=>{t.set(Qo(l,i)),s&&s(),x()},{then(v,g){return c.then(v,g)},attachTimeline(v){return p.timeline=v,p.onfinish=null,L},get time(){return _(p.currentTime||0)},set time(v){p.currentTime=et(v)},get speed(){return p.playbackRate},set speed(v){p.playbackRate=v},get duration(){return _(f)},play:()=>{r||(p.play(),N(y))},pause:()=>p.pause(),stop:()=>{if(r=!0,p.playState==="idle")return;const{currentTime:v}=p;if(v){const g=Kt({...i,autoplay:!1});t.setWithVelocity(g.sample(v-ie).value,g.sample(v).value,ie)}x()},complete:()=>p.finish(),cancel:x}}function Ua({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,speed:1,duration:0,play:L,pause:L,stop:L,then:o=>(o(),Promise.resolve()),cancel:L,complete:L});return e?Kt({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const Na={type:"spring",stiffness:500,damping:25,restSpeed:10},za=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Wa={type:"keyframes",duration:.8},Ha={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ga=(t,{keyframes:e})=>e.length>2?Wa:J.has(t)?t.startsWith("scale")?za(e[1]):Na:Ha,en=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ut.test(e)||e==="0")&&!e.startsWith("url(")),$a=new Set(["brightness","contrast","saturate","opacity"]);function Ka(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Se)||[];if(!s)return t;const i=n.replace(s,"");let o=$a.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const _a=/([a-z-]*)\(.*?\)/g,nn={...ut,getAnimatableNone:t=>{const e=t.match(_a);return e?e.map(Ka).join(" "):t}},Xa={...yi,color:U,backgroundColor:U,outlineColor:U,fill:U,stroke:U,borderColor:U,borderTopColor:U,borderRightColor:U,borderBottomColor:U,borderLeftColor:U,filter:nn,WebkitFilter:nn},Fn=t=>Xa[t];function or(t,e){let n=Fn(t);return n!==nn&&(n=ut),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ar=t=>/^0[^.\s]+$/.test(t);function Ya(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||ar(t)}function qa(t,e,n,s){const i=en(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const r=s.from!==void 0?s.from:t.get();let a;const c=[];for(let u=0;ui=>{const o=cr(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a=a-et(r);const c=qa(e,t,n,o),u=c[0],l=c[c.length-1],f=en(t,u),h=en(t,l);let d={keyframes:c,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{e.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(Za(o)||(d={...d,...Ga(t,d)}),d.duration&&(d.duration=et(d.duration)),d.repeatDelay&&(d.repeatDelay=et(d.repeatDelay)),!f||!h||de.current||o.type===!1)return Ua(de.current?{...d,delay:0}:d);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=ja(e,t,d);if(p)return p}return Kt(d)};function ge(t){return!!(k(t)&&t.add)}const ur=t=>/^\-?\d*\.?\d+$/.test(t);function Me(t,e){t.indexOf(e)===-1&&t.push(e)}function Ct(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function Ja([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&sCt(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o!isNaN(parseFloat(t)),jt={current:void 0};class lr{constructor(e,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{this.prev=this.current,this.current=s;const{delta:o,timestamp:r}=I;this.lastUpdated!==r&&(this.timeDelta=o,this.lastUpdated=r,V.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>V.postRender(this.velocityCheck),this.velocityCheck=({timestamp:s})=>{s!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Qa(this.current),this.owner=n.owner}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new kn);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=e,this.timeDelta=s}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return jt.current&&jt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Ln(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function K(t,e){return new lr(t,e)}const fr=t=>e=>e.test(t),tc={test:t=>t==="auto",parse:t=>t},hr=[Pt,S,Z,st,yo,go,tc],Rt=t=>hr.find(fr(t)),ec=[...hr,U,ut],nc=t=>ec.find(fr(t));function sc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,K(n))}function On(t,e){const n=Ve(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const r in o){const a=Eo(o[r]);sc(t,r,a)}}function sn(t,e){[...e].reverse().forEach(s=>{const i=t.getVariant(s);i&&On(t,i),t.variantChildren&&t.variantChildren.forEach(o=>{sn(o,e)})})}function ic(t,e){if(Array.isArray(e))return sn(t,e);if(typeof e=="string")return sn(t,[e]);On(t,e)}function dr(t,e,n){var s,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),r=o.length;if(r)for(let a=0;ac.remove(f))),u.push(y)}return r&&Promise.all(u).then(()=>{r&&On(t,r)}),u}function rn(t,e,n={}){const s=Ve(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(jn(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:l,staggerDirection:f}=i;return ac(t,e,u+c,l,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function ac(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,c=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(cc).forEach((u,l)=>{u.notify("AnimationStart",e),r.push(rn(u,e,{...o,delay:n+c(l)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}function cc(t,e){return t.sortNodePosition(e)}function Un(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>rn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=rn(t,e,n);else{const i=typeof e=="function"?Ve(t,e,n.custom):e;s=Promise.all(jn(t,i,n))}return s.then(()=>t.notify("AnimationComplete",e))}const uc=[...pn].reverse(),lc=pn.length;function fc(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Un(t,n,s)))}function hc(t){let e=fc(t);const n=mc();let s=!0;const i=(c,u)=>{const l=Ve(t,u);if(l){const{transition:f,transitionEnd:h,...d}=l;c={...c,...d,...h}}return c};function o(c){e=c(t)}function r(c,u){const l=t.getProps(),f=t.getVariantContext(!0)||{},h=[],d=new Set;let p={},y=1/0;for(let T=0;Ty&&A;const O=Array.isArray(P)?P:[P];let H=O.reduce(i,{});D===!1&&(H={});const{prevResolvedValues:X={}}=g,G={...X,...H},M=B=>{w=!0,d.delete(B),g.needsAnimating[B]=!0};for(const B in G){const $=H[B],Q=X[B];p.hasOwnProperty(B)||($!==Q?he($)&&he(Q)?!Li($,Q)||b?M(B):g.protectedKeys[B]=!0:$!==void 0?M(B):d.add(B):$!==void 0&&d.has(B)?M(B):g.protectedKeys[B]=!0)}g.prevProp=P,g.prevResolvedValues=H,g.isActive&&(p={...p,...H}),s&&t.blockInitialAnimation&&(w=!1),w&&!C&&h.push(...O.map(B=>({animation:B,options:{type:v,...c}})))}if(d.size){const T={};d.forEach(v=>{const g=t.getBaseTarget(v);g!==void 0&&(T[v]=g)}),h.push({animation:T})}let x=!!h.length;return s&&l.initial===!1&&!t.manuallyAnimateOnMount&&(x=!1),s=!1,x?e(h):Promise.resolve()}function a(c,u,l){var f;if(n[c].isActive===u)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(d=>{var p;return(p=d.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const h=r(l,c);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function dc(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Li(e,t):!1}function ht(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mc(){return{animate:ht(!0),whileInView:ht(),whileHover:ht(),whileTap:ht(),whileDrag:ht(),whileFocus:ht(),exit:ht()}}class pc extends lt{constructor(e){super(e),e.animationState||(e.animationState=hc(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Te(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let gc=0;class yc extends lt{constructor(){super(...arguments),this.id=gc++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:s}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:s??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const pr={animation:{Feature:pc},exit:{Feature:yc}},ls=(t,e)=>Math.abs(t-e);function vc(t,e){const n=ls(t.x,e.x),s=ls(t.y,e.y);return Math.sqrt(n**2+s**2)}class gr{constructor(e,n,{transformPagePoint:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Ne(this.lastMoveEventInfo,this.history),l=this.startEvent!==null,f=vc(u.offset,{x:0,y:0})>=3;if(!l&&!f)return;const{point:h}=u,{timestamp:d}=I;this.history.push({...h,timestamp:d});const{onStart:p,onMove:y}=this.handlers;l||(p&&p(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,u)},this.handlePointerMove=(u,l)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Ue(l,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(u,l)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:h}=this.handlers,d=Ne(u.type==="pointercancel"?this.lastMoveEventInfo:Ue(l,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,d),h&&h(u,d)},!Ci(e))return;this.handlers=n,this.transformPagePoint=s;const i=Ae(e),o=Ue(i,this.transformPagePoint),{point:r}=o,{timestamp:a}=I;this.history=[{...r,timestamp:a}];const{onSessionStart:c}=n;c&&c(e,Ne(o,this.history)),this.removeListeners=ot(tt(window,"pointermove",this.handlePointerMove),tt(window,"pointerup",this.handlePointerUp),tt(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),N(this.updatePoint)}}function Ue(t,e){return e?{point:e(t.point)}:t}function fs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ne({point:t},e){return{point:t,delta:fs(t,yr(e)),offset:fs(t,xc(e)),velocity:Pc(e,.1)}}function xc(t){return t[0]}function yr(t){return t[t.length-1]}function Pc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=yr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>et(e)));)n--;if(!s)return{x:0,y:0};const o=_(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function z(t){return t.max-t.min}function on(t,e=0,n=.01){return Math.abs(t-e)<=n}function hs(t,e,n,s=.5){t.origin=s,t.originPoint=R(e.min,e.max,t.origin),t.scale=z(n)/z(e),(on(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=R(n.min,n.max,t.origin)-t.originPoint,(on(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Ut(t,e,n,s){hs(t.x,e.x,n.x,s?s.originX:void 0),hs(t.y,e.y,n.y,s?s.originY:void 0)}function ds(t,e,n){t.min=n.min+e.min,t.max=t.min+z(e)}function Tc(t,e,n){ds(t.x,e.x,n.x),ds(t.y,e.y,n.y)}function ms(t,e,n){t.min=e.min-n.min,t.max=t.min+z(e)}function Nt(t,e,n){ms(t.x,e.x,n.x),ms(t.y,e.y,n.y)}function bc(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?R(n,t,s.max):Math.min(t,n)),t}function ps(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Sc(t,{top:e,left:n,bottom:s,right:i}){return{x:ps(t.x,n,i),y:ps(t.y,e,s)}}function gs(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=yt(e.min,e.max-s,t.min):s>i&&(n=yt(t.min,t.max-i,e.min)),ct(0,1,n)}function Cc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const an=.35;function wc(t=an){return t===!1?t=0:t===!0&&(t=an),{x:ys(t,"left","right"),y:ys(t,"top","bottom")}}function ys(t,e,n){return{min:vs(t,e),max:vs(t,n)}}function vs(t,e){return typeof t=="number"?t:t[e]||0}const xs=()=>({translate:0,scale:1,origin:0,originPoint:0}),At=()=>({x:xs(),y:xs()}),Ps=()=>({min:0,max:0}),F=()=>({x:Ps(),y:Ps()});function Y(t){return[t("x"),t("y")]}function vr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Mc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Dc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ze(t){return t===void 0||t===1}function cn({scale:t,scaleX:e,scaleY:n}){return!ze(t)||!ze(e)||!ze(n)}function dt(t){return cn(t)||xr(t)||t.z||t.rotate||t.rotateX||t.rotateY}function xr(t){return Ts(t.x)||Ts(t.y)}function Ts(t){return t&&t!=="0%"}function ye(t,e,n){const s=t-n,i=e*s;return n+i}function bs(t,e,n,s,i){return i!==void 0&&(t=ye(t,i,s)),ye(t,n,s)+e}function un(t,e=0,n=1,s,i){t.min=bs(t.min,e,n,s,i),t.max=bs(t.max,e,n,s,i)}function Pr(t,{x:e,y:n}){un(t.x,e.translate,e.scale,e.originPoint),un(t.y,n.translate,n.scale,n.originPoint)}function Ec(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function rt(t,e){t.min=t.min+e,t.max=t.max+e}function As(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=R(t.min,t.max,o);un(t,e[n],e[s],r,e.scale)}const Rc=["x","scaleX","originX"],Lc=["y","scaleY","originY"];function Vt(t,e){As(t.x,e,Rc),As(t.y,e,Lc)}function Tr(t,e){return vr(Dc(t.getBoundingClientRect(),e))}function Bc(t,e,n){const s=Tr(t,n),{scroll:i}=e;return i&&(rt(s.x,i.offset.x),rt(s.y,i.offset.y)),s}const Fc=new WeakMap;class Ic{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=F(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{this.stopAnimation(),n&&this.snapToCursor(Ae(c,"page").point)},o=(c,u)=>{const{drag:l,dragPropagation:f,onDragStart:h}=this.getProps();if(l&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Mi(l),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Y(p=>{let y=this.getAxisMotionValue(p).get()||0;if(Z.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[p];T&&(y=z(T)*(parseFloat(y)/100))}}this.originPoint[p]=y}),h&&V.update(()=>h(c,u),!1,!0);const{animationState:d}=this.visualElement;d&&d.setActive("whileDrag",!0)},r=(c,u)=>{const{dragPropagation:l,dragDirectionLock:f,onDirectionLock:h,onDrag:d}=this.getProps();if(!l&&!this.openGlobalLock)return;const{offset:p}=u;if(f&&this.currentDirection===null){this.currentDirection=kc(p),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),d&&d(c,u)},a=(c,u)=>this.stop(c,u);this.panSession=new gr(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&V.update(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!re(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=bc(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),{layout:s}=this.visualElement.projection||{},i=this.constraints;e&&bt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Sc(s.layoutBox,e):this.constraints=!1,this.elastic=wc(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Y(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Cc(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!bt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Bc(s,i.root,this.visualElement.getTransformPagePoint());let r=Ac(i.layout.layoutBox,o);if(n){const a=n(Mc(r));this.hasMutatedConstraints=!!a,a&&(r=vr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=Y(l=>{if(!re(l,n,this.currentDirection))return;let f=c&&c[l]||{};r&&(f={min:0,max:0});const h=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[l]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(l,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(In(e,s,0,n))}stopAnimation(){Y(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){Y(n=>{const{drag:s}=this.getProps();if(!re(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-R(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!bt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Y(r=>{const a=this.getAxisMotionValue(r);if(a){const c=a.get();i[r]=Vc({min:c,max:c},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Y(r=>{if(!re(r,e,null))return;const a=this.getAxisMotionValue(r),{min:c,max:u}=this.constraints[r];a.set(R(c,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Fc.set(this.visualElement,this);const e=this.visualElement.current,n=tt(e,"pointerdown",c=>{const{drag:u,dragListener:l=!0}=this.getProps();u&&l&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();bt(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const r=q(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Y(l=>{const f=this.getAxisMotionValue(l);f&&(this.originPoint[l]+=c[l].translate,f.set(f.get()+c[l].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=an,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function re(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function kc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Oc extends lt{constructor(e){super(e),this.removeGroupControls=L,this.removeListeners=L,this.controls=new Ic(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||L}unmount(){this.removeGroupControls(),this.removeListeners()}}const Vs=t=>(e,n)=>{t&&V.update(()=>t(e,n))};class jc extends lt{constructor(){super(...arguments),this.removePointerDownListener=L}onPointerDown(e){this.session=new gr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Vs(e),onStart:Vs(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&V.update(()=>i(o,r))}}}mount(){this.removePointerDownListener=tt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Uc(){const t=m.useContext(Yt);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=m.useId();return m.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}function lf(){return Nc(m.useContext(Yt))}function Nc(t){return t===null?!0:t.isPresent}const ae={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Cs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Lt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=Cs(t,e.target.x),s=Cs(t,e.target.y);return`${n}% ${s}%`}},zc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=ut.parse(t);if(i.length>5)return s;const o=ut.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=c;const u=R(a,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};class Wc extends ui.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;co(Hc),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ae.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||V.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function br(t){const[e,n]=Uc(),s=m.useContext(Gt);return ui.createElement(Wc,{...t,layoutGroup:s,switchLayoutGroup:m.useContext(fi),isPresent:e,safeToRemove:n})}const Hc={borderRadius:{...Lt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lt,borderTopRightRadius:Lt,borderBottomLeftRadius:Lt,borderBottomRightRadius:Lt,boxShadow:zc},Sr=["TopLeft","TopRight","BottomLeft","BottomRight"],Gc=Sr.length,ws=t=>typeof t=="string"?parseFloat(t):t,Ms=t=>typeof t=="number"||S.test(t);function $c(t,e,n,s,i,o){i?(t.opacity=R(0,n.opacity!==void 0?n.opacity:1,Kc(s)),t.opacityExit=R(e.opacity!==void 0?e.opacity:1,0,_c(s))):o&&(t.opacity=R(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;rse?1:n(yt(t,e,s))}function Es(t,e){t.min=e.min,t.max=e.max}function W(t,e){Es(t.x,e.x),Es(t.y,e.y)}function Rs(t,e,n,s,i){return t-=e,t=ye(t,1/n,s),i!==void 0&&(t=ye(t,1/i,s)),t}function Xc(t,e=0,n=1,s=.5,i,o=t,r=t){if(Z.test(e)&&(e=parseFloat(e),e=R(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=R(o.min,o.max,s);t===o&&(a-=e),t.min=Rs(t.min,e,n,a,i),t.max=Rs(t.max,e,n,a,i)}function Ls(t,e,[n,s,i],o,r){Xc(t,e[n],e[s],e[i],e.scale,o,r)}const Yc=["x","scaleX","originX"],qc=["y","scaleY","originY"];function Bs(t,e,n,s){Ls(t.x,e,Yc,n?n.x:void 0,s?s.x:void 0),Ls(t.y,e,qc,n?n.y:void 0,s?s.y:void 0)}function Fs(t){return t.translate===0&&t.scale===1}function Vr(t){return Fs(t.x)&&Fs(t.y)}function Zc(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Cr(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Is(t){return z(t.x)/z(t.y)}class Jc{constructor(){this.members=[]}add(e){Me(this.members,e),e.scheduleRender()}remove(e){if(Ct(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ks(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:c,rotateX:u,rotateY:l}=n;c&&(s+=`rotate(${c}deg) `),u&&(s+=`rotateX(${u}deg) `),l&&(s+=`rotateY(${l}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return(r!==1||a!==1)&&(s+=`scale(${r}, ${a})`),s||"none"}const Qc=(t,e)=>t.depth-e.depth;class tu{constructor(){this.children=[],this.isDirty=!1}add(e){Me(this.children,e),this.isDirty=!0}remove(e){Ct(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Qc),this.isDirty=!1,this.children.forEach(e)}}function eu(t,e){const n=performance.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(N(s),t(o-e))};return V.read(s,!0),()=>N(s)}function nu(t){window.MotionDebug&&window.MotionDebug.record(t)}function wr(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Nn(t,e,n){const s=k(t)?t:K(t);return s.start(In("",s,e,n)),s.animation}const Os=["","X","Y","Z"],js=1e3;let su=0;const mt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Mr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=su++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{mt.totalNodes=mt.resolvedTargetDeltas=mt.recalculatedProjection=0,this.nodes.forEach(ou),this.nodes.forEach(fu),this.nodes.forEach(hu),this.nodes.forEach(au),nu(mt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=eu(h,250),ae.hasAnimatedSinceResize&&(ae.hasAnimatedSinceResize=!1,this.nodes.forEach(Ns))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&l&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||yu,{onLayoutAnimationStart:x,onLayoutAnimationComplete:T}=l.getProps(),v=!this.targetLayout||!Cr(this.targetLayout,p)||d,g=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const P={...cr(y,"layout"),onPlay:x,onComplete:T};(l.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else h||Ns(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,N(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(du),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;lthis.update()))}clearAllSnapshots(){this.nodes.forEach(cu),this.sharedNodes.forEach(mu)}scheduleUpdateProjection(){V.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const A=P/1e3;zs(f.x,r.x,A),zs(f.y,r.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pu(this.relativeTarget,this.relativeTargetOrigin,h,A),g&&Zc(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=F()),W(g,this.relativeTarget)),y&&(this.animationValues=l,$c(l,u,this.latestValues,A,v,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(N(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{ae.hasAnimatedSinceResize=!0,this.currentAnimation=Nn(0,js,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(js),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:l}=r;if(!(!a||!c||!u)){if(this!==r&&this.layout&&u&&Dr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||F();const f=z(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+f;const h=z(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+h}W(a,c),Vt(a,l),Ut(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Jc),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:c}=r;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const u={};for(let l=0;l{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Us),this.root.sharedNodes.clear()}}}function iu(t){t.updateLayout()}function ru(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?Y(f=>{const h=r?n.measuredBox[f]:n.layoutBox[f],d=z(h);h.min=s[f].min,h.max=h.min+d}):Dr(o,n.layoutBox,s)&&Y(f=>{const h=r?n.measuredBox[f]:n.layoutBox[f],d=z(s[f]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+d)});const a=At();Ut(a,s,n.layoutBox);const c=At();r?Ut(c,t.applyTransform(i,!0),n.measuredBox):Ut(c,s,n.layoutBox);const u=!Vr(a);let l=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=F();Nt(p,n.layoutBox,h.layoutBox);const y=F();Nt(y,s,d.layoutBox),Cr(p,y)||(l=!0),f.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:l})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function ou(t){mt.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function au(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function cu(t){t.clearSnapshot()}function Us(t){t.clearMeasurements()}function uu(t){t.isLayoutDirty=!1}function lu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ns(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function fu(t){t.resolveTargetDelta()}function hu(t){t.calcProjection()}function du(t){t.resetRotation()}function mu(t){t.removeLeadSnapshot()}function zs(t,e,n){t.translate=R(e.translate,0,n),t.scale=R(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ws(t,e,n,s){t.min=R(e.min,n.min,s),t.max=R(e.max,n.max,s)}function pu(t,e,n,s){Ws(t.x,e.x,n.x,s),Ws(t.y,e.y,n.y,s)}function gu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const yu={duration:.45,ease:[.4,0,.1,1]},Hs=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),Gs=Hs("applewebkit/")&&!Hs("chrome/")?Math.round:L;function $s(t){t.min=Gs(t.min),t.max=Gs(t.max)}function vu(t){$s(t.x),$s(t.y)}function Dr(t,e,n){return t==="position"||t==="preserve-aspect"&&!on(Is(e),Is(n),.2)}const xu=Mr({attachResizeListener:(t,e)=>q(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),gt={current:void 0},Er=Mr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!gt.current){const t=new xu({});t.mount(window),t.setOptions({layoutScroll:!0}),gt.current=t}return gt.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Rr={pan:{Feature:jc},drag:{Feature:Oc,ProjectionNode:Er,MeasureLayout:br}},Pu=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Tu(t){const e=Pu.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}function ln(t,e,n=1){const[s,i]=Tu(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return ur(r)?parseFloat(r):r}else return _e(i)?ln(i,e,n+1):i}function bu(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const o=i.get();if(!_e(o))return;const r=ln(o,s);r&&i.set(r)});for(const i in e){const o=e[i];if(!_e(o))continue;const r=ln(o,s);r&&(e[i]=r,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:e,transitionEnd:n}}const Su=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Lr=t=>Su.has(t),Au=t=>Object.keys(t).some(Lr),Ks=t=>t===Pt||t===S,_s=(t,e)=>parseFloat(t.split(", ")[e]),Xs=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return _s(i[1],e);{const o=s.match(/^matrix\((.+)\)$/);return o?_s(o[1],t):0}},Vu=new Set(["x","y","z"]),Cu=qt.filter(t=>!Vu.has(t));function wu(t){const e=[];return Cu.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const wt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Xs(4,13),y:Xs(5,14)};wt.translateX=wt.x;wt.translateY=wt.y;const Mu=(t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};r==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(u=>{a[u]=wt[u](s,o)}),e.render();const c=e.measureViewportBox();return n.forEach(u=>{const l=e.getValue(u);l&&l.jump(a[u]),t[u]=wt[u](c,o)}),t},Du=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(Lr);let o=[],r=!1;const a=[];if(i.forEach(c=>{const u=t.getValue(c);if(!t.hasValue(c))return;let l=n[c],f=Rt(l);const h=e[c];let d;if(he(h)){const p=h.length,y=h[0]===null?1:0;l=h[y],f=Rt(l);for(let x=y;x=0?window.pageYOffset:null,u=Mu(e,t,a);return o.length&&o.forEach(([l,f])=>{t.getValue(l).set(f)}),t.render(),Pe&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:s}}else return{target:e,transitionEnd:s}};function Eu(t,e,n,s){return Au(e)?Du(t,e,n,s):{target:e,transitionEnd:s}}const Ru=(t,e,n,s)=>{const i=bu(t,e,s);return e=i.target,s=i.transitionEnd,Eu(t,e,n,s)},ve={current:null},zn={current:!1};function Br(){if(zn.current=!0,!!Pe)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ve.current=t.matches;t.addListener(e),e()}else ve.current=!1}function Lu(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(k(o))t.addValue(i,o),ge(s)&&s.add(i);else if(k(r))t.addValue(i,K(o,{owner:t})),ge(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,K(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const _t=new WeakMap,Fr=Object.keys(Ht),Bu=Fr.length,Ys=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Fu=gn.length;class Ir{constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>V.render(this.render,!1,!0);const{latestValues:a,renderState:c}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.isControllingVariants=be(n),this.isVariantNode=li(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...l}=this.scrapeMotionValuesFromProps(n,{});for(const f in l){const h=l[f];a[f]!==void 0&&k(h)&&(h.set(a[f],!1),ge(u)&&u.add(f))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,_t.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),zn.current||Br(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ve.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){_t.delete(this.current),this.projection&&this.projection.unmount(),N(this.notifyUpdate),N(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const s=J.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&V.update(this.notifyUpdate,!1,!0),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,o){let r,a;for(let c=0;cthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):F()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=K(n,{owner:this}),this.addValue(e,s)),s}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props,i=typeof s=="string"||typeof s=="object"?(n=Vn(this.props,s))===null||n===void 0?void 0:n[e]:void 0;if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!k(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new kn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class kr extends Ir{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s},{transformValues:i},o){let r=mr(s,e||{},this);if(i&&(n&&(n=i(n)),s&&(s=i(s)),r&&(r=i(r))),o){dr(this,s,r);const a=Ru(this,s,r,n);n=a.transitionEnd,s=a.target}return{transition:e,transitionEnd:n,...s}}}function Iu(t){return window.getComputedStyle(t)}class Or extends kr{readValueFromInstance(e,n){if(J.has(n)){const s=Fn(n);return s&&s.default||0}else{const s=Iu(e),i=(xn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Tr(e,n)}build(e,n,s,i){Pn(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return An(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;k(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){bi(e,n,s,i)}}class jr extends kr{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(J.has(n)){const s=Fn(n);return s&&s.default||0}return n=Si.has(n)?n:$t(n),e.getAttribute(n)}measureInstanceViewportBox(){return F()}scrapeMotionValuesFromProps(e,n){return Vi(e,n)}build(e,n,s,i){bn(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Ai(e,n,s,i)}mount(e){this.isSVGTag=Sn(e.tagName),super.mount(e)}}const Wn=(t,e)=>vn(t)?new jr(e,{enableHardwareAcceleration:!1}):new Or(e,{enableHardwareAcceleration:!0}),Ur={layout:{ProjectionNode:Er,MeasureLayout:br}},Nr={...pr,...Ri,...Rr,...Ur},zr=di((t,e)=>wn(t,e,Nr,Wn));function hf(t){return hi(wn(t,{forwardMotionProps:!1},Nr,Wn))}const df=di(wn);function Wr(){const t=m.useRef(!1);return xt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Hn(){const t=Wr(),[e,n]=m.useState(0),s=m.useCallback(()=>{t.current&&n(e+1)},[e]);return[m.useCallback(()=>V.postRender(s),[s]),e]}class ku extends m.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ou({children:t,isPresent:e}){const n=m.useId(),s=m.useRef(null),i=m.useRef({width:0,height:0,top:0,left:0});return m.useInsertionEffect(()=>{const{width:o,height:r,top:a,left:c}=i.current;if(e||!s.current||!o||!r)return;s.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${o}px !important; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index-c925a4cb.js b/FILES/etc/config/clash/clash-dashboard/assets/index-c925a4cb.js deleted file mode 100644 index 9c70907..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/index-c925a4cb.js +++ /dev/null @@ -1,127 +0,0 @@ -var Ty=Object.defineProperty;var Iy=(e,t,n)=>t in e?Ty(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var hf=(e,t,n)=>(Iy(e,typeof t!="symbol"?t+"":t,n),n);function Dy(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const My="modulepreload",Ay=function(e,t){return new URL(e,t).href},mf={},ct=function(t,n,r){if(!n||n.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=Ay(i,r),i in mf)return;mf[i]=!0;const s=i.endsWith(".css"),a=s?'[rel="stylesheet"]':"";if(!!r)for(let c=o.length-1;c>=0;c--){const d=o[c];if(d.href===i&&(!s||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":My,s||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),s)return new Promise((c,d)=>{u.addEventListener("load",c),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})};function Bs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jy(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Zp={exports:{}},Ws={},eh={exports:{}},W={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Uo=Symbol.for("react.element"),Fy=Symbol.for("react.portal"),Uy=Symbol.for("react.fragment"),$y=Symbol.for("react.strict_mode"),zy=Symbol.for("react.profiler"),By=Symbol.for("react.provider"),Wy=Symbol.for("react.context"),Vy=Symbol.for("react.forward_ref"),Hy=Symbol.for("react.suspense"),Qy=Symbol.for("react.memo"),Ky=Symbol.for("react.lazy"),gf=Symbol.iterator;function qy(e){return e===null||typeof e!="object"?null:(e=gf&&e[gf]||e["@@iterator"],typeof e=="function"?e:null)}var th={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nh=Object.assign,rh={};function Or(e,t,n){this.props=e,this.context=t,this.refs=rh,this.updater=n||th}Or.prototype.isReactComponent={};Or.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Or.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function oh(){}oh.prototype=Or.prototype;function $u(e,t,n){this.props=e,this.context=t,this.refs=rh,this.updater=n||th}var zu=$u.prototype=new oh;zu.constructor=$u;nh(zu,Or.prototype);zu.isPureReactComponent=!0;var vf=Array.isArray,ih=Object.prototype.hasOwnProperty,Bu={current:null},sh={key:!0,ref:!0,__self:!0,__source:!0};function ah(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)ih.call(t,r)&&!sh.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(11&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||i0,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(r=>r!==n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{s(...r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(s=>{s.apply(s,[t,...r])})}}function Dr(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function wf(e){return e==null?"":""+e}function s0(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}function Vu(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}const i=typeof t!="string"?[].concat(t):t.split(".");for(;i.length>1;){if(o())return{};const s=r(i.shift());!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={}}return o()?{}:{obj:e,k:r(i.shift())}}function Sf(e,t,n){const{obj:r,k:o}=Vu(e,t,Object);r[o]=n}function a0(e,t,n,r){const{obj:o,k:i}=Vu(e,t,Object);o[i]=o[i]||[],r&&(o[i]=o[i].concat(n)),r||o[i].push(n)}function Xi(e,t){const{obj:n,k:r}=Vu(e,t);if(n)return n[r]}function l0(e,t,n){const r=Xi(e,n);return r!==void 0?r:Xi(t,n)}function uh(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):uh(e[r],t[r],n):e[r]=t[r]);return e}function Bn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var u0={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function c0(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>u0[t]):e}const f0=[" ",",","?","!",";"];function d0(e,t,n){t=t||"",n=n||"";const r=f0.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const o=new RegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(e);if(!i){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i}function Zi(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;ii+s;)s++,a=r.slice(i,i+s).join(n),l=o[a];if(l===void 0)return;if(l===null)return null;if(t.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}const u=r.slice(i+s).join(n);return u?Zi(l,u,n):void 0}o=o[r[i]]}return o}function es(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class xf extends Vs{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a=[t,n];r&&typeof r!="string"&&(a=a.concat(r)),r&&typeof r=="string"&&(a=a.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(a=t.split("."));const l=Xi(this.data,a);return l||!s||typeof r!="string"?l:Zi(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),o=n,n=a[1]),this.addNamespaces(n),Sf(this.data,a,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Object.prototype.toString.apply(r[i])==="[object Array]")&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),o=r,r=n,n=a[1]),this.addNamespaces(n);let l=Xi(this.data,a)||{};o?uh(l,r,i):l={...l,...r},Sf(this.data,a,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var ch={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,o))}),t}};const Ef={};class ts extends Vs{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),s0(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=wt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!d0(t,r,o);if(s&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:i};const u=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),t=u.join(o)}return typeof i=="string"&&(i=[i]),{key:t,namespaces:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const E=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${E}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l}:`${l}${E}${s}`}return o?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l}:s}const d=this.resolve(t,n);let f=d&&d.res;const g=d&&d.usedKey||s,y=d&&d.exactUsedKey||s,S=Object.prototype.toString.apply(f),_=["[object Number]","[object Function]","[object RegExp]"],m=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,p=!this.i18nFormat||this.i18nFormat.handleAsObject;if(p&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&_.indexOf(S)<0&&!(typeof m=="string"&&S==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,f,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(d.res=E,d):E}if(i){const E=S==="[object Array]",b=E?[]:{},P=E?y:g;for(const O in f)if(Object.prototype.hasOwnProperty.call(f,O)){const x=`${P}${i}${O}`;b[O]=this.translate(x,{...n,joinArrays:!1,ns:a}),b[O]===x&&(b[O]=f[O])}f=b}}else if(p&&typeof m=="string"&&S==="[object Array]")f=f.join(m),f&&(f=this.extendTranslation(f,t,n,r));else{let E=!1,b=!1;const P=n.count!==void 0&&typeof n.count!="string",O=ts.hasDefaultValue(n),x=P?this.pluralResolver.getSuffix(u,n.count,n):"",R=n.ordinal&&P?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",L=n[`defaultValue${x}`]||n[`defaultValue${R}`]||n.defaultValue;!this.isValidLookup(f)&&O&&(E=!0,f=L),this.isValidLookup(f)||(b=!0,f=s);const j=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&b?void 0:f,A=O&&L!==f&&this.options.updateMissing;if(b||E||A){if(this.logger.log(A?"updateKey":"missingKey",u,l,s,A?L:f),i){const C=this.resolve(s,{...n,keySeparator:!1});C&&C.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let N=[];const T=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&T&&T[0])for(let C=0;C{const $=O&&M!==f?M:j;this.options.missingKeyHandler?this.options.missingKeyHandler(C,l,k,$,A,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(C,l,k,$,A,n),this.emit("missingKey",C,l,k,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?N.forEach(C=>{this.pluralResolver.getSuffixes(C,n).forEach(k=>{F([C],s+k,n[`defaultValue${k}`]||L)})}):F(N,s,L))}f=this.extendTranslation(f,t,n,d,r),b&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(b||E)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,E?f:void 0):f=this.options.parseMissingKeyHandler(f))}return o?(d.res=f,d):f}extendTranslation(t,n,r,o,i){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=t.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language,r),u){const f=t.match(this.interpolator.nestingRegexp),g=f&&f.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,s,a;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;o=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",g=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),y=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",S=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(_=>{this.isValidLookup(r)||(a=_,!Ef[`${S[0]}-${_}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Ef[`${S[0]}-${_}`]=!0,this.logger.warn(`key "${o}" for languages "${S.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),S.forEach(m=>{if(this.isValidLookup(r))return;s=m;const p=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(p,c,m,_,n);else{let E;f&&(E=this.pluralResolver.getSuffix(m,n.count,n));const b=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(p.push(c+E),n.ordinal&&E.indexOf(P)===0&&p.push(c+E.replace(P,this.options.pluralSeparator)),g&&p.push(c+b)),y){const O=`${c}${this.options.contextSeparator}${n.context}`;p.push(O),f&&(p.push(O+E),n.ordinal&&E.indexOf(P)===0&&p.push(O+E.replace(P,this.options.pluralSeparator)),g&&p.push(O+b))}}let h;for(;h=p.pop();)this.isValidLookup(r)||(i=h,r=this.getResource(m,_,h,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function wa(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Cf{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wt.create("languageUtils")}getScriptPartFromCode(t){if(t=es(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=es(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=wa(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=wa(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=wa(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&i.indexOf(o)===0)return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):typeof t=="string"&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.indexOf(s)<0&&i(this.formatLanguageCode(s))}),o}}let p0=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],h0={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const m0=["v1","v2","v3"],g0=["v4"],_f={zero:0,one:1,two:2,few:3,many:4,other:5};function v0(){const e={};return p0.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:h0[t.fc]}})}),e}class y0{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=wt.create("pluralResolver"),(!this.options.compatibilityJSON||g0.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=v0()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(es(t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>_f[o]-_f[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!m0.includes(this.options.compatibilityJSON)}}function kf(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=l0(e,t,n);return!i&&o&&typeof n=="string"&&(i=Zi(e,n,r),i===void 0&&(i=Zi(t,n,r))),i}class w0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:c0,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Bn(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Bn(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?Bn(n.nestingPrefix):n.nestingPrefixEscaped||Bn("$t("),this.nestingSuffix=n.nestingSuffix?Bn(n.nestingSuffix):n.nestingSuffixEscaped||Bn(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(t,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(t,n,r,o){let i,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(y){return y.replace(/\$/g,"$$$$")}const c=y=>{if(y.indexOf(this.formatSeparator)<0){const p=kf(n,l,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(p,void 0,r,{...o,...n,interpolationkey:y}):p}const S=y.split(this.formatSeparator),_=S.shift().trim(),m=S.join(this.formatSeparator).trim();return this.format(kf(n,l,_,this.options.keySeparator,this.options.ignoreJSONStructure),m,r,{...o,...n,interpolationkey:_})};this.resetRegExp();const d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>u(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?u(this.escape(y)):u(y)}].forEach(y=>{for(a=0;i=y.regex.exec(t);){const S=i[1].trim();if(s=c(S),s===void 0)if(typeof d=="function"){const m=d(t,i,o);s=typeof m=="string"?m:""}else if(o&&Object.prototype.hasOwnProperty.call(o,S))s="";else if(f){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=wf(s));const _=y.safeValue(s);if(t=t.replace(i[0],_),f?(y.regex.lastIndex+=s.length,y.regex.lastIndex-=i[0].length):y.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,s;function a(l,u){const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const g=f.match(/'/g),y=f.match(/"/g);(g&&g.length%2===0&&!y||y.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),u&&(s={...u,...s})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,S),`${l}${c}${f}`}return delete s.defaultValue,l}for(;o=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const c=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=c.shift(),l=c,u=!0}if(i=n(a.call(this,o[1].trim(),s),s),i&&o[0]===t&&typeof i!="string")return i;typeof i!="string"&&(i=wf(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),u&&(i=l.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}function S0(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(!s)return;const[a,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[a.trim()]||(n[a.trim()]=u),u==="false"&&(n[a.trim()]=!1),u==="true"&&(n[a.trim()]=!0),isNaN(u)||(n[a.trim()]=parseInt(u,10))})}return{formatName:t,formatOptions:n}}function Wn(e){const t={};return function(r,o,i){const s=o+JSON.stringify(i);let a=t[s];return a||(a=e(es(o),i),t[s]=a),a(r)}}class x0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wt.create("formatter"),this.options=t,this.formats={number:Wn((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:Wn((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:Wn((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:Wn((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:Wn((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Wn(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,l)=>{const{formatName:u,formatOptions:c}=S0(l);if(this.formats[u]){let d=a;try{const f=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},g=f.locale||f.lng||o.locale||o.lng||r;d=this.formats[u](a,g,{...c,...o,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}function E0(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class C0 extends Vs{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=wt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const i={},s={},a={},l={};return t.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,c=!1,s[f]===void 0&&(s[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(a[u]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),i=o[0],s=o[1];n&&this.emit("failedLoading",i,s,n),r&&this.store.addResourceBundle(i,s,r),this.state[t]=n?-1:2;const a={};this.queue.forEach(l=>{a0(l.loaded,[i],s),E0(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&o{this.read.call(this,t,n,r,o+1,i*2,s)},i);return}s(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,o,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,n,r,o,l):c=u(t,n,r,o),c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}else u(t,n,r,o,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}function Of(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Pf(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ui(){}function _0(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class uo extends Vs{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Pf(t),this.services={},this.logger=wt,this.modules={external:[]},_0(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=Of();this.options={...o,...this.options,...Pf(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function i(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?wt.init(i(this.modules.logger),this.options):wt.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=x0);const d=new Cf(this.options);this.store=new xf(this.options.resources,this.options);const f=this.services;f.logger=wt,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new y0(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=i(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new w0(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new C0(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(g){for(var y=arguments.length,S=new Array(y>1?y-1:0),_=1;_1?y-1:0),_=1;_{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,r||(r=ui),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const l=Dr(),u=()=>{const c=(d,f)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui;const o=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const o=Dr();return t||(t=this.languages),n||(n=this.options.ns),r||(r=ui),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&ch.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Dr();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{s(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),o}getFixedT(t,n,r){var o=this;const i=function(s,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d`${l.keyPrefix}${f}${y}`):g=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,o.t(g,l)};return typeof t=="string"?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(i,t)))}loadNamespaces(t,n){const r=Dr();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Dr();typeof t=="string"&&(t=[t]);const o=this.options.preload||[],i=t.filter(s=>o.indexOf(s)<0);return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Cf(Of());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new uo(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new uo(o);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new xf(this.store.data,o),i.services.resourceStore=i.store),i.translator=new ts(i.services,o),i.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c0){var a=o.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(a))}if(o.domain){if(!Rf.test(o.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(o.domain)}if(o.path){if(!Rf.test(o.path))throw new TypeError("option path is invalid");s+="; Path=".concat(o.path)}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(o.expires.toUTCString())}if(o.httpOnly&&(s+="; HttpOnly"),o.secure&&(s+="; Secure"),o.sameSite){var l=typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite;switch(l){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},Lf={create:function(t,n,r,o){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),o&&(i.domain=o),document.cookie=T0(t,encodeURIComponent(n),i)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),o=0;o-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var o=r.substring(1),i=o.split("&"),s=0;s0){var l=i[s].substring(0,a);l===t.lookupQuerystring&&(n=i[s].substring(a+1))}}}return n}},Mr=null,Nf=function(){if(Mr!==null)return Mr;try{Mr=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Mr=!1}return Mr},M0={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&Nf()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&Nf()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},Ar=null,Tf=function(){if(Ar!==null)return Ar;try{Ar=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Ar=!1}return Ar},A0={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&Tf()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&Tf()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},j0={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},F0={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},U0={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},$0={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function z0(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}}var dh=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};k0(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return b0(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=N0(r,this.options||{},z0()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(i){return i.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(I0),this.addDetector(D0),this.addDetector(M0),this.addDetector(A0),this.addDetector(j0),this.addDetector(F0),this.addDetector(U0),this.addDetector($0)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var o=[];return n.forEach(function(i){if(r.detectors[i]){var s=r.detectors[i].lookup(r.options);s&&typeof s=="string"&&(s=[s]),s&&(o=o.concat(s))}}),o=o.map(function(i){return r.options.convertDetectedLanguage(i)}),this.services.languageUtils.getBestMatchFromCodes?o:o.length>0?o[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var o=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(i){o.detectors[i]&&o.detectors[i].cacheUserLanguage(n,o.options)}))}}]),e}();dh.type="languageDetector";function B0(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function Df(e,t,n){e.loadNamespaces(t,ph(e,n))}function Mf(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,ph(e,r))}function W0(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],o=t.options?t.options.fallbackLng:!1,i=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=t.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!o||s(i,e)))}function V0(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(al("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(o,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!i(o.isLanguageChangingTo,e))return!1}}):W0(e,t,n)}const H0=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Q0={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},K0=e=>Q0[e],q0=e=>e.replace(H0,K0);let ll={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:q0};function G0(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ll={...ll,...e}}function Y0(){return ll}let hh;function J0(e){hh=e}function X0(){return hh}const Z0={type:"3rdParty",init(e){G0(e.options.react),J0(e)}},e1=v.createContext();class t1{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const n1=(e,t)=>{const n=v.useRef();return v.useEffect(()=>{n.current=t?n.current:e},[e,t]),n.current};function $o(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=v.useContext(e1)||{},i=n||r||X0();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new t1),!i){al("You will need to pass in an i18next instance by using initReactI18next");const h=(b,P)=>typeof P=="string"?P:P&&typeof P=="object"&&typeof P.defaultValue=="string"?P.defaultValue:Array.isArray(b)?b[b.length-1]:b,E=[h,{},!1];return E.t=h,E.i18n={},E.ready=!1,E}i.options.react&&i.options.react.wait!==void 0&&al("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...Y0(),...i.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let u=e||o||i.options&&i.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(u);const c=(i.isInitialized||i.initializedStoreOnce)&&u.every(h=>V0(h,i,s));function d(){return i.getFixedT(t.lng||null,s.nsMode==="fallback"?u:u[0],l)}const[f,g]=v.useState(d);let y=u.join();t.lng&&(y=`${t.lng}${y}`);const S=n1(y),_=v.useRef(!0);v.useEffect(()=>{const{bindI18n:h,bindI18nStore:E}=s;_.current=!0,!c&&!a&&(t.lng?Mf(i,t.lng,u,()=>{_.current&&g(d)}):Df(i,u,()=>{_.current&&g(d)})),c&&S&&S!==y&&_.current&&g(d);function b(){_.current&&g(d)}return h&&i&&i.on(h,b),E&&i&&i.store.on(E,b),()=>{_.current=!1,h&&i&&h.split(" ").forEach(P=>i.off(P,b)),E&&i&&E.split(" ").forEach(P=>i.store.off(P,b))}},[i,y]);const m=v.useRef(!0);v.useEffect(()=>{_.current&&!m.current&&g(d),m.current=!1},[i,l]);const p=[f,i,c];if(p.t=f,p.i18n=i,p.ready=c,c||!c&&!a)return p;throw new Promise(h=>{t.lng?Mf(i,t.lng,u,()=>h()):Df(i,u,()=>h())})}const r1={type:"backend",read:(e,t,n)=>{let r;switch(e){case"zh":case"zh-CN":r=ct(()=>import("./zh-39651f1e.js"),[],import.meta.url);break;case"en":default:r=ct(()=>import("./en-b634b939.js"),[],import.meta.url);break}r?r.then(o=>n(null,o.data),o=>n(o,null)):n(new Error(`unable to load translation file for language ${e}`),null)}};Ce.use(Z0).use(dh).use(r1).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1}});const mh=""+new URL("TwemojiCountryFlags-9f04f144.woff2",import.meta.url).href;var gh={exports:{}},ze={},vh={exports:{}},yh={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */(function(e){function t(k,M){var $=k.length;k.push(M);e:for(;0<$;){var B=$-1>>>1,q=k[B];if(0>>1;Bo(hn,$))Zeo(H,hn)?(k[B]=H,k[Ze]=$,B=Ze):(k[B]=hn,k[Re]=$,B=Re);else if(Zeo(H,$))k[B]=H,k[Ze]=$,B=Ze;else break e}}return M}function o(k,M){var $=k.sortIndex-M.sortIndex;return $!==0?$:k.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,g=!1,y=!1,S=!1,_=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(k){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=k)r(u),M.sortIndex=M.expirationTime,t(l,M);else break;M=n(u)}}function E(k){if(S=!1,h(k),!y)if(n(l)!==null)y=!0,F(b);else{var M=n(u);M!==null&&C(E,M.startTime-k)}}function b(k,M){y=!1,S&&(S=!1,m(x),x=-1),g=!0;var $=f;try{for(h(M),d=n(l);d!==null&&(!(d.expirationTime>M)||k&&!D());){var B=d.callback;if(typeof B=="function"){d.callback=null,f=d.priorityLevel;var q=B(d.expirationTime<=M);M=e.unstable_now(),typeof q=="function"?d.callback=q:d===n(l)&&r(l),h(M)}else r(l);d=n(l)}if(d!==null)var be=!0;else{var Re=n(u);Re!==null&&C(E,Re.startTime-M),be=!1}return be}finally{d=null,f=$,g=!1}}var P=!1,O=null,x=-1,R=5,L=-1;function D(){return!(e.unstable_now()-Lk||125B?(k.sortIndex=$,t(u,k),n(l)===null&&k===n(u)&&(S?(m(x),x=-1):S=!0,C(E,$-B))):(k.sortIndex=q,t(l,k),y||g||(y=!0,F(b))),k},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(k){var M=f;return function(){var $=f;f=M;try{return k.apply(this,arguments)}finally{f=$}}}})(yh);vh.exports=yh;var o1=vh.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var wh=v,Fe=o1;function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ul=Object.prototype.hasOwnProperty,i1=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Af={},jf={};function s1(e){return ul.call(jf,e)?!0:ul.call(Af,e)?!1:i1.test(e)?jf[e]=!0:(Af[e]=!0,!1)}function a1(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function l1(e,t,n,r){if(t===null||typeof t>"u"||a1(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Pe(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ve[e]=new Pe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ve[t]=new Pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ve[e]=new Pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ve[e]=new Pe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ve[e]=new Pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ve[e]=new Pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ve[e]=new Pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ve[e]=new Pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ve[e]=new Pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Hu=/[\-:]([a-z])/g;function Qu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Hu,Qu);ve[t]=new Pe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Hu,Qu);ve[t]=new Pe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Hu,Qu);ve[t]=new Pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ve[e]=new Pe(e,1,!1,e.toLowerCase(),null,!1,!1)});ve.xlinkHref=new Pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ve[e]=new Pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ku(e,t,n,r){var o=ve.hasOwnProperty(t)?ve[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var l=` -`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{xa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Qr(e):""}function u1(e){switch(e.tag){case 5:return Qr(e.type);case 16:return Qr("Lazy");case 13:return Qr("Suspense");case 19:return Qr("SuspenseList");case 0:case 2:case 15:return e=Ea(e.type,!1),e;case 11:return e=Ea(e.type.render,!1),e;case 1:return e=Ea(e.type,!0),e;default:return""}}function pl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Kn:return"Fragment";case Qn:return"Portal";case cl:return"Profiler";case qu:return"StrictMode";case fl:return"Suspense";case dl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Eh:return(e.displayName||"Context")+".Consumer";case xh:return(e._context.displayName||"Context")+".Provider";case Gu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yu:return t=e.displayName||null,t!==null?t:pl(e.type)||"Memo";case Ut:t=e._payload,e=e._init;try{return pl(e(t))}catch{}}return null}function c1(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pl(t);case 8:return t===qu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ln(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _h(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function f1(e){var t=_h(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fi(e){e._valueTracker||(e._valueTracker=f1(e))}function kh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_h(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ns(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function hl(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Uf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ln(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Oh(e,t){t=t.checked,t!=null&&Ku(e,"checked",t,!1)}function ml(e,t){Oh(e,t);var n=ln(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?gl(e,t.type,n):t.hasOwnProperty("defaultValue")&&gl(e,t.type,ln(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $f(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function gl(e,t,n){(t!=="number"||ns(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Kr=Array.isArray;function ar(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=di.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function po(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Xr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},d1=["Webkit","ms","Moz","O"];Object.keys(Xr).forEach(function(e){d1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Xr[t]=Xr[e]})});function Lh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Xr.hasOwnProperty(e)&&Xr[e]?(""+t).trim():t+"px"}function Nh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Lh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var p1=re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wl(e,t){if(t){if(p1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function Sl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xl=null;function Ju(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var El=null,lr=null,ur=null;function Wf(e){if(e=Wo(e)){if(typeof El!="function")throw Error(I(280));var t=e.stateNode;t&&(t=Gs(t),El(e.stateNode,e.type,t))}}function Th(e){lr?ur?ur.push(e):ur=[e]:lr=e}function Ih(){if(lr){var e=lr,t=ur;if(ur=lr=null,Wf(e),t)for(e=0;e>>=0,e===0?32:31-(_1(e)/k1|0)|0}var pi=64,hi=4194304;function qr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ss(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=qr(a):(i&=s,i!==0&&(r=qr(i)))}else s=n&~o,s!==0?r=qr(s):i!==0&&(r=qr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function zo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-at(t),e[t]=n}function R1(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=eo),Xf=String.fromCharCode(32),Zf=!1;function Zh(e,t){switch(e){case"keyup":return rw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function em(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qn=!1;function iw(e,t){switch(e){case"compositionend":return em(t);case"keypress":return t.which!==32?null:(Zf=!0,Xf);case"textInput":return e=t.data,e===Xf&&Zf?null:e;default:return null}}function sw(e,t){if(qn)return e==="compositionend"||!ic&&Zh(e,t)?(e=Jh(),Fi=nc=Qt=null,qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=rd(n)}}function om(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?om(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function im(){for(var e=window,t=ns();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ns(e.document)}return t}function sc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function mw(e){var t=im(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&om(n.ownerDocument.documentElement,n)){if(r!==null&&sc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=od(n,i);var s=od(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Gn=null,bl=null,no=null,Rl=!1;function id(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rl||Gn==null||Gn!==ns(r)||(r=Gn,"selectionStart"in r&&sc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),no&&wo(no,r)||(no=r,r=us(bl,"onSelect"),0Xn||(e.current=Ml[Xn],Ml[Xn]=null,Xn--)}function Y(e,t){Xn++,Ml[Xn]=e.current,e.current=t}var un={},Ee=dn(un),Te=dn(!1),On=un;function mr(e,t){var n=e.type.contextTypes;if(!n)return un;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ie(e){return e=e.childContextTypes,e!=null}function fs(){X(Te),X(Ee)}function dd(e,t,n){if(Ee.current!==un)throw Error(I(168));Y(Ee,t),Y(Te,n)}function hm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(I(108,c1(e)||"Unknown",o));return re({},n,r)}function ds(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||un,On=Ee.current,Y(Ee,e),Y(Te,Te.current),!0}function pd(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=hm(e,t,On),r.__reactInternalMemoizedMergedChildContext=e,X(Te),X(Ee),Y(Ee,e)):X(Te),Y(Te,n)}var kt=null,Ys=!1,Aa=!1;function mm(e){kt===null?kt=[e]:kt.push(e)}function Pw(e){Ys=!0,mm(e)}function pn(){if(!Aa&&kt!==null){Aa=!0;var e=0,t=K;try{var n=kt;for(K=1;e>=s,o-=s,Ot=1<<32-at(t)+o|n<x?(R=O,O=null):R=O.sibling;var L=f(m,O,h[x],E);if(L===null){O===null&&(O=R);break}e&&O&&L.alternate===null&&t(m,O),p=i(L,p,x),P===null?b=L:P.sibling=L,P=L,O=R}if(x===h.length)return n(m,O),Z&&mn(m,x),b;if(O===null){for(;xx?(R=O,O=null):R=O.sibling;var D=f(m,O,L.value,E);if(D===null){O===null&&(O=R);break}e&&O&&D.alternate===null&&t(m,O),p=i(D,p,x),P===null?b=D:P.sibling=D,P=D,O=R}if(L.done)return n(m,O),Z&&mn(m,x),b;if(O===null){for(;!L.done;x++,L=h.next())L=d(m,L.value,E),L!==null&&(p=i(L,p,x),P===null?b=L:P.sibling=L,P=L);return Z&&mn(m,x),b}for(O=r(m,O);!L.done;x++,L=h.next())L=g(O,m,x,L.value,E),L!==null&&(e&&L.alternate!==null&&O.delete(L.key===null?x:L.key),p=i(L,p,x),P===null?b=L:P.sibling=L,P=L);return e&&O.forEach(function(j){return t(m,j)}),Z&&mn(m,x),b}function _(m,p,h,E){if(typeof h=="object"&&h!==null&&h.type===Kn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case ci:e:{for(var b=h.key,P=p;P!==null;){if(P.key===b){if(b=h.type,b===Kn){if(P.tag===7){n(m,P.sibling),p=o(P,h.props.children),p.return=m,m=p;break e}}else if(P.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Ut&&Sd(b)===P.type){n(m,P.sibling),p=o(P,h.props),p.ref=Br(m,P,h),p.return=m,m=p;break e}n(m,P);break}else t(m,P);P=P.sibling}h.type===Kn?(p=_n(h.props.children,m.mode,E,h.key),p.return=m,m=p):(E=Qi(h.type,h.key,h.props,null,m.mode,E),E.ref=Br(m,p,h),E.return=m,m=E)}return s(m);case Qn:e:{for(P=h.key;p!==null;){if(p.key===P)if(p.tag===4&&p.stateNode.containerInfo===h.containerInfo&&p.stateNode.implementation===h.implementation){n(m,p.sibling),p=o(p,h.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=Va(h,m.mode,E),p.return=m,m=p}return s(m);case Ut:return P=h._init,_(m,p,P(h._payload),E)}if(Kr(h))return y(m,p,h,E);if(jr(h))return S(m,p,h,E);xi(m,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,p!==null&&p.tag===6?(n(m,p.sibling),p=o(p,h),p.return=m,m=p):(n(m,p),p=Wa(h,m.mode,E),p.return=m,m=p),s(m)):n(m,p)}return _}var vr=Cm(!0),_m=Cm(!1),Vo={},xt=dn(Vo),Co=dn(Vo),_o=dn(Vo);function xn(e){if(e===Vo)throw Error(I(174));return e}function mc(e,t){switch(Y(_o,t),Y(Co,e),Y(xt,Vo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:yl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=yl(t,e)}X(xt),Y(xt,t)}function yr(){X(xt),X(Co),X(_o)}function km(e){xn(_o.current);var t=xn(xt.current),n=yl(t,e.type);t!==n&&(Y(Co,e),Y(xt,n))}function gc(e){Co.current===e&&(X(xt),X(Co))}var te=dn(0);function ys(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ja=[];function vc(){for(var e=0;en?n:4,e(!0);var r=Fa.transition;Fa.transition={};try{e(!1),t()}finally{K=n,Fa.transition=r}}function zm(){return Xe().memoizedState}function Nw(e,t,n){var r=rn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bm(e))Wm(t,n);else if(n=wm(e,t,n,r),n!==null){var o=ke();lt(n,e,r,o),Vm(n,t,r)}}function Tw(e,t,n){var r=rn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bm(e))Wm(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,ft(a,s)){var l=t.interleaved;l===null?(o.next=o,pc(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=wm(e,t,o,r),n!==null&&(o=ke(),lt(n,e,r,o),Vm(n,t,r))}}function Bm(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Wm(e,t){ro=ws=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zu(e,n)}}var Ss={readContext:Je,useCallback:ye,useContext:ye,useEffect:ye,useImperativeHandle:ye,useInsertionEffect:ye,useLayoutEffect:ye,useMemo:ye,useReducer:ye,useRef:ye,useState:ye,useDebugValue:ye,useDeferredValue:ye,useTransition:ye,useMutableSource:ye,useSyncExternalStore:ye,useId:ye,unstable_isNewReconciler:!1},Iw={readContext:Je,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:Ed,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Bi(4194308,4,Am.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Bi(4,2,e,t)},useMemo:function(e,t){var n=gt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Nw.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:xd,useDebugValue:Ec,useDeferredValue:function(e){return gt().memoizedState=e},useTransition:function(){var e=xd(!1),t=e[0];return e=Lw.bind(null,e[1]),gt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,o=gt();if(Z){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),de===null)throw Error(I(349));bn&30||bm(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ed(Lm.bind(null,r,i,e),[e]),r.flags|=2048,Po(9,Rm.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=gt(),t=de.identifierPrefix;if(Z){var n=Pt,r=Ot;n=(r&~(1<<32-at(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ko++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[yt]=t,e[Eo]=r,Zm(e,t,!1,!1),t.stateNode=e;e:{switch(s=Sl(n,r),n){case"dialog":J("cancel",e),J("close",e),o=r;break;case"iframe":case"object":case"embed":J("load",e),o=r;break;case"video":case"audio":for(o=0;oSr&&(t.flags|=128,r=!0,Wr(i,!1),t.lanes=4194304)}else{if(!r)if(e=ys(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Z)return we(t),null}else 2*se()-i.renderingStartTime>Sr&&n!==1073741824&&(t.flags|=128,r=!0,Wr(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=se(),t.sibling=null,n=te.current,Y(te,r?n&1|2:n&1),t):(we(t),null);case 22:case 23:return bc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Me&1073741824&&(we(t),t.subtreeFlags&6&&(t.flags|=8192)):we(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function zw(e,t){switch(lc(t),t.tag){case 1:return Ie(t.type)&&fs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yr(),X(Te),X(Ee),vc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return gc(t),null;case 13:if(X(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));gr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(te),null;case 4:return yr(),null;case 10:return dc(t.type._context),null;case 22:case 23:return bc(),null;case 24:return null;default:return null}}var Ci=!1,xe=!1,Bw=typeof WeakSet=="function"?WeakSet:Set,U=null;function nr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){oe(e,t,r)}else n.current=null}function Kl(e,t,n){try{n()}catch(r){oe(e,t,r)}}var Nd=!1;function Ww(e,t){if(Ll=as,e=im(),sc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var g;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(g=d.firstChild)!==null;)f=d,d=g;for(;;){if(d===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++c===r&&(l=s),(g=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Nl={focusedElem:e,selectionRange:n},as=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var S=y.memoizedProps,_=y.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?S:tt(t.type,S),_);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(E){oe(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return y=Nd,Nd=!1,y}function oo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Kl(t,n,i)}o=o.next}while(o!==r)}}function Zs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ql(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ng(e){var t=e.alternate;t!==null&&(e.alternate=null,ng(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yt],delete t[Eo],delete t[Dl],delete t[kw],delete t[Ow])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rg(e){return e.tag===5||e.tag===3||e.tag===4}function Td(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Gl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cs));else if(r!==4&&(e=e.child,e!==null))for(Gl(e,t,n),e=e.sibling;e!==null;)Gl(e,t,n),e=e.sibling}function Yl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Yl(e,t,n),e=e.sibling;e!==null;)Yl(e,t,n),e=e.sibling}var he=null,ot=!1;function At(e,t,n){for(n=n.child;n!==null;)og(e,t,n),n=n.sibling}function og(e,t,n){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(Hs,n)}catch{}switch(n.tag){case 5:xe||nr(n,t);case 6:var r=he,o=ot;he=null,At(e,t,n),he=r,ot=o,he!==null&&(ot?(e=he,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):he.removeChild(n.stateNode));break;case 18:he!==null&&(ot?(e=he,n=n.stateNode,e.nodeType===8?Ma(e.parentNode,n):e.nodeType===1&&Ma(e,n),vo(e)):Ma(he,n.stateNode));break;case 4:r=he,o=ot,he=n.stateNode.containerInfo,ot=!0,At(e,t,n),he=r,ot=o;break;case 0:case 11:case 14:case 15:if(!xe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Kl(n,t,s),o=o.next}while(o!==r)}At(e,t,n);break;case 1:if(!xe&&(nr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){oe(n,t,a)}At(e,t,n);break;case 21:At(e,t,n);break;case 22:n.mode&1?(xe=(r=xe)||n.memoizedState!==null,At(e,t,n),xe=r):At(e,t,n);break;default:At(e,t,n)}}function Id(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Bw),t.forEach(function(r){var o=Xw.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function et(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Hw(r/1960))-r,10e?16:e,Kt===null)var r=!1;else{if(e=Kt,Kt=null,Cs=0,V&6)throw Error(I(331));var o=V;for(V|=4,U=e.current;U!==null;){var i=U,s=i.child;if(U.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lse()-Oc?Cn(e,0):kc|=n),De(e,t)}function dg(e,t){t===0&&(e.mode&1?(t=hi,hi<<=1,!(hi&130023424)&&(hi=4194304)):t=1);var n=ke();e=Nt(e,t),e!==null&&(zo(e,t,n),De(e,n))}function Jw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dg(e,n)}function Xw(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),dg(e,n)}var pg;pg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Te.current)Ne=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ne=!1,Uw(e,t,n);Ne=!!(e.flags&131072)}else Ne=!1,Z&&t.flags&1048576&&gm(t,hs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wi(e,t),e=t.pendingProps;var o=mr(t,Ee.current);fr(t,n),o=wc(null,t,r,e,o,n);var i=Sc();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ie(r)?(i=!0,ds(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,hc(t),o.updater=Js,t.stateNode=o,o._reactInternals=t,$l(t,r,e,n),t=Wl(null,t,r,!0,i,n)):(t.tag=0,Z&&i&&ac(t),_e(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=eS(r),e=tt(r,e),o){case 0:t=Bl(null,t,r,e,n);break e;case 1:t=bd(null,t,r,e,n);break e;case 11:t=Od(null,t,r,e,n);break e;case 14:t=Pd(null,t,r,tt(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tt(r,o),Bl(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tt(r,o),bd(e,t,r,o,n);case 3:e:{if(Ym(t),e===null)throw Error(I(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Sm(e,t),vs(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=wr(Error(I(423)),t),t=Rd(e,t,r,n,o);break e}else if(r!==o){o=wr(Error(I(424)),t),t=Rd(e,t,r,n,o);break e}else for(Ae=en(t.stateNode.containerInfo.firstChild),je=t,Z=!0,it=null,n=_m(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(gr(),r===o){t=Tt(e,t,n);break e}_e(e,t,r,n)}t=t.child}return t;case 5:return km(t),e===null&&jl(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Tl(r,o)?s=null:i!==null&&Tl(r,i)&&(t.flags|=32),Gm(e,t),_e(e,t,s,n),t.child;case 6:return e===null&&jl(t),null;case 13:return Jm(e,t,n);case 4:return mc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vr(t,null,r,n):_e(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tt(r,o),Od(e,t,r,o,n);case 7:return _e(e,t,t.pendingProps,n),t.child;case 8:return _e(e,t,t.pendingProps.children,n),t.child;case 12:return _e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Y(ms,r._currentValue),r._currentValue=s,i!==null)if(ft(i.value,s)){if(i.children===o.children&&!Te.current){t=Tt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=bt(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Fl(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(I(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Fl(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}_e(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,fr(t,n),o=Je(o),r=r(o),t.flags|=1,_e(e,t,r,n),t.child;case 14:return r=t.type,o=tt(r,t.pendingProps),o=tt(r.type,o),Pd(e,t,r,o,n);case 15:return Km(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tt(r,o),Wi(e,t),t.tag=1,Ie(r)?(e=!0,ds(t)):e=!1,fr(t,n),Em(t,r,o),$l(t,r,o,n),Wl(null,t,r,!0,e,n);case 19:return Xm(e,t,n);case 22:return qm(e,t,n)}throw Error(I(156,t.tag))};function hg(e,t){return $h(e,t)}function Zw(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qe(e,t,n,r){return new Zw(e,t,n,r)}function Lc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eS(e){if(typeof e=="function")return Lc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Gu)return 11;if(e===Yu)return 14}return 2}function on(e,t){var n=e.alternate;return n===null?(n=qe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qi(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Lc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Kn:return _n(n.children,o,i,t);case qu:s=8,o|=8;break;case cl:return e=qe(12,n,t,o|2),e.elementType=cl,e.lanes=i,e;case fl:return e=qe(13,n,t,o),e.elementType=fl,e.lanes=i,e;case dl:return e=qe(19,n,t,o),e.elementType=dl,e.lanes=i,e;case Ch:return ta(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xh:s=10;break e;case Eh:s=9;break e;case Gu:s=11;break e;case Yu:s=14;break e;case Ut:s=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=qe(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function _n(e,t,n,r){return e=qe(7,e,r,t),e.lanes=n,e}function ta(e,t,n,r){return e=qe(22,e,r,t),e.elementType=Ch,e.lanes=n,e.stateNode={isHidden:!1},e}function Wa(e,t,n){return e=qe(6,e,null,t),e.lanes=n,e}function Va(e,t,n){return t=qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tS(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_a(0),this.expirationTimes=_a(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_a(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Nc(e,t,n,r,o,i,s,a,l){return e=new tS(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=qe(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},hc(i),e}function nS(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yg)}catch(e){console.error(e)}}yg(),gh.exports=ze;var Mc=gh.exports,wg,zd=Mc;wg=zd.createRoot,zd.hydrateRoot;var tu={exports:{}},Nn={},Sg={exports:{}},aS="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",lS=aS,uS=lS;function xg(){}function Eg(){}Eg.resetWarningCache=xg;var cS=function(){function e(r,o,i,s,a,l){if(l!==uS){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Eg,resetWarningCache:xg};return n.PropTypes=n,n};Sg.exports=cS();var Ac=Sg.exports;const ee=Bs(Ac);var nu={exports:{}},dt={},ru={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;/*! - * Adapted from jQuery UI core - * - * http://jqueryui.com - * - * Copyright 2014 jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/category/ui-core/ - */var n="none",r="contents",o=/input|select|textarea|button|object|iframe/;function i(d,f){return f.getPropertyValue("overflow")!=="visible"||d.scrollWidth<=0&&d.scrollHeight<=0}function s(d){var f=d.offsetWidth<=0&&d.offsetHeight<=0;if(f&&!d.innerHTML)return!0;try{var g=window.getComputedStyle(d),y=g.getPropertyValue("display");return f?y!==r&&i(d,g):y===n}catch{return console.warn("Failed to inspect element style"),!1}}function a(d){for(var f=d,g=d.getRootNode&&d.getRootNode();f&&f!==document.body;){if(g&&f===g&&(f=g.host.parentNode),s(f))return!1;f=f.parentNode}return!0}function l(d,f){var g=d.nodeName.toLowerCase(),y=o.test(g)&&!d.disabled||g==="a"&&d.href||f;return y&&a(d)}function u(d){var f=d.getAttribute("tabindex");f===null&&(f=void 0);var g=isNaN(f);return(g||f>=0)&&l(d,!g)}function c(d){var f=[].slice.call(d.querySelectorAll("*"),0).reduce(function(g,y){return g.concat(y.shadowRoot?c(y.shadowRoot):[y])},[]);return f.filter(u)}e.exports=t.default})(ru,ru.exports);var Cg=ru.exports;Object.defineProperty(dt,"__esModule",{value:!0});dt.resetState=hS;dt.log=mS;dt.handleBlur=Ro;dt.handleFocus=Lo;dt.markForFocusLater=gS;dt.returnFocus=vS;dt.popWithoutFocus=yS;dt.setupScopedFocus=wS;dt.teardownScopedFocus=SS;var fS=Cg,dS=pS(fS);function pS(e){return e&&e.__esModule?e:{default:e}}var xr=[],or=null,ou=!1;function hS(){xr=[]}function mS(){}function Ro(){ou=!0}function Lo(){if(ou){if(ou=!1,!or)return;setTimeout(function(){if(!or.contains(document.activeElement)){var e=(0,dS.default)(or)[0]||or;e.focus()}},0)}}function gS(){xr.push(document.activeElement)}function vS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=null;try{xr.length!==0&&(t=xr.pop(),t.focus({preventScroll:e}));return}catch{console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}}function yS(){xr.length>0&&xr.pop()}function wS(e){or=e,window.addEventListener?(window.addEventListener("blur",Ro,!1),document.addEventListener("focus",Lo,!0)):(window.attachEvent("onBlur",Ro),document.attachEvent("onFocus",Lo))}function SS(){or=null,window.addEventListener?(window.removeEventListener("blur",Ro),document.removeEventListener("focus",Lo)):(window.detachEvent("onBlur",Ro),document.detachEvent("onFocus",Lo))}var iu={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=Cg,r=o(n);function o(a){return a&&a.__esModule?a:{default:a}}function i(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;return a.activeElement.shadowRoot?i(a.activeElement.shadowRoot):a.activeElement}function s(a,l){var u=(0,r.default)(a);if(!u.length){l.preventDefault();return}var c=void 0,d=l.shiftKey,f=u[0],g=u[u.length-1],y=i();if(a===y){if(!d)return;c=g}if(g===y&&!d&&(c=f),f===y&&d&&(c=g),c){l.preventDefault(),c.focus();return}var S=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),_=S!=null&&S[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(_){var m=u.indexOf(y);if(m>-1&&(m+=d?-1:1),c=u[m],typeof c>"u"){l.preventDefault(),c=d?g:f,c.focus();return}l.preventDefault(),c.focus()}}e.exports=t.default})(iu,iu.exports);var xS=iu.exports,pt={},ES=function(){},CS=ES,ut={},_g={exports:{}};/*! - Copyright (c) 2015 Jed Watson. - Based on code that is Copyright 2013-2015, Facebook, Inc. - All rights reserved. -*/(function(e){(function(){var t=!!(typeof window<"u"&&window.document&&window.document.createElement),n={canUseDOM:t,canUseWorkers:typeof Worker<"u",canUseEventListeners:t&&!!(window.addEventListener||window.attachEvent),canUseViewport:t&&!!window.screen};e.exports?e.exports=n:window.ExecutionEnvironment=n})()})(_g);var _S=_g.exports;Object.defineProperty(ut,"__esModule",{value:!0});ut.canUseDOM=ut.SafeNodeList=ut.SafeHTMLCollection=void 0;var kS=_S,OS=PS(kS);function PS(e){return e&&e.__esModule?e:{default:e}}var sa=OS.default,bS=sa.canUseDOM?window.HTMLElement:{};ut.SafeHTMLCollection=sa.canUseDOM?window.HTMLCollection:{};ut.SafeNodeList=sa.canUseDOM?window.NodeList:{};ut.canUseDOM=sa.canUseDOM;ut.default=bS;Object.defineProperty(pt,"__esModule",{value:!0});pt.resetState=IS;pt.log=DS;pt.assertNodeList=kg;pt.setElement=MS;pt.validateElement=jc;pt.hide=AS;pt.show=jS;pt.documentNotReadyOrSSRTesting=FS;var RS=CS,LS=TS(RS),NS=ut;function TS(e){return e&&e.__esModule?e:{default:e}}var He=null;function IS(){He&&(He.removeAttribute?He.removeAttribute("aria-hidden"):He.length!=null?He.forEach(function(e){return e.removeAttribute("aria-hidden")}):document.querySelectorAll(He).forEach(function(e){return e.removeAttribute("aria-hidden")})),He=null}function DS(){}function kg(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function MS(e){var t=e;if(typeof t=="string"&&NS.canUseDOM){var n=document.querySelectorAll(t);kg(n,t),t=n}return He=t||He,He}function jc(e){var t=e||He;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,LS.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}function AS(e){var t=!0,n=!1,r=void 0;try{for(var o=jc(e)[Symbol.iterator](),i;!(t=(i=o.next()).done);t=!0){var s=i.value;s.setAttribute("aria-hidden","true")}}catch(a){n=!0,r=a}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}function jS(e){var t=!0,n=!1,r=void 0;try{for(var o=jc(e)[Symbol.iterator](),i;!(t=(i=o.next()).done);t=!0){var s=i.value;s.removeAttribute("aria-hidden")}}catch(a){n=!0,r=a}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}function FS(){He=null}var Rr={};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.resetState=US;Rr.log=$S;var ao={},lo={};function Bd(e,t){e.classList.remove(t)}function US(){var e=document.getElementsByTagName("html")[0];for(var t in ao)Bd(e,ao[t]);var n=document.body;for(var r in lo)Bd(n,lo[r]);ao={},lo={}}function $S(){}var zS=function(t,n){return t[n]||(t[n]=0),t[n]+=1,n},BS=function(t,n){return t[n]&&(t[n]-=1),n},WS=function(t,n,r){r.forEach(function(o){zS(n,o),t.add(o)})},VS=function(t,n,r){r.forEach(function(o){BS(n,o),n[o]===0&&t.remove(o)})};Rr.add=function(t,n){return WS(t.classList,t.nodeName.toLowerCase()=="html"?ao:lo,n.split(" "))};Rr.remove=function(t,n){return VS(t.classList,t.nodeName.toLowerCase()=="html"?ao:lo,n.split(" "))};var Lr={};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.log=QS;Lr.resetState=KS;function HS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Og=function e(){var t=this;HS(this,e),this.register=function(n){t.openInstances.indexOf(n)===-1&&(t.openInstances.push(n),t.emit("register"))},this.deregister=function(n){var r=t.openInstances.indexOf(n);r!==-1&&(t.openInstances.splice(r,1),t.emit("deregister"))},this.subscribe=function(n){t.subscribers.push(n)},this.emit=function(n){t.subscribers.forEach(function(r){return r(n,t.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},Os=new Og;function QS(){console.log("portalOpenInstances ----------"),console.log(Os.openInstances.length),Os.openInstances.forEach(function(e){return console.log(e)}),console.log("end portalOpenInstances ----------")}function KS(){Os=new Og}Lr.default=Os;var Fc={};Object.defineProperty(Fc,"__esModule",{value:!0});Fc.resetState=JS;Fc.log=XS;var qS=Lr,GS=YS(qS);function YS(e){return e&&e.__esModule?e:{default:e}}var Se=void 0,nt=void 0,kn=[];function JS(){for(var e=[Se,nt],t=0;t0?(document.body.firstChild!==Se&&document.body.insertBefore(Se,document.body.firstChild),document.body.lastChild!==nt&&document.body.appendChild(nt)):(Se.parentElement&&Se.parentElement.removeChild(Se),nt.parentElement&&nt.parentElement.removeChild(nt))}GS.default.subscribe(ZS);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(N){for(var T=1;T0&&(j-=1,j===0&&g.show(M)),C.props.shouldFocusAfterRender&&(C.props.shouldReturnFocusAfterClose?(u.returnFocus(C.props.preventScroll),u.teardownScopedFocus()):u.popWithoutFocus()),C.props.onAfterClose&&C.props.onAfterClose(),h.default.deregister(C)},C.open=function(){C.beforeOpen(),C.state.afterOpen&&C.state.beforeClose?(clearTimeout(C.closeTimer),C.setState({beforeClose:!1})):(C.props.shouldFocusAfterRender&&(u.setupScopedFocus(C.node),u.markForFocusLater()),C.setState({isOpen:!0},function(){C.openAnimationFrame=requestAnimationFrame(function(){C.setState({afterOpen:!0}),C.props.isOpen&&C.props.onAfterOpen&&C.props.onAfterOpen({overlayEl:C.overlay,contentEl:C.content})})}))},C.close=function(){C.props.closeTimeoutMS>0?C.closeWithTimeout():C.closeWithoutTimeout()},C.focusContent=function(){return C.content&&!C.contentHasFocus()&&C.content.focus({preventScroll:!0})},C.closeWithTimeout=function(){var k=Date.now()+C.props.closeTimeoutMS;C.setState({beforeClose:!0,closesAt:k},function(){C.closeTimer=setTimeout(C.closeWithoutTimeout,C.state.closesAt-Date.now())})},C.closeWithoutTimeout=function(){C.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},C.afterClose)},C.handleKeyDown=function(k){L(k)&&(0,d.default)(C.content,k),C.props.shouldCloseOnEsc&&D(k)&&(k.stopPropagation(),C.requestClose(k))},C.handleOverlayOnClick=function(k){C.shouldClose===null&&(C.shouldClose=!0),C.shouldClose&&C.props.shouldCloseOnOverlayClick&&(C.ownerHandlesClose()?C.requestClose(k):C.focusContent()),C.shouldClose=null},C.handleContentOnMouseUp=function(){C.shouldClose=!1},C.handleOverlayOnMouseDown=function(k){!C.props.shouldCloseOnOverlayClick&&k.target==C.overlay&&k.preventDefault()},C.handleContentOnClick=function(){C.shouldClose=!1},C.handleContentOnMouseDown=function(){C.shouldClose=!1},C.requestClose=function(k){return C.ownerHandlesClose()&&C.props.onRequestClose(k)},C.ownerHandlesClose=function(){return C.props.onRequestClose},C.shouldBeClosed=function(){return!C.state.isOpen&&!C.state.beforeClose},C.contentHasFocus=function(){return document.activeElement===C.content||C.content.contains(document.activeElement)},C.buildClassName=function(k,M){var $=(typeof M>"u"?"undefined":r(M))==="object"?M:{base:R[k],afterOpen:R[k]+"--after-open",beforeClose:R[k]+"--before-close"},B=$.base;return C.state.afterOpen&&(B=B+" "+$.afterOpen),C.state.beforeClose&&(B=B+" "+$.beforeClose),typeof M=="string"&&M?B+" "+M:B},C.attributesFromObject=function(k,M){return Object.keys(M).reduce(function($,B){return $[k+"-"+B]=M[B],$},{})},C.state={afterOpen:!1,beforeClose:!1},C.shouldClose=null,C.moveFromContentToOverlay=null,C}return o(T,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(C,k){this.props.isOpen&&!C.isOpen?this.open():!this.props.isOpen&&C.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!k.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var C=this.props,k=C.appElement,M=C.ariaHideApp,$=C.htmlOpenClassName,B=C.bodyOpenClassName,q=C.parentSelector,be=q&&q().ownerDocument||document;B&&S.add(be.body,B),$&&S.add(be.getElementsByTagName("html")[0],$),M&&(j+=1,g.hide(k)),h.default.register(this)}},{key:"render",value:function(){var C=this.props,k=C.id,M=C.className,$=C.overlayClassName,B=C.defaultStyles,q=C.children,be=M?{}:B.content,Re=$?{}:B.overlay;if(this.shouldBeClosed())return null;var hn={ref:this.setOverlayRef,className:this.buildClassName("overlay",$),style:n({},Re,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},Ze=n({id:k,ref:this.setContentRef,style:n({},be,this.props.style.content),className:this.buildClassName("content",M),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",n({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),H=this.props.contentElement(Ze,q);return this.props.overlayElement(hn,H)}}]),T}(i.Component);A.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},A.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(m.default),a.default.instanceOf(_.SafeHTMLCollection),a.default.instanceOf(_.SafeNodeList),a.default.arrayOf(a.default.instanceOf(m.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=A,e.exports=t.default})(nu,nu.exports);var ex=nu.exports;function Pg(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function bg(e){function t(n){var r=this.constructor.getDerivedStateFromProps(e,n);return r??null}this.setState(t.bind(this))}function Rg(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}Pg.__suppressDeprecationWarning=!0;bg.__suppressDeprecationWarning=!0;Rg.__suppressDeprecationWarning=!0;function tx(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function")return e;var n=null,r=null,o=null;if(typeof t.componentWillMount=="function"?n="componentWillMount":typeof t.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof t.componentWillReceiveProps=="function"?r="componentWillReceiveProps":typeof t.UNSAFE_componentWillReceiveProps=="function"&&(r="UNSAFE_componentWillReceiveProps"),typeof t.componentWillUpdate=="function"?o="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(o="UNSAFE_componentWillUpdate"),n!==null||r!==null||o!==null){var i=e.displayName||e.name,s=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. - -`+i+" uses "+s+" but also contains the following legacy lifecycles:"+(n!==null?` - `+n:"")+(r!==null?` - `+r:"")+(o!==null?` - `+o:"")+` - -The above lifecycles should be removed. Learn more about this warning here: -https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=Pg,t.componentWillReceiveProps=bg),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=Rg;var a=t.componentDidUpdate;t.componentDidUpdate=function(u,c,d){var f=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:d;a.call(this,u,c,f)}}return e}const nx=Object.freeze(Object.defineProperty({__proto__:null,polyfill:tx},Symbol.toStringTag,{value:"Module"})),rx=jy(nx);Object.defineProperty(Nn,"__esModule",{value:!0});Nn.bodyOpenClassName=Nn.portalClassName=void 0;var Vd=Object.assign||function(e){for(var t=1;t{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const No=typeof window>"u"||"Deno"in window;function Ve(){}function vx(e,t){return typeof e=="function"?e(t):e}function su(e){return typeof e=="number"&&e>=0&&e!==1/0}function Tg(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Yr(e,t,n){return qo(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Bb(e,t,n){return qo(e)?typeof t=="function"?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function zt(e,t,n){return qo(e)?[{...t,queryKey:e},n]:[e||{},t]}function Yd(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(qo(s)){if(r){if(t.queryHash!==Uc(s,t.options))return!1}else if(!Rs(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof o<"u"&&o!==t.state.fetchStatus||i&&!i(t))}function Jd(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:i}=e;if(qo(i)){if(!t.options.mutationKey)return!1;if(n){if(En(t.options.mutationKey)!==En(i))return!1}else if(!Rs(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||o&&!o(t))}function Uc(e,t){return((t==null?void 0:t.queryKeyHashFn)||En)(e)}function En(e){return JSON.stringify(e,(t,n)=>lu(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Rs(e,t){return Ig(e,t)}function Ig(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Ig(e[n],t[n])):!1}function Dg(e,t){if(e===t)return e;const n=Xd(e)&&Xd(t);if(n||lu(e)&&lu(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,s=n?[]:{};let a=0;for(let l=0;l"u")return!0;const n=t.prototype;return!(!Zd(n)||!n.hasOwnProperty("isPrototypeOf"))}function Zd(e){return Object.prototype.toString.call(e)==="[object Object]"}function qo(e){return Array.isArray(e)}function Mg(e){return new Promise(t=>{setTimeout(t,e)})}function ep(e){Mg(0).then(e)}function yx(){if(typeof AbortController=="function")return new AbortController}function uu(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Dg(e,t):t}class wx extends Ko{constructor(){super(),this.setup=t=>{if(!No&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Ls=new wx,tp=["online","offline"];class Sx extends Ko{constructor(){super(),this.setup=t=>{if(!No&&window.addEventListener){const n=()=>t();return tp.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{tp.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Ns=new Sx;function xx(e){return Math.min(1e3*2**e,3e4)}function aa(e){return(e??"online")==="online"?Ns.isOnline():!0}class Ag{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Ki(e){return e instanceof Ag}function jg(e){let t=!1,n=0,r=!1,o,i,s;const a=new Promise((_,m)=>{i=_,s=m}),l=_=>{r||(g(new Ag(_)),e.abort==null||e.abort())},u=()=>{t=!0},c=()=>{t=!1},d=()=>!Ls.isFocused()||e.networkMode!=="always"&&!Ns.isOnline(),f=_=>{r||(r=!0,e.onSuccess==null||e.onSuccess(_),o==null||o(),i(_))},g=_=>{r||(r=!0,e.onError==null||e.onError(_),o==null||o(),s(_))},y=()=>new Promise(_=>{o=m=>{const p=r||!d();return p&&_(m),p},e.onPause==null||e.onPause()}).then(()=>{o=void 0,r||e.onContinue==null||e.onContinue()}),S=()=>{if(r)return;let _;try{_=e.fn()}catch(m){_=Promise.reject(m)}Promise.resolve(_).then(f).catch(m=>{var p,h;if(r)return;const E=(p=e.retry)!=null?p:3,b=(h=e.retryDelay)!=null?h:xx,P=typeof b=="function"?b(n,m):b,O=E===!0||typeof E=="number"&&n{if(d())return y()}).then(()=>{t?g(m):S()})})};return aa(e.networkMode)?S():y().then(S),{promise:a,cancel:l,continue:()=>(o==null?void 0:o())?a:Promise.resolve(),cancelRetry:u,continueRetry:c}}const $c=console;function Ex(){let e=[],t=0,n=c=>{c()},r=c=>{c()};const o=c=>{let d;t++;try{d=c()}finally{t--,t||a()}return d},i=c=>{t?e.push(c):ep(()=>{n(c)})},s=c=>(...d)=>{i(()=>{c(...d)})},a=()=>{const c=e;e=[],c.length&&ep(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:o,batchCalls:s,schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c}}}const ae=Ex();class Fg{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),su(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(No?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Cx extends Fg{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||$c,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||_x(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=uu(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(Ve).catch(Ve):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Tg(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(y=>y.options.queryFn);g&&this.setOptions(g.options)}const s=yx(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};l(a);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),c={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(l(c),(r=this.options.behavior)==null||r.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=c.fetchOptions)==null?void 0:o.meta)){var d;this.dispatch({type:"fetch",meta:(d=c.fetchOptions)==null?void 0:d.meta})}const f=g=>{if(Ki(g)&&g.silent||this.dispatch({type:"error",error:g}),!Ki(g)){var y,S,_,m;(y=(S=this.cache.config).onError)==null||y.call(S,g,this),(_=(m=this.cache.config).onSettled)==null||_.call(m,this.state.data,g,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=jg({fn:c.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:g=>{var y,S,_,m;if(typeof g>"u"){f(new Error(this.queryHash+" data is undefined"));return}this.setData(g),(y=(S=this.cache.config).onSuccess)==null||y.call(S,g,this),(_=(m=this.cache.config).onSettled)==null||_.call(m,g,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:f,onFail:(g,y)=>{this.dispatch({type:"failed",failureCount:g,error:y})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var o,i;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:aa(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=t.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Ki(s)&&s.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ae.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function _x(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class Ug extends Ko{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var o;const i=n.queryKey,s=(o=n.queryHash)!=null?o:Uc(i,n);let a=this.get(s);return a||(a=new Cx({cache:this,logger:t.getLogger(),queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){ae.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=zt(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(o=>Yd(r,o))}findAll(t,n){const[r]=zt(t,n);return Object.keys(r).length>0?this.queries.filter(o=>Yd(r,o)):this.queries}notify(t){ae.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){ae.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){ae.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class kx extends Fg{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||$c,this.observers=[],this.state=t.state||Ox(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var O;return this.retryer=jg({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(x,R)=>{this.dispatch({type:"failed",failureCount:x,error:R})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(O=this.options.retry)!=null?O:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,o,i,s,a,l,u,c;if(!n){var d,f,g,y;this.dispatch({type:"loading",variables:this.options.variables}),await((d=(f=this.mutationCache.config).onMutate)==null?void 0:d.call(f,this.state.variables,this));const x=await((g=(y=this.options).onMutate)==null?void 0:g.call(y,this.state.variables));x!==this.state.context&&this.dispatch({type:"loading",context:x,variables:this.state.variables})}const O=await t();return await((r=(o=this.mutationCache.config).onSuccess)==null?void 0:r.call(o,O,this.state.variables,this.state.context,this)),await((i=(s=this.options).onSuccess)==null?void 0:i.call(s,O,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,O,null,this.state.variables,this.state.context,this)),await((u=(c=this.options).onSettled)==null?void 0:u.call(c,O,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:O}),O}catch(O){try{var S,_,m,p,h,E,b,P;throw await((S=(_=this.mutationCache.config).onError)==null?void 0:S.call(_,O,this.state.variables,this.state.context,this)),await((m=(p=this.options).onError)==null?void 0:m.call(p,O,this.state.variables,this.state.context)),await((h=(E=this.mutationCache.config).onSettled)==null?void 0:h.call(E,void 0,O,this.state.variables,this.state.context,this)),await((b=(P=this.options).onSettled)==null?void 0:b.call(P,void 0,O,this.state.variables,this.state.context)),O}finally{this.dispatch({type:"error",error:O})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!aa(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),ae.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function Ox(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class Px extends Ko{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const o=new kx({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){ae.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>Jd(t,n))}findAll(t){return this.mutations.filter(n=>Jd(t,n))}notify(t){ae.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return ae.batch(()=>n.reduce((r,o)=>r.then(()=>o.continue().catch(Ve)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function bx(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,i,s;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l==null?void 0:l.pageParam,c=(l==null?void 0:l.direction)==="forward",d=(l==null?void 0:l.direction)==="backward",f=((i=e.state.data)==null?void 0:i.pages)||[],g=((s=e.state.data)==null?void 0:s.pageParams)||[];let y=g,S=!1;const _=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>{var O;if((O=e.signal)!=null&&O.aborted)S=!0;else{var x;(x=e.signal)==null||x.addEventListener("abort",()=>{S=!0})}return e.signal}})},m=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),p=(P,O,x,R)=>(y=R?[O,...y]:[...y,O],R?[x,...P]:[...P,x]),h=(P,O,x,R)=>{if(S)return Promise.reject("Cancelled");if(typeof x>"u"&&!O&&P.length)return Promise.resolve(P);const L={queryKey:e.queryKey,pageParam:x,meta:e.options.meta};_(L);const D=m(L);return Promise.resolve(D).then(A=>p(P,x,A,R))};let E;if(!f.length)E=h([]);else if(c){const P=typeof u<"u",O=P?u:np(e.options,f);E=h(f,P,O)}else if(d){const P=typeof u<"u",O=P?u:Rx(e.options,f);E=h(f,P,O,!0)}else{y=[];const P=typeof e.options.getNextPageParam>"u";E=(a&&f[0]?a(f[0],0,f):!0)?h([],P,g[0]):Promise.resolve(p([],g[0],f[0]));for(let x=1;x{if(a&&f[x]?a(f[x],x,f):!0){const D=P?g[x]:np(e.options,R);return h(R,P,D)}return Promise.resolve(p(R,g[x],f[x]))})}return E.then(P=>({pages:P,pageParams:y}))}}}}function np(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function Rx(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class Lx{constructor(t={}){this.queryCache=t.queryCache||new Ug,this.mutationCache=t.mutationCache||new Px,this.logger=t.logger||$c,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Ls.subscribe(()=>{Ls.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Ns.subscribe(()=>{Ns.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=zt(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const o=Yr(t,n,r),i=this.getQueryData(o.queryKey);return i?Promise.resolve(i):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.queryCache.find(t),i=o==null?void 0:o.state.data,s=vx(n,i);if(typeof s>"u")return;const a=Yr(t),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return ae.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=zt(t,n),o=this.queryCache;ae.batch(()=>{o.findAll(r).forEach(i=>{o.remove(i)})})}resetQueries(t,n,r){const[o,i]=zt(t,n,r),s=this.queryCache,a={type:"active",...o};return ae.batch(()=>(s.findAll(o).forEach(l=>{l.reset()}),this.refetchQueries(a,i)))}cancelQueries(t,n,r){const[o,i={}]=zt(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const s=ae.batch(()=>this.queryCache.findAll(o).map(a=>a.cancel(i)));return Promise.all(s).then(Ve).catch(Ve)}invalidateQueries(t,n,r){const[o,i]=zt(t,n,r);return ae.batch(()=>{var s,a;if(this.queryCache.findAll(o).forEach(u=>{u.invalidate()}),o.refetchType==="none")return Promise.resolve();const l={...o,type:(s=(a=o.refetchType)!=null?a:o.type)!=null?s:"active"};return this.refetchQueries(l,i)})}refetchQueries(t,n,r){const[o,i]=zt(t,n,r),s=ae.batch(()=>this.queryCache.findAll(o).filter(l=>!l.isDisabled()).map(l=>{var u;return l.fetch(void 0,{...i,cancelRefetch:(u=i==null?void 0:i.cancelRefetch)!=null?u:!0,meta:{refetchPage:o.refetchPage}})}));let a=Promise.all(s).then(Ve);return i!=null&&i.throwOnError||(a=a.catch(Ve)),a}fetchQuery(t,n,r){const o=Yr(t,n,r),i=this.defaultQueryOptions(o);typeof i.retry>"u"&&(i.retry=!1);const s=this.queryCache.build(this,i);return s.isStaleByTime(i.staleTime)?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Ve).catch(Ve)}fetchInfiniteQuery(t,n,r){const o=Yr(t,n,r);return o.behavior=bx(),this.fetchQuery(o)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(Ve).catch(Ve)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(o=>En(t)===En(o.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Rs(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(o=>En(t)===En(o.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Rs(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=Uc(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class Nx extends Ko{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),rp(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cu(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cu(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),au(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const i=this.hasListeners();i&&op(this.currentQuery,o,this.options,r)&&this.executeFetch(),this.updateResult(n),i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return Ix(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ve)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),No||this.currentResult.isStale||!su(this.options.staleTime))return;const n=Tg(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(No||this.options.enabled===!1||!su(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Ls.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,o=this.options,i=this.currentResult,s=this.currentResultState,a=this.currentResultOptions,l=t!==r,u=l?t.state:this.currentQueryInitialState,c=l?this.currentResult:this.previousQueryResult,{state:d}=t;let{dataUpdatedAt:f,error:g,errorUpdatedAt:y,fetchStatus:S,status:_}=d,m=!1,p=!1,h;if(n._optimisticResults){const x=this.hasListeners(),R=!x&&rp(t,n),L=x&&op(t,r,n,o);(R||L)&&(S=aa(t.options.networkMode)?"fetching":"paused",f||(_="loading")),n._optimisticResults==="isRestoring"&&(S="idle")}if(n.keepPreviousData&&!d.dataUpdatedAt&&c!=null&&c.isSuccess&&_!=="error")h=c.data,f=c.dataUpdatedAt,_=c.status,m=!0;else if(n.select&&typeof d.data<"u")if(i&&d.data===(s==null?void 0:s.data)&&n.select===this.selectFn)h=this.selectResult;else try{this.selectFn=n.select,h=n.select(d.data),h=uu(i==null?void 0:i.data,h,n),this.selectResult=h,this.selectError=null}catch(x){this.selectError=x}else h=d.data;if(typeof n.placeholderData<"u"&&typeof h>"u"&&_==="loading"){let x;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))x=i.data;else if(x=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof x<"u")try{x=n.select(x),this.selectError=null}catch(R){this.selectError=R}typeof x<"u"&&(_="success",h=uu(i==null?void 0:i.data,x,n),p=!0)}this.selectError&&(g=this.selectError,h=this.selectResult,y=Date.now(),_="error");const E=S==="fetching",b=_==="loading",P=_==="error";return{status:_,fetchStatus:S,isLoading:b,isSuccess:_==="success",isError:P,isInitialLoading:b&&E,data:h,dataUpdatedAt:f,error:g,errorUpdatedAt:y,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:E,isRefetching:E&&!b,isLoadingError:P&&d.dataUpdatedAt===0,isPaused:S==="paused",isPlaceholderData:p,isPreviousData:m,isRefetchError:P&&d.dataUpdatedAt!==0,isStale:zc(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,au(r,n))return;this.currentResult=r;const o={cache:!0},i=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const c=u;return this.currentResult[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),this.notify({...o,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!Ki(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){ae.batch(()=>{if(t.onSuccess){var n,r,o,i;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(o=(i=this.options).onSettled)==null||o.call(i,this.currentResult.data,null)}else if(t.onError){var s,a,l,u;(s=(a=this.options).onError)==null||s.call(a,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Tx(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function rp(e,t){return Tx(e,t)||e.state.dataUpdatedAt>0&&cu(e,t,t.refetchOnMount)}function cu(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&zc(e,t)}return!1}function op(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&zc(e,n)}function zc(e,t){return e.isStaleByTime(t.staleTime)}function Ix(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!au(e.getCurrentResult(),t)}var $g={exports:{}},zg={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Er=v;function Dx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mx=typeof Object.is=="function"?Object.is:Dx,Ax=Er.useState,jx=Er.useEffect,Fx=Er.useLayoutEffect,Ux=Er.useDebugValue;function $x(e,t){var n=t(),r=Ax({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Fx(function(){o.value=n,o.getSnapshot=t,Ha(o)&&i({inst:o})},[e,n,t]),jx(function(){return Ha(o)&&i({inst:o}),e(function(){Ha(o)&&i({inst:o})})},[e]),Ux(n),n}function Ha(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mx(e,n)}catch{return!0}}function zx(e,t){return t()}var Bx=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?zx:$x;zg.useSyncExternalStore=Er.useSyncExternalStore!==void 0?Er.useSyncExternalStore:Bx;$g.exports=zg;var Wx=$g.exports;const Vx=Wx.useSyncExternalStore,ip=v.createContext(void 0),Bg=v.createContext(!1);function Wg(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ip),window.ReactQueryClientContext):ip)}const Hx=({context:e}={})=>{const t=v.useContext(Wg(e,v.useContext(Bg)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Qx=({client:e,children:t,context:n,contextSharing:r=!1})=>{v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=Wg(n,r);return v.createElement(Bg.Provider,{value:!n&&r},v.createElement(o.Provider,{value:e},t))},Vg=v.createContext(!1),Kx=()=>v.useContext(Vg);Vg.Provider;function qx(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Gx=v.createContext(qx()),Yx=()=>v.useContext(Gx);function Jx(e,t){return typeof e=="function"?e(...t):!!e}const Xx=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},Zx=e=>{v.useEffect(()=>{e.clearReset()},[e])},eE=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Jx(n,[e.error,r]),tE=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},nE=(e,t)=>e.isLoading&&e.isFetching&&!t,rE=(e,t,n)=>(e==null?void 0:e.suspense)&&nE(t,n),oE=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function iE(e,t){const n=Hx({context:e.context}),r=Kx(),o=Yx(),i=n.defaultQueryOptions(e);i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=ae.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=ae.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=ae.batchCalls(i.onSettled)),tE(i),Xx(i,o),Zx(o);const[s]=v.useState(()=>new t(n,i)),a=s.getOptimisticResult(i);if(Vx(v.useCallback(l=>{const u=r?()=>{}:s.subscribe(ae.batchCalls(l));return s.updateResult(),u},[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),v.useEffect(()=>{s.setOptions(i,{listeners:!1})},[i,s]),rE(i,a,r))throw oE(i,s,o);if(eE({result:a,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:s.getCurrentQuery()}))throw a.error;return i.notifyOnChangeProps?a:s.trackResult(a)}function sE(e,t,n){const r=Yr(e,t,n);return iE(r,Nx)}function Hg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tn};return typeof e=="function"?r.read=e:(r.init=e,r.read=o=>o(r),r.write=(o,i,s)=>i(r,typeof s=="function"?s(o(r)):s)),t&&(r.write=t),r}const sp=e=>"init"in e,ap=e=>!!e.write,Ts=new WeakMap,lE=(e,t)=>{Ts.set(e,t),e.catch(()=>{}).finally(()=>Ts.delete(e))},lp=(e,t)=>{const n=Ts.get(e);n&&(Ts.delete(e),n(t))},up=(e,t)=>{e.status="fulfilled",e.value=t},cp=(e,t)=>{e.status="rejected",e.reason=t},uE=e=>typeof(e==null?void 0:e.then)=="function",Pi=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),fp=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),Hr=e=>"v"in e&&e.v instanceof Promise,cE=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,bi=e=>{if("e"in e)throw e.e;return e.v},fE=()=>{const e=new WeakMap,t=new WeakMap,n=new Map;let r,o;const i=x=>e.get(x),s=(x,R)=>{const L=e.get(x);if(e.set(x,R),n.has(x)||n.set(x,L),L&&Hr(L)){const D="v"in R?R.v instanceof Promise?R.v:Promise.resolve(R.v):Promise.reject(R.e);L.v!==D&&lp(L.v,D)}},a=(x,R,L)=>{const D=new Map;let j=!1;L.forEach((A,N)=>{!A&&N===x&&(A=R),A&&(D.set(N,A),R.d.get(N)!==A&&(j=!0))}),(j||R.d.size!==D.size)&&(R.d=D)},l=(x,R,L)=>{const D=i(x),j={d:(D==null?void 0:D.d)||new Map,v:R};if(L&&a(x,j,L),D&&Pi(D,j)&&D.d===j.d)return D;if(D&&Hr(D)&&Hr(j)&&cE(D,j)){if(D.d===j.d)return D;j.v=D.v}return s(x,j),j},u=(x,R,L,D)=>{if(uE(R)){let j;const A=new Promise((N,T)=>{let F=!1;R.then(C=>{if(!F){F=!0;const k=i(x),M=l(x,A,L);up(A,C),N(C),t.has(x)&&(k==null?void 0:k.d)!==M.d&&b(x,M,k==null?void 0:k.d)}},C=>{if(!F){F=!0;const k=i(x),M=l(x,A,L);cp(A,C),T(C),t.has(x)&&(k==null?void 0:k.d)!==M.d&&b(x,M,k==null?void 0:k.d)}}),j=C=>{F||(F=!0,C.then(k=>up(A,k),k=>cp(A,k)),N(C))}});return A.orig=R,A.status="pending",lE(A,N=>{N&&j(N),D==null||D()}),l(x,A,L)}return l(x,R,L)},c=(x,R,L)=>{const D=i(x),j={d:(D==null?void 0:D.d)||new Map,e:R};return L&&a(x,j,L),D&&fp(D,j)&&D.d===j.d?D:(s(x,j),j)},d=(x,R)=>{const L=i(x);if(!R&&L&&(t.has(x)||Array.from(L.d).every(([C,k])=>C===x||d(C)===k)))return L;const D=new Map;let j=!0;const A=C=>{if(C===x){const M=i(C);if(M)return D.set(C,M),bi(M);if(sp(C))return D.set(C,void 0),C.init;throw new Error("no atom init")}const k=d(C);return D.set(C,k),bi(k)};let N,T;const F={get signal(){return N||(N=new AbortController),N.signal},get setSelf(){return!T&&ap(x)&&(T=(...C)=>{if(!j)return p(x,...C)}),T}};try{const C=x.read(A,F);return u(x,C,D,()=>N==null?void 0:N.abort())}catch(C){return c(x,C,D)}finally{j=!1}},f=x=>bi(d(x)),g=x=>{let R=t.get(x);return R||(R=h(x)),R},y=(x,R)=>!R.l.size&&(!R.t.size||R.t.size===1&&R.t.has(x)),S=x=>{const R=t.get(x);R&&y(x,R)&&E(x)},_=x=>{const R=new Map,L=new WeakMap,D=N=>{var T;const F=new Set((T=t.get(N))==null?void 0:T.t);return n.forEach((C,k)=>{var M;(M=i(k))!=null&&M.d.has(N)&&F.add(k)}),F},j=N=>{D(N).forEach(T=>{T!==N&&(R.set(T,(R.get(T)||new Set).add(N)),L.set(T,(L.get(T)||0)+1),j(T))})};j(x);const A=N=>{D(N).forEach(T=>{var F;if(T!==N){let C=L.get(T);if(C&&L.set(T,--C),!C){let k=!!((F=R.get(T))!=null&&F.size);if(k){const M=i(T),$=d(T,!0);k=!M||!Pi(M,$)}k||R.forEach(M=>M.delete(T))}A(T)}})};A(x)},m=(x,...R)=>{let L=!0;const D=N=>bi(d(N)),j=(N,...T)=>{let F;if(N===x){if(!sp(N))throw new Error("atom not writable");const C=i(N),k=u(N,T[0]);(!C||!Pi(C,k))&&_(N)}else F=m(N,...T);if(!L){const C=P()}return F},A=x.write(D,j,...R);return L=!1,A},p=(x,...R)=>{const L=m(x,...R),D=P();return L},h=(x,R,L)=>{var D;const j=L||[];(D=i(x))==null||D.d.forEach((N,T)=>{const F=t.get(T);F?F.t.add(x):T!==x&&h(T,x,j)}),d(x);const A={t:new Set(R&&[R]),l:new Set};if(t.set(x,A),ap(x)&&x.onMount){const{onMount:N}=x;j.push(()=>{const T=N((...F)=>p(x,...F));T&&(A.u=T)})}return L||j.forEach(N=>N()),A},E=x=>{var R;const L=(R=t.get(x))==null?void 0:R.u;L&&L(),t.delete(x);const D=i(x);D&&(Hr(D)&&lp(D.v),D.d.forEach((j,A)=>{if(A!==x){const N=t.get(A);N&&(N.t.delete(x),y(A,N)&&E(A))}}))},b=(x,R,L)=>{const D=new Set(R.d.keys());L==null||L.forEach((j,A)=>{if(D.has(A)){D.delete(A);return}const N=t.get(A);N&&(N.t.delete(x),y(A,N)&&E(A))}),D.forEach(j=>{const A=t.get(j);A?A.t.add(x):t.has(x)&&h(j,x)})},P=()=>{let x;for(;n.size;){const R=Array.from(n);n.clear(),R.forEach(([L,D])=>{const j=i(L);if(j){const A=t.get(L);A&&j.d!==(D==null?void 0:D.d)&&b(L,j,D==null?void 0:D.d),A&&!(D&&!Hr(D)&&(Pi(D,j)||fp(D,j)))&&A.l.forEach(N=>N())}})}};return{get:f,set:p,sub:(x,R)=>{const L=g(x),D=P(),j=L.l;return j.add(R),()=>{j.delete(R),S(x)}}}};let Qa;const dE=()=>(Qa||(Qa=fE()),Qa),pE=v.createContext(void 0),Qg=e=>{const t=v.useContext(pE);return(e==null?void 0:e.store)||t||dE()},hE=e=>typeof(e==null?void 0:e.then)=="function",mE=Q.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function gE(e,t){const n=Qg(t),[[r,o,i],s]=v.useReducer(u=>{const c=n.get(e);return Object.is(u[0],c)&&u[1]===n&&u[2]===e?u:[c,n,e]},void 0,()=>[n.get(e),n,e]);let a=r;(o!==n||i!==e)&&(s(),a=n.get(e));const l=t==null?void 0:t.delay;return v.useEffect(()=>{const u=n.sub(e,()=>{if(typeof l=="number"){setTimeout(s,l);return}s()});return s(),u},[n,e,l]),v.useDebugValue(a),hE(a)?mE(a):a}function vE(e,t){const n=Qg(t);return v.useCallback((...o)=>n.set(e,...o),[n,e])}function yE(e,t){return[gE(e,t),vE(e,t)]}/** - * @remix-run/router v1.9.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function To(){return To=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function la(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function SE(){return Math.random().toString(36).substr(2,8)}function pp(e,t){return{usr:e.state,key:e.key,idx:t}}function du(e,t,n,r){return n===void 0&&(n=null),To({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?An(t):t,{state:n,key:t&&t.key||r||SE()})}function Is(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function An(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function xE(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=Gt.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(To({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=Gt.Pop;let _=c(),m=_==null?null:_-u;u=_,l&&l({action:a,location:S.location,delta:m})}function f(_,m){a=Gt.Push;let p=du(S.location,_,m);n&&n(p,_),u=c()+1;let h=pp(p,u),E=S.createHref(p);try{s.pushState(h,"",E)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;o.location.assign(E)}i&&l&&l({action:a,location:S.location,delta:1})}function g(_,m){a=Gt.Replace;let p=du(S.location,_,m);n&&n(p,_),u=c();let h=pp(p,u),E=S.createHref(p);s.replaceState(h,"",E),i&&l&&l({action:a,location:S.location,delta:0})}function y(_){let m=o.location.origin!=="null"?o.location.origin:o.location.href,p=typeof _=="string"?_:Is(_);return ge(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let S={get action(){return a},get location(){return e(o,s)},listen(_){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(dp,d),l=_,()=>{o.removeEventListener(dp,d),l=null}},createHref(_){return t(o,_)},createURL:y,encodeLocation(_){let m=y(_);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:g,go(_){return s.go(_)}};return S}var hp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(hp||(hp={}));function EE(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?An(t):t,o=Bc(r.pathname||"/",n);if(o==null)return null;let i=Kg(e);CE(i);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(ge(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=sn([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(ge(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Kg(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:LE(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of qg(i.path))o(i,s,l)}),t}function qg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=qg(r.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function CE(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:NE(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const _E=/^:\w+$/,kE=3,OE=2,PE=1,bE=10,RE=-2,mp=e=>e==="*";function LE(e,t){let n=e.split("/"),r=n.length;return n.some(mp)&&(r+=RE),t&&(r+=OE),n.filter(o=>!mp(o)).reduce((o,i)=>o+(_E.test(i)?kE:i===""?PE:bE),r)}function NE(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function TE(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s{if(c==="*"){let f=a[d]||"";s=i.slice(0,i.length-f.length).replace(/(.)\/+$/,"$1")}return u[c]=AE(a[d]||"",c),u},{}),pathname:i,pathnameBase:s,pattern:e}}function DE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),la(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function ME(e){try{return decodeURI(e)}catch(t){return la(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function AE(e,t){try{return decodeURIComponent(e)}catch(n){return la(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Bc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function jE(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?An(e):e;return{pathname:n?n.startsWith("/")?n:FE(n,t):t,search:$E(r),hash:zE(o)}}function FE(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Ka(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Gg(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Yg(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=An(e):(o=To({},e),ge(!o.pathname||!o.pathname.includes("?"),Ka("?","pathname","search",o)),ge(!o.pathname||!o.pathname.includes("#"),Ka("#","pathname","hash",o)),ge(!o.search||!o.search.includes("#"),Ka("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(r||s==null)a=n;else{let d=t.length-1;if(s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=jE(o,a),u=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const sn=e=>e.join("/").replace(/\/\/+/g,"/"),UE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$E=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,zE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function BE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Jg=["post","put","patch","delete"];new Set(Jg);const WE=["get",...Jg];new Set(WE);/** - * React Router v6.16.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Ds(){return Ds=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),s=v.useRef(!1);return Zg(()=>{s.current=!0}),v.useCallback(function(l,u){if(u===void 0&&(u={}),!s.current)return;if(typeof l=="number"){n.go(l);return}let c=Yg(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:sn([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}function ev(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=v.useContext(jn),{pathname:o}=Yo(),i=JSON.stringify(Gg(r).map(s=>s.pathnameBase));return v.useMemo(()=>Yg(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function tv(e,t){return qE(e,t)}function qE(e,t,n){Go()||ge(!1);let{navigator:r}=v.useContext(Nr),{matches:o}=v.useContext(jn),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let l=Yo(),u;if(t){var c;let S=typeof t=="string"?An(t):t;a==="/"||(c=S.pathname)!=null&&c.startsWith(a)||ge(!1),u=S}else u=l;let d=u.pathname||"/",f=a==="/"?d:d.slice(a.length)||"/",g=EE(e,{pathname:f}),y=ZE(g&&g.map(S=>Object.assign({},S,{params:Object.assign({},s,S.params),pathname:sn([a,r.encodeLocation?r.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?a:sn([a,r.encodeLocation?r.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),o,n);return t&&y?v.createElement(ua.Provider,{value:{location:Ds({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Gt.Pop}},y):y}function GE(){let e=r2(),t=BE(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:o},n):null,i)}const YE=v.createElement(GE,null);class JE extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?v.createElement(jn.Provider,{value:this.props.routeContext},v.createElement(Xg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function XE(e){let{routeContext:t,match:n,children:r}=e,o=v.useContext(Wc);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(jn.Provider,{value:t},r)}function ZE(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=i.findIndex(l=>l.route.id&&(s==null?void 0:s[l.route.id]));a>=0||ge(!1),i=i.slice(0,Math.min(i.length,a+1))}return i.reduceRight((a,l,u)=>{let c=l.route.id?s==null?void 0:s[l.route.id]:null,d=null;n&&(d=l.route.errorElement||YE);let f=t.concat(i.slice(0,u+1)),g=()=>{let y;return c?y=d:l.route.Component?y=v.createElement(l.route.Component,null):l.route.element?y=l.route.element:y=a,v.createElement(XE,{match:l,routeContext:{outlet:a,matches:f,isDataRoute:n!=null},children:y})};return n&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?v.createElement(JE,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:g(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):g()},null)}var nv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(nv||{}),Ms=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Ms||{});function e2(e){let t=v.useContext(Wc);return t||ge(!1),t}function t2(e){let t=v.useContext(VE);return t||ge(!1),t}function n2(e){let t=v.useContext(jn);return t||ge(!1),t}function rv(e){let t=n2(),n=t.matches[t.matches.length-1];return n.route.id||ge(!1),n.route.id}function r2(){var e;let t=v.useContext(Xg),n=t2(Ms.UseRouteError),r=rv(Ms.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function o2(){let{router:e}=e2(nv.UseNavigateStable),t=rv(Ms.UseNavigateStable),n=v.useRef(!1);return Zg(()=>{n.current=!0}),v.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Ds({fromRouteId:t},i)))},[e,t])}function i2(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Gt.Pop,navigator:i,static:s=!1}=e;Go()&&ge(!1);let a=t.replace(/^\/*/,"/"),l=v.useMemo(()=>({basename:a,navigator:i,static:s}),[a,i,s]);typeof r=="string"&&(r=An(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:g="default"}=r,y=v.useMemo(()=>{let S=Bc(u,a);return S==null?null:{location:{pathname:S,search:c,hash:d,state:f,key:g},navigationType:o}},[a,u,c,d,f,g,o]);return y==null?null:v.createElement(Nr.Provider,{value:l},v.createElement(ua.Provider,{children:n,value:y}))}new Promise(()=>{});/** - * React Router DOM v6.16.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function pu(){return pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function a2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function l2(e,t){return e.button===0&&(!t||t==="_self")&&!a2(e)}const u2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],c2="startTransition",gp=Et[c2];function f2(e){let{basename:t,children:n,future:r,window:o}=e,i=v.useRef();i.current==null&&(i.current=wE({window:o,v5Compat:!0}));let s=i.current,[a,l]=v.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=v.useCallback(d=>{u&&gp?gp(()=>l(d)):l(d)},[l,u]);return v.useLayoutEffect(()=>s.listen(c),[s,c]),v.createElement(i2,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const d2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",p2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ov=v.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:a,target:l,to:u,preventScrollReset:c}=t,d=s2(t,u2),{basename:f}=v.useContext(Nr),g,y=!1;if(typeof u=="string"&&p2.test(u)&&(g=u,d2))try{let p=new URL(window.location.href),h=u.startsWith("//")?new URL(p.protocol+u):new URL(u),E=Bc(h.pathname,f);h.origin===p.origin&&E!=null?u=E+h.search+h.hash:y=!0}catch{}let S=HE(u,{relative:o}),_=h2(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:o});function m(p){r&&r(p),p.defaultPrevented||_(p)}return v.createElement("a",pu({},d,{href:g||S,onClick:y||i?r:m,ref:n,target:l}))});var vp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(vp||(vp={}));var yp;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(yp||(yp={}));function h2(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s}=t===void 0?{}:t,a=QE(),l=Yo(),u=ev(e,{relative:s});return v.useCallback(c=>{if(l2(c,n)){c.preventDefault();let d=r!==void 0?r:Is(l)===Is(u);a(e,{replace:d,state:o,preventScrollReset:i,relative:s})}},[l,a,u,r,o,n,e,i,s])}function hu(){return hu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function g2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Vc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=m2(e,["color","size"]);return Q.createElement("svg",hu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),Q.createElement("polyline",{points:"20 6 9 17 4 12"}))});Vc.propTypes={color:ee.string,size:ee.oneOfType([ee.string,ee.number])};Vc.displayName="Check";const v2=Vc;function mu(){return mu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function w2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Hc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=y2(e,["color","size"]);return Q.createElement("svg",mu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),Q.createElement("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),Q.createElement("line",{x1:"1",y1:"1",x2:"23",y2:"23"}))});Hc.propTypes={color:ee.string,size:ee.oneOfType([ee.string,ee.number])};Hc.displayName="EyeOff";const S2=Hc;function gu(){return gu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function E2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Qc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=x2(e,["color","size"]);return Q.createElement("svg",gu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),Q.createElement("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),Q.createElement("circle",{cx:"12",cy:"12",r:"3"}))});Qc.propTypes={color:ee.string,size:ee.oneOfType([ee.string,ee.number])};Qc.displayName="Eye";const C2=Qc;function vu(){return vu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function k2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Kc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=_2(e,["color","size"]);return Q.createElement("svg",vu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),Q.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"}))});Kc.propTypes={color:ee.string,size:ee.oneOfType([ee.string,ee.number])};Kc.displayName="GitHub";const O2=Kc;function yu(){return yu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function b2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var qc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=P2(e,["color","size"]);return Q.createElement("svg",yu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),Q.createElement("circle",{cx:"12",cy:"12",r:"10"}),Q.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),Q.createElement("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))});qc.propTypes={color:ee.string,size:ee.oneOfType([ee.string,ee.number])};qc.displayName="Info";const R2=qc;function wu(){return wu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function N2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Gc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=L2(e,["color","size"]);return Q.createElement("svg",wu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),Q.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Q.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});Gc.propTypes={color:ee.string,size:ee.oneOfType([ee.string,ee.number])};Gc.displayName="X";const T2=Gc;function I2(e,t){let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function iv(e){return e.replace(/\/$/,"")}function Wb(e,t){let n=String(e);for(;n.length{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function ca(e){const t=e[Ue];return t?t.type_:Array.isArray(e)?1:fa(e)?2:da(e)?3:0}function Su(e,t){return ca(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function fv(e,t,n){const r=ca(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function z2(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function fa(e){return e instanceof Map}function da(e){return e instanceof Set}function yn(e){return e.copy_||e.base_}function xu(e,t){if(fa(e))return new Map(e);if(da(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&cv(e))return Cr(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Ue];let r=Reflect.ownKeys(n);for(let o=0;o1&&(e.set=e.add=e.clear=e.delete=B2),Object.freeze(e),t&&Io(e,(n,r)=>Yc(r,!0))),e}function B2(){st(2)}function pa(e){return Object.isFrozen(e)}var W2={};function In(e){const t=W2[e];return t||st(0,e),t}var Do;function dv(){return Do}function V2(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function xp(e,t){t&&(In("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Eu(e){Cu(e),e.drafts_.forEach(H2),e.drafts_=null}function Cu(e){e===Do&&(Do=e.parent_)}function Ep(e){return Do=V2(Do,e)}function H2(e){const t=e[Ue];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Cp(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ue].modified_&&(Eu(t),st(4)),Tn(e)&&(e=As(t,e),t.parent_||js(t,e)),t.patches_&&In("Patches").generateReplacementPatches_(n[Ue].base_,e,t.patches_,t.inversePatches_)):e=As(t,n,[]),Eu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==uv?e:void 0}function As(e,t,n){if(pa(t))return t;const r=t[Ue];if(!r)return Io(t,(o,i)=>_p(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return js(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let i=o,s=!1;r.type_===3&&(i=new Set(o),o.clear(),s=!0),Io(i,(a,l)=>_p(e,r,o,a,l,n,s)),js(e,o,!1),n&&e.patches_&&In("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function _p(e,t,n,r,o,i,s){if(_r(o)){const a=i&&t&&t.type_!==3&&!Su(t.assigned_,r)?i.concat(r):void 0,l=As(e,o,a);if(fv(n,r,l),_r(l))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(Tn(o)&&!pa(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;As(e,o),(!t||!t.scope_.parent_)&&js(e,o)}}function js(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Yc(t,n)}function Q2(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:dv(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=Jc;n&&(o=[r],i=Mo);const{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.draft_=a,r.revoke_=s,a}var Jc={get(e,t){if(t===Ue)return e;const n=yn(e);if(!Su(n,t))return K2(e,n,t);const r=n[t];return e.finalized_||!Tn(r)?r:r===qa(e.base_,t)?(Ga(e),e.copy_[t]=ku(r,e)):r},has(e,t){return t in yn(e)},ownKeys(e){return Reflect.ownKeys(yn(e))},set(e,t,n){const r=pv(yn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=qa(yn(e),t),i=o==null?void 0:o[Ue];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(z2(n,o)&&(n!==void 0||Su(e.base_,t)))return!0;Ga(e),_u(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return qa(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ga(e),_u(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=yn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){st(11)},getPrototypeOf(e){return Cr(e.base_)},setPrototypeOf(){st(12)}},Mo={};Io(Jc,(e,t)=>{Mo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Mo.deleteProperty=function(e,t){return Mo.set.call(this,e,t,void 0)};Mo.set=function(e,t,n){return Jc.set.call(this,e[0],t,n,e[0])};function qa(e,t){const n=e[Ue];return(n?yn(n):e)[t]}function K2(e,t,n){var o;const r=pv(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function pv(e,t){if(!(t in e))return;let n=Cr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Cr(n)}}function _u(e){e.modified_||(e.modified_=!0,e.parent_&&_u(e.parent_))}function Ga(e){e.copy_||(e.copy_=xu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var q2=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const s=this;return function(l=i,...u){return s.produce(l,c=>n.call(this,c,...u))}}typeof n!="function"&&st(6),r!==void 0&&typeof r!="function"&&st(7);let o;if(Tn(t)){const i=Ep(this),s=ku(t,void 0);let a=!0;try{o=n(s),a=!1}finally{a?Eu(i):Cu(i)}return xp(i,r),Cp(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===uv&&(o=void 0),this.autoFreeze_&&Yc(o,!0),r){const i=[],s=[];In("Patches").generateReplacementPatches_(t,o,i,s),r(i,s)}return o}else st(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,o;return[this.produce(t,n,(s,a)=>{r=s,o=a}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Tn(e)||st(8),_r(e)&&(e=G2(e));const t=Ep(this),n=ku(e,void 0);return n[Ue].isManual_=!0,Cu(t),n}finishDraft(e,t){const n=e&&e[Ue];(!n||!n.isManual_)&&st(9);const{scope_:r}=n;return xp(r,t),Cp(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=In("Patches").applyPatches_;return _r(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ku(e,t){const n=fa(e)?In("MapSet").proxyMap_(e,t):da(e)?In("MapSet").proxySet_(e,t):Q2(e,t);return(t?t.scope_:dv()).drafts_.push(n),n}function G2(e){return _r(e)||st(10,e),hv(e)}function hv(e){if(!Tn(e)||pa(e))return e;const t=e[Ue];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=xu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=xu(e,!0);return Io(n,(r,o)=>{fv(n,r,hv(o))}),t&&(t.finalized_=!1),n}var $e=new q2,Y2=$e.produce;$e.produceWithPatches.bind($e);var J2=$e.setAutoFreeze.bind($e);$e.setUseStrictShallowCopy.bind($e);$e.applyPatches.bind($e);$e.createDraft.bind($e);$e.finishDraft.bind($e);J2(!1);const{createContext:Xc,memo:X2,useMemo:Z2,useRef:eC,useEffect:tC,useCallback:kp,useContext:Ou,useState:nC}=Q,mv=Xc(null),gv=Xc(null),vv=Xc(null);function rC(){return Ou(vv)}function oC({initialState:e,actions:t={},children:n}){const r=eC(e),[o,i]=nC(e),s=kp(()=>r.current,[]);tC(()=>{},[s]);const a=kp((u,c)=>{if(typeof u=="function")return u(a,s);const d=Y2(s(),c);d!==r.current&&(r.current=d,i(d))},[s]),l=Z2(()=>yv(t,a),[t,a]);return w.jsx(mv.Provider,{value:o,children:w.jsx(gv.Provider,{value:a,children:w.jsx(vv.Provider,{value:l,children:n})})})}function Fn(e){return t=>{const n=X2(t);function r(o){const i=Ou(mv),s=Ou(gv),a=e(i,o),l={dispatch:s,...o,...a};return w.jsx(n,{...l})}return r}}function iC(e,t){return function(...n){return t(e.apply(this,n))}}function yv(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"?n[r]=iC(o,t):typeof o=="object"&&(n[r]=yv(o,t))}return n}const sC=Symbol(),aC=e=>typeof(e==null?void 0:e.then)=="function";function lC(e){let t,n;const r={getItem:(o,i)=>{var s,a;const l=c=>{if(c=c||"",t!==c){try{n=JSON.parse(c)}catch{return i}t=c}return n},u=(a=(s=e())==null?void 0:s.getItem(o))!=null?a:null;return aC(u)?u.then(l):l(u)},setItem:(o,i)=>{var s;return(s=e())==null?void 0:s.setItem(o,JSON.stringify(i))},removeItem:o=>{var i;return(i=e())==null?void 0:i.removeItem(o)}};return typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(r.subscribe=(o,i,s)=>{if(!(e()instanceof window.Storage))return()=>{};const a=l=>{if(l.storageArea===e()&&l.key===o){let u;try{u=JSON.parse(l.newValue||"")}catch{u=s}i(u)}};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}}),r}const uC=lC(()=>typeof window<"u"?window.localStorage:void 0);function cC(e,t,n=uC,r){const o=r==null?void 0:r.unstable_getOnInit,i=fu(o?n.getItem(e,t):t);return i.onMount=a=>{o||a(n.getItem(e,t));let l;return n.subscribe&&(l=n.subscribe(e,a,t)),l},fu(a=>a(i),(a,l,u)=>{const c=typeof u=="function"?u(a(i)):u;return c===sC?(l(i,t),n.removeItem(e)):c instanceof Promise?c.then(d=>(l(i,d),n.setItem(e,d))):(l(i,c),n.setItem(e,c))})}const wv="PaoPaoGateWay";function fC(){try{const e=localStorage.getItem(wv);return e?JSON.parse(e):void 0}catch{return}}function Un(e){try{const t=JSON.stringify(e);localStorage.setItem(wv,t)}catch{}}const Sv="/configs";async function xv(e){const{url:t,init:n}=We(e);return await fetch(t+Sv,n)}function dC(e){return"socks-port"in e&&(e["socket-port"]=e["socks-port"]),e}async function pC(e,t){const{url:n,init:r}=We(e),o=JSON.stringify(dC(t));return await fetch(n+Sv,{...r,body:o,method:"PATCH"})}const Ev="/traffic",hC=new TextDecoder("utf-8"),Ri=150,Vt={labels:Array(Ri).fill(0),up:Array(Ri),down:Array(Ri),size:Ri,subscribers:[],appendData(e){this.up.shift(),this.down.shift(),this.labels.shift();const t=Date.now();this.up.push(e.up),this.down.push(e.down),this.labels.push(t),this.subscribers.forEach(n=>n(e))},subscribe(e){return this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}}};let ir=!1,Li="";function Pu(e){Vt.appendData(JSON.parse(e))}function Cv(e){return e.read().then(({done:t,value:n})=>{const r=hC.decode(n,{stream:!t});Li+=r;const o=Li.split(` -`),i=o[o.length-1];for(let s=0;s{r=!0,n.close()},i=()=>{r=!1,Vt.up.fill(void 0),Vt.down.fill(void 0),Vt.labels.fill(0),Op(e)};return document.addEventListener("freeze",o,{capture:!0,once:!0}),document.addEventListener("resume",i,{capture:!0,once:!0}),n.addEventListener("error",function(s){Ni=3}),n.addEventListener("close",function(s){Ni=3,r||(document.removeEventListener("freeze",o),document.removeEventListener("resume",i),Op(e))}),n.addEventListener("message",function(s){Pu(s.data)}),Vt}function Op(e){if(ir)return Vt;ir=!0;const{url:t,init:n}=We(e);return fetch(t+Ev,n).then(r=>{if(r.ok){const o=r.body.getReader();Cv(o)}else ir=!1},r=>{console.log("fetch /traffic error",r),ir=!1}),Vt}function Pp(e){return t=>{t(`openModal:${e}`,n=>{n.modals[e]=!0})}}function mC(e){return t=>{t(`closeModal:${e}`,n=>{n.modals[e]=!1})}}const gC={apiConfig:!1},Hb=e=>e.configs.configs,vC=e=>e.configs.haveFetchedConfig,Qb=e=>e.configs.configs["log-level"];function _v(e){return async(t,n)=>{let r;try{r=await xv(e)}catch{t(Pp("apiConfig"));return}if(!r.ok){console.log("Error fetch configs",r.statusText),t(Pp("apiConfig"));return}const o=await r.json();t("store/configs#fetchConfigs",s=>{s.configs.configs=o}),vC(n())?Zc(e):t(yC())}}function yC(){return e=>{e("store/configs#markHaveFetchedConfig",t=>{t.configs.haveFetchedConfig=!0})}}function Kb(e,t){return async n=>{pC(e,t).then(r=>{r.ok===!1&&console.log("Error update configs",r.statusText)},r=>{throw console.log("Error update configs",r),r}).then(()=>{n(_v(e))}),n("storeConfigsOptimisticUpdateConfigs",r=>{r.configs.configs={...r.configs.configs,...t}})}}const wC={configs:{port:7890,"socks-port":7891,"redir-port":0,"allow-lan":!1,mode:"Rule","log-level":"uninit"},haveFetchedConfig:!1},SC={darkModePureBlackToggle:"yacd_darkModePureBlackToggle"},Jo=e=>{const t=e.app.selectedClashAPIConfigIndex;return e.app.clashAPIConfigs[t]},kv=e=>e.app.selectedClashAPIConfigIndex,Ov=e=>e.app.clashAPIConfigs,Pv=e=>e.app.theme,xC=e=>e.app.selectedChartStyleIndex,bv=e=>e.app.latencyTestUrl,qb=e=>e.app.collapsibleIsOpen,Gb=e=>e.app.proxySortBy,Yb=e=>e.app.hideUnavailableProxies,EC=e=>e.app.autoCloseOldConns,Jb=e=>e.app.logStreamingPaused,CC=I2(Un,600);function ef(e,{baseURL:t,secret:n,metaLabel:r}){const o=Ov(e());for(let i=0;i{if(ef(n,e))return;const o={...e,addedAt:Date.now()};t("addClashAPIConfig",i=>{i.app.clashAPIConfigs.push(o)}),Un(n().app)}}function kC(e){return async(t,n)=>{const r=ef(n,e);t("removeClashAPIConfig",o=>{o.app.clashAPIConfigs.splice(r,1),r===o.app.selectedClashAPIConfigIndex?o.app.selectedClashAPIConfigIndex=0:r{const r=ef(n,e);kv(n())!==r&&t("selectClashAPIConfig",i=>{i.app.selectedClashAPIConfigIndex=r}),Un(n().app);try{window.location.reload()}catch{}}}const Ya=document.querySelector("html");function Ja(e,t){const n=document.createElement("meta");n.setAttribute("name","theme-color"),n.setAttribute("content",e),t&&n.setAttribute("media",t),document.head.appendChild(n)}function PC(e){const t=Array.from(document.querySelectorAll("meta[name=theme-color]"));let n;for(const r of t)r.getAttribute("media")?document.head.removeChild(r):n=r;if(e==="auto")if(Ja("#eeeeee","(prefers-color-scheme: light)"),Ja("#202020","(prefers-color-scheme: dark)"),n)document.head.removeChild(n);else return;else{const r=e==="light"?"#eeeeee":"#202020";n?n.setAttribute("content",r):Ja(r)}}function Rv(e="dark"){e==="auto"?Ya.setAttribute("data-theme","auto"):e==="dark"?Ya.setAttribute("data-theme","dark"):Ya.setAttribute("data-theme","light"),PC(e)}function bC(e="auto"){return(t,n)=>{Pv(n())!==e&&(Rv(e),t("storeSwitchTheme",o=>{o.app.theme=e}),Un(n().app))}}function RC(e){return(t,n)=>{t("appSelectChartStyleIndex",r=>{r.app.selectedChartStyleIndex=Number(e)}),Un(n().app)}}function bp(e,t){return(n,r)=>{n("appUpdateAppConfig",o=>{o.app[e]=t}),Un(r().app)}}function LC(e,t,n){return(r,o)=>{r("updateCollapsibleIsOpen",i=>{i.app.collapsibleIsOpen[`${e}:${t}`]=n}),CC(o().app)}}var Xp;const NC={baseURL:((Xp=document.getElementById("app"))==null?void 0:Xp.getAttribute("data-base-url"))??"http://127.0.0.1:9090",secret:"",addedAt:0},TC={selectedClashAPIConfigIndex:0,clashAPIConfigs:[NC],latencyTestUrl:"http://www.gstatic.com/generate_204",selectedChartStyleIndex:0,theme:"dark",collapsibleIsOpen:{},proxySortBy:"Natural",hideUnavailableProxies:!1,autoCloseOldConns:!1,logStreamingPaused:!1},IC=["hostname","port","secret","theme"];function DC(){const{search:e}=window.location,t={},n=new URLSearchParams(e);let r=!1;if(typeof e!="string"||e==="")return[t,n,r];for(const o of IC){const i=n.get(o);i&&(r=!0,t[o]=i,n.delete(o))}return[t,n,r]}function MC(){let e=fC();e={...TC,...e};const[t,n,r]=DC();if(r&&(history!=null&&history.replaceState)){const i=location.pathname+location.hash+(n.size>0?`?${n}`:"");history.replaceState(null,"",i)}const o=e.clashAPIConfigs[e.selectedClashAPIConfigIndex];if(o){const i=new URL(o.baseURL);t.hostname&&(t.hostname.indexOf("http")===0?i.href=decodeURIComponent(t.hostname):i.hostname=t.hostname),t.port&&(i.port=t.port),o.baseURL=iv(i.href),t.secret&&(o.secret=t.secret)}return(t.theme==="dark"||t.theme==="light")&&(e.theme=t.theme),Rv(e.theme),e}const AC=cC(SC.darkModePureBlackToggle,!1),jC="_root_1392e_1",FC="_mono_1392e_10",UC="_link_1392e_14",Xa={root:jC,mono:FC,link:UC};function Za({name:e,link:t,version:n}){return w.jsxs("div",{className:Xa.root,children:[w.jsx("h2",{children:e}),w.jsxs("p",{children:[w.jsx("span",{children:"Version "}),w.jsx("span",{className:Xa.mono,children:n})]}),w.jsx("p",{children:w.jsxs("a",{className:Xa.link,href:t,target:"_blank",rel:"noopener noreferrer",children:[w.jsx(O2,{size:20}),w.jsx("span",{children:"Source"})]})})]})}function $C(e){const{data:t}=sE(["/version",e.apiConfig],()=>A2("/version",e.apiConfig));return w.jsxs(w.Fragment,{children:[w.jsx(lv,{title:"PaoPao GateWay"}),w.jsx(Za,{name:"PaoPao GateWay",version:"PPGW_version",link:"https://github.com/kkkgo/PaoPaoGateWay"})," ",t&&t.version?w.jsx(Za,{name:"Clash",version:t.version,link:"https://github.com/Dreamacro/clash"}):null,w.jsx(Za,{name:"Yacd",version:"0.3.8",link:"https://github.com/haishanh/yacd"})]})}const zC=e=>({apiConfig:Jo(e)}),BC=Fn(zC)($C),WC="_loading_74j3j_1",VC="_spinner_74j3j_9",HC="_rotate_74j3j_1",Rp={loading:WC,spinner:VC,rotate:HC},Lv=({height:e})=>{const t=e?{height:e}:{};return w.jsx("div",{className:Rp.loading,style:t,children:w.jsx("div",{className:Rp.spinner})})},QC=new Ug,KC=new Lx({queryCache:QC,defaultOptions:{queries:{suspense:!0}}});var Fs="NOT_FOUND";function qC(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:Fs},put:function(r,o){t={key:r,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function GC(e,t){var n=[];function r(a){var l=n.findIndex(function(c){return t(a,c.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return Fs}function o(a,l){r(a)===Fs&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var YC=function(t,n){return t===n};function JC(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var o=n.length,i=0;i1?t-1:0),r=1;re.logs.logs,Tv=e=>e.logs.tail,n_=e=>e.logs.searchText,Xb=t_(Nv,Tv,n_,(e,t,n)=>{const r=[];for(let o=t;o>=0;o--)r.push(e[o]);if(e.length===bu)for(let o=bu-1;o>t;o--)r.push(e[o]);return n===""?r:r.filter(o=>o.payload.toLowerCase().indexOf(n)>=0)});function Zb(e){return t=>{t("logsUpdateSearchText",n=>{n.logs.searchText=e.toLowerCase()})}}function eR(e){return(t,n)=>{const r=n(),o=Nv(r),i=Tv(r),s=i>=bu-1?0:i+1;o[s]=e,t("logsAppendLog",a=>{a.logs.tail=s})}}const r_={searchText:"",logs:[],tail:-1},ha="/connections",qi=[];function o_(e){let t;try{t=JSON.parse(e)}catch{console.log("JSON.parse error",JSON.parse(e))}qi.forEach(n=>n(t))}let Ti;function Ru(e,t){if(Ti===1&&t)return Lp(t);Ti=1;const n=av(e,ha),r=new WebSocket(n);let o=!1;const i=()=>{o=!0,r.close()},s=()=>{o=!1,Ru(e,void 0)};if(document.addEventListener("freeze",i,{capture:!0,once:!0}),document.addEventListener("resume",s,{capture:!0,once:!0}),r.addEventListener("error",()=>Ti=3),r.addEventListener("close",function(a){Ti=3,o||(document.removeEventListener("freeze",i),document.removeEventListener("resume",s),Ru(e,void 0))}),r.addEventListener("message",a=>o_(a.data)),t)return Lp(t)}function Lp(e){return qi.push(e),function(){const n=qi.indexOf(e);qi.splice(n,1)}}async function tR(e){const{url:t,init:n}=We(e);return await fetch(t+ha,{...n,method:"DELETE"})}async function i_(e){const{url:t,init:n}=We(e);return await fetch(t+ha,{...n})}async function s_(e,t){const{url:n,init:r}=We(e),o=`${n}${ha}/${t}`;return await fetch(o,{...r,method:"DELETE"})}const tf="/proxies";async function a_(e){const{url:t,init:n}=We(e);return await(await fetch(t+tf,n)).json()}async function l_(e,t,n){const r={name:n},{url:o,init:i}=We(e),s=encodeURIComponent(t),a=`${o}${tf}/${s}`;return await fetch(a,{...i,method:"PUT",body:JSON.stringify(r)})}async function Iv(e,t,n="http://www.gstatic.com/generate_204"){const{url:r,init:o}=We(e),i=`timeout=5000&url=${encodeURIComponent(n)}`,s=`${r}${tf}/${encodeURIComponent(t)}/delay?${i}`;return await fetch(s,o)}async function u_(e){const{url:t,init:n}=We(e),r=await fetch(t+"/providers/proxies",n);return r.status===404?{providers:{}}:await r.json()}async function Dv(e,t){const{url:n,init:r}=We(e),o={...r,method:"PUT"};return await fetch(n+"/providers/proxies/"+encodeURIComponent(t),o)}async function c_(e,t){const{url:n,init:r}=We(e),o={...r,method:"GET"};return await fetch(n+"/providers/proxies/"+encodeURIComponent(t)+"/healthcheck",o)}const f_={proxies:{},delay:{},groupNames:[],showModalClosePrevConns:!1},Mv=()=>null,d_=["Direct","Reject","Relay","Selector","Fallback","URLTest","LoadBalance","Unknown"],Av=e=>e.proxies.proxies,sr=e=>e.proxies.delay,nR=e=>e.proxies.groupNames,p_=e=>e.proxies.proxyProviders||[],h_=e=>e.proxies.dangleProxyNames,rR=e=>e.proxies.showModalClosePrevConns;function m_(e,t){const n={};for(const r of e){const i=(t(r)||{history:[]}).history,s=i[i.length-1];s&&typeof s.delay=="number"&&(n[r]={kind:"Result",number:s.delay})}return n}function Tr(e){return async(t,n)=>{const[r,o]=await Promise.all([a_(e),u_(e)]),{proxyProviders:i,providerProxyRecord:s}=C_(o.providers),a={...s,...r.proxies},[l,u]=E_(a),c={...sr(n()),...m_(Object.keys(a),f=>a[f])},d=[];for(const f of u)s[f]||d.push(f);t("store/proxies#fetchProxies",f=>{f.proxies.proxies=a,f.proxies.groupNames=l,f.proxies.dangleProxyNames=d,f.proxies.delay=c,f.proxies.proxyProviders=i})}}function oR(e,t){return async n=>{try{await Dv(e,t)}catch{}n(Tr(e))}}function iR(e,t){return async n=>{for(let r=0;r{await nf(e,t),await n(Tr(e))}}async function g_(e,t,n){const r=await i_(e);r.ok||console.log("unable to fetch all connections",r.statusText);const i=(await r.json()).connections,s=[];for(const a of i)a.chains.indexOf(t)>-1&&a.chains.indexOf(n)<0&&s.push(a.id);await Promise.all(s.map(a=>s_(e,a).catch(Mv)))}function v_(e,t,n){const r=[n,t];let o,i=n;for(;(o=e[i])&&o.now;)r.unshift(o.now),i=o.now;return r}async function y_(e,t,n,r,o){try{if((await l_(n,r,o)).ok===!1)throw new Error("failed to switch proxy: res.statusText")}catch(s){throw console.log(s,"failed to switch proxy"),s}if(e(Tr(n)),EC(t())){const s=Av(t());Fv(n,s,{groupName:r,itemName:o})}}function jv(){return e=>{e("closeModalClosePrevConns",t=>{t.proxies.showModalClosePrevConns=!1})}}function Fv(e,t,n){const r=v_(t,n.groupName,n.itemName);g_(e,n.groupName,r[0])}function w_(e){return async(t,n)=>{var s;const r=n(),o=(s=r.proxies.switchProxyCtx)==null?void 0:s.to;if(!o){t(jv());return}const i=r.proxies.proxies;Fv(e,i,o),t("closePrevConnsAndTheModal",a=>{a.proxies.showModalClosePrevConns=!1,a.proxies.switchProxyCtx=void 0})}}function aR(e,t,n){return async(r,o)=>{y_(r,o,e,t,n).catch(Mv),r("store/proxies#switchProxy",i=>{const s=i.proxies.proxies;s[t]&&s[t].now&&(s[t].now=n)})}}function S_(e,t){return async(n,r)=>{n("set latency state to testing in progress",i=>{i.proxies.delay={...sr(r()),[t]:{kind:"Testing"}}});const o=bv(r());try{const i=await Iv(e,t,o);if(i.ok){const{delay:s}=await i.json();n("set latency result",a=>{a.proxies.delay={...sr(r()),[t]:{kind:"Result",number:s}}})}else n("set latency testing error",s=>{s.proxies.delay={...sr(r()),[t]:{kind:"Error",message:i.statusText}}})}catch(i){n("set latency testing networkish error",s=>{s.proxies.delay={...sr(r()),[t]:{kind:"Error",message:i.message||i.type}}})}}}function x_(e,t){return async(n,r)=>{const o=Av(r()),i=new Map,s=new Map,a=[];t.forEach(l=>{const u=o[l];u.__provider?u.__provider&&(i.get(l)||(i.set(l,!0),n("set latency state to testing in progress",c=>{c.proxies.delay={...sr(r()),[l]:{kind:"Testing"}}})),s.get(u.__provider)||(s.set(u.__provider,!0),a.push(nf(e,u.__provider)))):i.get(l)||(i.set(l,!0),n(S_(e,l)))}),await Promise.all(a),await n(Tr(e))}}function lR(e){return async(t,n)=>{const r=h_(n()),o=bv(n());await Promise.all(r.map(s=>Iv(e,s,o)));const i=p_(n());for(const s of i)await nf(e,s.name);await t(Tr(e))}}function E_(e){let t=[],n;const r=[];for(const o in e){const i=e[o];i.all&&Array.isArray(i.all)?(t.push(o),o==="GLOBAL"&&(n=Array.from(i.all))):d_.indexOf(i.type)<0&&r.push(o)}return n&&(n.push("GLOBAL"),t=t.map(o=>[n.indexOf(o),o]).sort((o,i)=>o[0]-i[0]).map(o=>o[1])),[t,r]}function C_(e){const t=Object.keys(e),n=[],r={};for(let o=0;o{if(e&&e(n),!n.defaultPrevented)return t(n)}}function Np(e){return typeof e=="boolean"}function Us(e){return!!(e&&{}.toString.call(e)=="[object Function]")}function P_(e){return typeof e=="string"}function b_(e,t){if(e!=null)if(Us(e))e(t);else try{e.current=t}catch{throw new Error(`Cannot assign value "${t}" to ref "${e}"`)}}function $n(...e){return v.useCallback(t=>{for(let n of e)b_(n,t)},e)}function cn(e){return Uv()?e?e.ownerDocument:document:null}function R_(e,t){let n=v.createContext(t);function r(i){let{children:s,...a}=i,l=v.useMemo(()=>a,Object.values(a));return v.createElement(n.Provider,{value:l},s)}function o(i){let s=v.useContext(n);if(s)return s;if(t)return t;throw Error(`${i} must be rendered inside of a ${e} component.`)}return n.displayName=`${e}Context`,r.displayName=`${e}Provider`,[r,o]}function L_(e){let t=cn(e),n=t.defaultView||window;return t?{width:t.documentElement.clientWidth??n.innerWidth,height:t.documentElement.clientHeight??n.innerHeight}:{width:0,height:0}}function Gi(e){return"which"in e?e.which===3:"button"in e?e.button===2:!1}function kr(...e){return e.filter(t=>t!=null).join("--")}function rf(){}function $v(){let[,e]=v.useState(Object.create(null));return v.useCallback(()=>{e(Object.create(null))},[])}var pr=Uv()?v.useLayoutEffect:v.useEffect;function el(e){const t=v.useRef(null);return v.useEffect(()=>{t.current=e},[e]),t.current}function N_(e,t){let[n,r]=v.useState(t),o=v.useCallback(i=>{e.current=i,r(i)},[]);return[n,o]}var T_=({children:e,type:t="reach-portal",containerRef:n})=>{let r=v.useRef(null),o=v.useRef(null),i=$v();return v.useEffect(()=>{n!=null&&(typeof n!="object"||!("current"in n)?console.warn("@reach/portal: Invalid value passed to the `containerRef` of a `Portal`. The portal will be appended to the document body, but if you want to attach it to another DOM node you must pass a valid React ref object to `containerRef`."):n.current==null&&console.warn("@reach/portal: A ref was passed to the `containerRef` prop of a `Portal`, but no DOM node was attached to it. Be sure to pass the ref to a DOM component.\n\nIf you are forwarding the ref from another component, be sure to use the React.forwardRef API. See https://reactjs.org/docs/forwarding-refs.html."))},[n]),pr(()=>{if(!r.current)return;let s=r.current.ownerDocument,a=(n==null?void 0:n.current)||s.body;return o.current=s==null?void 0:s.createElement(t),a.appendChild(o.current),i(),()=>{o.current&&a&&a.removeChild(o.current)}},[t,i,n]),o.current?Mc.createPortal(e,o.current):v.createElement("span",{ref:r})},of=({unstable_skipInitialRender:e,...t})=>{let[n,r]=v.useState(!1);return v.useEffect(()=>{e&&r(!0)},[e]),e&&!n?null:v.createElement(T_,{...t})};of.displayName="Portal";var I_=["bottom","height","left","right","top","width"],D_=function(t,n){return t===void 0&&(t={}),n===void 0&&(n={}),I_.some(function(r){return t[r]!==n[r]})},Ft=new Map,zv,M_=function e(){var t=[];Ft.forEach(function(n,r){var o=r.getBoundingClientRect();D_(o,n.rect)&&(n.rect=o,t.push(n))}),t.forEach(function(n){n.callbacks.forEach(function(r){return r(n.rect)})}),zv=window.requestAnimationFrame(e)};function A_(e,t){return{observe:function(){var r=Ft.size===0;Ft.has(e)?Ft.get(e).callbacks.push(t):Ft.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),r&&M_()},unobserve:function(){var r=Ft.get(e);if(r){var o=r.callbacks.indexOf(t);o>=0&&r.callbacks.splice(o,1),r.callbacks.length||Ft.delete(e),Ft.size||cancelAnimationFrame(zv)}}}}function $s(e,t,n){let r,o;Np(t)?r=t:(r=(t==null?void 0:t.observe)??!0,o=t==null?void 0:t.onChange),Us(n)&&(o=n),v.useEffect(()=>{Np(t)&&console.warn("Passing `observe` as the second argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `observe` property as the second argument (`useRect(ref, { observe })`).\nSee https://reach.tech/rect#userect-observe")},[t]),v.useEffect(()=>{Us(n)&&console.warn("Passing `onChange` as the third argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `onChange` property as the second argument (`useRect(ref, { onChange })`).\nSee https://reach.tech/rect#userect-onchange")},[n]);let[i,s]=v.useState(e.current),a=v.useRef(!1),l=v.useRef(!1),[u,c]=v.useState(null),d=v.useRef(o);return pr(()=>{d.current=o,e.current!==i&&s(e.current)}),pr(()=>{i&&!a.current&&(a.current=!0,c(i.getBoundingClientRect()))},[i]),pr(()=>{if(!r)return;let f=i;if(l.current||(l.current=!0,f=e.current),!f){console.warn("You need to place the ref");return}let g=A_(f,y=>{var S;(S=d.current)==null||S.call(d,y),c(y)});return g.observe(),()=>{g.unobserve()}},[r,i,e]),u}/*! -* tabbable 5.3.3 -* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE -*/var j_=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Lu=j_.join(","),Bv=typeof Element>"u",Ao=Bv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Nu=!Bv&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},F_=function(t,n,r){var o=Array.prototype.slice.apply(t.querySelectorAll(Lu));return n&&Ao.call(t,Lu)&&o.unshift(t),o=o.filter(r),o},U_=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,u=e(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:s,candidates:u})}else{var c=Ao.call(s,Lu);c&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!r.shadowRootFilter||r.shadowRootFilter(s);if(d&&f){var g=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,g):o.push({scope:s,candidates:g})}else i.unshift.apply(i,s.children)}}return o},Wv=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},$_=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Vv=function(t){return t.tagName==="INPUT"},z_=function(t){return Vv(t)&&t.type==="hidden"},B_=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},W_=function(t,n){for(var r=0;rsummary:first-of-type"),s=i?t.parentElement:t;if(Ao.call(s,"details:not([open]) *"))return!0;var a=Nu(t).host,l=(a==null?void 0:a.ownerDocument.contains(a))||t.ownerDocument.contains(t);if(!r||r==="full"){if(typeof o=="function"){for(var u=t;t;){var c=t.parentElement,d=Nu(t);if(c&&!c.shadowRoot&&o(c)===!0)return Tp(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=u}if(l)return!t.getClientRects().length}else if(r==="non-zero-area")return Tp(t);return!1},q_=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},J_=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scope,a=s?o.scope:o,l=Wv(a,s),u=s?e(o.candidates):a;l===0?s?n.push.apply(n,u):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:u})}),r.sort($_).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ct=function(t,n){n=n||{};var r;return n.getShadowRoot?r=U_([t],n.includeContainer,{filter:Ip.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Y_}):r=F_(t,n.includeContainer,Ip.bind(null,n)),J_(r)},sf=v.forwardRef(function({unstable_skipInitialPortalRender:t,...n},r){return v.createElement(of,{unstable_skipInitialRender:t},v.createElement(Hv,{ref:r,...n}))});sf.displayName="Popover";var Hv=v.forwardRef(function({as:t="div",targetRef:n,position:r=ek,unstable_observableRefs:o=[],...i},s){const a=v.useRef(null),l=$s(a,{observe:!i.hidden}),u=$s(n,{observe:!0}),c=$n(a,s);return nk(n,a),v.createElement(t,{"data-reach-popover":"",ref:c,...i,style:{position:"absolute",...X_(r,u,l,...o),...i.style}})});Hv.displayName="PopoverImpl";function X_(e,t,n,...r){return n?e(t,n,...r.map(o=>o.current)):{visibility:"hidden"}}function Z_(e,t,n){return{top:n?`${e.top-t.height+window.pageYOffset}px`:`${e.top+e.height+window.pageYOffset}px`}}var ek=(e,t)=>{if(!e||!t)return{};const{directionRight:n,directionUp:r}=tk(e,t);return{left:n?`${e.right-t.width+window.pageXOffset}px`:`${e.left+window.pageXOffset}px`,...Z_(e,t,r)}};function tk(e,t,n=0,r=0){const o={top:e.top-t.height<0,right:window.innerWidth(n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}),[]);function o(){const p=Ct(n),h=p&&e.current?p.indexOf(e.current):-1,E=p&&p[h+1];return t.current&&t.current.contains(E||null)?!1:E}function i(){return e.current?e.current===n.activeElement:!1}function s(p){const h=t.current&&Ct(t.current);h&&h[0]&&(p.preventDefault(),h[0].focus())}function a(){if(t.current?t.current.contains(n.activeElement||null):!1){const h=t.current&&Ct(t.current);return!!(h&&h[h.length-1]===n.activeElement)}return!1}function l(p){const h=o();h&&(p.preventDefault(),h.focus())}function u(p){if(!p.shiftKey)return;const h=o();return p.target===h}function c(p){const h=t.current&&Ct(t.current),E=h&&h[h.length-1];E&&(p.preventDefault(),E.focus())}function d(p){const h=t.current&&Ct(t.current);return h?h.length===0?!1:p.target===h[0]:!1}function f(p){var h;p.preventDefault(),(h=e.current)==null||h.focus()}function g(p){const h=t.current?Ct(n).filter(E=>!t.current.contains(E)):null;return h?p.target===h[h.length-1]:!1}function y(p){return p.target===Ct(n)[0]}let S=[];function _(){const p=t.current&&Ct(t.current);p&&(p.forEach(h=>{S.push([h,h.tabIndex]),h.tabIndex=-1}),n.addEventListener("focusin",m))}function m(){n.removeEventListener("focusin",m),S.forEach(([p,h])=>{p.tabIndex=h})}}var tl=!1,rk=0;function Dp(){return++rk}var Mp=Et["useId".toString()];function Qv(e){if(Mp!==void 0){let o=Mp();return e??o}let t=e??(tl?Dp():null),[n,r]=v.useState(t);return pr(()=>{n===null&&r(Dp())},[]),v.useEffect(()=>{tl===!1&&(tl=!0)},[]),e??n??void 0}function ok(e,t={}){const n=[];let r=v.createContext({descendants:n,registerDescendant:()=>rf,...t});return r.displayName=e,r}function ik(e,t,n){let r=$v(),{registerDescendant:o,descendants:i}=v.useContext(t),s=n??i.findIndex(a=>a.element===e.element);return pr(()=>(e.element||r(),o({...e,index:s})),[e,r,s,o,...Object.values(e)]),s}function sk(){return v.useState([])}function ak(e){return v.useContext(e).descendants}function lk({context:e,children:t,items:n,set:r}){let o=v.useCallback(({element:i,index:s,...a})=>i?(r(l=>{if(s!=null&&s!==-1)return Ap(l,{element:i,index:s,...a},s);if(l.length===0)return[{...a,element:i,index:0}];if(l.find(d=>d.element===i))return console.warn(`[reach-ui]: \`useDescendant\` was called with an element that was already registered. - -If you are using the \`@reach/descendants\` package directly, make sure to only register descendants once. Registering a descendant more than once will lead to bugs in your app. - -If you are using another \`reach-ui\` package, this is probably our bug! - -To report a bug, open a new issue: - - https://github.com/reach/reach-ui/issues/new?assignees=&labels=&template=Bug_report.md - -IMPORTANT: this check will only run in the development build, so if you see this warning please be aware that your app may crash when deployed.`),fk(l);let u=ck(l,i),c;return u===-1?c=[...l,{...a,element:i,index:l.length}]:c=Ap(l,{...a,element:i,index:u},u),c}),()=>{i&&r(l=>l.filter(u=>i!==u.element))}):rf,[]);return v.createElement(e.Provider,{value:v.useMemo(()=>({descendants:n,registerDescendant:o}),[n,o])},t)}function uk(e,t){let{descendants:n}=v.useContext(e),{callback:r,currentIndex:o,filter:i,key:s="index",orientation:a="vertical",rotate:l=!0,rtl:u=!1}=t;return function(d){if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(d.key))return;let f=o??-1,g=i?n.filter(i):n;if(!g.length)return;let y=g.findIndex(h=>h.index===o);function S(){return f===p().index?l?m():g[y]:g[(y+1)%g.length]}function _(){return f===m().index?l?p():g[y]:g[(y-1+g.length)%g.length]}function m(){return g[0]}function p(){return g[g.length-1]}switch(d.key){case"ArrowDown":if(a==="vertical"||a==="both"){d.preventDefault();let O=S();r(s==="option"?O:O[s])}break;case"ArrowUp":if(a==="vertical"||a==="both"){d.preventDefault();let O=_();r(s==="option"?O:O[s])}break;case"ArrowLeft":if(a==="horizontal"||a==="both"){d.preventDefault();let O=(u?S:_)();r(s==="option"?O:O[s])}break;case"ArrowRight":if(a==="horizontal"||a==="both"){d.preventDefault();let O=(u?_:S)();r(s==="option"?O:O[s])}break;case"PageUp":d.preventDefault();let h=(d.ctrlKey?_:m)();r(s==="option"?h:h[s]);break;case"Home":d.preventDefault();let E=m();r(s==="option"?E:E[s]);break;case"PageDown":d.preventDefault();let b=(d.ctrlKey?S:p)();r(s==="option"?b:b[s]);break;case"End":d.preventDefault();let P=p();r(s==="option"?P:P[s]);break}}}function Kv(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function ck(e,t){if(!t||!e.length)return-1;let n=e.length;for(;n--;){let r=e[n].element;if(r&&Kv(r,t))return n+1}return-1}function Ap(e,t,n){return n==null||!(n in e)?[...e,t]:[...e.slice(0,n),t,...e.slice(n)]}function fk(e){return e.sort((t,n)=>!t.element||!n.element?0:Kv(t.element,n.element)?-1:1).map((t,n)=>({...t,index:n}))}var qv="CLEAR_SELECTION_INDEX",af="CLICK_MENU_ITEM",jo="CLOSE_MENU",dk="OPEN_MENU_AT_FIRST_ITEM",Tu="OPEN_MENU_AT_INDEX",Gv="OPEN_MENU_CLEARED",Iu="SEARCH_FOR_ITEM",Yt="SELECT_ITEM_AT_INDEX",Du="SET_BUTTON_ID",ma=ok("DropdownDescendantContext"),[pk,Xo]=R_("Dropdown"),hk={triggerId:null,isExpanded:!1,typeaheadQuery:"",selectionIndex:-1},Yv=({id:e,children:t})=>{let n=v.useRef(null),r=v.useRef(null),o=v.useRef(null),[i,s]=sk(),a=Qv(e),l=e||kr("menu",a),u=kr("menu-button",l),[c,d]=v.useReducer(xk,{...hk,triggerId:u}),f=v.useRef(!1),g=v.useRef([]),y=v.useRef(!1),S=v.useRef({x:0,y:0});return v.useEffect(()=>{c.isExpanded?(window.__REACH_DISABLE_TOOLTIPS=!0,window.requestAnimationFrame(()=>{zs(r.current)})):window.__REACH_DISABLE_TOOLTIPS=!1},[c.isExpanded]),v.createElement(lk,{context:ma,items:i,set:s},v.createElement(pk,{dispatch:d,dropdownId:l,dropdownRef:r,mouseDownStartPosRef:S,popoverRef:o,readyToSelect:y,selectCallbacks:g,state:c,triggerClickedRef:f,triggerRef:n},Us(t)?t({isExpanded:c.isExpanded,isOpen:c.isExpanded}):t))};Yv.displayName="DropdownProvider";function Jv({onKeyDown:e,onMouseDown:t,id:n,ref:r,...o}){let{dispatch:i,dropdownId:s,mouseDownStartPosRef:a,triggerClickedRef:l,triggerRef:u,state:{triggerId:c,isExpanded:d}}=Xo("useDropdownTrigger"),f=$n(u,r),g=ny(),y=v.useMemo(()=>g.findIndex(m=>!m.disabled),[g]);v.useEffect(()=>{n!=null&&n!==c&&i({type:Du,payload:n})},[c,i,n]),v.useEffect(()=>{n==null&&i({type:Du,payload:kr("menu-button",s)})},[s,i,n]);function S(m){switch(m.key){case"ArrowDown":case"ArrowUp":m.preventDefault(),i({type:Tu,payload:{index:y}});break;case"Enter":case" ":i({type:Tu,payload:{index:y}});break}}function _(m){Gi(m.nativeEvent)||(a.current={x:m.clientX,y:m.clientY},d||(l.current=!0),i(d?{type:jo}:{type:Gv}))}return{data:{isExpanded:d,controls:s},props:{...o,ref:f,id:c||void 0,onKeyDown:ie(e,S),onMouseDown:ie(t,_),type:"button"}}}var mk=v.forwardRef(({as:e="button",...t},n)=>{let{props:r}=Jv({...t,ref:n});return v.createElement(e,{"data-reach-dropdown-trigger":"",...r})});mk.displayName="DropdownTrigger";function Xv({index:e,isLink:t=!1,onClick:n,onDragStart:r,onMouseDown:o,onMouseEnter:i,onMouseLeave:s,onMouseMove:a,onMouseUp:l,onSelect:u,disabled:c,onFocus:d,valueText:f,ref:g,...y}){let{dispatch:S,dropdownRef:_,mouseDownStartPosRef:m,readyToSelect:p,selectCallbacks:h,triggerRef:E,state:{selectionIndex:b,isExpanded:P}}=Xo("useDropdownItem"),O=v.useRef(null),[x,R]=v.useState(f||""),L=v.useCallback(H=>{!f&&(H!=null&&H.textContent)&&R(H.textContent)},[f]),D=v.useRef(!1),[j,A]=N_(O,null),N=v.useMemo(()=>({element:j,key:x,disabled:c,isLink:t}),[c,j,t,x]),T=ik(N,ma,e),F=T===b&&!c,C=$n(g,A,L);h.current[T]=u;function k(){zs(E.current),u&&u(),S({type:af})}function M(H){Gi(H.nativeEvent)||t&&(c?H.preventDefault():k())}function $(H){t&&H.preventDefault()}function B(H){Gi(H.nativeEvent)||(t?D.current=!0:H.preventDefault())}function q(H){let Mt=cn(_.current);!F&&T!=null&&!c&&(_!=null&&_.current&&_.current!==Mt.activeElement&&O.current!==Mt.activeElement&&_.current.focus(),S({type:Yt,payload:{index:T}}))}function be(H){S({type:qv})}function Re(H){if(!p.current){let Mt=8,Ly=Math.abs(H.clientX-m.current.x),Ny=Math.abs(H.clientY-m.current.y);(Ly>Mt||Ny>Mt)&&(p.current=!0)}!F&&T!=null&&!c&&S({type:Yt,payload:{index:T,dropdownRef:_}})}function hn(){p.current=!0,!F&&T!=null&&!c&&S({type:Yt,payload:{index:T}})}function Ze(H){if(!Gi(H.nativeEvent)){if(!p.current){p.current=!0;return}t?D.current?D.current=!1:O.current&&O.current.click():c||k()}}return v.useEffect(()=>{if(P){let H=window.setTimeout(()=>{p.current=!0},400);return()=>{window.clearTimeout(H)}}else p.current=!1},[P,p]),v.useEffect(()=>{let H=cn(O.current);return H.addEventListener("mouseup",Mt),()=>{H.removeEventListener("mouseup",Mt)};function Mt(){D.current=!1}},[]),{data:{disabled:c},props:{id:ty(T),tabIndex:-1,...y,ref:C,"data-disabled":c?"":void 0,"data-selected":F?"":void 0,"data-valuetext":x,onClick:ie(n,M),onDragStart:ie(r,$),onMouseDown:ie(o,B),onMouseEnter:ie(i,q),onMouseLeave:ie(s,be),onMouseMove:ie(a,Re),onFocus:ie(d,hn),onMouseUp:ie(l,Ze)}}}var gk=v.forwardRef(({as:e="div",...t},n)=>{let{props:r}=Xv({...t,ref:n});return v.createElement(e,{"data-reach-dropdown-item":"",...r})});gk.displayName="DropdownItem";function Zv({id:e,onKeyDown:t,ref:n,...r}){let{dispatch:o,triggerRef:i,dropdownRef:s,selectCallbacks:a,dropdownId:l,state:{isExpanded:u,triggerId:c,selectionIndex:d,typeaheadQuery:f}}=Xo("useDropdownItems"),g=ny(),y=$n(s,n);v.useEffect(()=>{let h=wk(g,f);f&&h!=null&&o({type:Yt,payload:{index:h,dropdownRef:s}});let E=window.setTimeout(()=>f&&o({type:Iu,payload:""}),1e3);return()=>window.clearTimeout(E)},[o,g,f,s]);let S=el(g.length),_=el(g[d]),m=el(d);v.useEffect(()=>{d>g.length-1?o({type:Yt,payload:{index:g.length-1,dropdownRef:s}}):S!==g.length&&d>-1&&_&&m===d&&g[d]!==_&&o({type:Yt,payload:{index:g.findIndex(h=>h.key===(_==null?void 0:_.key)),dropdownRef:s}})},[s,o,g,S,_,m,d]);let p=ie(function(E){let{key:b}=E;if(u)switch(b){case"Enter":case" ":let P=g.find(O=>O.index===d);P&&!P.disabled&&(E.preventDefault(),P.isLink&&P.element?P.element.click():(zs(i.current),a.current[P.index]&&a.current[P.index](),o({type:af})));break;case"Escape":zs(i.current),o({type:jo});break;case"Tab":E.preventDefault();break;default:if(P_(b)&&b.length===1){let O=f+b.toLowerCase();o({type:Iu,payload:O})}break}},uk(ma,{currentIndex:d,orientation:"vertical",rotate:!1,filter:h=>!h.disabled,callback:h=>{o({type:Yt,payload:{index:h,dropdownRef:s}})},key:"index"}));return{data:{activeDescendant:ty(d)||void 0,triggerId:c},props:{tabIndex:-1,...r,ref:y,id:l,onKeyDown:ie(t,p)}}}var vk=v.forwardRef(({as:e="div",...t},n)=>{let{props:r}=Zv({...t,ref:n});return v.createElement(e,{"data-reach-dropdown-items":"",...r})});vk.displayName="DropdownItems";function ey({onBlur:e,portal:t=!0,position:n,ref:r,...o}){let{triggerRef:i,triggerClickedRef:s,dispatch:a,dropdownRef:l,popoverRef:u,state:{isExpanded:c}}=Xo("useDropdownPopover"),d=$n(u,r);return v.useEffect(()=>{if(!c)return;let f=cn(u.current);function g(y){s.current?s.current=!1:Sk(u.current,y.target)||a({type:jo})}return f.addEventListener("mousedown",g),()=>{f.removeEventListener("mousedown",g)}},[s,i,a,l,u,c]),{data:{portal:t,position:n,targetRef:i,isExpanded:c},props:{ref:d,hidden:!c,onBlur:ie(e,f=>{f.currentTarget.contains(f.relatedTarget)||a({type:jo})}),...o}}}var yk=v.forwardRef(({as:e="div",...t},n)=>{let{data:{portal:r,targetRef:o,position:i},props:s}=ey({...t,ref:n}),a={"data-reach-dropdown-popover":""};return r?v.createElement(sf,{...s,...a,as:e,targetRef:o,position:i,unstable_skipInitialPortalRender:!0}):v.createElement(e,{...s,...a})});yk.displayName="DropdownPopover";function wk(e,t=""){if(!t)return null;let n=e.find(r=>{var o,i,s;return r.disabled?!1:(s=(i=(o=r.element)==null?void 0:o.dataset)==null?void 0:i.valuetext)==null?void 0:s.toLowerCase().startsWith(t)});return n?e.indexOf(n):null}function ty(e){let{dropdownId:t}=Xo("useItemId");return e!=null&&e>-1?kr(`option-${e}`,t):void 0}function zs(e){e&&e.focus()}function Sk(e,t){return!!(e&&e.contains(t))}function xk(e,t={}){switch(t.type){case af:return{...e,isExpanded:!1,selectionIndex:-1};case jo:return{...e,isExpanded:!1,selectionIndex:-1};case dk:return{...e,isExpanded:!0,selectionIndex:0};case Tu:return{...e,isExpanded:!0,selectionIndex:t.payload.index};case Gv:return{...e,isExpanded:!0,selectionIndex:-1};case Yt:{let{dropdownRef:n={current:null}}=t.payload;if(t.payload.index>=0&&t.payload.index!==e.selectionIndex){if(n.current){let r=cn(n.current);n.current!==(r==null?void 0:r.activeElement)&&n.current.focus()}return{...e,selectionIndex:t.payload.max!=null?Math.min(Math.max(t.payload.index,0),t.payload.max):Math.max(t.payload.index,0)}}return e}case qv:return{...e,selectionIndex:-1};case Du:return{...e,triggerId:t.payload};case Iu:return typeof t.payload<"u"?{...e,typeaheadQuery:t.payload}:e;default:return e}}function ny(){return ak(ma)}var ry={exports:{}},G={};/** @license React v17.0.2 - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var ga=60103,va=60106,Zo=60107,ei=60108,ti=60114,ni=60109,ri=60110,oi=60112,ii=60113,lf=60120,si=60115,ai=60116,oy=60121,iy=60122,sy=60117,ay=60129,ly=60131;if(typeof Symbol=="function"&&Symbol.for){var pe=Symbol.for;ga=pe("react.element"),va=pe("react.portal"),Zo=pe("react.fragment"),ei=pe("react.strict_mode"),ti=pe("react.profiler"),ni=pe("react.provider"),ri=pe("react.context"),oi=pe("react.forward_ref"),ii=pe("react.suspense"),lf=pe("react.suspense_list"),si=pe("react.memo"),ai=pe("react.lazy"),oy=pe("react.block"),iy=pe("react.server.block"),sy=pe("react.fundamental"),ay=pe("react.debug_trace_mode"),ly=pe("react.legacy_hidden")}function ht(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ga:switch(e=e.type,e){case Zo:case ti:case ei:case ii:case lf:return e;default:switch(e=e&&e.$$typeof,e){case ri:case oi:case ai:case si:case ni:return e;default:return t}}case va:return t}}}var Ek=ni,Ck=ga,_k=oi,kk=Zo,Ok=ai,Pk=si,bk=va,Rk=ti,Lk=ei,Nk=ii;G.ContextConsumer=ri;G.ContextProvider=Ek;G.Element=Ck;G.ForwardRef=_k;G.Fragment=kk;G.Lazy=Ok;G.Memo=Pk;G.Portal=bk;G.Profiler=Rk;G.StrictMode=Lk;G.Suspense=Nk;G.isAsyncMode=function(){return!1};G.isConcurrentMode=function(){return!1};G.isContextConsumer=function(e){return ht(e)===ri};G.isContextProvider=function(e){return ht(e)===ni};G.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ga};G.isForwardRef=function(e){return ht(e)===oi};G.isFragment=function(e){return ht(e)===Zo};G.isLazy=function(e){return ht(e)===ai};G.isMemo=function(e){return ht(e)===si};G.isPortal=function(e){return ht(e)===va};G.isProfiler=function(e){return ht(e)===ti};G.isStrictMode=function(e){return ht(e)===ei};G.isSuspense=function(e){return ht(e)===ii};G.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Zo||e===ti||e===ay||e===ei||e===ii||e===lf||e===ly||typeof e=="object"&&e!==null&&(e.$$typeof===ai||e.$$typeof===si||e.$$typeof===ni||e.$$typeof===ri||e.$$typeof===oi||e.$$typeof===sy||e.$$typeof===oy||e[0]===iy)};G.typeOf=ht;ry.exports=G;var Tk=ry.exports,uy=v.forwardRef(({as:e=v.Fragment,id:t,children:n,...r},o)=>{let s=v.useMemo(()=>{try{return Tk.isFragment(v.createElement(e,null))}catch{return!1}},[e])?{}:{ref:o,id:t,"data-reach-menu":"",...r};return v.createElement(e,{...s},v.createElement(Yv,{id:t,children:n}))});uy.displayName="Menu";var cy=v.forwardRef(({as:e="button",...t},n)=>{let{data:{isExpanded:r,controls:o},props:i}=Jv({...t,ref:n});return v.createElement(e,{"aria-expanded":r?!0:void 0,"aria-haspopup":!0,"aria-controls":o,...i,"data-reach-menu-button":""})});cy.displayName="MenuButton";var uf=v.forwardRef(({as:e="div",...t},n)=>{let{data:{disabled:r},props:o}=Xv({...t,ref:n});return v.createElement(e,{role:"menuitem",...o,"aria-disabled":r||void 0,"data-reach-menu-item":""})});uf.displayName="MenuItemImpl";var fy=v.forwardRef(({as:e="div",...t},n)=>v.createElement(uf,{...t,ref:n,as:e}));fy.displayName="MenuItem";var dy=v.forwardRef(({as:e="div",...t},n)=>{let{data:{activeDescendant:r,triggerId:o},props:i}=Zv({...t,ref:n});return v.createElement(e,{"aria-activedescendant":r,"aria-labelledby":o||void 0,role:"menu",...i,"data-reach-menu-items":""})});dy.displayName="MenuItems";var Ik=v.forwardRef(({as:e="a",component:t,onSelect:n,...r},o)=>(v.useEffect(()=>{t&&console.warn("[@reach/menu-button]: Please use the `as` prop instead of `component`")},[t]),v.createElement(uf,{...r,ref:o,"data-reach-menu-link":"",as:e,isLink:!0,onSelect:n||rf})));Ik.displayName="MenuLink";var py=v.forwardRef(({portal:e=!0,...t},n)=>v.createElement(hy,{portal:e},v.createElement(dy,{...t,ref:n,"data-reach-menu-list":""})));py.displayName="MenuList";var hy=v.forwardRef(({as:e="div",...t},n)=>{let{data:{portal:r,targetRef:o,position:i},props:s}=ey({...t,ref:n}),a={"data-reach-menu-popover":""};return r?v.createElement(sf,{...s,...a,as:e,targetRef:o,position:i,unstable_skipInitialPortalRender:!0}):v.createElement(e,{...s,...a})});hy.displayName="MenuPopover";var my=v.forwardRef(function({as:t="span",style:n={},...r},o){return v.createElement(t,{ref:o,style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal",...n},...r})});my.displayName="VisuallyHidden";var Dk=100,Mk=500,Mu={initial:"IDLE",states:{IDLE:{enter:nl,on:{MOUSE_ENTER:"FOCUSED",FOCUS:"VISIBLE"}},FOCUSED:{enter:Fk,leave:Uk,on:{MOUSE_MOVE:"FOCUSED",MOUSE_LEAVE:"IDLE",MOUSE_DOWN:"DISMISSED",BLUR:"IDLE",REST:"VISIBLE"}},VISIBLE:{on:{FOCUS:"FOCUSED",MOUSE_ENTER:"FOCUSED",MOUSE_LEAVE:"LEAVING_VISIBLE",BLUR:"LEAVING_VISIBLE",MOUSE_DOWN:"DISMISSED",SELECT_WITH_KEYBOARD:"DISMISSED",GLOBAL_MOUSE_MOVE:"LEAVING_VISIBLE"}},LEAVING_VISIBLE:{enter:$k,leave:()=>{zk(),nl()},on:{MOUSE_ENTER:"VISIBLE",FOCUS:"VISIBLE",TIME_COMPLETE:"IDLE"}},DISMISSED:{leave:()=>{nl()},on:{MOUSE_LEAVE:"IDLE",BLUR:"IDLE"}}}},Ge={value:Mu.initial,context:{id:null}},Yi=[];function Ak(e){return Yi.push(e),()=>{Yi.splice(Yi.indexOf(e),1)}}function jk(){Yi.forEach(e=>e(Ge))}var Au;function Fk(){window.clearTimeout(Au),Au=window.setTimeout(()=>{rt({type:"REST"})},Dk)}function Uk(){window.clearTimeout(Au)}var ju;function $k(){window.clearTimeout(ju),ju=window.setTimeout(()=>rt({type:"TIME_COMPLETE"}),Mk)}function zk(){window.clearTimeout(ju)}function nl(){Ge.context.id=null}function Bk({id:e,onPointerEnter:t,onPointerMove:n,onPointerLeave:r,onPointerDown:o,onMouseEnter:i,onMouseMove:s,onMouseLeave:a,onMouseDown:l,onFocus:u,onBlur:c,onKeyDown:d,disabled:f,ref:g,DEBUG_STYLE:y}={}){let S=String(Qv(e)),[_,m]=v.useState(y?!0:jp(S,!0)),p=v.useRef(null),h=$n(g,p),E=$s(p,{observe:_});v.useEffect(()=>Ak(()=>{m(jp(S))}),[S]),v.useEffect(()=>{let F=cn(p.current);function C(k){(k.key==="Escape"||k.key==="Esc")&&Ge.value==="VISIBLE"&&rt({type:"SELECT_WITH_KEYBOARD"})}return F.addEventListener("keydown",C),()=>F.removeEventListener("keydown",C)},[]),Qk({disabled:f,isVisible:_,ref:p});function b(F,C){return typeof window<"u"&&"PointerEvent"in window?F:ie(F,C)}function P(F){return function(k){k.pointerType==="mouse"&&F(k)}}function O(){rt({type:"MOUSE_ENTER",id:S})}function x(){rt({type:"MOUSE_MOVE",id:S})}function R(){rt({type:"MOUSE_LEAVE"})}function L(){Ge.context.id===S&&rt({type:"MOUSE_DOWN"})}function D(){window.__REACH_DISABLE_TOOLTIPS||rt({type:"FOCUS",id:S})}function j(){Ge.context.id===S&&rt({type:"BLUR"})}function A(F){(F.key==="Enter"||F.key===" ")&&rt({type:"SELECT_WITH_KEYBOARD"})}return[{"aria-describedby":_?kr("tooltip",S):void 0,"data-state":_?"tooltip-visible":"tooltip-hidden","data-reach-tooltip-trigger":"",ref:h,onPointerEnter:ie(t,P(O)),onPointerMove:ie(n,P(x)),onPointerLeave:ie(r,P(R)),onPointerDown:ie(o,P(L)),onMouseEnter:b(i,O),onMouseMove:b(s,x),onMouseLeave:b(a,R),onMouseDown:b(l,L),onFocus:ie(u,D),onBlur:ie(c,j),onKeyDown:ie(d,A)},{id:S,triggerRect:E,isVisible:_},_]}var cf=v.forwardRef(function({children:e,label:t,ariaLabel:n,id:r,DEBUG_STYLE:o,...i},s){let a=v.Children.only(e);v.useEffect(()=>{n&&console.warn("The `ariaLabel prop is deprecated and will be removed from @reach/tooltip in a future version of Reach UI. Please use `aria-label` instead.")},[n]);let[l,u]=Bk({id:r,onPointerEnter:a.props.onPointerEnter,onPointerMove:a.props.onPointerMove,onPointerLeave:a.props.onPointerLeave,onPointerDown:a.props.onPointerDown,onMouseEnter:a.props.onMouseEnter,onMouseMove:a.props.onMouseMove,onMouseLeave:a.props.onMouseLeave,onMouseDown:a.props.onMouseDown,onFocus:a.props.onFocus,onBlur:a.props.onBlur,onKeyDown:a.props.onKeyDown,disabled:a.props.disabled,ref:a.ref,DEBUG_STYLE:o});return v.createElement(v.Fragment,null,v.cloneElement(a,l),v.createElement(gy,{ref:s,label:t,"aria-label":n,...u,...i}))});cf.displayName="Tooltip";var gy=v.forwardRef(function({label:t,ariaLabel:n,isVisible:r,id:o,...i},s){return r?v.createElement(of,null,v.createElement(vy,{ref:s,label:t,"aria-label":n,isVisible:r,...i,id:kr("tooltip",String(o))})):null});gy.displayName="TooltipPopup";var vy=v.forwardRef(function({ariaLabel:t,"aria-label":n,as:r="div",id:o,isVisible:i,label:s,position:a=Hk,style:l,triggerRect:u,...c},d){let f=(n||t)!=null,g=v.useRef(null),y=$n(d,g),S=$s(g,{observe:i});return v.createElement(v.Fragment,null,v.createElement(r,{role:f?void 0:"tooltip",...c,ref:y,"data-reach-tooltip":"",id:f?void 0:o,style:{...l,...Wk(a,u,S)}},s),f&&v.createElement(my,{role:"tooltip",id:o},n||t))});vy.displayName="TooltipContent";function Wk(e,t,n){return n?e(t,n):{visibility:"hidden"}}var Vk=8,Hk=(e,t,n=Vk)=>{let{width:r,height:o}=L_();if(!e||!t)return{};let i={top:e.top-t.height<0,right:r{if(!(typeof window<"u"&&"PointerEvent"in window)||!e||!t)return;let r=cn(n.current);function o(i){t&&(i.target instanceof Element&&i.target.closest("[data-reach-tooltip-trigger][data-state='tooltip-visible']")||rt({type:"GLOBAL_MOUSE_MOVE"}))}return r.addEventListener("mousemove",o),()=>{r.removeEventListener("mousemove",o)}},[e,t,n])}function rt(e){let{value:t,context:n,changed:r}=Kk(Ge,e);r&&(Ge={value:t,context:n},jk())}function Kk(e,t){let n=Mu.states[e.value],r=n&&n.on&&n.on[t.type];if(!r)return{...e,changed:!1};n&&n.leave&&n.leave(e.context,t);const{type:o,...i}=t;let s={...Ge.context,...i},a=typeof r=="string"?r:r.target,l=Mu.states[a];return l&&l.enter&&l.enter(e.context,t),{value:a,context:s,changed:!0}}function jp(e,t){return Ge.context.id===e&&(t?Ge.value==="VISIBLE":Ge.value==="VISIBLE"||Ge.value==="LEAVING_VISIBLE")}function qk(e){let t={};const n={},r={};function o(l="default"){return n[l]=e(l).then(u=>{delete n[l],t[l]=u}).catch(u=>{r[l]=u}),n[l]}function i(l="default"){t[l]!==void 0||n[l]||o(l)}function s(l="default"){if(t[l]!==void 0)return t[l];throw r[l]?r[l]:n[l]?n[l]:o(l)}function a(l){l?delete t[l]:t={}}return{preload:i,read:s,clear:a}}const ff=qk(()=>ct(()=>import("./index-d3ed0f51.js"),[],import.meta.url)),Gk="_checkWrapper_1nrct_45",Yk="_active_1nrct_51",Fp={checkWrapper:Gk,active:Yk};function Jk({theme:e,dispatch:t}){const{t:n}=$o(),r=v.useMemo(()=>{switch(e){case"dark":return w.jsx(Up,{});case"auto":return w.jsx(Zk,{});case"light":return w.jsx(Xk,{});default:return console.assert(!1,"Unknown theme"),w.jsx(Up,{})}},[e]),o=v.useCallback(i=>t(bC(i)),[t]);return w.jsxs(uy,{children:[w.jsx(cf,{label:n("switch_theme"),"aria-label":"switch theme",children:w.jsx(cy,{children:r})}),w.jsxs(py,{children:[w.jsx(rl,{value:"auto",label:"Auto",active:e==="auto",onSelect:o}),w.jsx(rl,{value:"dark",label:"Dark",active:e==="dark",onSelect:o}),w.jsx(rl,{value:"light",label:"Light",active:e==="light",onSelect:o})]})]})}function rl(e){const t=It(Fp.checkWrapper,{[Fp.active]:e.active});return w.jsxs(fy,{onSelect:()=>e.onSelect(e.value),children:[w.jsx("span",{className:t,children:w.jsx(v2,{size:14})}),w.jsx("span",{children:e.label})]})}function Up(){const t=ff.read().motion;return w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:w.jsx(t.path,{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}})})}function Xk(){const t=ff.read().motion;return w.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("circle",{cx:"12",cy:"12",r:"5"}),w.jsxs(t.g,{initial:{scale:.7},animate:{scale:1},transition:{duration:.5},children:[w.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),w.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),w.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),w.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),w.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),w.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),w.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),w.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]})}function Zk(){const t=ff.read().motion;return w.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[w.jsx("circle",{cx:"12",cy:"12",r:"11"}),w.jsx("clipPath",{id:"cut-off-bottom",children:w.jsx(t.rect,{x:"12",y:"0",width:"12",height:"24",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}})}),w.jsx("circle",{cx:"12",cy:"12",r:"6",clipPath:"url(#cut-off-bottom)",fill:"currentColor"})]})}const eO=e=>({theme:Pv(e)}),yy=Fn(eO)(Jk),Fu=0;class tO extends Error{constructor(t,n){super(t),this.message=t,this.code=n}}const Uu={[Fu]:{message:"Browser not supported!",detail:'This browser does not support "fetch", please choose another one.'},default:{message:"Oops, something went wrong!"}};function nO(e){const{code:t}=e;return typeof t=="number"?Uu[t]:Uu.default}const{useState:wy,useCallback:rO}=Et;function oO(e=!1){const[t,n]=wy(e),r=rO(()=>n(o=>!o),[]);return[t,r]}function cR(e){const[t,n]=wy(e);return{value:t,set:n}}const iO="_ul_1ore2_1",sO="_li_1ore2_10",aO="_right_1ore2_21",lO="_close_1ore2_32",uO="_eye_1ore2_39",cO="_url_1ore2_54",fO="_secret_1ore2_55",dO="_metaLabel_1ore2_56",pO="_btn_1ore2_62",vt={ul:iO,li:sO,right:aO,close:lO,eye:uO,url:cO,secret:fO,metaLabel:dO,btn:pO},hO=e=>({apiConfigs:Ov(e),selectedClashAPIConfigIndex:kv(e)}),mO=Fn(hO)(gO);function gO({apiConfigs:e,selectedClashAPIConfigIndex:t}){const{app:{removeClashAPIConfig:n,selectClashAPIConfig:r}}=rC(),o=v.useCallback(s=>{n(s)},[n]),i=v.useCallback(s=>{r(s)},[r]);return w.jsx(w.Fragment,{children:w.jsx("ul",{className:vt.ul,children:e.map((s,a)=>w.jsx("li",{className:It(vt.li,{[vt.isSelected]:a===t}),children:w.jsx(vO,{disableRemove:a===t,conf:s,onRemove:o,onSelect:i})},s.baseURL+s.secret+s.metaLabel))})})}function vO({conf:e,disableRemove:t,onRemove:n,onSelect:r}){const[o,i]=oO(),s=o?S2:C2,a=v.useCallback(l=>{l.stopPropagation()},[]);return w.jsxs(w.Fragment,{children:[w.jsx($p,{disabled:t,onClick:()=>n(e),className:vt.close,children:w.jsx(T2,{size:20})}),w.jsxs("div",{className:vt.right,children:[e.metaLabel?w.jsxs(w.Fragment,{children:[w.jsx("span",{className:vt.metaLabel,tabIndex:0,role:"button",onClick:()=>r(e),onKeyUp:a,children:e.metaLabel}),w.jsx("span",{})]}):null,w.jsx("span",{className:vt.url,tabIndex:0,role:"button",onClick:()=>r(e),onKeyUp:a,children:e.baseURL}),w.jsx("span",{}),e.secret?w.jsxs(w.Fragment,{children:[w.jsx("span",{className:vt.secret,children:o?e.secret:"***"}),w.jsx($p,{onClick:i,className:vt.eye,children:w.jsx(s,{size:16})})]}):null]})]})}function $p({children:e,onClick:t,className:n,disabled:r}){return w.jsx("button",{disabled:r,className:It(n,vt.btn),onClick:t,children:e})}const yO="_root_zwtea_1",wO="_header_zwtea_5",SO="_icon_zwtea_10",xO="_body_zwtea_20",EO="_hostnamePort_zwtea_24",CO="_error_zwtea_36",_O="_footer_zwtea_42",jt={root:yO,header:wO,icon:SO,body:xO,hostnamePort:EO,error:CO,footer:_O},kO="_btn_lzu00_1",OO="_circular_lzu00_27",PO="_minimal_lzu00_30",bO="_btnStart_lzu00_48",RO="_loadingContainer_lzu00_55",Jr={btn:kO,circular:OO,minimal:PO,btnStart:bO,loadingContainer:RO},LO="_sectionNameType_1b9pp_1",NO="_loadingDot_1b9pp_66",TO="_dot2_1b9pp_1",IO="_dot1_1b9pp_1",DO="_dot3_1b9pp_1",Sy={sectionNameType:LO,loadingDot:NO,dot2:TO,dot1:IO,dot3:DO};function fR({name:e,type:t}){return w.jsxs("h2",{className:Sy.sectionNameType,children:[w.jsx("span",{children:e}),w.jsx("span",{children:t})]})}function MO(){return w.jsx("span",{className:Sy.loadingDot})}const{forwardRef:AO,useCallback:jO}=Et;function FO(e,t){const{onClick:n,disabled:r=!1,isLoading:o,kind:i="primary",className:s,children:a,label:l,text:u,start:c,...d}=e,f={children:a,label:l,text:u,start:c},g=jO(S=>{o||n&&n(S)},[o,n]),y=It(Jr.btn,{[Jr.minimal]:i==="minimal",[Jr.circular]:i==="circular"},s);return w.jsx("button",{className:y,ref:t,onClick:g,disabled:r,...d,children:o?w.jsxs(w.Fragment,{children:[w.jsx("span",{style:{display:"inline-flex",opacity:0},children:w.jsx(zp,{...f})}),w.jsx("span",{className:Jr.loadingContainer,children:w.jsx(MO,{})})]}):w.jsx(zp,{...f})})}function zp({children:e,label:t,text:n,start:r}){return w.jsxs(w.Fragment,{children:[r?w.jsx("span",{className:Jr.btnStart,children:typeof r=="function"?r():r}):null,e||t||n]})}const UO=AO(FO),$O="_root_1wn1y_1",zO="_floatAbove_1wn1y_33",Bp={root:$O,floatAbove:zO},{useCallback:BO}=Et;function ol({id:e,label:t,value:n,onChange:r,...o}){const i=BO(s=>r(s),[r]);return w.jsxs("div",{className:Bp.root,children:[w.jsx("input",{id:e,value:n,onChange:i,...o}),w.jsx("label",{htmlFor:e,className:Bp.floatAbove,children:t})]})}const WO="_path_r8pm3_1",VO="_dash_r8pm3_1",HO={path:WO,dash:VO};function df({width:e=320,height:t=320,animate:n=!1,c0:r="currentColor",stroke:o="#eee",eye:i="#eee",mouth:s="#eee"}){const a=It({[HO.path]:n});return w.jsx("svg",{width:e,height:t,viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg",children:w.jsxs("g",{fill:"none",fillRule:"evenodd",children:[w.jsx("path",{d:"M71.689 53.055c9.23-1.487 25.684 27.263 41.411 56.663 18.572-8.017 71.708-7.717 93.775 0 4.714-15.612 31.96-57.405 41.626-56.663 3.992.088 13.07 31.705 23.309 94.96 2.743 16.949 7.537 47.492 14.38 91.63-42.339 17.834-84.37 26.751-126.095 26.751-41.724 0-83.756-8.917-126.095-26.751C52.973 116.244 65.536 54.047 71.689 53.055z",stroke:o,strokeWidth:"4",strokeLinecap:"round",fill:r,className:a}),w.jsx("circle",{fill:i,cx:"216.5",cy:"181.5",r:"14.5"}),w.jsx("circle",{fill:i,cx:"104.5",cy:"181.5",r:"14.5"}),w.jsx("g",{stroke:s,strokeLinecap:"round",strokeWidth:"4",children:w.jsx("path",{d:"M175.568 218.694c-2.494 1.582-5.534 2.207-8.563 1.508-3.029-.7-5.487-2.594-7.035-5.11M143.981 218.694c2.494 1.582 5.534 2.207 8.563 1.508 3.03-.7 5.488-2.594 7.036-5.11"})})]})})}const{useState:Ii,useRef:Wp,useCallback:il,useEffect:QO}=Et,xy=0,KO=()=>{},qO=e=>({apiConfig:Jo(e)});function GO({dispatch:e}){const[t,n]=Ii(""),[r,o]=Ii(""),[i,s]=Ii(""),[a,l]=Ii(""),u=Wp(!1),c=Wp(null),d=il(S=>{u.current=!0,l("");const _=S.target,{name:m}=_,p=_.value;switch(m){case"baseURL":n(p);break;case"secret":o(p);break;case"metaLabel":s(p);break;default:throw new Error(`unknown input name ${m}`)}},[]),f=il(()=>{JO({baseURL:t,secret:r}).then(S=>{S[0]!==xy?l(S[1]):e(_C({baseURL:t,secret:r,metaLabel:i}))})},[t,r,i,e]),g=il(S=>{S.target instanceof Element&&(!S.target.tagName||S.target.tagName.toUpperCase()!=="INPUT")||S.key==="Enter"&&f()},[f]),y=async()=>{(await fetch("/")).json().then(_=>{_.hello==="clash"&&n(window.location.origin)},KO)};return QO(()=>{y()},[]),w.jsxs("div",{className:jt.root,ref:c,onKeyDown:g,children:[w.jsx("div",{className:jt.header,children:w.jsx("div",{className:jt.icon,children:w.jsx(df,{width:160,height:160,stroke:"var(--stroke)"})})}),w.jsxs("div",{className:jt.body,children:[w.jsxs("div",{className:jt.hostnamePort,children:[w.jsx(ol,{id:"baseURL",name:"baseURL",label:"API Base URL",type:"text",placeholder:"http://127.0.0.1:9090",value:t,onChange:d}),w.jsx(ol,{id:"secret",name:"secret",label:"Secret(optional)",value:r,type:"text",onChange:d})]}),a?w.jsx("div",{className:jt.error,children:a}):null,w.jsx("div",{className:jt.label,children:w.jsx(ol,{id:"metaLabel",name:"metaLabel",label:"Label(optional)",type:"text",placeholder:"",value:i,onChange:d})})]}),w.jsx("div",{className:jt.footer,children:w.jsx(UO,{label:"Add",onClick:f})}),w.jsx("div",{style:{height:20}}),w.jsx(mO,{})]})}const YO=Fn(qO)(GO);async function JO(e){try{new URL(e.baseURL)}catch{if(e.baseURL){const n=e.baseURL.substring(0,7);if(n!=="http://"&&n!=="https:/")return[1,"Must starts with http:// or https://"]}return[1,"Invalid URL"]}try{const t=await xv(e);return t.status>399?[1,t.statusText]:[xy]}catch{return[1,"Failed to connect"]}}const XO="_content_b98hm_1",ZO="_container_b98hm_16",eP="_overlay_b98hm_22",tP="_fixed_b98hm_26",Di={content:XO,container:ZO,overlay:eP,fixed:tP},nP="_overlay_1i06e_1",rP="_content_1i06e_10",Vp={overlay:nP,content:rP};function oP({isOpen:e,onRequestClose:t,className:n,overlayClassName:r,children:o,...i}){const s=It(n,Vp.content),a=It(r,Vp.overlay);return w.jsx(Ng,{isOpen:e,onRequestClose:t,className:s,overlayClassName:a,...i,children:o})}const iP=v.memo(oP),{useCallback:sP,useEffect:aP}=Et;function lP({dispatch:e,apiConfig:t,modals:n}){if(!window.fetch){const{detail:o}=Uu[Fu];throw new tO(o,Fu)}const r=sP(()=>{e(mC("apiConfig"))},[e]);return aP(()=>{e(_v(t))},[e,t]),w.jsxs(iP,{isOpen:n.apiConfig,className:Di.content,overlayClassName:Di.overlay,shouldCloseOnOverlayClick:!1,shouldCloseOnEsc:!1,onRequestClose:r,children:[w.jsx("div",{className:Di.container,children:w.jsx(YO,{})}),w.jsx("div",{className:Di.fixed,children:w.jsx(yy,{})})]})}const uP=e=>({modals:e.modals,apiConfig:Jo(e)}),cP=Fn(uP)(lP),fP={hasProcessPath:!1},dP=v.createContext(fP),pP="_root_4m2cd_1",hP="_yacd_4m2cd_14",mP="_link_4m2cd_23",sl={root:pP,yacd:hP,link:mP};function gP({width:e=24,height:t=24}={}){return w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:w.jsx("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"})})}const vP="https://github.com/kkkgo/PaoPaoGateWay";function yP({message:e,detail:t}){return w.jsxs("div",{className:sl.root,children:[w.jsx("div",{className:sl.yacd,children:w.jsx(df,{width:150,height:150})}),e?w.jsx("h1",{children:e}):null,t?w.jsx("p",{children:t}):null,w.jsx("p",{children:w.jsxs("a",{className:sl.link,href:vP,children:[w.jsx(gP,{width:16,height:16}),"kkkgo/PaoPaoGateWay"]})})]})}class wP extends v.Component{constructor(){super(...arguments);hf(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){if(this.state.error){const{message:n,detail:r}=nO(this.state.error);return w.jsx(yP,{message:n,detail:r})}else return this.props.children}}const SP="_root_4oasi_1",xP="_chart_4oasi_10",Hp={root:SP,chart:xP};var EP=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const pf=Bs(EP);function Qp(e,t,n,r=0,o=!1){for(const s of t)if(pf(n,s.args)){if(o)return;if(s.error)throw s.error;if(s.response)return s.response;throw s.promise}const i={args:n,promise:e(...n).then(s=>i.response=s??!0).catch(s=>i.error=s??"unknown error").then(()=>{r>0&&setTimeout(()=>{const s=t.indexOf(i);s!==-1&&t.splice(s,1)},r)})};if(t.push(i),!o)throw i.promise}function CP(e,...t){if(t===void 0||t.length===0)e.splice(0,e.length);else{const n=e.find(r=>pf(t,r.args));if(n){const r=e.indexOf(n);r!==-1&&e.splice(r,1)}}}function _P(e,t=0){const n=[];return{read:(...r)=>Qp(e,n,r,t),preload:(...r)=>void Qp(e,n,r,t,!0),clear:(...r)=>CP(n,...r),peek:(...r)=>{var o;return(o=n.find(i=>pf(r,i.args)))==null?void 0:o.response}}}const Kp=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];function Fo(e){if(e<1e3)return e+" B";const t=Math.min(Math.floor(Math.log10(e)/3),Kp.length-1);e=Number((e/Math.pow(1e3,t)).toPrecision(3));const n=Kp[t];return e+" "+n}const kP=_P(()=>ct(()=>import("./chart-lib-da3c73a9.js"),[],import.meta.url)),qp={borderWidth:1,pointRadius:0,tension:.2,fill:!0},OP={responsive:!0,maintainAspectRatio:!0,plugins:{legend:{labels:{boxWidth:20}}},scales:{x:{display:!1,type:"category"},y:{type:"linear",display:!0,grid:{display:!0,color:"#555",drawTicks:!1},border:{display:!1,dash:[3,6]},ticks:{callback(e){return Fo(e)+"/s "}}}}},Gp=[{down:{backgroundColor:"rgba(176, 209, 132, 0.8)",borderColor:"rgb(176, 209, 132)"},up:{backgroundColor:"rgba(181, 220, 231, 0.8)",borderColor:"rgb(181, 220, 231)"}},{up:{backgroundColor:"rgb(98, 190, 100)",borderColor:"rgb(78,146,79)"},down:{backgroundColor:"rgb(160, 230, 66)",borderColor:"rgb(110, 156, 44)"}},{up:{backgroundColor:"rgba(94, 175, 223, 0.3)",borderColor:"rgb(94, 175, 223)"},down:{backgroundColor:"rgba(139, 227, 195, 0.3)",borderColor:"rgb(139, 227, 195)"}},{up:{backgroundColor:"rgba(242, 174, 62, 0.3)",borderColor:"rgb(242, 174, 62)"},down:{backgroundColor:"rgba(69, 154, 248, 0.3)",borderColor:"rgb(69, 154, 248)"}}],{useEffect:PP}=Q;function bP(e,t,n,r,o={}){PP(()=>{const i=document.getElementById(t).getContext("2d"),s={...OP,...o},a=new e(i,{type:"line",data:n,options:s}),l=r&&r.subscribe(()=>a.update());return()=>{l&&l(),a.destroy()}},[e,t,n,r,o])}const{useMemo:RP}=Et,LP={position:"relative",maxWidth:1e3},NP=e=>({apiConfig:Jo(e),selectedChartStyleIndex:xC(e)}),TP=Fn(NP)(IP);function IP({apiConfig:e,selectedChartStyleIndex:t}){const n=kP.read(),r=Zc(e),{t:o}=$o(),i=RP(()=>({labels:r.labels,datasets:[{...qp,...Gp[t].up,label:o("Up"),data:r.up},{...qp,...Gp[t].down,label:o("Down"),data:r.down}]}),[r,t,o]);return bP(n.Chart,"trafficChart",i,r),w.jsx("div",{style:LP,children:w.jsx("canvas",{id:"trafficChart"})})}const DP="_TrafficNow_hzna1_1",MP="_sec_hzna1_10",Hn={TrafficNow:DP,sec:MP},{useState:Ey,useEffect:Cy,useCallback:AP}=Et,jP=e=>({apiConfig:Jo(e)}),FP=Fn(jP)(UP);function UP({apiConfig:e}){const{t}=$o(),{upStr:n,downStr:r}=$P(e),{upTotal:o,dlTotal:i,connNumber:s}=zP(e);return w.jsxs("div",{className:Hn.TrafficNow,children:[w.jsxs("div",{className:Hn.sec,children:[w.jsx("div",{children:t("Upload")}),w.jsx("div",{children:n})]}),w.jsxs("div",{className:Hn.sec,children:[w.jsx("div",{children:t("Download")}),w.jsx("div",{children:r})]}),w.jsxs("div",{className:Hn.sec,children:[w.jsx("div",{children:t("Upload Total")}),w.jsx("div",{children:o})]}),w.jsxs("div",{className:Hn.sec,children:[w.jsx("div",{children:t("Download Total")}),w.jsx("div",{children:i})]}),w.jsxs("div",{className:Hn.sec,children:[w.jsx("div",{children:t("Active Connections")}),w.jsx("div",{children:s})]})]})}function $P(e){const[t,n]=Ey({upStr:"0 B/s",downStr:"0 B/s"});return Cy(()=>Zc(e).subscribe(r=>n({upStr:Fo(r.up)+"/s",downStr:Fo(r.down)+"/s"})),[e]),t}function zP(e){const[t,n]=Ey({upTotal:"0 B",dlTotal:"0 B",connNumber:0}),r=AP(({downloadTotal:o,uploadTotal:i,connections:s})=>{n({upTotal:Fo(i),dlTotal:Fo(o),connNumber:s.length})},[n]);return Cy(()=>Ru(e,r),[e,r]),t}function BP(){const{t:e}=$o();return w.jsxs("div",{children:[w.jsx(lv,{title:e("Overview")}),w.jsxs("div",{className:Hp.root,children:[w.jsx("div",{children:w.jsx(FP,{})}),w.jsx("div",{className:Hp.chart,children:w.jsx(v.Suspense,{fallback:w.jsx(Lv,{height:"200px"}),children:w.jsx(TP,{})})})]})]})}const WP="_lo_pmly2_1",VP={lo:WP};function HP(){return w.jsx("div",{className:VP.lo,children:w.jsx(df,{width:280,height:280,animate:!0,c0:"transparent",c1:"#646464"})})}const QP="_app_1s3k7_1",KP="_content_1s3k7_18",_y={app:QP,content:KP};var ky={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Yp=Q.createContext&&Q.createContext(ky),an=globalThis&&globalThis.__assign||function(){return an=Object.assign||function(e){for(var t,n=1,r=arguments.length;nw.jsx(db,{to:n,isActive:t.pathname===n,iconId:r,labelText:e(o)},n))}),w.jsxs("div",{className:Ht.footer,children:[w.jsx(yy,{}),w.jsx(cf,{label:e("about"),children:w.jsx(ov,{to:"/about",className:Ht.iconWrapper,children:w.jsx(R2,{size:20})})})]})]})}const mb="_toggle_g6vyf_1",gb="_input_g6vyf_12",vb="_track_g6vyf_16",dR={toggle:mb,input:gb,track:vb},yb="_input_1hkb4_1",pR={input:yb},wb="_animate_1w0e8_1",hR={animate:wb,"zap-pulse":"_zap-pulse_1w0e8_1"},Sb="_ToggleSwitch_10mtp_1",xb="_slider_10mtp_28",Jp={ToggleSwitch:Sb,slider:xb};function Eb({options:e,value:t,name:n,onChange:r}){const o=v.useMemo(()=>e.map(a=>a.value).indexOf(t),[e,t]),i=v.useCallback(a=>{const l=Math.floor(100/e.length);if(a===e.length-1)return 100-e.length*l+l;if(a>-1)return l},[e]),s=v.useMemo(()=>({width:i(o)+"%",left:o*i(0)+"%"}),[o,i]);return w.jsxs("div",{className:Jp.ToggleSwitch,children:[w.jsx("div",{className:Jp.slider,style:s}),e.map((a,l)=>{const u=`${n}-${a.label}`,c=l===0?"":"border-left";return w.jsxs("label",{htmlFor:u,className:c,style:{width:i(l)+"%"},children:[w.jsx("input",{id:u,name:n,type:"radio",value:a.value,checked:t===a.value,onChange:r}),w.jsx("div",{children:a.label})]},u)})]})}Q.memo(Eb);const{lazy:Ir,Suspense:Py}=Et,Cb=Ir(()=>ct(()=>import("./Connections-91974c4c.js"),["./Connections-91974c4c.js","./useRemainingViewPortHeight-1aa045aa.js","./index-778e0b6c.js","./chevron-down-6e2632b9.js","./Fab-4f386fe2.js","./Fab-a434d836.css","./play-512d0bd5.js","./Connections-ddae4f70.css"],import.meta.url)),_b=Ir(()=>ct(()=>import("./Config-f974d420.js"),["./Config-f974d420.js","./logs-8c8b4d84.js","./Select-1e3e2920.js","./Select-3de40504.css","./Config-cf41b8ef.css"],import.meta.url)),kb=Ir(()=>ct(()=>import("./Logs-f067d536.js"),["./Logs-f067d536.js","./index.esm-e73720de.js","./logs-8c8b4d84.js","./debounce-c1ba2006.js","./useRemainingViewPortHeight-1aa045aa.js","./Fab-4f386fe2.js","./Fab-a434d836.css","./play-512d0bd5.js","./Logs-5e5ee0ad.css"],import.meta.url)),Ob=Ir(()=>ct(()=>import("./Proxies-d20d6e05.js"),["./Proxies-d20d6e05.js","./chevron-down-6e2632b9.js","./Fab-4f386fe2.js","./Fab-a434d836.css","./TextFilter-3f06e7b6.js","./debounce-c1ba2006.js","./TextFilter-ced87fc6.css","./index-778e0b6c.js","./Select-1e3e2920.js","./Select-3de40504.css","./Proxies-40f80166.css"],import.meta.url)),Pb=Ir(()=>ct(()=>import("./Rules-772735c2.js"),["./Rules-772735c2.js","./index.esm-e73720de.js","./TextFilter-3f06e7b6.js","./debounce-c1ba2006.js","./TextFilter-ced87fc6.css","./index-778e0b6c.js","./Fab-4f386fe2.js","./Fab-a434d836.css","./useRemainingViewPortHeight-1aa045aa.js","./Rules-e11cb70e.css"],import.meta.url)),bb=Ir(()=>ct(()=>import("./Rec-a8cd22ef.js"),["./Rec-a8cd22ef.js","./Rec-7c8e491b.css"],import.meta.url)),Rb=[{path:"/",element:w.jsx(BP,{})},{path:"/connections",element:w.jsx(dP.Provider,{value:{hasProcessPath:!1},children:w.jsx(Cb,{})})},{path:"/configs",element:w.jsx(_b,{})},{path:"/logs",element:w.jsx(kb,{})},{path:"/proxies",element:w.jsx(Ob,{})},{path:"/rules",element:w.jsx(Pb,{})},{path:"/rec",element:w.jsx(bb,{})},{path:"/about",element:w.jsx(BC,{})},!1].filter(Boolean);function Lb(){return tv(Rb)}function Nb(){return w.jsxs(w.Fragment,{children:[w.jsx(cP,{}),w.jsx(hb,{}),w.jsx("div",{className:_y.content,children:w.jsx(Py,{fallback:w.jsx(HP,{}),children:w.jsx(Lb,{})})})]})}function Tb(){return tv([{path:"*",element:w.jsx(Nb,{})}])}function Ib({children:e}){const[t]=yE(AC),n=It(_y.app,{pureBlackDark:t});return w.jsx("div",{className:n,children:e})}const Db=()=>w.jsx(wP,{children:w.jsx(oC,{initialState:k_,actions:O_,children:w.jsx(Qx,{client:KC,children:w.jsx(f2,{children:w.jsx(Ib,{children:w.jsx(Py,{fallback:w.jsx(Lv,{}),children:w.jsx(Tb,{})})})})})})}),Mb=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function Ab(e){if("serviceWorker"in navigator){const t=new URL("",window.location.href);if(t.origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=new URL("sw.js",t.href).href;Mb?(jb(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker")})):by(n,e)})}}function by(e,t){navigator.serviceWorker.register(e).then(n=>{n.onupdatefound=()=>{const r=n.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(n)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function jb(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(o=>{o.unregister().then(()=>{window.location.reload()})}):by(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}$b();const Ry=document.getElementById("app"),Fb=wg(Ry);function Ub(e){const t=document.createElement("link");t.href=e,t.rel="preload",t.as="font",t.crossOrigin="",document.head.appendChild(t)}function $b(){Ub(mh)}Ng.setAppElement(Ry);Fb.render(w.jsx(v.StrictMode,{children:w.jsx(Db,{})}));setTimeout(()=>{ct(()=>import("./index.modern-c58ff412.js"),[],import.meta.url).then(e=>{e&&e.polyfillCountryFlagEmojis("Twemoji Country Flags",mh)}).catch(()=>{})},1);Ab();export{qb as $,n_ as A,UO as B,lv as C,Zb as D,eR as E,Xb as F,Qb as G,Jb as H,T2 as I,Vb as J,We as K,Wb as L,dP as M,hR as N,fR as O,ee as P,uR as Q,Q as R,df as S,d_ as T,Bk as U,gy as V,Av as W,sr as X,aR as Y,cR as Z,cf as _,Ng as a,Gb as a0,Yb as a1,oR as a2,iR as a3,lR as a4,sR as a5,ff as a6,EC as a7,Tr as a8,nR as a9,p_ as aa,rR as ab,dR as ac,Ko as ad,au as ae,Ox as af,ae as ag,Bb as ah,Hx as ai,Vx as aj,Jx as ak,Bs as al,fu as am,sE as an,co as ao,Fn as b,It as c,tR as d,Et as e,Ru as f,Jo as g,kP as h,qp as i,w as j,Gp as k,bP as l,Vp as m,Hb as n,_v as o,Fo as p,Pp as q,v as r,pR as s,Kb as t,$o as u,rC as v,yE as w,AC as x,xC as y,bv as z}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index-de9c3afe.css b/FILES/etc/config/clash/clash-dashboard/assets/index-de9c3afe.css deleted file mode 100644 index cc96855..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/index-de9c3afe.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.relative,.border-left,.border-top,.border-bottom{position:relative}.border-bottom:after,.border-top:before{position:absolute;content:"";height:1px;width:100%;transform:scaleY(.5) translateZ(0);left:0;right:0;background:#555}.border-left:before{position:absolute;content:"";height:100%;width:1px;transform:scaleX(.5) translateZ(0);top:0;bottom:0;background:#555}.border-top:before{top:0}.border-bottom:after{bottom:0}.border-left:before{left:0}*,*:before,*:after{box-sizing:border-box}:root{--font-mono: "Roboto Mono", Menlo, monospace;--font-normal: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Apple Color Emoji, Twemoji Country Flags, Segoe UI Emoji, Segoe UI Symbol, "PingFang SC", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;--color-focus-blue: #1a73e8;--btn-bg: #387cec}body{font-family:var(--font-normal);-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;padding:0}@media (prefers-color-scheme: dark){:root[data-theme=auto]{--color-background: #202020;--color-background2: rgba(32, 32, 32, .3);--color-bg-card: #2d2d2d;--card-hover-border-lightness: 30%;--color-text: #ddd;--color-text-secondary: #ccc;--color-text-highlight: #fff;--color-bg-sidebar: #2d2d30;--color-input-bg: #2d2d30;--color-input-border: #3f3f3f;--color-toggle-bg: #353535;--color-toggle-selected: #181818;--color-icon: #c7c7c7;--color-separator: #333;--color-btn-bg: #232323;--color-btn-fg: #bebebe;--color-bg-proxy: #303030;--color-row-odd: #333;--bg-log-info-tag: #454545;--bg-modal: #1f1f20;--bg-near-transparent: rgba(255, 255, 255, .1);--bg-tooltip: #111;--bc-tooltip: #555;--select-border-color: #040404;--select-bg-hover: url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);--color-proxy-dot-selected-ind-bo: transparent;--bg-toggle-track: #393939;color-scheme:dark}}@media (prefers-color-scheme: light){:root[data-theme=auto]{--color-background: #eee;--color-background2: rgba(240, 240, 240, .3);--color-bg-card: #fafafa;--card-hover-border-lightness: 80%;--color-text: #222;--color-text-secondary: #646464;--color-text-highlight: #040404;--color-bg-sidebar: #f8f8f8;--color-input-bg: #f0f0f0;--color-input-border: #c0c0c0;--color-toggle-bg: #ffffff;--color-toggle-selected: #d7d7d7;--color-icon: #5b5b5b;--color-separator: #ccc;--color-btn-bg: #f4f4f4;--color-btn-fg: #101010;--color-bg-proxy: #fafafa;--color-row-odd: #e1e1e1;--bg-log-info-tag: #888;--bg-modal: #fbfbfb;--bg-near-transparent: rgba(0, 0, 0, .1);--bg-tooltip: #f0f0f0;--bc-tooltip: #ccc;--select-border-color: #999999;--select-bg-hover: url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23222222%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23222222%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);--color-proxy-dot-selected-ind-bo: #888;--bg-toggle-track: #d0d0d0;color-scheme:light}}:root[data-theme=dark]{--color-background: #202020;--color-background2: rgba(32, 32, 32, .3);--color-bg-card: #2d2d2d;--card-hover-border-lightness: 30%;--color-text: #ddd;--color-text-secondary: #ccc;--color-text-highlight: #fff;--color-bg-sidebar: #2d2d30;--color-input-bg: #2d2d30;--color-input-border: #3f3f3f;--color-toggle-bg: #353535;--color-toggle-selected: #181818;--color-icon: #c7c7c7;--color-separator: #333;--color-btn-bg: #232323;--color-btn-fg: #bebebe;--color-bg-proxy: #303030;--color-row-odd: #333;--bg-log-info-tag: #454545;--bg-modal: #1f1f20;--bg-near-transparent: rgba(255, 255, 255, .1);--bg-tooltip: #111;--bc-tooltip: #555;--select-border-color: #040404;--select-bg-hover: url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);--color-proxy-dot-selected-ind-bo: transparent;--bg-toggle-track: #393939;color-scheme:dark}:root[data-theme=light]{--color-background: #eee;--color-background2: rgba(240, 240, 240, .3);--color-bg-card: #fafafa;--card-hover-border-lightness: 80%;--color-text: #222;--color-text-secondary: #646464;--color-text-highlight: #040404;--color-bg-sidebar: #f8f8f8;--color-input-bg: #f0f0f0;--color-input-border: #c0c0c0;--color-toggle-bg: #ffffff;--color-toggle-selected: #d7d7d7;--color-icon: #5b5b5b;--color-separator: #ccc;--color-btn-bg: #f4f4f4;--color-btn-fg: #101010;--color-bg-proxy: #fafafa;--color-row-odd: #e1e1e1;--bg-log-info-tag: #888;--bg-modal: #fbfbfb;--bg-near-transparent: rgba(0, 0, 0, .1);--bg-tooltip: #f0f0f0;--bc-tooltip: #ccc;--select-border-color: #999999;--select-bg-hover: url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23222222%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23222222%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);--color-proxy-dot-selected-ind-bo: #888;--bg-toggle-track: #d0d0d0;color-scheme:light}:root[data-theme=dark] .pureBlackDark{--color-background: #000000;--color-input-bg: #111111;--color-background2: rgba(0, 0, 0, .3);--color-bg-card: #1c1c1c}@media (prefers-color-scheme: dark){:root[data-theme=auto] .pureBlackDark{--color-background: #000000;--color-input-bg: #111111;--color-background2: rgba(0, 0, 0, .3);--color-bg-card: #1c1c1c}}.flexCenter{display:flex;align-items:center;justify-content:center}.fabgrp{position:fixed;z-index:3;right:20px;bottom:20px}.visually-hidden{position:absolute;overflow:hidden;clip:rect(0 0 0 0);width:1px;height:1px;margin:-1px;border:0;padding:0}:root{--reach-tooltip: 1}[data-reach-tooltip]{z-index:1;pointer-events:none;position:absolute;padding:.25em .5em;box-shadow:2px 2px 10px #0000001a;white-space:nowrap;font-size:85%;background:var(--bg-tooltip);color:var(--color-text);border:solid 1px var(--bc-tooltip);border-radius:4px}._root_5bosw_1{height:76px;display:flex;align-items:center}._h1_5bosw_7{padding:0 15px;font-size:1.7em;text-align:left;margin:0}@media screen and (min-width: 30em){._h1_5bosw_7{padding:0 40px;font-size:2em}}._root_1392e_1{padding:6px 15px}@media screen and (min-width: 30em){._root_1392e_1{padding:10px 40px}}._mono_1392e_10{font-family:var(--font-mono)}._link_1392e_14{color:var(--color-text-secondary);display:inline-flex}._link_1392e_14:hover{color:var(--color-text-highlight)}._loading_74j3j_1{width:100%;height:100%;display:flex;justify-content:center;align-items:center}._spinner_74j3j_9{width:20px;height:20px;display:inline-block;vertical-align:middle;animation:_rotate_74j3j_1 1s steps(12,end) infinite;background:transparent url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E") no-repeat;background-size:100%}@keyframes _rotate_74j3j_1{0%{transform:rotate3d(0,0,1,0)}to{transform:rotate3d(0,0,1,360deg)}}[data-reach-menu-button]{--sz: 40px;width:var(--sz);height:var(--sz);display:inline-flex;align-items:center;justify-content:center;-webkit-appearance:none;outline:none;-webkit-user-select:none;user-select:none;cursor:pointer;color:var(--color-btn-fg);background:none;border:1px solid transparent;border-radius:20px}[data-reach-menu-button]:hover{opacity:.6}[data-reach-menu-button]:focus{border-color:var(--color-focus-blue)}[data-reach-menu-list]{background:var(--bg-tooltip);color:var(--color-text);border:1px solid #555;padding:4px;border-radius:8px}[data-reach-menu-item]{padding:5px 16px 5px 6px;border-radius:7px;cursor:pointer;display:flex;align-items:center}[data-reach-menu-item][data-selected]{background:var(--color-focus-blue);color:#f7f7f7}._checkWrapper_1nrct_45{display:inline-flex;align-items:center;margin-right:2px;visibility:hidden}._checkWrapper_1nrct_45._active_1nrct_51{visibility:visible}._ul_1ore2_1{position:relative;margin:0;padding:0;list-style:none;line-height:1.8;--width-max-content: 230px}._li_1ore2_10{position:relative;margin:5px 0;padding:10px 0;border-radius:10px;display:grid;place-content:center;grid-template-columns:40px 1fr;column-gap:10px;border:1px solid var(--bg-near-transparent)}._li_1ore2_10 ._right_1ore2_21{display:grid;column-gap:10px;grid-template-columns:1fr 40px;grid-auto-rows:30px}._li_1ore2_10:hover{background-color:var(--bg-near-transparent)}._close_1ore2_32{opacity:0;place-self:center;cursor:pointer}._li_1ore2_10:hover ._close_1ore2_32,._li_1ore2_10:hover ._eye_1ore2_39{opacity:1}._close_1ore2_32:focus,._eye_1ore2_39:focus{opacity:1}._eye_1ore2_39{opacity:0;place-self:center;cursor:pointer}._url_1ore2_54,._secret_1ore2_55,._metaLabel_1ore2_56{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._btn_1ore2_62{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid transparent;background-color:transparent;color:inherit;display:flex;align-items:center;padding:5px;border-radius:100px}._btn_1ore2_62:focus{border-color:var(--color-focus-blue)}._btn_1ore2_62:hover:enabled{background-color:var(--color-focus-blue);color:#fff}._btn_1ore2_62:active:enabled{transform:scale(.97)}._btn_1ore2_62:disabled{color:var(--color-text-secondary)}._url_1ore2_54,._metaLabel_1ore2_56{cursor:pointer}._url_1ore2_54:hover,._metaLabel_1ore2_56:hover{color:var(--color-text-highlight)}._root_zwtea_1:focus{outline:none}._header_zwtea_5{display:flex;justify-content:center;align-items:center}._header_zwtea_5 ._icon_zwtea_10{--stroke: #f3f3f3;color:#20497e;opacity:.7;transition:opacity .4s}._header_zwtea_5 ._icon_zwtea_10:hover{opacity:1}._body_zwtea_20{padding:15px 0 0}._hostnamePort_zwtea_24{display:flex}._hostnamePort_zwtea_24 div{flex:1 1 auto}._hostnamePort_zwtea_24 div:nth-child(2){flex-grow:0;flex-basis:120px;margin-left:10px}._error_zwtea_36{height:20px;font-size:.8em;color:#ff8b8b}._footer_zwtea_42{padding:5px 0 10px;display:flex;justify-content:flex-end;align-items:center}._btn_lzu00_1{-webkit-appearance:none;outline:none;-webkit-user-select:none;user-select:none;position:relative;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:var(--color-btn-fg);background:var(--color-btn-bg);border:1px solid #555;border-radius:100px;padding:10px 13px}._btn_lzu00_1:focus{border-color:var(--color-focus-blue)}._btn_lzu00_1:hover{background:#387cec;border:1px solid #387cec;color:#fff}._btn_lzu00_1:active{transform:scale(.97)}._btn_lzu00_1._circular_lzu00_27{padding:8px}._btn_lzu00_1._minimal_lzu00_30{border-color:transparent;background:none;padding:6px 12px}._btn_lzu00_1._minimal_lzu00_30:focus{border-color:var(--color-focus-blue)}._btn_lzu00_1._minimal_lzu00_30:hover{color:#fff;background:#387cec;border:1px solid #387cec}._btn_lzu00_1:disabled{opacity:.5}._btnStart_lzu00_48{margin-right:5px;display:inline-flex;align-items:center;justify-content:center}._loadingContainer_lzu00_55{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:inline-flex}h2._sectionNameType_1b9pp_1{margin:0;font-size:1.3em}@media screen and (min-width: 30em){h2._sectionNameType_1b9pp_1{font-size:1.5em}}h2._sectionNameType_1b9pp_1 span:nth-child(2){font-size:12px;color:#777;font-weight:400;margin:0 .3em}:root[data-theme=light]{--loading-dot-1-1: rgba(0, 0, 0, .1);--loading-dot-1-2: rgba(0, 0, 0, .5);--loading-dot-1-3: rgba(0, 0, 0, .3);--loading-dot-2-1: rgba(0, 0, 0, .3);--loading-dot-2-2: rgba(0, 0, 0, .1);--loading-dot-2-3: rgba(0, 0, 0, .5);--loading-dot-3-1: rgba(0, 0, 0, .5);--loading-dot-3-2: rgba(0, 0, 0, .3);--loading-dot-3-3: rgba(0, 0, 0, .1)}:root[data-theme=dark]{--loading-dot-1-1: rgba(255, 255, 255, .5);--loading-dot-1-2: rgba(255, 255, 255, .1);--loading-dot-1-3: rgba(255, 255, 255, .3);--loading-dot-2-1: rgba(255, 255, 255, .3);--loading-dot-2-2: rgba(255, 255, 255, .5);--loading-dot-2-3: rgba(255, 255, 255, .1);--loading-dot-3-1: rgba(255, 255, 255, .1);--loading-dot-3-2: rgba(255, 255, 255, .3);--loading-dot-3-3: rgba(255, 255, 255, .5)}._loadingDot_1b9pp_66,._loadingDot_1b9pp_66:before,._loadingDot_1b9pp_66:after{display:inline-block;vertical-align:middle;width:6px;height:6px;border-radius:50%;font-size:0}._loadingDot_1b9pp_66{position:relative;background-color:var(--loading-dot-2-1);animation:_dot2_1b9pp_1 1s step-start infinite}._loadingDot_1b9pp_66:before{content:"";position:absolute;left:-12px;background-color:var(--loading-dot-1-1);animation:_dot1_1b9pp_1 1s step-start infinite}._loadingDot_1b9pp_66:after{content:"";position:absolute;right:-12px;background-color:var(--loading-dot-3-1);animation:_dot3_1b9pp_1 1s step-start infinite}@keyframes _dot1_1b9pp_1{0%,to{background-color:var(--loading-dot-1-1)}33%{background-color:var(--loading-dot-1-2)}66%{background-color:var(--loading-dot-1-3)}}@keyframes _dot2_1b9pp_1{0%,to{background-color:var(--loading-dot-2-1)}33%{background-color:var(--loading-dot-2-2)}66%{background-color:var(--loading-dot-2-3)}}@keyframes _dot3_1b9pp_1{0%,to{background-color:var(--loading-dot-3-1)}33%{background-color:var(--loading-dot-3-2)}66%{background-color:var(--loading-dot-3-3)}}._root_1wn1y_1{position:relative;padding:10px 0}._root_1wn1y_1 input{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:transparent;background-image:none;border:none;border-radius:0;border-bottom:1px solid var(--color-input-border);box-sizing:border-box;color:inherit;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 4px;width:100%}._root_1wn1y_1 input:focus{border-color:var(--color-focus-blue)}._root_1wn1y_1 label{position:absolute;left:5px;bottom:22px;transition:transform .15s ease-in-out;transform-origin:0 0;font-size:.9em}._root_1wn1y_1 label._floatAbove_1wn1y_33{transform:scale(.75) translateY(-25px)}._root_1wn1y_1 input:focus+label{color:var(--color-focus-blue);transform:scale(.75) translateY(-25px)}._path_r8pm3_1{stroke-dasharray:890;stroke-dashoffset:890;animation:_dash_r8pm3_1 3s ease-in-out forwards normal infinite}@keyframes _dash_r8pm3_1{0%{stroke-dashoffset:890}to{stroke-dashoffset:0}}._content_b98hm_1._content_b98hm_1{background:none;position:fixed;top:0;bottom:0;left:0;right:0;transform:none;padding:0;border-radius:0;display:flex;justify-content:center;overflow-y:auto}._container_b98hm_16{position:relative;margin-left:20px;margin-right:20px}._overlay_b98hm_22._overlay_b98hm_22{background-color:var(--color-background)}._fixed_b98hm_26{position:fixed;padding:16px;bottom:0;right:0}._overlay_1i06e_1{position:fixed;top:0;right:0;left:0;bottom:0;background:#444}._content_1i06e_10{outline:none;position:relative;color:var(--color-text);background:#444;top:50%;left:50%;transform:translate(-50%,-50%);padding:20px;border-radius:10px}._root_4m2cd_1{position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden;padding:20px;background:var(--color-background);color:var(--color-text);text-align:center}._yacd_4m2cd_14{color:#2a477a;opacity:.6;display:flex;justify-content:center;align-items:center;padding:40px}._link_4m2cd_23{display:inline-flex;align-items:center;color:var(--color-text-secondary)}._link_4m2cd_23:hover,._link_4m2cd_23:active{color:#387cec}._link_4m2cd_23 svg{margin-right:5px}._root_4oasi_1{padding:6px 15px}@media screen and (min-width: 30em){._root_4oasi_1{padding:10px 40px}}._chart_4oasi_10{margin-top:15px}._TrafficNow_hzna1_1{color:var(--color-text);display:flex;align-items:center;flex-wrap:wrap;display:grid;grid-template-columns:repeat(auto-fit,180px);grid-gap:10px}._TrafficNow_hzna1_1 ._sec_hzna1_10{padding:10px;background-color:var(--color-bg-card);border-radius:10px;box-shadow:0 1px 5px #0000001a}._TrafficNow_hzna1_1 ._sec_hzna1_10 div:nth-child(1){color:var(--color-text-secondary);font-size:.7em}._TrafficNow_hzna1_1 ._sec_hzna1_10 div:nth-child(2){padding:10px 0 0;font-size:1.8em}._lo_pmly2_1{opacity:.5;width:100%;height:100%;display:flex;justify-content:center;align-items:center}._app_1s3k7_1{position:fixed;top:0;bottom:0;left:0;right:0;display:flex;align-items:stretch;background:var(--color-background);color:var(--color-text)}@media (max-width: 768px){._app_1s3k7_1{flex-direction:column}}._content_1s3k7_18{flex-grow:1;overflow:auto}._root_r8ke8_1{display:flex;flex-direction:column;padding:8px}@media (max-width: 768px){._root_r8ke8_1{padding:0}}._logoPlaceholder_r8ke8_12{height:15px}@media (max-width: 768px){._logoPlaceholder_r8ke8_12{display:none}}._rows_r8ke8_21{flex:1}@media (max-width: 768px){._rows_r8ke8_21{display:flex;justify-content:space-between;overflow:auto}}._row_r8ke8_21{color:var(--color-text);text-decoration:none;border-radius:1000px;display:flex;align-items:center;padding:6px 16px}@media screen and (min-width: 30em){._row_r8ke8_21{padding:8px 20px}}@media (max-width: 768px){._row_r8ke8_21{border-radius:0}}@media (max-width: 768px){._row_r8ke8_21{flex-direction:column}}._row_r8ke8_21 svg{color:var(--color-icon);width:22px;height:22px}@media screen and (min-width: 30em){._row_r8ke8_21 svg{width:24px;height:24px}}._rowActive_r8ke8_68{--bg: hsla(217deg, 83%, 57%, .2);--fg: hsl(217deg 83% 57%);color:var(--fg);background:var(--bg)}@media (max-width: 768px){._rowActive_r8ke8_68{background:none}}._label_r8ke8_80{padding-left:14px;font-size:.75em;white-space:nowrap}@media (max-width: 768px){._label_r8ke8_80{padding-left:0;padding-top:5px}}@media screen and (min-width: 30em){._label_r8ke8_80{font-size:1em}}._footer_r8ke8_97{display:flex;flex-direction:column;align-items:center}@media (max-width: 768px){._footer_r8ke8_97{display:none}}._iconWrapper_r8ke8_108{--sz: 40px;width:var(--sz);height:var(--sz);display:flex;justify-content:center;align-items:center;outline:none;padding:5px;color:var(--color-text);border-radius:100%;border:1px solid transparent}._iconWrapper_r8ke8_108:hover{opacity:.6}._iconWrapper_r8ke8_108:focus{border-color:var(--color-focus-blue)}._toggle_g6vyf_1{--height: 28px;--width: 44px;--knob-size: 24px;display:inline-flex;align-items:center;cursor:pointer;position:relative;width:var(--width);height:var(--height)}._toggle_g6vyf_1 ._input_g6vyf_12{opacity:0;width:0}._toggle_g6vyf_1 ._input_g6vyf_12:checked+._track_g6vyf_16{background-color:#047aff}._toggle_g6vyf_1 ._input_g6vyf_12:checked+._track_g6vyf_16:before{transform:translate(calc(var(--width) - var(--height)))}._toggle_g6vyf_1 ._input_g6vyf_12:disabled+._track_g6vyf_16{opacity:.8;cursor:not-allowed}._toggle_g6vyf_1 ._input_g6vyf_12:focus-visible+._track_g6vyf_16{outline:solid 1px var(--color-focus-blue);outline-offset:2px}._toggle_g6vyf_1 ._track_g6vyf_16{width:var(--width);height:var(--height);position:absolute;cursor:pointer;top:0;left:0;bottom:0;transition:transform .15s,background-color .15s;background:var(--bg-toggle-track);border-radius:100px;border-width:1px}._toggle_g6vyf_1 ._track_g6vyf_16:before{position:absolute;content:"";width:var(--knob-size);height:var(--knob-size);background-color:#fff;transition:all .4s;border-radius:100%;top:calc((var(--height) - var(--knob-size)) / 2);left:calc((var(--height) - var(--knob-size)) / 2)}._input_1hkb4_1{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:4px;border:1px solid var(--color-input-border);box-sizing:border-box;color:inherit;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 8px;width:100%}._input_1hkb4_1:focus{box-shadow:#4299e199 0 0 0 3px}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}._animate_1w0e8_1{--saturation: 70%;stroke:hsl(46deg,var(--saturation),45%);transform:scale(1);animation:_zap-pulse_1w0e8_1 .7s 0s ease-in-out none normal infinite}@keyframes _zap-pulse_1w0e8_1{0%{stroke:hsl(46deg,var(--saturation),45%);transform:scale(1)}50%{stroke:hsl(46deg,var(--saturation),95%);transform:scale(1.1)}to{stroke:hsl(46deg,var(--saturation),45%);transform:scale(1)}}._ToggleSwitch_10mtp_1{-webkit-user-select:none;user-select:none;border-radius:4px;border:1px solid #525252;color:var(--color-text);background:var(--color-toggle-bg);display:flex;position:relative;outline:none}._ToggleSwitch_10mtp_1:focus{border-color:var(--color-focus-blue)}._ToggleSwitch_10mtp_1 input{position:absolute;left:0;opacity:0}._ToggleSwitch_10mtp_1 label{z-index:2;display:flex;align-items:center;justify-content:center;padding:10px 0;cursor:pointer}._slider_10mtp_28{z-index:1;position:absolute;display:block;left:0;height:100%;transition:left .2s ease-out;background:var(--color-toggle-selected)} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index.esm-e73720de.js b/FILES/etc/config/clash/clash-dashboard/assets/index.esm-d09f413d.js similarity index 99% rename from FILES/etc/config/clash/clash-dashboard/assets/index.esm-e73720de.js rename to FILES/etc/config/clash/clash-dashboard/assets/index.esm-d09f413d.js index 8a9e127..d836823 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/index.esm-e73720de.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/index.esm-d09f413d.js @@ -1 +1 @@ -import{r as E}from"./index-c925a4cb.js";function L(){return L=Object.assign?Object.assign.bind():function(n){for(var t=1;t=0)&&(r[a]=n[a]);return r}var ct=typeof performance=="object"&&typeof performance.now=="function",H=ct?function(){return performance.now()}:function(){return Date.now()};function K(n){cancelAnimationFrame(n.id)}function ut(n,t){var r=H();function i(){H()-r>=t?n.call(null):a.id=requestAnimationFrame(i)}var a={id:requestAnimationFrame(i)};return a}var N=-1;function V(n){if(n===void 0&&(n=!1),N===-1||n){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),N=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return N}var _=null;function B(n){if(n===void 0&&(n=!1),_===null||n){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var i=document.createElement("div"),a=i.style;return a.width="100px",a.height="100px",t.appendChild(i),document.body.appendChild(t),t.scrollLeft>0?_="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?_="negative":_="positive-ascending"),document.body.removeChild(t),_}return _}var ft=150,dt=function(t,r){return t};function J(n){var t,r=n.getItemOffset,i=n.getEstimatedTotalSize,a=n.getItemSize,l=n.getOffsetForIndexAndAlignment,c=n.getStartIndexForOffset,f=n.getStopIndexForStartIndex,p=n.initInstanceProps,z=n.shouldResetStyleCacheOnItemSizeChange,g=n.validateProps;return t=function(O){ot(M,O);function M(v){var e;return e=O.call(this,v)||this,e._instanceProps=p(e.props,U(e)),e._outerRef=void 0,e._resetIsScrollingTimeoutId=null,e.state={instance:U(e),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof e.props.initialScrollOffset=="number"?e.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},e._callOnItemsRendered=void 0,e._callOnItemsRendered=F(function(o,s,u,m){return e.props.onItemsRendered({overscanStartIndex:o,overscanStopIndex:s,visibleStartIndex:u,visibleStopIndex:m})}),e._callOnScroll=void 0,e._callOnScroll=F(function(o,s,u){return e.props.onScroll({scrollDirection:o,scrollOffset:s,scrollUpdateWasRequested:u})}),e._getItemStyle=void 0,e._getItemStyle=function(o){var s=e.props,u=s.direction,m=s.itemSize,S=s.layout,d=e._getItemStyleCache(z&&m,z&&S,z&&u),h;if(d.hasOwnProperty(o))h=d[o];else{var y=r(e.props,o,e._instanceProps),x=a(e.props,o,e._instanceProps),T=u==="horizontal"||S==="horizontal",b=u==="rtl",R=T?y:0;d[o]=h={position:"absolute",left:b?void 0:R,right:b?R:void 0,top:T?0:y,height:T?"100%":x,width:T?x:"100%"}}return h},e._getItemStyleCache=void 0,e._getItemStyleCache=F(function(o,s,u){return{}}),e._onScrollHorizontal=function(o){var s=o.currentTarget,u=s.clientWidth,m=s.scrollLeft,S=s.scrollWidth;e.setState(function(d){if(d.scrollOffset===m)return null;var h=e.props.direction,y=m;if(h==="rtl")switch(B()){case"negative":y=-m;break;case"positive-descending":y=S-u-m;break}return y=Math.max(0,Math.min(y,S-u)),{isScrolling:!0,scrollDirection:d.scrollOffseth.clientWidth?V():0:d=h.scrollHeight>h.clientHeight?V():0}this.scrollTo(l(this.props,e,o,S,this._instanceProps,d))},I.componentDidMount=function(){var e=this.props,o=e.direction,s=e.initialScrollOffset,u=e.layout;if(typeof s=="number"&&this._outerRef!=null){var m=this._outerRef;o==="horizontal"||u==="horizontal"?m.scrollLeft=s:m.scrollTop=s}this._callPropsCallbacks()},I.componentDidUpdate=function(){var e=this.props,o=e.direction,s=e.layout,u=this.state,m=u.scrollOffset,S=u.scrollUpdateWasRequested;if(S&&this._outerRef!=null){var d=this._outerRef;if(o==="horizontal"||s==="horizontal")if(o==="rtl")switch(B()){case"negative":d.scrollLeft=-m;break;case"positive-ascending":d.scrollLeft=m;break;default:var h=d.clientWidth,y=d.scrollWidth;d.scrollLeft=y-h-m;break}else d.scrollLeft=m;else d.scrollTop=m}this._callPropsCallbacks()},I.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&K(this._resetIsScrollingTimeoutId)},I.render=function(){var e=this.props,o=e.children,s=e.className,u=e.direction,m=e.height,S=e.innerRef,d=e.innerElementType,h=e.innerTagName,y=e.itemCount,x=e.itemData,T=e.itemKey,b=T===void 0?dt:T,R=e.layout,X=e.outerElementType,Y=e.outerTagName,tt=e.style,et=e.useIsScrolling,rt=e.width,A=this.state.isScrolling,P=u==="horizontal"||R==="horizontal",it=P?this._onScrollHorizontal:this._onScrollVertical,D=this._getRangeToRender(),nt=D[0],at=D[1],k=[];if(y>0)for(var w=nt;w<=at;w++)k.push(E.createElement(o,{data:x,key:b(w,x),index:w,isScrolling:et?A:void 0,style:this._getItemStyle(w)}));var $=i(this.props,this._instanceProps);return E.createElement(X||Y||"div",{className:s,onScroll:it,ref:this._outerRefSetter,style:L({position:"relative",height:m,width:rt,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:u},tt)},E.createElement(d||h||"div",{children:k,ref:S,style:{height:P?"100%":$,pointerEvents:A?"none":void 0,width:P?$:"100%"}}))},I._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var e=this.props.itemCount;if(e>0){var o=this._getRangeToRender(),s=o[0],u=o[1],m=o[2],S=o[3];this._callOnItemsRendered(s,u,m,S)}}if(typeof this.props.onScroll=="function"){var d=this.state,h=d.scrollDirection,y=d.scrollOffset,x=d.scrollUpdateWasRequested;this._callOnScroll(h,y,x)}},I._getRangeToRender=function(){var e=this.props,o=e.itemCount,s=e.overscanCount,u=this.state,m=u.isScrolling,S=u.scrollDirection,d=u.scrollOffset;if(o===0)return[0,0,0,0];var h=c(this.props,d,this._instanceProps),y=f(this.props,h,d,this._instanceProps),x=!m||S==="backward"?Math.max(1,s):1,T=!m||S==="forward"?Math.max(1,s):1;return[Math.max(0,h-x),Math.max(0,Math.min(o-1,y+T)),h,y]},M}(E.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var mt=function(t,r){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,r.instance},ht=50,C=function(t,r,i){var a=t,l=a.itemSize,c=i.itemMetadataMap,f=i.lastMeasuredIndex;if(r>f){var p=0;if(f>=0){var z=c[f];p=z.offset+z.size}for(var g=f+1;g<=r;g++){var O=l(g);c[g]={offset:p,size:O},p+=O}i.lastMeasuredIndex=r}return c[r]},vt=function(t,r,i){var a=r.itemMetadataMap,l=r.lastMeasuredIndex,c=l>0?a[l].offset:0;return c>=i?Q(t,r,l,0,i):pt(t,r,Math.max(0,l),i)},Q=function(t,r,i,a,l){for(;a<=i;){var c=a+Math.floor((i-a)/2),f=C(t,c,r).offset;if(f===l)return c;fl&&(i=c-1)}return a>0?a-1:0},pt=function(t,r,i,a){for(var l=t.itemCount,c=1;i=i&&(c=i-1),c>=0){var p=a[c];f=p.offset+p.size}var z=i-c-1,g=z*l;return f+g},yt=J({getItemOffset:function(t,r,i){return C(t,r,i).offset},getItemSize:function(t,r,i){return i.itemMetadataMap[r].size},getEstimatedTotalSize:G,getOffsetForIndexAndAlignment:function(t,r,i,a,l,c){var f=t.direction,p=t.height,z=t.layout,g=t.width,O=f==="horizontal"||z==="horizontal",M=O?g:p,I=C(t,r,l),v=G(t,l),e=Math.max(0,Math.min(v-M,I.offset)),o=Math.max(0,I.offset-M+I.size+c);switch(i==="smart"&&(a>=o-M&&a<=e+M?i="auto":i="center"),i){case"start":return e;case"end":return o;case"center":return Math.round(o+(e-o)/2);case"auto":default:return a>=o&&a<=e?a:a=s-v&&a<=o+v?i="auto":i="center"),i){case"start":return o;case"end":return s;case"center":{var u=Math.round(s+(o-s)/2);return ue+Math.floor(v/2)?e:u}case"auto":default:return a>=s&&a<=o?a:a=0)&&(r[a]=n[a]);return r}var ct=typeof performance=="object"&&typeof performance.now=="function",H=ct?function(){return performance.now()}:function(){return Date.now()};function K(n){cancelAnimationFrame(n.id)}function ut(n,t){var r=H();function i(){H()-r>=t?n.call(null):a.id=requestAnimationFrame(i)}var a={id:requestAnimationFrame(i)};return a}var N=-1;function V(n){if(n===void 0&&(n=!1),N===-1||n){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),N=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return N}var _=null;function B(n){if(n===void 0&&(n=!1),_===null||n){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var i=document.createElement("div"),a=i.style;return a.width="100px",a.height="100px",t.appendChild(i),document.body.appendChild(t),t.scrollLeft>0?_="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?_="negative":_="positive-ascending"),document.body.removeChild(t),_}return _}var ft=150,dt=function(t,r){return t};function J(n){var t,r=n.getItemOffset,i=n.getEstimatedTotalSize,a=n.getItemSize,l=n.getOffsetForIndexAndAlignment,c=n.getStartIndexForOffset,f=n.getStopIndexForStartIndex,p=n.initInstanceProps,z=n.shouldResetStyleCacheOnItemSizeChange,g=n.validateProps;return t=function(O){ot(M,O);function M(v){var e;return e=O.call(this,v)||this,e._instanceProps=p(e.props,U(e)),e._outerRef=void 0,e._resetIsScrollingTimeoutId=null,e.state={instance:U(e),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof e.props.initialScrollOffset=="number"?e.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},e._callOnItemsRendered=void 0,e._callOnItemsRendered=F(function(o,s,u,m){return e.props.onItemsRendered({overscanStartIndex:o,overscanStopIndex:s,visibleStartIndex:u,visibleStopIndex:m})}),e._callOnScroll=void 0,e._callOnScroll=F(function(o,s,u){return e.props.onScroll({scrollDirection:o,scrollOffset:s,scrollUpdateWasRequested:u})}),e._getItemStyle=void 0,e._getItemStyle=function(o){var s=e.props,u=s.direction,m=s.itemSize,S=s.layout,d=e._getItemStyleCache(z&&m,z&&S,z&&u),h;if(d.hasOwnProperty(o))h=d[o];else{var y=r(e.props,o,e._instanceProps),x=a(e.props,o,e._instanceProps),T=u==="horizontal"||S==="horizontal",b=u==="rtl",R=T?y:0;d[o]=h={position:"absolute",left:b?void 0:R,right:b?R:void 0,top:T?0:y,height:T?"100%":x,width:T?x:"100%"}}return h},e._getItemStyleCache=void 0,e._getItemStyleCache=F(function(o,s,u){return{}}),e._onScrollHorizontal=function(o){var s=o.currentTarget,u=s.clientWidth,m=s.scrollLeft,S=s.scrollWidth;e.setState(function(d){if(d.scrollOffset===m)return null;var h=e.props.direction,y=m;if(h==="rtl")switch(B()){case"negative":y=-m;break;case"positive-descending":y=S-u-m;break}return y=Math.max(0,Math.min(y,S-u)),{isScrolling:!0,scrollDirection:d.scrollOffseth.clientWidth?V():0:d=h.scrollHeight>h.clientHeight?V():0}this.scrollTo(l(this.props,e,o,S,this._instanceProps,d))},I.componentDidMount=function(){var e=this.props,o=e.direction,s=e.initialScrollOffset,u=e.layout;if(typeof s=="number"&&this._outerRef!=null){var m=this._outerRef;o==="horizontal"||u==="horizontal"?m.scrollLeft=s:m.scrollTop=s}this._callPropsCallbacks()},I.componentDidUpdate=function(){var e=this.props,o=e.direction,s=e.layout,u=this.state,m=u.scrollOffset,S=u.scrollUpdateWasRequested;if(S&&this._outerRef!=null){var d=this._outerRef;if(o==="horizontal"||s==="horizontal")if(o==="rtl")switch(B()){case"negative":d.scrollLeft=-m;break;case"positive-ascending":d.scrollLeft=m;break;default:var h=d.clientWidth,y=d.scrollWidth;d.scrollLeft=y-h-m;break}else d.scrollLeft=m;else d.scrollTop=m}this._callPropsCallbacks()},I.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&K(this._resetIsScrollingTimeoutId)},I.render=function(){var e=this.props,o=e.children,s=e.className,u=e.direction,m=e.height,S=e.innerRef,d=e.innerElementType,h=e.innerTagName,y=e.itemCount,x=e.itemData,T=e.itemKey,b=T===void 0?dt:T,R=e.layout,X=e.outerElementType,Y=e.outerTagName,tt=e.style,et=e.useIsScrolling,rt=e.width,A=this.state.isScrolling,P=u==="horizontal"||R==="horizontal",it=P?this._onScrollHorizontal:this._onScrollVertical,D=this._getRangeToRender(),nt=D[0],at=D[1],k=[];if(y>0)for(var w=nt;w<=at;w++)k.push(E.createElement(o,{data:x,key:b(w,x),index:w,isScrolling:et?A:void 0,style:this._getItemStyle(w)}));var $=i(this.props,this._instanceProps);return E.createElement(X||Y||"div",{className:s,onScroll:it,ref:this._outerRefSetter,style:L({position:"relative",height:m,width:rt,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:u},tt)},E.createElement(d||h||"div",{children:k,ref:S,style:{height:P?"100%":$,pointerEvents:A?"none":void 0,width:P?$:"100%"}}))},I._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var e=this.props.itemCount;if(e>0){var o=this._getRangeToRender(),s=o[0],u=o[1],m=o[2],S=o[3];this._callOnItemsRendered(s,u,m,S)}}if(typeof this.props.onScroll=="function"){var d=this.state,h=d.scrollDirection,y=d.scrollOffset,x=d.scrollUpdateWasRequested;this._callOnScroll(h,y,x)}},I._getRangeToRender=function(){var e=this.props,o=e.itemCount,s=e.overscanCount,u=this.state,m=u.isScrolling,S=u.scrollDirection,d=u.scrollOffset;if(o===0)return[0,0,0,0];var h=c(this.props,d,this._instanceProps),y=f(this.props,h,d,this._instanceProps),x=!m||S==="backward"?Math.max(1,s):1,T=!m||S==="forward"?Math.max(1,s):1;return[Math.max(0,h-x),Math.max(0,Math.min(o-1,y+T)),h,y]},M}(E.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var mt=function(t,r){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,r.instance},ht=50,C=function(t,r,i){var a=t,l=a.itemSize,c=i.itemMetadataMap,f=i.lastMeasuredIndex;if(r>f){var p=0;if(f>=0){var z=c[f];p=z.offset+z.size}for(var g=f+1;g<=r;g++){var O=l(g);c[g]={offset:p,size:O},p+=O}i.lastMeasuredIndex=r}return c[r]},vt=function(t,r,i){var a=r.itemMetadataMap,l=r.lastMeasuredIndex,c=l>0?a[l].offset:0;return c>=i?Q(t,r,l,0,i):pt(t,r,Math.max(0,l),i)},Q=function(t,r,i,a,l){for(;a<=i;){var c=a+Math.floor((i-a)/2),f=C(t,c,r).offset;if(f===l)return c;fl&&(i=c-1)}return a>0?a-1:0},pt=function(t,r,i,a){for(var l=t.itemCount,c=1;i=i&&(c=i-1),c>=0){var p=a[c];f=p.offset+p.size}var z=i-c-1,g=z*l;return f+g},yt=J({getItemOffset:function(t,r,i){return C(t,r,i).offset},getItemSize:function(t,r,i){return i.itemMetadataMap[r].size},getEstimatedTotalSize:G,getOffsetForIndexAndAlignment:function(t,r,i,a,l,c){var f=t.direction,p=t.height,z=t.layout,g=t.width,O=f==="horizontal"||z==="horizontal",M=O?g:p,I=C(t,r,l),v=G(t,l),e=Math.max(0,Math.min(v-M,I.offset)),o=Math.max(0,I.offset-M+I.size+c);switch(i==="smart"&&(a>=o-M&&a<=e+M?i="auto":i="center"),i){case"start":return e;case"end":return o;case"center":return Math.round(o+(e-o)/2);case"auto":default:return a>=o&&a<=e?a:a=s-v&&a<=o+v?i="auto":i="center"),i){case"start":return o;case"end":return s;case"center":{var u=Math.round(s+(o-s)/2);return ue+Math.floor(v/2)?e:u}case"auto":default:return a>=s&&a<=o?a:aMath.floor((1+Math.random())*65536).toString(16);let h=!1,i=!1,f="",s,g;function m(e,n){let t;try{t=JSON.parse(e)}catch{console.log("JSON.parse error",JSON.parse(e))}const r=new Date,l=$(r);t.time=l,t.id=+r-0+M(),t.even=h=!h,n(t)}function $(e){const n=e.getFullYear()%100,t=u(e.getMonth()+1,2),r=u(e.getDate(),2),l=u(e.getHours(),2),o=u(e.getMinutes(),2),c=u(e.getSeconds(),2);return`${n}-${t}-${r} ${l}:${o}:${c}`}function p(e,n){return e.read().then(({done:t,value:r})=>{const l=D.decode(r,{stream:!t});f+=l;const o=f.split(` -`),c=o[o.length-1];for(let d=0;de[t]).join("|")}let b,a;function k(e,n){if(e.logLevel==="uninit"||i||s&&s.readyState===1)return;g=n;const t=L(e,v);s=new WebSocket(t),s.addEventListener("error",()=>{y(e,n)}),s.addEventListener("message",function(r){m(r.data,n)})}function J(){s.close(),a&&a.abort()}function O(e){!g||!s||(s.close(),i=!1,k(e,g))}function y(e,n){if(a&&S(e)!==b)a.abort();else if(i)return;i=!0,b=S(e),a=new AbortController;const t=a.signal,{url:r,init:l}=w(e);fetch(r+v+"?level="+e.logLevel,{...l,signal:t}).then(o=>{const c=o.body.getReader();p(c,n)},o=>{i=!1,!t.aborted&&console.log("GET /logs error:",o.message)})}export{k as f,O as r,J as s}; +import{H as w,I as D,J as u}from"./index-2d443e7c.js";const v="/logs",L=new TextDecoder("utf-8"),M=()=>Math.floor((1+Math.random())*65536).toString(16);let h=!1,i=!1,f="",s,g;function m(e,n){let t;try{t=JSON.parse(e)}catch{console.log("JSON.parse error",JSON.parse(e))}const r=new Date,l=$(r);t.time=l,t.id=+r-0+M(),t.even=h=!h,n(t)}function $(e){const n=e.getFullYear()%100,t=u(e.getMonth()+1,2),r=u(e.getDate(),2),l=u(e.getHours(),2),o=u(e.getMinutes(),2),c=u(e.getSeconds(),2);return`${n}-${t}-${r} ${l}:${o}:${c}`}function p(e,n){return e.read().then(({done:t,value:r})=>{const l=L.decode(r,{stream:!t});f+=l;const o=f.split(` +`),c=o[o.length-1];for(let d=0;de[t]).join("|")}let b,a;function k(e,n){if(e.logLevel==="uninit"||i||s&&s.readyState===1)return;g=n;const t=w(e,v);s=new WebSocket(t),s.addEventListener("error",()=>{y(e,n)}),s.addEventListener("message",function(r){m(r.data,n)})}function H(){s.close(),a&&a.abort()}function J(e){!g||!s||(s.close(),i=!1,k(e,g))}function y(e,n){if(a&&S(e)!==b)a.abort();else if(i)return;i=!0,b=S(e),a=new AbortController;const t=a.signal,{url:r,init:l}=D(e);fetch(r+v+"?level="+e.logLevel,{...l,signal:t}).then(o=>{const c=o.body.getReader();p(c,n)},o=>{i=!1,!t.aborted&&console.log("GET /logs error:",o.message)})}export{k as f,J as r,H as s}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/play-512d0bd5.js b/FILES/etc/config/clash/clash-dashboard/assets/play-19a8b29d.js similarity index 97% rename from FILES/etc/config/clash/clash-dashboard/assets/play-512d0bd5.js rename to FILES/etc/config/clash/clash-dashboard/assets/play-19a8b29d.js index b3bde4f..e2dbdb7 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/play-512d0bd5.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/play-19a8b29d.js @@ -1 +1 @@ -import{r as g,R as s,P as a}from"./index-c925a4cb.js";function f(){return f=Object.assign||function(t){for(var o=1;o=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function y(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,i;for(i=0;i=0)&&(r[n]=t[n]);return r}var c=g.forwardRef(function(t,o){var r=t.color,e=r===void 0?"currentColor":r,n=t.size,i=n===void 0?24:n,l=v(t,["color","size"]);return s.createElement("svg",f({ref:o,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),s.createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),s.createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))});c.propTypes={color:a.string,size:a.oneOfType([a.string,a.number])};c.displayName="Pause";const b=c;function p(){return p=Object.assign||function(t){for(var o=1;o=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function O(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,i;for(i=0;i=0)&&(r[n]=t[n]);return r}var u=g.forwardRef(function(t,o){var r=t.color,e=r===void 0?"currentColor":r,n=t.size,i=n===void 0?24:n,l=h(t,["color","size"]);return s.createElement("svg",p({ref:o,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),s.createElement("polygon",{points:"5 3 19 12 5 21 5 3"}))});u.propTypes={color:a.string,size:a.oneOfType([a.string,a.number])};u.displayName="Play";const w=u;export{w as P,b as a}; +import{r as g,R as s,P as a}from"./index-2d443e7c.js";function f(){return f=Object.assign||function(t){for(var o=1;o=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function y(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,i;for(i=0;i=0)&&(r[n]=t[n]);return r}var c=g.forwardRef(function(t,o){var r=t.color,e=r===void 0?"currentColor":r,n=t.size,i=n===void 0?24:n,l=v(t,["color","size"]);return s.createElement("svg",f({ref:o,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),s.createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),s.createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))});c.propTypes={color:a.string,size:a.oneOfType([a.string,a.number])};c.displayName="Pause";const b=c;function p(){return p=Object.assign||function(t){for(var o=1;o=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function O(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,i;for(i=0;i=0)&&(r[n]=t[n]);return r}var u=g.forwardRef(function(t,o){var r=t.color,e=r===void 0?"currentColor":r,n=t.size,i=n===void 0?24:n,l=h(t,["color","size"]);return s.createElement("svg",p({ref:o,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),s.createElement("polygon",{points:"5 3 19 12 5 21 5 3"}))});u.propTypes={color:a.string,size:a.oneOfType([a.string,a.number])};u.displayName="Play";const w=u;export{w as P,b as a}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-1aa045aa.js b/FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-60d26854.js similarity index 81% rename from FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-1aa045aa.js rename to FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-60d26854.js index 4660f8a..21a3c3d 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-1aa045aa.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-60d26854.js @@ -1 +1 @@ -import{e as r}from"./index-c925a4cb.js";const{useState:s,useRef:u,useCallback:a,useLayoutEffect:c}=r;function d(){const t=u(null),[n,i]=s(200),e=a(()=>{const{top:o}=t.current.getBoundingClientRect();i(window.innerHeight-o)},[]);return c(()=>(e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}),[e]),[t,n]}export{d as u}; +import{e as r}from"./index-2d443e7c.js";const{useState:s,useRef:u,useCallback:a,useLayoutEffect:c}=r;function d(){const t=u(null),[n,i]=s(200),e=a(()=>{const{top:o}=t.current.getBoundingClientRect();i(window.innerHeight-o)},[]);return c(()=>(e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}),[e]),[t,n]}export{d as u}; diff --git a/FILES/etc/config/clash/clash-dashboard/index_base.html b/FILES/etc/config/clash/clash-dashboard/index_base.html index ef85a64..2093d6e 100644 --- a/FILES/etc/config/clash/clash-dashboard/index_base.html +++ b/FILES/etc/config/clash/clash-dashboard/index_base.html @@ -143,8 +143,8 @@ } }); - - + + diff --git a/FILES/etc/config/clash/clash-dashboard/sw.js b/FILES/etc/config/clash/clash-dashboard/sw.js index bf51a85..1c939ef 100644 --- a/FILES/etc/config/clash/clash-dashboard/sw.js +++ b/FILES/etc/config/clash/clash-dashboard/sw.js @@ -1706,7 +1706,7 @@ class ve extends V { } } ae(); -Oe([{"revision":null,"url":"assets/chart-lib-da3c73a9.js"},{"revision":null,"url":"assets/chevron-down-6e2632b9.js"},{"revision":null,"url":"assets/Config-cf41b8ef.css"},{"revision":null,"url":"assets/Config-f974d420.js"},{"revision":null,"url":"assets/Connections-91974c4c.js"},{"revision":null,"url":"assets/Connections-ddae4f70.css"},{"revision":null,"url":"assets/debounce-c1ba2006.js"},{"revision":null,"url":"assets/en-b634b939.js"},{"revision":null,"url":"assets/Fab-4f386fe2.js"},{"revision":null,"url":"assets/Fab-a434d836.css"},{"revision":null,"url":"assets/index-778e0b6c.js"},{"revision":null,"url":"assets/index-c925a4cb.js"},{"revision":null,"url":"assets/index-d3ed0f51.js"},{"revision":null,"url":"assets/index-de9c3afe.css"},{"revision":null,"url":"assets/index.esm-e73720de.js"},{"revision":null,"url":"assets/index.modern-c58ff412.js"},{"revision":null,"url":"assets/Logs-5e5ee0ad.css"},{"revision":null,"url":"assets/logs-8c8b4d84.js"},{"revision":null,"url":"assets/Logs-f067d536.js"},{"revision":null,"url":"assets/play-512d0bd5.js"},{"revision":null,"url":"assets/Proxies-40f80166.css"},{"revision":null,"url":"assets/Proxies-d20d6e05.js"},{"revision":null,"url":"assets/Rec-7c8e491b.css"},{"revision":null,"url":"assets/Rec-a8cd22ef.js"},{"revision":null,"url":"assets/Rules-772735c2.js"},{"revision":null,"url":"assets/Rules-e11cb70e.css"},{"revision":null,"url":"assets/Select-1e3e2920.js"},{"revision":null,"url":"assets/Select-3de40504.css"},{"revision":null,"url":"assets/TextFilter-3f06e7b6.js"},{"revision":null,"url":"assets/TextFilter-ced87fc6.css"},{"revision":null,"url":"assets/useRemainingViewPortHeight-1aa045aa.js"},{"revision":null,"url":"assets/zh-39651f1e.js"},{"revision":"762528104194ba50a05786bd8c7da17e","url":"index.html"},{"revision":"402b66900e731ca748771b6fc5e7a068","url":"registerSW.js"},{"revision":"c0f9cb6aaf647e778bdc01c59944755b","url":"manifest.webmanifest"}]); +Oe([{"revision":null,"url":"assets/chart-lib-da3c73a9.js"},{"revision":null,"url":"assets/Config-cf41b8ef.css"},{"revision":null,"url":"assets/Config-df73f8b7.js"},{"revision":null,"url":"assets/Connections-af4e9b01.js"},{"revision":null,"url":"assets/Connections-ddae4f70.css"},{"revision":null,"url":"assets/debounce-c1ba2006.js"},{"revision":null,"url":"assets/en-b634b939.js"},{"revision":null,"url":"assets/Fab-a434d836.css"},{"revision":null,"url":"assets/Fab-a6cf5682.js"},{"revision":null,"url":"assets/index-2d443e7c.js"},{"revision":null,"url":"assets/index-454097a7.css"},{"revision":null,"url":"assets/index-4bcbc835.js"},{"revision":null,"url":"assets/index-7030db65.js"},{"revision":null,"url":"assets/index.esm-d09f413d.js"},{"revision":null,"url":"assets/index.modern-c58ff412.js"},{"revision":null,"url":"assets/Logs-00f3c89f.js"},{"revision":null,"url":"assets/logs-293a1f45.js"},{"revision":null,"url":"assets/Logs-5e5ee0ad.css"},{"revision":null,"url":"assets/Modal-86bce5c3.css"},{"revision":null,"url":"assets/Modal.module-32e7ee6a.js"},{"revision":null,"url":"assets/play-19a8b29d.js"},{"revision":null,"url":"assets/Proxies-3133a480.js"},{"revision":null,"url":"assets/Proxies-40f80166.css"},{"revision":null,"url":"assets/Rec-6eb4676c.js"},{"revision":null,"url":"assets/Rec-7c8e491b.css"},{"revision":null,"url":"assets/Rules-4f85f942.js"},{"revision":null,"url":"assets/Rules-e11cb70e.css"},{"revision":null,"url":"assets/Select-3de40504.css"},{"revision":null,"url":"assets/Select-4003d0aa.js"},{"revision":null,"url":"assets/TextFilter-a62f489f.js"},{"revision":null,"url":"assets/TextFilter-ced87fc6.css"},{"revision":null,"url":"assets/useRemainingViewPortHeight-60d26854.js"},{"revision":null,"url":"assets/zh-39651f1e.js"},{"revision":"bc51398d8ad3e2e489123bdd1dd978bd","url":"index.html"},{"revision":"402b66900e731ca748771b6fc5e7a068","url":"registerSW.js"},{"revision":"c0f9cb6aaf647e778bdc01c59944755b","url":"manifest.webmanifest"}]); const We = new RegExp("/[^/?]+\\.[^/]+$"); N( // Return false to exempt requests from being fulfilled by index.html.