nextclaw 0.17.4 → 0.17.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.
Files changed (76) hide show
  1. package/dist/cli/index.js +6139 -1340
  2. package/package.json +12 -12
  3. package/resources/USAGE.md +1 -1
  4. package/ui-dist/assets/{ChannelsList-DZWam3Ob.js → ChannelsList-C6-lh55g.js} +2 -2
  5. package/ui-dist/assets/ChatPage-DOW0gPc2.js +45 -0
  6. package/ui-dist/assets/DocBrowser-CGyeswYP.js +1 -0
  7. package/ui-dist/assets/{DocBrowser-C7-1sXqo.js → DocBrowser-QUZ3nfmH.js} +1 -1
  8. package/ui-dist/assets/{DocBrowserContext-DN5tjUoS.js → DocBrowserContext-CpiIfhJO.js} +1 -1
  9. package/ui-dist/assets/{LogoBadge-DDS1sU_U.js → LogoBadge-BUK13xK5.js} +1 -1
  10. package/ui-dist/assets/MarketplacePage-BDVwhIYE.js +1 -0
  11. package/ui-dist/assets/MarketplacePage-LnKKL3xK.js +49 -0
  12. package/ui-dist/assets/McpMarketplacePage-BG4T_Pcx.js +40 -0
  13. package/ui-dist/assets/ModelConfig-LtWuogIw.js +1 -0
  14. package/ui-dist/assets/ProviderScopedModelInput-DGn6sFEN.js +1 -0
  15. package/ui-dist/assets/ProvidersList-ma-_MlLo.js +1 -0
  16. package/ui-dist/assets/{RemoteAccessPage-COnjm8_x.js → RemoteAccessPage-ff15qO-c.js} +1 -1
  17. package/ui-dist/assets/RuntimeConfig-TgPandXF.js +1 -0
  18. package/ui-dist/assets/SearchConfig-C9iBt7pl.js +1 -0
  19. package/ui-dist/assets/{SecretsConfig-Cefg1LFJ.js → SecretsConfig-Bew4EF2A.js} +2 -2
  20. package/ui-dist/assets/{SessionsConfig-BZnmVTIu.js → SessionsConfig-2r2yAGZg.js} +2 -2
  21. package/ui-dist/assets/{book-open-DvWqOode.js → book-open-CJG8Yz3U.js} +1 -1
  22. package/ui-dist/assets/{chat-session-display-D4bYa0b8.js → chat-session-display-DkAC5OMC.js} +1 -1
  23. package/ui-dist/assets/{chunk-JZWAC4HX-CxfKRD7X.js → chunk-JZWAC4HX-D5b3Iyas.js} +1 -1
  24. package/ui-dist/assets/{config-BeGwf2Ao.js → config-zvnxSXSP.js} +1 -1
  25. package/ui-dist/assets/{createLucideIcon-C7MmdIX3.js → createLucideIcon-_FMJqZw2.js} +1 -1
  26. package/ui-dist/assets/{dist-B6VMuIQN.js → dist-B1fpOuON.js} +1 -1
  27. package/ui-dist/assets/{dist-RWNFhxvR.js → dist-BCXX7FD-.js} +2 -2
  28. package/ui-dist/assets/{external-link-U86Acd1t.js → external-link-b7gAJWYY.js} +1 -1
  29. package/ui-dist/assets/{hash-D-OVfV3Z.js → hash-Bhy4TwfZ.js} +1 -1
  30. package/ui-dist/assets/i18n-DJg9BPYk.js +1 -0
  31. package/ui-dist/assets/index-BoJbxdvZ.css +1 -0
  32. package/ui-dist/assets/index-CtlT4E9Y.js +6 -0
  33. package/ui-dist/assets/infiniteQueryBehavior-CTcVlD9s.js +1 -0
  34. package/ui-dist/assets/loader-circle-B60I0hEk.js +1 -0
  35. package/ui-dist/assets/{logos-U1_qDA3U.js → logos-GMeYU9vc.js} +1 -1
  36. package/ui-dist/assets/{page-layout-Z1klaUFW.js → page-layout-C8UbWuMt.js} +1 -1
  37. package/ui-dist/assets/plus-CR7RfK3H.js +1 -0
  38. package/ui-dist/assets/{popover-xWbqMnIN.js → popover-8HSx9wQj.js} +1 -1
  39. package/ui-dist/assets/react-BB4jko2M.js +1 -0
  40. package/ui-dist/assets/{refresh-ccw-JQh1lwq-.js → refresh-ccw-CA4_C7Zg.js} +1 -1
  41. package/ui-dist/assets/{save-4VRlzkii.js → save-BtvMy4lk.js} +1 -1
  42. package/ui-dist/assets/search-C60UA27E.js +1 -0
  43. package/ui-dist/assets/security-config-BkFDYZ6j.js +1 -0
  44. package/ui-dist/assets/{select-DF-AUoie.js → select-xp_Ac8ip.js} +1 -1
  45. package/ui-dist/assets/skeleton-uxz_5h3A.js +1 -0
  46. package/ui-dist/assets/{status-dot-Bq_8Ojvv.js → status-dot-Cn4Pp7DZ.js} +1 -1
  47. package/ui-dist/assets/{switch-D7JF_RZ-.js → switch-BTi6UOij.js} +1 -1
  48. package/ui-dist/assets/{tabs-custom-CLksZ2bO.js → tabs-custom-BiiN8DME.js} +1 -1
  49. package/ui-dist/assets/{trash-2-VV8jvziy.js → trash-2-BpsF0N-r.js} +1 -1
  50. package/ui-dist/assets/use-infinite-scroll-loader-C8jBv11-.js +1 -0
  51. package/ui-dist/assets/{useConfirmDialog-CuQqiPx7.js → useConfirmDialog-BJIwUZjH.js} +1 -1
  52. package/ui-dist/assets/{useMutation-DBTWPbTg.js → useMutation-BjBOKHj_.js} +1 -1
  53. package/ui-dist/assets/x-BfTu-g7D.js +1 -0
  54. package/ui-dist/index.html +19 -18
  55. package/ui-dist/assets/ChatPage-YBL7iJ1X.js +0 -43
  56. package/ui-dist/assets/DocBrowser-DQjtSsY3.js +0 -1
  57. package/ui-dist/assets/MarketplacePage-2tWWgwAb.js +0 -49
  58. package/ui-dist/assets/MarketplacePage-BorWJftJ.js +0 -1
  59. package/ui-dist/assets/McpMarketplacePage-N-fB4HID.js +0 -40
  60. package/ui-dist/assets/ModelConfig-DvsBTUiE.js +0 -1
  61. package/ui-dist/assets/ProviderScopedModelInput-D9woCARc.js +0 -1
  62. package/ui-dist/assets/ProvidersList-D-qPGgC4.js +0 -1
  63. package/ui-dist/assets/RuntimeConfig-BHpqcaHm.js +0 -1
  64. package/ui-dist/assets/SearchConfig-DIT6M65Q.js +0 -1
  65. package/ui-dist/assets/i18n-hM3v-3YG.js +0 -1
  66. package/ui-dist/assets/index-CpxuJa9o.css +0 -1
  67. package/ui-dist/assets/index-DHmCjcxq.js +0 -6
  68. package/ui-dist/assets/label-CHJ1ATds.js +0 -1
  69. package/ui-dist/assets/loader-circle-C8cpaL0w.js +0 -1
  70. package/ui-dist/assets/marketplace-localization-CxSTG9wr.js +0 -1
  71. package/ui-dist/assets/plus-CrkO1kob.js +0 -1
  72. package/ui-dist/assets/react-3YE87-lE.js +0 -1
  73. package/ui-dist/assets/search-EX-Papzl.js +0 -1
  74. package/ui-dist/assets/security-config-DEgOD4VX.js +0 -1
  75. package/ui-dist/assets/skeleton-B0mmt1vo.js +0 -1
  76. package/ui-dist/assets/x-B4sxJkGY.js +0 -1
