@atproto/oauth-provider-ui 0.6.0-next.0 → 0.7.0

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 (168) hide show
  1. package/dist/account-page-fVhIFEih.js +20 -0
  2. package/dist/account-page-fVhIFEih.js.map +1 -0
  3. package/dist/{admonition-yRjCycmU.js → admonition-CXJ8Sc1w.js} +10 -10
  4. package/dist/{admonition-yRjCycmU.js.map → admonition-CXJ8Sc1w.js.map} +1 -1
  5. package/dist/admonition-DVqjHOuj.css +1 -0
  6. package/dist/authorization-page-CvIE9dK4.js +6 -0
  7. package/dist/authorization-page-CvIE9dK4.js.map +1 -0
  8. package/dist/bundle-manifest.json +209 -209
  9. package/dist/{cookie-error-page-Bkn1GFNn.js → cookie-error-page-CyBt7krF.js} +2 -2
  10. package/dist/{cookie-error-page-Bkn1GFNn.js.map → cookie-error-page-CyBt7krF.js.map} +1 -1
  11. package/dist/did-document-DsLzb3Ek.js +60 -0
  12. package/dist/did-document-DsLzb3Ek.js.map +1 -0
  13. package/dist/{error-page-BNXmA0-7.js → error-page-DF0CHJlA.js} +2 -2
  14. package/dist/{error-page-BNXmA0-7.js.map → error-page-DF0CHJlA.js.map} +1 -1
  15. package/dist/error-view-CVf24qTW.js +2 -0
  16. package/dist/error-view-CVf24qTW.js.map +1 -0
  17. package/dist/{form-card-CGJ-DqBg.js → form-card-D8HY_Q27.js} +2 -2
  18. package/dist/{form-card-CGJ-DqBg.js.map → form-card-D8HY_Q27.js.map} +1 -1
  19. package/dist/messages-5uNgWF4s.js +2 -0
  20. package/dist/messages-5uNgWF4s.js.map +1 -0
  21. package/dist/messages-B7mQtRBJ.js +2 -0
  22. package/dist/messages-B7mQtRBJ.js.map +1 -0
  23. package/dist/messages-B8MWcr21.js +2 -0
  24. package/dist/messages-B8MWcr21.js.map +1 -0
  25. package/dist/messages-B9JN3961.js +2 -0
  26. package/dist/messages-B9JN3961.js.map +1 -0
  27. package/dist/messages-BCQ2T7NA.js +2 -0
  28. package/dist/messages-BCQ2T7NA.js.map +1 -0
  29. package/dist/messages-BCdpdeC-.js +2 -0
  30. package/dist/messages-BCdpdeC-.js.map +1 -0
  31. package/dist/messages-BZLoddIZ.js +2 -0
  32. package/dist/messages-BZLoddIZ.js.map +1 -0
  33. package/dist/messages-BZYoSNbm.js +2 -0
  34. package/dist/messages-BZYoSNbm.js.map +1 -0
  35. package/dist/messages-Bh717jLi.js +2 -0
  36. package/dist/messages-Bh717jLi.js.map +1 -0
  37. package/dist/messages-BjG33ebS.js +2 -0
  38. package/dist/messages-BjG33ebS.js.map +1 -0
  39. package/dist/messages-Bw-YxWKB.js +2 -0
  40. package/dist/messages-Bw-YxWKB.js.map +1 -0
  41. package/dist/messages-BwbrOwr8.js +2 -0
  42. package/dist/messages-BwbrOwr8.js.map +1 -0
  43. package/dist/messages-C9mdoRX3.js +2 -0
  44. package/dist/messages-C9mdoRX3.js.map +1 -0
  45. package/dist/messages-CCIA1RjZ.js +2 -0
  46. package/dist/messages-CCIA1RjZ.js.map +1 -0
  47. package/dist/messages-CY9oixjx.js +2 -0
  48. package/dist/messages-CY9oixjx.js.map +1 -0
  49. package/dist/messages-CYwJd9QA.js +2 -0
  50. package/dist/messages-CYwJd9QA.js.map +1 -0
  51. package/dist/messages-CjwltEWC.js +2 -0
  52. package/dist/messages-CjwltEWC.js.map +1 -0
  53. package/dist/messages-CkoTm5oM.js +2 -0
  54. package/dist/messages-CkoTm5oM.js.map +1 -0
  55. package/dist/messages-CqJT7nIu.js +2 -0
  56. package/dist/messages-CqJT7nIu.js.map +1 -0
  57. package/dist/messages-CqenJyok.js +2 -0
  58. package/dist/messages-CqenJyok.js.map +1 -0
  59. package/dist/messages-Ct8q9YL2.js +2 -0
  60. package/dist/messages-Ct8q9YL2.js.map +1 -0
  61. package/dist/messages-D7H6tJoh.js +2 -0
  62. package/dist/messages-D7H6tJoh.js.map +1 -0
  63. package/dist/messages-DHS4QO3e.js +2 -0
  64. package/dist/messages-DHS4QO3e.js.map +1 -0
  65. package/dist/messages-DIGrbyyF.js +2 -0
  66. package/dist/messages-DIGrbyyF.js.map +1 -0
  67. package/dist/messages-DKINoIXI.js +2 -0
  68. package/dist/messages-DKINoIXI.js.map +1 -0
  69. package/dist/messages-DSKtrhnV.js +2 -0
  70. package/dist/messages-DSKtrhnV.js.map +1 -0
  71. package/dist/messages-Dib-ZiYl.js +2 -0
  72. package/dist/messages-Dib-ZiYl.js.map +1 -0
  73. package/dist/messages-DogbCQFZ.js +2 -0
  74. package/dist/messages-DogbCQFZ.js.map +1 -0
  75. package/dist/messages-GftZzRyR.js +2 -0
  76. package/dist/messages-GftZzRyR.js.map +1 -0
  77. package/dist/messages-QfxG5UCZ.js +2 -0
  78. package/dist/messages-QfxG5UCZ.js.map +1 -0
  79. package/dist/messages-Ujrt_KOB.js +2 -0
  80. package/dist/messages-Ujrt_KOB.js.map +1 -0
  81. package/dist/messages-qh1Id7WE.js +2 -0
  82. package/dist/messages-qh1Id7WE.js.map +1 -0
  83. package/dist/messages-sZeR24xr.js +2 -0
  84. package/dist/messages-sZeR24xr.js.map +1 -0
  85. package/dist/messages-vN-GwpS2.js +2 -0
  86. package/dist/messages-vN-GwpS2.js.map +1 -0
  87. package/dist/messages-zJqiwr6j.js +2 -0
  88. package/dist/messages-zJqiwr6j.js.map +1 -0
  89. package/package.json +6 -6
  90. package/dist/account-page-BWF2SB1c.js +0 -20
  91. package/dist/account-page-BWF2SB1c.js.map +0 -1
  92. package/dist/admonition-Bcg8G9qE.css +0 -1
  93. package/dist/authorization-page-CVdjW3kW.js +0 -6
  94. package/dist/authorization-page-CVdjW3kW.js.map +0 -1
  95. package/dist/did-document-YkmTdTdF.js +0 -60
  96. package/dist/did-document-YkmTdTdF.js.map +0 -1
  97. package/dist/error-view-C10M9k8v.js +0 -2
  98. package/dist/error-view-C10M9k8v.js.map +0 -1
  99. package/dist/messages-4A2zNaJA.js +0 -2
  100. package/dist/messages-4A2zNaJA.js.map +0 -1
  101. package/dist/messages-7R3dsZws.js +0 -2
  102. package/dist/messages-7R3dsZws.js.map +0 -1
  103. package/dist/messages-B6nvld7p.js +0 -2
  104. package/dist/messages-B6nvld7p.js.map +0 -1
  105. package/dist/messages-BAdEsMXp.js +0 -2
  106. package/dist/messages-BAdEsMXp.js.map +0 -1
  107. package/dist/messages-BMxtZJ1I.js +0 -2
  108. package/dist/messages-BMxtZJ1I.js.map +0 -1
  109. package/dist/messages-BWd-s4G-.js +0 -2
  110. package/dist/messages-BWd-s4G-.js.map +0 -1
  111. package/dist/messages-BYwBRDz6.js +0 -2
  112. package/dist/messages-BYwBRDz6.js.map +0 -1
  113. package/dist/messages-Bbt7j4Nr.js +0 -2
  114. package/dist/messages-Bbt7j4Nr.js.map +0 -1
  115. package/dist/messages-CIviIojG.js +0 -2
  116. package/dist/messages-CIviIojG.js.map +0 -1
  117. package/dist/messages-CP4Dh-Zn.js +0 -2
  118. package/dist/messages-CP4Dh-Zn.js.map +0 -1
  119. package/dist/messages-CZWPPCcA.js +0 -2
  120. package/dist/messages-CZWPPCcA.js.map +0 -1
  121. package/dist/messages-CaYb4lH9.js +0 -2
  122. package/dist/messages-CaYb4lH9.js.map +0 -1
  123. package/dist/messages-Cnbm9eAj.js +0 -2
  124. package/dist/messages-Cnbm9eAj.js.map +0 -1
  125. package/dist/messages-CqtpqGwZ.js +0 -2
  126. package/dist/messages-CqtpqGwZ.js.map +0 -1
  127. package/dist/messages-D3vsovyz.js +0 -2
  128. package/dist/messages-D3vsovyz.js.map +0 -1
  129. package/dist/messages-D9f1Rhet.js +0 -2
  130. package/dist/messages-D9f1Rhet.js.map +0 -1
  131. package/dist/messages-DEbsg0ze.js +0 -2
  132. package/dist/messages-DEbsg0ze.js.map +0 -1
  133. package/dist/messages-DTNcNES3.js +0 -2
  134. package/dist/messages-DTNcNES3.js.map +0 -1
  135. package/dist/messages-DVdgHJEN.js +0 -2
  136. package/dist/messages-DVdgHJEN.js.map +0 -1
  137. package/dist/messages-D_YiRQ4N.js +0 -2
  138. package/dist/messages-D_YiRQ4N.js.map +0 -1
  139. package/dist/messages-Df1xyGfN.js +0 -2
  140. package/dist/messages-Df1xyGfN.js.map +0 -1
  141. package/dist/messages-DfHcfOyd.js +0 -2
  142. package/dist/messages-DfHcfOyd.js.map +0 -1
  143. package/dist/messages-DgtU9CmE.js +0 -2
  144. package/dist/messages-DgtU9CmE.js.map +0 -1
  145. package/dist/messages-DqWt8vPh.js +0 -2
  146. package/dist/messages-DqWt8vPh.js.map +0 -1
  147. package/dist/messages-DqgIT_3V.js +0 -2
  148. package/dist/messages-DqgIT_3V.js.map +0 -1
  149. package/dist/messages-DvBrqGjB.js +0 -2
  150. package/dist/messages-DvBrqGjB.js.map +0 -1
  151. package/dist/messages-Ebt0rRed.js +0 -2
  152. package/dist/messages-Ebt0rRed.js.map +0 -1
  153. package/dist/messages-Iqi6xcDH.js +0 -2
  154. package/dist/messages-Iqi6xcDH.js.map +0 -1
  155. package/dist/messages-Ys6eB5E6.js +0 -2
  156. package/dist/messages-Ys6eB5E6.js.map +0 -1
  157. package/dist/messages-hHsjnLrT.js +0 -2
  158. package/dist/messages-hHsjnLrT.js.map +0 -1
  159. package/dist/messages-i5QrLuH6.js +0 -2
  160. package/dist/messages-i5QrLuH6.js.map +0 -1
  161. package/dist/messages-ik9YWgEX.js +0 -2
  162. package/dist/messages-ik9YWgEX.js.map +0 -1
  163. package/dist/messages-q4uQwDHc.js +0 -2
  164. package/dist/messages-q4uQwDHc.js.map +0 -1
  165. package/dist/messages-tcRNX3H1.js +0 -2
  166. package/dist/messages-tcRNX3H1.js.map +0 -1
  167. package/dist/messages-ynvDvSx5.js +0 -2
  168. package/dist/messages-ynvDvSx5.js.map +0 -1
