@nextclaw/ui 0.12.4 → 0.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/dist/assets/ChannelsList-D8p4OlM6.js +8 -0
- package/dist/assets/ChatPage-A45t1Rmf.js +58 -0
- package/dist/assets/DocBrowser-B2MpsnU9.js +1 -0
- package/dist/assets/{DocBrowser-NSzgVKka.js → DocBrowser-Cse_F8Nn.js} +1 -1
- package/dist/assets/{DocBrowserContext-DpgVdRgk.js → DocBrowserContext-Bai1WU2H.js} +1 -1
- package/dist/assets/{LogoBadge-CHS4YNLw.js → LogoBadge-BdxMPc9v.js} +1 -1
- package/dist/assets/MarketplacePage-BNZ3Jx5d.js +1 -0
- package/dist/assets/MarketplacePage-BbpAkllU.js +49 -0
- package/dist/assets/McpMarketplacePage-CxPFOgxv.js +40 -0
- package/dist/assets/ModelConfig-3GLqQ5GY.js +1 -0
- package/dist/assets/ProviderScopedModelInput-BYNouw-i.js +1 -0
- package/dist/assets/ProvidersList-BR1gJ4Dm.js +1 -0
- package/dist/assets/{RemoteAccessPage-yfbrveNQ.js → RemoteAccessPage-DyYVWsyK.js} +1 -1
- package/dist/assets/RuntimeConfig-ChdfK4Y_.js +1 -0
- package/dist/assets/SearchConfig-DTeJvp8m.js +1 -0
- package/dist/assets/{SecretsConfig-CLFSSoTl.js → SecretsConfig-CCYO6NcV.js} +2 -2
- package/dist/assets/SessionsConfig-Du39vDgt.js +2 -0
- package/dist/assets/app-query-client-Dr5d-K8d.js +1 -0
- package/dist/assets/{book-open-C7TAghTk.js → book-open-Da4OEPqB.js} +1 -1
- package/dist/assets/chat-session-display-CAlPrnlV.js +1 -0
- package/dist/assets/{chunk-JZWAC4HX-DbL4EmiT.js → chunk-JZWAC4HX-CoFVxHXV.js} +1 -1
- package/dist/assets/client-CSk58DcF.js +7 -0
- package/dist/assets/config-D8KzikVB.js +1 -0
- package/dist/assets/{createLucideIcon-BRLFtf-8.js → createLucideIcon-83gaZMtv.js} +1 -1
- package/dist/assets/desktop-update-config-CfoVwf-w.js +1 -0
- package/dist/assets/dist-aTmhMDVh.js +9 -0
- package/dist/assets/{dist-DP-JKR4G.js → dist-toEYs-MZ.js} +1 -1
- package/dist/assets/{external-link-BkJkiWbH.js → external-link-QQ0TC6X4.js} +1 -1
- package/dist/assets/{hash-CbP6-6R9.js → hash-DaFBEkmi.js} +1 -1
- package/dist/assets/i18n-C3jb83S6.js +1 -0
- package/dist/assets/index-CE4N7ItL.css +1 -0
- package/dist/assets/index-riX7Sg0_.js +6 -0
- package/dist/assets/infiniteQueryBehavior-BmHX_ayZ.js +1 -0
- package/dist/assets/loader-circle-BjMg63eu.js +1 -0
- package/dist/assets/{logos-N3dbS6-I.js → logos-Dzlz30M3.js} +1 -1
- package/dist/assets/{page-layout-DyuvlNrg.js → page-layout-D2eRufRQ.js} +1 -1
- package/dist/assets/plus-CIXME2pD.js +1 -0
- package/dist/assets/{popover-BKKWGUaG.js → popover-BSXxm5bj.js} +1 -1
- package/dist/assets/{refresh-ccw-BGMdiNGq.js → refresh-ccw-B3zMtN-_.js} +1 -1
- package/dist/assets/refresh-cw-DlZkIHnJ.js +1 -0
- package/dist/assets/{save-Dh4GQzzX.js → save-Us9fg4Sj.js} +1 -1
- package/dist/assets/search-B_Qr0f6C.js +1 -0
- package/dist/assets/security-config-BGWYwxNr.js +1 -0
- package/dist/assets/{select-BtIi5fnh.js → select-DLYqySQK.js} +1 -1
- package/dist/assets/skeleton-CYQJazv6.js +1 -0
- package/dist/assets/{status-dot-C4O-2jZP.js → status-dot-DGayudyB.js} +1 -1
- package/dist/assets/{switch-DPegGIa_.js → switch-Dz2ScsKx.js} +1 -1
- package/dist/assets/{tabs-custom-x5GZexrF.js → tabs-custom-CdKyjiGk.js} +1 -1
- package/dist/assets/{trash-2-CU3LYIpQ.js → trash-2-Db-mZOZs.js} +1 -1
- package/dist/assets/use-infinite-scroll-loader-DBJX5hj0.js +1 -0
- package/dist/assets/{useConfirmDialog-S5WsGOGf.js → useConfirmDialog-DL0a-oGC.js} +1 -1
- package/dist/assets/useMutation-BdZm-9PL.js +1 -0
- package/dist/assets/x-B8Tho_xC.js +1 -0
- package/dist/index.html +20 -18
- package/package.json +6 -6
- package/src/App.tsx +2 -0
- package/src/account/components/account-panel.tsx +46 -4
- package/src/account/managers/account.manager.ts +19 -4
- package/src/api/raw-client.test.ts +37 -0
- package/src/api/raw-client.ts +51 -8
- package/src/api/remote.ts +9 -0
- package/src/api/remote.types.ts +5 -0
- package/src/components/chat/ChatConversationPanel.test.tsx +344 -142
- package/src/components/chat/ChatSidebar.test.tsx +109 -4
- package/src/components/chat/ChatSidebar.tsx +62 -9
- package/src/components/chat/adapters/chat-message-tool-agent-id.test.ts +11 -11
- package/src/components/chat/adapters/chat-message.adapter.test.ts +43 -6
- package/src/components/chat/adapters/chat-message.session-request-tool-card.ts +182 -44
- package/src/components/chat/adapters/chat-message.session-spawn-tool-card.test.ts +104 -0
- package/src/components/chat/chat-child-session-panel.tsx +155 -59
- package/src/components/chat/chat-page-runtime.test.ts +16 -19
- package/src/components/chat/chat-session-preference-sync.test.ts +13 -0
- package/src/components/chat/chat-session-preference-sync.ts +9 -7
- package/src/components/chat/chat-sidebar-session-item.tsx +189 -121
- package/src/components/chat/containers/chat-message-list.container.test.tsx +21 -3
- package/src/components/chat/containers/chat-message-list.container.tsx +14 -0
- package/src/components/chat/hooks/use-chat-session-project.test.tsx +5 -5
- package/src/components/chat/hooks/use-chat-session-project.ts +0 -5
- package/src/components/chat/hooks/use-chat-session-update.test.tsx +75 -0
- package/src/components/chat/hooks/use-chat-session-update.ts +4 -2
- package/src/components/chat/managers/chat-session-list.manager.test.ts +79 -5
- package/src/components/chat/managers/chat-session-list.manager.ts +31 -4
- package/src/components/chat/ncp/NcpChatPage.tsx +32 -51
- package/src/components/chat/ncp/ncp-app-client-fetch.test.ts +1 -1
- package/src/components/chat/ncp/ncp-app-client-fetch.ts +45 -5
- package/src/components/chat/ncp/ncp-chat-input.manager.ts +3 -5
- package/src/components/chat/ncp/ncp-chat-page-data.ts +0 -1
- package/src/components/chat/ncp/ncp-chat.presenter.ts +1 -11
- package/src/components/chat/ncp/session-conversation/use-ncp-child-session-tabs-view.ts +35 -9
- package/src/components/chat/stores/chat-session-list.store.ts +99 -5
- package/src/components/chat/useChatSessionTypeState.test.tsx +0 -3
- package/src/components/chat/useChatSessionTypeState.ts +3 -5
- package/src/components/config/ChannelsList.test.tsx +68 -0
- package/src/components/config/ChannelsList.tsx +22 -4
- package/src/components/config/ProviderForm.tsx +9 -15
- package/src/components/config/ProvidersList.tsx +17 -3
- package/src/components/config/desktop-update-config.tsx +230 -0
- package/src/components/config/providers-list.test.tsx +68 -0
- package/src/components/layout/Sidebar.tsx +19 -14
- package/src/components/layout/sidebar.layout.test.tsx +33 -1
- package/src/components/marketplace/MarketplacePage.tsx +30 -30
- package/src/components/marketplace/marketplace-page-parts.tsx +16 -24
- package/src/components/marketplace/mcp/McpMarketplacePage.tsx +28 -26
- package/src/desktop/desktop-update.types.ts +36 -0
- package/src/desktop/managers/desktop-update.manager.ts +163 -0
- package/src/desktop/stores/desktop-update.store.ts +18 -0
- package/src/hooks/marketplace-list-pages.ts +27 -0
- package/src/hooks/use-infinite-scroll-loader.ts +88 -0
- package/src/hooks/useMarketplace.ts +14 -3
- package/src/hooks/useMcpMarketplace.ts +14 -3
- package/src/lib/desktop-update-labels.utils.ts +72 -0
- package/src/lib/i18n.chat.ts +13 -0
- package/src/lib/i18n.remote.ts +15 -0
- package/src/lib/i18n.ts +3 -9
- package/src/lib/ui-document-title.ts +1 -0
- package/src/transport/local.transport.ts +57 -18
- package/src/vite-env.d.ts +10 -0
- package/dist/assets/ChannelsList-CobWeI2V.js +0 -8
- package/dist/assets/ChatPage-ZIdFFVAv.js +0 -43
- package/dist/assets/DocBrowser-D55C0iyl.js +0 -1
- package/dist/assets/MarketplacePage-BFYsRss_.js +0 -49
- package/dist/assets/MarketplacePage-DII-q-Y1.js +0 -1
- package/dist/assets/McpMarketplacePage-CPqsGJzz.js +0 -40
- package/dist/assets/ModelConfig-Bvuo_IpS.js +0 -1
- package/dist/assets/ProviderScopedModelInput-BfY8rGsf.js +0 -1
- package/dist/assets/ProvidersList-3tlaqwSS.js +0 -1
- package/dist/assets/RuntimeConfig-CAd5Kta3.js +0 -1
- package/dist/assets/SearchConfig-DFwgaAa7.js +0 -1
- package/dist/assets/SessionsConfig-vYrvc2Fk.js +0 -2
- package/dist/assets/chat-session-display-5dVFkJyw.js +0 -1
- package/dist/assets/config-CMiW0yaK.js +0 -1
- package/dist/assets/dist-BFc_H-lY.js +0 -15
- package/dist/assets/i18n-C_2dKw6w.js +0 -1
- package/dist/assets/index-ChUXhq0G.css +0 -1
- package/dist/assets/index-DAE8Srx-.js +0 -6
- package/dist/assets/label-D8yyejJS.js +0 -1
- package/dist/assets/loader-circle-B0sKKO29.js +0 -1
- package/dist/assets/marketplace-localization-CxSTG9wr.js +0 -1
- package/dist/assets/plus-CYXs3JtZ.js +0 -1
- package/dist/assets/react-8EIEQjMP.js +0 -1
- package/dist/assets/search-DOsLw-P9.js +0 -1
- package/dist/assets/security-config-CM_tQRXQ.js +0 -1
- package/dist/assets/skeleton-GbHLjPC0.js +0 -1
- package/dist/assets/useMutation-DSinpgEq.js +0 -1
- package/dist/assets/x-Bnco_K8b.js +0 -1
- package/src/components/chat/ChatSessionsSidebar.tsx +0 -100
- /package/dist/assets/{config-hints-WtpHP_DW.js → config-hints-GSUMvmSo.js} +0 -0
- /package/dist/assets/{config-layout-LQ10ozRC.js → config-layout-CgBMG7OL.js} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{_ as e,m as t}from"./i18n-C_2dKw6w.js";var n=`modulepreload`,r=function(e){return`/`+e},i={},a=function(e,t,a){let o=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}o=l(t.map(t=>{if(t=r(t,a),t in i)return;i[t]=!0;let o=t.endsWith(`.css`),s=o?`[rel="stylesheet"]`:``;if(a)for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.href===t&&(!o||r.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${s}`))return;let l=document.createElement(`link`);if(l.rel=o?`stylesheet`:n,o||(l.as=`script`),l.crossOrigin=``,l.href=t,c&&l.setAttribute(`nonce`,c),document.head.appendChild(l),o)return new Promise((e,n)=>{l.addEventListener(`load`,e),l.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(t=>{for(let e of t||[])e.status===`rejected`&&s(e.reason);return e().catch(s)})},o=e(t(),1),s=`popstate`;function c(e={}){function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return p(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:m(t)}return g(t,n,null,e)}function l(e,t){if(e===!1||e==null)throw Error(t)}function u(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function d(){return Math.random().toString(36).substring(2,10)}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function p(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?h(t):t,state:n,key:t&&t.key||r||d()}}function m({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function h(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function g(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,c=`POP`,l=null,u=d();u??(u=0,o.replaceState({...o.state,idx:u},``));function d(){return(o.state||{idx:null}).idx}function m(){c=`POP`;let e=d(),t=e==null?null:e-u;u=e,l&&l({action:c,location:y.location,delta:t})}function h(e,t){c=`PUSH`;let r=p(y.location,e,t);n&&n(r,e),u=d()+1;let s=f(r,u),m=y.createHref(r);try{o.pushState(s,``,m)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(m)}a&&l&&l({action:c,location:y.location,delta:1})}function g(e,t){c=`REPLACE`;let r=p(y.location,e,t);n&&n(r,e),u=d();let i=f(r,u),s=y.createHref(r);o.replaceState(i,``,s),a&&l&&l({action:c,location:y.location,delta:0})}function v(e){return _(e)}let y={get action(){return c},get location(){return e(i,o)},listen(e){if(l)throw Error(`A history only accepts one active listener`);return i.addEventListener(s,m),l=e,()=>{i.removeEventListener(s,m),l=null}},createHref(e){return t(i,e)},createURL:v,encodeLocation(e){let t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:g,go(e){return o.go(e)}};return y}function _(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),l(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:m(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function v(e,t,n=`/`){return y(e,t,n,!1)}function y(e,t,n,r){let i=D((typeof t==`string`?h(t):t).pathname||`/`,n);if(i==null)return null;let a=x(e);C(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=le(i);o=se(a[e],t,r)}return o}function b(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function x(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;l(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let u=j([r,c.relativePath]),d=n.concat(c);e.children&&e.children.length>0&&(l(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),x(e.children,t,d,u,o)),!(e.path==null&&!e.index)&&t.push({path:u,score:ae(u,e.index),routesMeta:d})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of S(e.path))a(e,t,!0,n)}),t}function S(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=S(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function C(e){e.sort((e,t)=>e.score===t.score?oe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var w=/^:[\w-]+$/,T=3,ee=2,te=1,ne=10,re=-2,ie=e=>e===`*`;function ae(e,t){let n=e.split(`/`),r=n.length;return n.some(ie)&&(r+=re),t&&(r+=ee),n.filter(e=>!ie(e)).reduce((e,t)=>e+(w.test(t)?T:t===``?te:ne),r)}function oe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function se(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=E({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=E({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:j([a,u.pathname]),pathnameBase:me(j([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=j([a,u.pathnameBase]))}return o}function E(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ce(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ce(e,t=!1,n=!0){u(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=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function le(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return u(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function D(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)||`/`}var ue=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function de(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?h(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?fe(n.substring(1),`/`):fe(n,t)):a=t,{pathname:a,search:he(r),hash:ge(i)}}function fe(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function O(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 <Link to="..."> and the router will parse it for you.`}function pe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function k(e){let t=pe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function A(e,t,n,r=!1){let i;typeof e==`string`?i=h(e):(i={...e},l(!i.pathname||!i.pathname.includes(`?`),O(`?`,`pathname`,`search`,i)),l(!i.pathname||!i.pathname.includes(`#`),O(`#`,`pathname`,`hash`,i)),l(!i.search||!i.search.includes(`#`),O(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=de(i,s),u=o&&o!==`/`&&o.endsWith(`/`),d=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(u||d)&&(c.pathname+=`/`),c}var j=e=>e.join(`/`).replace(/\/\/+/g,`/`),me=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),he=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ge=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,_e=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ve(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ye(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var be=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function xe(e,t){let n=e;if(typeof n!=`string`||!ue.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(be)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=D(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{u(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Se=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Se);var Ce=[`GET`,...Se];new Set(Ce);var M=o.createContext(null);M.displayName=`DataRouter`;var N=o.createContext(null);N.displayName=`DataRouterState`;var we=o.createContext(!1),Te=o.createContext({isTransitioning:!1});Te.displayName=`ViewTransition`;var Ee=o.createContext(new Map);Ee.displayName=`Fetchers`;var De=o.createContext(null);De.displayName=`Await`;var P=o.createContext(null);P.displayName=`Navigation`;var F=o.createContext(null);F.displayName=`Location`;var I=o.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName=`Route`;var L=o.createContext(null);L.displayName=`RouteError`;var Oe=`REACT_ROUTER_ERROR`,ke=`REDIRECT`,Ae=`ROUTE_ERROR_RESPONSE`;function je(e){if(e.startsWith(`${Oe}:${ke}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Me(e){if(e.startsWith(`${Oe}:${Ae}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new _e(t.status,t.statusText,t.data)}catch{}}function Ne(e,{relative:t}={}){l(R(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=o.useContext(P),{hash:i,pathname:a,search:s}=V(e,{relative:t}),c=a;return n!==`/`&&(c=a===`/`?n:j([n,a])),r.createHref({pathname:c,search:s,hash:i})}function R(){return o.useContext(F)!=null}function z(){return l(R(),`useLocation() may be used only in the context of a <Router> component.`),o.useContext(F).location}var Pe=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Fe(e){o.useContext(P).static||o.useLayoutEffect(e)}function B(){let{isDataRoute:e}=o.useContext(I);return e?et():Ie()}function Ie(){l(R(),`useNavigate() may be used only in the context of a <Router> component.`);let e=o.useContext(M),{basename:t,navigator:n}=o.useContext(P),{matches:r}=o.useContext(I),{pathname:i}=z(),a=JSON.stringify(k(r)),s=o.useRef(!1);return Fe(()=>{s.current=!0}),o.useCallback((r,o={})=>{if(u(s.current,Pe),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=A(r,JSON.parse(a),i,o.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:j([t,c.pathname])),(o.replace?n.replace:n.push)(c,o.state,o)},[t,n,a,i,e])}o.createContext(null);function Le(){let{matches:e}=o.useContext(I),t=e[e.length-1];return t?t.params:{}}function V(e,{relative:t}={}){let{matches:n}=o.useContext(I),{pathname:r}=z(),i=JSON.stringify(k(n));return o.useMemo(()=>A(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Re(e,t){return ze(e,t)}function ze(e,t,n,r,i){l(R(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:a}=o.useContext(P),{matches:s}=o.useContext(I),c=s[s.length-1],d=c?c.params:{},f=c?c.pathname:`/`,p=c?c.pathnameBase:`/`,m=c&&c.route;{let e=m&&m.path||``;nt(f,!m||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
1
|
+
import{_ as e,m as t}from"./i18n-C3jb83S6.js";var n=`modulepreload`,r=function(e){return`/`+e},i={},a=function(e,t,a){let o=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}o=l(t.map(t=>{if(t=r(t,a),t in i)return;i[t]=!0;let o=t.endsWith(`.css`),s=o?`[rel="stylesheet"]`:``;if(a)for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.href===t&&(!o||r.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${s}`))return;let l=document.createElement(`link`);if(l.rel=o?`stylesheet`:n,o||(l.as=`script`),l.crossOrigin=``,l.href=t,c&&l.setAttribute(`nonce`,c),document.head.appendChild(l),o)return new Promise((e,n)=>{l.addEventListener(`load`,e),l.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(t=>{for(let e of t||[])e.status===`rejected`&&s(e.reason);return e().catch(s)})},o=e(t(),1),s=`popstate`;function c(e={}){function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return p(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:m(t)}return g(t,n,null,e)}function l(e,t){if(e===!1||e==null)throw Error(t)}function u(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function d(){return Math.random().toString(36).substring(2,10)}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function p(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?h(t):t,state:n,key:t&&t.key||r||d()}}function m({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function h(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function g(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,c=`POP`,l=null,u=d();u??(u=0,o.replaceState({...o.state,idx:u},``));function d(){return(o.state||{idx:null}).idx}function m(){c=`POP`;let e=d(),t=e==null?null:e-u;u=e,l&&l({action:c,location:y.location,delta:t})}function h(e,t){c=`PUSH`;let r=p(y.location,e,t);n&&n(r,e),u=d()+1;let s=f(r,u),m=y.createHref(r);try{o.pushState(s,``,m)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(m)}a&&l&&l({action:c,location:y.location,delta:1})}function g(e,t){c=`REPLACE`;let r=p(y.location,e,t);n&&n(r,e),u=d();let i=f(r,u),s=y.createHref(r);o.replaceState(i,``,s),a&&l&&l({action:c,location:y.location,delta:0})}function v(e){return _(e)}let y={get action(){return c},get location(){return e(i,o)},listen(e){if(l)throw Error(`A history only accepts one active listener`);return i.addEventListener(s,m),l=e,()=>{i.removeEventListener(s,m),l=null}},createHref(e){return t(i,e)},createURL:v,encodeLocation(e){let t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:g,go(e){return o.go(e)}};return y}function _(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),l(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:m(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function v(e,t,n=`/`){return y(e,t,n,!1)}function y(e,t,n,r){let i=D((typeof t==`string`?h(t):t).pathname||`/`,n);if(i==null)return null;let a=x(e);C(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=le(i);o=se(a[e],t,r)}return o}function b(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function x(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;l(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let u=j([r,c.relativePath]),d=n.concat(c);e.children&&e.children.length>0&&(l(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),x(e.children,t,d,u,o)),!(e.path==null&&!e.index)&&t.push({path:u,score:ae(u,e.index),routesMeta:d})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of S(e.path))a(e,t,!0,n)}),t}function S(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=S(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function C(e){e.sort((e,t)=>e.score===t.score?oe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var w=/^:[\w-]+$/,T=3,ee=2,te=1,ne=10,re=-2,ie=e=>e===`*`;function ae(e,t){let n=e.split(`/`),r=n.length;return n.some(ie)&&(r+=re),t&&(r+=ee),n.filter(e=>!ie(e)).reduce((e,t)=>e+(w.test(t)?T:t===``?te:ne),r)}function oe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function se(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=E({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=E({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:j([a,u.pathname]),pathnameBase:me(j([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=j([a,u.pathnameBase]))}return o}function E(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ce(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ce(e,t=!1,n=!0){u(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=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function le(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return u(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function D(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)||`/`}var ue=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function de(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?h(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?fe(n.substring(1),`/`):fe(n,t)):a=t,{pathname:a,search:he(r),hash:ge(i)}}function fe(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function O(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 <Link to="..."> and the router will parse it for you.`}function pe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function k(e){let t=pe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function A(e,t,n,r=!1){let i;typeof e==`string`?i=h(e):(i={...e},l(!i.pathname||!i.pathname.includes(`?`),O(`?`,`pathname`,`search`,i)),l(!i.pathname||!i.pathname.includes(`#`),O(`#`,`pathname`,`hash`,i)),l(!i.search||!i.search.includes(`#`),O(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=de(i,s),u=o&&o!==`/`&&o.endsWith(`/`),d=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(u||d)&&(c.pathname+=`/`),c}var j=e=>e.join(`/`).replace(/\/\/+/g,`/`),me=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),he=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ge=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,_e=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ve(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ye(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var be=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function xe(e,t){let n=e;if(typeof n!=`string`||!ue.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(be)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=D(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{u(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Se=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Se);var Ce=[`GET`,...Se];new Set(Ce);var M=o.createContext(null);M.displayName=`DataRouter`;var N=o.createContext(null);N.displayName=`DataRouterState`;var we=o.createContext(!1),Te=o.createContext({isTransitioning:!1});Te.displayName=`ViewTransition`;var Ee=o.createContext(new Map);Ee.displayName=`Fetchers`;var De=o.createContext(null);De.displayName=`Await`;var P=o.createContext(null);P.displayName=`Navigation`;var F=o.createContext(null);F.displayName=`Location`;var I=o.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName=`Route`;var L=o.createContext(null);L.displayName=`RouteError`;var Oe=`REACT_ROUTER_ERROR`,ke=`REDIRECT`,Ae=`ROUTE_ERROR_RESPONSE`;function je(e){if(e.startsWith(`${Oe}:${ke}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Me(e){if(e.startsWith(`${Oe}:${Ae}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new _e(t.status,t.statusText,t.data)}catch{}}function Ne(e,{relative:t}={}){l(R(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=o.useContext(P),{hash:i,pathname:a,search:s}=V(e,{relative:t}),c=a;return n!==`/`&&(c=a===`/`?n:j([n,a])),r.createHref({pathname:c,search:s,hash:i})}function R(){return o.useContext(F)!=null}function z(){return l(R(),`useLocation() may be used only in the context of a <Router> component.`),o.useContext(F).location}var Pe=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Fe(e){o.useContext(P).static||o.useLayoutEffect(e)}function B(){let{isDataRoute:e}=o.useContext(I);return e?et():Ie()}function Ie(){l(R(),`useNavigate() may be used only in the context of a <Router> component.`);let e=o.useContext(M),{basename:t,navigator:n}=o.useContext(P),{matches:r}=o.useContext(I),{pathname:i}=z(),a=JSON.stringify(k(r)),s=o.useRef(!1);return Fe(()=>{s.current=!0}),o.useCallback((r,o={})=>{if(u(s.current,Pe),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=A(r,JSON.parse(a),i,o.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:j([t,c.pathname])),(o.replace?n.replace:n.push)(c,o.state,o)},[t,n,a,i,e])}o.createContext(null);function Le(){let{matches:e}=o.useContext(I),t=e[e.length-1];return t?t.params:{}}function V(e,{relative:t}={}){let{matches:n}=o.useContext(I),{pathname:r}=z(),i=JSON.stringify(k(n));return o.useMemo(()=>A(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Re(e,t){return ze(e,t)}function ze(e,t,n,r,i){l(R(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:a}=o.useContext(P),{matches:s}=o.useContext(I),c=s[s.length-1],d=c?c.params:{},f=c?c.pathname:`/`,p=c?c.pathnameBase:`/`,m=c&&c.route;{let e=m&&m.path||``;nt(f,!m||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
2
2
|
|
|
3
3
|
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let g=z(),_;if(t){let e=typeof t==`string`?h(t):t;l(p===`/`||e.pathname?.startsWith(p),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${e.pathname}" was given in the \`location\` prop.`),_=e}else _=g;let y=_.pathname||`/`,b=y;if(p!==`/`){let e=p.replace(/^\//,``).split(`/`);b=`/`+y.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let x=v(e,{pathname:b});u(m||x!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),u(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let S=Ge(x&&x.map(e=>Object.assign({},e,{params:Object.assign({},d,e.params),pathname:j([p,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?p:j([p,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),s,n,r,i);return t&&S?o.createElement(F.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,..._},navigationType:`POP`}},S):S}function Be(){let e=$e(),t=ve(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=o.createElement(o.Fragment,null,o.createElement(`p`,null,`💿 Hey developer 👋`),o.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,o.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,o.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),o.createElement(o.Fragment,null,o.createElement(`h2`,null,`Unexpected Application Error!`),o.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?o.createElement(`pre`,{style:i},n):null,s)}var Ve=o.createElement(Be,null),He=class extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Me(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:o.createElement(I.Provider,{value:this.props.routeContext},o.createElement(L.Provider,{value:e,children:this.props.component}));return this.context?o.createElement(Ue,{error:e},t):t}};He.contextType=we;var H=new WeakMap;function Ue({children:e,error:t}){let{basename:n}=o.useContext(P);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=je(t.digest);if(e){let r=H.get(t);if(r)throw r;let i=xe(e.location,n);if(be&&!H.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw H.set(t,n),n}return o.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function We({routeContext:e,match:t,children:n}){let r=o.useContext(M);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),o.createElement(I.Provider,{value:e},n)}function Ge(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=n?.errors;if(s!=null){let e=a.findIndex(e=>e.route.id&&s?.[e.route.id]!==void 0);l(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,u=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){c=!0,a=u>=0?a.slice(0,u+1):[a[0]];break}}}let d=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:ye(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,i)=>{let l,f=!1,p=null,m=null;n&&(l=s&&r.route.id?s[r.route.id]:void 0,p=r.route.errorElement||Ve,c&&(u<0&&i===0?(nt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):u===i&&(f=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,i+1)),g=()=>{let t;return t=l?p:f?m:r.route.Component?o.createElement(r.route.Component,null):r.route.element?r.route.element:e,o.createElement(We,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?o.createElement(He,{location:n.location,revalidation:n.revalidation,component:p,error:l,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:d}):g()},null)}function U(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ke(e){let t=o.useContext(M);return l(t,U(e)),t}function qe(e){let t=o.useContext(N);return l(t,U(e)),t}function Je(e){let t=o.useContext(I);return l(t,U(e)),t}function Ye(e){let t=Je(e),n=t.matches[t.matches.length-1];return l(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Xe(){return Ye(`useRouteId`)}function Ze(){return qe(`useNavigation`).navigation}function Qe(){let{matches:e,loaderData:t}=qe(`useMatches`);return o.useMemo(()=>e.map(e=>b(e,t)),[e,t])}function $e(){let e=o.useContext(L),t=qe(`useRouteError`),n=Ye(`useRouteError`);return e===void 0?t.errors?.[n]:e}function et(){let{router:e}=Ke(`useNavigate`),t=Ye(`useNavigate`),n=o.useRef(!1);return Fe(()=>{n.current=!0}),o.useCallback(async(r,i={})=>{u(n.current,Pe),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var tt={};function nt(e,t,n){!t&&!tt[e]&&(tt[e]=!0,u(!1,n))}o.useOptimistic,o.memo(rt);function rt({routes:e,future:t,state:n,onError:r}){return ze(e,void 0,n,r,t)}function it({to:e,replace:t,state:n,relative:r}){l(R(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=o.useContext(P);u(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=o.useContext(I),{pathname:s}=z(),c=B(),d=A(e,k(a),s,r===`path`),f=JSON.stringify(d);return o.useEffect(()=>{c(JSON.parse(f),{replace:t,state:n,relative:r})},[c,f,r,t,n]),null}function at(e){l(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function ot({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:s}){l(!R(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),d=o.useMemo(()=>({basename:c,navigator:i,static:a,unstable_useTransitions:s,future:{}}),[c,i,a,s]);typeof n==`string`&&(n=h(n));let{pathname:f=`/`,search:p=``,hash:m=``,state:g=null,key:_=`default`}=n,v=o.useMemo(()=>{let e=D(f,c);return e==null?null:{location:{pathname:e,search:p,hash:m,state:g,key:_},navigationType:r}},[c,f,p,m,g,_,r]);return u(v!=null,`<Router basename="${c}"> is not able to match the URL "${f}${p}${m}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:o.createElement(P.Provider,{value:d},o.createElement(F.Provider,{children:t,value:v}))}function st({children:e,location:t}){return Re(W(e),t)}o.Component;function W(e,t=[]){let n=[];return o.Children.forEach(e,(e,r)=>{if(!o.isValidElement(e))return;let i=[...t,r];if(e.type===o.Fragment){n.push.apply(n,W(e.props.children,i));return}l(e.type===at,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),l(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=W(e.props.children,i)),n.push(a)}),n}var G=`get`,K=`application/x-www-form-urlencoded`;function q(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function ct(e){return q(e)&&e.tagName.toLowerCase()===`button`}function lt(e){return q(e)&&e.tagName.toLowerCase()===`form`}function ut(e){return q(e)&&e.tagName.toLowerCase()===`input`}function dt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ft(e,t){return e.button===0&&(!t||t===`_self`)&&!dt(e)}var J=null;function pt(){if(J===null)try{new FormData(document.createElement(`form`),0),J=!1}catch{J=!0}return J}var mt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Y(e){return e!=null&&!mt.has(e)?(u(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${K}"`),null):e}function ht(e,t){let n,r,i,a,o;if(lt(e)){let o=e.getAttribute(`action`);r=o?D(o,t):null,n=e.getAttribute(`method`)||G,i=Y(e.getAttribute(`enctype`))||K,a=new FormData(e)}else if(ct(e)||ut(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?D(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||G,i=Y(e.getAttribute(`formenctype`))||Y(o.getAttribute(`enctype`))||K,a=new FormData(o,e),!pt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(q(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=G,r=null,i=K,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var gt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},_t=/[&><\u2028\u2029]/g;function vt(e){return e.replace(_t,e=>gt[e])}function X(e,t){if(e===!1||e==null)throw Error(t)}function yt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&D(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function bt(e,t){if(e.id in t)return t[e.id];try{let n=await a(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function xt(e){return e!=null&&typeof e.page==`string`}function St(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Ct(e,t,n){return Ot((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await bt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(St).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function wt(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Tt(e,t,{includeHydrateFallback:n}={}){return Et(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Et(e){return[...new Set(e)]}function Dt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ot(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!xt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Dt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function kt(){let e=o.useContext(M);return X(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function At(){let e=o.useContext(N);return X(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Z=o.createContext(void 0);Z.displayName=`FrameworkContext`;function jt(){let e=o.useContext(Z);return X(e,`You must render this element inside a <HydratedRouter> element`),e}function Mt(e,t){let n=o.useContext(Z),[r,i]=o.useState(!1),[a,s]=o.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=o.useRef(null);o.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),o.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),s(!1)};return n?e===`intent`?[a,p,{onFocus:Q(c,m),onBlur:Q(l,h),onMouseEnter:Q(u,m),onMouseLeave:Q(d,h),onTouchStart:Q(f,m)}]:[a,p,{}]:[!1,p,{}]}function Q(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Nt({page:e,...t}){let{router:n}=kt(),r=o.useMemo(()=>v(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?o.createElement(Ft,{page:e,matches:r,...t}):null}function Pt(e){let{manifest:t,routeModules:n}=jt(),[r,i]=o.useState([]);return o.useEffect(()=>{let r=!1;return Ct(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ft({page:e,matches:t,...n}){let r=z(),{future:i,manifest:a,routeModules:s}=jt(),{basename:c}=kt(),{loaderData:l,matches:u}=At(),d=o.useMemo(()=>wt(e,t,u,a,r,`data`),[e,t,u,a,r]),f=o.useMemo(()=>wt(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let u=yt(e,c,i.unstable_trailingSlashAwareDataRequests,`data`);return o&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,i.unstable_trailingSlashAwareDataRequests,l,r,a,d,t,e,s]),m=o.useMemo(()=>Tt(f,a),[f,a]),h=Pt(f);return o.createElement(o.Fragment,null,p.map(e=>o.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>o.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>o.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function It(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}o.Component;var Lt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Lt&&(window.__reactRouterVersion=`7.13.0`)}catch{}function Rt({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=o.useRef();i.current??=c({window:r,v5Compat:!0});let a=i.current,[s,l]=o.useState({action:a.action,location:a.location}),u=o.useCallback(e=>{n===!1?l(e):o.startTransition(()=>l(e))},[n]);return o.useLayoutEffect(()=>a.listen(u),[a,u]),o.createElement(ot,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:a,unstable_useTransitions:n})}function zt({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=o.useState({action:n.action,location:n.location}),s=o.useCallback(e=>{r===!1?a(e):o.startTransition(()=>a(e))},[r]);return o.useLayoutEffect(()=>n.listen(s),[n,s]),o.createElement(ot,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}zt.displayName=`unstable_HistoryRouter`;var Bt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vt=o.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,unstable_useTransitions:g}=o.useContext(P),_=typeof l==`string`&&Bt.test(l),v=xe(l,h);l=v.to;let y=Ne(l,{relative:r}),[b,x,S]=Mt(n,p),C=Jt(l,{replace:a,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:g});function w(t){e&&e(t),t.defaultPrevented||C(t)}let T=o.createElement(`a`,{...p,...S,href:v.absoluteURL||y,onClick:v.isExternal||i?e:w,ref:It(m,x),target:c,"data-discover":!_&&t===`render`?`true`:void 0});return b&&!_?o.createElement(o.Fragment,null,T,o.createElement(Nt,{page:y})):T});Vt.displayName=`Link`;var Ht=o.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:s,children:c,...l},u){let d=V(a,{relative:l.relative}),f=z(),p=o.useContext(N),{navigator:m,basename:h}=o.useContext(P),g=p!=null&&rn(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=D(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let ee=typeof i==`function`?i(C):i;return o.createElement(Vt,{...l,"aria-current":w,className:T,ref:u,style:ee,to:a,viewTransition:s},typeof c==`function`?c(C):c)});Ht.displayName=`NavLink`;var Ut=o.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:s=G,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p,...m},h)=>{let{unstable_useTransitions:g}=o.useContext(P),_=Zt(),v=Qt(c,{relative:u}),y=s.toLowerCase()===`get`?`get`:`post`,b=typeof c==`string`&&Bt.test(c);return o.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute(`formmethod`)||s,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p});g&&n!==!1?o.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});Ut.displayName=`Form`;function Wt({getKey:e,storageKey:t,...n}){let r=o.useContext(Z),{basename:i}=o.useContext(P),a=z(),s=Qe();tn({getKey:e,storageKey:t});let c=o.useMemo(()=>{if(!r||!e)return null;let t=en(a,s,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let l=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return o.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${l})(${vt(JSON.stringify(t||$t))}, ${vt(JSON.stringify(c))})`}})}Wt.displayName=`ScrollRestoration`;function Gt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kt(e){let t=o.useContext(M);return l(t,Gt(e)),t}function qt(e){let t=o.useContext(N);return l(t,Gt(e)),t}function Jt(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=B(),d=z(),f=V(e,{relative:a});return o.useCallback(p=>{if(ft(p,t)){p.preventDefault();let t=n===void 0?m(d)===m(f):n,h=()=>u(e,{replace:t,state:r,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:c});l?o.startTransition(()=>h()):h()}},[d,u,f,n,r,t,e,i,a,s,c,l])}var Yt=0,Xt=()=>`__${String(++Yt)}__`;function Zt(){let{router:e}=Kt(`useSubmit`),{basename:t}=o.useContext(P),n=Xe(),r=e.fetch,i=e.navigate;return o.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ht(e,t);a.navigate===!1?await r(a.fetcherKey||Xt(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Qt(e,{relative:t}={}){let{basename:n}=o.useContext(P),r=o.useContext(I);l(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...V(e||`.`,{relative:t})},s=z();if(e==null){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:j([n,a.pathname])),m(a)}var $t=`react-router-scroll-positions`,$={};function en(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:D(e.pathname,n)||e.pathname},t)),i??=e.key,i}function tn({getKey:e,storageKey:t}={}){let{router:n}=Kt(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=qt(`useScrollRestoration`),{basename:a}=o.useContext(P),s=z(),c=Qe(),l=Ze();o.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),nn(o.useCallback(()=>{if(l.state===`idle`){let t=en(s,c,a,e);$[t]=window.scrollY}try{sessionStorage.setItem(t||$t,JSON.stringify($))}catch(e){u(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[l.state,e,a,s,c,t])),typeof document<`u`&&(o.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||$t);e&&($=JSON.parse(e))}catch{}},[t]),o.useLayoutEffect(()=>{let t=n?.enableScrollRestoration($,()=>window.scrollY,e?(t,n)=>en(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),o.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{u(!1,`"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[s,r,i]))}function nn(e,t){let{capture:n}=t||{};o.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function rn(e,{relative:t}={}){let n=o.useContext(Te);l(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Kt(`useViewTransitionState`),i=V(e,{relative:t});if(!n.isTransitioning)return!1;let a=D(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=D(n.nextLocation.pathname,r)||n.nextLocation.pathname;return E(i.pathname,s)!=null||E(i.pathname,a)!=null}export{st as a,Le as c,at as i,a as l,Ht as n,z as o,it as r,B as s,Rt as t};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{_ as e,m as t,p as n}from"./i18n-C3jb83S6.js";var r=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},i={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},a=new class{#e=i;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function o(e){setTimeout(e,0)}var s=typeof window>`u`||`Deno`in globalThis;function c(){}function l(e,t){return typeof e==`function`?e(t):e}function u(e){return typeof e==`number`&&e>=0&&e!==1/0}function d(e,t){return Math.max(e+(t||0)-Date.now(),0)}function f(e,t){return typeof e==`function`?e(t):e}function p(e,t){return typeof e==`function`?e(t):e}function m(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==g(o,t.options))return!1}else if(!v(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function h(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(_(t.options.mutationKey)!==_(a))return!1}else if(!v(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function g(e,t){return(t?.queryKeyHashFn||_)(e)}function _(e){return JSON.stringify(e,(e,t)=>C(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function v(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>v(e[n],t[n])):!1}var y=Object.prototype.hasOwnProperty;function b(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=S(e)&&S(t);if(!r&&!(C(e)&&C(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:y.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=b(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function x(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function S(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function C(e){if(!w(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!w(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function w(e){return Object.prototype.toString.call(e)===`[object Object]`}function ee(e){return new Promise(t=>{a.setTimeout(t,e)})}function T(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:b(e,t)}function te(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ne(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var E=Symbol();function re(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===E?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function D(e,t){return typeof e==`function`?e(...t):!!e}function ie(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var O=new class extends r{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!s&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function k(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var ae=o;function oe(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ae,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var A=oe(),j=new class extends r{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!s&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function se(e){return Math.min(1e3*2**e,3e4)}function M(e){return(e??`online`)===`online`?j.isOnline():!0}var N=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function P(e){let t=!1,n=0,r,i=k(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new N(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>O.isFocused()&&(e.networkMode===`always`||j.isOnline())&&e.canRun(),d=()=>M(e.networkMode)&&e.canRun(),f=e=>{a()||(r?.(),i.resolve(e))},p=e=>{a()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(a()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),h=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(a())return;let i=e.retry??(s?0:3),o=e.retryDelay??se,c=typeof o==`function`?o(n,r):o,l=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!l){p(r);return}n++,e.onFail?.(n,r),ee(c).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),i)}}var ce=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),u(this.gcTime)&&(this.#e=a.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(s?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(a.clearTimeout(this.#e),void 0)}},le=class extends ce{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=I(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=I(this.options);e.data!==void 0&&(this.setState(F(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=T(this.state.data,e,this.options);return this.#s({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(c).catch(c):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>p(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===E||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>f(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!d(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=re(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=P({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof N&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#s({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#s({type:`pause`})},onContinue:()=>{this.#s({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof N){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#s({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#s(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ue(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...F(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),A.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function ue(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:M(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function F(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function I(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,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`:`pending`,fetchStatus:`idle`}}var L=class extends r{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=k(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),R(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return z(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return z(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof p(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!x(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&B(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||p(this.options.enabled,this.#t)!==p(t.enabled,this.#t)||f(this.options.staleTime,this.#t)!==f(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||p(this.options.enabled,this.#t)!==p(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return fe(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(c)),t}#g(){this.#b();let e=f(this.options.staleTime,this.#t);if(s||this.#r.isStale||!u(e))return;let t=d(this.#r.dataUpdatedAt,e)+1;this.#d=a.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(s||p(this.options.enabled,this.#t)===!1||!u(this.#p)||this.#p===0)&&(this.#f=a.setInterval(()=>{(this.options.refetchIntervalInBackground||O.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(a.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(a.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&R(e,t),o=i&&B(e,n,t,r);(a||o)&&(l={...l,...ue(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:m,status:h}=l;d=l.data;let g=!1;if(t.placeholderData!==void 0&&d===void 0&&h===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(h=`success`,d=T(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!g)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=T(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,m=Date.now(),h=`error`);let _=l.fetchStatus===`fetching`,v=h===`pending`,y=h===`error`,b=v&&_,x=d!==void 0,S={status:h,fetchStatus:l.fetchStatus,isPending:v,isSuccess:h===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:m,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:V(e,t),refetch:this.refetch,promise:this.#o,isEnabled:p(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{i(this.#o=S.promise=k())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!x(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){A.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function de(e,t){return p(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function R(e,t){return de(e,t)||e.state.data!==void 0&&z(e,t,t.refetchOnMount)}function z(e,t,n){if(p(t.enabled,e)!==!1&&f(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&V(e,t)}return!1}function B(e,t,n,r){return(e!==t||p(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&V(e,n)}function V(e,t){return p(t.enabled,e)!==!1&&e.isStaleByTime(f(t.staleTime,e))}function fe(e,t){return!x(e.getCurrentResult(),t)}var pe=class extends ce{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||H(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=P({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),A.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function H(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var U=e(t(),1),me=n(),W=U.createContext(void 0),G=e=>{let t=U.useContext(W);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},he=({client:e,children:t})=>(U.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,me.jsx)(W.Provider,{value:e,children:t})),K=U.createContext(!1),ge=()=>U.useContext(K);K.Provider;function _e(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ve=U.createContext(_e()),ye=()=>U.useContext(ve),be=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?D(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},xe=e=>{U.useEffect(()=>{e.clearReset()},[e])},Se=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||D(n,[e.error,r])),Ce=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},we=(e,t)=>e.isLoading&&e.isFetching&&!t,Te=(e,t)=>e?.suspense&&t.isPending,q=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function J(e,t,n){let r=ge(),i=ye(),a=G(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let l=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,Ce(o),be(o,i,l),xe(i);let u=!a.getQueryCache().get(o.queryHash),[d]=U.useState(()=>new t(a,o)),f=d.getOptimisticResult(o),p=!r&&e.subscribed!==!1;if(U.useSyncExternalStore(U.useCallback(e=>{let t=p?d.subscribe(A.batchCalls(e)):c;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),U.useEffect(()=>{d.setOptions(o)},[o,d]),Te(o,f))throw q(o,d,i);if(Se({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!s&&we(f,r)&&(u?q(o,d,i):l?.promise)?.catch(c).finally(()=>{d.updateResult()}),o.notifyOnChangeProps?f:d.trackResult(f)}function Ee(e,t){return J(e,L,t)}var De=`http://127.0.0.1:55667`,Y=(()=>{let e=(void 0)?.trim();return e?e.replace(/\/$/,``):typeof window<`u`&&window.location?.origin?window.location.origin:De})();function Oe(e){return e.replace(/\s+/g,` `).trim().slice(0,200)}function ke(e,t){if(t===404&&e.startsWith(`/api/config/providers/`)&&e.endsWith(`/test`))return`Provider test endpoint is missing. This usually means nextclaw runtime version is outdated.`;if(t===401||t===403)return`Authentication failed. Check apiKey and custom headers.`;if(t===429)return`Rate limited by upstream provider. Retry later or switch model/provider.`;if(t>=500)return`Upstream service error. Retry later and inspect server logs if it persists.`}function Ae(e){if(e instanceof Error){let t=e.name?.trim()||`Error`,n=e.message?.trim()||`Unknown error`;return{summary:`${t}: ${n}`,details:{errorName:t,errorMessage:n,...e.stack?.trim()?{errorStack:e.stack.trim()}:{}}}}return{summary:String(e??`Unknown error`),details:{errorName:`NonError`,errorMessage:String(e??`Unknown error`)}}}async function je(e,t={}){let n=`${Y}${e}`,r=(t.method||`GET`).toUpperCase(),i;try{i=await fetch(n,{credentials:`include`,headers:{"Content-Type":`application/json`,...t.headers},...t})}catch(t){let i=Ae(t);return{ok:!1,error:{code:`NETWORK_ERROR`,message:`Fetch failed on ${r} ${e} | ${i.summary}`,details:{method:r,endpoint:e,url:n,...i.details}}}}let a=await i.text(),o=null;if(a)try{o=JSON.parse(a)}catch{}if(!o){let t=a?Oe(a):``,o=ke(e,i.status),s=[`Non-JSON response (${i.status} ${i.statusText}) on ${r} ${e}`];return t&&s.push(`body=${t}`),o&&s.push(`hint=${o}`),{ok:!1,error:{code:`INVALID_RESPONSE`,message:s.join(` | `),details:{status:i.status,statusText:i.statusText,method:r,endpoint:e,url:n,bodySnippet:t||void 0,hint:o}}}}return i.ok,o}function Me(e){let t=e.split(`
|
|
2
|
+
`),n=``,r=[];for(let e of t){let t=e.trimEnd();if(!(!t||t.startsWith(`:`))){if(t.startsWith(`event:`)){n=t.slice(6).trim();continue}t.startsWith(`data:`)&&r.push(t.slice(5).trimStart())}}if(!n)return null;let i,a=r.join(`
|
|
3
|
+
`);if(a)try{i=JSON.parse(a)}catch{i=a}return{name:n,payload:i}}function Ne(e,t,n){let r=Me(e);r&&(r.name===`final`&&n(r.payload),t(r))}function Pe(e,t,n){let r=e.value.indexOf(`
|
|
4
|
+
|
|
5
|
+
`);for(;r!==-1;)Ne(e.value.slice(0,r),t,n),e.value=e.value.slice(r+2),r=e.value.indexOf(`
|
|
6
|
+
|
|
7
|
+
`)}async function Fe(e,t){let n=e.body?.getReader();if(!n)throw Error(`SSE response body unavailable`);let r=new TextDecoder,i={value:``},a;try{for(;;){let{value:e,done:o}=await n.read();if(o)break;i.value+=r.decode(e,{stream:!0}),Pe(i,t,e=>{a=e})}i.value.trim()&&Ne(i.value,t,e=>{a=e})}finally{n.releaseLock()}return a}function Ie(e,t){let n=e.replace(/\/$/,``);try{let e=new URL(n,window.location.origin);return`${e.protocol===`https:`?`wss:`:e.protocol===`http:`?`ws:`:e.protocol}//${e.host}${t}`}catch{return n.startsWith(`wss://`)||n.startsWith(`ws://`)?`${n}${t}`:n.startsWith(`https://`)?`${n.replace(/^https:/,`wss:`)}${t}`:n.startsWith(`http://`)?`${n.replace(/^http:/,`ws:`)}${t}`:`${n}${t}`}}function Le(e,t){return e.ok?Error(t):Error(e.error.message)}function Re(e){if(e instanceof Error){let t=e.name?.trim(),n=e.message?.trim();return t&&n?`${t}: ${n}`:n||t||`Unknown error`}return String(e??`Unknown error`)}function ze(e,t){let n=Error(e);return t!==void 0&&(n.cause=t),n}var Be=class{constructor(e){this.wsUrl=e,this.socket=null,this.reconnectTimer=null,this.manualClose=!1,this.subscribers=new Set}subscribe(e){return this.subscribers.add(e),this.subscribers.size===1?this.connect():this.socket?.readyState===WebSocket.OPEN&&e({type:`connection.open`,payload:{}}),()=>{this.subscribers.delete(e),this.subscribers.size===0&&this.disconnect()}}emit(e){for(let t of this.subscribers)t(e)}connect(){if(this.socket&&(this.socket.readyState===WebSocket.CONNECTING||this.socket.readyState===WebSocket.OPEN))return;this.manualClose=!1;let e=new WebSocket(this.wsUrl);this.socket=e,e.onopen=()=>{this.emit({type:`connection.open`,payload:{}})},e.onmessage=e=>{try{let t=JSON.parse(String(e.data??``));this.emit(t)}catch(e){console.error(`Failed to parse websocket message:`,e)}},e.onerror=()=>{this.emit({type:`connection.error`,payload:{message:`websocket error`}})},e.onclose=()=>{this.emit({type:`connection.close`,payload:{}}),this.socket=null,!this.manualClose&&this.subscribers.size>0&&this.scheduleReconnect()}}scheduleReconnect(){this.reconnectTimer===null&&(this.reconnectTimer=window.setTimeout(()=>{this.reconnectTimer=null,this.connect()},3e3))}disconnect(){this.manualClose=!0,this.reconnectTimer!==null&&(window.clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.socket?.close(),this.socket=null}},X=class{constructor(e={}){this.options=e,this.request=async e=>{let t=Number.isFinite(e.timeoutMs)&&(e.timeoutMs??0)>0?Math.trunc(e.timeoutMs):null,n=t?new AbortController:null,r=t?window.setTimeout(()=>n?.abort(`Request timed out after ${t}ms: ${e.method} ${e.path}`),t):null;try{let t=await je(e.path,{method:e.method,...e.body===void 0?{}:{body:JSON.stringify(e.body)},...n?{signal:n.signal}:{}});if(!t.ok)throw Le(t,`Request failed for ${e.method} ${e.path}`);return t.data}catch(t){if(n?.signal.aborted){let t=n.signal.reason;throw Error(typeof t==`string`&&t.trim()?t:`Request timed out: ${e.method} ${e.path}`)}throw t instanceof Error?t:ze(`Request failed for ${e.method} ${e.path} | ${Re(t)}`,t)}finally{r!==null&&window.clearTimeout(r)}},this.openStream=e=>{let t=new AbortController,n=()=>t.abort();return e.signal&&(e.signal.aborted?n():e.signal.addEventListener(`abort`,n,{once:!0})),{finished:(async()=>{let r;try{r=await fetch(`${this.apiBase}${e.path}`,{method:e.method,credentials:`include`,headers:{"Content-Type":`application/json`,Accept:`text/event-stream`},...e.body===void 0?{}:{body:JSON.stringify(e.body)},signal:t.signal})}catch(t){throw ze(`Stream request failed for ${e.method} ${e.path} | ${Re(t)}`,t)}if(!r.ok){let t=(await r.text()).trim();throw Error(t?`Stream request failed for ${e.method} ${e.path} | HTTP ${r.status} | ${t}`:`Stream request failed for ${e.method} ${e.path} | HTTP ${r.status}`)}try{return await Fe(r,e.onEvent)}finally{e.signal?.removeEventListener(`abort`,n)}})(),cancel:()=>t.abort()}},this.subscribe=e=>this.realtimeGateway.subscribe(e),this.apiBase=e.apiBase??Y,this.realtimeGateway=new Be(Ie(this.apiBase,e.wsPath??`/ws`))}};function Ve(e,t,n){if(typeof e==`object`&&e&&`ok`in e){let t=e;if(t.ok===!1&&t.error?.message)return Error(t.error.message);if(t.ok===!0)return Error(n)}return typeof e==`string`&&e.trim()?Error(e.trim()):Error(`${n} (${t})`)}function He(e){if(typeof e==`object`&&e&&`ok`in e){let t=e;if(t.ok===!1)throw Error(t.error?.message??`Remote request failed.`);if(t.ok===!0)return t.data}return e}function Ue(e){return`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}var We=15e3,Z=class{constructor(e,t=Y){this.runtime=e,this.apiBase=t,this.socket=null,this.connectPromise=null,this.connectTimeoutId=null,this.reconnectTimer=null,this.manualClose=!1,this.subscribers=new Set,this.pendingRequests=new Map,this.pendingStreams=new Map}async request(e){await this.ensureSocket();let t=Ue(`req`),n=Number.isFinite(e.timeoutMs)&&(e.timeoutMs??0)>0?Math.trunc(e.timeoutMs):We;return await new Promise((r,i)=>{let a=window.setTimeout(()=>{this.pendingRequests.delete(t),i(Error(`Timed out waiting for remote request response after ${n}ms: ${e.method} ${e.path}`))},n);this.pendingRequests.set(t,{resolve:e=>r(e),reject:i,timeoutId:a}),this.send({type:`request`,id:t,target:{method:e.method,path:e.path,...e.body===void 0?{}:{body:e.body}}})})}openStream(e){let t=Ue(`stream`),n=!1,r=e=>{n||(n=!0,a(e))},i,a,o=new Promise((e,t)=>{i=e,a=t}),s=()=>{this.pendingStreams.delete(t),!n&&(n=!0,this.send({type:`stream.cancel`,streamId:t}),a(Error(`stream cancelled`)))};this.pendingStreams.set(t,{onEvent:e.onEvent,finalResult:void 0,resolve:e=>{n||(n=!0,i(e))},reject:e=>{n||(n=!0,a(e))}});let c=()=>s();return e.signal&&(e.signal.aborted?s():e.signal.addEventListener(`abort`,c,{once:!0})),this.ensureSocket().then(()=>{n||this.send({type:`stream.open`,streamId:t,target:{method:e.method,path:e.path,...e.body===void 0?{}:{body:e.body}}})}).catch(e=>{this.pendingStreams.delete(t),r(e instanceof Error?e:Error(String(e)))}),{finished:o.finally(()=>{e.signal?.removeEventListener(`abort`,c),this.pendingStreams.delete(t)}),cancel:s}}subscribe(e){return this.subscribers.add(e),this.ensureSocket().catch(t=>{e({type:`connection.error`,payload:{message:t instanceof Error?t.message:String(t)}})}),()=>{this.subscribers.delete(e)}}emit(e){for(let t of this.subscribers)t(e)}send(e){if(!this.socket||this.socket.readyState!==WebSocket.OPEN)throw Error(`Remote transport websocket is not connected.`);this.socket.send(JSON.stringify(e))}async ensureSocket(){if(this.socket?.readyState===WebSocket.OPEN&&this.connectPromise===null)return;if(this.connectPromise)return await this.connectPromise;let e=Ie(this.apiBase,this.runtime.wsPath);return this.manualClose=!1,this.connectPromise=new Promise((t,n)=>{let r=new WebSocket(e);this.socket=r;let i=!1,a=()=>{this.connectTimeoutId!==null&&(window.clearTimeout(this.connectTimeoutId),this.connectTimeoutId=null)};this.connectTimeoutId=window.setTimeout(()=>{this.connectTimeoutId=null,n(Error(`Timed out waiting for remote transport websocket.`)),r.close()},8e3),r.onopen=()=>{i=!0,a(),this.connectPromise=null,t(),this.emit({type:`connection.open`,payload:{}})},r.onmessage=e=>{try{let t=JSON.parse(String(e.data??``));if(t.type===`connection.ready`)return;this.handleFrame(t)}catch(e){console.error(`Failed to parse remote websocket frame:`,e)}},r.onerror=()=>{this.emit({type:`connection.error`,payload:{message:`remote websocket error`}})},r.onclose=()=>{a();let e=this.connectPromise!==null;this.socket=null,this.connectPromise=null,this.failPendingWork(Error(`Remote transport connection closed.`)),this.emit({type:`connection.close`,payload:{}}),e&&!i&&n(Error(`Remote transport connection closed before ready.`)),!this.manualClose&&this.subscribers.size>0&&this.scheduleReconnect()}}),await this.connectPromise}scheduleReconnect(){this.reconnectTimer===null&&(this.reconnectTimer=window.setTimeout(()=>{this.reconnectTimer=null,this.ensureSocket().catch(()=>void 0)},3e3))}failPendingWork(e){for(let t of this.pendingRequests.values())window.clearTimeout(t.timeoutId),t.reject(e);this.pendingRequests.clear();for(let t of this.pendingStreams.values())t.reject(e);this.pendingStreams.clear()}handleFrame(e){if(e.type===`response`||e.type===`request.error`){this.handleRequestFrame(e);return}if(e.type===`stream.event`||e.type===`stream.end`||e.type===`stream.error`){this.handleStreamFrame(e);return}if(e.type===`event`){this.emit(e.event);return}e.type===`connection.error`&&this.emit({type:`connection.error`,payload:{message:e.message}})}handleRequestFrame(e){let t=this.pendingRequests.get(e.id);if(t){if(this.pendingRequests.delete(e.id),window.clearTimeout(t.timeoutId),e.type===`request.error`){t.reject(Error(e.message));return}if(e.status>=400){t.reject(Ve(e.body,e.status,`Remote request failed.`));return}try{t.resolve(He(e.body))}catch(e){t.reject(e instanceof Error?e:Error(String(e)))}}}handleStreamFrame(e){let t=this.pendingStreams.get(e.streamId);if(t){if(e.type===`stream.event`){try{e.event===`final`&&(t.finalResult=e.payload),t.onEvent({name:e.event,payload:e.payload})}catch(n){this.pendingStreams.delete(e.streamId),t.reject(n instanceof Error?n:Error(String(n)))}return}if(this.pendingStreams.delete(e.streamId),e.type===`stream.end`){t.resolve(t.finalResult);return}t.reject(Error(e.message))}}},Ge=`/_remote/runtime`,Q={mode:`remote`,protocolVersion:1,wsPath:`/_remote/ws`};async function Ke(e){let t=`${e.replace(/\/$/,``)}${Ge}`,n;try{n=await fetch(t,{method:`GET`,credentials:`include`,cache:`no-store`})}catch{return new X({apiBase:e})}if(n.status===404)return new X({apiBase:e});if(!(n.headers.get(`content-type`)?.toLowerCase()??``).includes(`application/json`))return n.status>=400?new Z(Q,e):new X({apiBase:e});let r=null;try{r=await n.json()}catch{return n.status>=400?new Z(Q,e):new X({apiBase:e})}return n.ok&&r.ok&&r.data?.mode===`remote`?new Z(r.data,e):n.status>=400?new Z(Q,e):new X({apiBase:e})}var qe=new class{constructor(e=Y){this.apiBase=e,this.transportPromise=null}async getTransport(){return this.transportPromise||=Ke(this.apiBase),await this.transportPromise}async request(e){return await(await this.getTransport()).request(e)}openStream(e){let t=null,n,r,i=new Promise((e,t)=>{n=e,r=t});return this.getTransport().then(i=>{t=i.openStream(e),t.finished.then(n).catch(e=>{r(e instanceof Error?e:Error(String(e)))})}).catch(e=>{r(e instanceof Error?e:Error(String(e)))}),{finished:i,cancel:()=>t?.cancel()}}subscribe(e){let t=()=>{},n=!0;return this.getTransport().then(r=>{n&&(t=r.subscribe(e))}).catch(t=>{e({type:`connection.error`,payload:{message:t instanceof Error?t.message:String(t)}})}),()=>{n=!1,t()}}};async function $(e,t={}){let n=(t.method||`GET`).toUpperCase();try{return{ok:!0,data:await qe.request({method:n,path:e,...t.timeoutMs===void 0?{}:{timeoutMs:t.timeoutMs},...t.body===void 0?{}:{body:Ye(t.body)}})}}catch(t){return{ok:!1,error:{code:`REQUEST_FAILED`,message:t instanceof Error?t.message:String(t),details:{method:n,endpoint:e}}}}}var Je={get:(e,t={})=>$(e,{...t,method:`GET`}),put:(e,t)=>$(e,{method:`PUT`,body:JSON.stringify(t)}),post:(e,t)=>$(e,{method:`POST`,body:JSON.stringify(t)}),delete:e=>$(e,{method:`DELETE`})};function Ye(e){if(e!=null){if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}}export{r as A,m as C,x as D,f as E,D as O,h as S,v as T,ne as _,J as a,_ as b,pe as c,le as d,j as f,te as g,ie as h,Ee as i,E as k,H as l,O as m,qe as n,he as o,A as p,Y as r,G as s,Je as t,L as u,re as v,c as w,g as x,l as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./client-CSk58DcF.js";async function t(t={}){let n=await e.get(`/api/auth/status`,{timeoutMs:t.timeoutMs??5e3});if(!n.ok)throw Error(n.error.message);return n.data}async function n(t){let n=await e.post(`/api/auth/setup`,t);if(!n.ok)throw Error(n.error.message);return n.data}async function r(t){let n=await e.post(`/api/auth/login`,t);if(!n.ok)throw Error(n.error.message);return n.data}async function i(){let t=await e.post(`/api/auth/logout`,{});if(!t.ok)throw Error(t.error.message);return t.data}async function a(t){let n=await e.put(`/api/auth/password`,t);if(!n.ok)throw Error(n.error.message);return n.data}async function o(t){let n=await e.put(`/api/auth/enabled`,t);if(!n.ok)throw Error(n.error.message);return n.data}async function s(){let t=await e.get(`/api/app/meta`);if(!t.ok)throw Error(t.error.message);return t.data}async function c(){let t=await e.get(`/api/config`);if(!t.ok)throw Error(t.error.message);return t.data}async function l(){let t=await e.get(`/api/config/meta`);if(!t.ok)throw Error(t.error.message);return t.data}async function u(){let t=await e.get(`/api/config/schema`);if(!t.ok)throw Error(t.error.message);return t.data}async function d(t){let n=await e.put(`/api/config/model`,t);if(!n.ok)throw Error(n.error.message);return n.data}async function f(t){let n=await e.put(`/api/config/search`,t);if(!n.ok)throw Error(n.error.message);return n.data}async function p(t,n){let r=await e.put(`/api/config/providers/${t}`,n);if(!r.ok)throw Error(r.error.message);return r.data}async function m(t={}){let n=await e.post(`/api/config/providers`,t);if(!n.ok)throw Error(n.error.message);return n.data}async function h(t){let n=await e.delete(`/api/config/providers/${t}`);if(!n.ok)throw Error(n.error.message);return n.data}async function g(t,n){let r=await e.post(`/api/config/providers/${t}/test`,n);if(!r.ok)throw Error(r.error.message);return r.data}async function _(t,n={}){let r=await e.post(`/api/config/providers/${t}/auth/start`,n);if(!r.ok)throw Error(r.error.message);return r.data}async function v(t,n){let r=await e.post(`/api/config/providers/${t}/auth/poll`,n);if(!r.ok)throw Error(r.error.message);return r.data}async function y(t){let n=await e.post(`/api/config/providers/${t}/auth/import-cli`,{});if(!n.ok)throw Error(n.error.message);return n.data}async function b(t,n){let r=await e.put(`/api/config/channels/${t}`,n);if(!r.ok)throw Error(r.error.message);return r.data}async function x(t){let n=await e.put(`/api/config/runtime`,t);if(!n.ok)throw Error(n.error.message);return n.data}async function S(t){let n=await e.put(`/api/config/secrets`,t);if(!n.ok)throw Error(n.error.message);return n.data}async function C(t,n){let r=await e.post(`/api/config/actions/${t}/execute`,n);if(!r.ok)throw Error(r.error.message);return r.data}async function w(){let t=await e.get(`/api/ncp/session-types`);if(!t.ok)throw Error(t.error.message);return t.data}async function T(t){let n=new URLSearchParams;t?.all&&n.set(`all`,`1`);let r=n.toString(),i=await e.get(r?`/api/cron?`+r:`/api/cron`);if(!i.ok)throw Error(i.error.message);return i.data}async function E(t){let n=await e.delete(`/api/cron/${encodeURIComponent(t)}`);if(!n.ok)throw Error(n.error.message);return n.data}async function D(t,n){let r=await e.put(`/api/cron/${encodeURIComponent(t)}/enable`,n);if(!r.ok)throw Error(r.error.message);return r.data}async function O(t,n){let r=await e.post(`/api/cron/${encodeURIComponent(t)}/run`,n);if(!r.ok)throw Error(r.error.message);return r.data}export{b as C,f as D,x as E,S as O,a as S,p as T,D as _,s as a,g as b,l as c,w as d,y as f,O as g,v as h,C as i,u as l,i as m,E as n,t as o,r as p,h as r,c as s,m as t,T as u,n as v,d as w,o as x,_ as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,m as t}from"./i18n-
|
|
1
|
+
import{_ as e,m as t}from"./i18n-C3jb83S6.js";var n=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),r=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),i={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},a=e(t()),o=(0,a.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:s=``,children:c,iconNode:l,...u},d)=>(0,a.createElement)(`svg`,{ref:d,...i,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:r(`lucide`,s),...u},[...l.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(c)?c:[c]])),s=(e,t)=>{let i=(0,a.forwardRef)(({className:i,...s},c)=>(0,a.createElement)(o,{ref:c,iconNode:t,className:r(`lucide-${n(e)}`,i),...s}));return i.displayName=`${e}`,i};export{s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,i as t,m as n,n as r,p as i,u as a}from"./i18n-C3jb83S6.js";import{n as o,r as s}from"./dist-aTmhMDVh.js";import{t as c}from"./createLucideIcon-83gaZMtv.js";import{t as l}from"./external-link-QQ0TC6X4.js";import{t as u}from"./refresh-cw-DlZkIHnJ.js";import{G as d,J as f,K as p,W as m,Z as h,_t as g,et as _,q as v}from"./index-riX7Sg0_.js";import{n as y,t as b}from"./page-layout-D2eRufRQ.js";import{t as x}from"./switch-Dz2ScsKx.js";var S=c(`RotateCw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),C=e(n(),1),w=h(()=>({supported:!1,initialized:!1,busyAction:null,snapshot:null})),T=new class{constructor(){this.unsubscribe=null,this.start=async()=>{let e=this.getDesktopApi();if(!e){w.setState({supported:!1,initialized:!0,snapshot:null});return}this.unsubscribe||=e.onUpdateStateChanged(e=>{w.setState({supported:!0,initialized:!0,snapshot:e})}),w.setState({supported:!0,initialized:!1});try{let t=await e.getUpdateState();w.setState({supported:!0,initialized:!0,snapshot:t})}catch(e){w.setState({supported:!0,initialized:!0}),o.error(`${t(`desktopUpdatesLoadFailed`)}: ${this.getErrorMessage(e)}`)}},this.stop=()=>{this.unsubscribe?.(),this.unsubscribe=null},this.checkForUpdates=async()=>{let e;try{e=await this.runSnapshotCommand(`checking`,t(`desktopUpdatesCheckFailed`),async e=>await e.checkForUpdates())}catch{return}if(e.status===`up-to-date`){o.success(t(`desktopUpdatesAlreadyLatest`));return}if(e.status===`update-available`){o.success(t(`desktopUpdatesAvailable`).replace(`{version}`,e.availableVersion??t(`desktopUpdatesUnknownVersion`)));return}if(e.status===`downloaded`){o.success(t(`desktopUpdatesReadyToApply`));return}e.status===`failed`&&e.errorMessage&&o.error(e.errorMessage)},this.downloadUpdate=async()=>{let e;try{e=await this.runSnapshotCommand(`downloading`,t(`desktopUpdatesDownloadFailed`),async e=>await e.downloadUpdate())}catch{return}e.status===`downloaded`&&o.success(t(`desktopUpdatesReadyToApply`))},this.applyDownloadedUpdate=async()=>{try{await this.runSnapshotCommand(`applying`,t(`desktopUpdatesApplyFailed`),async e=>await e.applyDownloadedUpdate())}catch{return}},this.updatePreferences=async e=>{try{await this.runSnapshotCommand(`saving-preferences`,t(`desktopUpdatesPreferencesFailed`),async t=>await t.updatePreferences(e))}catch{return}},this.runSnapshotCommand=async(e,n,r)=>{let i=this.getDesktopApi();if(!i)throw Error(t(`desktopUpdatesDesktopOnlyDescription`));w.setState({busyAction:e});try{let e=await r(i);return w.setState({snapshot:e}),e}catch(e){throw o.error(`${n}: ${this.getErrorMessage(e)}`),e}finally{w.setState({busyAction:null})}},this.getDesktopApi=()=>typeof window>`u`?null:window.nextclawDesktop??null,this.getErrorMessage=e=>e instanceof Error?e.message:t(`error`)}},E=i();function D(e){return e?.trim()||`-`}function O(e){return e?r(e):`-`}function k(e){return t(e===`checking`?`desktopUpdatesStatusChecking`:e===`update-available`?`desktopUpdatesStatusAvailable`:e===`downloading`?`desktopUpdatesStatusDownloading`:e===`downloaded`?`desktopUpdatesStatusDownloaded`:e===`up-to-date`?`desktopUpdatesStatusUpToDate`:e===`failed`?`desktopUpdatesStatusFailed`:`desktopUpdatesStatusIdle`)}function A(e){return e===`downloaded`?`bg-emerald-50 text-emerald-700 ring-emerald-100`:e===`update-available`||e===`downloading`||e===`checking`?`bg-amber-50 text-amber-700 ring-amber-100`:e===`failed`?`bg-red-50 text-red-700 ring-red-100`:`bg-gray-100 text-gray-700 ring-gray-200`}function j(){let{supported:e,initialized:n,busyAction:r,snapshot:i}=w();if((0,C.useEffect)(()=>(T.start(),()=>{T.stop()}),[]),!n)return(0,E.jsx)(`div`,{className:`p-8 text-gray-400`,children:t(`loading`)});if(!e||!i)return(0,E.jsxs)(y,{className:`space-y-6`,children:[(0,E.jsx)(b,{title:t(`desktopUpdatesPageTitle`),description:t(`desktopUpdatesPageDescription`)}),(0,E.jsxs)(m,{children:[(0,E.jsxs)(v,{children:[(0,E.jsx)(f,{children:t(`desktopUpdatesDesktopOnlyTitle`)}),(0,E.jsx)(p,{children:t(`desktopUpdatesDesktopOnlyDescription`)})]}),(0,E.jsx)(d,{children:(0,E.jsx)(`p`,{className:`text-sm text-gray-500`,children:t(`desktopUpdatesDesktopOnlyFutureHint`)})})]})]});let o=r===`checking`,c=r===`downloading`,h=r===`applying`,j=r===`saving-preferences`,M=i.status===`update-available`&&!c&&!h,N=i.status===`downloaded`&&!h;return(0,E.jsxs)(y,{className:`space-y-6`,children:[(0,E.jsx)(b,{title:t(`desktopUpdatesPageTitle`),description:t(`desktopUpdatesPageDescription`),actions:(0,E.jsxs)(s,{variant:`outline`,onClick:()=>void T.checkForUpdates(),disabled:o||c||h,children:[(0,E.jsx)(u,{className:a(`mr-2 h-4 w-4`,o&&`animate-spin`)}),t(`desktopUpdatesCheckNow`)]})}),(0,E.jsxs)(m,{children:[(0,E.jsxs)(v,{children:[(0,E.jsx)(f,{children:t(`desktopUpdatesOverviewTitle`)}),(0,E.jsx)(p,{children:t(`desktopUpdatesOverviewDescription`)})]}),(0,E.jsxs)(d,{className:`space-y-5`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,E.jsx)(`span`,{className:`text-sm font-medium text-gray-700`,children:t(`desktopUpdatesStatusLabel`)}),(0,E.jsx)(`span`,{className:a(`inline-flex rounded-full px-3 py-1 text-xs font-medium ring-1`,A(i.status)),children:k(i.status)})]}),(0,E.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2 xl:grid-cols-4`,children:[(0,E.jsxs)(`div`,{className:`rounded-xl border border-gray-200 bg-gray-50/60 p-4`,children:[(0,E.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-[0.08em] text-gray-500`,children:t(`desktopUpdatesLauncherVersion`)}),(0,E.jsx)(`p`,{className:`mt-2 text-base font-semibold text-gray-900`,children:D(i.launcherVersion)})]}),(0,E.jsxs)(`div`,{className:`rounded-xl border border-gray-200 bg-gray-50/60 p-4`,children:[(0,E.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-[0.08em] text-gray-500`,children:t(`desktopUpdatesCurrentBundleVersion`)}),(0,E.jsx)(`p`,{className:`mt-2 text-base font-semibold text-gray-900`,children:D(i.currentVersion)})]}),(0,E.jsxs)(`div`,{className:`rounded-xl border border-gray-200 bg-gray-50/60 p-4`,children:[(0,E.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-[0.08em] text-gray-500`,children:t(`desktopUpdatesAvailableVersion`)}),(0,E.jsx)(`p`,{className:`mt-2 text-base font-semibold text-gray-900`,children:D(i.availableVersion)})]}),(0,E.jsxs)(`div`,{className:`rounded-xl border border-gray-200 bg-gray-50/60 p-4`,children:[(0,E.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-[0.08em] text-gray-500`,children:t(`desktopUpdatesLastCheckedAt`)}),(0,E.jsx)(`p`,{className:`mt-2 text-base font-semibold text-gray-900`,children:O(i.lastCheckedAt)})]})]}),i.downloadedVersion?(0,E.jsxs)(`div`,{className:`rounded-2xl border border-emerald-200 bg-emerald-50/70 p-4`,children:[(0,E.jsx)(`p`,{className:`text-sm font-semibold text-emerald-800`,children:t(`desktopUpdatesDownloadedBannerTitle`)}),(0,E.jsx)(`p`,{className:`mt-1 text-sm text-emerald-700`,children:t(`desktopUpdatesDownloadedBannerDescription`).replace(`{version}`,i.downloadedVersion)})]}):null,i.errorMessage?(0,E.jsx)(`div`,{className:`rounded-2xl border border-red-200 bg-red-50/70 p-4 text-sm text-red-700`,children:i.errorMessage}):null]})]}),(0,E.jsxs)(m,{children:[(0,E.jsxs)(v,{children:[(0,E.jsx)(f,{children:t(`desktopUpdatesPreferencesTitle`)}),(0,E.jsx)(p,{children:t(`desktopUpdatesPreferencesDescription`)})]}),(0,E.jsxs)(d,{className:`space-y-5`,children:[(0,E.jsxs)(`div`,{className:`flex items-start justify-between gap-4 rounded-xl border border-gray-200 p-4`,children:[(0,E.jsxs)(`div`,{className:`space-y-1`,children:[(0,E.jsx)(_,{children:t(`desktopUpdatesAutomaticChecks`)}),(0,E.jsx)(`p`,{className:`text-sm text-gray-500`,children:t(`desktopUpdatesAutomaticChecksHelp`)})]}),(0,E.jsx)(x,{checked:i.preferences.automaticChecks,disabled:j,onCheckedChange:e=>void T.updatePreferences({automaticChecks:e})})]}),(0,E.jsxs)(`div`,{className:`flex items-start justify-between gap-4 rounded-xl border border-gray-200 p-4`,children:[(0,E.jsxs)(`div`,{className:`space-y-1`,children:[(0,E.jsx)(_,{children:t(`desktopUpdatesAutoDownload`)}),(0,E.jsx)(`p`,{className:`text-sm text-gray-500`,children:t(`desktopUpdatesAutoDownloadHelp`)})]}),(0,E.jsx)(x,{checked:i.preferences.autoDownload,disabled:j,onCheckedChange:e=>void T.updatePreferences({autoDownload:e})})]})]})]}),(0,E.jsxs)(m,{children:[(0,E.jsxs)(v,{children:[(0,E.jsx)(f,{children:t(`desktopUpdatesActionsTitle`)}),(0,E.jsx)(p,{children:t(`desktopUpdatesActionsDescription`)})]}),(0,E.jsxs)(d,{className:`flex flex-wrap items-center gap-3`,children:[(0,E.jsxs)(s,{variant:`outline`,onClick:()=>void T.checkForUpdates(),disabled:o||c||h,children:[(0,E.jsx)(u,{className:a(`mr-2 h-4 w-4`,o&&`animate-spin`)}),t(`desktopUpdatesCheckNow`)]}),(0,E.jsxs)(s,{onClick:()=>void T.downloadUpdate(),disabled:!M,children:[(0,E.jsx)(g,{className:a(`mr-2 h-4 w-4`,c&&`animate-bounce`)}),t(`desktopUpdatesDownloadNow`)]}),(0,E.jsxs)(s,{variant:`secondary`,onClick:()=>void T.applyDownloadedUpdate(),disabled:!N,children:[(0,E.jsx)(S,{className:a(`mr-2 h-4 w-4`,h&&`animate-spin`)}),t(`desktopUpdatesApplyNow`)]}),i.releaseNotesUrl?(0,E.jsxs)(s,{variant:`ghost`,onClick:()=>window.open(i.releaseNotesUrl??``,`_blank`,`noopener,noreferrer`),children:[(0,E.jsx)(l,{className:`mr-2 h-4 w-4`}),t(`desktopUpdatesReleaseNotes`)]}):null]})]})]})}export{j as DesktopUpdateConfig};
|