@@ -1 +1 @@
1
- import{i as e,p as t,u as n}from"./i18n-hM3v-3YG.js";import{t as r}from"./createLucideIcon-C7MmdIX3.js";import{t as i}from"./loader-circle-C8cpaL0w.js";var a=r(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),o=r(`User`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),s=t();function c({status:t,className:r}){let a=e(t===`running`?`sessionsRunStatusRunning`:`sessionsRunStatusQueued`);return(0,s.jsxs)(`span`,{className:n(`inline-flex h-3.5 w-3.5 items-center justify-center text-gray-400`,r),title:a,"aria-label":a,children:[(0,s.jsx)(i,{className:`h-3 w-3 animate-spin`}),(0,s.jsx)(`span`,{className:`sr-only`,children:a})]})}var l=function(e){return e.CALL=`call`,e.RESULT=`result`,e.PARTIAL_CALL=`partial-call`,e.ERROR=`error`,e.CANCELLED=`cancelled`,e}({});function u(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function d(e){return u(e)}function f(e){let t=u(e);if(!t)return null;let n=t.replace(/[\\/]+$/,``);if(!n)return t;let r=n.split(/[\\/]/).filter(Boolean);return r[r.length-1]??n}var p=new Set([`off`,`minimal`,`low`,`medium`,`high`,`adaptive`,`xhigh`]);function m(e){if(typeof e==`string`)return e;try{return JSON.stringify(e??{})}catch{return String(e??``)}}function h(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function g(e){let{metadata:t}=e;return!t||typeof t!=`object`||Array.isArray(t)?null:t}function _(e){let t=g(e);return t?h(t.preferred_model)??h(t.preferredModel)??h(t.model):null}function v(e){let t=g(e);if(!t)return null;let n=h(t.preferred_thinking)??h(t.thinking)??h(t.thinking_level)??h(t.thinkingLevel);if(!n)return null;let r=n.toLowerCase();return p.has(r)?r:null}function y(e){let t=g(e);return t?h(t.label):null}function b(e){let t=g(e);return t?d(t.project_root??t.projectRoot):null}function x(e){let t=g(e);return t?h(t.runtime)??h(t.session_type)??h(t.sessionType)??`native`:`native`}function S(e){let t=g(e);return t?h(t.parent_session_id)??h(t.parentSessionId):null}function C(e){let t=g(e);return t?h(t.spawned_by_request_id)??h(t.spawnedByRequestId):null}function w(e){let t=g(e);return t?t.child_session_promoted===!0:!1}function T(e){if(e===`heartbeat`)return{type:`heartbeat`};if(e.startsWith(`cron:`))return{type:`cron`};if(e.startsWith(`agent:`)){let t=e.split(`:`);if(t.length>=3){let e=t[2];if(e&&e!==`main`&&e!==`direct`)return{channel:e}}}return{}}function E(e){return e.state===`result`?l.RESULT:e.state===`partial-call`?l.PARTIAL_CALL:l.CALL}function D(e){let t=[];for(let n of e){if(n.type===`text`){t.push({type:`text`,text:n.text});continue}if(n.type===`rich-text`){t.push({type:`text`,text:n.text});continue}if(n.type===`reasoning`){t.push({type:`reasoning`,reasoning:n.text,details:[]});continue}if(n.type===`source`){t.push({type:`source`,source:{sourceType:`url`,id:n.url??n.title??Math.random().toString(36).slice(2,8),url:n.url??``,...n.title?{title:n.title}:{}}});continue}if(n.type===`file`&&n.contentBase64){t.push({type:`file`,...n.name?{name:n.name}:{},mimeType:n.mimeType??`application/octet-stream`,data:n.contentBase64,...n.url?{url:n.url}:{},...typeof n.sizeBytes==`number`?{sizeBytes:n.sizeBytes}:{}});continue}if(n.type===`file`&&n.url){t.push({type:`file`,...n.name?{name:n.name}:{},mimeType:n.mimeType??`application/octet-stream`,data:``,url:n.url,...typeof n.sizeBytes==`number`?{sizeBytes:n.sizeBytes}:{}});continue}if(n.type===`step-start`){t.push({type:`step-start`});continue}n.type===`tool-invocation`&&t.push({type:`tool-invocation`,toolInvocation:{status:E(n),toolCallId:n.toolCallId??`${n.toolName}-${Math.random().toString(36).slice(2,8)}`,toolName:n.toolName,args:m(n.args),result:n.result}})}return t}function O(e){return e===`service`?`system`:e===`tool`?`assistant`:e}function k(e){return{id:e.id,role:O(e.role),parts:D(e.parts),meta:{source:`stream`,status:e.status,sessionKey:e.sessionId,timestamp:e.timestamp}}}function A(e){let t=y(e),n=_(e),r=v(e),i=b(e),a=f(i),o=T(e.sessionId),s=S(e),c=C(e),l=w(e);return{key:e.sessionId,createdAt:e.updatedAt,updatedAt:e.updatedAt,...typeof e.agentId==`string`&&e.agentId.trim().length>0?{agentId:e.agentId.trim()}:{},...t?{label:t}:{},...o,...n?{preferredModel:n}:{},...r?{preferredThinking:r}:{},...i?{projectRoot:i}:{},...a?{projectName:a}:{},sessionType:x(e),sessionTypeMutable:!1,isChildSession:!!s,...l?{isPromotedChildSession:l}:{},...s?{parentSessionId:s}:{},...c?{spawnedByRequestId:c}:{},messageCount:e.messageCount}}function j(e){return e.map(A)}function M(){return`ncp-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function N(e){if(e.label&&e.label.trim())return e.label.trim();let t=e.key.split(`:`);return t[t.length-1]||e.key}function P(e){return e.trim().toLowerCase()}function F(e,t){let n=P(t);return n?[e.key,N(e),e.projectRoot??``,e.projectName??``].map(P).some(e=>e.includes(n)):!0}export{A as a,d as c,a as d,j as i,c as l,F as n,M as o,k as r,f as s,N as t,o as u};
1
+ import{i as e,p as t,u as n}from"./i18n-DJg9BPYk.js";import{t as r}from"./createLucideIcon-_FMJqZw2.js";import{t as i}from"./loader-circle-B60I0hEk.js";var a=r(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),o=r(`User`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),s=t();function c({status:t,className:r}){let a=e(t===`running`?`sessionsRunStatusRunning`:`sessionsRunStatusQueued`);return(0,s.jsxs)(`span`,{className:n(`inline-flex h-3.5 w-3.5 items-center justify-center text-gray-400`,r),title:a,"aria-label":a,children:[(0,s.jsx)(i,{className:`h-3 w-3 animate-spin`}),(0,s.jsx)(`span`,{className:`sr-only`,children:a})]})}var l=function(e){return e.CALL=`call`,e.RESULT=`result`,e.PARTIAL_CALL=`partial-call`,e.ERROR=`error`,e.CANCELLED=`cancelled`,e}({});function u(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function d(e){return u(e)}function f(e){let t=u(e);if(!t)return null;let n=t.replace(/[\\/]+$/,``);if(!n)return t;let r=n.split(/[\\/]/).filter(Boolean);return r[r.length-1]??n}var p=new Set([`off`,`minimal`,`low`,`medium`,`high`,`adaptive`,`xhigh`]);function m(e){if(typeof e==`string`)return e;try{return JSON.stringify(e??{})}catch{return String(e??``)}}function h(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function g(e){let{metadata:t}=e;return!t||typeof t!=`object`||Array.isArray(t)?null:t}function _(e){let t=g(e);return t?h(t.preferred_model)??h(t.preferredModel)??h(t.model):null}function v(e){let t=g(e);if(!t)return null;let n=h(t.preferred_thinking)??h(t.thinking)??h(t.thinking_level)??h(t.thinkingLevel);if(!n)return null;let r=n.toLowerCase();return p.has(r)?r:null}function y(e){let t=g(e);return t?h(t.label):null}function b(e){let t=g(e);return t?d(t.project_root??t.projectRoot):null}function x(e){let t=g(e);return t?h(t.runtime)??h(t.session_type)??h(t.sessionType)??`native`:`native`}function S(e){let t=g(e);return t?h(t.parent_session_id)??h(t.parentSessionId):null}function C(e){let t=g(e);return t?h(t.spawned_by_request_id)??h(t.spawnedByRequestId):null}function w(e){let t=g(e);return t?t.child_session_promoted===!0:!1}function T(e){if(e===`heartbeat`)return{type:`heartbeat`};if(e.startsWith(`cron:`))return{type:`cron`};if(e.startsWith(`agent:`)){let t=e.split(`:`);if(t.length>=3){let e=t[2];if(e&&e!==`main`&&e!==`direct`)return{channel:e}}}return{}}function E(e){return e.state===`result`?l.RESULT:e.state===`partial-call`?l.PARTIAL_CALL:l.CALL}function D(e){let t=[];for(let n of e){if(n.type===`text`){t.push({type:`text`,text:n.text});continue}if(n.type===`rich-text`){t.push({type:`text`,text:n.text});continue}if(n.type===`reasoning`){t.push({type:`reasoning`,reasoning:n.text,details:[]});continue}if(n.type===`source`){t.push({type:`source`,source:{sourceType:`url`,id:n.url??n.title??Math.random().toString(36).slice(2,8),url:n.url??``,...n.title?{title:n.title}:{}}});continue}if(n.type===`file`&&n.contentBase64){t.push({type:`file`,...n.name?{name:n.name}:{},mimeType:n.mimeType??`application/octet-stream`,data:n.contentBase64,...n.url?{url:n.url}:{},...typeof n.sizeBytes==`number`?{sizeBytes:n.sizeBytes}:{}});continue}if(n.type===`file`&&n.url){t.push({type:`file`,...n.name?{name:n.name}:{},mimeType:n.mimeType??`application/octet-stream`,data:``,url:n.url,...typeof n.sizeBytes==`number`?{sizeBytes:n.sizeBytes}:{}});continue}if(n.type===`step-start`){t.push({type:`step-start`});continue}n.type===`tool-invocation`&&t.push({type:`tool-invocation`,toolInvocation:{status:E(n),toolCallId:n.toolCallId??`${n.toolName}-${Math.random().toString(36).slice(2,8)}`,toolName:n.toolName,args:m(n.args),result:n.result}})}return t}function O(e){return e===`service`?`system`:e===`tool`?`assistant`:e}function k(e){return{id:e.id,role:O(e.role),parts:D(e.parts),meta:{source:`stream`,status:e.status,sessionKey:e.sessionId,timestamp:e.timestamp}}}function A(e){let t=y(e),n=_(e),r=v(e),i=b(e),a=f(i),o=T(e.sessionId),s=S(e),c=C(e),l=w(e);return{key:e.sessionId,createdAt:e.updatedAt,updatedAt:e.updatedAt,...typeof e.agentId==`string`&&e.agentId.trim().length>0?{agentId:e.agentId.trim()}:{},...t?{label:t}:{},...o,...n?{preferredModel:n}:{},...r?{preferredThinking:r}:{},...i?{projectRoot:i}:{},...a?{projectName:a}:{},sessionType:x(e),sessionTypeMutable:!1,isChildSession:!!s,...l?{isPromotedChildSession:l}:{},...s?{parentSessionId:s}:{},...c?{spawnedByRequestId:c}:{},messageCount:e.messageCount}}function j(e){return e.map(A)}function M(){return`ncp-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function N(e){if(e.label&&e.label.trim())return e.label.trim();let t=e.key.split(`:`);return t[t.length-1]||e.key}function P(e){return e.trim().toLowerCase()}function F(e,t){let n=P(t);return n?[e.key,N(e),e.projectRoot??``,e.projectName??``].map(P).some(e=>e.includes(n)):!0}export{A as a,d as c,a as d,j as i,c as l,F as n,M as o,k as r,f as s,N as t,o as u};
@@ -1,3 +1,3 @@
1
- import{_ as e,m as t}from"./i18n-hM3v-3YG.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-DJg9BPYk.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};
@@ -1 +1 @@
1
- import{r as e}from"./dist-RWNFhxvR.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
+ import{r as e}from"./dist-BCXX7FD-.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-hM3v-3YG.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};
1
+ import{_ as e,m as t}from"./i18n-DJg9BPYk.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};
@@ -1 +1 @@
1
- import{_ as e,m as t}from"./i18n-hM3v-3YG.js";import{V as n,W as r}from"./select-DF-AUoie.js";var i=e(t(),1);function a(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}var o=e=>{let{present:t,children:n}=e,a=s(t),o=typeof n==`function`?n({present:a.isPresent}):i.Children.only(n),c=r(a.ref,l(o));return typeof n==`function`||a.isPresent?i.cloneElement(o,{ref:c}):null};o.displayName=`Presence`;function s(e){let[t,r]=i.useState(),o=i.useRef(null),s=i.useRef(e),l=i.useRef(`none`),[u,d]=a(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return i.useEffect(()=>{let e=c(o.current);l.current=u===`mounted`?e:`none`},[u]),n(()=>{let t=o.current,n=s.current;if(n!==e){let r=l.current,i=c(t);e?d(`MOUNT`):i===`none`||t?.display===`none`?d(`UNMOUNT`):d(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),s.current=e}},[e,d]),n(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,r=r=>{let i=c(o.current).includes(CSS.escape(r.animationName));if(r.target===t&&i&&(d(`ANIMATION_END`),!s.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},i=e=>{e.target===t&&(l.current=c(o.current))};return t.addEventListener(`animationstart`,i),t.addEventListener(`animationcancel`,r),t.addEventListener(`animationend`,r),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,i),t.removeEventListener(`animationcancel`,r),t.removeEventListener(`animationend`,r)}}else d(`ANIMATION_END`)},[t,d]),{isPresent:[`mounted`,`unmountSuspended`].includes(u),ref:i.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}function c(e){return e?.animationName||`none`}function l(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}export{o as t};
1
+ import{_ as e,m as t}from"./i18n-DJg9BPYk.js";import{V as n,W as r}from"./select-xp_Ac8ip.js";var i=e(t(),1);function a(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}var o=e=>{let{present:t,children:n}=e,a=s(t),o=typeof n==`function`?n({present:a.isPresent}):i.Children.only(n),c=r(a.ref,l(o));return typeof n==`function`||a.isPresent?i.cloneElement(o,{ref:c}):null};o.displayName=`Presence`;function s(e){let[t,r]=i.useState(),o=i.useRef(null),s=i.useRef(e),l=i.useRef(`none`),[u,d]=a(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return i.useEffect(()=>{let e=c(o.current);l.current=u===`mounted`?e:`none`},[u]),n(()=>{let t=o.current,n=s.current;if(n!==e){let r=l.current,i=c(t);e?d(`MOUNT`):i===`none`||t?.display===`none`?d(`UNMOUNT`):d(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),s.current=e}},[e,d]),n(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,r=r=>{let i=c(o.current).includes(CSS.escape(r.animationName));if(r.target===t&&i&&(d(`ANIMATION_END`),!s.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},i=e=>{e.target===t&&(l.current=c(o.current))};return t.addEventListener(`animationstart`,i),t.addEventListener(`animationcancel`,r),t.addEventListener(`animationend`,r),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,i),t.removeEventListener(`animationcancel`,r),t.removeEventListener(`animationend`,r)}}else d(`ANIMATION_END`)},[t,d]),{isPresent:[`mounted`,`unmountSuspended`].includes(u),ref:i.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}function c(e){return e?.animationName||`none`}function l(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}export{o as t};
@@ -1,4 +1,4 @@
1
- import{_ as e,f as t,h as n,m as r,p as i,u as a}from"./i18n-hM3v-3YG.js";var o=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,E(ee);else{var t=n(l);t!==null&&D(b,t.startTime-e)}}function ee(t,i){m=!1,h&&(h=!1,_(C),C=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&D(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var x=!1,S=null,C=-1,w=5,te=-1;function ne(){return!(e.unstable_now()-te<w)}function T(){if(S!==null){var t=e.unstable_now();te=t;var n=!0;try{n=S(!0,t)}finally{n?re():(x=!1,S=null)}}else x=!1}var re;if(typeof v==`function`)re=function(){v(T)};else if(typeof MessageChannel<`u`){var ie=new MessageChannel,ae=ie.port2;ie.port1.onmessage=T,re=function(){ae.postMessage(null)}}else re=function(){g(T,0)};function E(e){S=e,x||(x=!0,re())}function D(t,n){C=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,E(ee))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(C),C=-1):h=!0,D(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,E(ee))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),s=n(((e,t)=>{t.exports=o()})),c=n((e=>{var t=r(),n=s();function i(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var a=new Set,o={};function c(e,t){l(e,t),l(e+`Capture`,t)}function l(e,t){for(o[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function h(e){return d.call(m,e)?!0:d.call(p,e)?!1:f.test(e)?m[e]=!0:(p[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function ee(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(b,ee);y[t]=new v(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(b,ee);y[t]=new v(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(b,ee);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function x(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(_(t,n,i,r)&&(n=null),r||i===null?h(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var S=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for(`react.element`),w=Symbol.for(`react.portal`),te=Symbol.for(`react.fragment`),ne=Symbol.for(`react.strict_mode`),T=Symbol.for(`react.profiler`),re=Symbol.for(`react.provider`),ie=Symbol.for(`react.context`),ae=Symbol.for(`react.forward_ref`),E=Symbol.for(`react.suspense`),D=Symbol.for(`react.suspense_list`),oe=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),se=Symbol.for(`react.offscreen`),ce=Symbol.iterator;function le(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var k=Object.assign,ue;function de(e){if(ue===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ue=t&&t[1]||``}return`
1
+ import{_ as e,f as t,h as n,m as r,p as i,u as a}from"./i18n-DJg9BPYk.js";var o=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,E(ee);else{var t=n(l);t!==null&&D(b,t.startTime-e)}}function ee(t,i){m=!1,h&&(h=!1,_(C),C=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&D(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var x=!1,S=null,C=-1,w=5,te=-1;function ne(){return!(e.unstable_now()-te<w)}function T(){if(S!==null){var t=e.unstable_now();te=t;var n=!0;try{n=S(!0,t)}finally{n?re():(x=!1,S=null)}}else x=!1}var re;if(typeof v==`function`)re=function(){v(T)};else if(typeof MessageChannel<`u`){var ie=new MessageChannel,ae=ie.port2;ie.port1.onmessage=T,re=function(){ae.postMessage(null)}}else re=function(){g(T,0)};function E(e){S=e,x||(x=!0,re())}function D(t,n){C=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,E(ee))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(C),C=-1):h=!0,D(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,E(ee))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),s=n(((e,t)=>{t.exports=o()})),c=n((e=>{var t=r(),n=s();function i(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var a=new Set,o={};function c(e,t){l(e,t),l(e+`Capture`,t)}function l(e,t){for(o[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function h(e){return d.call(m,e)?!0:d.call(p,e)?!1:f.test(e)?m[e]=!0:(p[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function ee(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(b,ee);y[t]=new v(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(b,ee);y[t]=new v(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(b,ee);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function x(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(_(t,n,i,r)&&(n=null),r||i===null?h(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var S=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for(`react.element`),w=Symbol.for(`react.portal`),te=Symbol.for(`react.fragment`),ne=Symbol.for(`react.strict_mode`),T=Symbol.for(`react.profiler`),re=Symbol.for(`react.provider`),ie=Symbol.for(`react.context`),ae=Symbol.for(`react.forward_ref`),E=Symbol.for(`react.suspense`),D=Symbol.for(`react.suspense_list`),oe=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),se=Symbol.for(`react.offscreen`),ce=Symbol.iterator;function le(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var k=Object.assign,ue;function de(e){if(ue===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ue=t&&t[1]||``}return`
2
2
  `+ue+e}var fe=!1;function pe(e,t){if(!e||fe)return``;fe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
3
3
  `),a=r.stack.split(`
4
4
  `),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
@@ -12,4 +12,4 @@ Error generating stack: `+e.message+`
12
12
  `);for(;r!==-1;)lt(e.value.slice(0,r),t,n),e.value=e.value.slice(r+2),r=e.value.indexOf(`
13
13
 
14
14
  `)}async function dt(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}),ut(i,t,e=>{a=e})}i.value.trim()&&lt(i.value,t,e=>{a=e})}finally{n.releaseLock()}return a}function ft(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 pt(e,t){return e.ok?Error(t):Error(e.error.message)}var mt=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}},ht=class{constructor(e={}){this.options=e,this.apiBase=e.apiBase??it,this.realtimeGateway=new mt(ft(this.apiBase,e.wsPath??`/ws`))}async request(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 st(e.path,{method:e.method,...e.body===void 0?{}:{body:JSON.stringify(e.body)},...n?{signal:n.signal}:{}});if(!t.ok)throw pt(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}finally{r!==null&&window.clearTimeout(r)}}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=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});if(!r.ok){let e=await r.text();throw Error(e.trim()||`HTTP ${r.status}`)}try{return await dt(r,e.onEvent)}finally{e.signal?.removeEventListener(`abort`,n)}})(),cancel:()=>t.abort()}}subscribe(e){return this.realtimeGateway.subscribe(e)}};function gt(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 _t(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 vt(e){return`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}var yt=15e3,bt=class{constructor(e,t=it){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=vt(`req`),n=Number.isFinite(e.timeoutMs)&&(e.timeoutMs??0)>0?Math.trunc(e.timeoutMs):yt;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=vt(`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=ft(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(gt(e.body,e.status,`Remote request failed.`));return}try{t.resolve(_t(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))}}},xt=`/_remote/runtime`,St={mode:`remote`,protocolVersion:1,wsPath:`/_remote/ws`};async function Ct(e){let t=`${e.replace(/\/$/,``)}${xt}`,n;try{n=await fetch(t,{method:`GET`,credentials:`include`,cache:`no-store`})}catch{return new ht({apiBase:e})}if(n.status===404)return new ht({apiBase:e});if(!(n.headers.get(`content-type`)?.toLowerCase()??``).includes(`application/json`))return n.status>=400?new bt(St,e):new ht({apiBase:e});let r=null;try{r=await n.json()}catch{return n.status>=400?new bt(St,e):new ht({apiBase:e})}return n.ok&&r.ok&&r.data?.mode===`remote`?new bt(r.data,e):n.status>=400?new bt(St,e):new ht({apiBase:e})}var wt=new class{constructor(e=it){this.apiBase=e,this.transportPromise=null}async getTransport(){return this.transportPromise||=Ct(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 j(e,t={}){let n=(t.method||`GET`).toUpperCase();try{return{ok:!0,data:await wt.request({method:n,path:e,...t.timeoutMs===void 0?{}:{timeoutMs:t.timeoutMs},...t.body===void 0?{}:{body:Et(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 Tt={get:(e,t={})=>j(e,{...t,method:`GET`}),put:(e,t)=>j(e,{method:`PUT`,body:JSON.stringify(t)}),post:(e,t)=>j(e,{method:`POST`,body:JSON.stringify(t)}),delete:e=>j(e,{method:`DELETE`})};function Et(e){if(e!=null){if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}}var Dt=e(l(),1),Ot=e=>{switch(e){case`success`:return jt;case`info`:return Nt;case`warning`:return Mt;case`error`:return Pt;default:return null}},kt=Array(12).fill(0),At=({visible:e,className:t})=>A.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},A.createElement(`div`,{className:`sonner-spinner`},kt.map((e,t)=>A.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),jt=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},A.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),Mt=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},A.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Nt=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},A.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Pt=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},A.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Ft=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},A.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),A.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),It=()=>{let[e,t]=A.useState(document.hidden);return A.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},Lt=1,M=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:Lt++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=e instanceof Promise?e:e(),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],A.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(zt(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description;this.create({id:n,type:`error`,message:r,description:a})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`success`,message:r,description:a})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`error`,message:r,description:a})}}).finally(()=>{var e;i&&(this.dismiss(n),n=void 0),(e=t.finally)==null||e.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||Lt++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Rt=(e,t)=>{let n=t?.id||Lt++;return M.addToast({title:e,...t,id:n}),n},zt=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Bt=Object.assign(Rt,{success:M.success,info:M.info,warning:M.warning,error:M.error,custom:M.custom,message:M.message,promise:M.promise,dismiss:M.dismiss,loading:M.loading},{getHistory:()=>M.toasts,getToasts:()=>M.getActiveToasts()});function Vt(e,{insertAt:t}={}){if(!e||typeof document>`u`)return;let n=document.head||document.getElementsByTagName(`head`)[0],r=document.createElement(`style`);r.type=`text/css`,t===`top`&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Vt(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
15
- `);function Ht(e){return e.label!==void 0}var Ut=3,Wt=`32px`,Gt=`16px`,Kt=4e3,qt=356,Jt=14,N=20,Yt=200;function Xt(...e){return e.filter(Boolean).join(` `)}function Zt(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Qt=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:ee,loadingIcon:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:te=`Close toast`,pauseWhenPageIsHidden:ne}=e,[T,re]=A.useState(null),[ie,ae]=A.useState(null),[E,D]=A.useState(!1),[oe,O]=A.useState(!1),[se,ce]=A.useState(!1),[le,k]=A.useState(!1),[ue,de]=A.useState(!1),[fe,pe]=A.useState(0),[me,he]=A.useState(0),ge=A.useRef(n.duration||y||Kt),_e=A.useRef(null),ve=A.useRef(null),ye=c===0,be=c+1<=o,xe=n.type,Se=n.dismissible!==!1,Ce=n.className||``,we=n.descriptionClassName||``,Te=A.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),Ee=A.useMemo(()=>n.closeButton??p,[n.closeButton,p]),De=A.useMemo(()=>n.duration||y||Kt,[n.duration,y]),Oe=A.useRef(0),ke=A.useRef(0),Ae=A.useRef(0),je=A.useRef(null),[Me,Ne]=b.split(`-`),Pe=A.useMemo(()=>s.reduce((e,t,n)=>n>=Te?e:e+t.height,0),[s,Te]),Fe=It(),Ie=n.invert||t,Le=xe===`loading`;ke.current=A.useMemo(()=>Te*ee+Pe,[Te,Pe]),A.useEffect(()=>{ge.current=De},[De]),A.useEffect(()=>{D(!0)},[]),A.useEffect(()=>{let e=ve.current;if(e){let t=e.getBoundingClientRect().height;return he(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),A.useLayoutEffect(()=>{if(!E)return;let e=ve.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,he(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[E,n.title,n.description,a,n.id]);let Re=A.useCallback(()=>{O(!0),pe(ke.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Yt)},[n,d,a,ke]);A.useEffect(()=>{if(n.promise&&xe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||ne&&Fe?(()=>{if(Ae.current<Oe.current){let e=new Date().getTime()-Oe.current;ge.current-=e}Ae.current=new Date().getTime()})():ge.current!==1/0&&(Oe.current=new Date().getTime(),e=setTimeout(()=>{var e;(e=n.onAutoClose)==null||e.call(n,n),Re()},ge.current)),()=>clearTimeout(e)},[u,i,n,xe,ne,Fe,Re]),A.useEffect(()=>{n.delete&&Re()},[Re,n.delete]);function ze(){return w!=null&&w.loading?A.createElement(`div`,{className:Xt(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":xe===`loading`},w.loading):x?A.createElement(`div`,{className:Xt(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":xe===`loading`},x):A.createElement(At,{className:Xt(C?.loader,n?.classNames?.loader),visible:xe===`loading`})}return A.createElement(`li`,{tabIndex:0,ref:ve,className:Xt(_,Ce,C?.toast,n?.classNames?.toast,C?.default,C?.[xe],n?.classNames?.[xe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":E,"data-promise":!!n.promise,"data-swiped":ue,"data-removed":oe,"data-visible":be,"data-y-position":Me,"data-x-position":Ne,"data-index":c,"data-front":ye,"data-swiping":se,"data-dismissible":Se,"data-type":xe,"data-invert":Ie,"data-swipe-out":le,"data-swipe-direction":ie,"data-expanded":!!(u||S&&E),style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${oe?fe:ke.current}px`,"--initial-height":S?`auto`:`${me}px`,...m,...n.style},onDragEnd:()=>{ce(!1),re(null),je.current=null},onPointerDown:e=>{Le||!Se||(_e.current=new Date,pe(ke.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(ce(!0),je.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e;if(le||!Se)return;je.current=null;let t=Number(ve.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),r=Number(ve.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),i=new Date().getTime()-_e.current?.getTime(),a=T===`x`?t:r,o=Math.abs(a)/i;if(Math.abs(a)>=N||o>.11){pe(ke.current),(e=n.onDismiss)==null||e.call(n,n),ae(T===`x`?t>0?`right`:`left`:r>0?`down`:`up`),Re(),k(!0),de(!1);return}ce(!1),re(null)},onPointerMove:t=>{var n,r;if(!je.current||!Se||window.getSelection()?.toString().length>0)return;let i=t.clientY-je.current.y,a=t.clientX-je.current.x,o=e.swipeDirections??Zt(b);!T&&(Math.abs(a)>1||Math.abs(i)>1)&&re(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0};T===`y`?(o.includes(`top`)||o.includes(`bottom`))&&(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)&&(s.y=i):T===`x`&&(o.includes(`left`)||o.includes(`right`))&&(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)&&(s.x=a),(Math.abs(s.x)>0||Math.abs(s.y)>0)&&de(!0),(n=ve.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=ve.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},Ee&&!n.jsx?A.createElement(`button`,{"aria-label":te,"data-disabled":Le,"data-close-button":!0,onClick:Le||!Se?()=>{}:()=>{var e;Re(),(e=n.onDismiss)==null||e.call(n,n)},className:Xt(C?.closeButton,n?.classNames?.closeButton)},w?.close??Ft):null,n.jsx||(0,A.isValidElement)(n.title)?n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title:A.createElement(A.Fragment,null,xe||n.icon||n.promise?A.createElement(`div`,{"data-icon":``,className:Xt(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||ze():null,n.type===`loading`?null:n.icon||w?.[xe]||Ot(xe)):null,A.createElement(`div`,{"data-content":``,className:Xt(C?.content,n?.classNames?.content)},A.createElement(`div`,{"data-title":``,className:Xt(C?.title,n?.classNames?.title)},typeof n.title==`function`?n.title():n.title),n.description?A.createElement(`div`,{"data-description":``,className:Xt(v,we,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),(0,A.isValidElement)(n.cancel)?n.cancel:n.cancel&&Ht(n.cancel)?A.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{var t,r;Ht(n.cancel)&&Se&&((r=(t=n.cancel).onClick)==null||r.call(t,e),Re())},className:Xt(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,(0,A.isValidElement)(n.action)?n.action:n.action&&Ht(n.action)?A.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{var t,r;Ht(n.action)&&((r=(t=n.action).onClick)==null||r.call(t,e),!e.defaultPrevented&&Re())},className:Xt(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null))};function $t(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function en(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?Gt:Wt;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var tn=(0,A.forwardRef)(function(e,t){let{invert:n,position:r=`bottom-right`,hotkey:i=[`altKey`,`KeyT`],expand:a,closeButton:o,className:s,offset:c,mobileOffset:l,theme:u=`light`,richColors:d,duration:f,style:p,visibleToasts:m=Ut,toastOptions:h,dir:g=$t(),gap:_=Jt,loadingIcon:v,icons:y,containerAriaLabel:b=`Notifications`,pauseWhenPageIsHidden:ee}=e,[x,S]=A.useState([]),C=A.useMemo(()=>Array.from(new Set([r].concat(x.filter(e=>e.position).map(e=>e.position)))),[x,r]),[w,te]=A.useState([]),[ne,T]=A.useState(!1),[re,ie]=A.useState(!1),[ae,E]=A.useState(u===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:u),D=A.useRef(null),oe=i.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),O=A.useRef(null),se=A.useRef(!1),ce=A.useCallback(e=>{S(t=>{var n;return(n=t.find(t=>t.id===e.id))!=null&&n.delete||M.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return A.useEffect(()=>M.subscribe(e=>{if(e.dismiss){S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t));return}setTimeout(()=>{Dt.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),A.useEffect(()=>{if(u!==`system`){E(u);return}if(u===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?E(`dark`):E(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{E(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{E(e?`dark`:`light`)}catch(e){console.error(e)}})}},[u]),A.useEffect(()=>{x.length<=1&&T(!1)},[x]),A.useEffect(()=>{let e=e=>{var t,n;i.every(t=>e[t]||e.code===t)&&(T(!0),(t=D.current)==null||t.focus()),e.code===`Escape`&&(document.activeElement===D.current||(n=D.current)!=null&&n.contains(document.activeElement))&&T(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[i]),A.useEffect(()=>{if(D.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,se.current=!1)}},[D.current]),A.createElement(`section`,{ref:t,"aria-label":`${b} ${oe}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},C.map((t,r)=>{let[i,u]=t.split(`-`);return x.length?A.createElement(`ol`,{key:t,dir:g===`auto`?$t():g,tabIndex:-1,ref:D,className:s,"data-sonner-toaster":!0,"data-theme":ae,"data-y-position":i,"data-lifted":ne&&x.length>1&&!a,"data-x-position":u,style:{"--front-toast-height":`${w[0]?.height||0}px`,"--width":`${qt}px`,"--gap":`${_}px`,...p,...en(c,l)},onBlur:e=>{se.current&&!e.currentTarget.contains(e.relatedTarget)&&(se.current=!1,O.current&&=(O.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||se.current||(se.current=!0,O.current=e.relatedTarget)},onMouseEnter:()=>T(!0),onMouseMove:()=>T(!0),onMouseLeave:()=>{re||T(!1)},onDragEnd:()=>T(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ie(!0)},onPointerUp:()=>ie(!1)},x.filter(e=>!e.position&&r===0||e.position===t).map((r,i)=>A.createElement(Qt,{key:r.id,icons:y,index:i,toast:r,defaultRichColors:d,duration:h?.duration??f,className:h?.className,descriptionClassName:h?.descriptionClassName,invert:n,visibleToasts:m,closeButton:h?.closeButton??o,interacting:re,position:t,style:h?.style,unstyled:h?.unstyled,classNames:h?.classNames,cancelButtonStyle:h?.cancelButtonStyle,actionButtonStyle:h?.actionButtonStyle,removeToast:ce,toasts:x.filter(e=>e.position==r.position),heights:w.filter(e=>e.position==r.position),setHeights:te,expandByDefault:a,gap:_,loadingIcon:v,expanded:ne,pauseWhenPageIsHidden:ee,swipeDirections:e.swipeDirections}))):null}))});export{le as A,S as C,w as D,h as E,u as M,l as N,y as O,C as S,ee as T,k as _,it as a,ce as b,Ze as c,Me as d,Ne as f,ue as g,me as h,wt as i,se as j,T as k,Le as l,he as m,Bt as n,nt as o,xe as p,Tt as r,et as s,tn as t,Ie as u,oe as v,x as w,g as x,O as y};
15
+ `);function Ht(e){return e.label!==void 0}var Ut=3,Wt=`32px`,Gt=`16px`,Kt=4e3,qt=356,Jt=14,N=20,Yt=200;function Xt(...e){return e.filter(Boolean).join(` `)}function Zt(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Qt=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:ee,loadingIcon:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:te=`Close toast`,pauseWhenPageIsHidden:ne}=e,[T,re]=A.useState(null),[ie,ae]=A.useState(null),[E,D]=A.useState(!1),[oe,O]=A.useState(!1),[se,ce]=A.useState(!1),[le,k]=A.useState(!1),[ue,de]=A.useState(!1),[fe,pe]=A.useState(0),[me,he]=A.useState(0),ge=A.useRef(n.duration||y||Kt),_e=A.useRef(null),ve=A.useRef(null),ye=c===0,be=c+1<=o,xe=n.type,Se=n.dismissible!==!1,Ce=n.className||``,we=n.descriptionClassName||``,Te=A.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),Ee=A.useMemo(()=>n.closeButton??p,[n.closeButton,p]),De=A.useMemo(()=>n.duration||y||Kt,[n.duration,y]),Oe=A.useRef(0),ke=A.useRef(0),Ae=A.useRef(0),je=A.useRef(null),[Me,Ne]=b.split(`-`),Pe=A.useMemo(()=>s.reduce((e,t,n)=>n>=Te?e:e+t.height,0),[s,Te]),Fe=It(),Ie=n.invert||t,Le=xe===`loading`;ke.current=A.useMemo(()=>Te*ee+Pe,[Te,Pe]),A.useEffect(()=>{ge.current=De},[De]),A.useEffect(()=>{D(!0)},[]),A.useEffect(()=>{let e=ve.current;if(e){let t=e.getBoundingClientRect().height;return he(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),A.useLayoutEffect(()=>{if(!E)return;let e=ve.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,he(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[E,n.title,n.description,a,n.id]);let Re=A.useCallback(()=>{O(!0),pe(ke.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Yt)},[n,d,a,ke]);A.useEffect(()=>{if(n.promise&&xe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||ne&&Fe?(()=>{if(Ae.current<Oe.current){let e=new Date().getTime()-Oe.current;ge.current-=e}Ae.current=new Date().getTime()})():ge.current!==1/0&&(Oe.current=new Date().getTime(),e=setTimeout(()=>{var e;(e=n.onAutoClose)==null||e.call(n,n),Re()},ge.current)),()=>clearTimeout(e)},[u,i,n,xe,ne,Fe,Re]),A.useEffect(()=>{n.delete&&Re()},[Re,n.delete]);function ze(){return w!=null&&w.loading?A.createElement(`div`,{className:Xt(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":xe===`loading`},w.loading):x?A.createElement(`div`,{className:Xt(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":xe===`loading`},x):A.createElement(At,{className:Xt(C?.loader,n?.classNames?.loader),visible:xe===`loading`})}return A.createElement(`li`,{tabIndex:0,ref:ve,className:Xt(_,Ce,C?.toast,n?.classNames?.toast,C?.default,C?.[xe],n?.classNames?.[xe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":E,"data-promise":!!n.promise,"data-swiped":ue,"data-removed":oe,"data-visible":be,"data-y-position":Me,"data-x-position":Ne,"data-index":c,"data-front":ye,"data-swiping":se,"data-dismissible":Se,"data-type":xe,"data-invert":Ie,"data-swipe-out":le,"data-swipe-direction":ie,"data-expanded":!!(u||S&&E),style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${oe?fe:ke.current}px`,"--initial-height":S?`auto`:`${me}px`,...m,...n.style},onDragEnd:()=>{ce(!1),re(null),je.current=null},onPointerDown:e=>{Le||!Se||(_e.current=new Date,pe(ke.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(ce(!0),je.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e;if(le||!Se)return;je.current=null;let t=Number(ve.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),r=Number(ve.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),i=new Date().getTime()-_e.current?.getTime(),a=T===`x`?t:r,o=Math.abs(a)/i;if(Math.abs(a)>=N||o>.11){pe(ke.current),(e=n.onDismiss)==null||e.call(n,n),ae(T===`x`?t>0?`right`:`left`:r>0?`down`:`up`),Re(),k(!0),de(!1);return}ce(!1),re(null)},onPointerMove:t=>{var n,r;if(!je.current||!Se||window.getSelection()?.toString().length>0)return;let i=t.clientY-je.current.y,a=t.clientX-je.current.x,o=e.swipeDirections??Zt(b);!T&&(Math.abs(a)>1||Math.abs(i)>1)&&re(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0};T===`y`?(o.includes(`top`)||o.includes(`bottom`))&&(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)&&(s.y=i):T===`x`&&(o.includes(`left`)||o.includes(`right`))&&(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)&&(s.x=a),(Math.abs(s.x)>0||Math.abs(s.y)>0)&&de(!0),(n=ve.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=ve.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},Ee&&!n.jsx?A.createElement(`button`,{"aria-label":te,"data-disabled":Le,"data-close-button":!0,onClick:Le||!Se?()=>{}:()=>{var e;Re(),(e=n.onDismiss)==null||e.call(n,n)},className:Xt(C?.closeButton,n?.classNames?.closeButton)},w?.close??Ft):null,n.jsx||(0,A.isValidElement)(n.title)?n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title:A.createElement(A.Fragment,null,xe||n.icon||n.promise?A.createElement(`div`,{"data-icon":``,className:Xt(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||ze():null,n.type===`loading`?null:n.icon||w?.[xe]||Ot(xe)):null,A.createElement(`div`,{"data-content":``,className:Xt(C?.content,n?.classNames?.content)},A.createElement(`div`,{"data-title":``,className:Xt(C?.title,n?.classNames?.title)},typeof n.title==`function`?n.title():n.title),n.description?A.createElement(`div`,{"data-description":``,className:Xt(v,we,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),(0,A.isValidElement)(n.cancel)?n.cancel:n.cancel&&Ht(n.cancel)?A.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{var t,r;Ht(n.cancel)&&Se&&((r=(t=n.cancel).onClick)==null||r.call(t,e),Re())},className:Xt(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,(0,A.isValidElement)(n.action)?n.action:n.action&&Ht(n.action)?A.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{var t,r;Ht(n.action)&&((r=(t=n.action).onClick)==null||r.call(t,e),!e.defaultPrevented&&Re())},className:Xt(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null))};function $t(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function en(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?Gt:Wt;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var tn=(0,A.forwardRef)(function(e,t){let{invert:n,position:r=`bottom-right`,hotkey:i=[`altKey`,`KeyT`],expand:a,closeButton:o,className:s,offset:c,mobileOffset:l,theme:u=`light`,richColors:d,duration:f,style:p,visibleToasts:m=Ut,toastOptions:h,dir:g=$t(),gap:_=Jt,loadingIcon:v,icons:y,containerAriaLabel:b=`Notifications`,pauseWhenPageIsHidden:ee}=e,[x,S]=A.useState([]),C=A.useMemo(()=>Array.from(new Set([r].concat(x.filter(e=>e.position).map(e=>e.position)))),[x,r]),[w,te]=A.useState([]),[ne,T]=A.useState(!1),[re,ie]=A.useState(!1),[ae,E]=A.useState(u===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:u),D=A.useRef(null),oe=i.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),O=A.useRef(null),se=A.useRef(!1),ce=A.useCallback(e=>{S(t=>{var n;return(n=t.find(t=>t.id===e.id))!=null&&n.delete||M.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return A.useEffect(()=>M.subscribe(e=>{if(e.dismiss){S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t));return}setTimeout(()=>{Dt.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),A.useEffect(()=>{if(u!==`system`){E(u);return}if(u===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?E(`dark`):E(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{E(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{E(e?`dark`:`light`)}catch(e){console.error(e)}})}},[u]),A.useEffect(()=>{x.length<=1&&T(!1)},[x]),A.useEffect(()=>{let e=e=>{var t,n;i.every(t=>e[t]||e.code===t)&&(T(!0),(t=D.current)==null||t.focus()),e.code===`Escape`&&(document.activeElement===D.current||(n=D.current)!=null&&n.contains(document.activeElement))&&T(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[i]),A.useEffect(()=>{if(D.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,se.current=!1)}},[D.current]),A.createElement(`section`,{ref:t,"aria-label":`${b} ${oe}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},C.map((t,r)=>{let[i,u]=t.split(`-`);return x.length?A.createElement(`ol`,{key:t,dir:g===`auto`?$t():g,tabIndex:-1,ref:D,className:s,"data-sonner-toaster":!0,"data-theme":ae,"data-y-position":i,"data-lifted":ne&&x.length>1&&!a,"data-x-position":u,style:{"--front-toast-height":`${w[0]?.height||0}px`,"--width":`${qt}px`,"--gap":`${_}px`,...p,...en(c,l)},onBlur:e=>{se.current&&!e.currentTarget.contains(e.relatedTarget)&&(se.current=!1,O.current&&=(O.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||se.current||(se.current=!0,O.current=e.relatedTarget)},onMouseEnter:()=>T(!0),onMouseMove:()=>T(!0),onMouseLeave:()=>{re||T(!1)},onDragEnd:()=>T(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ie(!0)},onPointerUp:()=>ie(!1)},x.filter(e=>!e.position&&r===0||e.position===t).map((r,i)=>A.createElement(Qt,{key:r.id,icons:y,index:i,toast:r,defaultRichColors:d,duration:h?.duration??f,className:h?.className,descriptionClassName:h?.descriptionClassName,invert:n,visibleToasts:m,closeButton:h?.closeButton??o,interacting:re,position:t,style:h?.style,unstyled:h?.unstyled,classNames:h?.classNames,cancelButtonStyle:h?.cancelButtonStyle,actionButtonStyle:h?.actionButtonStyle,removeToast:ce,toasts:x.filter(e=>e.position==r.position),heights:w.filter(e=>e.position==r.position),setHeights:te,expandByDefault:a,gap:_,loadingIcon:v,expanded:ne,pauseWhenPageIsHidden:ee,swipeDirections:e.swipeDirections}))):null}))});export{y as A,g as C,ee as D,x as E,l as F,le as M,se as N,h as O,u as P,ce as S,S as T,me as _,it as a,oe as b,Ze as c,Ie as d,Me as f,he as g,xe as h,wt as i,T as j,w as k,Xe as l,Te as m,Bt as n,nt as o,Ne as p,Tt as r,et as s,tn as t,Le as u,ue as v,C as w,O as x,k as y};
@@ -1 +1 @@
1
- import{t as e}from"./createLucideIcon-C7MmdIX3.js";var t=e(`ExternalLink`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]);export{t};
1
+ import{t as e}from"./createLucideIcon-_FMJqZw2.js";var t=e(`ExternalLink`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]);export{t};
@@ -1 +1 @@
1
- import{t as e}from"./createLucideIcon-C7MmdIX3.js";var t=e(`Hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]);export{t};
1
+ import{t as e}from"./createLucideIcon-_FMJqZw2.js";var t=e(`Hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]);export{t};