From 18d8eb197d4aa28aabdd569f10c74152abfc0921 Mon Sep 17 00:00:00 2001 From: kissshot <4530897+kkkgo@users.noreply.github.com> Date: Sun, 14 Apr 2024 22:49:46 +0800 Subject: [PATCH] Add overload and data authentication features, and apply several patch fixes. --- .gitignore | 5 +- Dockerfile | 2 +- ...{Config-fcd0cbcf.js => Config-e784c537.js} | 2 +- ...ns-0c7d22e8.js => Connections-02211391.js} | 2 +- .../{Fab-2b20f5f3.js => Fab-69d69ccd.js} | 2 +- .../{Logs-80a8da2d.js => Logs-a6169fcc.js} | 2 +- ...e-47c0e472.js => Modal.module-82f3d3b0.js} | 2 +- ...roxies-749455d0.js => Proxies-ffbfc354.js} | 2 +- .../clash-dashboard/assets/Rec-312c2e4e.css | 1 + .../clash-dashboard/assets/Rec-7c8e491b.css | 1 - .../clash-dashboard/assets/Rec-8ac06f0b.js | 3 + .../clash-dashboard/assets/Rec-e0431c82.js | 2 - .../assets/Rec.module-c7e11c0c.js | 1 + .../assets/Refresh-ca10886e.js | 1 + .../{Rules-5a12d7c5.js => Rules-057108c6.js} | 2 +- ...{Select-356cec5c.js => Select-f9db1f20.js} | 2 +- ...ter-903faa94.js => TextFilter-a41408f7.js} | 2 +- .../clash-dashboard/assets/en-34e73832.js | 1 + .../clash-dashboard/assets/en-b634b939.js | 1 - .../{index-eb3692a3.js => index-6f81e651.js} | 2 +- .../{index-1c8acccb.js => index-97cd5f4b.js} | 40 ++--- .../{index-11fa9a7f.js => index-eaabf916.js} | 2 +- ....esm-59b4ed5c.js => index.esm-8c199dd8.js} | 2 +- .../{logs-48ac7723.js => logs-2b407e7b.js} | 2 +- .../{play-6985fb7d.js => play-b167a438.js} | 2 +- .../clash-dashboard/assets/postcss.config.js | 13 ++ .../clash/clash-dashboard/assets/sha.js | 1 + ...=> useRemainingViewPortHeight-8744ab77.js} | 2 +- .../clash-dashboard/assets/zh-38aa74cc.js | 1 + .../clash-dashboard/assets/zh-39651f1e.js | 1 - .../clash/clash-dashboard/index_base.html | 23 +-- .../clash/clash-dashboard/net_rec_show.html | 59 ++++++- FILES/etc/config/clash/clash-dashboard/sw.js | 2 +- FILES/etc/config/clash/socks5.yaml | 7 +- FILES/usr/bin/ppg.sh | 156 ++++++++++++++---- FILES/usr/bin/reload | 2 +- FILES/usr/bin/watch.sh | 23 +++ ReadMe.md | 9 +- pkg.conf | 1 + ppgw.go | 124 +++++++++++--- remakeiso.sh | 28 ++++ 41 files changed, 413 insertions(+), 125 deletions(-) rename FILES/etc/config/clash/clash-dashboard/assets/{Config-fcd0cbcf.js => Config-e784c537.js} (95%) rename FILES/etc/config/clash/clash-dashboard/assets/{Connections-0c7d22e8.js => Connections-02211391.js} (99%) rename FILES/etc/config/clash/clash-dashboard/assets/{Fab-2b20f5f3.js => Fab-69d69ccd.js} (96%) rename FILES/etc/config/clash/clash-dashboard/assets/{Logs-80a8da2d.js => Logs-a6169fcc.js} (91%) rename FILES/etc/config/clash/clash-dashboard/assets/{Modal.module-47c0e472.js => Modal.module-82f3d3b0.js} (94%) rename FILES/etc/config/clash/clash-dashboard/assets/{Proxies-749455d0.js => Proxies-ffbfc354.js} (97%) create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Rec-312c2e4e.css delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Rec-7c8e491b.css create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Rec-8ac06f0b.js delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Rec-e0431c82.js create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Rec.module-c7e11c0c.js create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Refresh-ca10886e.js rename FILES/etc/config/clash/clash-dashboard/assets/{Rules-5a12d7c5.js => Rules-057108c6.js} (96%) rename FILES/etc/config/clash/clash-dashboard/assets/{Select-356cec5c.js => Select-f9db1f20.js} (90%) rename FILES/etc/config/clash/clash-dashboard/assets/{TextFilter-903faa94.js => TextFilter-a41408f7.js} (96%) create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/en-34e73832.js delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/en-b634b939.js rename FILES/etc/config/clash/clash-dashboard/assets/{index-eb3692a3.js => index-6f81e651.js} (99%) rename FILES/etc/config/clash/clash-dashboard/assets/{index-1c8acccb.js => index-97cd5f4b.js} (87%) rename FILES/etc/config/clash/clash-dashboard/assets/{index-11fa9a7f.js => index-eaabf916.js} (99%) rename FILES/etc/config/clash/clash-dashboard/assets/{index.esm-59b4ed5c.js => index.esm-8c199dd8.js} (99%) rename FILES/etc/config/clash/clash-dashboard/assets/{logs-48ac7723.js => logs-2b407e7b.js} (95%) rename FILES/etc/config/clash/clash-dashboard/assets/{play-6985fb7d.js => play-b167a438.js} (97%) create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/postcss.config.js create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/sha.js rename FILES/etc/config/clash/clash-dashboard/assets/{useRemainingViewPortHeight-ce18bed4.js => useRemainingViewPortHeight-8744ab77.js} (81%) create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/zh-38aa74cc.js delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/zh-39651f1e.js create mode 100644 FILES/usr/bin/watch.sh diff --git a/.gitignore b/.gitignore index 0592e32..90a3a80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ iso/ ppgw/ FILES/usr/bin/ppgw -renote.txt \ No newline at end of file +renote.txt +go.mod +go.sum +ppgw.exe \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index eb5df83..1538f12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM alpine:edge AS singbuilder -RUN apk add go git +RUN apk add go git && apk upgrade WORKDIR /data RUN git clone https://github.com/kkkgo/box.git box WORKDIR /data/box diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Config-fcd0cbcf.js b/FILES/etc/config/clash/clash-dashboard/assets/Config-e784c537.js similarity index 95% rename from FILES/etc/config/clash/clash-dashboard/assets/Config-fcd0cbcf.js rename to FILES/etc/config/clash/clash-dashboard/assets/Config-e784c537.js index f1cab65..b539915 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Config-fcd0cbcf.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Config-e784c537.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,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-1c8acccb.js";import{r as Y}from"./logs-48ac7723.js";import{S as C,T as I}from"./Select-356cec5c.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}; +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-97cd5f4b.js";import{r as Y}from"./logs-2b407e7b.js";import{S as C,T as I}from"./Select-f9db1f20.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-0c7d22e8.js b/FILES/etc/config/clash/clash-dashboard/assets/Connections-02211391.js similarity index 99% rename from FILES/etc/config/clash/clash-dashboard/assets/Connections-0c7d22e8.js rename to FILES/etc/config/clash/clash-dashboard/assets/Connections-02211391.js index 3ce9010..28c2dd2 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Connections-0c7d22e8.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Connections-02211391.js @@ -1,4 +1,4 @@ -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-1c8acccb.js";import{u as Mt}from"./useRemainingViewPortHeight-ce18bed4.js";import{f as It}from"./index-11fa9a7f.js";import{C as Vt,m as Ue}from"./Modal.module-47c0e472.js";import{F as bt,p as Et,A as Dt}from"./Fab-2b20f5f3.js";import{P as Ht,a as Lt}from"./play-6985fb7d.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};/** +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-97cd5f4b.js";import{u as Mt}from"./useRemainingViewPortHeight-8744ab77.js";import{f as It}from"./index-eaabf916.js";import{C as Vt,m as Ue}from"./Modal.module-82f3d3b0.js";import{F as bt,p as Et,A as Dt}from"./Fab-69d69ccd.js";import{P as Ht,a as Lt}from"./play-b167a438.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 diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Fab-2b20f5f3.js b/FILES/etc/config/clash/clash-dashboard/assets/Fab-69d69ccd.js similarity index 96% rename from FILES/etc/config/clash/clash-dashboard/assets/Fab-2b20f5f3.js rename to FILES/etc/config/clash/clash-dashboard/assets/Fab-69d69ccd.js index abd6fe3..208677b 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Fab-2b20f5f3.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Fab-69d69ccd.js @@ -1 +1 @@ -import{j as t,e as C,r as l}from"./index-1c8acccb.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-97cd5f4b.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-80a8da2d.js b/FILES/etc/config/clash/clash-dashboard/assets/Logs-a6169fcc.js similarity index 91% rename from FILES/etc/config/clash/clash-dashboard/assets/Logs-80a8da2d.js rename to FILES/etc/config/clash/clash-dashboard/assets/Logs-a6169fcc.js index 77211c8..4e9d03d 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Logs-80a8da2d.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Logs-a6169fcc.js @@ -1 +1 @@ -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-1c8acccb.js";import{a as F,F as M}from"./index.esm-59b4ed5c.js";import{r as $,s as A,f as D}from"./logs-48ac7723.js";import{d as B}from"./debounce-c1ba2006.js";import{u as H}from"./useRemainingViewPortHeight-ce18bed4.js";import{F as q,p as G}from"./Fab-2b20f5f3.js";import{P as K,a as V}from"./play-6985fb7d.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}; +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-97cd5f4b.js";import{a as F,F as M}from"./index.esm-8c199dd8.js";import{r as $,s as A,f as D}from"./logs-2b407e7b.js";import{d as B}from"./debounce-c1ba2006.js";import{u as H}from"./useRemainingViewPortHeight-8744ab77.js";import{F as q,p as G}from"./Fab-69d69ccd.js";import{P as K,a as V}from"./play-b167a438.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.module-47c0e472.js b/FILES/etc/config/clash/clash-dashboard/assets/Modal.module-82f3d3b0.js similarity index 94% rename from FILES/etc/config/clash/clash-dashboard/assets/Modal.module-47c0e472.js rename to FILES/etc/config/clash/clash-dashboard/assets/Modal.module-82f3d3b0.js index b6d369a..3052901 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Modal.module-47c0e472.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Modal.module-82f3d3b0.js @@ -1 +1 @@ -import{r as f,R as c,P as a}from"./index-1c8acccb.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}; +import{r as f,R as c,P as a}from"./index-97cd5f4b.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-749455d0.js b/FILES/etc/config/clash/clash-dashboard/assets/Proxies-ffbfc354.js similarity index 97% rename from FILES/etc/config/clash/clash-dashboard/assets/Proxies-749455d0.js rename to FILES/etc/config/clash/clash-dashboard/assets/Proxies-ffbfc354.js index 1cfb75f..6779957 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Proxies-749455d0.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Proxies-ffbfc354.js @@ -1 +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-1c8acccb.js";import{C as De,m as V}from"./Modal.module-47c0e472.js";import{F as Fe,p as Be,A as Ie,I as Re}from"./Fab-2b20f5f3.js";import{R as Ee,a as Me,T as Ue}from"./TextFilter-903faa94.js";import{f as He}from"./index-11fa9a7f.js";import{S as qe,T as W}from"./Select-356cec5c.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}; +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-97cd5f4b.js";import{C as De,m as V}from"./Modal.module-82f3d3b0.js";import{F as Fe,p as Be,A as Ie,I as Re}from"./Fab-69d69ccd.js";import{R as Ee,a as Me,T as Ue}from"./TextFilter-a41408f7.js";import{f as He}from"./index-eaabf916.js";import{S as qe,T as W}from"./Select-f9db1f20.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/Rec-312c2e4e.css b/FILES/etc/config/clash/clash-dashboard/assets/Rec-312c2e4e.css new file mode 100644 index 0000000..3fa646d --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Rec-312c2e4e.css @@ -0,0 +1 @@ +@charset "UTF-8";._body_1e6s5_3{font-family:Arial,sans-serif}._h1_1e6s5_7{font-size:36px;color:#9c27b0;margin:20px 0}._oh1_1e6s5_13{font-size:36px;color:#ff6f00;margin:20px 0}._h3_1e6s5_19{font-size:24px}._h4_1e6s5_23{font-size:12px;color:#666}._link_1e6s5_28{display:inline-block;padding:10px 20px;background-color:#007bff;color:#fff;text-decoration:none;border:2px solid #007bff;border-radius:5px;transition:background-color .3s,color .3s;margin-right:20px}._link_1e6s5_28:hover{background-color:#0056b3;border-color:#0056b3}._link_1e6s5_28:active{background-color:#003d71;border-color:#003d71} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Rec-7c8e491b.css b/FILES/etc/config/clash/clash-dashboard/assets/Rec-7c8e491b.css deleted file mode 100644 index ebc4897..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Rec-7c8e491b.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";._body_1ygfj_3{font-family:Arial,sans-serif}._h1_1ygfj_7{font-size:36px;color:#9c27b0;margin:20px 0}._h3_1ygfj_13{font-size:24px}._h4_1ygfj_17{font-size:12px;color:#666}._link_1ygfj_22{display:inline-block;padding:10px 20px;background-color:#007bff;color:#fff;text-decoration:none;border:2px solid #007bff;border-radius:5px;transition:background-color .3s,color .3s;margin-right:20px}._link_1ygfj_22:hover{background-color:#0056b3;border-color:#0056b3}._link_1ygfj_22:active{background-color:#003d71;border-color:#003d71} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Rec-8ac06f0b.js b/FILES/etc/config/clash/clash-dashboard/assets/Rec-8ac06f0b.js new file mode 100644 index 0000000..180cb54 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Rec-8ac06f0b.js @@ -0,0 +1,3 @@ +import{u as p,r as c,j as e}from"./index-97cd5f4b.js";import{s}from"./Rec.module-c7e11c0c.js";function k(){const{t}=p(),[l,i]=c.useState("./data.csv");c.useEffect(()=>{const n=Math.floor(Date.now()/1e3);fetch(`./reckey.json?=${n}`).then(a=>a.json()).then(a=>{const r=a.reckey;if(r){const d="PaoPaoGateWay",o=JSON.parse(localStorage.getItem(d));if(o&&o.clashAPIConfigs&&o.clashAPIConfigs[0].secret){const f=o.clashAPIConfigs[0].secret,m=sha256(r+f);i(`./rec_data/${m}/data.csv`)}}else throw new Error("Invalid reckey")}).catch(a=>{console.error("Error:",a),alert(`尚未生成数据或者监控程序未启动,请确保ppgw.ini的net_rec=yes +The data has not been generated, or the monitoring program has not started. Please ensure that net_rec=yes in ppgw.ini.`),window.location.href="/ui"})},[]);function h(n){n.button===0&&(alert(`请右键点击链接并选择 '另存为' 来下载表格文件,并修改后缀为CSV。 +Please right-click on the link and select 'Save As' to download the CSV.`),n.preventDefault())}return e.jsxs("div",{className:s.body,children:[" ",e.jsx("h1",{className:s.h1,children:t("netrec")}),e.jsx("h3",{className:s.h4,children:t("netrec_data_no")}),e.jsx("h3",{className:s.h3,children:t("netrec_data")}),e.jsxs("p",{children:[e.jsx("a",{href:l,id:"downloadLink",onMouseDown:h,className:s.link,children:t("downcsv")})," "]}),e.jsxs("p",{children:[e.jsx("a",{href:"./net_rec_show.html",target:"_blank",className:s.link,children:t("loadonline")})," "]})]})}export{k as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Rec-e0431c82.js b/FILES/etc/config/clash/clash-dashboard/assets/Rec-e0431c82.js deleted file mode 100644 index a144fce..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Rec-e0431c82.js +++ /dev/null @@ -1,2 +0,0 @@ -import{u as o,j as n}from"./index-1c8acccb.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/Rec.module-c7e11c0c.js b/FILES/etc/config/clash/clash-dashboard/assets/Rec.module-c7e11c0c.js new file mode 100644 index 0000000..ba4b76d --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Rec.module-c7e11c0c.js @@ -0,0 +1 @@ +const _="_body_1e6s5_3",s="_h1_1e6s5_7",o="_oh1_1e6s5_13",h="_h3_1e6s5_19",n="_h4_1e6s5_23",t="_link_1e6s5_28",e={body:_,h1:s,oh1:o,h3:h,h4:n,link:t};export{e as s}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Refresh-ca10886e.js b/FILES/etc/config/clash/clash-dashboard/assets/Refresh-ca10886e.js new file mode 100644 index 0000000..920a006 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Refresh-ca10886e.js @@ -0,0 +1 @@ +import{r as p,u,j as r}from"./index-97cd5f4b.js";import{s as o}from"./Rec.module-c7e11c0c.js";function x(){const[a,t]=p.useState(!1),{t:e}=u();async function l(){t(!0);try{if(!window.confirm(e("confirm_refresh"))){t(!1);return}const c=Math.floor(Date.now()/1e3),i=await fetch(`./stamp.json?=${c}`);if(!i.ok)throw new Error("Failed to fetch stamp");const{stamp:f}=await i.json(),h="PaoPaoGateWay",s=JSON.parse(localStorage.getItem(h));if(!s||!s.clashAPIConfigs||!s.clashAPIConfigs[0].secret)throw new Error("Secret not found");const d=s.clashAPIConfigs[0].secret,m=sha256(f+d);if(!(await fetch(`./${m}reload.json?=${c}`)).ok)throw new Error("Reload failed");alert(e("refresh_success"))}catch(n){console.error(n),alert(e("refresh_fail"))}finally{t(!1)}}return r.jsxs("div",{className:o.body,children:[" ",r.jsx("h1",{className:o.oh1,children:e("refresh_title")}),r.jsx("h3",{className:o.h3,children:e("refresh_tips")}),r.jsx("button",{onClick:l,disabled:a,className:o.link,children:e(a?"loading":"Refresh")})]})}export{x as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Rules-5a12d7c5.js b/FILES/etc/config/clash/clash-dashboard/assets/Rules-057108c6.js similarity index 96% rename from FILES/etc/config/clash/clash-dashboard/assets/Rules-5a12d7c5.js rename to FILES/etc/config/clash/clash-dashboard/assets/Rules-057108c6.js index d620a2e..1096a3e 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Rules-5a12d7c5.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Rules-057108c6.js @@ -1 +1 @@ -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-1c8acccb.js";import{a as V,V as W}from"./index.esm-59b4ed5c.js";import{R as j,T as H}from"./TextFilter-903faa94.js";import{f as G}from"./index-11fa9a7f.js";import{F as J,p as K}from"./Fab-2b20f5f3.js";import{u as X}from"./useRemainingViewPortHeight-ce18bed4.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}; +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-97cd5f4b.js";import{a as V,V as W}from"./index.esm-8c199dd8.js";import{R as j,T as H}from"./TextFilter-a41408f7.js";import{f as G}from"./index-eaabf916.js";import{F as J,p as K}from"./Fab-69d69ccd.js";import{u as X}from"./useRemainingViewPortHeight-8744ab77.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-356cec5c.js b/FILES/etc/config/clash/clash-dashboard/assets/Select-f9db1f20.js similarity index 90% rename from FILES/etc/config/clash/clash-dashboard/assets/Select-356cec5c.js rename to FILES/etc/config/clash/clash-dashboard/assets/Select-f9db1f20.js index 19078ef..1e53603 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Select-356cec5c.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Select-f9db1f20.js @@ -1 +1 @@ -import{r as a,j as t,a9 as r}from"./index-1c8acccb.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-97cd5f4b.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-903faa94.js b/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-a41408f7.js similarity index 96% rename from FILES/etc/config/clash/clash-dashboard/assets/TextFilter-903faa94.js rename to FILES/etc/config/clash/clash-dashboard/assets/TextFilter-a41408f7.js index 2d91994..683e86a 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-903faa94.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-a41408f7.js @@ -1 +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-1c8acccb.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}; +import{r as g,R as c,P as i,c as m,j as l,v as x,e as v}from"./index-97cd5f4b.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/en-34e73832.js b/FILES/etc/config/clash/clash-dashboard/assets/en-34e73832.js new file mode 100644 index 0000000..ff68db3 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/en-34e73832.js @@ -0,0 +1 @@ +const e={Overview:"Overview",Proxies:"Proxies",Rules:"Rules",Rec:"Record",netrec:"Network traffic records",netrec_data:"Select Data Access Method:",netrec_data_no:"[Tips] Need net_rec=yes in ppgw.ini",Refresh:"Reload",refresh_title:"Reload Configuration",refresh_tips:"Manually reload to refresh all configuration files such as ppgw.ini, subscriptions, etc.",confirm_refresh:"Reloading and refreshing all configurations may cause network interruptions. Are you sure you want to reload immediately?",refresh_success:"The reload refresh task has been successfully deployed!",refresh_fail:"Request to reload refresh failed, there may be other tasks in progress",downcsv:"Download CSV",loadonline:"Load Online",Conns:"Conns",Config:"Config",Logs:"Logs",Upload:"Upload",Download:"Download","Upload Total":"Upload Total","Download Total":"Download Total","Active Connections":"Active Connections","Pause Refresh":"Pause Refresh","Resume Refresh":"Resume Refresh",Up:"Up",Down:"Down","Test Latency":"Test Latency",settings:"settings",sort_in_grp:"Sorting in group",hide_unavail_proxies:"Hide unavailable proxies",auto_close_conns:"Automatically close old connections",order_natural:"Original order in config file",order_latency_asc:"By latency from small to big",order_latency_desc:"By latency from big to small",order_name_asc:"By name alphabetically (A-Z)",order_name_desc:"By name alphabetically (Z-A)",Connections:"Connections",current_backend:"Current Backend",Active:"Active",switch_backend:"Switch backend",Closed:"Closed",switch_theme:"Switch theme",theme:"theme",about:"PaoPao GateWay",no_logs:"No logs yet, hang tight...",chart_style:"Chart Style",latency_test_url:"Latency Test URL",allow_lan_mixed:"Allow LAN :1080 proxy [http+socks5]",lang:"Language",LogLevel:"Log Level",update_all_rule_provider:"Update all rule providers",update_all_proxy_provider:"Update all proxy providers",dark_mode_pure_black_toggle_label:"Use pure black in dark mode"};export{e as data}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/en-b634b939.js b/FILES/etc/config/clash/clash-dashboard/assets/en-b634b939.js deleted file mode 100644 index 188e709..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/en-b634b939.js +++ /dev/null @@ -1 +0,0 @@ -const e={Overview:"Overview",Proxies:"Proxies",Rules:"Rules",Rec:"Record",netrec:"Network traffic records",netrec_data:"Select Data Access Method:",netrec_data_no:"[Tips] Need net_rec=yes in ppgw.ini",downcsv:"Download CSV",loadonline:"Load Online",Conns:"Conns",Config:"Config",Logs:"Logs",Upload:"Upload",Download:"Download","Upload Total":"Upload Total","Download Total":"Download Total","Active Connections":"Active Connections","Pause Refresh":"Pause Refresh","Resume Refresh":"Resume Refresh",Up:"Up",Down:"Down","Test Latency":"Test Latency",settings:"settings",sort_in_grp:"Sorting in group",hide_unavail_proxies:"Hide unavailable proxies",auto_close_conns:"Automatically close old connections",order_natural:"Original order in config file",order_latency_asc:"By latency from small to big",order_latency_desc:"By latency from big to small",order_name_asc:"By name alphabetically (A-Z)",order_name_desc:"By name alphabetically (Z-A)",Connections:"Connections",current_backend:"Current Backend",Active:"Active",switch_backend:"Switch backend",Closed:"Closed",switch_theme:"Switch theme",theme:"theme",about:"PaoPao GateWay",no_logs:"No logs yet, hang tight...",chart_style:"Chart Style",latency_test_url:"Latency Test URL",allow_lan_mixed:"Allow LAN :1080 proxy [http+socks5]",lang:"Language",LogLevel:"Log Level",update_all_rule_provider:"Update all rule providers",update_all_proxy_provider:"Update all proxy providers",dark_mode_pure_black_toggle_label:"Use pure black in dark mode"};export{e as data}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index-eb3692a3.js b/FILES/etc/config/clash/clash-dashboard/assets/index-6f81e651.js similarity index 99% rename from FILES/etc/config/clash/clash-dashboard/assets/index-eb3692a3.js rename to FILES/etc/config/clash/clash-dashboard/assets/index-6f81e651.js index 62b7a72..067c0d3 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/index-eb3692a3.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/index-6f81e651.js @@ -1,4 +1,4 @@ -import{r as m,R as ui}from"./index-1c8acccb.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(` +import{r as m,R as ui}from"./index-97cd5f4b.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-1c8acccb.js b/FILES/etc/config/clash/clash-dashboard/assets/index-97cd5f4b.js similarity index 87% rename from FILES/etc/config/clash/clash-dashboard/assets/index-1c8acccb.js rename to FILES/etc/config/clash/clash-dashboard/assets/index-97cd5f4b.js index ed55006..d5e3769 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/index-1c8acccb.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/index-97cd5f4b.js @@ -1,4 +1,4 @@ -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={};/** +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={},Je=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 * @@ -6,7 +6,7 @@ var ly=Object.defineProperty;var ay=(e,t,n)=>t in e?ly(e,t,{enumerable:!0,config * * 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(1t in e?ly(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Ry=v,by=Symbol.for("react.element"),Ly=Symbol.for("react.fragment"),Ty=Object.prototype.hasOwnProperty,Ny=Ry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Iy={key:!0,ref:!0,__self:!0,__source:!0};function Wp(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Ty.call(t,r)&&!Iy.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:by,type:e,key:i,ref:s,props:o,_owner:Ny.current}}Fs.Fragment=Ly;Fs.jsx=Wp;Fs.jsxs=Wp;Dp.exports=Fs;var C=Dp.exports;const Dy={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Hi{constructor(t){let n=arguments.length>1&&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={};/** + */var Ry=v,by=Symbol.for("react.element"),Ly=Symbol.for("react.fragment"),Ty=Object.prototype.hasOwnProperty,Ny=Ry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Iy={key:!0,ref:!0,__self:!0,__source:!0};function Wp(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Ty.call(t,r)&&!Iy.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:by,type:e,key:i,ref:s,props:o,_owner:Ny.current}}Fs.Fragment=Ly;Fs.jsx=Wp;Fs.jsxs=Wp;Dp.exports=Fs;var C=Dp.exports;const Dy={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Hi{constructor(t){let n=arguments.length>1&&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 Fn(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?Fn(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Fn(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?Fn(n.nestingPrefix):n.nestingPrefixEscaped||Fn("$t("),this.nestingSuffix=n.nestingSuffix?Fn(n.nestingSuffix):n.nestingSuffixEscaped||Fn(")"),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 jn(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:jn((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:jn((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:jn((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:jn((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:jn((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()]=jn(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=Je(()=>import("./zh-38aa74cc.js"),[],import.meta.url);break;case"en":default:r=Je(()=>import("./en-34e73832.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 * @@ -22,7 +22,7 @@ var ly=Object.defineProperty;var ay=(e,t,n)=>t in e?ly(e,t,{enumerable:!0,config * * 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;/** + */(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(fn,$))eto(H,fn)?(k[B]=H,k[et]=$,B=et):(k[B]=fn,k[Re]=$,B=Re);else if(eto(H,$))k[B]=H,k[et]=$,B=et;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 * @@ -30,14 +30,14 @@ var ly=Object.defineProperty;var ay=(e,t,n)=>t in e?ly(e,t,{enumerable:!0,config * * 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||!(2"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")&&(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 Bn:return"Fragment";case zn: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 nr(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,rr=null,or=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){rr?or?or.push(e):or=[e]:rr=e}function hh(){if(rr){var e=rr,t=or;if(or=rr=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-at(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 Wn=!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(Wn)return e==="compositionend"||!Ku&&Dh(e,t)?(e=Nh(),Ni=Vu=Bt=null,Wn=!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,Vn=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||Vn==null||Vn!==Yi(r)||(r=Vn,"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"),0Kn||(e.current=Ra[Kn],Ra[Kn]=null,Kn--)}function G(e,t){Kn++,Ra[Kn]=e.current,e.current=t}var on={},xe=an(on),Te=an(!1),Cn=on;function cr(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,Cn=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,Cn),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-at(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&&dn(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&&dn(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&&dn(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&&dn(m,S),R}function _(m,p,h,x){if(typeof h=="object"&&h!==null&&h.type===Bn&&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===Bn){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===Bn?(p=xn(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 zn: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 dr=om(!0),im=om(!1),$o={},St=an($o),wo=an($o),So=an($o);function yn(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 pr(){J(St),J(wo),J(So)}function sm(e){yn(So.current);var t=yn(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 Ze().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();ut(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(),ut(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:Xe,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:Xe,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:Xe,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));kn&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-at(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;/*! +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Al(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Da(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var fw=typeof WeakMap=="function"?WeakMap:Map;function Pm(e,t,n){n=Pt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){gs||(gs=!0,Va=r),Da(e,t)},n}function Om(e,t,n){n=Pt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Da(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Da(e,t),typeof r!="function"&&(Xt===null?Xt=new Set([this]):Xt.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function ld(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new fw;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=kw.bind(null,e,t,n),t.then(e,e))}function ad(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ud(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Pt(-1,1),t.tag=2,Jt(n,t,1))),n.lanes|=1),e)}var dw=Tt.ReactCurrentOwner,Le=!1;function Ce(e,t,n,r){t.child=e===null?im(t,null,n,r):dr(t,e.child,n,r)}function cd(e,t,n,r,o){n=n.render;var i=t.ref;return sr(t,o),r=lc(e,t,n,r,i,o),n=ac(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Lt(e,t,o)):(X&&n&&Gu(t),t.flags|=1,Ce(e,t,r,o),t.child)}function fd(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!yc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Rm(e,t,i,r,o)):(e=$i(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:mo,n(s,r)&&e.ref===t.ref)return Lt(e,t,o)}return t.flags|=1,e=en(i,r),e.ref=t.ref,e.return=t,t.child=e}function Rm(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(mo(i,r)&&e.ref===t.ref)if(Le=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Le=!0);else return t.lanes=e.lanes,Lt(e,t,o)}return Ma(e,t,n,r,o)}function bm(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(Xn,De),De|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,G(Xn,De),De|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,G(Xn,De),De|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,G(Xn,De),De|=r;return Ce(e,t,o,n),t.child}function Lm(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ma(e,t,n,r,o){var i=Ne(n)?Cn:xe.current;return i=cr(t,i),sr(t,o),n=lc(e,t,n,r,i,o),r=ac(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Lt(e,t,o)):(X&&r&&Gu(t),t.flags|=1,Ce(e,t,n,o),t.child)}function dd(e,t,n,r,o){if(Ne(n)){var i=!0;ss(t)}else i=!1;if(sr(t,o),t.stateNode===null)Fi(e,t),rm(t,n,r),Ia(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Xe(u):(u=Ne(n)?Cn:xe.current,u=cr(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&rd(t,s,r,u),At=!1;var f=t.memoizedState;s.state=f,fs(t,r,s,o),a=t.memoizedState,l!==r||f!==a||Te.current||At?(typeof c=="function"&&(Na(t,n,c,r),a=t.memoizedState),(l=At||nd(t,n,l,r,f,a,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,tm(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:nt(t.type,l),s.props=u,d=t.pendingProps,f=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=Xe(a):(a=Ne(n)?Cn:xe.current,a=cr(t,a));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||f!==a)&&rd(t,s,r,a),At=!1,f=t.memoizedState,s.state=f,fs(t,r,s,o);var y=t.memoizedState;l!==d||f!==y||Te.current||At?(typeof g=="function"&&(Na(t,n,g,r),y=t.memoizedState),(u=At||nd(t,n,u,r,f,y,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Aa(e,t,n,r,i,o)}function Aa(e,t,n,r,o,i){Lm(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Jf(t,n,!1),Lt(e,t,i);r=t.stateNode,dw.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=dr(t,e.child,null,i),t.child=dr(t,null,l,i)):Ce(e,t,l,i),t.memoizedState=r.state,o&&Jf(t,n,!0),t.child}function Tm(e){var t=e.stateNode;t.pendingContext?Yf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Yf(e,t.context,!1),rc(e,t.containerInfo)}function pd(e,t,n,r,o){return fr(),Ju(o),t.flags|=256,Ce(e,t,n,r),t.child}var Fa={dehydrated:null,treeContext:null,retryLane:0};function ja(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nm(e,t,n){var r=t.pendingProps,o=Z.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),G(Z,o&1),e===null)return La(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Gs(s,r,0,null),e=xn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ja(n),t.memoizedState=Fa,e):fc(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return pw(e,t,s,r,l,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,l=o.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=en(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=en(l,i):(i=xn(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?ja(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Fa,r}return i=e.child,e=i.sibling,r=en(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function fc(e,t){return t=Gs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function yi(e,t,n,r){return r!==null&&Ju(r),dr(t,e.child,null,n),e=fc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pw(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=Al(Error(I(422))),yi(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Gs({mode:"visible",children:r.children},o,0,null),i=xn(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&dr(t,e.child,null,s),t.child.memoizedState=ja(s),t.memoizedState=Fa,i);if(!(t.mode&1))return yi(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(I(419)),r=Al(i,r,void 0),yi(e,t,s,r)}if(l=(s&e.childLanes)!==0,Le||l){if(r=fe,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,bt(e,o),ut(r,e,o,-1))}return vc(),r=Al(Error(I(421))),yi(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Pw.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Me=Yt(o.nextSibling),Ae=t,X=!0,st=null,e!==null&&(He[Qe++]=_t,He[Qe++]=kt,He[Qe++]=_n,_t=e.id,kt=e.overflow,_n=t),t=fc(t,r.children),t.flags|=4096,t)}function hd(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ta(e.return,t,n)}function Fl(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Im(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ce(e,t,r.children,n),r=Z.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hd(e,n,t);else if(e.tag===19)hd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(G(Z,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&ds(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Fl(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ds(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Fl(t,!0,n,null,i);break;case"together":Fl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Lt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,n=en(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=en(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hw(e,t,n){switch(t.tag){case 3:Tm(t),fr();break;case 5:sm(t);break;case 1:Ne(t.type)&&ss(t);break;case 4:rc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;G(us,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(G(Z,Z.current&1),t.flags|=128,null):n&t.child.childLanes?Nm(e,t,n):(G(Z,Z.current&1),e=Lt(e,t,n),e!==null?e.sibling:null);G(Z,Z.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Im(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),G(Z,Z.current),r)break;return null;case 22:case 23:return t.lanes=0,bm(e,t,n)}return Lt(e,t,n)}var Dm,Ua,Mm,Am;Dm=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ua=function(){};Mm=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,yn(St.current);var i=null;switch(n){case"input":o=la(e,o),r=la(e,r),i=[];break;case"select":o=te({},o,{value:void 0}),r=te({},r,{value:void 0}),i=[];break;case"textarea":o=ca(e,o),r=ca(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=os)}da(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(lo.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(lo.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Y("scroll",e),i||l===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Am=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ur(e,t){if(!X)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function mw(e,t,n){var r=t.pendingProps;switch(Yu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ye(t),null;case 1:return Ne(t.type)&&is(),ye(t),null;case 3:return r=t.stateNode,pr(),J(Te),J(xe),ic(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(gi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,st!==null&&(Ka(st),st=null))),Ua(e,t),ye(t),null;case 5:oc(t);var o=yn(So.current);if(n=t.type,e!==null&&t.stateNode!=null)Mm(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(I(166));return ye(t),null}if(e=yn(St.current),gi(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[vt]=t,r[yo]=i,e=(t.mode&1)!==0,n){case"dialog":Y("cancel",r),Y("close",r);break;case"iframe":case"object":case"embed":Y("load",r);break;case"video":case"audio":for(o=0;o<\/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;omr&&(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>mr&&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 pr(),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));fr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return J(Z),null;case 4:return pr(),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 Jn(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:nt(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,it=!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||Jn(n,t);case 6:var r=pe,o=it;pe=null,It(e,t,n),pe=r,it=o,pe!==null&&(it?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(it?(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=it,pe=n.stateNode.containerInfo,it=!0,It(e,t,n),pe=r,it=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&&(Jn(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 tt(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?Sn(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=cr(t,xe.current);sr(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=nt(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,nt(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:nt(r,o),Ma(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nt(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=hr(Error(I(423)),t),t=pd(e,t,r,n,o);break e}else if(r!==o){o=hr(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,st=null,n=im(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fr(),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=dr(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:nt(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,sr(t,n),o=Xe(o),r=r(o),t.flags|=1,Ce(e,t,r,n),t.child;case 14:return r=t.type,o=nt(r,t.pendingProps),o=nt(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:nt(r,o),Fi(e,t),t.tag=1,Ne(r)?(e=!0,ss(t)):e=!1,sr(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 Bn:return xn(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 xn(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:{}},Rn={},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 @@ -47,11 +47,11 @@ Error generating stack: `+i.message+` * 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:{}};/*! + */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 gr=[],Zn=null,Ja=!1;function Ww(){gr=[]}function Vw(){}function ko(){Ja=!0}function Po(){if(Ja){if(Ja=!1,!Zn)return;setTimeout(function(){if(!Zn.contains(document.activeElement)){var e=(0,zw.default)(Zn)[0]||Zn;e.focus()}},0)}}function Hw(){gr.push(document.activeElement)}function Qw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=null;try{gr.length!==0&&(t=gr.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(){gr.length>0&&gr.pop()}function qw(e){Zn=e,window.addEventListener?(window.addEventListener("blur",ko,!1),document.addEventListener("focus",Po,!0)):(window.attachEvent("onBlur",ko),document.attachEvent("onFocus",Po))}function Gw(){Zn=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,ct={},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. +*/(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(ct,"__esModule",{value:!0});ct.canUseDOM=ct.SafeNodeList=ct.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:{};ct.SafeHTMLCollection=el.canUseDOM?window.HTMLCollection:{};ct.SafeNodeList=el.canUseDOM?window.NodeList:{};ct.canUseDOM=el.canUseDOM;ct.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=ct;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 kr={};Object.defineProperty(kr,"__esModule",{value:!0});kr.resetState=hS;kr.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)})};kr.add=function(t,n){return yS(t.classList,t.nodeName.toLowerCase()=="html"?ro:oo,n.split(" "))};kr.remove=function(t,n){return wS(t.classList,t.nodeName.toLowerCase()=="html"?ro:oo,n.split(" "))};var Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});Pr.log=xS;Pr.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}Pr.default=Ss;var Pc={};Object.defineProperty(Pc,"__esModule",{value:!0});Pc.resetState=PS;Pc.log=OS;var CS=Pr,_S=kS(CS);function kS(e){return e&&e.__esModule?e:{default:e}}var we=void 0,rt=void 0,En=[];function PS(){for(var e=[we,rt],t=0;t0?(document.body.firstChild!==we&&document.body.insertBefore(we,document.body.firstChild),document.body.lastChild!==rt&&document.body.appendChild(rt)):(we.parentElement&&we.parentElement.removeChild(we),rt.parentElement&&rt.parentElement.removeChild(rt))}_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 fn={ref:this.setOverlayRef,className:this.buildClassName("overlay",$),style:n({},Re,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},et=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(et,K);return this.props.overlayElement(fn,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?` @@ -59,7 +59,7 @@ Error generating stack: `+i.message+` `+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={};/** +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(Rn,"__esModule",{value:!0});Rn.bodyOpenClassName=Rn.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 EO(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(wn(t.options.mutationKey)!==wn(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)||wn)(e)}function wn(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=>wn(t)===wn(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=>wn(t)===wn(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 * @@ -67,7 +67,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat * * 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)]}/** + */var vr=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=vr.useState,px=vr.useEffect,hx=vr.useLayoutEffect,mx=vr.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=vr.useSyncExternalStore!==void 0?vr.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. @@ -76,7 +76,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat * 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);/** + */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"?In(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 In(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"?In(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"?In(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=In(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. @@ -85,7 +85,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat * 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(()=>{});/** + */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(Dn),{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(Or),{matches:o}=v.useContext(Dn),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"?In(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(Dn.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(Dn.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(Dn);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=In(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(Or.Provider,{value:a},v.createElement(rl.Provider,{children:n,value:y}))}new Promise(()=>{});/** * React Router DOM v6.16.0 * * Copyright (c) Remix Software Inc. @@ -94,8 +94,8 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat * 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/Mihomo",version:t.version,link:"https://github.com/kkkgo/PaoPaoGateWay/discussions/33"}):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_};/** + */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=Er[$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(Or),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 CO(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 mn(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 yr(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(){lt(2)}function ll(e){return Object.isFrozen(e)}var c2={};function Ln(e){const t=c2[e];return t||lt(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&&(Ln("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),lt(4)),bn(e)&&(e=Ls(t,e),t.parent_||Ts(t,e)),t.patches_&&Ln("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_&&Ln("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function ap(e,t,n,r,o,i,s){if(wr(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),wr(a))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(bn(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=mn(e);if(!cu(n,t))return h2(e,n,t);const r=n[t];return e.finalized_||!bn(r)?r:r===Wl(e.base_,t)?(Vl(e),e.copy_[t]=mu(r,e)):r},has(e,t){return t in mn(e)},ownKeys(e){return Reflect.ownKeys(mn(e))},set(e,t,n){const r=Kg(mn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Wl(mn(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=mn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){lt(11)},getPrototypeOf(e){return yr(e.base_)},setPrototypeOf(){lt(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?mn(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=yr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=yr(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"&<(6),r!==void 0&&typeof r!="function"&<(7);let o;if(bn(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=[];Ln("Patches").generateReplacementPatches_(t,o,i,s),r(i,s)}return o}else lt(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){bn(e)||lt(8),wr(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_)&<(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=Ln("Patches").applyPatches_;return wr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function mu(e,t){const n=il(e)?Ln("MapSet").proxyMap_(e,t):sl(e)?Ln("MapSet").proxySet_(e,t):p2(e,t);return(t?t.scope_:Qg()).drafts_.push(n),n}function g2(e){return wr(e)||lt(10,e),qg(e)}function qg(e){if(!bn(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 kO(){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 Rr(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 er=!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(er)return $t;er=!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 er=!1},r=>{console.log("fetch /traffic error",r),er=!1}),$t}function fp(e){return t=>{t(`openModal:${e}`,n=>{n.modals[e]=!0})}}const A2={apiConfig:!1},PO=e=>e.configs.configs,F2=e=>e.configs.haveFetchedConfig,OO=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 RO(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,bO=e=>e.app.collapsibleIsOpen,LO=e=>e.app.proxySortBy,TO=e=>e.app.hideUnavailableProxies,H2=e=>e.app.autoCloseOldConns,NO=e=>e.app.logStreamingPaused,Q2=e2(Rr,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}),Rr(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}),Rr(n().app))}}function J2(e){return(t,n)=>{t("appSelectChartStyleIndex",r=>{r.app.selectedChartStyleIndex=Number(e)}),Rr(n().app)}}function dp(e,t){return(n,r)=>{n("appUpdateAppConfig",o=>{o.app[e]=t}),Rr(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/Mihomo",version:t.version,link:"https://github.com/kkkgo/PaoPaoGateWay/discussions/33"}):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,IO=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 DO(e){return t=>{t("logsUpdateSearchText",n=>{n.logs.searchText=e.toLowerCase()})}}function MO(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 AO(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,tr=e=>e.proxies.delay,FO=e=>e.proxies.groupNames,MC=e=>e.proxies.proxyProviders||[],AC=e=>e.proxies.dangleProxyNames,jO=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 br(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={...tr(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 UO(e,t){return async n=>{try{await fv(e,t)}catch{}n(br(e))}}function $O(e,t){return async n=>{for(let r=0;r{await zc(e,t),await n(br(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(br(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 BO(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={...tr(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={...tr(r()),[t]:{kind:"Result",number:s}}})}else n("set latency testing error",s=>{s.proxies.delay={...tr(r()),[t]:{kind:"Error",message:i.statusText}}})}catch(i){n("set latency testing networkish error",s=>{s.proxies.delay={...tr(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={...tr(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(br(e))}}function WO(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(br(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_(()=>Je(()=>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_}=Er,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",$n={TrafficNow:C_,sec:__},{useState:vv,useEffect:yv,useCallback:k_}=Er,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:$n.TrafficNow,children:[C.jsxs("div",{className:$n.sec,children:[C.jsx("div",{children:t("Upload")}),C.jsx("div",{children:n})]}),C.jsxs("div",{className:$n.sec,children:[C.jsx("div",{children:t("Download")}),C.jsx("div",{children:r})]}),C.jsxs("div",{className:$n.sec,children:[C.jsx("div",{children:t("Upload Total")}),C.jsx("div",{children:o})]}),C.jsxs("div",{className:$n.sec,children:[C.jsx("div",{children:t("Download Total")}),C.jsx("div",{children:i})]}),C.jsxs("div",{className:$n.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 @@ -104,10 +104,10 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat * 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;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 Mn(...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 Sr(...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 ar=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=Er["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 ar(()=>{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]),ar(()=>{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 ar(()=>{d.current=o,e.current!==i&&s(e.current)}),ar(()=>{i&&!l.current&&(l.current=!0,c(i.getBoundingClientRect()))},[i]),ar(()=>{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(()=>{ot({type:"REST"})},q_)}function Z_(){window.clearTimeout(xu)}var Eu;function ek(){window.clearTimeout(Eu),Eu=window.setTimeout(()=>ot({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=Mn(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"&&ot({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(){ot({type:"MOUSE_ENTER",id:w})}function S(){ot({type:"MOUSE_MOVE",id:w})}function b(){ot({type:"MOUSE_LEAVE"})}function L(){Ge.context.id===w&&ot({type:"MOUSE_DOWN"})}function D(){window.__REACH_DISABLE_TOOLTIPS||ot({type:"FOCUS",id:w})}function F(){Ge.context.id===w&&ot({type:"BLUR"})}function A(j){(j.key==="Enter"||j.key===" ")&&ot({type:"SELECT_WITH_KEYBOARD"})}return[{"aria-describedby":_?Sr("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:Sr("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=Mn(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']")||ot({type:"GLOBAL_MOUSE_MOVE"}))}return r.addEventListener("mousemove",o),()=>{r.removeEventListener("mousemove",o)}},[e,t,n])}function ot(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. +*/var yk=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Cu=yk.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},wk=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},Sk=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},xk=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Tv=function(t){return t.tagName==="INPUT"},Ek=function(t){return Tv(t)&&t.type==="hidden"},Ck=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},_k=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},bk=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)},Nk=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(xk).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=Sk([t],n.includeContainer,{filter:Op.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Tk}):r=wk(t,n.includeContainer,Op.bind(null,n)),Nk(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=Mk,unstable_observableRefs:o=[],...i},s){const l=v.useRef(null),a=Ds(l,{observe:!i.hidden}),u=Ds(n,{observe:!0}),c=Mn(l,s);return Fk(n,l),v.createElement(t,{"data-reach-popover":"",ref:c,...i,style:{position:"absolute",...Ik(r,u,a,...o),...i.style}})});Nv.displayName="PopoverImpl";function Ik(e,t,n,...r){return n?e(t,n,...r.map(o=>o.current)):{visibility:"hidden"}}function Dk(e,t,n){return{top:n?`${e.top-t.height+window.pageYOffset}px`:`${e.top+e.height+window.pageYOffset}px`}}var Mk=(e,t)=>{if(!e||!t)return{};const{directionRight:n,directionUp:r}=Ak(e,t);return{left:n?`${e.right-t.width+window.pageXOffset}px`:`${e.left+window.pageXOffset}px`,...Dk(e,t,r)}};function Ak(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 jk(e,t={}){const n=[];let r=v.createContext({descendants:n,registerDescendant:()=>Wc,...t});return r.displayName=e,r}function Uk(e,t,n){let r=xv(),{registerDescendant:o,descendants:i}=v.useContext(t),s=n??i.findIndex(l=>l.element===e.element);return ar(()=>(e.element||r(),o({...e,index:s})),[e,r,s,o,...Object.values(e)]),s}function $k(){return v.useState([])}function zk(e){return v.useContext(e).descendants}function Bk({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. @@ -117,11 +117,11 @@ 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 +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.`),Hk(a);let u=Vk(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 Wk(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 Vk(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 Hk(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",Qk="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=jk("DropdownDescendantContext"),[Kk,qo]=U_("Dropdown"),qk={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]=$k(),l=Ev(e),a=e||Sr("menu",l),u=Sr("menu-button",a),[c,d]=v.useReducer(tP,{...qk,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(Bk,{context:cl,items:i,set:s},v.createElement(Kk,{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=Mn(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:Sr("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 Gk=v.forwardRef(({as:e="button",...t},n)=>{let{props:r}=Fv({...t,ref:n});return v.createElement(e,{"data-reach-dropdown-trigger":"",...r})});Gk.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=Uk(T,cl,e),j=N===R&&!c,E=Mn(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 fn(){p.current=!0,!j&&N!=null&&!c&&w({type:Qt,payload:{index:N}})}function et(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,fn),onMouseUp:re(a,et)}}}var Yk=v.forwardRef(({as:e="div",...t},n)=>{let{props:r}=jv({...t,ref:n});return v.createElement(e,{"data-reach-dropdown-item":"",...r})});Yk.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=Mn(s,n);v.useEffect(()=>{let h=Zk(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}},Wk(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 Jk=v.forwardRef(({as:e="div",...t},n)=>{let{props:r}=Uv({...t,ref:n});return v.createElement(e,{"data-reach-dropdown-items":"",...r})});Jk.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=Mn(u,r);return v.useEffect(()=>{if(!c)return;let f=sn(u.current);function g(y){s.current?s.current=!1:eP(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 Xk=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})});Xk.displayName="DropdownPopover";function Zk(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?Sr(`option-${e}`,t):void 0}function Ms(e){e&&e.focus()}function eP(e,t){return!!(e&&e.contains(t))}function tP(e,t={}){switch(t.type){case Kc:return{...e,isExpanded:!1,selectionIndex:-1};case Do:return{...e,isExpanded:!1,selectionIndex:-1};case Qk: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 zk(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-eb3692a3.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-0c7d22e8.js"),["./Connections-0c7d22e8.js","./useRemainingViewPortHeight-ce18bed4.js","./index-11fa9a7f.js","./Modal.module-47c0e472.js","./Modal-86bce5c3.css","./Fab-2b20f5f3.js","./Fab-a434d836.css","./play-6985fb7d.js","./Connections-ddae4f70.css"],import.meta.url)),nO=br(()=>ct(()=>import("./Config-fcd0cbcf.js"),["./Config-fcd0cbcf.js","./logs-48ac7723.js","./Select-356cec5c.js","./Select-3de40504.css","./Config-cf41b8ef.css"],import.meta.url)),rO=br(()=>ct(()=>import("./Logs-80a8da2d.js"),["./Logs-80a8da2d.js","./index.esm-59b4ed5c.js","./logs-48ac7723.js","./debounce-c1ba2006.js","./useRemainingViewPortHeight-ce18bed4.js","./Fab-2b20f5f3.js","./Fab-a434d836.css","./play-6985fb7d.js","./Logs-5e5ee0ad.css"],import.meta.url)),oO=br(()=>ct(()=>import("./Proxies-749455d0.js"),["./Proxies-749455d0.js","./Modal.module-47c0e472.js","./Modal-86bce5c3.css","./Fab-2b20f5f3.js","./Fab-a434d836.css","./TextFilter-903faa94.js","./debounce-c1ba2006.js","./TextFilter-ced87fc6.css","./index-11fa9a7f.js","./Select-356cec5c.js","./Select-3de40504.css","./Proxies-40f80166.css"],import.meta.url)),iO=br(()=>ct(()=>import("./Rules-5a12d7c5.js"),["./Rules-5a12d7c5.js","./index.esm-59b4ed5c.js","./TextFilter-903faa94.js","./debounce-c1ba2006.js","./TextFilter-ced87fc6.css","./index-11fa9a7f.js","./Fab-2b20f5f3.js","./Fab-a434d836.css","./useRemainingViewPortHeight-ce18bed4.js","./Rules-e11cb70e.css"],import.meta.url)),sO=br(()=>ct(()=>import("./Rec-e0431c82.js"),["./Rec-e0431c82.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}; + */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 nP=Xo,rP=fl,oP=ei,iP=Go,sP=ri,lP=ni,aP=dl,uP=Jo,cP=Yo,fP=ti;q.ContextConsumer=Zo;q.ContextProvider=nP;q.Element=rP;q.ForwardRef=oP;q.Fragment=iP;q.Lazy=sP;q.Memo=lP;q.Portal=aP;q.Profiler=uP;q.StrictMode=cP;q.Suspense=fP;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 dP=Wv.exports,Gv=v.forwardRef(({as:e=v.Fragment,id:t,children:n,...r},o)=>{let s=v.useMemo(()=>{try{return dP.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 pP=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})));pP.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 hP(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=hP(()=>Je(()=>import("./index-6f81e651.js"),[],import.meta.url)),mP="_checkWrapper_1nrct_45",gP="_active_1nrct_51",bp={checkWrapper:mP,active:gP};function vP({theme:e,dispatch:t}){const{t:n}=Ao(),r=v.useMemo(()=>{switch(e){case"dark":return C.jsx(Lp,{});case"auto":return C.jsx(wP,{});case"light":return C.jsx(yP,{});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 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:"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 wP(){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 SP=e=>({theme:rv(e)}),xP=al(SP)(vP),EP="_root_r8ke8_1",CP="_logoPlaceholder_r8ke8_12",_P="_rows_r8ke8_21",kP="_row_r8ke8_21",PP="_rowActive_r8ke8_68",OP="_label_r8ke8_80",RP="_footer_r8ke8_97",bP="_iconWrapper_r8ke8_108",zt={root:EP,logoPlaceholder:CP,rows:_P,row:kP,rowActive:PP,label:OP,footer:RP,iconWrapper:bP},LP={activity:ck,globe:dk,command:mk,file:fk,settings:gk,link:pk,rec:hk,refresh:vk},TP=v.memo(function({isActive:t,to:n,iconId:r,labelText:o}){const i=LP[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})]})}),NP=[{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"},{to:"/refresh",iconId:"refresh",labelText:"Refresh"}];function IP(){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:NP.map(({to:n,iconId:r,labelText:o})=>C.jsx(TP,{to:n,isActive:t.pathname===n,iconId:r,labelText:e(o)},n))}),C.jsxs("div",{className:zt.footer,children:[C.jsx(xP,{}),C.jsx(Hc,{label:e("about"),children:C.jsx(jg,{to:"/about",className:zt.iconWrapper,children:C.jsx(ZE,{size:20})})})]})]})}const DP="_btn_lzu00_1",MP="_circular_lzu00_27",AP="_minimal_lzu00_30",FP="_btnStart_lzu00_48",jP="_loadingContainer_lzu00_55",Kr={btn:DP,circular:MP,minimal:AP,btnStart:FP,loadingContainer:jP},UP="_sectionNameType_1b9pp_1",$P="_loadingDot_1b9pp_66",zP="_dot2_1b9pp_1",BP="_dot1_1b9pp_1",WP="_dot3_1b9pp_1",ty={sectionNameType:UP,loadingDot:$P,dot2:zP,dot1:BP,dot3:WP};function HO({name:e,type:t}){return C.jsxs("h2",{className:ty.sectionNameType,children:[C.jsx("span",{children:e}),C.jsx("span",{children:t})]})}function VP(){return C.jsx("span",{className:ty.loadingDot})}const{forwardRef:HP,useCallback:QP}=Er;function KP(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=QP(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(VP,{})})]}):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 QO=HP(KP),qP="_toggle_g6vyf_1",GP="_input_g6vyf_12",YP="_track_g6vyf_16",KO={toggle:qP,input:GP,track:YP},JP="_input_1hkb4_1",qO={input:JP},XP="_animate_1w0e8_1",GO={animate:XP,"zap-pulse":"_zap-pulse_1w0e8_1"},ZP="_ToggleSwitch_10mtp_1",eO="_slider_10mtp_28",Np={ToggleSwitch:ZP,slider:eO};function tO({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(tO);const{lazy:An,Suspense:ny}=Er,nO=An(()=>Je(()=>import("./Connections-02211391.js"),["./Connections-02211391.js","./useRemainingViewPortHeight-8744ab77.js","./index-eaabf916.js","./Modal.module-82f3d3b0.js","./Modal-86bce5c3.css","./Fab-69d69ccd.js","./Fab-a434d836.css","./play-b167a438.js","./Connections-ddae4f70.css"],import.meta.url)),rO=An(()=>Je(()=>import("./Config-e784c537.js"),["./Config-e784c537.js","./logs-2b407e7b.js","./Select-f9db1f20.js","./Select-3de40504.css","./Config-cf41b8ef.css"],import.meta.url)),oO=An(()=>Je(()=>import("./Logs-a6169fcc.js"),["./Logs-a6169fcc.js","./index.esm-8c199dd8.js","./logs-2b407e7b.js","./debounce-c1ba2006.js","./useRemainingViewPortHeight-8744ab77.js","./Fab-69d69ccd.js","./Fab-a434d836.css","./play-b167a438.js","./Logs-5e5ee0ad.css"],import.meta.url)),iO=An(()=>Je(()=>import("./Proxies-ffbfc354.js"),["./Proxies-ffbfc354.js","./Modal.module-82f3d3b0.js","./Modal-86bce5c3.css","./Fab-69d69ccd.js","./Fab-a434d836.css","./TextFilter-a41408f7.js","./debounce-c1ba2006.js","./TextFilter-ced87fc6.css","./index-eaabf916.js","./Select-f9db1f20.js","./Select-3de40504.css","./Proxies-40f80166.css"],import.meta.url)),sO=An(()=>Je(()=>import("./Rules-057108c6.js"),["./Rules-057108c6.js","./index.esm-8c199dd8.js","./TextFilter-a41408f7.js","./debounce-c1ba2006.js","./TextFilter-ced87fc6.css","./index-eaabf916.js","./Fab-69d69ccd.js","./Fab-a434d836.css","./useRemainingViewPortHeight-8744ab77.js","./Rules-e11cb70e.css"],import.meta.url)),lO=An(()=>Je(()=>import("./Rec-8ac06f0b.js"),["./Rec-8ac06f0b.js","./Rec.module-c7e11c0c.js","./Rec-312c2e4e.css"],import.meta.url)),aO=An(()=>Je(()=>import("./Refresh-ca10886e.js"),["./Refresh-ca10886e.js","./Rec.module-c7e11c0c.js","./Rec-312c2e4e.css"],import.meta.url)),uO=[{path:"/",element:C.jsx(T_,{})},{path:"/connections",element:C.jsx(YC.Provider,{value:{hasProcessPath:!1},children:C.jsx(nO,{})})},{path:"/configs",element:C.jsx(rO,{})},{path:"/logs",element:C.jsx(oO,{})},{path:"/proxies",element:C.jsx(iO,{})},{path:"/rules",element:C.jsx(sO,{})},{path:"/rec",element:C.jsx(lO,{})},{path:"/refresh",element:C.jsx(aO,{})},{path:"/about",element:C.jsx(cC,{})},!1].filter(Boolean);function cO(){return Mg(uO)}function fO(){return C.jsxs(C.Fragment,{children:[C.jsx(IP,{}),C.jsx("div",{className:wv.content,children:C.jsx(ny,{fallback:C.jsx(D_,{}),children:C.jsx(cO,{})})})]})}function dO(){return Mg([{path:"*",element:C.jsx(fO,{})}])}function pO({children:e}){const[t]=qx(oC),n=Ho(wv.app,{pureBlackDark:t});return C.jsx("div",{className:n,children:e})}const hO=()=>C.jsx(a_,{children:C.jsx(_2,{initialState:KC,actions:qC,children:C.jsx(Ex,{client:mC,children:C.jsx(zE,{children:C.jsx(pO,{children:C.jsx(ny,{fallback:C.jsx(lv,{}),children:C.jsx(dO,{})})})})})})}),mO=!!(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 gO(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;mO?(vO(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 vO(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.")})}SO();const oy=document.getElementById("app"),yO=eg(oy);function wO(e){const t=document.createElement("link");t.href=e,t.rel="preload",t.as="font",t.crossOrigin="",document.head.appendChild(t)}function SO(){wO(Yp)}QS.setAppElement(oy);yO.render(C.jsx(v.StrictMode,{children:C.jsx(hO,{})}));setTimeout(()=>{Je(()=>import("./index.modern-c58ff412.js"),[],import.meta.url).then(e=>{e&&e.polyfillCountryFlagEmojis("Twemoji Country Flags",Yp)}).catch(()=>{})},1);gO();export{UO as $,DO as A,QO as B,Bg as C,MO as D,IO as E,OO as F,NO as G,_O as H,Be as I,CO as J,GO as K,HO as L,YC as M,VO as N,DC as O,qe as P,nk as Q,ie as R,gv as S,kv as T,pv as U,tr as V,BO as W,Hc as X,bO as Y,LO as Z,TO as _,QS as a,$O as a0,WO as a1,zO as a2,Yc as a3,H2 as a4,br as a5,FO as a6,MC as a7,jO as a8,KO as a9,Wo as aa,eu as ab,nx as ac,se as ad,EO 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,AO as d,Er as e,wu as f,Uc as g,h_ as h,wp as i,C as j,Sp as k,v_ as l,PO as m,j2 as n,fp as o,No as p,RO as q,v as r,qO as s,kO 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-11fa9a7f.js b/FILES/etc/config/clash/clash-dashboard/assets/index-eaabf916.js similarity index 99% rename from FILES/etc/config/clash/clash-dashboard/assets/index-11fa9a7f.js rename to FILES/etc/config/clash/clash-dashboard/assets/index-eaabf916.js index 739550e..14be74e 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/index-11fa9a7f.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/index-eaabf916.js @@ -1 +1 @@ -import{al as x}from"./index-1c8acccb.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(d=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=L.decode(r,{stream:!t});f+=l;const o=f.split(` +import{H as w,I as D,J as u}from"./index-97cd5f4b.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-6985fb7d.js b/FILES/etc/config/clash/clash-dashboard/assets/play-b167a438.js similarity index 97% rename from FILES/etc/config/clash/clash-dashboard/assets/play-6985fb7d.js rename to FILES/etc/config/clash/clash-dashboard/assets/play-b167a438.js index e07b806..7a47e3d 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/play-6985fb7d.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/play-b167a438.js @@ -1 +1 @@ -import{r as g,R as s,P as a}from"./index-1c8acccb.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-97cd5f4b.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/postcss.config.js b/FILES/etc/config/clash/clash-dashboard/assets/postcss.config.js new file mode 100644 index 0000000..6c73021 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/postcss.config.js @@ -0,0 +1,13 @@ +'use strict'; + +// '--breakpoint-not-small': 'screen and (min-width: 30em)', +// '--breakpoint-medium': 'screen and (min-width: 30em) and (max-width: 60em)', +// '--breakpoint-large': 'screen and (min-width: 60em)', + +module.exports = { + plugins: [ + require('postcss-import')(), + require('postcss-simple-vars')(), + require('autoprefixer')(), + ], +}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/sha.js b/FILES/etc/config/clash/clash-dashboard/assets/sha.js new file mode 100644 index 0000000..ddfd090 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/sha.js @@ -0,0 +1 @@ +!function(){"use strict";function t(t,i){i?(d[0]=d[16]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=d[9]=d[10]=d[11]=d[12]=d[13]=d[14]=d[15]=0,this.blocks=d):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=t}function i(i,r,s){var e,n=typeof i;if("string"===n){var o,a=[],u=i.length,c=0;for(e=0;e>6,a[c++]=128|63&o):o<55296||o>=57344?(a[c++]=224|o>>12,a[c++]=128|o>>6&63,a[c++]=128|63&o):(o=65536+((1023&o)<<10|1023&i.charCodeAt(++e)),a[c++]=240|o>>18,a[c++]=128|o>>12&63,a[c++]=128|o>>6&63,a[c++]=128|63&o);i=a}else{if("object"!==n)throw new Error(h);if(null===i)throw new Error(h);if(f&&i.constructor===ArrayBuffer)i=new Uint8Array(i);else if(!(Array.isArray(i)||f&&ArrayBuffer.isView(i)))throw new Error(h)}i.length>64&&(i=new t(r,!0).update(i).array());var y=[],p=[];for(e=0;e<64;++e){var l=i[e]||0;y[e]=92^l,p[e]=54^l}t.call(this,r,s),this.update(p),this.oKeyPad=y,this.inner=!0,this.sharedMemory=s}var h="input is invalid type",r="object"==typeof window,s=r?window:{};s.JS_SHA256_NO_WINDOW&&(r=!1);var e=!r&&"object"==typeof self,n=!s.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;n?s=global:e&&(s=self);var o=!s.JS_SHA256_NO_COMMON_JS&&"object"==typeof module&&module.exports,a="function"==typeof define&&define.amd,f=!s.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,u="0123456789abcdef".split(""),c=[-2147483648,8388608,32768,128],y=[24,16,8,0],p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=["hex","array","digest","arrayBuffer"],d=[];!s.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!f||!s.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var A=function(i,h){return function(r){return new t(h,!0).update(r)[i]()}},w=function(i){var h=A("hex",i);n&&(h=b(h,i)),h.create=function(){return new t(i)},h.update=function(t){return h.create().update(t)};for(var r=0;r>2]|=t[n]<>2]|=s<>2]|=(192|s>>6)<>2]|=(128|63&s)<=57344?(a[e>>2]|=(224|s>>12)<>2]|=(128|s>>6&63)<>2]|=(128|63&s)<>2]|=(240|s>>18)<>2]|=(128|s>>12&63)<>2]|=(128|s>>6&63)<>2]|=(128|63&s)<=64?(this.block=a[16],this.start=e-64,this.hash(),this.hashed=!0):this.start=e}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},t.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,i=this.lastByteIndex;t[16]=this.block,t[i>>2]|=c[3&i],this.block=t[16],i>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},t.prototype.hash=function(){var t,i,h,r,s,e,n,o,a,f=this.h0,u=this.h1,c=this.h2,y=this.h3,l=this.h4,d=this.h5,A=this.h6,w=this.h7,b=this.blocks;for(t=16;t<64;++t)i=((s=b[t-15])>>>7|s<<25)^(s>>>18|s<<14)^s>>>3,h=((s=b[t-2])>>>17|s<<15)^(s>>>19|s<<13)^s>>>10,b[t]=b[t-16]+i+b[t-7]+h<<0;for(a=u&c,t=0;t<64;t+=4)this.first?(this.is224?(e=300032,w=(s=b[0]-1413257819)-150054599<<0,y=s+24177077<<0):(e=704751109,w=(s=b[0]-210244248)-1521486534<<0,y=s+143694565<<0),this.first=!1):(i=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(e=f&u)^f&c^a,w=y+(s=w+(h=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&d^~l&A)+p[t]+b[t])<<0,y=s+(i+r)<<0),i=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),r=(n=y&f)^y&u^e,A=c+(s=A+(h=(w>>>6|w<<26)^(w>>>11|w<<21)^(w>>>25|w<<7))+(w&l^~w&d)+p[t+1]+b[t+1])<<0,i=((c=s+(i+r)<<0)>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),r=(o=c&y)^c&f^n,d=u+(s=d+(h=(A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7))+(A&w^~A&l)+p[t+2]+b[t+2])<<0,i=((u=s+(i+r)<<0)>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),r=(a=u&c)^u&y^o,l=f+(s=l+(h=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&A^~d&w)+p[t+3]+b[t+3])<<0,f=s+(i+r)<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+f<<0,this.h1=this.h1+u<<0,this.h2=this.h2+c<<0,this.h3=this.h3+y<<0,this.h4=this.h4+l<<0,this.h5=this.h5+d<<0,this.h6=this.h6+A<<0,this.h7=this.h7+w<<0},t.prototype.hex=function(){this.finalize();var t=this.h0,i=this.h1,h=this.h2,r=this.h3,s=this.h4,e=this.h5,n=this.h6,o=this.h7,a=u[t>>28&15]+u[t>>24&15]+u[t>>20&15]+u[t>>16&15]+u[t>>12&15]+u[t>>8&15]+u[t>>4&15]+u[15&t]+u[i>>28&15]+u[i>>24&15]+u[i>>20&15]+u[i>>16&15]+u[i>>12&15]+u[i>>8&15]+u[i>>4&15]+u[15&i]+u[h>>28&15]+u[h>>24&15]+u[h>>20&15]+u[h>>16&15]+u[h>>12&15]+u[h>>8&15]+u[h>>4&15]+u[15&h]+u[r>>28&15]+u[r>>24&15]+u[r>>20&15]+u[r>>16&15]+u[r>>12&15]+u[r>>8&15]+u[r>>4&15]+u[15&r]+u[s>>28&15]+u[s>>24&15]+u[s>>20&15]+u[s>>16&15]+u[s>>12&15]+u[s>>8&15]+u[s>>4&15]+u[15&s]+u[e>>28&15]+u[e>>24&15]+u[e>>20&15]+u[e>>16&15]+u[e>>12&15]+u[e>>8&15]+u[e>>4&15]+u[15&e]+u[n>>28&15]+u[n>>24&15]+u[n>>20&15]+u[n>>16&15]+u[n>>12&15]+u[n>>8&15]+u[n>>4&15]+u[15&n];return this.is224||(a+=u[o>>28&15]+u[o>>24&15]+u[o>>20&15]+u[o>>16&15]+u[o>>12&15]+u[o>>8&15]+u[o>>4&15]+u[15&o]),a},t.prototype.toString=t.prototype.hex,t.prototype.digest=function(){this.finalize();var t=this.h0,i=this.h1,h=this.h2,r=this.h3,s=this.h4,e=this.h5,n=this.h6,o=this.h7,a=[t>>24&255,t>>16&255,t>>8&255,255&t,i>>24&255,i>>16&255,i>>8&255,255&i,h>>24&255,h>>16&255,h>>8&255,255&h,r>>24&255,r>>16&255,r>>8&255,255&r,s>>24&255,s>>16&255,s>>8&255,255&s,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24&255,n>>16&255,n>>8&255,255&n];return this.is224||a.push(o>>24&255,o>>16&255,o>>8&255,255&o),a},t.prototype.array=t.prototype.digest,t.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),i=new DataView(t);return i.setUint32(0,this.h0),i.setUint32(4,this.h1),i.setUint32(8,this.h2),i.setUint32(12,this.h3),i.setUint32(16,this.h4),i.setUint32(20,this.h5),i.setUint32(24,this.h6),this.is224||i.setUint32(28,this.h7),t},(i.prototype=new t).finalize=function(){if(t.prototype.finalize.call(this),this.inner){this.inner=!1;var i=this.array();t.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(i),t.prototype.finalize.call(this)}};var B=w();B.sha256=B,B.sha224=w(!0),B.sha256.hmac=v(),B.sha224.hmac=v(!0),o?module.exports=B:(s.sha256=B.sha256,s.sha224=B.sha224,a&&define(function(){return B}))}(); \ No newline at end of file diff --git a/FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-ce18bed4.js b/FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-8744ab77.js similarity index 81% rename from FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-ce18bed4.js rename to FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-8744ab77.js index d259cf0..34d3dff 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-ce18bed4.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-8744ab77.js @@ -1 +1 @@ -import{e as r}from"./index-1c8acccb.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-97cd5f4b.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/assets/zh-38aa74cc.js b/FILES/etc/config/clash/clash-dashboard/assets/zh-38aa74cc.js new file mode 100644 index 0000000..5b4ece1 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/zh-38aa74cc.js @@ -0,0 +1 @@ +const e={Overview:"概览",Proxies:"代理",Rules:"规则",Rec:"记录",netrec:"网络流量记录",netrec_data:"请选择数据查阅方式:",netrec_data_no:"[提示] 该功能需要ppgw.ini的net_rec=yes",Refresh:"重载",refresh_title:"重新加载配置",refresh_tips:"手动重载刷新ppgw.ini、订阅等所有配置文件",confirm_refresh:"重载刷新所有配置可能引起网络中断,确认要马上重载吗?",refresh_success:"重载刷新任务已成功部署!",refresh_fail:"请求重载刷新失败,可能已有其他任务正在进行中",downcsv:"下载表格",loadonline:"在线网页加载",Conns:"连接",Config:"配置",Logs:"日志",Upload:"上传",Download:"下载","Upload Total":"上传总量","Download Total":"下载总量","Active Connections":"活动连接","Pause Refresh":"暂停刷新","Resume Refresh":"继续刷新",Up:"上传",Down:"下载","Test Latency":"延迟测速",settings:"设置",sort_in_grp:"代理组条目排序",hide_unavail_proxies:"隐藏不可用代理",auto_close_conns:"切换代理时自动断开旧连接",order_natural:"原 config 文件中的排序",order_latency_asc:"按延迟从小到大",order_latency_desc:"按延迟从大到小",order_name_asc:"按名称字母排序 (A-Z)",order_name_desc:"按名称字母排序 (Z-A)",Connections:"连接",current_backend:"当前后端",Active:"活动",switch_backend:"切换后端",Closed:"已断开",switch_theme:"切换主题",theme:"主题",about:"PaoPao GateWay",no_logs:"暂无日志...",chart_style:"流量图样式",latency_test_url:"延迟测速 URL",allow_lan_mixed:"允许局域网访问1080端口代理[http+socks5]",Mode:"模式(不明白请保持Global)",LogLevel:"日志等级",lang:"语言",update_all_rule_provider:"更新所有 rule provider",update_all_proxy_provider:"更新所有 proxy providers",dark_mode_pure_black_toggle_label:"在黑色主题下使用纯黑背景"};export{e as data}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/zh-39651f1e.js b/FILES/etc/config/clash/clash-dashboard/assets/zh-39651f1e.js deleted file mode 100644 index 70de151..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/zh-39651f1e.js +++ /dev/null @@ -1 +0,0 @@ -const e={Overview:"概览",Proxies:"代理",Rules:"规则",Rec:"记录",netrec:"网络流量记录",netrec_data:"请选择数据查阅方式:",netrec_data_no:"[提示] 该功能需要ppgw.ini的net_rec=yes",downcsv:"下载表格",loadonline:"在线网页加载",Conns:"连接",Config:"配置",Logs:"日志",Upload:"上传",Download:"下载","Upload Total":"上传总量","Download Total":"下载总量","Active Connections":"活动连接","Pause Refresh":"暂停刷新","Resume Refresh":"继续刷新",Up:"上传",Down:"下载","Test Latency":"延迟测速",settings:"设置",sort_in_grp:"代理组条目排序",hide_unavail_proxies:"隐藏不可用代理",auto_close_conns:"切换代理时自动断开旧连接",order_natural:"原 config 文件中的排序",order_latency_asc:"按延迟从小到大",order_latency_desc:"按延迟从大到小",order_name_asc:"按名称字母排序 (A-Z)",order_name_desc:"按名称字母排序 (Z-A)",Connections:"连接",current_backend:"当前后端",Active:"活动",switch_backend:"切换后端",Closed:"已断开",switch_theme:"切换主题",theme:"主题",about:"PaoPao GateWay",no_logs:"暂无日志...",chart_style:"流量图样式",latency_test_url:"延迟测速 URL",allow_lan_mixed:"允许局域网访问1080端口代理[http+socks5]",Mode:"模式(不明白请保持Global)",LogLevel:"日志等级",lang:"语言",update_all_rule_provider:"更新所有 rule provider",update_all_proxy_provider:"更新所有 proxy providers",dark_mode_pure_black_toggle_label:"在黑色主题下使用纯黑背景"};export{e as data}; diff --git a/FILES/etc/config/clash/clash-dashboard/index_base.html b/FILES/etc/config/clash/clash-dashboard/index_base.html index 917dafe..777f591 100644 --- a/FILES/etc/config/clash/clash-dashboard/index_base.html +++ b/FILES/etc/config/clash/clash-dashboard/index_base.html @@ -12,9 +12,7 @@ PaoPaoGateWay - PPGW_version - + - + diff --git a/FILES/etc/config/clash/clash-dashboard/net_rec_show.html b/FILES/etc/config/clash/clash-dashboard/net_rec_show.html index 5982006..f88d277 100644 --- a/FILES/etc/config/clash/clash-dashboard/net_rec_show.html +++ b/FILES/etc/config/clash/clash-dashboard/net_rec_show.html @@ -12,6 +12,7 @@ PaoPao GateWay - NET REC +