@@ -0,0 +1,20 @@
1
+ var Ol=Object.defineProperty;var po=e=>{throw TypeError(e)};var Ml=(e,t,n)=>t in e?Ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xe=(e,t,n)=>Ml(e,typeof t!="symbol"?t+"":t,n),Ar=(e,t,n)=>t.has(e)||po("Cannot "+n);var v=(e,t,n)=>(Ar(e,t,"read from private field"),n?n.call(e):t.get(e)),q=(e,t,n)=>t.has(e)?po("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),H=(e,t,n,s)=>(Ar(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),W=(e,t,n)=>(Ar(e,t,"access private method"),n);var Os=(e,t,n,s)=>({set _(r){H(e,t,r,n)},get _(){return v(e,t,s)}});import{r as p,j as u,a as _a,p as pn,c as ps,u as ke,B as un,T as K,L as Ll,b as Il,d as Ms,A as Kn,e as Sa,f as lr,g as Nl,C as Fl,h as Tl}from"./admonition-CXJ8Sc1w.js";import{r as Ra,P as As,u as ni,c as Pa,a as ur,b as Dl,d as Hl,e as Ul,f as ds,g as Aa,h as ql,i as Vl,R as $l,j as Bl,k as Zl,F as zl,D as Kl,A as Ca,l as Wl,m as Ea,n as Jl,o as Oi,p as Ql,q as Vt,s as rt,z as f,Z as ge,t as Gl,v as $t,w as ka,x as ja,y as si,I as Oa,B as Yl,C as Xl,E as eu,G as tu,H as nu,J as su,K as ru,N as iu,L as ou,S as au,M as cu}from"./did-document-DsLzb3Ek.js";import{E as Ma,e as lu}from"./error-view-CVf24qTW.js";import"./form-card-D8HY_Q27.js";var Wn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},dn=typeof window>"u"||"Deno"in globalThis;function De(){}function uu(e,t){return typeof e=="function"?e(t):e}function ri(e){return typeof e=="number"&&e>=0&&e!==1/0}function La(e,t){return Math.max(e+(t||0)-Date.now(),0)}function bn(e,t){return typeof e=="function"?e(t):e}function Be(e,t){return typeof e=="function"?e(t):e}function mo(e,t){const{type:n="all",exact:s,fetchStatus:r,predicate:o,queryKey:i,stale:a}=e;if(i){if(s){if(t.queryHash!==Mi(i,t.options))return!1}else if(!ms(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||r&&r!==t.state.fetchStatus||o&&!o(t))}function go(e,t){const{exact:n,status:s,predicate:r,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(hn(t.options.mutationKey)!==hn(o))return!1}else if(!ms(t.options.mutationKey,o))return!1}return!(s&&t.state.status!==s||r&&!r(t))}function Mi(e,t){return((t==null?void 0:t.queryKeyHashFn)||hn)(e)}function hn(e){return JSON.stringify(e,(t,n)=>ii(n)?Object.keys(n).sort().reduce((s,r)=>(s[r]=n[r],s),{}):n)}function ms(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ms(e[n],t[n])):!1}function Ia(e,t){if(e===t)return e;const n=vo(e)&&vo(t);if(n||ii(e)&&ii(t)){const s=n?e:Object.keys(e),r=s.length,o=n?t:Object.keys(t),i=o.length,a=n?[]:{};let c=0;for(let l=0;l<i;l++){const h=n?l:o[l];(!n&&s.includes(h)||n)&&e[h]===void 0&&t[h]===void 0?(a[h]=void 0,c++):(a[h]=Ia(e[h],t[h]),a[h]===e[h]&&e[h]!==void 0&&c++)}return r===i&&c===r?e:a}return t}function Ks(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function vo(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ii(e){if(!yo(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!yo(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function yo(e){return Object.prototype.toString.call(e)==="[object Object]"}function du(e){return new Promise(t=>{setTimeout(t,e)})}function oi(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Ia(e,t):t}function hu(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function fu(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var Li=Symbol();function Na(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Li?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var tn,At,En,ua,pu=(ua=class extends Wn{constructor(){super();q(this,tn);q(this,At);q(this,En);H(this,En,t=>{if(!dn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){v(this,At)||this.setEventListener(v(this,En))}onUnsubscribe(){var t;this.hasListeners()||((t=v(this,At))==null||t.call(this),H(this,At,void 0))}setEventListener(t){var n;H(this,En,t),(n=v(this,At))==null||n.call(this),H(this,At,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){v(this,tn)!==t&&(H(this,tn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof v(this,tn)=="boolean"?v(this,tn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},tn=new WeakMap,At=new WeakMap,En=new WeakMap,ua),Ii=new pu,kn,Ct,jn,da,mu=(da=class extends Wn{constructor(){super();q(this,kn,!0);q(this,Ct);q(this,jn);H(this,jn,t=>{if(!dn&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){v(this,Ct)||this.setEventListener(v(this,jn))}onUnsubscribe(){var t;this.hasListeners()||((t=v(this,Ct))==null||t.call(this),H(this,Ct,void 0))}setEventListener(t){var n;H(this,jn,t),(n=v(this,Ct))==null||n.call(this),H(this,Ct,t(this.setOnline.bind(this)))}setOnline(t){v(this,kn)!==t&&(H(this,kn,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return v(this,kn)}},kn=new WeakMap,Ct=new WeakMap,jn=new WeakMap,da),Ws=new mu;function ai(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});n.status="pending",n.catch(()=>{});function s(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{s({status:"fulfilled",value:r}),e(r)},n.reject=r=>{s({status:"rejected",reason:r}),t(r)},n}function gu(e){return Math.min(1e3*2**e,3e4)}function Fa(e){return(e??"online")==="online"?Ws.isOnline():!0}var Ta=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Cr(e){return e instanceof Ta}function Da(e){let t=!1,n=0,s=!1,r;const o=ai(),i=w=>{var b;s||(m(new Ta(w)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},c=()=>{t=!1},l=()=>Ii.isFocused()&&(e.networkMode==="always"||Ws.isOnline())&&e.canRun(),h=()=>Fa(e.networkMode)&&e.canRun(),d=w=>{var b;s||(s=!0,(b=e.onSuccess)==null||b.call(e,w),r==null||r(),o.resolve(w))},m=w=>{var b;s||(s=!0,(b=e.onError)==null||b.call(e,w),r==null||r(),o.reject(w))},g=()=>new Promise(w=>{var b;r=_=>{(s||l())&&w(_)},(b=e.onPause)==null||b.call(e)}).then(()=>{var w;r=void 0,s||(w=e.onContinue)==null||w.call(e)}),y=()=>{if(s)return;let w;const b=n===0?e.initialPromise:void 0;try{w=b??e.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(d).catch(_=>{var C;if(s)return;const E=e.retry??(dn?0:3),P=e.retryDelay??gu,L=typeof P=="function"?P(n,_):P,I=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,_);if(t||!I){m(_);return}n++,(C=e.onFail)==null||C.call(e,n,_),du(L).then(()=>l()?void 0:g()).then(()=>{t?m(_):y()})})};return{promise:o,cancel:i,continue:()=>(r==null||r(),o),cancelRetry:a,continueRetry:c,canStart:h,start:()=>(h()?y():g().then(y),o)}}var vu=e=>setTimeout(e,0);function yu(){let e=[],t=0,n=a=>{a()},s=a=>{a()},r=vu;const o=a=>{t?e.push(a):r(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&r(()=>{s(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||i()}return c},batchCalls:a=>(...c)=>{o(()=>{a(...c)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{s=a},setScheduler:a=>{r=a}}}var me=yu(),nn,ha,Ha=(ha=class{constructor(){q(this,nn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ri(this.gcTime)&&H(this,nn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(dn?1/0:5*60*1e3))}clearGcTimeout(){v(this,nn)&&(clearTimeout(v(this,nn)),H(this,nn,void 0))}},nn=new WeakMap,ha),On,Mn,Te,sn,be,_s,rn,qe,at,fa,wu=(fa=class extends Ha{constructor(t){super();q(this,qe);q(this,On);q(this,Mn);q(this,Te);q(this,sn);q(this,be);q(this,_s);q(this,rn);H(this,rn,!1),H(this,_s,t.defaultOptions),this.setOptions(t.options),this.observers=[],H(this,sn,t.client),H(this,Te,v(this,sn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,H(this,On,bu(this.options)),this.state=t.state??v(this,On),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=v(this,be))==null?void 0:t.promise}setOptions(t){this.options={...v(this,_s),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&v(this,Te).remove(this)}setData(t,n){const s=oi(this.state.data,t,this.options);return W(this,qe,at).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t,n){W(this,qe,at).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var s,r;const n=(s=v(this,be))==null?void 0:s.promise;return(r=v(this,be))==null||r.cancel(t),n?n.then(De).catch(De):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(v(this,On))}isActive(){return this.observers.some(t=>Be(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Li||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!La(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=v(this,be))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=v(this,be))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),v(this,Te).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(v(this,be)&&(v(this,rn)?v(this,be).cancel({revert:!0}):v(this,be).cancelRetry()),this.scheduleGc()),v(this,Te).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||W(this,qe,at).call(this,{type:"invalidate"})}fetch(t,n){var c,l,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(v(this,be))return v(this,be).continueRetry(),v(this,be).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(m=>m.options.queryFn);d&&this.setOptions(d.options)}const s=new AbortController,r=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(H(this,rn,!0),s.signal)})},o=()=>{const d=Na(this.options,n),m={client:v(this,sn),queryKey:this.queryKey,meta:this.meta};return r(m),H(this,rn,!1),this.options.persister?this.options.persister(d,m,this):d(m)},i={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:v(this,sn),state:this.state,fetchFn:o};r(i),(c=this.options.behavior)==null||c.onFetch(i,this),H(this,Mn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=i.fetchOptions)==null?void 0:l.meta))&&W(this,qe,at).call(this,{type:"fetch",meta:(h=i.fetchOptions)==null?void 0:h.meta});const a=d=>{var m,g,y,w;Cr(d)&&d.silent||W(this,qe,at).call(this,{type:"error",error:d}),Cr(d)||((g=(m=v(this,Te).config).onError)==null||g.call(m,d,this),(w=(y=v(this,Te).config).onSettled)==null||w.call(y,this.state.data,d,this)),this.scheduleGc()};return H(this,be,Da({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,abort:s.abort.bind(s),onSuccess:d=>{var m,g,y,w;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(b){a(b);return}(g=(m=v(this,Te).config).onSuccess)==null||g.call(m,d,this),(w=(y=v(this,Te).config).onSettled)==null||w.call(y,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,m)=>{W(this,qe,at).call(this,{type:"failed",failureCount:d,error:m})},onPause:()=>{W(this,qe,at).call(this,{type:"pause"})},onContinue:()=>{W(this,qe,at).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),v(this,be).start()}},On=new WeakMap,Mn=new WeakMap,Te=new WeakMap,sn=new WeakMap,be=new WeakMap,_s=new WeakMap,rn=new WeakMap,qe=new WeakSet,at=function(t){const n=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Ua(s.data,this.options),fetchMeta:t.meta??null};case"success":return{...s,data:t.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=t.error;return Cr(r)&&r.revert&&v(this,Mn)?{...v(this,Mn),fetchStatus:"idle"}:{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),me.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),v(this,Te).notify({query:this,type:"updated",action:t})})},fa);function Ua(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Fa(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function bu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ge,pa,xu=(pa=class extends Wn{constructor(t={}){super();q(this,Ge);this.config=t,H(this,Ge,new Map)}build(t,n,s){const r=n.queryKey,o=n.queryHash??Mi(r,n);let i=this.get(o);return i||(i=new wu({client:t,queryKey:r,queryHash:o,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(i)),i}add(t){v(this,Ge).has(t.queryHash)||(v(this,Ge).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=v(this,Ge).get(t.queryHash);n&&(t.destroy(),n===t&&v(this,Ge).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){me.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return v(this,Ge).get(t)}getAll(){return[...v(this,Ge).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>mo(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>mo(t,s)):n}notify(t){me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){me.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){me.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ge=new WeakMap,pa),Ye,_e,on,Xe,_t,ma,_u=(ma=class extends Ha{constructor(t){super();q(this,Xe);q(this,Ye);q(this,_e);q(this,on);this.mutationId=t.mutationId,H(this,_e,t.mutationCache),H(this,Ye,[]),this.state=t.state||qa(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){v(this,Ye).includes(t)||(v(this,Ye).push(t),this.clearGcTimeout(),v(this,_e).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){H(this,Ye,v(this,Ye).filter(n=>n!==t)),this.scheduleGc(),v(this,_e).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){v(this,Ye).length||(this.state.status==="pending"?this.scheduleGc():v(this,_e).remove(this))}continue(){var t;return((t=v(this,on))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var r,o,i,a,c,l,h,d,m,g,y,w,b,_,E,P,L,I,C,M;H(this,on,Da({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,x)=>{W(this,Xe,_t).call(this,{type:"failed",failureCount:S,error:x})},onPause:()=>{W(this,Xe,_t).call(this,{type:"pause"})},onContinue:()=>{W(this,Xe,_t).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>v(this,_e).canRun(this)}));const n=this.state.status==="pending",s=!v(this,on).canStart();try{if(!n){W(this,Xe,_t).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(r=v(this,_e).config).onMutate)==null?void 0:o.call(r,t,this));const x=await((a=(i=this.options).onMutate)==null?void 0:a.call(i,t));x!==this.state.context&&W(this,Xe,_t).call(this,{type:"pending",context:x,variables:t,isPaused:s})}const S=await v(this,on).start();return await((l=(c=v(this,_e).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((d=(h=this.options).onSuccess)==null?void 0:d.call(h,S,t,this.state.context)),await((g=(m=v(this,_e).config).onSettled)==null?void 0:g.call(m,S,null,this.state.variables,this.state.context,this)),await((w=(y=this.options).onSettled)==null?void 0:w.call(y,S,null,t,this.state.context)),W(this,Xe,_t).call(this,{type:"success",data:S}),S}catch(S){try{throw await((_=(b=v(this,_e).config).onError)==null?void 0:_.call(b,S,t,this.state.context,this)),await((P=(E=this.options).onError)==null?void 0:P.call(E,S,t,this.state.context)),await((I=(L=v(this,_e).config).onSettled)==null?void 0:I.call(L,void 0,S,this.state.variables,this.state.context,this)),await((M=(C=this.options).onSettled)==null?void 0:M.call(C,void 0,S,t,this.state.context)),S}finally{W(this,Xe,_t).call(this,{type:"error",error:S})}}finally{v(this,_e).runNext(this)}}},Ye=new WeakMap,_e=new WeakMap,on=new WeakMap,Xe=new WeakSet,_t=function(t){const n=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),me.batch(()=>{v(this,Ye).forEach(s=>{s.onMutationUpdate(t)}),v(this,_e).notify({mutation:this,type:"updated",action:t})})},ma);function qa(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ct,Ve,Ss,ga,Su=(ga=class extends Wn{constructor(t={}){super();q(this,ct);q(this,Ve);q(this,Ss);this.config=t,H(this,ct,new Set),H(this,Ve,new Map),H(this,Ss,0)}build(t,n,s){const r=new _u({mutationCache:this,mutationId:++Os(this,Ss)._,options:t.defaultMutationOptions(n),state:s});return this.add(r),r}add(t){v(this,ct).add(t);const n=Ls(t);if(typeof n=="string"){const s=v(this,Ve).get(n);s?s.push(t):v(this,Ve).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(v(this,ct).delete(t)){const n=Ls(t);if(typeof n=="string"){const s=v(this,Ve).get(n);if(s)if(s.length>1){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&v(this,Ve).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ls(t);if(typeof n=="string"){const s=v(this,Ve).get(n),r=s==null?void 0:s.find(o=>o.state.status==="pending");return!r||r===t}else return!0}runNext(t){var s;const n=Ls(t);if(typeof n=="string"){const r=(s=v(this,Ve).get(n))==null?void 0:s.find(o=>o!==t&&o.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){me.batch(()=>{v(this,ct).forEach(t=>{this.notify({type:"removed",mutation:t})}),v(this,ct).clear(),v(this,Ve).clear()})}getAll(){return Array.from(v(this,ct))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>go(n,s))}findAll(t={}){return this.getAll().filter(n=>go(t,n))}notify(t){me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return me.batch(()=>Promise.all(t.map(n=>n.continue().catch(De))))}},ct=new WeakMap,Ve=new WeakMap,Ss=new WeakMap,ga);function Ls(e){var t;return(t=e.options.scope)==null?void 0:t.id}function wo(e){return{onFetch:(t,n)=>{var h,d,m,g,y;const s=t.options,r=(m=(d=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:d.fetchMore)==null?void 0:m.direction,o=((g=t.state.data)==null?void 0:g.pages)||[],i=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let w=!1;const b=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(t.signal.aborted?w=!0:t.signal.addEventListener("abort",()=>{w=!0}),t.signal)})},_=Na(t.options,t.fetchOptions),E=async(P,L,I)=>{if(w)return Promise.reject();if(L==null&&P.pages.length)return Promise.resolve(P);const C={client:t.client,queryKey:t.queryKey,pageParam:L,direction:I?"backward":"forward",meta:t.options.meta};b(C);const M=await _(C),{maxPages:S}=t.options,x=I?fu:hu;return{pages:x(P.pages,M,S),pageParams:x(P.pageParams,L,S)}};if(r&&o.length){const P=r==="backward",L=P?Ru:bo,I={pages:o,pageParams:i},C=L(s,I);a=await E(I,C,P)}else{const P=e??o.length;do{const L=c===0?i[0]??s.initialPageParam:bo(s,a);if(c>0&&L==null)break;a=await E(a,L),c++}while(c<P)}return a};t.options.persister?t.fetchFn=()=>{var w,b;return(b=(w=t.options).persister)==null?void 0:b.call(w,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function bo(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function Ru(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}var ue,Et,kt,Ln,In,jt,Nn,Fn,va,Pu=(va=class{constructor(e={}){q(this,ue);q(this,Et);q(this,kt);q(this,Ln);q(this,In);q(this,jt);q(this,Nn);q(this,Fn);H(this,ue,e.queryCache||new xu),H(this,Et,e.mutationCache||new Su),H(this,kt,e.defaultOptions||{}),H(this,Ln,new Map),H(this,In,new Map),H(this,jt,0)}mount(){Os(this,jt)._++,v(this,jt)===1&&(H(this,Nn,Ii.subscribe(async e=>{e&&(await this.resumePausedMutations(),v(this,ue).onFocus())})),H(this,Fn,Ws.subscribe(async e=>{e&&(await this.resumePausedMutations(),v(this,ue).onOnline())})))}unmount(){var e,t;Os(this,jt)._--,v(this,jt)===0&&((e=v(this,Nn))==null||e.call(this),H(this,Nn,void 0),(t=v(this,Fn))==null||t.call(this),H(this,Fn,void 0))}isFetching(e){return v(this,ue).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return v(this,Et).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=v(this,ue).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=v(this,ue).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(bn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return v(this,ue).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),r=v(this,ue).get(s.queryHash),o=r==null?void 0:r.state.data,i=uu(t,o);if(i!==void 0)return v(this,ue).build(this,s).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return me.batch(()=>v(this,ue).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=v(this,ue).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=v(this,ue);me.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=v(this,ue);return me.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=me.batch(()=>v(this,ue).findAll(e).map(r=>r.cancel(n)));return Promise.all(s).then(De).catch(De)}invalidateQueries(e,t={}){return me.batch(()=>(v(this,ue).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=me.batch(()=>v(this,ue).findAll(e).filter(r=>!r.isDisabled()).map(r=>{let o=r.fetch(void 0,n);return n.throwOnError||(o=o.catch(De)),r.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(s).then(De)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=v(this,ue).build(this,t);return n.isStaleByTime(bn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(De).catch(De)}fetchInfiniteQuery(e){return e.behavior=wo(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(De).catch(De)}ensureInfiniteQueryData(e){return e.behavior=wo(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ws.isOnline()?v(this,Et).resumePausedMutations():Promise.resolve()}getQueryCache(){return v(this,ue)}getMutationCache(){return v(this,Et)}getDefaultOptions(){return v(this,kt)}setDefaultOptions(e){H(this,kt,e)}setQueryDefaults(e,t){v(this,Ln).set(hn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...v(this,Ln).values()],n={};return t.forEach(s=>{ms(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){v(this,In).set(hn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...v(this,In).values()],n={};return t.forEach(s=>{ms(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...v(this,kt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mi(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Li&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...v(this,kt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){v(this,ue).clear(),v(this,Et).clear()}},ue=new WeakMap,Et=new WeakMap,kt=new WeakMap,Ln=new WeakMap,In=new WeakMap,jt=new WeakMap,Nn=new WeakMap,Fn=new WeakMap,va),Re,J,Rs,Se,an,Tn,Ot,et,Ps,Dn,Hn,cn,ln,Mt,Un,ee,os,ci,li,ui,di,hi,fi,pi,Va,ya,Au=(ya=class extends Wn{constructor(t,n){super();q(this,ee);q(this,Re);q(this,J);q(this,Rs);q(this,Se);q(this,an);q(this,Tn);q(this,Ot);q(this,et);q(this,Ps);q(this,Dn);q(this,Hn);q(this,cn);q(this,ln);q(this,Mt);q(this,Un,new Set);this.options=n,H(this,Re,t),H(this,et,null),H(this,Ot,ai()),this.options.experimental_prefetchInRender||v(this,Ot).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(v(this,J).addObserver(this),xo(v(this,J),this.options)?W(this,ee,os).call(this):this.updateResult(),W(this,ee,di).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return mi(v(this,J),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mi(v(this,J),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,W(this,ee,hi).call(this),W(this,ee,fi).call(this),v(this,J).removeObserver(this)}setOptions(t){const n=this.options,s=v(this,J);if(this.options=v(this,Re).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Be(this.options.enabled,v(this,J))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");W(this,ee,pi).call(this),v(this,J).setOptions(this.options),n._defaulted&&!Ks(this.options,n)&&v(this,Re).getQueryCache().notify({type:"observerOptionsUpdated",query:v(this,J),observer:this});const r=this.hasListeners();r&&_o(v(this,J),s,this.options,n)&&W(this,ee,os).call(this),this.updateResult(),r&&(v(this,J)!==s||Be(this.options.enabled,v(this,J))!==Be(n.enabled,v(this,J))||bn(this.options.staleTime,v(this,J))!==bn(n.staleTime,v(this,J)))&&W(this,ee,ci).call(this);const o=W(this,ee,li).call(this);r&&(v(this,J)!==s||Be(this.options.enabled,v(this,J))!==Be(n.enabled,v(this,J))||o!==v(this,Mt))&&W(this,ee,ui).call(this,o)}getOptimisticResult(t){const n=v(this,Re).getQueryCache().build(v(this,Re),t),s=this.createResult(n,t);return Eu(this,s)&&(H(this,Se,s),H(this,Tn,this.options),H(this,an,v(this,J).state)),s}getCurrentResult(){return v(this,Se)}trackResult(t,n){const s={};return Object.keys(t).forEach(r=>{Object.defineProperty(s,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),n==null||n(r),t[r])})}),s}trackProp(t){v(this,Un).add(t)}getCurrentQuery(){return v(this,J)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=v(this,Re).defaultQueryOptions(t),s=v(this,Re).getQueryCache().build(v(this,Re),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(t){return W(this,ee,os).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),v(this,Se)))}createResult(t,n){var S;const s=v(this,J),r=this.options,o=v(this,Se),i=v(this,an),a=v(this,Tn),l=t!==s?t.state:v(this,Rs),{state:h}=t;let d={...h},m=!1,g;if(n._optimisticResults){const x=this.hasListeners(),F=!x&&xo(t,n),D=x&&_o(t,s,n,r);(F||D)&&(d={...d,...Ua(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:w,status:b}=d;if(n.select&&d.data!==void 0)if(o&&d.data===(i==null?void 0:i.data)&&n.select===v(this,Ps))g=v(this,Dn);else try{H(this,Ps,n.select),g=n.select(d.data),g=oi(o==null?void 0:o.data,g,n),H(this,Dn,g),H(this,et,null)}catch(x){H(this,et,x)}else g=d.data;if(n.placeholderData!==void 0&&g===void 0&&b==="pending"){let x;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))x=o.data;else if(x=typeof n.placeholderData=="function"?n.placeholderData((S=v(this,Hn))==null?void 0:S.state.data,v(this,Hn)):n.placeholderData,n.select&&x!==void 0)try{x=n.select(x),H(this,et,null)}catch(F){H(this,et,F)}x!==void 0&&(b="success",g=oi(o==null?void 0:o.data,x,n),m=!0)}v(this,et)&&(y=v(this,et),g=v(this,Dn),w=Date.now(),b="error");const _=d.fetchStatus==="fetching",E=b==="pending",P=b==="error",L=E&&_,I=g!==void 0,M={status:b,fetchStatus:d.fetchStatus,isPending:E,isSuccess:b==="success",isError:P,isInitialLoading:L,isLoading:L,data:g,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:w,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:_,isRefetching:_&&!E,isLoadingError:P&&!I,isPaused:d.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:P&&I,isStale:Ni(t,n),refetch:this.refetch,promise:v(this,Ot)};if(this.options.experimental_prefetchInRender){const x=N=>{M.status==="error"?N.reject(M.error):M.data!==void 0&&N.resolve(M.data)},F=()=>{const N=H(this,Ot,M.promise=ai());x(N)},D=v(this,Ot);switch(D.status){case"pending":t.queryHash===s.queryHash&&x(D);break;case"fulfilled":(M.status==="error"||M.data!==D.value)&&F();break;case"rejected":(M.status!=="error"||M.error!==D.reason)&&F();break}}return M}updateResult(){const t=v(this,Se),n=this.createResult(v(this,J),this.options);if(H(this,an,v(this,J).state),H(this,Tn,this.options),v(this,an).data!==void 0&&H(this,Hn,v(this,J)),Ks(n,t))return;H(this,Se,n);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!v(this,Un).size)return!0;const i=new Set(o??v(this,Un));return this.options.throwOnError&&i.add("error"),Object.keys(v(this,Se)).some(a=>{const c=a;return v(this,Se)[c]!==t[c]&&i.has(c)})};W(this,ee,Va).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&W(this,ee,di).call(this)}},Re=new WeakMap,J=new WeakMap,Rs=new WeakMap,Se=new WeakMap,an=new WeakMap,Tn=new WeakMap,Ot=new WeakMap,et=new WeakMap,Ps=new WeakMap,Dn=new WeakMap,Hn=new WeakMap,cn=new WeakMap,ln=new WeakMap,Mt=new WeakMap,Un=new WeakMap,ee=new WeakSet,os=function(t){W(this,ee,pi).call(this);let n=v(this,J).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(De)),n},ci=function(){W(this,ee,hi).call(this);const t=bn(this.options.staleTime,v(this,J));if(dn||v(this,Se).isStale||!ri(t))return;const s=La(v(this,Se).dataUpdatedAt,t)+1;H(this,cn,setTimeout(()=>{v(this,Se).isStale||this.updateResult()},s))},li=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(v(this,J)):this.options.refetchInterval)??!1},ui=function(t){W(this,ee,fi).call(this),H(this,Mt,t),!(dn||Be(this.options.enabled,v(this,J))===!1||!ri(v(this,Mt))||v(this,Mt)===0)&&H(this,ln,setInterval(()=>{(this.options.refetchIntervalInBackground||Ii.isFocused())&&W(this,ee,os).call(this)},v(this,Mt)))},di=function(){W(this,ee,ci).call(this),W(this,ee,ui).call(this,W(this,ee,li).call(this))},hi=function(){v(this,cn)&&(clearTimeout(v(this,cn)),H(this,cn,void 0))},fi=function(){v(this,ln)&&(clearInterval(v(this,ln)),H(this,ln,void 0))},pi=function(){const t=v(this,Re).getQueryCache().build(v(this,Re),this.options);if(t===v(this,J))return;const n=v(this,J);H(this,J,t),H(this,Rs,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Va=function(t){me.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(v(this,Se))}),v(this,Re).getQueryCache().notify({query:v(this,J),type:"observerResultsUpdated"})})},ya);function Cu(e,t){return Be(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function xo(e,t){return Cu(e,t)||e.state.data!==void 0&&mi(e,t,t.refetchOnMount)}function mi(e,t,n){if(Be(t.enabled,e)!==!1){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&Ni(e,t)}return!1}function _o(e,t,n,s){return(e!==t||Be(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ni(e,n)}function Ni(e,t){return Be(t.enabled,e)!==!1&&e.isStaleByTime(bn(t.staleTime,e))}function Eu(e,t){return!Ks(e.getCurrentResult(),t)}var Lt,It,Pe,lt,gt,$s,gi,wa,ku=(wa=class extends Wn{constructor(t,n){super();q(this,gt);q(this,Lt);q(this,It);q(this,Pe);q(this,lt);H(this,Lt,t),this.setOptions(n),this.bindMethods(),W(this,gt,$s).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const n=this.options;this.options=v(this,Lt).defaultMutationOptions(t),Ks(this.options,n)||v(this,Lt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:v(this,Pe),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&hn(n.mutationKey)!==hn(this.options.mutationKey)?this.reset():((s=v(this,Pe))==null?void 0:s.state.status)==="pending"&&v(this,Pe).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=v(this,Pe))==null||t.removeObserver(this)}onMutationUpdate(t){W(this,gt,$s).call(this),W(this,gt,gi).call(this,t)}getCurrentResult(){return v(this,It)}reset(){var t;(t=v(this,Pe))==null||t.removeObserver(this),H(this,Pe,void 0),W(this,gt,$s).call(this),W(this,gt,gi).call(this)}mutate(t,n){var s;return H(this,lt,n),(s=v(this,Pe))==null||s.removeObserver(this),H(this,Pe,v(this,Lt).getMutationCache().build(v(this,Lt),this.options)),v(this,Pe).addObserver(this),v(this,Pe).execute(t)}},Lt=new WeakMap,It=new WeakMap,Pe=new WeakMap,lt=new WeakMap,gt=new WeakSet,$s=function(){var n;const t=((n=v(this,Pe))==null?void 0:n.state)??qa();H(this,It,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},gi=function(t){me.batch(()=>{var n,s,r,o,i,a,c,l;if(v(this,lt)&&this.hasListeners()){const h=v(this,It).variables,d=v(this,It).context;(t==null?void 0:t.type)==="success"?((s=(n=v(this,lt)).onSuccess)==null||s.call(n,t.data,h,d),(o=(r=v(this,lt)).onSettled)==null||o.call(r,t.data,null,h,d)):(t==null?void 0:t.type)==="error"&&((a=(i=v(this,lt)).onError)==null||a.call(i,t.error,h,d),(l=(c=v(this,lt)).onSettled)==null||l.call(c,void 0,t.error,h,d))}this.listeners.forEach(h=>{h(v(this,It))})})},wa),$a=p.createContext(void 0),dr=e=>{const t=p.useContext($a);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ju=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx($a.Provider,{value:e,children:t})),Ba=p.createContext(!1),Ou=()=>p.useContext(Ba);Ba.Provider;function Mu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Lu=p.createContext(Mu()),Iu=()=>p.useContext(Lu);function Za(e,t){return typeof e=="function"?e(...t):!!e}function vi(){}var Nu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Fu=e=>{p.useEffect(()=>{e.clearReset()},[e])},Tu=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(r&&e.data===void 0||Za(n,[e.error,s])),Du=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Hu=(e,t)=>e.isLoading&&e.isFetching&&!t,Uu=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,So=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function qu(e,t,n){var d,m,g,y,w;const s=dr(),r=Ou(),o=Iu(),i=s.defaultQueryOptions(e);(m=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||m.call(d,i),i._optimisticResults=r?"isRestoring":"optimistic",Du(i),Nu(i,o),Fu(o);const a=!s.getQueryCache().get(i.queryHash),[c]=p.useState(()=>new t(s,i)),l=c.getOptimisticResult(i),h=!r&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(b=>{const _=h?c.subscribe(me.batchCalls(b)):vi;return c.updateResult(),_},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setOptions(i)},[i,c]),Uu(i,l))throw So(i,c,o);if(Tu({result:l,errorResetBoundary:o,throwOnError:i.throwOnError,query:s.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw l.error;if((y=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||y.call(g,i,l),i.experimental_prefetchInRender&&!dn&&Hu(l,r)){const b=a?So(i,c,o):(w=s.getQueryCache().get(i.queryHash))==null?void 0:w.promise;b==null||b.catch(vi).finally(()=>{c.updateResult()})}return i.notifyOnChangeProps?l:c.trackResult(l)}function za(e,t){return qu(e,Au)}function Bt(e,t){const n=dr(),[s]=p.useState(()=>new ku(n,e));p.useEffect(()=>{s.setOptions(e)},[s,e]);const r=p.useSyncExternalStore(p.useCallback(i=>s.subscribe(me.batchCalls(i)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),o=p.useCallback((i,a)=>{s.mutate(i,a).catch(vi)},[s]);if(r.error&&Za(s.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:o,mutateAsync:r.mutate}}var Vu="Invariant failed";function dt(e,t){if(!e)throw new Error(Vu)}const xn=new WeakMap,Bs=new WeakMap,Js={current:[]};let Er=!1,hs=0;const as=new Set,Is=new Map;function Ka(e){const t=Array.from(e).sort((n,s)=>n instanceof _n&&n.options.deps.includes(s)?1:s instanceof _n&&s.options.deps.includes(n)?-1:0);for(const n of t){if(Js.current.includes(n))continue;Js.current.push(n),n.recompute();const s=Bs.get(n);if(s)for(const r of s){const o=xn.get(r);o&&Ka(o)}}}function $u(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function Bu(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function Wa(e){if(hs>0&&!Is.has(e)&&Is.set(e,e.prevState),as.add(e),!(hs>0)&&!Er)try{for(Er=!0;as.size>0;){const t=Array.from(as);as.clear();for(const n of t){const s=Is.get(n)??n.prevState;n.prevState=s,$u(n)}for(const n of t){const s=xn.get(n);s&&(Js.current.push(n),Ka(s))}for(const n of t){const s=xn.get(n);if(s)for(const r of s)Bu(r)}}}finally{Er=!1,Js.current=[],Is.clear()}}function kr(e){hs++;try{e()}finally{if(hs--,hs===0){const t=Array.from(as)[0];t&&Wa(t)}}}function Zu(e){return typeof e=="function"}class yi{constructor(t,n){this.listeners=new Set,this.subscribe=s=>{var r,o;this.listeners.add(s);const i=(o=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:o.call(r,s,this);return()=>{this.listeners.delete(s),i==null||i()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,s,r;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):Zu(t)?this.state=t(this.prevState):this.state=t,(r=(s=this.options)==null?void 0:s.onUpdate)==null||r.call(s),Wa(this)}}class _n{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=[],s=[];for(const r of this.options.deps)n.push(r.prevState),s.push(r.state);return this.lastSeenDepValues=s,{prevDepVals:n,currDepVals:s,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,s;this.prevState=this.state;const{prevDepVals:r,currDepVals:o,prevVal:i}=this.getDepVals();this.state=this.options.fn({prevDepVals:r,currDepVals:o,prevVal:i}),(s=(n=this.options).onUpdate)==null||s.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const o of this.options.deps)o instanceof _n&&o.checkIfRecalculationNeededDeeply();let n=!1;const s=this.lastSeenDepValues,{currDepVals:r}=this.getDepVals();for(let o=0;o<r.length;o++)if(r[o]!==s[o]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var s,r;this.listeners.add(n);const o=(r=(s=this.options).onSubscribe)==null?void 0:r.call(s,n,this);return()=>{this.listeners.delete(n),o==null||o()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof _n)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof yi){let s=xn.get(n);s||(s=new Set,xn.set(n,s)),s.add(this);let r=Bs.get(this);r||(r=new Set,Bs.set(this,r)),r.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof _n)this.unregisterFromGraph(n.options.deps);else if(n instanceof yi){const s=xn.get(n);s&&s.delete(this);const r=Bs.get(this);r&&r.delete(n)}}}const Ft="__TSR_index",Ro="popstate",Po="beforeunload";function Ja(e){let t=e.getLocation();const n=new Set,s=i=>{t=e.getLocation(),n.forEach(a=>a({location:t,action:i}))},r=i=>{e.notifyOnIndexChange??!0?s(i):t=e.getLocation()},o=async({task:i,navigateOpts:a,...c})=>{var l,h;if((a==null?void 0:a.ignoreBlocker)??!1){i();return}const m=((l=e.getBlockers)==null?void 0:l.call(e))??[],g=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&m.length&&g)for(const y of m){const w=gs(c.path,c.state);if(await y.blockerFn({currentLocation:t,nextLocation:w,action:c.type})){(h=e.onBlocked)==null||h.call(e);return}}i()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:i=>(n.add(i),()=>{n.delete(i)}),push:(i,a,c)=>{const l=t.state[Ft];a=wi(l+1,a),o({task:()=>{e.pushState(i,a),s({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:i,state:a})},replace:(i,a,c)=>{const l=t.state[Ft];a=wi(l,a),o({task:()=>{e.replaceState(i,a),s({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:i,state:a})},go:(i,a)=>{o({task:()=>{e.go(i),r({type:"GO",index:i})},navigateOpts:a,type:"GO"})},back:i=>{o({task:()=>{e.back((i==null?void 0:i.ignoreBlocker)??!1),r({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{o({task:()=>{e.forward((i==null?void 0:i.ignoreBlocker)??!1),r({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>t.state[Ft]!==0,createHref:i=>e.createHref(i),block:i=>{var a;if(!e.setBlockers)return()=>{};const c=((a=e.getBlockers)==null?void 0:a.call(e))??[];return e.setBlockers([...c,i]),()=>{var l,h;const d=((l=e.getBlockers)==null?void 0:l.call(e))??[];(h=e.setBlockers)==null||h.call(e,d.filter(m=>m!==i))}},flush:()=>{var i;return(i=e.flush)==null?void 0:i.call(e)},destroy:()=>{var i;return(i=e.destroy)==null?void 0:i.call(e)},notify:s}}function wi(e,t){return t||(t={}),{...t,key:Fi(),[Ft]:e}}function zu(e){var t;const n=typeof document<"u"?window:void 0,s=n.history.pushState,r=n.history.replaceState;let o=[];const i=()=>o,a=x=>o=x,c=x=>x,l=()=>gs(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state);(t=n.history.state)!=null&&t.key||n.history.replaceState({[Ft]:0,key:Fi()},"");let h=l(),d,m=!1,g=!1,y=!1,w=!1;const b=()=>h;let _,E;const P=()=>{_&&(S._ignoreSubscribers=!0,(_.isPush?n.history.pushState:n.history.replaceState)(_.state,"",_.href),S._ignoreSubscribers=!1,_=void 0,E=void 0,d=void 0)},L=(x,F,D)=>{const N=c(F);E||(d=h),h=gs(F,D),_={href:N,state:D,isPush:(_==null?void 0:_.isPush)||x==="push"},E||(E=Promise.resolve().then(()=>P()))},I=x=>{h=l(),S.notify({type:x})},C=async()=>{if(g){g=!1;return}const x=l(),F=x.state[Ft]-h.state[Ft],D=F===1,N=F===-1,T=!D&&!N||m;m=!1;const V=T?"GO":N?"BACK":"FORWARD",$=T?{type:"GO",index:F}:{type:N?"BACK":"FORWARD"};if(y)y=!1;else{const U=i();if(typeof document<"u"&&U.length){for(const B of U)if(await B.blockerFn({currentLocation:h,nextLocation:x,action:V})){g=!0,n.history.go(1),S.notify($);return}}}h=l(),S.notify($)},M=x=>{if(w){w=!1;return}let F=!1;const D=i();if(typeof document<"u"&&D.length)for(const N of D){const T=N.enableBeforeUnload??!0;if(T===!0){F=!0;break}if(typeof T=="function"&&T()===!0){F=!0;break}}if(F)return x.preventDefault(),x.returnValue=""},S=Ja({getLocation:b,getLength:()=>n.history.length,pushState:(x,F)=>L("push",x,F),replaceState:(x,F)=>L("replace",x,F),back:x=>(x&&(y=!0),w=!0,n.history.back()),forward:x=>{x&&(y=!0),w=!0,n.history.forward()},go:x=>{m=!0,n.history.go(x)},createHref:x=>c(x),flush:P,destroy:()=>{n.history.pushState=s,n.history.replaceState=r,n.removeEventListener(Po,M,{capture:!0}),n.removeEventListener(Ro,C)},onBlocked:()=>{d&&h!==d&&(h=d)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(Po,M,{capture:!0}),n.addEventListener(Ro,C),n.history.pushState=function(...x){const F=s.apply(n.history,x);return S._ignoreSubscribers||I("PUSH"),F},n.history.replaceState=function(...x){const F=r.apply(n.history,x);return S._ignoreSubscribers||I("REPLACE"),F},S}function Ku(e={initialEntries:["/"]}){const t=e.initialEntries;let n=e.initialIndex?Math.min(Math.max(e.initialIndex,0),t.length-1):t.length-1;const s=t.map((o,i)=>wi(i,void 0));return Ja({getLocation:()=>gs(t[n],s[n]),getLength:()=>t.length,pushState:(o,i)=>{n<t.length-1&&(t.splice(n+1),s.splice(n+1)),s.push(i),t.push(o),n=Math.max(t.length-1,0)},replaceState:(o,i)=>{s[n]=i,t[n]=o},back:()=>{n=Math.max(n-1,0)},forward:()=>{n=Math.min(n+1,t.length-1)},go:o=>{n=Math.min(Math.max(n+o,0),t.length-1)},createHref:o=>o})}function gs(e,t){const n=e.indexOf("#"),s=e.indexOf("?");return{href:e,pathname:e.substring(0,n>0?s>0?Math.min(n,s):n:s>0?s:e.length),hash:n>-1?e.substring(n):"",search:s>-1?e.slice(s,n===-1?void 0:n):"",state:t||{[Ft]:0,key:Fi()}}}function Fi(){return(Math.random()+1).toString(36).substring(7)}function yn(e){return e[e.length-1]}function Wu(e){return typeof e=="function"}function Xt(e,t){return Wu(e)?e(t):e}function bi(e,t){return t.reduce((n,s)=>(n[s]=e[s],n),{})}function Fe(e,t){if(e===t)return e;const n=t,s=Co(e)&&Co(n);if(s||Qs(e)&&Qs(n)){const r=s?e:Object.keys(e),o=r.length,i=s?n:Object.keys(n),a=i.length,c=s?[]:{};let l=0;for(let h=0;h<a;h++){const d=s?h:i[h];(!s&&r.includes(d)||s)&&e[d]===void 0&&n[d]===void 0?(c[d]=void 0,l++):(c[d]=Fe(e[d],n[d]),c[d]===e[d]&&e[d]!==void 0&&l++)}return o===a&&l===o?e:c}return n}function Qs(e){if(!Ao(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Ao(n)||!n.hasOwnProperty("isPrototypeOf"))}function Ao(e){return Object.prototype.toString.call(e)==="[object Object]"}function Co(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Eo(e,t){let n=Object.keys(e);return t&&(n=n.filter(s=>e[s]!==void 0)),n}function Sn(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Qs(e)&&Qs(t)){const s=(n==null?void 0:n.ignoreUndefined)??!0,r=Eo(e,s),o=Eo(t,s);return!(n!=null&&n.partial)&&r.length!==o.length?!1:o.every(i=>Sn(e[i],t[i],n))}return Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:!e.some((s,r)=>!Sn(s,t[r],n)):!1}function vn(e){let t,n;const s=new Promise((r,o)=>{t=r,n=o});return s.status="pending",s.resolve=r=>{s.status="resolved",s.value=r,t(r),e==null||e(r)},s.reject=r=>{s.status="rejected",n(r)},s}function Ju(e){return/%[0-9A-Fa-f]{2}/.test(e)}function pt(e){return hr(e.filter(t=>t!==void 0).join("/"))}function hr(e){return e.replace(/\/{2,}/g,"/")}function Ti(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function en(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Qu(e){return en(Ti(e))}function Gs(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Gu(e,t,n){return Gs(e,n)===Gs(t,n)}function Yu({basepath:e,base:t,to:n,trailingSlash:s="never",caseSensitive:r}){var o,i;t=Ys(e,t,r),n=Ys(e,n,r);let a=qn(t);const c=qn(n);a.length>1&&((o=yn(a))==null?void 0:o.value)==="/"&&a.pop(),c.forEach((h,d)=>{h.value==="/"?d?d===c.length-1&&a.push(h):a=[h]:h.value===".."?a.pop():h.value==="."||a.push(h)}),a.length>1&&(((i=yn(a))==null?void 0:i.value)==="/"?s==="never"&&a.pop():s==="always"&&a.push({type:"pathname",value:"/"}));const l=pt([e,...a.map(h=>h.value)]);return hr(l)}function qn(e){if(!e)return[];e=hr(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map(s=>s==="$"||s==="*"?{type:"wildcard",value:s}:s.charAt(0)==="$"?{type:"param",value:s}:{type:"pathname",value:s.includes("%25")?s.split("%25").map(r=>decodeURI(r)).join("%25"):decodeURI(s)})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function Ns({path:e,params:t,leaveWildcards:n,leaveParams:s,decodeCharMap:r}){const o=qn(e);function i(l){const h=t[l],d=typeof h=="string";return["*","_splat"].includes(l)?d?encodeURI(h):h:d?Xu(h,r):h}const a={},c=pt(o.map(l=>{if(l.type==="wildcard"){a._splat=t._splat;const h=i("_splat");return n?`${l.value}${h??""}`:h}if(l.type==="param"){const h=l.value.substring(1);if(a[h]=t[h],s){const d=i(l.value);return`${l.value}${d??""}`}return i(h)??"undefined"}return l.value}));return{usedParams:a,interpolatedPath:c}}function Xu(e,t){let n=encodeURIComponent(e);if(t)for(const[s,r]of t)n=n.replaceAll(s,r);return n}function Fs(e,t,n){const s=ed(e,t,n);if(!(n.to&&!s))return s??{}}function Ys(e,t,n=!1){const s=n?e:e.toLowerCase(),r=n?t:t.toLowerCase();switch(!0){case s==="/":return t;case r===s:return"";case t.length<e.length:return t;case r[s.length]!=="/":return t;case r.startsWith(s):return t.slice(e.length);default:return t}}function ed(e,t,n){if(e!=="/"&&!t.startsWith(e))return;t=Ys(e,t,n.caseSensitive);const s=Ys(e,`${n.to??"$"}`,n.caseSensitive),r=qn(t),o=qn(s);t.startsWith("/")||r.unshift({type:"pathname",value:"/"}),s.startsWith("/")||o.unshift({type:"pathname",value:"/"});const i={};return(()=>{for(let c=0;c<Math.max(r.length,o.length);c++){const l=r[c],h=o[c],d=c>=r.length-1,m=c>=o.length-1;if(h){if(h.type==="wildcard"){const g=decodeURI(pt(r.slice(c).map(y=>y.value)));return i["*"]=g,i._splat=g,!0}if(h.type==="pathname"){if(h.value==="/"&&!(l!=null&&l.value))return!0;if(l){if(n.caseSensitive){if(h.value!==l.value)return!1}else if(h.value.toLowerCase()!==l.value.toLowerCase())return!1}}if(!l)return!1;if(h.type==="param"){if(l.value==="/")return!1;l.value.charAt(0)!=="$"&&(i[h.value.substring(1)]=decodeURIComponent(l.value))}}if(!d&&m)return i["**"]=pt(r.slice(c+1).map(g=>g.value)),!!n.fuzzy&&(h==null?void 0:h.value)!=="/"}return!0})()?i:void 0}function He(e){return!!(e!=null&&e.isNotFound)}const Xs="tsr-scroll-restoration-v1_3";let Qa=!1;try{Qa=typeof window<"u"&&typeof window.sessionStorage=="object"}catch{}const td=(e,t)=>{let n;return(...s)=>{n||(n=setTimeout(()=>{e(...s),n=null},t))}},wn=Qa?{state:JSON.parse(window.sessionStorage.getItem(Xs)||"null")||{},set:t=>(wn.state=Xt(t,wn.state)||wn.state,window.sessionStorage.setItem(Xs,JSON.stringify(wn.state)))}:void 0,xi=e=>e.state.key||e.href;function nd(e){const t=[];let n;for(;n=e.parentNode;)t.unshift(`${e.tagName}:nth-child(${[].indexOf.call(n.children,e)+1})`),e=n;return`${t.join(" > ")}`.toLowerCase()}let er=!1;function Ga(e,t,n,s,r){var o;let i;try{i=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(l){console.error(l);return}const a=t||((o=window.history.state)==null?void 0:o.key),c=i[a];er=!0,(()=>{if(s&&c){for(const h in c){const d=c[h];if(h==="window")window.scrollTo({top:d.scrollY,left:d.scrollX,behavior:n});else if(h){const m=document.querySelector(h);m&&(m.scrollLeft=d.scrollX,m.scrollTop=d.scrollY)}}return}const l=window.location.hash.split("#")[1];if(l){const h=(window.history.state||{}).__hashScrollIntoViewOptions??!0;if(h){const d=document.getElementById(l);d&&d.scrollIntoView(h)}return}["window",...(r==null?void 0:r.filter(h=>h!=="window"))??[]].forEach(h=>{const d=h==="window"?window:document.querySelector(h);d&&d.scrollTo({top:0,left:0,behavior:n})})})(),er=!1}function sd(e,t){if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),typeof document>"u"||e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,er=!1;const s=e.options.getScrollRestorationKey||xi;window.history.scrollRestoration="manual";const r=o=>{if(er||!e.isScrollRestoring)return;let i="";if(o.target===document||o.target===window)i="window";else{const c=o.target.getAttribute("data-scroll-restoration-id");c?i=`[data-scroll-restoration-id="${c}"]`:i=nd(o.target)}const a=s(e.state.location);wn.set(c=>{const l=c[a]=c[a]||{},h=l[i]=l[i]||{};if(i==="window")h.scrollX=window.scrollX||0,h.scrollY=window.scrollY||0;else if(i){const d=document.querySelector(i);d&&(h.scrollX=d.scrollLeft||0,h.scrollY=d.scrollTop||0)}return c})};typeof document<"u"&&document.addEventListener("scroll",td(r,100),!0),e.subscribe("onRendered",o=>{const i=s(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}Ga(Xs,i,e.options.scrollRestorationBehavior||void 0,e.isScrollRestoring||void 0,e.options.scrollToTopSelectors||void 0),e.isScrollRestoring&&wn.set(a=>(a[i]=a[i]||{},a))})}function rd(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function id(e,t){const n=Object.entries(e).flatMap(([r,o])=>Array.isArray(o)?o.map(i=>[r,String(i)]):[[r,String(o)]]);return""+new URLSearchParams(n).toString()}function jr(e){if(!e)return"";const t=Ju(e)?decodeURIComponent(e):decodeURIComponent(encodeURIComponent(e));return t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t}function od(e,t){const n=e;return[...new URLSearchParams(n).entries()].reduce((o,[i,a])=>{const c=o[i];return c==null?o[i]=jr(a):o[i]=Array.isArray(c)?[...c,jr(a)]:[c,jr(a)],o},{})}const ad=ld(JSON.parse),cd=ud(JSON.stringify,JSON.parse);function ld(e){return t=>{t.substring(0,1)==="?"&&(t=t.substring(1));const n=od(t);for(const s in n){const r=n[s];if(typeof r=="string")try{n[s]=e(r)}catch{}}return n}}function ud(e,t){function n(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(typeof s=="string"&&typeof t=="function")try{return t(s),e(s)}catch{}return s}return s=>{s={...s},Object.keys(s).forEach(o=>{const i=s[o];typeof i>"u"||i===void 0?delete s[o]:s[o]=n(i)});const r=id(s).toString();return r?`?${r}`:""}}const $e="__root__";function Gt(e){return!!(e!=null&&e.isRedirect)}function Or(e){return!!(e!=null&&e.isRedirect)&&e.href}function Rn(e){const t=e.resolvedLocation,n=e.location,s=(t==null?void 0:t.pathname)!==n.pathname,r=(t==null?void 0:t.href)!==n.href,o=(t==null?void 0:t.hash)!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:s,hrefChanged:r,hashChanged:o}}class dd{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var s;n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options;this.options={...this.options,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(o=>[encodeURIComponent(o),o])):void 0,(!this.basepath||n.basepath&&n.basepath!==r.basepath)&&(n.basepath===void 0||n.basepath===""||n.basepath==="/"?this.basepath="/":this.basepath=`/${Qu(n.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?Ku({initialEntries:[this.basepath||"/"]}):zu()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new yi(fd(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(o=>!["redirected"].includes(o.status))}}}),sd(this)),typeof window<"u"&&"CSS"in window&&typeof((s=window.CSS)==null?void 0:s.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[n.id]=n);const s=i=>{i.forEach((a,c)=>{a.init({originalIndex:c,defaultSsr:this.options.defaultSsr});const l=this.routesById[a.id];if(dt(!l,`Duplicate routes found with id: ${String(a.id)}`),this.routesById[a.id]=a,!a.isRoot&&a.path){const d=en(a.fullPath);(!this.routesByPath[d]||a.fullPath.endsWith("/"))&&(this.routesByPath[d]=a)}const h=a.children;h!=null&&h.length&&s(h)})};s([this.routeTree]);const r=[];Object.values(this.routesById).forEach((i,a)=>{var c;if(i.isRoot||!i.path)return;const l=Ti(i.fullPath),h=qn(l);for(;h.length>1&&((c=h[0])==null?void 0:c.value)==="/";)h.shift();const d=h.map(m=>m.value==="/"?.75:m.type==="param"?.5:m.type==="wildcard"?.25:1);r.push({child:i,trimmed:l,parsed:h,index:a,scores:d})}),this.flatRoutes=r.sort((i,a)=>{const c=Math.min(i.scores.length,a.scores.length);for(let l=0;l<c;l++)if(i.scores[l]!==a.scores[l])return a.scores[l]-i.scores[l];if(i.scores.length!==a.scores.length)return a.scores.length-i.scores.length;for(let l=0;l<c;l++)if(i.parsed[l].value!==a.parsed[l].value)return i.parsed[l].value>a.parsed[l].value?1:-1;return i.index-a.index}).map((i,a)=>(i.child.rank=a,i.child))},this.subscribe=(n,s)=>{const r={eventType:n,fn:s};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=n=>{this.subscribers.forEach(s=>{s.eventType===n.type&&s.fn(n)})},this.parseLocation=(n,s)=>{const r=({pathname:c,search:l,hash:h,state:d})=>{const m=this.options.parseSearch(l),g=this.options.stringifySearch(m);return{pathname:c,searchStr:g,search:Fe(n==null?void 0:n.search,m),hash:h.split("#").reverse()[0]??"",href:`${c}${g}${h}`,state:Fe(n==null?void 0:n.state,d)}},o=r(s??this.history.location),{__tempLocation:i,__tempKey:a}=o.state;if(i&&(!a||a===this.tempLocationKey)){const c=r(i);return c.state.key=o.state.key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(n,s)=>Yu({basepath:this.basepath,base:n,to:hr(s),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.matchRoutes=(n,s,r)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:s},r):this.matchRoutesInternal(n,s),this.getMatchedRoutes=(n,s)=>{let r={};const o=en(n.pathname),i=h=>Fs(this.basepath,o,{to:h.fullPath,caseSensitive:h.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let a=(s==null?void 0:s.to)!==void 0?this.routesByPath[s.to]:void 0;a?r=i(a):a=this.flatRoutes.find(h=>{const d=i(h);return d?(r=d,!0):!1});let c=a||this.routesById[$e];const l=[c];for(;c.parentRoute;)c=c.parentRoute,l.unshift(c);return{matchedRoutes:l,routeParams:r,foundRoute:a}},this.cancelMatch=n=>{const s=this.getMatch(n);s&&(s.abortController.abort(),clearTimeout(s.pendingTimeout))},this.cancelMatches=()=>{var n;(n=this.state.pendingMatches)==null||n.forEach(s=>{this.cancelMatch(s.id)})},this.buildLocation=n=>{const s=(o={},i)=>{var a,c,l,h,d,m,g;const y=o._fromLocation?this.matchRoutes(o._fromLocation,{_buildLocation:!0}):this.state.matches,w=o.from!=null?y.find(N=>Fs(this.basepath,en(N.pathname),{to:o.from,caseSensitive:!1,fuzzy:!1})):void 0,b=(w==null?void 0:w.pathname)||this.latestLocation.pathname;dt(o.from==null||w!=null,"Could not find match for from: "+o.from);const _=(a=this.state.pendingMatches)!=null&&a.length?(c=yn(this.state.pendingMatches))==null?void 0:c.search:((l=yn(y))==null?void 0:l.search)||this.latestLocation.search,E=i==null?void 0:i.matchedRoutes.filter(N=>y.find(T=>T.routeId===N.id));let P;if(o.to){const N=(w==null?void 0:w.fullPath)||((h=yn(y))==null?void 0:h.fullPath)||this.latestLocation.pathname;P=this.resolvePathWithBase(N,`${o.to}`)}else{const N=this.routesById[(d=E==null?void 0:E.find(T=>{const V=Ns({path:T.fullPath,params:(i==null?void 0:i.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;return pt([this.basepath,V])===b}))==null?void 0:d.id];P=this.resolvePathWithBase(b,(N==null?void 0:N.to)??b)}const L={...(m=yn(y))==null?void 0:m.params};let I=(o.params??!0)===!0?L:{...L,...Xt(o.params,L)};Object.keys(I).length>0&&(i==null||i.matchedRoutes.map(N=>{var T;return((T=N.options.params)==null?void 0:T.stringify)??N.options.stringifyParams}).filter(Boolean).forEach(N=>{I={...I,...N(I)}})),P=Ns({path:P,params:I??{},leaveWildcards:!1,leaveParams:n.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;let C=_;if(n._includeValidateSearch&&((g=this.options.search)!=null&&g.strict)){let N={};i==null||i.matchedRoutes.forEach(T=>{try{T.options.validateSearch&&(N={...N,...Mr(T.options.validateSearch,{...N,...C})??{}})}catch{}}),C=N}C=(N=>{const T=(i==null?void 0:i.matchedRoutes.reduce((U,B)=>{var Z;const Q=[];if("search"in B.options)(Z=B.options.search)!=null&&Z.middlewares&&Q.push(...B.options.search.middlewares);else if(B.options.preSearchFilters||B.options.postSearchFilters){const X=({search:G,next:ye})=>{let te=G;"preSearchFilters"in B.options&&B.options.preSearchFilters&&(te=B.options.preSearchFilters.reduce((oe,ae)=>ae(oe),G));const ne=ye(te);return"postSearchFilters"in B.options&&B.options.postSearchFilters?B.options.postSearchFilters.reduce((oe,ae)=>ae(oe),ne):ne};Q.push(X)}if(n._includeValidateSearch&&B.options.validateSearch){const X=({search:G,next:ye})=>{const te=ye(G);try{return{...te,...Mr(B.options.validateSearch,te)??{}}}catch{return te}};Q.push(X)}return U.concat(Q)},[]))??[],V=({search:U})=>o.search?o.search===!0?U:Xt(o.search,U):{};T.push(V);const $=(U,B)=>{if(U>=T.length)return B;const Z=T[U];return Z({search:B,next:X=>$(U+1,X)})};return $(0,N)})(C),C=Fe(_,C);const S=this.options.stringifySearch(C),x=o.hash===!0?this.latestLocation.hash:o.hash?Xt(o.hash,this.latestLocation.hash):void 0,F=x?`#${x}`:"";let D=o.state===!0?this.latestLocation.state:o.state?Xt(o.state,this.latestLocation.state):{};return D=Fe(this.latestLocation.state,D),{pathname:P,search:C,searchStr:S,state:D,hash:x??"",href:`${P}${S}${F}`,unmaskOnReload:o.unmaskOnReload}},r=(o={},i)=>{var a;const c=s(o);let l=i?s(i):void 0;if(!l){let m={};const g=(a=this.options.routeMasks)==null?void 0:a.find(y=>{const w=Fs(this.basepath,c.pathname,{to:y.from,caseSensitive:!1,fuzzy:!1});return w?(m=w,!0):!1});if(g){const{from:y,...w}=g;i={...bi(n,["from"]),...w,params:m},l=s(i)}}const h=this.getMatchedRoutes(c,o),d=s(o,h);if(l){const m=this.getMatchedRoutes(l,i),g=s(i,m);d.maskedLocation=g}return d};return n.mask?r(n,{...bi(n,["from"]),...n.mask}):r(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:s,...r})=>{const o=()=>{const c=["key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(h=>{r.state[h]=this.latestLocation.state[h]});const l=Sn(r.state,this.latestLocation.state);return c.forEach(h=>{delete r.state[h]}),l},i=this.latestLocation.href===r.href,a=this.commitLocationPromise;if(this.commitLocationPromise=vn(()=>{a==null||a.resolve()}),i&&o())this.load();else{let{maskedLocation:c,hashScrollIntoView:l,...h}=r;c&&(h={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=l??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[r.replace?"replace":"push"](h.href,h.state,{ignoreBlocker:s})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:s,hashScrollIntoView:r,viewTransition:o,ignoreBlocker:i,href:a,...c}={})=>{if(a){const h=this.history.location.state.__TSR_index,d=gs(a,{__TSR_index:n?h:h+1});c.to=d.pathname,c.search=this.options.parseSearch(d.search),c.hash=d.hash.slice(1)}const l=this.buildLocation({...c,_includeValidateSearch:!0});return this.commitLocation({...l,viewTransition:o,replace:n,resetScroll:s,hashScrollIntoView:r,ignoreBlocker:i})},this.navigate=({to:n,reloadDocument:s,href:r,...o})=>{if(s){if(!r){const i=this.buildLocation({to:n,...o});r=this.history.createHref(i.href)}o.replace?window.location.replace(r):window.location.href=r;return}return this.buildAndCommitLocation({...o,href:r,to:n})},this.load=async n=>{this.latestLocation=this.parseLocation(this.latestLocation);let s,r,o;for(o=new Promise(i=>{this.startTransition(async()=>{var a;try{const c=this.latestLocation,l=this.state.resolvedLocation;this.cancelMatches();let h;kr(()=>{h=this.matchRoutes(c),this.__store.setState(d=>({...d,status:"pending",isLoading:!0,location:c,pendingMatches:h,cachedMatches:d.cachedMatches.filter(m=>!h.find(g=>g.id===m.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",...Rn({resolvedLocation:l,location:c})}),this.emit({type:"onBeforeLoad",...Rn({resolvedLocation:l,location:c})}),await this.loadMatches({sync:n==null?void 0:n.sync,matches:h,location:c,onReady:async()=>{this.startViewTransition(async()=>{let d,m,g;kr(()=>{this.__store.setState(y=>{const w=y.matches,b=y.pendingMatches||y.matches;return d=w.filter(_=>!b.find(E=>E.id===_.id)),m=b.filter(_=>!w.find(E=>E.id===_.id)),g=w.filter(_=>b.find(E=>E.id===_.id)),{...y,isLoading:!1,loadedAt:Date.now(),matches:b,pendingMatches:void 0,cachedMatches:[...y.cachedMatches,...d.filter(_=>_.status!=="error")]}}),this.clearExpiredCache()}),[[d,"onLeave"],[m,"onEnter"],[g,"onStay"]].forEach(([y,w])=>{y.forEach(b=>{var _,E;(E=(_=this.looseRoutesById[b.routeId].options)[w])==null||E.call(_,b)})})})}})}catch(c){Or(c)?(s=c,this.isServer||this.navigate({...s,replace:!0,ignoreBlocker:!0})):He(c)&&(r=c),this.__store.setState(l=>({...l,statusCode:s?s.statusCode:r?404:l.matches.some(h=>h.status==="error")?500:200,redirect:s}))}this.latestLoadPromise===o&&((a=this.commitLocationPromise)==null||a.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;this.hasNotFoundMatch()&&this.__store.setState(i=>({...i,statusCode:404}))},this.startViewTransition=n=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;typeof s=="object"&&this.isViewTransitionTypesSupported?r={update:n,types:s.types}:r=n,document.startViewTransition(r)}else n()},this.updateMatch=(n,s)=>{var r;let o;const i=(r=this.state.pendingMatches)==null?void 0:r.find(h=>h.id===n),a=this.state.matches.find(h=>h.id===n),c=this.state.cachedMatches.find(h=>h.id===n),l=i?"pendingMatches":a?"matches":c?"cachedMatches":"";return l&&this.__store.setState(h=>{var d;return{...h,[l]:(d=h[l])==null?void 0:d.map(m=>m.id===n?o=s(m):m)}}),o},this.getMatch=n=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(s=>s.id===n),this.loadMatches=async({location:n,matches:s,preload:r,onReady:o,updateMatch:i=this.updateMatch,sync:a})=>{let c,l=!1;const h=async()=>{l||(l=!0,await(o==null?void 0:o()))},d=g=>!!(r&&!this.state.matches.find(y=>y.id===g));!this.isServer&&!this.state.matches.length&&h();const m=(g,y)=>{var w,b,_,E;if(Or(y)&&!y.reloadDocument)throw y;if(Gt(y)||He(y)){if(i(g.id,P=>({...P,status:Gt(y)?"redirected":He(y)?"notFound":"error",isFetching:!1,error:y,beforeLoadPromise:void 0,loaderPromise:void 0})),y.routeId||(y.routeId=g.routeId),(w=g.beforeLoadPromise)==null||w.resolve(),(b=g.loaderPromise)==null||b.resolve(),(_=g.loadPromise)==null||_.resolve(),Gt(y))throw l=!0,y=this.resolveRedirect({...y,_fromLocation:n}),y;if(He(y))throw this._handleNotFound(s,y,{updateMatch:i}),(E=this.serverSsr)==null||E.onMatchSettled({router:this,match:this.getMatch(g.id)}),y}};try{await new Promise((g,y)=>{(async()=>{var w,b,_,E;try{const P=(C,M,S)=>{var x,F;const{id:D,routeId:N}=s[C],T=this.looseRoutesById[N];if(M instanceof Promise)throw M;M.routerCode=S,c=c??C,m(this.getMatch(D),M);try{(F=(x=T.options).onError)==null||F.call(x,M)}catch(V){M=V,m(this.getMatch(D),M)}i(D,V=>{var $,U;return($=V.beforeLoadPromise)==null||$.resolve(),(U=V.loadPromise)==null||U.resolve(),{...V,error:M,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[C,{id:M,routeId:S}]of s.entries()){const x=this.getMatch(M),F=(w=s[C-1])==null?void 0:w.id,D=this.looseRoutesById[S],N=D.options.pendingMs??this.options.defaultPendingMs,T=!!(o&&!this.isServer&&!d(M)&&(D.options.loader||D.options.beforeLoad)&&typeof N=="number"&&N!==1/0&&(D.options.pendingComponent??((b=this.options)==null?void 0:b.defaultPendingComponent)));let V=!0;if((x.beforeLoadPromise||x.loaderPromise)&&(T&&setTimeout(()=>{try{h()}catch{}},N),await x.beforeLoadPromise,V=this.getMatch(M).status!=="success"),V){try{i(M,ce=>{const Y=ce.loadPromise;return{...ce,loadPromise:vn(()=>{Y==null||Y.resolve()}),beforeLoadPromise:vn()}});const $=new AbortController;let U;T&&(U=setTimeout(()=>{try{h()}catch{}},N));const{paramsError:B,searchError:Z}=this.getMatch(M);B&&P(C,B,"PARSE_PARAMS"),Z&&P(C,Z,"VALIDATE_SEARCH");const Q=()=>F?this.getMatch(F).context:this.options.context??{};i(M,ce=>({...ce,isFetching:"beforeLoad",fetchCount:ce.fetchCount+1,abortController:$,pendingTimeout:U,context:{...Q(),...ce.__routeContext}}));const{search:X,params:G,context:ye,cause:te}=this.getMatch(M),ne=d(M),oe={search:X,abortController:$,params:G,preload:ne,context:ye,location:n,navigate:ce=>this.navigate({...ce,_fromLocation:n}),buildLocation:this.buildLocation,cause:ne?"preload":te,matches:s},ae=await((E=(_=D.options).beforeLoad)==null?void 0:E.call(_,oe))??{};(Gt(ae)||He(ae))&&P(C,ae,"BEFORE_LOAD"),i(M,ce=>({...ce,__beforeLoadContext:ae,context:{...Q(),...ce.__routeContext,...ae},abortController:$}))}catch($){P(C,$,"BEFORE_LOAD")}i(M,$=>{var U;return(U=$.beforeLoadPromise)==null||U.resolve(),{...$,beforeLoadPromise:void 0,isFetching:!1}})}}const L=s.slice(0,c),I=[];L.forEach(({id:C,routeId:M},S)=>{I.push((async()=>{const{loaderPromise:x}=this.getMatch(C);let F=!1,D=!1;if(x){await x;const N=this.getMatch(C);N.error&&m(N,N.error)}else{const N=I[S-1],T=this.looseRoutesById[M],V=()=>{const{params:te,loaderDeps:ne,abortController:oe,context:ae,cause:ce}=this.getMatch(C),Y=d(C);return{params:te,deps:ne,preload:!!Y,parentMatchPromise:N,abortController:oe,context:ae,location:n,navigate:ie=>this.navigate({...ie,_fromLocation:n}),cause:Y?"preload":ce,route:T}},$=Date.now()-this.getMatch(C).updatedAt,U=d(C),B=U?T.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:T.options.staleTime??this.options.defaultStaleTime??0,Z=T.options.shouldReload,Q=typeof Z=="function"?Z(V()):Z;i(C,te=>({...te,loaderPromise:vn(),preload:!!U&&!this.state.matches.find(ne=>ne.id===C)}));const X=async()=>{var te,ne,oe,ae,ce,Y,ie,We,Ie,Je,Ne;try{const je=async()=>{const he=this.getMatch(C);he.minPendingPromise&&await he.minPendingPromise};try{this.loadRouteChunk(T),i(C,Wt=>({...Wt,isFetching:"loader"}));const he=await((ne=(te=T.options).loader)==null?void 0:ne.call(te,V()));m(this.getMatch(C),he),await T._lazyPromise,await je();const we={matches:s,match:this.getMatch(C),params:this.getMatch(C).params,loaderData:he},pe=(ae=(oe=T.options).head)==null?void 0:ae.call(oe,we),bt=pe==null?void 0:pe.meta,ot=pe==null?void 0:pe.links,js=pe==null?void 0:pe.scripts,se=(Y=(ce=T.options).scripts)==null?void 0:Y.call(ce,we),le=(We=(ie=T.options).headers)==null?void 0:We.call(ie,{loaderData:he});i(C,Wt=>({...Wt,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:he,meta:bt,links:ot,headScripts:js,headers:le,scripts:se}))}catch(he){let we=he;await je(),m(this.getMatch(C),he);try{(Je=(Ie=T.options).onError)==null||Je.call(Ie,he)}catch(pe){we=pe,m(this.getMatch(C),pe)}i(C,pe=>({...pe,error:we,status:"error",isFetching:!1}))}(Ne=this.serverSsr)==null||Ne.onMatchSettled({router:this,match:this.getMatch(C)}),await T._componentsPromise}catch(je){i(C,he=>({...he,loaderPromise:void 0})),m(this.getMatch(C),je)}},{status:G,invalid:ye}=this.getMatch(C);F=G==="success"&&(ye||(Q??$>B)),U&&T.options.preload===!1||(F&&!a?(D=!0,(async()=>{try{await X();const{loaderPromise:te,loadPromise:ne}=this.getMatch(C);te==null||te.resolve(),ne==null||ne.resolve(),i(C,oe=>({...oe,loaderPromise:void 0}))}catch(te){Or(te)&&await this.navigate(te)}})()):(G!=="success"||F&&a)&&await X())}if(!D){const{loaderPromise:N,loadPromise:T}=this.getMatch(C);N==null||N.resolve(),T==null||T.resolve()}return i(C,N=>({...N,isFetching:D?N.isFetching:!1,loaderPromise:D?N.loaderPromise:void 0,invalid:!1})),this.getMatch(C)})())}),await Promise.all(I),g()}catch(P){y(P)}})()}),await h()}catch(g){if(Gt(g)||He(g))throw He(g)&&!r&&await h(),g}return s},this.invalidate=n=>{const s=r=>{var o;return((o=n==null?void 0:n.filter)==null?void 0:o.call(n,r))??!0?{...r,invalid:!0,...r.status==="error"?{status:"pending",error:void 0}:{}}:r};return this.__store.setState(r=>{var o;return{...r,matches:r.matches.map(s),cachedMatches:r.cachedMatches.map(s),pendingMatches:(o=r.pendingMatches)==null?void 0:o.map(s)}}),this.load({sync:n==null?void 0:n.sync})},this.resolveRedirect=n=>{const s=n;return s.href||(s.href=this.buildLocation(s).href),s},this.clearCache=n=>{const s=n==null?void 0:n.filter;s!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(o=>!s(o))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=s=>{const r=this.looseRoutesById[s.routeId];if(!r.options.loader)return!0;const o=(s.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(s.status!=="error"&&Date.now()-s.updatedAt<o)};this.clearCache({filter:n})},this.loadRouteChunk=n=>(n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(s=>{const{id:r,...o}=s.options;Object.assign(n.options,o)}):n._lazyPromise=Promise.resolve()),n._componentsPromise===void 0&&(n._componentsPromise=n._lazyPromise.then(()=>Promise.all(Ya.map(async s=>{const r=n.options[s];r!=null&&r.preload&&await r.preload()})))),n._componentsPromise),this.preloadRoute=async n=>{const s=this.buildLocation(n);let r=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(a=>a.id)),i=new Set([...o,...this.state.cachedMatches.map(a=>a.id)]);kr(()=>{r.forEach(a=>{i.has(a.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,a]}))})});try{return r=await this.loadMatches({matches:r,location:s,preload:!0,updateMatch:(a,c)=>{o.has(a)?r=r.map(l=>l.id===a?c(l):l):this.updateMatch(a,c)}}),r}catch(a){if(Gt(a))return a.reloadDocument?void 0:await this.preloadRoute({...a,_fromLocation:s});He(a)||console.error(a);return}},this.matchRoute=(n,s)=>{const r={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(r);if(s!=null&&s.pending&&this.state.status!=="pending")return!1;const a=((s==null?void 0:s.pending)===void 0?!this.state.isLoading:s.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,c=Fs(this.basepath,a.pathname,{...s,to:o.pathname});return!c||n.params&&!Sn(c,n.params,{partial:!0})?!1:c&&((s==null?void 0:s.includeSearch)??!0)?Sn(a.search,o.search,{partial:!0})?c:!1:c},this._handleNotFound=(n,s,{updateMatch:r=this.updateMatch}={})=>{var o;const i=this.routesById[s.routeId??""]??this.routeTree,a={};for(const l of n)a[l.routeId]=l;!i.options.notFoundComponent&&((o=this.options)!=null&&o.defaultNotFoundComponent)&&(i.options.notFoundComponent=this.options.defaultNotFoundComponent),dt(i.options.notFoundComponent);const c=a[i.id];dt(c,"Could not find match for route: "+i.id),r(c.id,l=>({...l,status:"notFound",error:s,isFetching:!1})),s.routerCode==="BEFORE_LOAD"&&i.parentRoute&&(s.routeId=i.parentRoute.id,this._handleNotFound(n,s,{updateMatch:r}))},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??cd,parseSearch:t.parseSearch??ad}),typeof document<"u"&&(window.__TSR_ROUTER__=this)}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const{foundRoute:s,matchedRoutes:r,routeParams:o}=this.getMatchedRoutes(t,n==null?void 0:n.dest);let i=!1;(s?s.path!=="/"&&o["**"]:en(t.pathname))&&(this.options.notFoundRoute?r.push(this.options.notFoundRoute):i=!0);const a=(()=>{if(i){if(this.options.notFoundMode!=="root")for(let d=r.length-1;d>=0;d--){const m=r[d];if(m.children)return m.id}return $e}})(),c=r.map(d=>{var m;let g;const y=((m=d.options.params)==null?void 0:m.parse)??d.options.parseParams;if(y)try{const w=y(o);Object.assign(o,w)}catch(w){if(g=new hd(w.message,{cause:w}),n!=null&&n.throwOnError)throw g;return g}}),l=[],h=d=>(d==null?void 0:d.id)?d.context??this.options.context??{}:this.options.context??{};return r.forEach((d,m)=>{var g,y;const w=l[m-1],[b,_,E]=(()=>{const T=(w==null?void 0:w.search)??t.search,V=(w==null?void 0:w._strictSearch)??{};try{const $=Mr(d.options.validateSearch,{...T})??{};return[{...T,...$},{...V,...$},void 0]}catch($){let U=$;if($ instanceof tr||(U=new tr($.message,{cause:$})),n!=null&&n.throwOnError)throw U;return[T,{},U]}})(),P=((y=(g=d.options).loaderDeps)==null?void 0:y.call(g,{search:b}))??"",L=P?JSON.stringify(P):"",{usedParams:I,interpolatedPath:C}=Ns({path:d.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),M=Ns({path:d.id,params:o,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath+L,S=this.getMatch(M),x=this.state.matches.find(T=>T.routeId===d.id),F=x?"stay":"enter";let D;if(S)D={...S,cause:F,params:x?Fe(x.params,o):o,_strictParams:I,search:Fe(x?x.search:S.search,b),_strictSearch:_};else{const T=d.options.loader||d.options.beforeLoad||d.lazyFn||pd(d)?"pending":"success";D={id:M,index:m,routeId:d.id,params:x?Fe(x.params,o):o,_strictParams:I,pathname:pt([this.basepath,C]),updatedAt:Date.now(),search:x?Fe(x.search,b):b,_strictSearch:_,searchError:void 0,status:T,isFetching:!1,error:void 0,paramsError:c[m],__routeContext:{},__beforeLoadContext:{},context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:x?Fe(x.loaderDeps,P):P,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:d.options.staticData||{},loadPromise:vn(),fullPath:d.fullPath}}n!=null&&n.preload||(D.globalNotFound=a===d.id),D.searchError=E;const N=h(w);D.context={...N,...D.__routeContext,...D.__beforeLoadContext},l.push(D)}),l.forEach((d,m)=>{var g,y,w,b,_,E,P,L;const I=this.looseRoutesById[d.routeId];if(!this.getMatch(d.id)&&(n==null?void 0:n._buildLocation)!==!0){const M=l[m-1],S=h(M),x={deps:d.loaderDeps,params:d.params,context:S,location:t,navigate:F=>this.navigate({...F,_fromLocation:t}),buildLocation:this.buildLocation,cause:d.cause,abortController:d.abortController,preload:!!d.preload,matches:l};d.__routeContext=((y=(g=I.options).context)==null?void 0:y.call(g,x))??{},d.context={...S,...d.__routeContext,...d.__beforeLoadContext}}if(d.status==="success"){d.headers=(b=(w=I.options).headers)==null?void 0:b.call(w,{loaderData:d.loaderData});const M={matches:l,match:d,params:d.params,loaderData:d.loaderData},S=(E=(_=I.options).head)==null?void 0:E.call(_,M);d.links=S==null?void 0:S.links,d.headScripts=S==null?void 0:S.scripts,d.meta=S==null?void 0:S.meta,d.scripts=(L=(P=I.options).scripts)==null?void 0:L.call(P,M)}}),l}}class tr extends Error{}class hd extends Error{}function fd(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Mr(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new tr("Async validation not supported");if(n.issues)throw new tr(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}const Ya=["component","errorComponent","pendingComponent","notFoundComponent"];function pd(e){var t;for(const n of Ya)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const md="Error preloading route! ☝️";class Xa{constructor(t){if(this.init=n=>{var s,r;this.originalIndex=n.originalIndex;const o=this.options,i=!(o!=null&&o.path)&&!(o!=null&&o.id);if(this.parentRoute=(r=(s=this.options).getParentRoute)==null?void 0:r.call(s),i)this._path=$e;else if(!this.parentRoute)throw new Error("Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");let a=i?$e:o==null?void 0:o.path;a&&a!=="/"&&(a=Ti(a));const c=(o==null?void 0:o.id)||a;let l=i?$e:pt([this.parentRoute.id===$e?"":this.parentRoute.id,c]);a===$e&&(a="/"),l!==$e&&(l=pt(["/",l]));const h=l===$e?"/":pt([this.parentRoute.fullPath,a]);this._path=a,this._id=l,this._fullPath=h,this._to=h,this._ssr=(o==null?void 0:o.ssr)??n.defaultSsr??!0},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}get ssr(){return this._ssr}}class gd extends Xa{constructor(t){super(t)}}function Di(e){const t=e.errorComponent??fr;return u.jsx(vd,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:s})=>n?p.createElement(t,{error:n,reset:s}):e.children})}class vd extends p.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function fr({error:e}){const[t,n]=p.useState(!1);return u.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[u.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),u.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(s=>!s),children:t?"Hide Error":"Show Error"})]}),u.jsx("div",{style:{height:".25rem"}}),t?u.jsx("div",{children:u.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?u.jsx("code",{children:e.message}):null})}):null]})}var Lr={exports:{}},Ir={},Nr={exports:{}},Fr={};/**
2
+ * @license React
3
+ * use-sync-external-store-shim.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var ko;function yd(){if(ko)return Fr;ko=1;var e=_a();function t(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}var n=typeof Object.is=="function"?Object.is:t,s=e.useState,r=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function a(d,m){var g=m(),y=s({inst:{value:g,getSnapshot:m}}),w=y[0].inst,b=y[1];return o(function(){w.value=g,w.getSnapshot=m,c(w)&&b({inst:w})},[d,g,m]),r(function(){return c(w)&&b({inst:w}),d(function(){c(w)&&b({inst:w})})},[d]),i(g),g}function c(d){var m=d.getSnapshot;d=d.value;try{var g=m();return!n(d,g)}catch{return!0}}function l(d,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:a;return Fr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Fr}var jo;function wd(){return jo||(jo=1,Nr.exports=yd()),Nr.exports}/**
10
+ * @license React
11
+ * use-sync-external-store-shim/with-selector.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Oo;function bd(){if(Oo)return Ir;Oo=1;var e=_a(),t=wd();function n(l,h){return l===h&&(l!==0||1/l===1/h)||l!==l&&h!==h}var s=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,c=e.useDebugValue;return Ir.useSyncExternalStoreWithSelector=function(l,h,d,m,g){var y=o(null);if(y.current===null){var w={hasValue:!1,value:null};y.current=w}else w=y.current;y=a(function(){function _(C){if(!E){if(E=!0,P=C,C=m(C),g!==void 0&&w.hasValue){var M=w.value;if(g(M,C))return L=M}return L=C}if(M=L,s(P,C))return M;var S=m(C);return g!==void 0&&g(M,S)?(P=C,M):(P=C,L=S)}var E=!1,P,L,I=d===void 0?null:d;return[function(){return _(h())},I===null?void 0:function(){return _(I())}]},[h,d,m,g]);var b=r(l,y[0],y[1]);return i(function(){w.hasValue=!0,w.value=b},[b]),c(b),b},Ir}var Mo;function xd(){return Mo||(Mo=1,Lr.exports=bd()),Lr.exports}var _d=xd();function Sd(e,t=n=>n){return _d.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,Rd)}function Rd(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[s,r]of e)if(!t.has(s)||!Object.is(r,t.get(s)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let s=0;s<n.length;s++)if(!Object.prototype.hasOwnProperty.call(t,n[s])||!Object.is(e[n[s]],t[n[s]]))return!1;return!0}const Tr=p.createContext(null);function ec(){return typeof document>"u"?Tr:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Tr,Tr)}function Le(e){const t=p.useContext(ec());return e==null||e.warn,t}function ve(e){const t=Le({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,s=p.useRef(void 0);return Sd(n.__store,r=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=Fe(s.current,e.select(r));return s.current=o,o}return e.select(r)}return r})}const pr=p.createContext(void 0),Pd=p.createContext(void 0);function Dt(e){const t=p.useContext(e.from?Pd:pr);return ve({select:s=>{const r=s.matches.find(o=>e.from?e.from===o.routeId:o.id===t);if(dt(!((e.shouldThrow??!0)&&!r),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),r!==void 0)return e.select?e.select(r):r},structuralSharing:e.structuralSharing})}function tc(e){return Dt({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function nc(e){const{select:t,...n}=e;return Dt({...n,select:s=>t?t(s.loaderDeps):s.loaderDeps})}function sc(e){return Dt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.params):t.params})}function rc(e){return Dt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function ic(e){const{navigate:t}=Le();return p.useCallback(n=>t({from:e==null?void 0:e.from,...n}),[e==null?void 0:e.from,t])}let Ad=class extends Xa{constructor(t){super(t),this.useMatch=n=>Dt({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Dt({...n,from:this.id,select:s=>n!=null&&n.select?n.select(s.context):s.context}),this.useSearch=n=>rc({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>sc({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>nc({...n,from:this.id}),this.useLoaderData=n=>tc({...n,from:this.id}),this.useNavigate=()=>ic({from:this.fullPath}),this.$$typeof=Symbol.for("react.memo")}};function _i(e){return new Ad(e)}let Cd=class extends gd{constructor(t){super(t),this.useMatch=n=>Dt({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Dt({...n,from:this.id,select:s=>n!=null&&n.select?n.select(s.context):s.context}),this.useSearch=n=>rc({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>sc({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>nc({...n,from:this.id}),this.useLoaderData=n=>tc({...n,from:this.id}),this.useNavigate=()=>ic({from:this.fullPath}),this.$$typeof=Symbol.for("react.memo")}};function Ed(e){return new Cd(e)}function kd(e){const t=ve({select:n=>`not-found-${n.location.pathname}-${n.status}`});return u.jsx(Di,{getResetKey:()=>t,onCatch:(n,s)=>{var r;if(He(n))(r=e.onCatch)==null||r.call(e,n,s);else throw n},errorComponent:({error:n})=>{var s;if(He(n))return(s=e.fallback)==null?void 0:s.call(e,n);throw n},children:e.children})}function jd(){return u.jsx("p",{children:"Not Found"})}function Zs(e){return u.jsx(u.Fragment,{children:e.children})}function oc(e,t,n){return t.options.notFoundComponent?u.jsx(t.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?u.jsx(e.options.defaultNotFoundComponent,{data:n}):u.jsx(jd,{})}var Dr,Lo;function Od(){if(Lo)return Dr;Lo=1;const e={},t=e.hasOwnProperty,n=(S,x)=>{for(const F in S)t.call(S,F)&&x(F,S[F])},s=(S,x)=>(x&&n(x,(F,D)=>{S[F]=D}),S),r=(S,x)=>{const F=S.length;let D=-1;for(;++D<F;)x(S[D])},o=S=>"\\u"+("0000"+S).slice(-4),i=(S,x)=>{let F=S.toString(16);return x?F:F.toUpperCase()},a=e.toString,c=Array.isArray,l=S=>typeof Buffer=="function"&&Buffer.isBuffer(S),h=S=>a.call(S)=="[object Object]",d=S=>typeof S=="string"||a.call(S)=="[object String]",m=S=>typeof S=="number"||a.call(S)=="[object Number]",g=S=>typeof S=="bigint",y=S=>typeof S=="function",w=S=>a.call(S)=="[object Map]",b=S=>a.call(S)=="[object Set]",_={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},E=/[\\\b\f\n\r\t]/,P=/[0-9]/,L=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,I=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,C=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,M=(S,x)=>{const F=()=>{B=U,++x.indentLevel,U=x.indent.repeat(x.indentLevel)},D={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:" ",indentLevel:0,__inline1__:!1,__inline2__:!1},N=x&&x.json;N&&(D.quotes="double",D.wrap=!0),x=s(D,x),x.quotes!="single"&&x.quotes!="double"&&x.quotes!="backtick"&&(x.quotes="single");const T=x.quotes=="double"?'"':x.quotes=="backtick"?"`":"'",V=x.compact,$=x.lowercaseHex;let U=x.indent.repeat(x.indentLevel),B="";const Z=x.__inline1__,Q=x.__inline2__,X=V?"":`
18
+ `;let G,ye=!0;const te=x.numbers=="binary",ne=x.numbers=="octal",oe=x.numbers=="decimal",ae=x.numbers=="hexadecimal";if(N&&S&&y(S.toJSON)&&(S=S.toJSON()),!d(S)){if(w(S))return S.size==0?"new Map()":(V||(x.__inline1__=!0,x.__inline2__=!1),"new Map("+M(Array.from(S),x)+")");if(b(S))return S.size==0?"new Set()":"new Set("+M(Array.from(S),x)+")";if(l(S))return S.length==0?"Buffer.from([])":"Buffer.from("+M(Array.from(S),x)+")";if(c(S))return G=[],x.wrap=!0,Z&&(x.__inline1__=!1,x.__inline2__=!0),Q||F(),r(S,Y=>{ye=!1,Q&&(x.__inline2__=!1),G.push((V||Q?"":U)+M(Y,x))}),ye?"[]":Q?"["+G.join(", ")+"]":"["+X+G.join(","+X)+X+(V?"":B)+"]";if(m(S)||g(S)){if(N)return JSON.stringify(Number(S));let Y;if(oe)Y=String(S);else if(ae){let ie=S.toString(16);$||(ie=ie.toUpperCase()),Y="0x"+ie}else te?Y="0b"+S.toString(2):ne&&(Y="0o"+S.toString(8));return g(S)?Y+"n":Y}else return g(S)?N?JSON.stringify(Number(S)):S+"n":h(S)?(G=[],x.wrap=!0,F(),n(S,(Y,ie)=>{ye=!1,G.push((V?"":U)+M(Y,x)+":"+(V?"":" ")+M(ie,x))}),ye?"{}":"{"+X+G.join(","+X)+X+(V?"":B)+"}"):N?JSON.stringify(S)||"null":String(S)}const ce=x.escapeEverything?I:C;return G=S.replace(ce,(Y,ie,We,Ie,Je,Ne)=>{if(ie){if(x.minimal)return ie;const he=ie.charCodeAt(0),we=ie.charCodeAt(1);if(x.es6){const pe=(he-55296)*1024+we-56320+65536;return"\\u{"+i(pe,$)+"}"}return o(i(he,$))+o(i(we,$))}if(We)return o(i(We.charCodeAt(0),$));if(Y=="\0"&&!N&&!P.test(Ne.charAt(Je+1)))return"\\0";if(Ie)return Ie==T||x.escapeEverything?"\\"+Ie:Ie;if(E.test(Y))return _[Y];if(x.minimal&&!L.test(Y))return Y;const je=i(Y.charCodeAt(0),$);return N||je.length>2?o(je):"\\x"+("00"+je).slice(-2)}),T=="`"&&(G=G.replace(/\$\{/g,"\\${")),x.isScriptContext&&(G=G.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,N?"\\u003C!--":"\\x3C!--")),x.wrap&&(G=T+G+T),G};return M.version="3.0.2",Dr=M,Dr}Od();function Md({children:e,log:t}){return typeof document<"u"?null:u.jsx("script",{className:"tsr-once",dangerouslySetInnerHTML:{__html:[e,"",'if (typeof __TSR_SSR__ !== "undefined") __TSR_SSR__.cleanScripts()'].filter(Boolean).join(`
19
+ `)}})}function Ld(){const e=Le(),n=(e.options.getScrollRestorationKey||xi)(e.latestLocation),s=n!==xi(e.latestLocation)?n:null;return!e.isScrollRestoring||!e.isServer?null:u.jsx(Md,{children:`(${Ga.toString()})(${JSON.stringify(Xs)},${JSON.stringify(s)}, undefined, true)`,log:!1})}const ac=p.memo(function({matchId:t}){var n,s;const r=Le(),o=ve({select:_=>{var E;return(E=_.matches.find(P=>P.id===t))==null?void 0:E.routeId}});dt(o);const i=r.routesById[o],a=i.options.pendingComponent??r.options.defaultPendingComponent,c=a?u.jsx(a,{}):null,l=i.options.errorComponent??r.options.defaultErrorComponent,h=i.options.onCatch??r.options.defaultOnCatch,d=i.isRoot?i.options.notFoundComponent??((n=r.options.notFoundRoute)==null?void 0:n.options.component):i.options.notFoundComponent,m=(!i.isRoot||i.options.wrapInSuspense)&&(i.options.wrapInSuspense??a??((s=i.options.errorComponent)==null?void 0:s.preload))?p.Suspense:Zs,g=l?Di:Zs,y=d?kd:Zs,w=ve({select:_=>_.loadedAt}),b=ve({select:_=>{var E;const P=_.matches.findIndex(L=>L.id===t);return(E=_.matches[P-1])==null?void 0:E.routeId}});return u.jsxs(u.Fragment,{children:[u.jsx(pr.Provider,{value:t,children:u.jsx(m,{fallback:c,children:u.jsx(g,{getResetKey:()=>w,errorComponent:l||fr,onCatch:(_,E)=>{if(He(_))throw _;h==null||h(_,E)},children:u.jsx(y,{fallback:_=>{if(!d||_.routeId&&_.routeId!==o||!_.routeId&&!i.isRoot)throw _;return p.createElement(d,_)},children:u.jsx(Nd,{matchId:t})})})})}),b===$e&&r.options.scrollRestoration?u.jsxs(u.Fragment,{children:[u.jsx(Id,{}),u.jsx(Ld,{})]}):null]})});function Id(){var e;const t=Le(),n=p.useRef(void 0);return u.jsx("script",{suppressHydrationWarning:!0,ref:s=>{var r;s&&(n.current===void 0||n.current.href!==((r=t.state.resolvedLocation)==null?void 0:r.href))&&(t.emit({type:"onRendered",...Rn(t.state)}),n.current=t.state.resolvedLocation)}},(e=t.state.resolvedLocation)==null?void 0:e.state.key)}const Nd=p.memo(function({matchId:t}){var n,s,r;const o=Le(),{match:i,key:a,routeId:c}=ve({select:m=>{const g=m.matches.findIndex(P=>P.id===t),y=m.matches[g],w=y.routeId,b=o.routesById[w].options.remountDeps??o.options.defaultRemountDeps,_=b==null?void 0:b({routeId:w,loaderDeps:y.loaderDeps,params:y._strictParams,search:y._strictSearch});return{key:_?JSON.stringify(_):void 0,routeId:w,match:bi(y,["id","status","error"])}},structuralSharing:!0}),l=o.routesById[c],h=p.useMemo(()=>{const m=l.options.component??o.options.defaultComponent;return m?u.jsx(m,{},a):u.jsx(Hi,{})},[a,l.options.component,o.options.defaultComponent]),d=(l.options.errorComponent??o.options.defaultErrorComponent)||fr;if(i.status==="notFound")return dt(He(i.error)),oc(o,l,i.error);if(i.status==="redirected")throw dt(Gt(i.error)),(n=o.getMatch(i.id))==null?void 0:n.loadPromise;if(i.status==="error"){if(o.isServer)return u.jsx(d,{error:i.error,reset:void 0,info:{componentStack:""}});throw i.error}if(i.status==="pending"){const m=l.options.pendingMinMs??o.options.defaultPendingMinMs;if(m&&!((s=o.getMatch(i.id))!=null&&s.minPendingPromise)&&!o.isServer){const g=vn();Promise.resolve().then(()=>{o.updateMatch(i.id,y=>({...y,minPendingPromise:g}))}),setTimeout(()=>{g.resolve(),o.updateMatch(i.id,y=>({...y,minPendingPromise:void 0}))},m)}throw(r=o.getMatch(i.id))==null?void 0:r.loadPromise}return h}),Hi=p.memo(function(){const t=Le(),n=p.useContext(pr),s=ve({select:l=>{var h;return(h=l.matches.find(d=>d.id===n))==null?void 0:h.routeId}}),r=t.routesById[s],o=ve({select:l=>{const d=l.matches.find(m=>m.id===n);return dt(d),d.globalNotFound}}),i=ve({select:l=>{var h;const d=l.matches,m=d.findIndex(g=>g.id===n);return(h=d[m+1])==null?void 0:h.id}});if(o)return oc(t,r,void 0);if(!i)return null;const a=u.jsx(ac,{matchId:i}),c=t.options.defaultPendingComponent?u.jsx(t.options.defaultPendingComponent,{}):null;return n===$e?u.jsx(p.Suspense,{fallback:c,children:a}):a}),cs=typeof window<"u"?p.useLayoutEffect:p.useEffect;function Hr(e){const t=p.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Fd(e,t,n={},s={}){const r=p.useRef(typeof IntersectionObserver=="function"),o=p.useRef(null);return p.useEffect(()=>{if(!(!e.current||!r.current||s.disabled))return o.current=new IntersectionObserver(([i])=>{t(i)},n),o.current.observe(e.current),()=>{var i;(i=o.current)==null||i.disconnect()}},[t,n,s.disabled,e]),o.current}function Td(e){const t=p.useRef(null);return p.useImperativeHandle(e,()=>t.current,[]),t}function Dd(){const e=Le(),t=p.useRef({router:e,mounted:!1}),n=ve({select:({isLoading:d})=>d}),[s,r]=p.useState(!1),o=ve({select:d=>d.matches.some(m=>m.status==="pending"),structuralSharing:!0}),i=Hr(n),a=n||s||o,c=Hr(a),l=n||o,h=Hr(l);return e.isServer||(e.startTransition=d=>{r(!0),p.startTransition(()=>{d(),r(!1)})}),p.useEffect(()=>{const d=e.history.subscribe(e.load),m=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return en(e.latestLocation.href)!==en(m.href)&&e.commitLocation({...m,replace:!0}),()=>{d()}},[e,e.history]),cs(()=>{if(typeof window<"u"&&e.clientSsr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(m){console.error(m)}})()},[e]),cs(()=>{i&&!n&&e.emit({type:"onLoad",...Rn(e.state)})},[i,e,n]),cs(()=>{h&&!l&&e.emit({type:"onBeforeRouteMount",...Rn(e.state)})},[l,h,e]),cs(()=>{c&&!a&&(e.emit({type:"onResolved",...Rn(e.state)}),e.__store.setState(d=>({...d,status:"idle",resolvedLocation:d.location})),rd(e))},[a,c,e]),null}function Hd(){const e=Le(),t=e.options.defaultPendingComponent?u.jsx(e.options.defaultPendingComponent,{}):null,n=e.isServer||typeof document<"u"&&e.clientSsr?Zs:p.Suspense,s=u.jsxs(n,{fallback:t,children:[u.jsx(Dd,{}),u.jsx(Ud,{})]});return e.options.InnerWrap?u.jsx(e.options.InnerWrap,{children:s}):s}function Ud(){const e=ve({select:n=>{var s;return(s=n.matches[0])==null?void 0:s.id}}),t=ve({select:n=>n.loadedAt});return u.jsx(pr.Provider,{value:e,children:u.jsx(Di,{getResetKey:()=>t,errorComponent:fr,onCatch:n=>{n.message||n.toString()},children:e?u.jsx(ac,{matchId:e}):null})})}function qd(e){return ve({select:t=>{const n=t.matches;return e!=null&&e.select?e.select(n):n},structuralSharing:e==null?void 0:e.structuralSharing})}function Vd(e,t){const n=Le(),[s,r]=p.useState(!1),o=p.useRef(!1),i=Td(t),{activeProps:a=()=>({className:"active"}),inactiveProps:c=()=>({}),activeOptions:l,to:h,preload:d,preloadDelay:m,hashScrollIntoView:g,replace:y,startTransition:w,resetScroll:b,viewTransition:_,children:E,target:P,disabled:L,style:I,className:C,onClick:M,onFocus:S,onMouseEnter:x,onMouseLeave:F,onTouchStart:D,ignoreBlocker:N,...T}=e,{params:V,search:$,hash:U,state:B,mask:Z,reloadDocument:Q,...X}=T,G=p.useMemo(()=>{try{return new URL(`${h}`),"external"}catch{}return"internal"},[h]),ye=ve({select:se=>se.location.search,structuralSharing:!0}),te=qd({select:se=>{var le;return e.from??((le=se[se.length-1])==null?void 0:le.fullPath)}}),ne=p.useMemo(()=>({...e,from:te}),[e,te]),oe=p.useMemo(()=>n.buildLocation(ne),[n,ne,ye]),ae=p.useMemo(()=>ne.reloadDocument?!1:d??n.options.defaultPreload,[n.options.defaultPreload,d,ne.reloadDocument]),ce=m??n.options.defaultPreloadDelay??0,Y=ve({select:se=>{if(l!=null&&l.exact){if(!Gu(se.location.pathname,oe.pathname,n.basepath))return!1}else{const le=Gs(se.location.pathname,n.basepath).split("/");if(!Gs(oe.pathname,n.basepath).split("/").every((kl,jl)=>kl===le[jl]))return!1}return((l==null?void 0:l.includeSearch)??!0)&&!Sn(se.location.search,oe.search,{partial:!(l!=null&&l.exact),ignoreUndefined:!(l!=null&&l.explicitUndefined)})?!1:l!=null&&l.includeHash?se.location.hash===oe.hash:!0}}),ie=p.useCallback(()=>{n.preloadRoute(ne).catch(se=>{console.warn(se),console.warn(md)})},[ne,n]),We=p.useCallback(se=>{se!=null&&se.isIntersecting&&ie()},[ie]);if(Fd(i,We,{rootMargin:"100px"},{disabled:!!L||ae!=="viewport"}),cs(()=>{o.current||!L&&ae==="render"&&(ie(),o.current=!0)},[L,ie,ae]),G==="external")return{...X,ref:i,type:G,href:h,...E&&{children:E},...P&&{target:P},...L&&{disabled:L},...I&&{style:I},...C&&{className:C},...M&&{onClick:M},...S&&{onFocus:S},...x&&{onMouseEnter:x},...F&&{onMouseLeave:F},...D&&{onTouchStart:D}};const Ie=se=>{if(!L&&!$d(se)&&!se.defaultPrevented&&(!P||P==="_self")&&se.button===0){se.preventDefault(),Ra.flushSync(()=>{r(!0)});const le=n.subscribe("onResolved",()=>{le(),r(!1)});return n.navigate({...ne,replace:y,resetScroll:b,hashScrollIntoView:g,startTransition:w,viewTransition:_,ignoreBlocker:N})}},Je=se=>{L||ae&&ie()},Ne=Je,je=se=>{if(L)return;const le=se.target||{};if(ae){if(le.preloadTimeout)return;le.preloadTimeout=setTimeout(()=>{le.preloadTimeout=null,ie()},ce)}},he=se=>{if(L)return;const le=se.target||{};le.preloadTimeout&&(clearTimeout(le.preloadTimeout),le.preloadTimeout=null)},we=se=>le=>{var Wt;(Wt=le.persist)==null||Wt.call(le),se.filter(Boolean).forEach(fo=>{le.defaultPrevented||fo(le)})},pe=Y?Xt(a,{})??{}:{},bt=Y?{}:Xt(c,{}),ot=[C,pe.className,bt.className].filter(Boolean).join(" "),js={...I,...pe.style,...bt.style};return{...X,...pe,...bt,href:L?void 0:oe.maskedLocation?n.history.createHref(oe.maskedLocation.href):n.history.createHref(oe.href),ref:i,onClick:we([M,Ie]),onFocus:we([S,Je]),onMouseEnter:we([x,je]),onMouseLeave:we([F,he]),onTouchStart:we([D,Ne]),disabled:!!L,target:P,...Object.keys(js).length&&{style:js},...ot&&{className:ot},...L&&{role:"link","aria-disabled":!0},...Y&&{"data-status":"active","aria-current":"page"},...s&&{"data-transitioning":"transitioning"}}}const vs=p.forwardRef((e,t)=>{const{_asChild:n,...s}=e,{type:r,ref:o,...i}=Vd(s,t),a=typeof s.children=="function"?s.children({isActive:i["data-status"]==="active"}):s.children;return typeof n>"u"&&delete i.disabled,p.createElement(n||"a",{...i,ref:o},a)});function $d(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const Bd=e=>new Zd(e);class Zd extends dd{constructor(t){super(t)}}function zd({router:e,children:t,...n}){e.update({...e.options,...n,context:{...e.options.context,...n.context}});const s=ec(),r=u.jsx(s.Provider,{value:e,children:t});return e.options.Wrap?u.jsx(e.options.Wrap,{children:r}):r}function Kd({router:e,...t}){return u.jsx(zd,{router:e,...t,children:u.jsx(Hd,{})})}const Wd=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),p.createElement("path",{d:"M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"}))]]),Jd=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,72H212V64a28,28,0,0,0-28-28H40A28,28,0,0,0,12,64v88a28,28,0,0,0,28,28h96v12a28,28,0,0,0,28,28h60a28,28,0,0,0,28-28V100A28,28,0,0,0,224,72ZM40,156a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H184a4,4,0,0,1,4,4v8H164a28,28,0,0,0-28,28v56Zm188,36a4,4,0,0,1-4,4H164a4,4,0,0,1-4-4V100a4,4,0,0,1,4-4h60a4,4,0,0,1,4,4ZM124,208a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h24A12,12,0,0,1,124,208Zm88-84a12,12,0,0,1-12,12H188a12,12,0,0,1,0-24h12A12,12,0,0,1,212,124Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,64V80H176a16,16,0,0,0-16,16v80H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H184A16,16,0,0,1,200,64Z",opacity:"0.2"}),p.createElement("path",{d:"M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72ZM40,168a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8v8H176a24,24,0,0,0-24,24v72Zm192,24a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72Zm8,120a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,74H206V64a22,22,0,0,0-22-22H40A22,22,0,0,0,18,64v96a22,22,0,0,0,22,22H154v10a22,22,0,0,0,22,22h48a22,22,0,0,0,22-22V96A22,22,0,0,0,224,74ZM40,170a10,10,0,0,1-10-10V64A10,10,0,0,1,40,54H184a10,10,0,0,1,10,10V74H176a22,22,0,0,0-22,22v74Zm194,22a10,10,0,0,1-10,10H176a10,10,0,0,1-10-10V96a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10ZM134,208a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h40A6,6,0,0,1,134,208Zm80-96a6,6,0,0,1-6,6H192a6,6,0,0,1,0-12h16A6,6,0,0,1,214,112Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72ZM40,168a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8v8H176a24,24,0,0,0-24,24v72Zm192,24a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,76H204V64a20,20,0,0,0-20-20H40A20,20,0,0,0,20,64v96a20,20,0,0,0,20,20H156v12a20,20,0,0,0,20,20h48a20,20,0,0,0,20-20V96A20,20,0,0,0,224,76ZM40,172a12,12,0,0,1-12-12V64A12,12,0,0,1,40,52H184a12,12,0,0,1,12,12V76H176a20,20,0,0,0-20,20v76Zm196,20a12,12,0,0,1-12,12H176a12,12,0,0,1-12-12V96a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12ZM132,208a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h40A4,4,0,0,1,132,208Zm80-96a4,4,0,0,1-4,4H192a4,4,0,0,1,0-8h16A4,4,0,0,1,212,112Z"}))]]),Qd=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,187a113.4,113.4,0,0,1-20.39-35h40.82a116.94,116.94,0,0,1-10,20.77A108.61,108.61,0,0,1,128,207Zm-26.49-59a135.42,135.42,0,0,1,0-40h53a135.42,135.42,0,0,1,0,40ZM44,128a83.49,83.49,0,0,1,2.43-20H77.25a160.63,160.63,0,0,0,0,40H46.43A83.49,83.49,0,0,1,44,128Zm84-79a113.4,113.4,0,0,1,20.39,35H107.59a116.94,116.94,0,0,1,10-20.77A108.61,108.61,0,0,1,128,49Zm50.73,59h30.82a83.52,83.52,0,0,1,0,40H178.75a160.63,160.63,0,0,0,0-40Zm20.77-24H173.71a140.82,140.82,0,0,0-15.5-34.36A84.51,84.51,0,0,1,199.52,84ZM97.79,49.64A140.82,140.82,0,0,0,82.29,84H56.48A84.51,84.51,0,0,1,97.79,49.64ZM56.48,172H82.29a140.82,140.82,0,0,0,15.5,34.36A84.51,84.51,0,0,1,56.48,172Zm101.73,34.36A140.82,140.82,0,0,0,173.71,172h25.81A84.51,84.51,0,0,1,158.21,206.36Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),p.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm78.36,64H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM216,128a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM128,43a115.27,115.27,0,0,1,26,45H102A115.11,115.11,0,0,1,128,43ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48Zm50.35,61.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,28h0A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,190.61c-6.33-6.09-23-24.41-31.27-54.61h62.54C151,194.2,134.33,212.52,128,218.61ZM94.82,156a140.42,140.42,0,0,1,0-56h66.36a140.42,140.42,0,0,1,0,56ZM128,37.39c6.33,6.09,23,24.41,31.27,54.61H96.73C105,61.8,121.67,43.48,128,37.39ZM169.41,100h46.23a92.09,92.09,0,0,1,0,56H169.41a152.65,152.65,0,0,0,0-56Zm43.25-8h-45a129.39,129.39,0,0,0-29.19-55.4A92.25,92.25,0,0,1,212.66,92ZM117.54,36.6A129.39,129.39,0,0,0,88.35,92h-45A92.25,92.25,0,0,1,117.54,36.6ZM40.36,100H86.59a152.65,152.65,0,0,0,0,56H40.36a92.09,92.09,0,0,1,0-56Zm3,64h45a129.39,129.39,0,0,0,29.19,55.4A92.25,92.25,0,0,1,43.34,164Zm95.12,55.4A129.39,129.39,0,0,0,167.65,164h45A92.25,92.25,0,0,1,138.46,219.4Z"}))]]),Gd=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M222.14,105.85l-80-80a20,20,0,0,0-28.28,0l-80,80A19.86,19.86,0,0,0,28,120v96a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V120A19.86,19.86,0,0,0,222.14,105.85ZM204,204H52V121.65l76-76,76,76Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,120v96H40V120a8,8,0,0,1,2.34-5.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,216,120Z",opacity:"0.2"}),p.createElement("path",{d:"M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8H216a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H48V120l80-80,80,80Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,120v96a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V120a15.87,15.87,0,0,1,4.69-11.32l80-80a16,16,0,0,1,22.62,0l80,80A15.87,15.87,0,0,1,224,120Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M217.9,110.1l-80-80a14,14,0,0,0-19.8,0l-80,80A13.92,13.92,0,0,0,34,120v96a6,6,0,0,0,6,6H216a6,6,0,0,0,6-6V120A13.92,13.92,0,0,0,217.9,110.1ZM210,210H46V120a2,2,0,0,1,.58-1.42l80-80a2,2,0,0,1,2.84,0l80,80A2,2,0,0,1,210,120Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8H216a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H48V120l80-80,80,80Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216.49,111.51l-80-80a12,12,0,0,0-17,0l-80,80A12,12,0,0,0,36,120v96a4,4,0,0,0,4,4H216a4,4,0,0,0,4-4V120A12,12,0,0,0,216.49,111.51ZM212,212H44V120a4,4,0,0,1,1.17-2.83l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,212,120Z"}))]]),Yd=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M235.79,142.88a12,12,0,0,0,4.7-19.87L125,7.52a12,12,0,0,0-17,0L70.25,45.29,48.48,23.52a12,12,0,0,0-17,17L53.28,62.26,12.2,103.35a28,28,0,0,0,0,39.6l84.86,84.86a28,28,0,0,0,39.6,0L214.48,150Zm-31.58-14.77a12,12,0,0,0-4.7,2.9l-79.82,79.83a4,4,0,0,1-5.66,0L29.17,126a4,4,0,0,1,0-5.66L70.25,79.24l24.29,24.29a32,32,0,0,0,52.09,35.11h0a32,32,0,0,0-35.12-52.08L87.23,62.26,116.52,33l93.27,93.28Zm-85.87-17.75,0,0a8,8,0,1,1-.06.06ZM256,208a24,24,0,0,1-48,0c0-19.44,12.93-37.23,14.4-39.2a12,12,0,0,1,19.2,0C243.07,170.78,256,188.57,256,208Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M248,208a16,16,0,0,1-32,0c0-16,16-40,16-40S248,192,248,208Zm-16-76.52-24,8-79.83,79.83a16,16,0,0,1-22.63,0L20.69,134.46a16,16,0,0,1,0-22.63L116.52,16Zm-93.86-29.62a20,20,0,1,0,0,28.28A20,20,0,0,0,138.14,101.86Z",opacity:"0.2"}),p.createElement("path",{d:"M238.66,163.56a8,8,0,0,0-13.32,0C223.57,166.23,208,190.09,208,208a24,24,0,0,0,48,0C256,190.09,240.43,166.23,238.66,163.56ZM232,216a8,8,0,0,1-8-8c0-6.8,4-16.32,8-24.08,4,7.76,8,17.34,8,24.08A8,8,0,0,1,232,216Zm2.53-76.93a8,8,0,0,0,3.13-13.24L122.17,10.34a8,8,0,0,0-11.31,0L70.25,51,45.65,26.34A8,8,0,0,0,34.34,37.66l24.6,24.6L15,106.17a24,24,0,0,0,0,33.94L99.89,225a24,24,0,0,0,33.94,0l78.49-78.49Zm-32.19-5.24-79.83,79.83a8,8,0,0,1-11.31,0L26.34,128.8a8,8,0,0,1,0-11.31L70.25,73.57l29.12,29.12a28,28,0,1,0,11.31-11.32L81.57,62.26l35-34.95L217.19,128l-11.72,3.9A8.09,8.09,0,0,0,202.34,133.83Zm-86.83-26.31,0,0a13.26,13.26,0,1,1-.05.06S115.51,107.53,115.51,107.52Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M256,208a24,24,0,0,1-48,0c0-17.91,15.57-41.77,17.34-44.44a8,8,0,0,1,13.32,0C240.43,166.23,256,190.09,256,208ZM132.49,124.49a12,12,0,0,0-17-17l0,0s0,0,0,0a12,12,0,0,0,17,16.94ZM37.65,18.34A8,8,0,0,0,26.34,29.66l32.6,32.6L70.25,51ZM234.53,139.07a8,8,0,0,0,3.13-13.24L122.17,10.34a8,8,0,0,0-11.31,0L70.25,51l40.43,40.42a28,28,0,1,1-11.31,11.32L58.94,62.26,15,106.17a24,24,0,0,0,0,33.94L99.89,225a24,24,0,0,0,33.94,0l78.49-78.49Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M237,164.67a6,6,0,0,0-10,0c-.7,1-17,25.72-17,43.33a22,22,0,0,0,44,0C254,190.39,237.69,165.71,237,164.67ZM232,218a10,10,0,0,1-10-10c0-8.17,5.37-19.92,10-28.34,4.63,8.41,10,20.15,10,28.34A10,10,0,0,1,232,218Zm1.9-80.82a6,6,0,0,0,2.34-9.94L120.76,11.76a6,6,0,0,0-8.49,0l-42,42-26-26a6,6,0,0,0-8.49,8.48l26,26L16.44,107.59a22,22,0,0,0,0,31.11l84.86,84.86a22,22,0,0,0,31.11,0l78.83-78.83Zm-30.14-1.94-79.83,79.83a10,10,0,0,1-14.14,0L24.93,130.21a10,10,0,0,1,0-14.14L70.25,70.75l31.62,31.61a26,26,0,0,0,3.75,32,26,26,0,0,0,36.76,0h0a26,26,0,0,0-32-40.51L78.74,62.26l37.78-37.77L220.89,128.86l-14.79,4.93A6.07,6.07,0,0,0,203.76,135.24ZM114.1,106.11l0,0a14,14,0,1,1,0,19.82,13.91,13.91,0,0,1,0-19.82Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M234.53,139.07a8,8,0,0,0,3.13-13.24L122.17,10.34a8,8,0,0,0-11.31,0L70.25,51,45.65,26.34A8,8,0,0,0,34.34,37.66l24.6,24.6L15,106.17a24,24,0,0,0,0,33.94L99.89,225a24,24,0,0,0,33.94,0l78.49-78.49Zm-32.19-5.24-79.83,79.83a8,8,0,0,1-11.31,0L26.34,128.8a8,8,0,0,1,0-11.31L70.25,73.57l29.12,29.12a28,28,0,1,0,11.31-11.32L81.57,62.26l35-34.95L217.19,128l-11.72,3.9A8.09,8.09,0,0,0,202.34,133.83Zm-86.83-26.31,0,0a13.26,13.26,0,1,1-.05.06S115.51,107.53,115.51,107.52Zm123.15,56a8,8,0,0,0-13.32,0C223.57,166.23,208,190.09,208,208a24,24,0,0,0,48,0C256,190.09,240.43,166.23,238.66,163.56ZM232,216a8,8,0,0,1-8-8c0-6.8,4-16.32,8-24.08,4,7.76,8,17.34,8,24.08A8,8,0,0,1,232,216Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M235.33,165.78a4,4,0,0,0-6.66,0C228,166.8,212,191,212,208a20,20,0,0,0,40,0C252,191,236,166.8,235.33,165.78ZM232,220a12,12,0,0,1-12-12c0-10.25,7.49-24.64,12-32.37,4.51,7.73,12,22.1,12,32.37A12,12,0,0,1,232,220Zm3.89-87.6a4,4,0,0,0-1.06-3.74L119.34,13.17a4,4,0,0,0-5.65,0L70.25,56.6,42.82,29.17a4,4,0,0,0-5.65,5.66L64.6,62.26,17.86,109a20,20,0,0,0,0,28.29l84.85,84.85a20,20,0,0,0,28.29,0L210.16,143l23.1-7.7A4,4,0,0,0,235.89,132.4Zm-29.15,3.29a4.06,4.06,0,0,0-1.57,1l-79.83,79.82a12,12,0,0,1-17,0L23.51,131.63a12,12,0,0,1,0-17L70.25,67.92l34.2,34.2A24,24,0,0,0,141,133h0a24,24,0,0,0-30.86-36.51l-34.2-34.2,40.61-40.6L224.59,129.74Zm-94.05-31a0,0,0,0,0,0,0,16,16,0,1,1,0,22.64,16,16,0,0,1,0-22.64Z"}))]]),Xd=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),p.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]),eh=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,36H48A20,20,0,0,0,28,56v56c0,54.29,26.32,87.22,48.4,105.29,23.71,19.39,47.44,26,48.44,26.29a12.1,12.1,0,0,0,6.32,0c1-.28,24.73-6.9,48.44-26.29,22.08-18.07,48.4-51,48.4-105.29V56A20,20,0,0,0,208,36Zm-4,76c0,35.71-13.09,64.69-38.91,86.15A126.28,126.28,0,0,1,128,219.38a126.14,126.14,0,0,1-37.09-21.23C65.09,176.69,52,147.71,52,112V60H204ZM79.51,144.49a12,12,0,1,1,17-17L112,143l47.51-47.52a12,12,0,0,1,17,17l-56,56a12,12,0,0,1-17,0Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z",opacity:"0.2"}),p.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.26,47,25.53a8,8,0,0,0,4.2,0c1-.27,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0ZM82.34,141.66a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32l-56,56a8,8,0,0,1-11.32,0Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.26,47,25.53a8,8,0,0,0,4.2,0c1-.27,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm-34.32,69.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,42H48A14,14,0,0,0,34,56v56c0,51.94,25.12,83.4,46.2,100.64,22.73,18.6,45.27,24.89,46.22,25.15a6,6,0,0,0,3.16,0c.95-.26,23.49-6.55,46.22-25.15C196.88,195.4,222,163.94,222,112V56A14,14,0,0,0,208,42Zm2,70c0,37.76-13.94,68.39-41.44,91.06A131.17,131.17,0,0,1,128,225.72a130.94,130.94,0,0,1-40.56-22.66C59.94,180.39,46,149.76,46,112V56a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2ZM172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.26,47,25.53a8,8,0,0,0,4.2,0c1-.27,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0ZM82.34,141.66a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32l-56,56a8,8,0,0,1-11.32,0Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,44H48A12,12,0,0,0,36,56v56c0,51.16,24.73,82.12,45.47,99.1,22.4,18.32,44.55,24.5,45.48,24.76a4,4,0,0,0,2.1,0c.93-.26,23.08-6.44,45.48-24.76,20.74-17,45.47-47.94,45.47-99.1V56A12,12,0,0,0,208,44Zm4,68c0,38.44-14.23,69.63-42.29,92.71A132.45,132.45,0,0,1,128,227.82a132.23,132.23,0,0,1-41.71-23.11C58.23,181.63,44,150.44,44,112V56a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-41.17-10.83a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17Z"}))]]),cc=p.forwardRef((e,t)=>p.createElement(pn,{ref:t,...e,weights:Wd}));cc.displayName="ArrowLeftIcon";const lc=p.forwardRef((e,t)=>p.createElement(pn,{ref:t,...e,weights:Jd}));lc.displayName="DevicesIcon";const uc=p.forwardRef((e,t)=>p.createElement(pn,{ref:t,...e,weights:Qd}));uc.displayName="GlobeIcon";const dc=p.forwardRef((e,t)=>p.createElement(pn,{ref:t,...e,weights:Gd}));dc.displayName="HouseSimpleIcon";const hc=p.forwardRef((e,t)=>p.createElement(pn,{ref:t,...e,weights:Yd}));hc.displayName="PaintBucketIcon";const fc=p.forwardRef((e,t)=>p.createElement(pn,{ref:t,...e,weights:Xd}));fc.displayName="PaperPlaneTiltIcon";const pc=p.forwardRef((e,t)=>p.createElement(pn,{ref:t,...e,weights:eh}));pc.displayName="ShieldCheckIcon";function th(){return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center justify-center",children:[u.jsx("div",{className:"bg-contrast-0 p-5"}),u.jsx("div",{className:"bg-contrast-25 p-5"}),u.jsx("div",{className:"bg-contrast-50 p-5"}),u.jsx("div",{className:"bg-contrast-100 p-5"}),u.jsx("div",{className:"bg-contrast-200 p-5"}),u.jsx("div",{className:"bg-contrast-300 p-5"}),u.jsx("div",{className:"bg-contrast-400 p-5"}),u.jsx("div",{className:"bg-contrast-500 p-5"}),u.jsx("div",{className:"bg-contrast-600 p-5"}),u.jsx("div",{className:"bg-contrast-700 p-5"}),u.jsx("div",{className:"bg-contrast-800 p-5"}),u.jsx("div",{className:"bg-contrast-900 p-5"}),u.jsx("div",{className:"bg-contrast-950 p-5"}),u.jsx("div",{className:"bg-contrast-975 p-5"}),u.jsx("div",{className:"bg-contrast-1000 p-5"})]}),u.jsxs("div",{className:"flex items-center justify-center",children:[u.jsx("div",{className:"bg-primary-25 p-5"}),u.jsx("div",{className:"bg-primary-50 p-5"}),u.jsx("div",{className:"bg-primary-100 p-5"}),u.jsx("div",{className:"bg-primary-200 p-5"}),u.jsx("div",{className:"bg-primary-300 p-5"}),u.jsx("div",{className:"bg-primary-400 p-5"}),u.jsx("div",{className:"bg-primary-500 p-5"}),u.jsx("div",{className:"bg-primary-600 p-5"}),u.jsx("div",{className:"bg-primary-700 p-5"}),u.jsx("div",{className:"bg-primary-800 p-5"}),u.jsx("div",{className:"bg-primary-900 p-5"}),u.jsx("div",{className:"bg-primary-950 p-5"}),u.jsx("div",{className:"bg-primary-975 p-5"})]}),u.jsxs("div",{className:"flex items-center justify-center",children:[u.jsx("div",{className:"bg-error-25 p-5"}),u.jsx("div",{className:"bg-error-50 p-5"}),u.jsx("div",{className:"bg-error-100 p-5"}),u.jsx("div",{className:"bg-error-200 p-5"}),u.jsx("div",{className:"bg-error-300 p-5"}),u.jsx("div",{className:"bg-error-400 p-5"}),u.jsx("div",{className:"bg-error-500 p-5"}),u.jsx("div",{className:"bg-error-600 p-5"}),u.jsx("div",{className:"bg-error-700 p-5"}),u.jsx("div",{className:"bg-error-800 p-5"}),u.jsx("div",{className:"bg-error-900 p-5"}),u.jsx("div",{className:"bg-error-950 p-5"}),u.jsx("div",{className:"bg-error-975 p-5"})]}),u.jsxs("div",{className:"flex items-center justify-center",children:[u.jsx("div",{className:"bg-warning-25 p-5"}),u.jsx("div",{className:"bg-warning-50 p-5"}),u.jsx("div",{className:"bg-warning-100 p-5"}),u.jsx("div",{className:"bg-warning-200 p-5"}),u.jsx("div",{className:"bg-warning-300 p-5"}),u.jsx("div",{className:"bg-warning-400 p-5"}),u.jsx("div",{className:"bg-warning-500 p-5"}),u.jsx("div",{className:"bg-warning-600 p-5"}),u.jsx("div",{className:"bg-warning-700 p-5"}),u.jsx("div",{className:"bg-warning-800 p-5"}),u.jsx("div",{className:"bg-warning-900 p-5"}),u.jsx("div",{className:"bg-warning-950 p-5"}),u.jsx("div",{className:"bg-warning-975 p-5"})]}),u.jsxs("div",{className:"flex items-center justify-center",children:[u.jsx("div",{className:"bg-info-25 p-5"}),u.jsx("div",{className:"bg-info-50 p-5"}),u.jsx("div",{className:"bg-info-100 p-5"}),u.jsx("div",{className:"bg-info-200 p-5"}),u.jsx("div",{className:"bg-info-300 p-5"}),u.jsx("div",{className:"bg-info-400 p-5"}),u.jsx("div",{className:"bg-info-500 p-5"}),u.jsx("div",{className:"bg-info-600 p-5"}),u.jsx("div",{className:"bg-info-700 p-5"}),u.jsx("div",{className:"bg-info-800 p-5"}),u.jsx("div",{className:"bg-info-900 p-5"}),u.jsx("div",{className:"bg-info-950 p-5"}),u.jsx("div",{className:"bg-info-975 p-5"})]}),u.jsxs("div",{className:"flex items-center justify-center",children:[u.jsx("div",{className:"bg-success-25 p-5"}),u.jsx("div",{className:"bg-success-50 p-5"}),u.jsx("div",{className:"bg-success-100 p-5"}),u.jsx("div",{className:"bg-success-200 p-5"}),u.jsx("div",{className:"bg-success-300 p-5"}),u.jsx("div",{className:"bg-success-400 p-5"}),u.jsx("div",{className:"bg-success-500 p-5"}),u.jsx("div",{className:"bg-success-600 p-5"}),u.jsx("div",{className:"bg-success-700 p-5"}),u.jsx("div",{className:"bg-success-800 p-5"}),u.jsx("div",{className:"bg-success-900 p-5"}),u.jsx("div",{className:"bg-success-950 p-5"}),u.jsx("div",{className:"bg-success-975 p-5"})]}),u.jsxs("div",{className:"flex items-center justify-center",children:[u.jsx("div",{className:"bg-primary text-primary-contrast p-5",children:"Az"}),u.jsx("div",{className:"bg-error text-error-contrast p-5",children:"Az"}),u.jsx("div",{className:"bg-warning text-warning-contrast p-5",children:"Az"}),u.jsx("div",{className:"bg-success text-success-contrast p-5",children:"Az"})]})]})}const nh=["top","right","bottom","left"],Ht=Math.min,Oe=Math.max,nr=Math.round,Ts=Math.floor,nt=e=>({x:e,y:e}),sh={left:"right",right:"left",bottom:"top",top:"bottom"},rh={start:"end",end:"start"};function Si(e,t,n){return Oe(e,Ht(t,n))}function vt(e,t){return typeof e=="function"?e(t):e}function yt(e){return e.split("-")[0]}function Jn(e){return e.split("-")[1]}function Ui(e){return e==="x"?"y":"x"}function qi(e){return e==="y"?"height":"width"}function Ut(e){return["top","bottom"].includes(yt(e))?"y":"x"}function Vi(e){return Ui(Ut(e))}function ih(e,t,n){n===void 0&&(n=!1);const s=Jn(e),r=Vi(e),o=qi(r);let i=r==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=sr(i)),[i,sr(i)]}function oh(e){const t=sr(e);return[Ri(e),t,Ri(t)]}function Ri(e){return e.replace(/start|end/g,t=>rh[t])}function ah(e,t,n){const s=["left","right"],r=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:s:t?s:r;case"left":case"right":return t?o:i;default:return[]}}function ch(e,t,n,s){const r=Jn(e);let o=ah(yt(e),n==="start",s);return r&&(o=o.map(i=>i+"-"+r),t&&(o=o.concat(o.map(Ri)))),o}function sr(e){return e.replace(/left|right|bottom|top/g,t=>sh[t])}function lh(e){return{top:0,right:0,bottom:0,left:0,...e}}function mc(e){return typeof e!="number"?lh(e):{top:e,right:e,bottom:e,left:e}}function rr(e){const{x:t,y:n,width:s,height:r}=e;return{width:s,height:r,top:n,left:t,right:t+s,bottom:n+r,x:t,y:n}}function Io(e,t,n){let{reference:s,floating:r}=e;const o=Ut(t),i=Vi(t),a=qi(i),c=yt(t),l=o==="y",h=s.x+s.width/2-r.width/2,d=s.y+s.height/2-r.height/2,m=s[a]/2-r[a]/2;let g;switch(c){case"top":g={x:h,y:s.y-r.height};break;case"bottom":g={x:h,y:s.y+s.height};break;case"right":g={x:s.x+s.width,y:d};break;case"left":g={x:s.x-r.width,y:d};break;default:g={x:s.x,y:s.y}}switch(Jn(t)){case"start":g[i]-=m*(n&&l?-1:1);break;case"end":g[i]+=m*(n&&l?-1:1);break}return g}const uh=async(e,t,n)=>{const{placement:s="bottom",strategy:r="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:d}=Io(l,s,c),m=s,g={},y=0;for(let w=0;w<a.length;w++){const{name:b,fn:_}=a[w],{x:E,y:P,data:L,reset:I}=await _({x:h,y:d,initialPlacement:s,placement:m,strategy:r,middlewareData:g,rects:l,platform:i,elements:{reference:e,floating:t}});h=E??h,d=P??d,g={...g,[b]:{...g[b],...L}},I&&y<=50&&(y++,typeof I=="object"&&(I.placement&&(m=I.placement),I.rects&&(l=I.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):I.rects),{x:h,y:d}=Io(l,m,c)),w=-1)}return{x:h,y:d,placement:m,strategy:r,middlewareData:g}};async function ys(e,t){var n;t===void 0&&(t={});const{x:s,y:r,platform:o,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:m=!1,padding:g=0}=vt(t,e),y=mc(g),b=a[m?d==="floating"?"reference":"floating":d],_=rr(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:l,rootBoundary:h,strategy:c})),E=d==="floating"?{x:s,y:r,width:i.floating.width,height:i.floating.height}:i.reference,P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),L=await(o.isElement==null?void 0:o.isElement(P))?await(o.getScale==null?void 0:o.getScale(P))||{x:1,y:1}:{x:1,y:1},I=rr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:P,strategy:c}):E);return{top:(_.top-I.top+y.top)/L.y,bottom:(I.bottom-_.bottom+y.bottom)/L.y,left:(_.left-I.left+y.left)/L.x,right:(I.right-_.right+y.right)/L.x}}const dh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:r,rects:o,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:h=0}=vt(e,t)||{};if(l==null)return{};const d=mc(h),m={x:n,y:s},g=Vi(r),y=qi(g),w=await i.getDimensions(l),b=g==="y",_=b?"top":"left",E=b?"bottom":"right",P=b?"clientHeight":"clientWidth",L=o.reference[y]+o.reference[g]-m[g]-o.floating[y],I=m[g]-o.reference[g],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let M=C?C[P]:0;(!M||!await(i.isElement==null?void 0:i.isElement(C)))&&(M=a.floating[P]||o.floating[y]);const S=L/2-I/2,x=M/2-w[y]/2-1,F=Ht(d[_],x),D=Ht(d[E],x),N=F,T=M-w[y]-D,V=M/2-w[y]/2+S,$=Si(N,V,T),U=!c.arrow&&Jn(r)!=null&&V!==$&&o.reference[y]/2-(V<N?F:D)-w[y]/2<0,B=U?V<N?V-N:V-T:0;return{[g]:m[g]+B,data:{[g]:$,centerOffset:V-$-B,...U&&{alignmentOffset:B}},reset:U}}}),hh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:w=!0,...b}=vt(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const _=yt(r),E=Ut(a),P=yt(a)===a,L=await(c.isRTL==null?void 0:c.isRTL(l.floating)),I=m||(P||!w?[sr(a)]:oh(a)),C=y!=="none";!m&&C&&I.push(...ch(a,w,y,L));const M=[a,...I],S=await ys(t,b),x=[];let F=((s=o.flip)==null?void 0:s.overflows)||[];if(h&&x.push(S[_]),d){const V=ih(r,i,L);x.push(S[V[0]],S[V[1]])}if(F=[...F,{placement:r,overflows:x}],!x.every(V=>V<=0)){var D,N;const V=(((D=o.flip)==null?void 0:D.index)||0)+1,$=M[V];if($)return{data:{index:V,overflows:F},reset:{placement:$}};let U=(N=F.filter(B=>B.overflows[0]<=0).sort((B,Z)=>B.overflows[1]-Z.overflows[1])[0])==null?void 0:N.placement;if(!U)switch(g){case"bestFit":{var T;const B=(T=F.filter(Z=>{if(C){const Q=Ut(Z.placement);return Q===E||Q==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(Q=>Q>0).reduce((Q,X)=>Q+X,0)]).sort((Z,Q)=>Z[1]-Q[1])[0])==null?void 0:T[0];B&&(U=B);break}case"initialPlacement":U=a;break}if(r!==U)return{reset:{placement:U}}}return{}}}};function No(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fo(e){return nh.some(t=>e[t]>=0)}const fh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:s="referenceHidden",...r}=vt(e,t);switch(s){case"referenceHidden":{const o=await ys(t,{...r,elementContext:"reference"}),i=No(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Fo(i)}}}case"escaped":{const o=await ys(t,{...r,altBoundary:!0}),i=No(o,n.floating);return{data:{escapedOffsets:i,escaped:Fo(i)}}}default:return{}}}}};async function ph(e,t){const{placement:n,platform:s,elements:r}=e,o=await(s.isRTL==null?void 0:s.isRTL(r.floating)),i=yt(n),a=Jn(n),c=Ut(n)==="y",l=["left","top"].includes(i)?-1:1,h=o&&c?-1:1,d=vt(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof y=="number"&&(g=a==="end"?y*-1:y),c?{x:g*h,y:m*l}:{x:m*l,y:g*h}}const mh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:r,y:o,placement:i,middlewareData:a}=t,c=await ph(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(s=a.arrow)!=null&&s.alignmentOffset?{}:{x:r+c.x,y:o+c.y,data:{...c,placement:i}}}}},gh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:r}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:b=>{let{x:_,y:E}=b;return{x:_,y:E}}},...c}=vt(e,t),l={x:n,y:s},h=await ys(t,c),d=Ut(yt(r)),m=Ui(d);let g=l[m],y=l[d];if(o){const b=m==="y"?"top":"left",_=m==="y"?"bottom":"right",E=g+h[b],P=g-h[_];g=Si(E,g,P)}if(i){const b=d==="y"?"top":"left",_=d==="y"?"bottom":"right",E=y+h[b],P=y-h[_];y=Si(E,y,P)}const w=a.fn({...t,[m]:g,[d]:y});return{...w,data:{x:w.x-n,y:w.y-s,enabled:{[m]:o,[d]:i}}}}}},vh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:r,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=vt(e,t),h={x:n,y:s},d=Ut(r),m=Ui(d);let g=h[m],y=h[d];const w=vt(a,t),b=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const P=m==="y"?"height":"width",L=o.reference[m]-o.floating[P]+b.mainAxis,I=o.reference[m]+o.reference[P]-b.mainAxis;g<L?g=L:g>I&&(g=I)}if(l){var _,E;const P=m==="y"?"width":"height",L=["top","left"].includes(yt(r)),I=o.reference[d]-o.floating[P]+(L&&((_=i.offset)==null?void 0:_[d])||0)+(L?0:b.crossAxis),C=o.reference[d]+o.reference[P]+(L?0:((E=i.offset)==null?void 0:E[d])||0)-(L?b.crossAxis:0);y<I?y=I:y>C&&(y=C)}return{[m]:g,[d]:y}}}},yh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:r,rects:o,platform:i,elements:a}=t,{apply:c=()=>{},...l}=vt(e,t),h=await ys(t,l),d=yt(r),m=Jn(r),g=Ut(r)==="y",{width:y,height:w}=o.floating;let b,_;d==="top"||d==="bottom"?(b=d,_=m===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(_=d,b=m==="end"?"top":"bottom");const E=w-h.top-h.bottom,P=y-h.left-h.right,L=Ht(w-h[b],E),I=Ht(y-h[_],P),C=!t.middlewareData.shift;let M=L,S=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=P),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(M=E),C&&!m){const F=Oe(h.left,0),D=Oe(h.right,0),N=Oe(h.top,0),T=Oe(h.bottom,0);g?S=y-2*(F!==0||D!==0?F+D:Oe(h.left,h.right)):M=w-2*(N!==0||T!==0?N+T:Oe(h.top,h.bottom))}await c({...t,availableWidth:S,availableHeight:M});const x=await i.getDimensions(a.floating);return y!==x.width||w!==x.height?{reset:{rects:!0}}:{}}}};function mr(){return typeof window<"u"}function Qn(e){return gc(e)?(e.nodeName||"").toLowerCase():"#document"}function Me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function it(e){var t;return(t=(gc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gc(e){return mr()?e instanceof Node||e instanceof Me(e).Node:!1}function ze(e){return mr()?e instanceof Element||e instanceof Me(e).Element:!1}function st(e){return mr()?e instanceof HTMLElement||e instanceof Me(e).HTMLElement:!1}function To(e){return!mr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Me(e).ShadowRoot}function Cs(e){const{overflow:t,overflowX:n,overflowY:s,display:r}=Ke(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!["inline","contents"].includes(r)}function wh(e){return["table","td","th"].includes(Qn(e))}function gr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function $i(e){const t=Bi(),n=ze(e)?Ke(e):e;return["transform","translate","scale","rotate","perspective"].some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(s=>(n.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(n.contain||"").includes(s))}function bh(e){let t=qt(e);for(;st(t)&&!Vn(t);){if($i(t))return t;if(gr(t))return null;t=qt(t)}return null}function Bi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vn(e){return["html","body","#document"].includes(Qn(e))}function Ke(e){return Me(e).getComputedStyle(e)}function vr(e){return ze(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qt(e){if(Qn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||To(e)&&e.host||it(e);return To(t)?t.host:t}function vc(e){const t=qt(e);return Vn(t)?e.ownerDocument?e.ownerDocument.body:e.body:st(t)&&Cs(t)?t:vc(t)}function ws(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=vc(e),o=r===((s=e.ownerDocument)==null?void 0:s.body),i=Me(r);if(o){const a=Pi(i);return t.concat(i,i.visualViewport||[],Cs(r)?r:[],a&&n?ws(a):[])}return t.concat(r,ws(r,[],n))}function Pi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yc(e){const t=Ke(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const r=st(e),o=r?e.offsetWidth:n,i=r?e.offsetHeight:s,a=nr(n)!==o||nr(s)!==i;return a&&(n=o,s=i),{width:n,height:s,$:a}}function Zi(e){return ze(e)?e:e.contextElement}function Pn(e){const t=Zi(e);if(!st(t))return nt(1);const n=t.getBoundingClientRect(),{width:s,height:r,$:o}=yc(t);let i=(o?nr(n.width):n.width)/s,a=(o?nr(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const xh=nt(0);function wc(e){const t=Me(e);return!Bi()||!t.visualViewport?xh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _h(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Me(e)?!1:t}function fn(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=Zi(e);let i=nt(1);t&&(s?ze(s)&&(i=Pn(s)):i=Pn(e));const a=_h(o,n,s)?wc(o):nt(0);let c=(r.left+a.x)/i.x,l=(r.top+a.y)/i.y,h=r.width/i.x,d=r.height/i.y;if(o){const m=Me(o),g=s&&ze(s)?Me(s):s;let y=m,w=Pi(y);for(;w&&s&&g!==y;){const b=Pn(w),_=w.getBoundingClientRect(),E=Ke(w),P=_.left+(w.clientLeft+parseFloat(E.paddingLeft))*b.x,L=_.top+(w.clientTop+parseFloat(E.paddingTop))*b.y;c*=b.x,l*=b.y,h*=b.x,d*=b.y,c+=P,l+=L,y=Me(w),w=Pi(y)}}return rr({width:h,height:d,x:c,y:l})}function zi(e,t){const n=vr(e).scrollLeft;return t?t.left+n:fn(it(e)).left+n}function bc(e,t,n){n===void 0&&(n=!1);const s=e.getBoundingClientRect(),r=s.left+t.scrollLeft-(n?0:zi(e,s)),o=s.top+t.scrollTop;return{x:r,y:o}}function Sh(e){let{elements:t,rect:n,offsetParent:s,strategy:r}=e;const o=r==="fixed",i=it(s),a=t?gr(t.floating):!1;if(s===i||a&&o)return n;let c={scrollLeft:0,scrollTop:0},l=nt(1);const h=nt(0),d=st(s);if((d||!d&&!o)&&((Qn(s)!=="body"||Cs(i))&&(c=vr(s)),st(s))){const g=fn(s);l=Pn(s),h.x=g.x+s.clientLeft,h.y=g.y+s.clientTop}const m=i&&!d&&!o?bc(i,c,!0):nt(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+h.x+m.x,y:n.y*l.y-c.scrollTop*l.y+h.y+m.y}}function Rh(e){return Array.from(e.getClientRects())}function Ph(e){const t=it(e),n=vr(e),s=e.ownerDocument.body,r=Oe(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=Oe(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let i=-n.scrollLeft+zi(e);const a=-n.scrollTop;return Ke(s).direction==="rtl"&&(i+=Oe(t.clientWidth,s.clientWidth)-r),{width:r,height:o,x:i,y:a}}function Ah(e,t){const n=Me(e),s=it(e),r=n.visualViewport;let o=s.clientWidth,i=s.clientHeight,a=0,c=0;if(r){o=r.width,i=r.height;const l=Bi();(!l||l&&t==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:o,height:i,x:a,y:c}}function Ch(e,t){const n=fn(e,!0,t==="fixed"),s=n.top+e.clientTop,r=n.left+e.clientLeft,o=st(e)?Pn(e):nt(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,c=r*o.x,l=s*o.y;return{width:i,height:a,x:c,y:l}}function Do(e,t,n){let s;if(t==="viewport")s=Ah(e,n);else if(t==="document")s=Ph(it(e));else if(ze(t))s=Ch(t,n);else{const r=wc(e);s={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return rr(s)}function xc(e,t){const n=qt(e);return n===t||!ze(n)||Vn(n)?!1:Ke(n).position==="fixed"||xc(n,t)}function Eh(e,t){const n=t.get(e);if(n)return n;let s=ws(e,[],!1).filter(a=>ze(a)&&Qn(a)!=="body"),r=null;const o=Ke(e).position==="fixed";let i=o?qt(e):e;for(;ze(i)&&!Vn(i);){const a=Ke(i),c=$i(i);!c&&a.position==="fixed"&&(r=null),(o?!c&&!r:!c&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Cs(i)&&!c&&xc(e,i))?s=s.filter(h=>h!==i):r=a,i=qt(i)}return t.set(e,s),s}function kh(e){let{element:t,boundary:n,rootBoundary:s,strategy:r}=e;const i=[...n==="clippingAncestors"?gr(t)?[]:Eh(t,this._c):[].concat(n),s],a=i[0],c=i.reduce((l,h)=>{const d=Do(t,h,r);return l.top=Oe(d.top,l.top),l.right=Ht(d.right,l.right),l.bottom=Ht(d.bottom,l.bottom),l.left=Oe(d.left,l.left),l},Do(t,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function jh(e){const{width:t,height:n}=yc(e);return{width:t,height:n}}function Oh(e,t,n){const s=st(t),r=it(t),o=n==="fixed",i=fn(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=nt(0);if(s||!s&&!o)if((Qn(t)!=="body"||Cs(r))&&(a=vr(t)),s){const m=fn(t,!0,o,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else r&&(c.x=zi(r));const l=r&&!s&&!o?bc(r,a):nt(0),h=i.left+a.scrollLeft-c.x-l.x,d=i.top+a.scrollTop-c.y-l.y;return{x:h,y:d,width:i.width,height:i.height}}function Ur(e){return Ke(e).position==="static"}function Ho(e,t){if(!st(e)||Ke(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return it(e)===n&&(n=n.ownerDocument.body),n}function _c(e,t){const n=Me(e);if(gr(e))return n;if(!st(e)){let r=qt(e);for(;r&&!Vn(r);){if(ze(r)&&!Ur(r))return r;r=qt(r)}return n}let s=Ho(e,t);for(;s&&wh(s)&&Ur(s);)s=Ho(s,t);return s&&Vn(s)&&Ur(s)&&!$i(s)?n:s||bh(e)||n}const Mh=async function(e){const t=this.getOffsetParent||_c,n=this.getDimensions,s=await n(e.floating);return{reference:Oh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Lh(e){return Ke(e).direction==="rtl"}const Ih={convertOffsetParentRelativeRectToViewportRelativeRect:Sh,getDocumentElement:it,getClippingRect:kh,getOffsetParent:_c,getElementRects:Mh,getClientRects:Rh,getDimensions:jh,getScale:Pn,isElement:ze,isRTL:Lh};function Sc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Nh(e,t){let n=null,s;const r=it(e);function o(){var a;clearTimeout(s),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const l=e.getBoundingClientRect(),{left:h,top:d,width:m,height:g}=l;if(a||t(),!m||!g)return;const y=Ts(d),w=Ts(r.clientWidth-(h+m)),b=Ts(r.clientHeight-(d+g)),_=Ts(h),P={rootMargin:-y+"px "+-w+"px "+-b+"px "+-_+"px",threshold:Oe(0,Ht(1,c))||1};let L=!0;function I(C){const M=C[0].intersectionRatio;if(M!==c){if(!L)return i();M?i(!1,M):s=setTimeout(()=>{i(!1,1e-7)},1e3)}M===1&&!Sc(l,e.getBoundingClientRect())&&i(),L=!1}try{n=new IntersectionObserver(I,{...P,root:r.ownerDocument})}catch{n=new IntersectionObserver(I,P)}n.observe(e)}return i(!0),o}function Fh(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=s,l=Zi(e),h=r||o?[...l?ws(l):[],...ws(t)]:[];h.forEach(_=>{r&&_.addEventListener("scroll",n,{passive:!0}),o&&_.addEventListener("resize",n)});const d=l&&a?Nh(l,n):null;let m=-1,g=null;i&&(g=new ResizeObserver(_=>{let[E]=_;E&&E.target===l&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var P;(P=g)==null||P.observe(t)})),n()}),l&&!c&&g.observe(l),g.observe(t));let y,w=c?fn(e):null;c&&b();function b(){const _=fn(e);w&&!Sc(w,_)&&n(),w=_,y=requestAnimationFrame(b)}return n(),()=>{var _;h.forEach(E=>{r&&E.removeEventListener("scroll",n),o&&E.removeEventListener("resize",n)}),d==null||d(),(_=g)==null||_.disconnect(),g=null,c&&cancelAnimationFrame(y)}}const Th=mh,Dh=gh,Hh=hh,Uh=yh,qh=fh,Uo=dh,Vh=vh,$h=(e,t,n)=>{const s=new Map,r={platform:Ih,...n},o={...r.platform,_c:s};return uh(e,t,{...r,platform:o})};var zs=typeof document<"u"?p.useLayoutEffect:p.useEffect;function ir(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!ir(e[s],t[s]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,r[s]))return!1;for(s=n;s--!==0;){const o=r[s];if(!(o==="_owner"&&e.$$typeof)&&!ir(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Rc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qo(e,t){const n=Rc(e);return Math.round(t*n)/n}function qr(e){const t=p.useRef(e);return zs(()=>{t.current=e}),t}function Bh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:r,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[h,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=p.useState(s);ir(m,s)||g(s);const[y,w]=p.useState(null),[b,_]=p.useState(null),E=p.useCallback(Z=>{Z!==C.current&&(C.current=Z,w(Z))},[]),P=p.useCallback(Z=>{Z!==M.current&&(M.current=Z,_(Z))},[]),L=o||y,I=i||b,C=p.useRef(null),M=p.useRef(null),S=p.useRef(h),x=c!=null,F=qr(c),D=qr(r),N=qr(l),T=p.useCallback(()=>{if(!C.current||!M.current)return;const Z={placement:t,strategy:n,middleware:m};D.current&&(Z.platform=D.current),$h(C.current,M.current,Z).then(Q=>{const X={...Q,isPositioned:N.current!==!1};V.current&&!ir(S.current,X)&&(S.current=X,Ra.flushSync(()=>{d(X)}))})},[m,t,n,D,N]);zs(()=>{l===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,d(Z=>({...Z,isPositioned:!1})))},[l]);const V=p.useRef(!1);zs(()=>(V.current=!0,()=>{V.current=!1}),[]),zs(()=>{if(L&&(C.current=L),I&&(M.current=I),L&&I){if(F.current)return F.current(L,I,T);T()}},[L,I,T,F,x]);const $=p.useMemo(()=>({reference:C,floating:M,setReference:E,setFloating:P}),[E,P]),U=p.useMemo(()=>({reference:L,floating:I}),[L,I]),B=p.useMemo(()=>{const Z={position:n,left:0,top:0};if(!U.floating)return Z;const Q=qo(U.floating,h.x),X=qo(U.floating,h.y);return a?{...Z,transform:"translate("+Q+"px, "+X+"px)",...Rc(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:X}},[n,a,U.floating,h.x,h.y]);return p.useMemo(()=>({...h,update:T,refs:$,elements:U,floatingStyles:B}),[h,T,$,U,B])}const Zh=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:r}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?Uo({element:s.current,padding:r}).fn(n):{}:s?Uo({element:s,padding:r}).fn(n):{}}}},zh=(e,t)=>({...Th(e),options:[e,t]}),Kh=(e,t)=>({...Dh(e),options:[e,t]}),Wh=(e,t)=>({...Vh(e),options:[e,t]}),Jh=(e,t)=>({...Hh(e),options:[e,t]}),Qh=(e,t)=>({...Uh(e),options:[e,t]}),Gh=(e,t)=>({...qh(e),options:[e,t]}),Yh=(e,t)=>({...Zh(e),options:[e,t]});var Xh="Arrow",Pc=p.forwardRef((e,t)=>{const{children:n,width:s=10,height:r=5,...o}=e;return u.jsx(As.svg,{...o,ref:t,width:s,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pc.displayName=Xh;var ef=Pc;function tf(e){const[t,n]=p.useState(void 0);return ni(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const o=r[0];let i,a;if("borderBoxSize"in o){const c=o.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var Ki="Popper",[Ac,Cc]=Pa(Ki),[nf,Ec]=Ac(Ki),kc=e=>{const{__scopePopper:t,children:n}=e,[s,r]=p.useState(null);return u.jsx(nf,{scope:t,anchor:s,onAnchorChange:r,children:n})};kc.displayName=Ki;var jc="PopperAnchor",Oc=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...r}=e,o=Ec(jc,n),i=p.useRef(null),a=ur(t,i),c=p.useRef(null);return p.useEffect(()=>{const l=c.current;c.current=(s==null?void 0:s.current)||i.current,l!==c.current&&o.onAnchorChange(c.current)}),s?null:u.jsx(As.div,{...r,ref:a})});Oc.displayName=jc;var Wi="PopperContent",[sf,rf]=Ac(Wi),Mc=p.forwardRef((e,t)=>{var ce,Y,ie,We,Ie,Je;const{__scopePopper:n,side:s="bottom",sideOffset:r=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:h=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:y,...w}=e,b=Ec(Wi,n),[_,E]=p.useState(null),P=ur(t,Ne=>E(Ne)),[L,I]=p.useState(null),C=tf(L),M=(C==null?void 0:C.width)??0,S=(C==null?void 0:C.height)??0,x=s+(o!=="center"?"-"+o:""),F=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},D=Array.isArray(l)?l:[l],N=D.length>0,T={padding:F,boundary:D.filter(af),altBoundary:N},{refs:V,floatingStyles:$,placement:U,isPositioned:B,middlewareData:Z}=Bh({strategy:"fixed",placement:x,whileElementsMounted:(...Ne)=>Fh(...Ne,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[zh({mainAxis:r+S,alignmentAxis:i}),c&&Kh({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Wh():void 0,...T}),c&&Jh({...T}),Qh({...T,apply:({elements:Ne,rects:je,availableWidth:he,availableHeight:we})=>{const{width:pe,height:bt}=je.reference,ot=Ne.floating.style;ot.setProperty("--radix-popper-available-width",`${he}px`),ot.setProperty("--radix-popper-available-height",`${we}px`),ot.setProperty("--radix-popper-anchor-width",`${pe}px`),ot.setProperty("--radix-popper-anchor-height",`${bt}px`)}}),L&&Yh({element:L,padding:a}),cf({arrowWidth:M,arrowHeight:S}),m&&Gh({strategy:"referenceHidden",...T})]}),[Q,X]=Nc(U),G=Dl(y);ni(()=>{B&&(G==null||G())},[B,G]);const ye=(ce=Z.arrow)==null?void 0:ce.x,te=(Y=Z.arrow)==null?void 0:Y.y,ne=((ie=Z.arrow)==null?void 0:ie.centerOffset)!==0,[oe,ae]=p.useState();return ni(()=>{_&&ae(window.getComputedStyle(_).zIndex)},[_]),u.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:B?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(We=Z.transformOrigin)==null?void 0:We.x,(Ie=Z.transformOrigin)==null?void 0:Ie.y].join(" "),...((Je=Z.hide)==null?void 0:Je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(sf,{scope:n,placedSide:Q,onArrowChange:I,arrowX:ye,arrowY:te,shouldHideArrow:ne,children:u.jsx(As.div,{"data-side":Q,"data-align":X,...w,ref:P,style:{...w.style,animation:B?void 0:"none"}})})})});Mc.displayName=Wi;var Lc="PopperArrow",of={top:"bottom",right:"left",bottom:"top",left:"right"},Ic=p.forwardRef(function(t,n){const{__scopePopper:s,...r}=t,o=rf(Lc,s),i=of[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(ef,{...r,ref:n,style:{...r.style,display:"block"}})})});Ic.displayName=Lc;function af(e){return e!==null}var cf=e=>({name:"transformOrigin",options:e,fn(t){var b,_,E;const{placement:n,rects:s,middlewareData:r}=t,i=((b=r.arrow)==null?void 0:b.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,h]=Nc(n),d={start:"0%",center:"50%",end:"100%"}[h],m=(((_=r.arrow)==null?void 0:_.x)??0)+a/2,g=(((E=r.arrow)==null?void 0:E.y)??0)+c/2;let y="",w="";return l==="bottom"?(y=i?d:`${m}px`,w=`${-c}px`):l==="top"?(y=i?d:`${m}px`,w=`${s.floating.height+c}px`):l==="right"?(y=`${-c}px`,w=i?d:`${g}px`):l==="left"&&(y=`${s.floating.width+c}px`,w=i?d:`${g}px`),{data:{x:y,y:w}}}});function Nc(e){const[t,n="center"]=e.split("-");return[t,n]}var lf=kc,Fc=Oc,uf=Mc,df=Ic,yr="Popover",[Tc,Jp]=Pa(yr,[Cc]),Es=Cc(),[hf,Zt]=Tc(yr),Dc=e=>{const{__scopePopover:t,children:n,open:s,defaultOpen:r,onOpenChange:o,modal:i=!1}=e,a=Es(t),c=p.useRef(null),[l,h]=p.useState(!1),[d,m]=Hl({prop:s,defaultProp:r??!1,onChange:o,caller:yr});return u.jsx(lf,{...a,children:u.jsx(hf,{scope:t,contentId:Ul(),triggerRef:c,open:d,onOpenChange:m,onOpenToggle:p.useCallback(()=>m(g=>!g),[m]),hasCustomAnchor:l,onCustomAnchorAdd:p.useCallback(()=>h(!0),[]),onCustomAnchorRemove:p.useCallback(()=>h(!1),[]),modal:i,children:n})})};Dc.displayName=yr;var Hc="PopoverAnchor",ff=p.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,r=Zt(Hc,n),o=Es(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=r;return p.useEffect(()=>(i(),()=>a()),[i,a]),u.jsx(Fc,{...o,...s,ref:t})});ff.displayName=Hc;var Uc="PopoverTrigger",qc=p.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,r=Zt(Uc,n),o=Es(n),i=ur(t,r.triggerRef),a=u.jsx(As.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Kc(r.open),...s,ref:i,onClick:ds(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:u.jsx(Fc,{asChild:!0,...o,children:a})});qc.displayName=Uc;var Ji="PopoverPortal",[pf,mf]=Tc(Ji,{forceMount:void 0}),Vc=e=>{const{__scopePopover:t,forceMount:n,children:s,container:r}=e,o=Zt(Ji,t);return u.jsx(pf,{scope:t,forceMount:n,children:u.jsx(Aa,{present:n||o.open,children:u.jsx(ql,{asChild:!0,container:r,children:s})})})};Vc.displayName=Ji;var $n="PopoverContent",$c=p.forwardRef((e,t)=>{const n=mf($n,e.__scopePopover),{forceMount:s=n.forceMount,...r}=e,o=Zt($n,e.__scopePopover);return u.jsx(Aa,{present:s||o.open,children:o.modal?u.jsx(vf,{...r,ref:t}):u.jsx(yf,{...r,ref:t})})});$c.displayName=$n;var gf=Bl("PopoverContent.RemoveScroll"),vf=p.forwardRef((e,t)=>{const n=Zt($n,e.__scopePopover),s=p.useRef(null),r=ur(t,s),o=p.useRef(!1);return p.useEffect(()=>{const i=s.current;if(i)return Vl(i)},[]),u.jsx($l,{as:gf,allowPinchZoom:!0,children:u.jsx(Bc,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ds(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),o.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ds(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:ds(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),yf=p.forwardRef((e,t)=>{const n=Zt($n,e.__scopePopover),s=p.useRef(!1),r=p.useRef(!1);return u.jsx(Bc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(s.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),s.current=!1,r.current=!1},onInteractOutside:o=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(s.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=o.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),Bc=p.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:s,onOpenAutoFocus:r,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:h,...d}=e,m=Zt($n,n),g=Es(n);return Zl(),u.jsx(zl,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:r,onUnmountAutoFocus:o,children:u.jsx(Kl,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:h,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>m.onOpenChange(!1),children:u.jsx(uf,{"data-state":Kc(m.open),role:"dialog",id:m.contentId,...g,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Zc="PopoverClose",zc=p.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,r=Zt(Zc,n);return u.jsx(As.button,{type:"button",...s,ref:t,onClick:ds(e.onClick,()=>r.onOpenChange(!1))})});zc.displayName=Zc;var wf="PopoverArrow",bf=p.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,r=Es(n);return u.jsx(df,{...r,...s,ref:t})});bf.displayName=wf;function Kc(e){return e?"open":"closed"}var Wc=Dc,Jc=qc,Qc=Vc,Gc=$c,xf=zc;function Yc({account:e,className:t,...n}){return u.jsxs("div",{className:ps("flex min-h-full max-w-full flex-col items-center justify-start gap-1",t),...n,children:[u.jsx(Ca,{account:e,size:"3xl",className:"mb-4 max-w-full"}),e.name&&u.jsx(Wl,{account:e,className:"text-text-default max-w-full truncate text-xl font-medium"}),u.jsx(Ea,{account:e,className:"text-md text-text-light max-w-full truncate"})]})}function _f(e){const{i18n:t,_:n}=ke(),{session:s,canSwitchAccounts:r}=Jl(),{setSession:o,doSignOut:i}=Oi();return u.jsxs(Wc,{children:[u.jsx(Jc,{asChild:!0,children:u.jsx(un,{"aria-label":t._({id:"1D3nu5"}),shape:"circle",transparent:!0,color:"gray",...e,children:u.jsx(Ca,{account:s.account,size:e.size})})}),u.jsx(Qc,{children:u.jsx(Gc,{side:"top",align:"end",className:"w-full",sideOffset:5,style:{width:320},children:u.jsxs("div",{className:"relative flex flex-col gap-2 rounded-lg border border-slate-200 bg-white p-2 shadow-lg dark:border-slate-700 dark:bg-slate-800",children:[u.jsx(Yc,{account:s.account,"aria-label":t._({id:"OLYdKb"}),className:"mt-4"}),u.jsx(un,{onClick:()=>i(s.account),color:"primary",children:u.jsx(K,{id:"fcWrnU"})},"signout"),r&&u.jsx(un,{onClick:()=>o(null),children:u.jsx(K,{id:"T8poTj"})},"other"),u.jsx(xf,{className:"absolute right-2 top-2 rounded opacity-50 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2","aria-label":t._({id:"NqPBw0"}),children:u.jsx(Ql,{className:"size-6","aria-hidden":!0})},"close")]})})})]})}function Sf({children:e,basePath:t,title:n,links:s,prepend:r}){const{_:o}=ke(),{pathname:i}=ve().location,a=i===t,c=s.find(d=>d.to===i),l=c==null?void 0:c.title,h=typeof l=="object"?o(l):l;return u.jsxs(Ll,{title:n,header:u.jsx(_f,{className:"shrink-0",size:"lg"}),children:[r,u.jsxs("div",{className:"flex w-full flex-1 flex-col md:flex-row",children:[u.jsx("aside",{className:`shrink-0 p-4 md:px-8 ${a?"w-full md:w-auto":"hidden max-w-xs md:block"}`,role:"navigation",children:u.jsx("nav",{className:"flex flex-col gap-2",children:s.filter(({hidden:d,to:m})=>!d||i===m).map(({to:d,title:m,description:g,icon:y})=>u.jsxs(vs,{to:d,className:ps("flex items-center justify-start","min-h-12 px-4","rounded-3xl transition-colors","whitespace-nowrap font-medium md:whitespace-normal","focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2","text-text-default","md:text-text-light md:[&.active]:text-text-default","hover:bg-slate-100 dark:hover:bg-slate-800","[&.active]:bg-slate-100 dark:[&.active]:bg-slate-800",a&&d===t&&"hidden md:flex"),activeOptions:{exact:!0},activeProps:{className:"active","aria-current":"page"},children:[y&&u.jsx("span",{"aria-hidden":"true",className:"bg-primary text-primary-contrast -ml-2 mb-auto mr-2 mt-2 inline-flex size-8 shrink-0 grow-0 items-center justify-center rounded-full",children:u.jsx(y,{className:"size-4"})}),u.jsxs("span",{className:"my-1 min-w-0 flex-1",children:[u.jsx("span",{className:"block truncate",children:typeof m=="object"?o(m):m}),g&&u.jsx("span",{className:"block whitespace-pre-wrap text-xs md:hidden",children:typeof g=="object"?o(g):g})]})]},d))})}),u.jsxs("main",{className:`w-4xl mx-auto min-w-0 max-w-full px-4 md:px-8 ${a?"-order-1 md:order-1 md:block":""}`,role:"main",children:[u.jsxs("nav",{className:"mb-4 flex items-center gap-2",children:[!a&&u.jsx(vs,{to:t,className:"text-text-light rounded-full p-2 hover:bg-slate-200 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 md:hidden dark:hover:bg-slate-800",children:u.jsx(cc,{className:"size-6"})},"back"),h&&u.jsxs("h2",{className:"text-text-default text-2xl font-light",children:[u.jsx("title",{children:h}),u.jsx("b",{children:h})]})]}),e]})]})]})}const Qi=Ed({component:Hi,errorComponent:Ma});function Xc(e){const{name:t,logo:n}=Il();return u.jsxs("span",{...e,children:[n&&u.jsx("img",{src:n,alt:t,className:"not-prose mr-1 inline-block h-[1em] select-none object-contain align-baseline"}),u.jsx("b",{children:t})]})}function Rf(){const{account:e}=Vt();return u.jsxs("div",{className:"prose-sm md:prose prose-slate dark:prose-invert max-w-none",children:[u.jsx("section",{children:u.jsx(K,{id:"/y3yb7",components:{0:u.jsx("h2",{}),1:u.jsx("p",{}),2:u.jsx("strong",{})}})}),u.jsx("section",{children:u.jsx(K,{id:"SBs48I",components:{0:u.jsx("h3",{}),1:u.jsx("p",{}),2:u.jsx(Ms,{className:"underline",href:"https://bsky.app"}),3:u.jsx("p",{}),4:u.jsx("p",{}),5:u.jsx("strong",{className:"whitespace-nowrap"}),6:u.jsx(Ea,{account:e})}})}),u.jsx("section",{children:u.jsx(K,{id:"gB0RTR",components:{0:u.jsx("h3",{}),1:u.jsx("p",{}),2:u.jsx("ul",{}),3:u.jsx("li",{}),4:u.jsx("strong",{}),5:u.jsx("li",{}),6:u.jsx("strong",{}),7:u.jsx("li",{}),8:u.jsx("strong",{}),9:u.jsx("li",{}),10:u.jsx("strong",{})}})}),u.jsx("section",{children:u.jsx(K,{id:"bfpG7G",components:{0:u.jsx("h3",{}),1:u.jsx("p",{}),2:u.jsx("strong",{}),3:u.jsx("ul",{}),4:u.jsx("li",{}),5:u.jsx("li",{}),6:u.jsx("li",{}),7:u.jsx("p",{}),8:u.jsx(Ms,{href:`https://bsky.app/profile/${e.preferred_username??e.sub}`}),9:u.jsx("p",{}),10:u.jsx(Xc,{})}})}),u.jsxs("section",{children:[u.jsx(K,{id:"7+d6kP",components:{0:u.jsx("h3",{}),1:u.jsx("p",{})}}),u.jsxs("ul",{children:[u.jsx("li",{children:u.jsx(K,{id:"NS7S2h",components:{0:u.jsx(Ms,{className:"underline",href:"https://bsky.social"})}})}),u.jsx("li",{children:u.jsx(K,{id:"ZWuMKu",components:{0:u.jsx(Ms,{className:"underline",href:"https://atproto.com"})}})})]})]})]})}function Gi({value:e,startAngle:t=0,progressDirection:n="clockwise",size:s=24,strokeWidth:r=2,className:o,...i}){const a=s/2,c=a-r/2,l=2*Math.PI*c,d=Math.max(0,Math.min(100,e??70))/100,m=n==="clockwise"?l*(1-d):l*d;return u.jsxs("svg",{width:s,height:s,style:{transform:`rotate(${t}deg)`},className:ps(e==null&&"animate-spin",o),...i,children:[u.jsx("circle",{cx:a,cy:a,r:c,fill:"none",stroke:"currentColor",strokeWidth:r,className:"opacity-20"}),u.jsx("circle",{cx:a,cy:a,r:c,fill:"none",stroke:"currentColor",strokeWidth:r,strokeDasharray:l,strokeDashoffset:m,strokeLinecap:"round",className:"transition-all duration-100 ease-linear",style:{transform:n==="counter-clockwise"?"scaleX(-1)":void 0,transformOrigin:"center"}})]})}function el(e){const{i18n:t,_:n}=ke(),s=Pf(e),r=Af(),o=Math.floor(s/1e3);if(o<60)return t._({id:"xOTzt5"});const i=Math.floor(o/60);if(i===1)return t._({id:"kMDavg"});if(i<60)return t._({id:"KtNcea",values:{deltaMinutes:i}});const a=Math.floor(i/60);if(a===1)return t._({id:"x6/d1l"});if(a<24)return t._({id:"69w9p3",values:{deltaHours:a}});if(a<48&&new Date(e).getTime()<r)return t._({id:"rQRrkB"});const c=Math.floor(a/24);return t._({id:"cd9Wo5",values:{deltaDays:c}})}function Pf(e){const t=p.useMemo(()=>new Date(e),[e]),[n,s]=p.useState(()=>Date.now()-t.getTime());return p.useEffect(()=>{const r=setInterval(()=>{s(Date.now()-t.getTime())},1e3);return()=>clearInterval(r)},[t]),n}function Af(){const[e,t]=p.useState(()=>{const n=new Date;return new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime()});return p.useEffect(()=>{const n=setInterval(()=>{const s=new Date;t(new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime())},6e4);return()=>clearInterval(n)},[]),e}function Cf({date:e}){return el(e)}const Ai=({sub:e})=>["oauth-sessions",e];function Ef({sub:e}){const t=rt();return za({refetchOnWindowFocus:"always",queryKey:Ai({sub:e}),retry:0,staleTime:5e3,queryFn:async n=>await t.fetch("GET","/oauth-sessions",{sub:e},n)})}function kf(){const e=rt(),t=dr();return Bt({async mutationFn({sub:n,tokenId:s}){await e.fetch("POST","/revoke-oauth-session",{sub:n,tokenId:s})},onError(n,{sub:s}){t.invalidateQueries({queryKey:Ai({sub:s})})},onSuccess(n,{sub:s}){t.invalidateQueries({queryKey:Ai({sub:s})})}})}const jf="urn:ietf:params:oauth:client-assertion-type:jwt-bearer";var ba;const Of=((ba=URL.canParse)==null?void 0:ba.bind(URL))??(e=>{try{return new URL(e),!0}catch{return!1}});function tl(e){return!!(e.match(/^\d+\.\d+\.\d+\.\d+$/)||e.startsWith("[")&&e.endsWith("]"))}function nl(e){return e==="localhost"||e==="127.0.0.1"||e==="[::1]"}function Mf(e){const t=e.split(".");if(t.length<2)return!0;const n=t.at(-1).toLowerCase();return n==="test"||n==="local"||n==="localhost"||n==="invalid"||n==="example"}function Lf(e){const t=e.startsWith("https://")?8:e.startsWith("http://")?7:-1;if(t===-1)throw new TypeError('URL must use the "https:" or "http:" protocol');const n=e.indexOf("#",t),s=e.indexOf("?",t),r=s!==-1&&(n===-1||s<n)?s:-1,o=n===-1?r===-1?e.length:r:r===-1?n:Math.min(n,r),i=e.indexOf("/",t),a=i===-1||i>o?o:i;if(t===a)throw new TypeError("URL must contain a host");return e.substring(a,o)}const Vo=e=>{if(typeof e=="string"&&e.startsWith("{")&&e.endsWith("}"))try{return JSON.parse(e)}catch{return e}return e},If=e=>{if(typeof e=="string"){const t=Number(e);if(!Number.isNaN(t))return t}return e},Nf=(e,t)=>{if(e.length===0)throw new TypeError("Value cannot be empty");if(e.includes(" "))throw new TypeError("Value cannot contain spaces");const n=t.length,s=e.length;if(n<s)return!1;let r=t.indexOf(e),o;for(;r!==-1;){if(o=r+s,(r===0||t.charCodeAt(r-1)===32)&&(o===n||t.charCodeAt(o)===32))return!0;r=t.indexOf(e,o+1)}return!1},wr=f.string().refine(e=>e.includes(":")&&Of(e),{message:"Invalid URL"}),sl=wr.superRefine((e,t)=>{if(!e.startsWith("http://"))return t.addIssue({code:ge.custom,message:'URL must use the "http:" protocol'}),!1;const n=new URL(e);return nl(n.hostname)?!0:(t.addIssue({code:ge.custom,message:'URL must use "localhost", "127.0.0.1" or "[::1]" as hostname'}),!1)}),Yi=wr.superRefine((e,t)=>{if(!e.startsWith("https://"))return t.addIssue({code:ge.custom,message:'URL must use the "https:" protocol'}),!1;const n=new URL(e);if(nl(n.hostname))return t.addIssue({code:ge.custom,message:"https: URL must not use a loopback host"}),!1;if(!tl(n.hostname)){if(!n.hostname.includes("."))return t.addIssue({code:ge.custom,message:"Domain name must contain at least two segments"}),!1;if(n.hostname.endsWith(".local"))return t.addIssue({code:ge.custom,message:'Domain name must not end with ".local"'}),!1}return!0}),de=f.string().superRefine((e,t)=>{if(e.startsWith("http://")){const n=sl.safeParse(e);return n.success||n.error.issues.forEach(t.addIssue,t),n.success}if(e.startsWith("https://")){const n=Yi.safeParse(e);return n.success||n.error.issues.forEach(t.addIssue,t),n.success}return t.addIssue({code:ge.custom,message:'URL must use the "http:" or "https:" protocol'}),!1}),Ff=wr.superRefine((e,t)=>{const n=e.indexOf("."),s=e.indexOf(":");if(n===-1||s===-1||n>s)return t.addIssue({code:ge.custom,message:'Private-use URI scheme requires a "." as part of the protocol'}),!1;const r=new URL(e);if(!r.protocol.includes("."))return t.addIssue({code:ge.custom,message:"Invalid private-use URI scheme"}),!1;const i=r.protocol.slice(0,-1).split(".").reverse().join(".");return Mf(i)&&t.addIssue({code:ge.custom,message:"Private-use URI Scheme redirect URI must not be a local hostname"}),r.href.startsWith(`${r.protocol}//`)||r.username||r.password||r.hostname||r.port?(t.addIssue({code:ge.custom,message:"Private-Use URI Scheme must be in the form <scheme>:/{path} (notice the single slash!) as per RFC 8252"}),!1):!0}),Tf=/^[\x21\x23-\x5B\x5D-\x7E]+(?: [\x21\x23-\x5B\x5D-\x7E]+)*$/,rl=e=>Tf.test(e),Xi=f.string().refine(rl,{message:"Invalid OAuth scope"}),Df="atproto";function Hf(e){return rl(e)&&Nf(Df,e)}const Uf=f.string().refine(Hf,{message:"Invalid ATProto OAuth scope"}),zt=f.string().min(1),il=sl.superRefine((e,t)=>e.startsWith("http://localhost")?(t.addIssue({code:ge.custom,message:'Use of "localhost" hostname is not allowed (RFC 8252), use a loopback IP such as "127.0.0.1" instead'}),!1):!0),qf=il,eo=f.string().superRefine((e,t)=>{if(e.startsWith("https:")){const n=Yi.safeParse(e);return n.success||n.error.issues.forEach(t.addIssue,t),n.success}else if(e.startsWith("http:")){const n=il.safeParse(e);return n.success||n.error.issues.forEach(t.addIssue,t),n.success}else if(/^[^.:]+(?:\.[^.:]+)+:/.test(e)){const n=Ff.safeParse(e);return n.success||n.error.issues.forEach(t.addIssue,t),n.success}else return t.addIssue({code:ge.custom,message:'URL must use the "https:" or "http:" protocol, or a private-use URI scheme (RFC 8252)'}),!1}),Jt="http://localhost";zt.superRefine((e,t)=>{const n=al(e);return n.success||t.addIssue({code:"custom",message:n.message}),n.success});function ol(e){return al(e).success}function al(e){if(!e.startsWith(Jt))return{success:!1,message:`Value must start with "${Jt}"`};if(e.includes("#",Jt.length))return{success:!1,message:"Value must not contain a hash component"};const t=e.length>Jt.length&&e.charCodeAt(Jt.length)===47?Jt.length+1:Jt.length;if(e.length!==t&&e.charCodeAt(t)!==63)return{success:!1,message:"Value must not contain a path component"};const n=e.slice(t+1);return Vf(n)}function Vf(e){const t={},n=typeof e=="string"?new URLSearchParams(e):e;for(const[s,r]of n)if(s==="scope"){if("scope"in t)return{success:!1,message:'Duplicate "scope" query parameter'};const o=Xi.safeParse(r);if(!o.success)return{success:!1,message:`Invalid "scope" query parameter: ${o.error.issues.map(a=>a.message).join(", ")||"Validation failed"}`};t.scope=o.data}else if(s==="redirect_uri"){const o=qf.safeParse(r);if(!o.success)return{success:!1,message:`Invalid "redirect_uri" query parameter: ${o.error.issues.map(a=>a.message).join(", ")||"Validation failed"}`};t.redirect_uris==null?t.redirect_uris=[o.data]:t.redirect_uris.push(o.data)}else return{success:!1,message:`Unexpected query parameter "${s}"`};return{success:!0,value:t}}const $f="ERR_JWKS_NO_MATCHING_KEY",Bf="ERR_JWK_INVALID",$o="ERR_JWK_NOT_FOUND",or="ERR_JWT_INVALID",Zf="ERR_JWT_CREATE",zf="ERR_JWT_VERIFY";class Tt extends TypeError{constructor(t="JWK error",n=Bf,s){super(t,s),this.code=n}}class fs extends Error{constructor(t="Unable to create JWT",n=Zf,s){super(t,s),this.code=n}static from(t,n,s){return t instanceof fs?t:t instanceof Tt?new fs(s,t.code,{cause:t}):new fs(s,n,{cause:t})}}class mt extends Error{constructor(t="Invalid JWT",n=zf,s){super(t,s),this.code=n}static from(t,n,s){return t instanceof mt?t:t instanceof Tt?new mt(s,t.code,{cause:t}):new mt(s,n,{cause:t})}}class Kf{constructor(t,n,s){xe(this,"name");xe(this,"prefix");xe(this,"baseEncode");this.name=t,this.prefix=n,this.baseEncode=s}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class Wf{constructor(t,n,s){xe(this,"name");xe(this,"prefix");xe(this,"baseDecode");xe(this,"prefixCodePoint");this.name=t,this.prefix=n;const r=n.codePointAt(0);if(r===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r,this.baseDecode=s}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return cl(this,t)}}class Jf{constructor(t){xe(this,"decoders");this.decoders=t}or(t){return cl(this,t)}decode(t){const n=t[0],s=this.decoders[n];if(s!=null)return s.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}function cl(e,t){return new Jf({...e.decoders??{[e.prefix]:e},...t.decoders??{[t.prefix]:t}})}class Qf{constructor(t,n,s,r){xe(this,"name");xe(this,"prefix");xe(this,"baseEncode");xe(this,"baseDecode");xe(this,"encoder");xe(this,"decoder");this.name=t,this.prefix=n,this.baseEncode=s,this.baseDecode=r,this.encoder=new Kf(t,n,s),this.decoder=new Wf(t,n,r)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}function Gf({name:e,prefix:t,encode:n,decode:s}){return new Qf(e,t,n,s)}function Yf(e,t,n,s){let r=e.length;for(;e[r-1]==="=";)--r;const o=new Uint8Array(r*n/8|0);let i=0,a=0,c=0;for(let l=0;l<r;++l){const h=t[e[l]];if(h===void 0)throw new SyntaxError(`Non-${s} character`);a=a<<n|h,i+=n,i>=8&&(i-=8,o[c++]=255&a>>i)}if(i>=n||(255&a<<8-i)!==0)throw new SyntaxError("Unexpected end of data");return o}function Xf(e,t,n){const s=t[t.length-1]==="=",r=(1<<n)-1;let o="",i=0,a=0;for(let c=0;c<e.length;++c)for(a=a<<8|e[c],i+=8;i>n;)i-=n,o+=t[r&a>>i];if(i!==0&&(o+=t[r&a<<n-i]),s)for(;(o.length*n&7)!==0;)o+="=";return o}function e0(e){const t={};for(let n=0;n<e.length;++n)t[e[n]]=n;return t}function br({name:e,prefix:t,bitsPerChar:n,alphabet:s}){const r=e0(s);return Gf({prefix:t,name:e,encode(o){return Xf(o,s,n)},decode(o){return Yf(o,r,n,e)}})}br({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6});br({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6});const t0=br({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6});br({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});const Bo=e=>e!==void 0,n0=e=>(t,n)=>{const s=e.indexOf(t),r=e.indexOf(n);return s===r?0:s===-1?1:r===-1?-1:s-r};function s0(e){return e==null?t=>!0:Array.isArray(e)?t=>e.includes(t):t=>t===e}const St=(e,t)=>function(){const n=e.call(this);return Object.defineProperty(this,e.name,{get:()=>n,enumerable:!0,configurable:!0}),n},r0=new TextDecoder;function Zo(e){const t=t0.baseDecode(e),n=r0.decode(t);return JSON.parse(n)}const ll=(e,t)=>{let n;for(let s=0;s<e.length;s++)if(n=e.charCodeAt(s),!(65<=n&&n<=90||97<=n&&n<=122||48<=n&&n<=57||n===45||n===95||n===46)){const r=String.fromCodePoint(e.codePointAt(s));return t.addIssue({code:ge.custom,message:`Invalid character "${r}" in JWT at position ${s}`})}},ul=(e,t=2)=>{if(!Number.isFinite(e)||e<1||(e|0)!==e)throw new TypeError(`Count must be a natural number (got ${e})`);const n=e*t+(e-1),s="Invalid JWT format";return(r,o)=>{if(r.length<n)return o.addIssue({code:ge.custom,message:`${s}: too short`}),!1;let i=0;for(let a=0;a<e-1;a++){const c=r.indexOf(".",i);if(c===-1)return o.addIssue({code:ge.custom,message:`${s}: expected ${e} segments, got ${a+1}`}),!1;if(c-i<t)return o.addIssue({code:ge.custom,message:`${s}: segment ${a+1} is too short`}),!1;i=c+1}return r.indexOf(".",i)!==-1?(o.addIssue({code:ge.custom,message:`${s}: too many segments`}),!1):r.length-i<t?(o.addIssue({code:ge.custom,message:`${s}: last segment is too short`}),!1):!0}};function i0(e,t,n){return n.indexOf(e,t+1)===-1}const xr=["verify","encrypt","wrapKey"];f.enum(xr);function to(e){return xr.includes(e)}function no(e){return e==="verify"}function so(e){return e==="encrypt"||e==="wrapKey"}const ro=["sign","decrypt","unwrapKey","deriveKey","deriveBits"];f.enum(ro);function o0(e){return ro.includes(e)}const a0=[...ro,...xr],c0=f.enum(a0),ks=f.object({kty:f.string().min(1),alg:f.string().min(1).optional(),kid:f.string().min(1).optional(),use:f.enum(["sig","enc"]).optional(),key_ops:f.array(c0).min(1,{message:"At least one key usage must be specified"}).refine(e=>e.every(i0),{message:"key_ops must not contain duplicates"}).optional(),x5c:f.array(f.string()).optional(),x5t:f.string().min(1).optional(),"x5t#S256":f.string().min(1).optional(),x5u:f.string().url().optional(),ext:f.boolean().optional(),iat:f.number().int().optional(),exp:f.number().int().optional(),nbf:f.number().int().optional(),revoked:f.object({revoked_at:f.number().int(),reason:f.string().optional()}).optional()}),l0=ks.extend({kty:f.literal("RSA"),alg:f.enum(["RS256","RS384","RS512","PS256","PS384","PS512"]).optional(),n:f.string().min(1),e:f.string().min(1),d:f.string().min(1).optional(),p:f.string().min(1).optional(),q:f.string().min(1).optional(),dp:f.string().min(1).optional(),dq:f.string().min(1).optional(),qi:f.string().min(1).optional(),oth:f.array(f.object({r:f.string().optional(),d:f.string().optional(),t:f.string().optional()})).min(1).optional()}),u0=ks.extend({kty:f.literal("EC"),alg:f.enum(["ES256","ES384","ES512"]).optional(),crv:f.enum(["P-256","P-384","P-521"]),x:f.string().min(1),y:f.string().min(1),d:f.string().min(1).optional()}),d0=ks.extend({kty:f.literal("EC"),alg:f.enum(["ES256K"]).optional(),crv:f.enum(["secp256k1"]),x:f.string().min(1),y:f.string().min(1),d:f.string().min(1).optional()}),h0=ks.extend({kty:f.literal("OKP"),alg:f.enum(["EdDSA"]).optional(),crv:f.enum(["Ed25519","Ed448"]),x:f.string().min(1),d:f.string().min(1).optional()}),f0=ks.extend({kty:f.literal("oct"),alg:f.enum(["HS256","HS384","HS512"]).optional(),k:f.string()}),_r=f.union([l0,u0,d0,h0,f0]).refine(e=>e.use==null||hl(e),{message:'"use" can only be used with public keys',path:["use"]}).refine(e=>{var t;return!((t=e.key_ops)!=null&&t.some(o0))||ao(e)},{message:"private key usage not allowed for public keys",path:["key_ops"]}).refine(e=>e.use==null||e.key_ops==null||e.use==="sig"&&e.key_ops.every(no)||e.use==="enc"&&e.key_ops.every(so),{message:'"key_ops" must be consistent with "use"',path:["key_ops"]}),io=_r.refine(p0,{message:'"kid" is required',path:["kid"]}).refine(hl,{message:"private key not allowed"}).refine(e=>!e.key_ops||e.key_ops.every(to),{message:'"key_ops" must not contain private key usage for public keys',path:["key_ops"]});_r.refine(ao,{message:"private key required"});function p0(e){return"kid"in e&&e.kid!=null}function oo(e){return"k"in e&&e.k!=null}function dl(e){return"d"in e&&e.d!=null}function ao(e){return dl(e)||oo(e)}function hl(e){return!dl(e)&&!oo(e)}const{process:Ds}=globalThis;var xa;const zo=typeof Ds<"u"&&typeof((xa=Ds==null?void 0:Ds.versions)==null?void 0:xa.node)=="string";function*m0(e){if(typeof e.alg=="string"){yield e.alg;return}switch(e.kty){case"EC":{if(Vr(e)&&(yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW"),$r(e)){const t="crv"in e?e.crv:void 0;switch(t){case"P-256":case"P-384":yield`ES${t.slice(-3)}`;break;case"P-521":yield"ES512";break;case"secp256k1":zo&&(yield"ES256K");break;default:throw new Tt(`Unsupported crv "${t}"`)}}return}case"OKP":{if(!e.use)throw new Tt('Missing "use" Parameter value');yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW";return}case"RSA":{Vr(e)&&(yield"RSA-OAEP",yield"RSA-OAEP-256",yield"RSA-OAEP-384",yield"RSA-OAEP-512",zo&&(yield"RSA1_5")),$r(e)&&(yield"PS256",yield"PS384",yield"PS512",yield"RS256",yield"RS384",yield"RS512");return}case"oct":{Vr(e)&&(yield"A128GCMKW",yield"A192GCMKW",yield"A256GCMKW",yield"A128KW",yield"A192KW",yield"A256KW"),$r(e)&&(yield"HS256",yield"HS384",yield"HS512");return}default:throw new Tt(`Unsupported kty "${e.kty}"`)}}function Vr(e){var t;return((t=e.key_ops)==null?void 0:t.some(so))??(e.use==null||e.use==="enc")}function $r(e){var t;return((t=e.key_ops)==null?void 0:t.some(no))??(e.use==null||e.use==="sig")}f.object({keys:f.array(f.unknown()).transform(e=>e.map(t=>_r.safeParse(t)).filter(t=>t.success).map(t=>t.data))});const g0=f.object({keys:f.array(f.unknown()).transform(e=>e.map(t=>io.safeParse(t)).filter(t=>t.success).map(t=>t.data))}),Sr=f.string().superRefine(ll).superRefine(ul(3)),v0=f.string().superRefine(ll).superRefine(ul(2)),y0=f.object({alg:f.string(),jku:f.string().url().optional(),jwk:f.object({kty:f.string(),crv:f.string().optional(),x:f.string().optional(),y:f.string().optional(),e:f.string().optional(),n:f.string().optional()}).optional(),kid:f.string().optional(),x5u:f.string().optional(),x5c:f.array(f.string()).optional(),x5t:f.string().optional(),"x5t#S256":f.string().optional(),typ:f.string().optional(),cty:f.string().optional(),crit:f.array(f.string()).optional()}).passthrough(),w0=f.string().superRefine((e,t)=>{try{const n=new URL(e);n.protocol!=="http:"&&n.protocol!=="https:"&&t.addIssue({code:f.ZodIssueCode.custom,message:"Only http: and https: protocols are allowed"}),(n.username||n.password)&&t.addIssue({code:f.ZodIssueCode.custom,message:"Credentials not allowed"}),n.search&&t.addIssue({code:f.ZodIssueCode.custom,message:"Query string not allowed"}),n.hash&&t.addIssue({code:f.ZodIssueCode.custom,message:"Fragment not allowed"})}catch{t.addIssue({code:f.ZodIssueCode.invalid_string,validation:"url"})}return e}),b0=f.object({iss:f.string().optional(),aud:f.union([f.string(),f.array(f.string()).nonempty()]).optional(),sub:f.string().optional(),exp:f.number().int().optional(),nbf:f.number().int().optional(),iat:f.number().int().optional(),jti:f.string().optional(),htm:f.string().optional(),htu:w0.optional(),ath:f.string().optional(),acr:f.string().optional(),azp:f.string().optional(),amr:f.array(f.string()).optional(),cnf:f.object({kid:f.string().optional(),jwk:io.optional(),jwe:f.string().optional(),jku:f.string().url().optional(),jkt:f.string().optional(),"x5t#S256":f.string().optional(),osc:f.string().optional()}).optional(),client_id:f.string().optional(),scope:f.string().optional(),nonce:f.string().optional(),at_hash:f.string().optional(),c_hash:f.string().optional(),s_hash:f.string().optional(),auth_time:f.number().int().optional(),name:f.string().optional(),family_name:f.string().optional(),given_name:f.string().optional(),middle_name:f.string().optional(),nickname:f.string().optional(),preferred_username:f.string().optional(),gender:f.string().optional(),picture:f.string().url().optional(),profile:f.string().url().optional(),website:f.string().url().optional(),birthdate:f.string().regex(/\d{4}-\d{2}-\d{2}/).optional(),zoneinfo:f.string().regex(/^[A-Za-z0-9_/]+$/).optional(),locale:f.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?$/).optional(),updated_at:f.number().int().optional(),email:f.string().optional(),email_verified:f.boolean().optional(),phone_number:f.string().optional(),phone_number_verified:f.boolean().optional(),address:f.object({formatted:f.string().optional(),street_address:f.string().optional(),locality:f.string().optional(),region:f.string().optional(),postal_code:f.string().optional(),country:f.string().optional()}).optional(),authorization_details:f.array(f.object({type:f.string(),locations:f.array(f.string()).optional(),actions:f.array(f.string()).optional(),datatypes:f.array(f.string()).optional(),identifier:f.string().optional(),privileges:f.array(f.string()).optional()}).passthrough()).optional()}).passthrough();function x0(e){const{0:t,1:n,length:s}=e.split(".");if(s>3||s<2)throw new mt(void 0,or);const r=y0.parse(Zo(t));if(s===2&&(r==null?void 0:r.alg)!=="none")throw new mt(void 0,or);const o=b0.parse(Zo(n));return{header:r,payload:o}}var _0=function(e,t,n){for(var s=arguments.length>2,r=0;r<t.length;r++)n=s?t[r].call(e,n):t[r].call(e);return s?n:void 0},Yn=function(e,t,n,s,r,o){function i(_){if(_!==void 0&&typeof _!="function")throw new TypeError("Function expected");return _}for(var a=s.kind,c=a==="getter"?"get":a==="setter"?"set":"value",l=!t&&e?s.static?e:e.prototype:null,h=t||(l?Object.getOwnPropertyDescriptor(l,s.name):{}),d,m=!1,g=n.length-1;g>=0;g--){var y={};for(var w in s)y[w]=w==="access"?{}:s[w];for(var w in s.access)y.access[w]=s.access[w];y.addInitializer=function(_){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(_||null))};var b=(0,n[g])(a==="accessor"?{get:h.get,set:h.set}:h[c],y);if(a==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(d=i(b.get))&&(h.get=d),(d=i(b.set))&&(h.set=d),(d=i(b.init))&&r.unshift(d)}else(d=i(b))&&(a==="field"?r.unshift(d):h[c]=d)}l&&Object.defineProperty(l,s.name,h),m=!0};(()=>{var i;let e=[],t,n,s,r,o;return i=class{constructor(c){this.jwk=(_0(this,e),c)}get isPrivate(){return ao(this.jwk)}get isSymetric(){return oo(this.jwk)}get privateJwk(){if(this.isPrivate)return this.jwk}get publicJwk(){if(this.isSymetric)return;if(!this.isPrivate)return this.jwk;const c=io.safeParse({...this.jwk,d:void 0,k:void 0,use:void 0,key_ops:S0(this.keyOps)??xr});if(c.success)return Object.freeze(c.data)}get bareJwk(){if(this.isSymetric)return;const{kty:c,crv:l,e:h,n:d,x:m,y:g}=this.jwk;return Object.freeze(_r.parse({crv:l,e:h,kty:c,n:d,x:m,y:g}))}get use(){return this.jwk.use}get keyOps(){return this.jwk.key_ops}get alg(){return this.jwk.alg}get kid(){return this.jwk.kid}get crv(){return this.jwk.crv}get algorithms(){return Object.freeze(Array.from(m0(this.jwk)))}get isRevoked(){return this.jwk.revoked!=null}isActive(c){var h;if(!(c!=null&&c.allowRevoked)&&this.isRevoked)return!1;const l=(c==null?void 0:c.clockTolerance)??0;if(l!==1/0){const d=((h=c==null?void 0:c.currentDate)==null?void 0:h.getTime())??Date.now(),{exp:m,nbf:g}=this.jwk;if(g!=null&&!(d>=g*1e3-l)||m!=null&&!(d<m*1e3+l))return!1}return!0}matches(c){return!(c.kid!=null&&!(Array.isArray(c.kid)?this.kid!=null&&c.kid.includes(this.kid):this.kid===c.kid)||c.alg!=null&&!(Array.isArray(c.alg)?c.alg.some(h=>this.algorithms.includes(h)):this.algorithms.includes(c.alg))||c.usage!=null&&(!(this.keyOps==null||this.keyOps.includes(c.usage)||c.usage==="verify"&&this.keyOps.includes("sign")||c.usage==="encrypt"&&this.keyOps.includes("decrypt")||c.usage==="wrapKey"&&this.keyOps.includes("unwrapKey"))||!(this.use==null||this.use==="sig"&&no(c.usage)||this.use==="enc"&&so(c.usage))||!(this.isPrivate||to(c.usage))))}},(()=>{const c=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[St],n=[St],s=[St],r=[St],o=[St],Yn(i,null,t,{kind:"getter",name:"isPrivate",static:!1,private:!1,access:{has:l=>"isPrivate"in l,get:l=>l.isPrivate},metadata:c},null,e),Yn(i,null,n,{kind:"getter",name:"isSymetric",static:!1,private:!1,access:{has:l=>"isSymetric"in l,get:l=>l.isSymetric},metadata:c},null,e),Yn(i,null,s,{kind:"getter",name:"publicJwk",static:!1,private:!1,access:{has:l=>"publicJwk"in l,get:l=>l.publicJwk},metadata:c},null,e),Yn(i,null,r,{kind:"getter",name:"bareJwk",static:!1,private:!1,access:{has:l=>"bareJwk"in l,get:l=>l.bareJwk},metadata:c},null,e),Yn(i,null,o,{kind:"getter",name:"algorithms",static:!1,private:!1,access:{has:l=>"algorithms"in l,get:l=>l.algorithms},metadata:c},null,e),c&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:c})})(),i})();function S0(e){if(e==null)return;const t=new Set(e.filter(to));return e.includes("sign")&&t.add("verify"),e.includes("decrypt")&&t.add("encrypt"),e.includes("unwrapKey")&&t.add("wrapKey"),Array.from(t)}var R0=function(e,t,n){for(var s=arguments.length>2,r=0;r<t.length;r++)n=s?t[r].call(e,n):t[r].call(e);return s?n:void 0},Br=function(e,t,n,s,r,o){function i(_){if(_!==void 0&&typeof _!="function")throw new TypeError("Function expected");return _}for(var a=s.kind,c=a==="getter"?"get":a==="setter"?"set":"value",l=!t&&e?s.static?e:e.prototype:null,h=t||(l?Object.getOwnPropertyDescriptor(l,s.name):{}),d,m=!1,g=n.length-1;g>=0;g--){var y={};for(var w in s)y[w]=w==="access"?{}:s[w];for(var w in s.access)y.access[w]=s.access[w];y.addInitializer=function(_){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(_||null))};var b=(0,n[g])(a==="accessor"?{get:h.get,set:h.set}:h[c],y);if(a==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(d=i(b.get))&&(h.get=d),(d=i(b.set))&&(h.set=d),(d=i(b.init))&&r.unshift(d)}else(d=i(b))&&(a==="field"?r.unshift(d):h[c]=d)}l&&Object.defineProperty(l,s.name,h),m=!0};const P0=e=>e.privateJwk,A0=e=>e.publicJwk;(()=>{var r;let e=[],t,n,s;return r=class{constructor(i,a=i instanceof r?[...i.preferredSigningAlgorithms]:["EdDSA","ES256K","ES256","PS256","PS384","PS512","HS256","HS384","HS512"]){this.preferredSigningAlgorithms=(R0(this,e),a);const c=[],l=new Set;for(const h of i)if(h&&(c.push(h),h.kid)){if(l.has(h.kid))throw new Tt(`Duplicate key: ${h.kid}`);l.add(h.kid)}this.keys=Object.freeze(c)}get size(){return this.keys.length}get signAlgorithms(){const i=new Set;for(const a of this)if(a.use==="sig")for(const c of a.algorithms)i.add(c);return Object.freeze([...i].sort(n0(this.preferredSigningAlgorithms)))}get publicJwks(){return Object.freeze({keys:Object.freeze(Array.from(this,A0).filter(Bo))})}get privateJwks(){return Object.freeze({keys:Object.freeze(Array.from(this,P0).filter(Bo))})}has(i){return this.keys.some(a=>a.kid===i)}get(i){const a=this.find(i);if(a)return a;throw new Tt(`Key not found ${i.kid??i.alg??i.usage??"<unknown>"}`,$o)}find(i){for(const a of this.list(i))return a}*list(i){for(const a of this)a.isActive(i)&&a.matches(i)&&(yield a)}findPrivateKey({kid:i,alg:a,usage:c,...l}){const h=[];Array.isArray(a)&&a.length===1&&(a=a[0]);for(const g of this.list({...l,kid:i,alg:a,usage:c})){if(typeof a=="string")return{key:g,alg:a};h.push(g)}const d=s0(a),m=h.map(g=>[g,g.algorithms.filter(d)]);for(const g of this.preferredSigningAlgorithms)for(const[y,w]of m)if(w.includes(g))return{key:y,alg:g};for(const[g,y]of m)for(const w of y)return{key:g,alg:w};throw new Tt(`No private key found for ${i||a||c}`,$o)}[(t=[St],n=[St],s=[St],Symbol.iterator)](){return this.keys.values()}async createJwt({alg:i,kid:a,...c},l){try{const{key:h,alg:d}=this.findPrivateKey({alg:i,kid:a,usage:"sign",allowRevoked:!1}),m={...c,alg:d,kid:h.kid};return typeof l=="function"&&(l=await l(m,h)),await h.createJwt(m,l)}catch(h){throw fs.from(h)}}async verifyJwt(i,a){const{header:c}=x0(i),{kid:l,alg:h}=c,d=[];for(const m of this.list({...a,kid:l,alg:h,usage:"verify"}))try{return{...await m.verifyJwt(i,a),key:m}}catch(g){d.push(g)}switch(d.length){case 0:throw new mt("No key matched",$f);case 1:throw mt.from(d[0],or);default:throw mt.from(d,or)}}toJSON(){return structuredClone(this.publicJwks)}},(()=>{const i=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;Br(r,null,t,{kind:"getter",name:"signAlgorithms",static:!1,private:!1,access:{has:a=>"signAlgorithms"in a,get:a=>a.signAlgorithms},metadata:i},null,e),Br(r,null,n,{kind:"getter",name:"publicJwks",static:!1,private:!1,access:{has:a=>"publicJwks"in a,get:a=>a.publicJwks},metadata:i},null,e),Br(r,null,s,{kind:"getter",name:"privateJwks",static:!1,private:!1,access:{has:a=>"privateJwks"in a,get:a=>a.privateJwks},metadata:i},null,e),i&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),r})();const C0=f.object({type:f.string(),locations:f.array(wr).optional(),actions:f.array(f.string()).optional(),datatypes:f.array(f.string()).optional(),identifier:f.string().optional(),privileges:f.array(f.string()).optional()}),fl=f.array(C0),E0=f.union([f.string().regex(/^DPoP$/i).transform(()=>"DPoP"),f.string().regex(/^Bearer$/i).transform(()=>"Bearer")]),k0=f.object({access_token:f.string(),token_type:E0,scope:f.string().optional(),refresh_token:f.string().optional(),expires_in:f.number().optional(),id_token:Sr.optional(),authorization_details:fl.optional()}).passthrough();k0.extend({token_type:f.literal("DPoP"),sub:Gl,scope:Uf,id_token:f.never().optional()});const j0=f.string().min(1),O0=f.object({grant_type:f.literal("authorization_code"),code:f.string().min(1),redirect_uri:eo,code_verifier:f.string().min(43).max(128).regex(/^[a-zA-Z0-9-._~]+$/).optional()}),pl=f.object({request:f.union([Sr,v0])}),ml=f.enum(["S256","plain"]),gl=f.enum(["none","login","consent","select_account","create"]),M0=f.enum(["query","fragment","form_post"]),vl=f.enum(["code","token","none","code id_token token","code id_token","code token","id_token token","id_token"]),L0=f.enum(["auth_time","nonce","acr","name","family_name","given_name","middle_name","nickname","preferred_username","gender","picture","profile","website","birthdate","zoneinfo","locale","updated_at","email","email_verified","phone_number","phone_number_verified","address"]),Ko=f.union([f.string(),f.number(),f.boolean()]),I0=f.object({essential:f.boolean().optional(),value:Ko.optional(),values:f.array(Ko).optional()}),N0=f.enum(["userinfo","id_token"]),yl=f.object({client_id:zt,state:f.string().optional(),redirect_uri:eo.optional(),scope:Xi.optional(),response_type:vl,code_challenge:f.string().optional(),code_challenge_method:ml.optional(),dpop_jkt:f.string().optional(),response_mode:M0.optional(),nonce:f.string().optional(),max_age:f.preprocess(If,f.number().int().min(0)).optional(),claims:f.preprocess(Vo,f.record(N0,f.record(L0,f.union([f.literal(null),I0])))).optional(),login_hint:f.string().min(1).optional(),ui_locales:f.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?( [a-z]{2,3}(-[A-Z]{2})?)*$/).optional(),id_token_hint:Sr.optional(),display:f.enum(["page","popup","touch","wap"]).optional(),prompt:gl.optional(),authorization_details:f.preprocess(Vo,fl).optional()});f.union([yl,pl]);const F0=f.string().min(1),T0=f.object({request_uri:F0});f.intersection(f.object({client_id:zt}),f.union([yl,pl,T0]));f.enum(["invalid_request","unauthorized_client","access_denied","unsupported_response_type","invalid_scope","server_error","temporarily_unavailable"]);const wl=de.superRefine((e,t)=>{if(e.endsWith("/"))return t.addIssue({code:f.ZodIssueCode.custom,message:"Issuer URL must not end with a slash"}),!1;const n=new URL(e);if(n.username||n.password)return t.addIssue({code:f.ZodIssueCode.custom,message:"Issuer URL must not contain a username or password"}),!1;if(n.hash||n.search)return t.addIssue({code:f.ZodIssueCode.custom,message:"Issuer URL must not contain a query or fragment"}),!1;const s=n.pathname==="/"?n.origin:n.href;return e!==s?(t.addIssue({code:f.ZodIssueCode.custom,message:"Issuer URL must be in the canonical form"}),!1):!0}),D0=f.object({issuer:wl,claims_supported:f.array(f.string()).optional(),claims_locales_supported:f.array(f.string()).optional(),claims_parameter_supported:f.boolean().optional(),request_parameter_supported:f.boolean().optional(),request_uri_parameter_supported:f.boolean().optional(),require_request_uri_registration:f.boolean().optional(),scopes_supported:f.array(f.string()).optional(),subject_types_supported:f.array(f.string()).optional(),response_types_supported:f.array(f.string()).optional(),response_modes_supported:f.array(f.string()).optional(),grant_types_supported:f.array(f.string()).optional(),code_challenge_methods_supported:f.array(ml).min(1).optional(),ui_locales_supported:f.array(f.string()).optional(),id_token_signing_alg_values_supported:f.array(f.string()).optional(),display_values_supported:f.array(f.string()).optional(),request_object_signing_alg_values_supported:f.array(f.string()).optional(),authorization_response_iss_parameter_supported:f.boolean().optional(),authorization_details_types_supported:f.array(f.string()).optional(),request_object_encryption_alg_values_supported:f.array(f.string()).optional(),request_object_encryption_enc_values_supported:f.array(f.string()).optional(),jwks_uri:de.optional(),authorization_endpoint:de,token_endpoint:de,token_endpoint_auth_methods_supported:f.array(f.string()).default(["client_secret_basic"]),token_endpoint_auth_signing_alg_values_supported:f.array(f.string()).optional(),revocation_endpoint:de.optional(),introspection_endpoint:de.optional(),pushed_authorization_request_endpoint:de.optional(),require_pushed_authorization_requests:f.boolean().optional(),userinfo_endpoint:de.optional(),end_session_endpoint:de.optional(),registration_endpoint:de.optional(),dpop_signing_alg_values_supported:f.array(f.string()).optional(),protected_resources:f.array(de).optional(),client_id_metadata_document_supported:f.boolean().optional(),prompt_values_supported:f.array(gl).optional()});D0.superRefine((e,t)=>{e.require_pushed_authorization_requests&&!e.pushed_authorization_request_endpoint&&t.addIssue({code:f.ZodIssueCode.custom,message:'"pushed_authorization_request_endpoint" required when "require_pushed_authorization_requests" is true'})}).superRefine((e,t)=>{e.response_types_supported&&(e.response_types_supported.includes("code")||t.addIssue({code:f.ZodIssueCode.custom,message:'Response type "code" is required'}))}).superRefine((e,t)=>{var n;(n=e.token_endpoint_auth_signing_alg_values_supported)!=null&&n.includes("none")&&t.addIssue({code:f.ZodIssueCode.custom,message:'Client authentication method "none" is not allowed'})});const H0=f.object({grant_type:f.literal("client_credentials")}),U0=f.object({client_id:zt,client_assertion_type:f.literal(jf),client_assertion:Sr}),q0=f.object({client_id:zt,client_secret:f.string()}),V0=f.object({client_id:zt});f.union([U0,q0,V0]);const $0=f.intersection(zt,Yi).superRefine((e,t)=>{const n=new URL(e);return n.username||n.password?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID must not contain credentials"}),!1):n.hash?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID must not contain a fragment"}),!1):n.pathname==="/"?(t.addIssue({code:f.ZodIssueCode.custom,message:'ClientID must contain a path component (e.g. "/client-metadata.json")'}),!1):n.pathname.endsWith("/")?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID path must not end with a trailing slash"}),!1):tl(n.hostname)?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID hostname must not be an IP address"}),!1):Lf(e)!==n.pathname?(t.addIssue({code:f.ZodIssueCode.custom,message:`ClientID must be in canonical form ("${n.href}", got "${e}")`}),!1):!0}),B0=$0.superRefine((e,t)=>{const n=new URL(e);return n.port?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID must not contain a port"}),!1):n.search?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID must not contain a query string"}),!1):n.pathname!=="/oauth-client-metadata.json"?(t.addIssue({code:f.ZodIssueCode.custom,message:'ClientID must be "/oauth-client-metadata.json"'}),!1):!0});function bl(e){return B0.safeParse(e).success}const Z0=f.enum(["client_secret_basic","client_secret_jwt","client_secret_post","none","private_key_jwt","self_signed_tls_client_auth","tls_client_auth"]),z0=f.enum(["authorization_code","implicit","refresh_token","password","client_credentials","urn:ietf:params:oauth:grant-type:jwt-bearer","urn:ietf:params:oauth:grant-type:saml2-bearer"]);f.object({redirect_uris:f.array(eo).nonempty(),response_types:f.array(vl).nonempty().default(["code"]),grant_types:f.array(z0).nonempty().default(["authorization_code"]),scope:Xi.optional(),token_endpoint_auth_method:Z0.default("client_secret_basic"),token_endpoint_auth_signing_alg:f.string().optional(),userinfo_signed_response_alg:f.string().optional(),userinfo_encrypted_response_alg:f.string().optional(),jwks_uri:de.optional(),jwks:g0.optional(),application_type:f.enum(["web","native"]).default("web"),subject_type:f.enum(["public","pairwise"]).default("public"),request_object_signing_alg:f.string().optional(),id_token_signed_response_alg:f.string().optional(),authorization_signed_response_alg:f.string().default("RS256"),authorization_encrypted_response_enc:f.enum(["A128CBC-HS256"]).optional(),authorization_encrypted_response_alg:f.string().optional(),client_id:zt.optional(),client_name:f.string().optional(),client_uri:de.optional(),policy_uri:de.optional(),tos_uri:de.optional(),logo_uri:de.optional(),default_max_age:f.number().optional(),require_auth_time:f.boolean().optional(),contacts:f.array(f.string().email()).optional(),tls_client_certificate_bound_access_tokens:f.boolean().optional(),dpop_bound_access_tokens:f.boolean().optional(),authorization_details_types:f.array(f.string()).optional()});f.object({request_uri:f.string(),expires_in:f.number().int().positive()});const K0=f.object({grant_type:f.literal("password"),username:f.string(),password:f.string()});f.object({resource:de.refine(e=>!e.includes("?"),{message:"Resource URL must not contain query parameters"}).refine(e=>!e.includes("#"),{message:"Resource URL must not contain a fragment"}),authorization_servers:f.array(wl).optional(),jwks_uri:de.optional(),scopes_supported:f.array(f.string()).optional(),bearer_methods_supported:f.array(f.enum(["header","body","query"])).optional(),resource_signing_alg_values_supported:f.array(f.string()).optional(),resource_documentation:de.optional(),resource_policy_uri:de.optional(),resource_tos_uri:de.optional()});const xl=f.string().min(1),W0=f.object({grant_type:f.literal("refresh_token"),refresh_token:xl});f.object({token:f.union([j0,xl]),token_type_hint:f.enum(["access_token","refresh_token"]).optional()});f.discriminatedUnion("grant_type",[O0,W0,K0,H0]);f.enum(["interaction_required","login_required","account_selection_required","consent_required","invalid_request_uri","invalid_request_object","request_not_supported","request_uri_not_supported","registration_not_supported"]);f.object({sub:f.string(),iss:f.string().url().optional(),aud:f.union([f.string(),f.array(f.string()).min(1)]).optional(),email:f.string().email().optional(),email_verified:f.boolean().optional(),name:f.string().optional(),preferred_username:f.string().optional(),picture:f.string().url().optional()});function J0({clientId:e}){const{i18n:t,_:n}=ke();return ol(e)?t._({id:"u607t5"}):bl(e)?new URL(e).hostname:e}function Q0({clientId:e,clientMetadata:t}){const{i18n:n,_:s}=ke();return ol(e)?n._({id:"4Yp2r7"}):t!=null&&t.client_name?t.client_name:bl(e)?new URL(e).hostname:e}function G0(){const{account:e}=Vt(),{sub:t}=e,{data:n,isLoading:s,refetch:r}=Ef({sub:t});return n?n.length>0?u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{children:u.jsx(K,{id:"kx1Bq7"})}),n.map(o=>u.jsx(Y0,{sub:t,session:o},o.tokenId)),u.jsx("p",{className:"text-text-light mt-4 text-sm",children:u.jsx(K,{id:"SLeBc7"})})]}):u.jsx("p",{children:u.jsx(K,{id:"pWhWXw"})}):s?u.jsx(Gi,{className:"text-primary",size:28}):u.jsx(Kn,{role:"status",action:u.jsx(Sa,{onClick:()=>r(),children:u.jsx(K,{id:"6gRgw8"})}),children:u.jsx(K,{id:"b9LiEi"})})}function Y0({session:{clientId:e,clientMetadata:t,tokenId:n,createdAt:s,updatedAt:r,scope:o=t==null?void 0:t.scope},sub:i}){const{i18n:a,i18n:c,_:l}=ke(),{notify:h}=$t(),{mutateAsync:d,isPending:m}=kf(),g=J0({clientId:e}),y=Q0({clientId:e,clientMetadata:t}),w=async()=>{try{await d({sub:i,tokenId:n}),h({variant:"success",title:a._({id:"AyHABv"}),duration:2e3})}catch(b){console.error("Failed to revoke OAuth session",b),h({variant:"error",title:a._({id:"ginpu1"}),duration:2e3})}};return u.jsxs("div",{className:"border-contrast-50 dark:border-contrast-100 flex flex-wrap items-center justify-between space-x-4 border-t px-2 pt-3",children:[u.jsxs("div",{className:"flex min-w-36 flex-1 flex-col space-x-2 truncate",children:[u.jsx("p",{className:"truncate font-semibold",children:y}),u.jsx("p",{className:"font-mono text-xs",children:g}),u.jsxs("p",{className:"text-text-light truncate text-xs",children:[u.jsx(K,{id:"4hPphw",values:{0:c.date(s,{year:"numeric",month:"short",day:"numeric"})}})," • ",u.jsx(K,{id:"NNWPjN",components:{0:u.jsx(Cf,{date:r})}})]})]}),u.jsx(un,{size:"sm",className:"min-w-max shrink-0 grow-0",loading:m,onClick:w,children:u.jsx(K,{id:"Hwam5t"})})]})}const _l=({sub:e})=>["account-sessions",e];function X0({sub:e}){const t=rt();return za({refetchOnWindowFocus:"always",staleTime:15e3,queryKey:_l({sub:e}),queryFn:async({signal:n})=>t.fetch("GET","/account-sessions",{sub:e},{signal:n})})}function ep(){const e=rt(),t=dr();return Bt({async mutationFn({sub:n,deviceId:s}){return e.fetch("POST","/revoke-account-session",{sub:n,deviceId:s})},onSuccess(n,{sub:s}){t.invalidateQueries({queryKey:_l({sub:s})})}})}var tp="2.0.3",Ci=500,Wo="user-agent",Bn="",Jo="?",ar="function",Nt="undefined",Zn="object",Ei="string",Ae="browser",ut="cpu",tt="device",Ze="engine",Ue="os",An="result",j="name",R="type",k="vendor",O="version",Ce="architecture",bs="major",A="model",ls="console",z="mobile",re="tablet",fe="smarttv",Qe="wearable",Zr="xr",us="embedded",Xn="inapp",co="brands",Yt="formFactors",lo="fullVersionList",Cn="platform",uo="platformVersion",Rr="bitness",Kt="sec-ch-ua",np=Kt+"-full-version-list",sp=Kt+"-arch",rp=Kt+"-"+Rr,ip=Kt+"-form-factors",op=Kt+"-"+z,ap=Kt+"-"+A,Sl=Kt+"-"+Cn,cp=Sl+"-version",Rl=[co,lo,z,A,Cn,uo,Ce,Yt,Rr],Hs="Amazon",mn="Apple",Qo="ASUS",Go="BlackBerry",Qt="Google",Yo="Huawei",Xo="Lenovo",ea="Honor",Us="LG",zr="Microsoft",Kr="Motorola",Wr="Nvidia",ta="OnePlus",Jr="OPPO",es="Samsung",na="Sharp",ts="Sony",Qr="Xiaomi",Gr="Zebra",sa="Chrome",ra="Chromium",xt="Chromecast",lp="Edge",ns="Firefox",ss="Opera",Yr="Facebook",ia="Sogou",gn="Mobile ",rs=" Browser",ki="Windows",up=typeof window!==Nt,Ee=up&&window.navigator?window.navigator:void 0,Rt=Ee&&Ee.userAgentData?Ee.userAgentData:void 0,dp=function(e,t){var n={},s=t;if(!cr(t)){s={};for(var r in t)for(var o in t[r])s[o]=t[r][o].concat(s[o]?s[o]:[])}for(var i in e)n[i]=s[i]&&s[i].length%2===0?s[i].concat(e[i]):e[i];return n},Pr=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},ji=function(e,t){if(typeof e===Zn&&e.length>0){for(var n in e)if(ht(e[n])==ht(t))return!0;return!1}return Gn(e)?ht(t).indexOf(ht(e))!==-1:!1},cr=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||(t?cr(e[n]):!1)},Gn=function(e){return typeof e===Ei},Xr=function(e){if(e){for(var t=[],n=zn(/\\?\"/g,e).split(","),s=0;s<n.length;s++)if(n[s].indexOf(";")>-1){var r=xs(n[s]).split(";v=");t[s]={brand:r[0],version:r[1]}}else t[s]=xs(n[s]);return t}},ht=function(e){return Gn(e)?e.toLowerCase():e},ei=function(e){return Gn(e)?zn(/[^\d\.]/g,e).split(".")[0]:void 0},ft=function(e){for(var t in e){var n=e[t];typeof n==Zn&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},zn=function(e,t){return Gn(t)?t.replace(e,Bn):t},is=function(e){return zn(/\\?\"/g,e)},xs=function(e,t){if(Gn(e))return e=zn(/^\s\s*/,e),typeof t===Nt?e:e.substring(0,Ci)},ti=function(e,t){if(!(!e||!t))for(var n=0,s,r,o,i,a,c;n<t.length&&!a;){var l=t[n],h=t[n+1];for(s=r=0;s<l.length&&!a&&l[s];)if(a=l[s++].exec(e),a)for(o=0;o<h.length;o++)c=a[++r],i=h[o],typeof i===Zn&&i.length>0?i.length===2?typeof i[1]==ar?this[i[0]]=i[1].call(this,c):this[i[0]]=i[1]:i.length===3?typeof i[1]===ar&&!(i[1].exec&&i[1].test)?this[i[0]]=c?i[1].call(this,c,i[2]):void 0:this[i[0]]=c?c.replace(i[1],i[2]):void 0:i.length===4&&(this[i[0]]=c?i[3].call(this,c.replace(i[1],i[2])):void 0):this[i]=c||void 0;n+=2}},Pt=function(e,t){for(var n in t)if(typeof t[n]===Zn&&t[n].length>0){for(var s=0;s<t[n].length;s++)if(ji(t[n][s],e))return n===Jo?void 0:n}else if(ji(t[n],e))return n===Jo?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},oa={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},aa={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ca={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[O,[j,gn+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[O,[j,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[j,O],[/opios[\/ ]+([\w\.]+)/i],[O,[j,ss+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[O,[j,ss+" GX"]],[/\bopr\/([\w\.]+)/i],[O,[j,ss]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[O,[j,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[O,[j,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[j,O],[/quark(?:pc)?\/([-\w\.]+)/i],[O,[j,"Quark"]],[/\bddg\/([\w\.]+)/i],[O,[j,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[O,[j,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[O,[j,"WeChat"]],[/konqueror\/([\w\.]+)/i],[O,[j,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[O,[j,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[O,[j,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[O,[j,"Smart "+Xo+rs]],[/(avast|avg)\/([\w\.]+)/i],[[j,/(.+)/,"$1 Secure"+rs],O],[/\bfocus\/([\w\.]+)/i],[O,[j,ns+" Focus"]],[/\bopt\/([\w\.]+)/i],[O,[j,ss+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[O,[j,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[O,[j,"Dolphin"]],[/coast\/([\w\.]+)/i],[O,[j,ss+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[O,[j,"MIUI"+rs]],[/fxios\/([\w\.-]+)/i],[O,[j,gn+ns]],[/\bqihoobrowser\/?([\w\.]*)/i],[O,[j,"360"]],[/\b(qq)\/([\w\.]+)/i],[[j,/(.+)/,"$1Browser"],O],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[j,/(.+)/,"$1"+rs],O],[/samsungbrowser\/([\w\.]+)/i],[O,[j,es+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[O,[j,ia+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[j,ia+" Mobile"],O],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[j,O],[/(lbbrowser|rekonq)/i],[j],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[O,j],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[j,Yr],O,[R,Xn]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[j,O,[R,Xn]],[/\bgsa\/([\w\.]+) .*safari\//i],[O,[j,"GSA"],[R,Xn]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[O,[j,"TikTok"],[R,Xn]],[/\[(linkedin)app\]/i],[j,[R,Xn]],[/(chromium)[\/ ]([-\w\.]+)/i],[j,O],[/headlesschrome(?:\/([\w\.]+)| )/i],[O,[j,sa+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[j,sa+" WebView"],O],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[O,[j,"Android"+rs]],[/chrome\/([\w\.]+) mobile/i],[O,[j,gn+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[j,O],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[O,[j,gn+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[j,gn+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[O,j],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[j,[O,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[j,O],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[j,gn+ns],O],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[j,"Netscape"],O],[/(wolvic|librewolf)\/([\w\.]+)/i],[j,O],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[O,[j,ns+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[j,[O,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[j,[O,/[^\d\.]+./,Bn]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Ce,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Ce,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Ce,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Ce,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Ce,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Ce,/ower/,Bn,ht]],[/ sun4\w[;\)]/i],[[Ce,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Ce,ht]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[A,[k,es],[R,re]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[A,[k,es],[R,z]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[A,[k,mn],[R,z]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[A,[k,mn],[R,re]],[/(macintosh);/i],[A,[k,mn]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[A,[k,na],[R,z]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[A,[k,ea],[R,re]],[/honor([-\w ]+)[;\)]/i],[A,[k,ea],[R,z]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[A,[k,Yo],[R,re]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[A,[k,Yo],[R,z]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[A,/_/g," "],[k,Qr],[R,re]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[A,/_/g," "],[k,Qr],[R,z]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[A,[k,Jr],[R,z]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[A,[k,Pt,{OnePlus:["304","403","203"],"*":Jr}],[R,re]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[A,[k,"BLU"],[R,z]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[A,[k,"Vivo"],[R,z]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[A,[k,"Realme"],[R,z]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[A,[k,Kr],[R,z]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[A,[k,Kr],[R,re]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[A,[k,Us],[R,re]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[A,[k,Us],[R,z]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[A,[k,Xo],[R,re]],[/(nokia) (t[12][01])/i],[k,A,[R,re]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[A,/_/g," "],[R,z],[k,"Nokia"]],[/(pixel (c|tablet))\b/i],[A,[k,Qt],[R,re]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[A,[k,Qt],[R,z]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[A,[k,ts],[R,z]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[A,"Xperia Tablet"],[k,ts],[R,re]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[A,[k,ta],[R,z]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[A,[k,Hs],[R,re]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[A,/(.+)/g,"Fire Phone $1"],[k,Hs],[R,z]],[/(playbook);[-\w\),; ]+(rim)/i],[A,k,[R,re]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[A,[k,Go],[R,z]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[A,[k,Qo],[R,re]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[A,[k,Qo],[R,z]],[/(nexus 9)/i],[A,[k,"HTC"],[R,re]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[k,[A,/_/g," "],[R,z]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[A,[k,"TCL"],[R,re]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[A,[k,"TCL"],[R,z]],[/(itel) ((\w+))/i],[[k,ht],A,[R,Pt,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[A,[k,"Acer"],[R,re]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[A,[k,"Meizu"],[R,z]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[A,[k,"Ulefone"],[R,z]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[A,[k,"Energizer"],[R,z]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[A,[k,"Cat"],[R,z]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[A,[k,"Smartfren"],[R,z]],[/droid.+; (a(?:015|06[35]|142p?))/i],[A,[k,"Nothing"],[R,z]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[A,[k,"Archos"],[R,re]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[A,[k,"Archos"],[R,z]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[k,A,[R,re]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[k,A,[R,z]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[k,A,[R,re]],[/(surface duo)/i],[A,[k,zr],[R,re]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[A,[k,"Fairphone"],[R,z]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[A,[k,Wr],[R,re]],[/(sprint) (\w+)/i],[k,A,[R,z]],[/(kin\.[onetw]{3})/i],[[A,/\./g," "],[k,zr],[R,z]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[A,[k,Gr],[R,re]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[A,[k,Gr],[R,z]],[/smart-tv.+(samsung)/i],[k,[R,fe]],[/hbbtv.+maple;(\d+)/i],[[A,/^/,"SmartTV"],[k,es],[R,fe]],[/tcast.+(lg)e?. ([-\w]+)/i],[k,A,[R,fe]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[k,Us],[R,fe]],[/(apple) ?tv/i],[k,[A,mn+" TV"],[R,fe]],[/crkey.*devicetype\/chromecast/i],[[A,xt+" Third Generation"],[k,Qt],[R,fe]],[/crkey.*devicetype\/([^/]*)/i],[[A,/^/,"Chromecast "],[k,Qt],[R,fe]],[/fuchsia.*crkey/i],[[A,xt+" Nest Hub"],[k,Qt],[R,fe]],[/crkey/i],[[A,xt],[k,Qt],[R,fe]],[/(portaltv)/i],[A,[k,Yr],[R,fe]],[/droid.+aft(\w+)( bui|\))/i],[A,[k,Hs],[R,fe]],[/(shield \w+ tv)/i],[A,[k,Wr],[R,fe]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[A,[k,na],[R,fe]],[/(bravia[\w ]+)( bui|\))/i],[A,[k,ts],[R,fe]],[/(mi(tv|box)-?\w+) bui/i],[A,[k,Qr],[R,fe]],[/Hbbtv.*(technisat) (.*);/i],[k,A,[R,fe]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[k,xs],[A,xs],[R,fe]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[A,[R,fe]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[R,fe]],[/(ouya)/i,/(nintendo) (\w+)/i],[k,A,[R,ls]],[/droid.+; (shield)( bui|\))/i],[A,[k,Wr],[R,ls]],[/(playstation \w+)/i],[A,[k,ts],[R,ls]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[A,[k,zr],[R,ls]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[A,[k,es],[R,Qe]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[k,A,[R,Qe]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[A,[k,Jr],[R,Qe]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[A,[k,mn],[R,Qe]],[/(opwwe\d{3})/i],[A,[k,ta],[R,Qe]],[/(moto 360)/i],[A,[k,Kr],[R,Qe]],[/(smartwatch 3)/i],[A,[k,ts],[R,Qe]],[/(g watch r)/i],[A,[k,Us],[R,Qe]],[/droid.+; (wt63?0{2,3})\)/i],[A,[k,Gr],[R,Qe]],[/droid.+; (glass) \d/i],[A,[k,Qt],[R,Zr]],[/(pico) (4|neo3(?: link|pro)?)/i],[k,A,[R,Zr]],[/(quest( \d| pro)?s?).+vr/i],[A,[k,Yr],[R,Zr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[k,[R,us]],[/(aeobc)\b/i],[A,[k,Hs],[R,us]],[/(homepod).+mac os/i],[A,[k,mn],[R,us]],[/windows iot/i],[[R,us]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[A,[R,Pt,{mobile:"Mobile",xr:"VR","*":re}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[R,re]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[R,z]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[A,[k,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[O,[j,lp+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[j,O],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[O,[j,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[j,O],[/ladybird\//i],[[j,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[O,j]],os:[[/microsoft (windows) (vista|xp)/i],[j,O],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[j,[O,Pt,oa]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[O,Pt,oa],[j,ki]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[O,/_/g,"."],[j,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[j,"macOS"],[O,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[O,[j,xt+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[O,[j,xt+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[O,[j,xt+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[O,[j,xt+" Linux"]],[/crkey\/([\d\.]+)/i],[O,[j,xt]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[O,j],[/(ubuntu) ([\w\.]+) like android/i],[[j,/(.+)/,"$1 Touch"],O],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[j,O],[/\(bb(10);/i],[O,[j,Go]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[O,[j,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[O,[j,ns+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[O,[j,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[O,[j,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[j,"Chrome OS"],O],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[j,O],[/(sunos) ?([\w\.\d]*)/i],[[j,"Solaris"],O],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[j,O]]},qs=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return ft.call(e.init,[[Ae,[j,O,bs,R]],[ut,[Ce]],[tt,[R,A,k]],[Ze,[j,O]],[Ue,[j,O]]]),ft.call(e.isIgnore,[[Ae,[O,bs]],[Ze,[O]],[Ue,[O]]]),ft.call(e.isIgnoreRgx,[[Ae,/ ?browser$/i],[Ue,/ ?os$/i]]),ft.call(e.toString,[[Ae,[j,O]],[ut,[Ce]],[tt,[k,A]],[Ze,[j,O]],[Ue,[j,O]]]),e}(),hp=function(e,t){var n=qs.init[t],s=qs.isIgnore[t]||0,r=qs.isIgnoreRgx[t]||0,o=qs.toString[t]||0;function i(){ft.call(this,n)}return i.prototype.getItem=function(){return e},i.prototype.withClientHints=function(){return Rt?Rt.getHighEntropyValues(Rl).then(function(a){return e.setCH(new Pl(a,!1)).parseCH().get()}):e.parseCH().get()},i.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=An&&(i.prototype.is=function(a){var c=!1;for(var l in this)if(this.hasOwnProperty(l)&&!ji(s,l)&&ht(r?zn(r,this[l]):this[l])==ht(r?zn(r,a):a)){if(c=!0,a!=Nt)break}else if(a==Nt&&c){c=!c;break}return c},i.prototype.toString=function(){var a=Bn;for(var c in o)typeof this[o[c]]!==Nt&&(a+=(a?" ":Bn)+this[o[c]]);return a||Nt}),Rt||(i.prototype.then=function(a){var c=this,l=function(){for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d])};l.prototype={is:i.prototype.is,toString:i.prototype.toString};var h=new l;return a(h),h}),new i};function Pl(e,t){if(e=e||{},ft.call(this,Rl),t)ft.call(this,[[co,Xr(e[Kt])],[lo,Xr(e[np])],[z,/\?1/.test(e[op])],[A,is(e[ap])],[Cn,is(e[Sl])],[uo,is(e[cp])],[Ce,is(e[sp])],[Yt,Xr(e[ip])],[Rr,is(e[rp])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==Nt&&(this[n]=e[n])}function la(e,t,n,s){return this.get=function(r){return r?this.data.hasOwnProperty(r)?this.data[r]:void 0:this.data},this.set=function(r,o){return this.data[r]=o,this},this.setCH=function(r){return this.uaCH=r,this},this.detectFeature=function(){if(Ee&&Ee.userAgent==this.ua)switch(this.itemType){case Ae:Ee.brave&&typeof Ee.brave.isBrave==ar&&this.set(j,"Brave");break;case tt:!this.get(R)&&Rt&&Rt[z]&&this.set(R,z),this.get(A)=="Macintosh"&&Ee&&typeof Ee.standalone!==Nt&&Ee.maxTouchPoints&&Ee.maxTouchPoints>2&&this.set(A,"iPad").set(R,re);break;case Ue:!this.get(j)&&Rt&&Rt[Cn]&&this.set(j,Rt[Cn]);break;case An:var r=this.data,o=function(i){return r[i].getItem().detectFeature().get()};this.set(Ae,o(Ae)).set(ut,o(ut)).set(tt,o(tt)).set(Ze,o(Ze)).set(Ue,o(Ue))}return this},this.parseUA=function(){return this.itemType!=An&&ti.call(this.data,this.ua,this.rgxMap),this.itemType==Ae&&this.set(bs,ei(this.get(O))),this},this.parseCH=function(){var r=this.uaCH,o=this.rgxMap;switch(this.itemType){case Ae:case Ze:var i=r[lo]||r[co],a;if(i)for(var c in i){var l=i[c].brand||i[c],h=i[c].version;this.itemType==Ae&&!/not.a.brand/i.test(l)&&(!a||/chrom/i.test(a)&&l!=ra)&&(l=Pt(l,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(j,l).set(O,h).set(bs,ei(h)),a=l),this.itemType==Ze&&l==ra&&this.set(O,h)}break;case ut:var d=r[Ce];d&&(d&&r[Rr]=="64"&&(d+="64"),ti.call(this.data,d+";",o));break;case tt:if(r[z]&&this.set(R,z),r[A]&&(this.set(A,r[A]),!this.get(R)||!this.get(k))){var m={};ti.call(m,"droid 9; "+r[A]+")",o),!this.get(R)&&m.type&&this.set(R,m.type),!this.get(k)&&m.vendor&&this.set(k,m.vendor)}if(r[Yt]){var g;if(typeof r[Yt]!="string")for(var y=0;!g&&y<r[Yt].length;)g=Pt(r[Yt][y++],aa);else g=Pt(r[Yt],aa);this.set(R,g)}break;case Ue:var w=r[Cn];if(w){var b=r[uo];w==ki&&(b=parseInt(ei(b),10)>=13?"11":"10"),this.set(j,w).set(O,b)}this.get(j)==ki&&r[A]=="Xbox"&&this.set(j,"Xbox").set(O,void 0);break;case An:var _=this.data,E=function(P){return _[P].getItem().setCH(r).parseCH().get()};this.set(Ae,E(Ae)).set(ut,E(ut)).set(tt,E(tt)).set(Ze,E(Ze)).set(Ue,E(Ue))}return this},ft.call(this,[["itemType",e],["ua",t],["uaCH",s],["rgxMap",n],["data",hp(this,e)]]),this}function wt(e,t,n){if(typeof e===Zn?(cr(e,!0)?(typeof t===Zn&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e===Ei&&!cr(t,!0)&&(n=t,t=void 0),n&&typeof n.append===ar){var s={};n.forEach(function(c,l){s[l]=c}),n=s}if(!(this instanceof wt))return new wt(e,t,n).getResult();var r=typeof e===Ei?e:n&&n[Wo]?n[Wo]:Ee&&Ee.userAgent?Ee.userAgent:Bn,o=new Pl(n,!0),i=t?dp(ca,t):ca,a=function(c){return c==An?function(){return new la(c,r,i,o).set("ua",r).set(Ae,this.getBrowser()).set(ut,this.getCPU()).set(tt,this.getDevice()).set(Ze,this.getEngine()).set(Ue,this.getOS()).get()}:function(){return new la(c,r,i[c],o).parseUA().get()}};return ft.call(this,[["getBrowser",a(Ae)],["getCPU",a(ut)],["getDevice",a(tt)],["getEngine",a(Ze)],["getOS",a(Ue)],["getResult",a(An)],["getUA",function(){return r}],["setUA",function(c){return Gn(c)&&(r=c.length>Ci?xs(c,Ci):c),this}]]).setUA(r),this}wt.VERSION=tp;wt.BROWSER=Pr([j,O,bs,R]);wt.CPU=Pr([Ce]);wt.DEVICE=Pr([A,k,R,ls,z,fe,re,Qe,us]);wt.ENGINE=wt.OS=Pr([j,O]);function fp(e){const t=p.useMemo(()=>e?wt(e):null,[e]);return t?t.device.is("mobile")?[t.os.name].filter(Boolean).join(" • "):[t.os.name,t.browser.name].filter(Boolean).join(" • "):void 0}function pp(){const{account:e}=Vt(),{data:t,refetch:n,isLoading:s}=X0(e);return t?t.length>0?u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{children:u.jsx(K,{id:"CbBmBd",components:{0:u.jsx(vs,{to:"/account/apps",className:"text-blue-600 hover:underline"})}})}),t.map(r=>u.jsx(mp,{sub:e.sub,session:r},`${e.sub}@${r.deviceId}`))]}):u.jsx("p",{children:u.jsx(K,{id:"Ssa5RR"})}):s?u.jsx(Gi,{className:"text-primary",size:28}):u.jsx(Kn,{role:"status",action:u.jsx(Sa,{onClick:()=>n(),children:u.jsx(K,{id:"6gRgw8"})}),children:u.jsx(K,{id:"b9LiEi"})})}function mp({session:e,sub:t}){const{notify:n}=$t(),{i18n:s,_:r}=ke(),{mutateAsync:o,isPending:i}=ep(),{userAgent:a,lastSeenAt:c,ipAddress:l}=e.deviceMetadata,h=fp(a||void 0),d=el(c),m=async()=>{try{await o({sub:t,deviceId:e.deviceId}),n({variant:"success",title:s._({id:"jAO4/H"}),duration:2e3})}catch{n({variant:"error",title:s._({id:"CiwBmN"}),duration:2e3})}};return u.jsxs("div",{className:"border-contrast-50 dark:border-contrast-100 flex flex-wrap items-center justify-between space-x-4 border-t px-2 pt-3",children:[u.jsxs("div",{className:"flex min-w-36 flex-1 flex-col space-x-2 truncate",children:[u.jsx("p",{className:"truncate font-semibold",children:h||u.jsx(K,{id:"K80Okk"})}),u.jsx("p",{className:"font-mono text-xs",children:l}),u.jsx("p",{className:"text-text-light truncate text-xs",children:u.jsx(K,{id:"sJZ6K9",values:{lastUsedAgo:d}})})]}),u.jsx(un,{size:"sm",className:"min-w-max shrink-0 grow-0",disabled:e.isCurrentDevice,loading:i,onClick:m,title:e.isCurrentDevice?s._({id:"JOalQJ"}):void 0,children:u.jsx(K,{id:"MzTcmM"})})]})}function gp({action:e,cooldownSeconds:t=30,initialCooldown:n=0}){const[s,r]=p.useState(n),o=s>0,i=p.useCallback((...c)=>{if(o)throw new Error("Action is on cooldown");return r(t),e==null?void 0:e(...c)},[e,t,o]);p.useEffect(()=>{if(s>0){const c=setTimeout(()=>{r(s-1)},1e3);return()=>clearTimeout(c)}},[s]);const a=p.useCallback(()=>r(0),[]);return p.useMemo(()=>({disabled:o,trigger:i,clear:a,remaining:s,total:t}),[o,i,a,s,t])}function vp({action:e,cooldownSeconds:t,initialCooldown:n,children:s,onClick:r,disabled:o=!1,className:i,...a}){const{i18n:c,_:l}=ke(),h=gp({action:e,cooldownSeconds:t,initialCooldown:n}),[d,m]=p.useState(!1),g=Math.ceil(h.remaining),y=!o&&h.disabled;return u.jsx("div",{className:"inline-block",onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:u.jsxs(Wc,{open:y&&d,children:[u.jsx(Jc,{asChild:!0,children:u.jsxs(un,{onClick:w=>{r==null||r(w),w.defaultPrevented||h.trigger()},disabled:y||o,className:ps("relative pr-9",i),"aria-label":y?c._({id:"6gxSCq",values:{remainingSeconds:g}}):void 0,"aria-live":y?"polite":void 0,"aria-atomic":"true",...a,children:[u.jsx(Gi,{size:16,value:(h.total-h.remaining)/h.total*100,startAngle:-90,className:ps("absolute right-3 top-1/2 inline-block -translate-y-1/2 transform transition-opacity",y?"opacity-100":"opacity-0"),"aria-hidden":"true"}),s]})}),u.jsx(Qc,{children:u.jsx(Gc,{side:"bottom",align:"center",role:"tooltip",children:u.jsx("div",{className:"rounded border border-slate-300 bg-white px-2 py-1.5 text-xs shadow-sm dark:border-slate-600 dark:bg-slate-800",children:u.jsx(K,{id:"VA4HpI",values:{remainingSeconds:g}})})})})]})})}function ho({children:e=u.jsx(K,{id:"abag5u"}),...t}){return u.jsxs(vp,{...t,children:[u.jsx(fc,{"aria-hidden":!0,className:"mr-2",weight:"bold"}),u.jsx("span",{className:"flex-1 truncate",children:e})]})}function yp({onSubmit:e,invalid:t,ref:n,children:s,...r}){const o=p.useRef(null),i=p.useRef(null),[a,c]=p.useState(null),[l,h]=p.useState(void 0),d=p.useCallback(m=>{if(a&&l)return e({token:a,email:l},m)},[a,l,e]);return u.jsxs(ka,{...r,ref:ja([n,i]),onSubmit:d,invalid:t||!a||!l,children:[s,u.jsx(si,{label:u.jsx(K,{id:"vJgYMA"}),children:u.jsx(Oa,{name:"code",enterKeyHint:"next",required:!0,autoFocus:!0,onToken:m=>{var g,y;(g=i.current)==null||g.reset(),c(m),m&&((y=o.current)==null||y.focus())}})}),u.jsx(si,{label:u.jsx(K,{id:"OenGwo"}),children:u.jsx(Yl,{ref:o,name:"email",enterKeyHint:"done",required:!0,value:l,onEmail:m=>{var g;(g=i.current)==null||g.reset(),h(m)}})})]})}function wp({onSubmit:e,invalid:t,ref:n,children:s,...r}){const[o,i]=p.useState(null),a=p.useRef(null),c=p.useCallback(l=>{if(o)return e({token:o},l)},[o,e]);return u.jsxs(ka,{...r,ref:ja([n,a]),onSubmit:c,invalid:t||!o,children:[s,u.jsx(si,{label:u.jsx(K,{id:"AdWhjZ"}),children:u.jsx(Oa,{name:"code",enterKeyHint:"done",required:!0,autoFocus:!0,onToken:l=>{var h;(h=a.current)==null||h.reset(),i(l)}})})]})}function Al({email:e,requestPending:t,confirmPending:n,onRequest:s,onConfirm:r,onDone:o,onCancel:i,children:a,cancelLabel:c}){return u.jsxs("div",{className:"space-y-4",children:[a??u.jsx("p",{children:u.jsx(K,{id:"EkoFiQ",values:{email:e},components:{0:u.jsx("strong",{})}})}),u.jsx(ho,{action:s,loading:t,disabled:n,className:"max-w-full"}),u.jsx(wp,{disabled:n,onCancel:i,cancelLabel:c,onSubmit:async(l,h)=>{await r(l,h),h.aborted||o()}})]})}function bp({email:e,requestPending:t,confirmPending:n,verifyRequestPending:s,verifyConfirmPending:r,onRequest:o,onConfirm:i,onVerifyRequest:a,onVerifyConfirm:c}){const[l,h]=p.useState(null);return l?u.jsx(Al,{email:l,requestPending:s,confirmPending:r,onRequest:()=>a({email:l}),onConfirm:({token:d})=>c({email:l,token:d}),onDone:()=>h(null),children:u.jsx("p",{children:u.jsx(K,{id:"1xZHpr",values:{newEmail:l},components:{0:u.jsx("strong",{})}})})}):u.jsx("div",{className:"space-y-4",children:u.jsxs(yp,{disabled:n,cancelLabel:u.jsx(K,{id:"dEgA5A"}),onSubmit:async(d,m)=>{await i(d),!m.aborted&&h(d.email)},children:[u.jsx("p",{children:u.jsx(K,{id:"7WJREj",values:{email:e},components:{0:u.jsx("strong",{})}})}),u.jsx(ho,{action:o,loading:t,disabled:n,className:"max-w-full"})]})})}function xp(){const e=rt(),{i18n:t,_:n}=ke(),{notify:s}=$t(),r=lr();return Bt({async mutationFn(o){return e.fetch("POST","/update-email-request",{...o,locale:o.locale??r})},onSuccess(o,i,a){s({variant:"success",title:t._({id:"Y/tbFA"}),description:t._({id:"lAK2OC"})})},onError(o,i,a){console.error("Failed to request email change",o),s({variant:"error",title:t._({id:"E1zEOj"}),description:t._({id:"JANaVF"})})}})}function _p(){const e=rt(),{i18n:t,_:n}=ke(),{notify:s}=$t(),r=lr();return Bt({async mutationFn(o){return e.fetch("POST","/update-email-confirm",{...o,locale:o.locale??r})},onSuccess(o,i,a){s({variant:"success",title:t._({id:"j/19E8"}),description:t._({id:"YNQVYW"})})},onError(o,i,a){console.error("Failed to change email",o),s({variant:"error",title:t._({id:"PNuvRd"}),description:t._({id:"q1d4qv"})})}})}function Cl(){const e=rt(),{i18n:t,_:n}=ke(),{notify:s}=$t(),r=lr();return Bt({async mutationFn(o){return e.fetch("POST","/verify-email-request",{...o,locale:o.locale??r})},onSuccess(o,i,a){s({variant:"success",title:t._({id:"I6Q2R9"}),description:t._({id:"rpbuva"})})},onError(o,i,a){console.error("Failed to request email verification",o),s({variant:"error",title:t._({id:"yI9fD4"}),description:t._({id:"U/me+u"})})}})}function El(){const e=rt(),{i18n:t,_:n}=ke(),{notify:s}=$t();return Bt({async mutationFn(r){return e.fetch("POST","/verify-email-confirm",r)},onSuccess(r,o,i){s({variant:"success",title:t._({id:"PLEl94"}),description:t._({id:"HrYlJ7"})})},onError(r,o,i){console.error("Failed to verify email",r),s({variant:"error",title:t._({id:"rxy0tG"}),description:t._({id:"78Ju9c"})})}})}function Sp(){const{account:e}=Vt(),{email:t,sub:n}=e,s=xp(),r=_p(),o=Cl(),i=El();return t?u.jsx(bp,{email:t,requestPending:s.isPending,confirmPending:r.isPending,verifyRequestPending:o.isPending,verifyConfirmPending:i.isPending,onRequest:async()=>{await s.mutateAsync({sub:n})},onConfirm:async({email:a,token:c})=>{await r.mutateAsync({sub:n,token:c,email:a})},onVerifyRequest:async()=>{await o.mutateAsync({sub:n})},onVerifyConfirm:async({email:a,token:c})=>{await i.mutateAsync({sub:n,token:c,email:a})}}):u.jsx(Kn,{role:"status",children:u.jsx(K,{id:"SGbab3"})})}function Rp(){const{account:e}=Vt(),{email:t,sub:n}=e,{navigate:s}=Le(),r=Cl(),o=El();return t?u.jsx(Al,{email:t,requestPending:r.isPending,confirmPending:o.isPending,onRequest:async()=>{await r.mutateAsync({sub:n})},onConfirm:async({token:i})=>{await o.mutateAsync({sub:n,token:i,email:t})},onCancel:()=>s({to:"/account"}),onDone:()=>s({to:"/account"})}):u.jsx(Kn,{role:"status",children:u.jsx(K,{id:"SGbab3"})})}function Pp(){const{account:e}=Vt();return u.jsxs("div",{className:"flex min-h-full flex-col items-center justify-start gap-4 py-4 md:pt-24",children:[u.jsx(Yc,{account:e}),u.jsx(Ap,{className:"text-text-light text-center text-sm"})]})}function Ap(e){return u.jsxs("p",{...e,children:[u.jsx(K,{id:"Jn0vdi",components:{0:u.jsx(Xc,{})}})," ",u.jsx(vs,{to:"/account/about",className:"text-sm text-blue-600 hover:underline",children:u.jsx(K,{id:"z73+hu"})})]})}function Cp(){const e=rt(),{i18n:t,_:n}=ke(),{notify:s}=$t(),r=lr();return Bt({async mutationFn({email:o}){return e.fetch("POST","/reset-password-request",{locale:r,email:o})},onSuccess(o,i,a){s({variant:"success",title:t._({id:"boBFOP"}),description:t._({id:"lAK2OC"})})},onError(o,i,a){console.error("Failed to request password reset",o),s({variant:"error",title:t._({id:"eMlT5s"}),description:t._({id:"JANaVF"})})}})}function Ep(){const e=rt(),{i18n:t,_:n}=ke(),{notify:s}=$t();return Bt({async mutationFn({token:r,password:o}){return e.fetch("POST","/reset-password-confirm",{token:r,password:o})},onSuccess(r,o,i){s({variant:"success",title:t._({id:"D9Jms7"}),description:t._({id:"67nRLM"})})},onError(r,o,i){console.error("Failed to reset password",r),s({variant:"error",title:t._({id:"3DLYmM"}),description:t._({id:"q1d4qv"})})}})}function kp(){const[e,t]=p.useState(!1),{account:n}=Vt(),{email:s}=n;if(!s)return u.jsx(Kn,{role:"status",children:u.jsx(K,{id:"51yaeH"})});const r=Cp(),o=Ep();return u.jsxs("div",{className:"space-y-4",children:[u.jsx("p",{children:u.jsx(K,{id:"VaEN/4",values:{email:s},components:{0:u.jsx("strong",{})}})}),u.jsx(ho,{action:async()=>r.mutateAsync({email:s}),loading:r.isPending,disabled:e,className:"max-w-full"}),u.jsx(Xl,{disabled:e||o.isPending,onSubmit:async i=>{await o.mutateAsync(i),t(!0)}})]})}const jp={"/":{icon:dc,position:0,title:{id:"AeXO77"},component:Pp},"/devices":{icon:lc,position:10,title:{id:"qavm0B"},description:{id:"bdNEzF"},component:pp},"/apps":{icon:uc,position:20,title:{id:"VDvaN2"},description:{id:"xSiaWQ"},component:G0},"/password":{icon:nu,position:30,title:{id:"8ZsakT"},description:{id:"Ar5o5b"},component:kp},"/email":{icon:tu,position:40,title:{id:"O3oNi5"},description:{id:"4IwmU1"},component:Sp},"/email/verify":{hidden:!0,icon:pc,position:45,title:{id:"L3sAgU"},description:{id:"kuvvht"},component:Rp},"/about":{icon:eu,position:50,title:{id:"uyJsf6"},component:Rf,description:{id:"nxn0xR"}}};function Op(e,t){const n={...jp,...t},s=_i({getParentRoute:()=>Qi,path:e,component:()=>u.jsx(Lp,{signOutTo:e,children:u.jsx(Mp,{basePath:e,subPages:n})})}),r=Object.entries(n).map(([o,{component:i}])=>_i({getParentRoute:()=>s,path:o,component:i}));return[s,...r]}function Mp({basePath:e,subPages:t}){const{account:n}=Vt(),s=p.useMemo(()=>Object.entries(t).sort(([o,i],[a,c])=>{if(i.position!=null&&c.position!=null){const l=i.position-c.position;if(l!==0)return l}return o.localeCompare(a)}).map(([o,i])=>({to:e==="/"?o:o==="/"?e:`${e}${o}`,title:i.title,description:i.description,hidden:i.hidden,icon:i.icon})),[t,e]),r=!!n.email&&n.email_verified===!1;return u.jsx(Sf,{title:{id:"KdxItU"},basePath:e,links:s,prepend:r&&u.jsx(Kn,{role:"status",variant:"info",className:"m-4",action:u.jsx(vs,{to:`${e}/email/verify`,children:u.jsx(un,{color:"info",size:"sm",children:u.jsx(K,{id:"XnHyFh"})})}),children:u.jsx(K,{id:"Mw10b2",values:{0:n.email},components:{0:u.jsx("strong",{})}})}),children:u.jsx(Hi,{})})}const Vs=new URL(window.location.href);function Lp({children:e,signOutTo:t}){const n=Le(),{session:s}=Oi(),r=p.useRef(s!=null),o=Vs.searchParams.get("display")==="popup",i=Vs.searchParams.get("login_hint")||void 0,a=Vs.searchParams.get("nonce")||void 0,c=Vs.searchParams.get("redirect_uri")||void 0,l=p.useMemo(()=>{if(c&&a)return()=>{const h=new URL(c);window.location.href=h.toString()};if(o)return()=>{var h;(h=window.opener)==null||h.postMessage({nonce:a,event:"done"},"*"),window.postMessage({nonce:a,event:"done"},"*"),window.close()}},[o,c,a]);return p.useEffect(()=>{s&&!r.current?r.current=!0:!s&&r.current&&(r.current=!1,t&&n.navigate({to:t}),l==null||l())},[s,l]),u.jsx(su,{forcedIdentifier:i,disableRemember:o,onCancel:l,children:e})}const Ip=_i({getParentRoute:()=>Qi,path:"/account/reset-password",component:Np,errorComponent:Ma});function Np(){const{doInitiatePasswordReset:e,doConfirmResetPassword:t}=Oi(),n=Le();return u.jsx(ru,{onResetPasswordRequest:e,onResetPasswordConfirm:t,onBack:()=>{window.history.back(),setTimeout(()=>{n.state.location.pathname==="/account/reset-password"&&n.navigate({to:"/account"})},1e3)}})}const Fp=Op("/account",{"/branding":{icon:hc,hidden:!0,position:40,title:{id:"A3MAIm"},component:th}}),Tp=Bd({routeTree:Qi.addChildren([...Fp,Ip])}),{__customizationData:Dp,__deviceSessions:Hp}=window,Up=new Pu,qp=document.getElementById("root");Nl.createRoot(qp).render(u.jsx(p.StrictMode,{children:u.jsx(Fl,{value:Dp,children:u.jsx(Tl,{children:u.jsx(iu,{children:u.jsx(ou,{fallbackRender:lu,children:u.jsx(au,{initialSessions:Hp,initialSelected:cu.Only,children:u.jsx(ju,{client:Up,children:u.jsx(Kd,{router:Tp})})})})})})})}));
20
+ //# sourceMappingURL=account-page-fVhIFEih.js.map