@opentig/cli 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/chunks/{cli-D_aggpu2.mjs → cli-ABzC6-gR.mjs} +1 -1
  3. package/dist/client/assets/App-CBetJ5ZN.js +74 -0
  4. package/dist/client/assets/CreatePullRequestDialog-W82oHjYm.js +2 -0
  5. package/dist/client/assets/{DiffWorkspace-CeYQ0YtE.js → DiffWorkspace-BWkTIl5n.js} +1 -1
  6. package/dist/client/assets/{EditableFileViewer-BhwE-QMO.js → EditableFileViewer-Cv3aNJBN.js} +1 -1
  7. package/dist/client/assets/{File-C10_BxOu.js → File-DiOOsHOl.js} +1 -1
  8. package/dist/client/assets/{FilesView-BT4eHbFo.js → FilesView-DIqPfRbv.js} +1 -1
  9. package/dist/client/assets/{GitHubAvatar-Ch_PaCv3.js → GitHubAvatar-DBc3Vxnk.js} +1 -1
  10. package/dist/client/assets/HistoryView-DYxWYYVx.js +1 -0
  11. package/dist/client/assets/{HtmlFileViewer-Cufzaec9.js → HtmlFileViewer-BsewwJtM.js} +1 -1
  12. package/dist/client/assets/{IconEdit-RxH71_V-.js → IconEdit-CxvzMyLV.js} +1 -1
  13. package/dist/client/assets/{IconFolderPlus-DSSB-ikf.js → IconFolderPlus-1vLDIzhC.js} +1 -1
  14. package/dist/client/assets/{ImageFileViewer-CFUkcXLH.js → ImageFileViewer-CoQZkgET.js} +1 -1
  15. package/dist/client/assets/{LocalRefsDialog-B2jUCKTx.js → LocalRefsDialog-sw-ROjfe.js} +1 -1
  16. package/dist/client/assets/{MarkdownFileViewer-BLfJ-Vof.js → MarkdownFileViewer-BedKCXTI.js} +2 -2
  17. package/dist/client/assets/{PairingPage-C5Ggk-Z_.js → PairingPage-CYJXzBZC.js} +1 -1
  18. package/dist/client/assets/{PierreDiffViewer-DYj1ZThr.js → PierreDiffViewer-uhTsb-F7.js} +1 -1
  19. package/dist/client/assets/PierreEditBoundary-Bb4dONIq.js +2 -0
  20. package/dist/client/assets/{PierreWorkerPool-7EVoquIB.js → PierreWorkerPool-BuBzE8K1.js} +9 -9
  21. package/dist/client/assets/{PullRequestDiff-DxLTcm6L.js → PullRequestDiff-CgY4QIHC.js} +1 -1
  22. package/dist/client/assets/{PullRequestViewer-CyW39MuF.js → PullRequestViewer-KZl0osME.js} +2 -2
  23. package/dist/client/assets/PullRequestsView-DkN3pW33.js +1 -0
  24. package/dist/client/assets/{QuickOpenDialog-CasQU7pk.js → QuickOpenDialog-Cn-aQRAS.js} +1 -1
  25. package/dist/client/assets/RepositoryProjectsDialog-F-EctLXx.js +1 -0
  26. package/dist/client/assets/SearchView-BtKBEJ7e.js +1 -0
  27. package/dist/client/assets/SettingsDialog-wfWhEzZY.js +9 -0
  28. package/dist/client/assets/Viewer-D-oFua7K.js +3 -0
  29. package/dist/client/assets/{abnfDiagram-N423BO3Z-DrlQwm7W.js → abnfDiagram-N423BO3Z-DLBLFOdy.js} +1 -1
  30. package/dist/client/assets/{arc-B9cXI-QL.js → arc-D-Yei3Vr.js} +1 -1
  31. package/dist/client/assets/{architectureDiagram-T3A2C74G-DZz7ZXbI.js → architectureDiagram-T3A2C74G-BOgBvzWh.js} +1 -1
  32. package/dist/client/assets/{base-ui-D4MeJpa3.js → base-ui-qeHDA5zu.js} +1 -1
  33. package/dist/client/assets/{blockDiagram-VBNYF7ZC-DZFMT63B.js → blockDiagram-VBNYF7ZC-BQXRJDyR.js} +1 -1
  34. package/dist/client/assets/{c4Diagram-5PPSVZJV-BnHIZMZp.js → c4Diagram-5PPSVZJV-DTZseD56.js} +1 -1
  35. package/dist/client/assets/channel-DrMuSkDK.js +1 -0
  36. package/dist/client/assets/{checkbox-BpmQTxn7.js → checkbox-BwbxYGgK.js} +1 -1
  37. package/dist/client/assets/{chunk-2GRJ4B5K-CJOlpI9g.js → chunk-2GRJ4B5K-spRCgfPY.js} +1 -1
  38. package/dist/client/assets/{chunk-2Q5K7J3B-DhsnoUrJ.js → chunk-2Q5K7J3B-CLVClH0M.js} +1 -1
  39. package/dist/client/assets/{chunk-5RXB4S5H-Nwsk3OIu.js → chunk-5RXB4S5H-CuQ5tYjB.js} +1 -1
  40. package/dist/client/assets/{chunk-5VM5RSS4-Dk9FYU9b.js → chunk-5VM5RSS4-DyOEOe90.js} +1 -1
  41. package/dist/client/assets/{chunk-6Q2QTUOP-C8lX8T87.js → chunk-6Q2QTUOP-CgMtuJIx.js} +1 -1
  42. package/dist/client/assets/{chunk-GF5L2VYU-DWHvTG6c.js → chunk-GF5L2VYU-BH63P4Vv.js} +1 -1
  43. package/dist/client/assets/{chunk-JWPE2WC7-BLu2-FJl.js → chunk-JWPE2WC7-BANDbaPq.js} +1 -1
  44. package/dist/client/assets/{chunk-KBJHAD2P-CEOb10I1.js → chunk-KBJHAD2P-Bfty2upo.js} +1 -1
  45. package/dist/client/assets/{chunk-RYQCIY6F-BcdMrb_e.js → chunk-RYQCIY6F-Cvu8BZS9.js} +1 -1
  46. package/dist/client/assets/{chunk-XXDRQBXY-CzPimvfs.js → chunk-XXDRQBXY-bnohf1yd.js} +1 -1
  47. package/dist/client/assets/classDiagram-JCYQIIEL-BKiL0hkR.js +1 -0
  48. package/dist/client/assets/classDiagram-v2-OCEON4UE-BKiL0hkR.js +1 -0
  49. package/dist/client/assets/{cose-bilkent-JH36ORCC-BYfzHUkR.js → cose-bilkent-JH36ORCC-DCTEAZwO.js} +1 -1
  50. package/dist/client/assets/{cynefin-VYW2F7L2-B4mEAleX.js → cynefin-VYW2F7L2-Bp2wXvdt.js} +1 -1
  51. package/dist/client/assets/{cynefinDiagram-MW4NZA55-CioMvT6V.js → cynefinDiagram-MW4NZA55-DRRWzuF0.js} +1 -1
  52. package/dist/client/assets/{dagre-VZM6K2ZE-DWPgHi5i.js → dagre-VZM6K2ZE-DDvsotRK.js} +1 -1
  53. package/dist/client/assets/{diagram-7IWD3JNH-94i9EwB_.js → diagram-7IWD3JNH-CMqhRNRq.js} +1 -1
  54. package/dist/client/assets/{diagram-B4RE2ZJO-BRgMOgy8.js → diagram-B4RE2ZJO-D_PYI1ut.js} +1 -1
  55. package/dist/client/assets/{diagram-LBJQPF4R-DHaXTl1T.js → diagram-LBJQPF4R-BSUx7mMM.js} +1 -1
  56. package/dist/client/assets/{diagram-Q27KOJAE-DtLuyYm1.js → diagram-Q27KOJAE-C8O3g6WT.js} +1 -1
  57. package/dist/client/assets/{diagram-UB23O5K3-D8R3grCW.js → diagram-UB23O5K3-C5-NDsgC.js} +1 -1
  58. package/dist/client/assets/{ebnfDiagram-BXEA7PRR-voe5GU7W.js → ebnfDiagram-BXEA7PRR-D71hx4Ww.js} +1 -1
  59. package/dist/client/assets/{erDiagram-JOGREHBK-BShMJhmY.js → erDiagram-JOGREHBK-yd9B5d8I.js} +1 -1
  60. package/dist/client/assets/{flowDiagram-UKHOOZJN-DASXB2wV.js → flowDiagram-UKHOOZJN-CWU5VVbw.js} +1 -1
  61. package/dist/client/assets/{ganttDiagram-PKOTCBZU-Da1ElnJN.js → ganttDiagram-PKOTCBZU-D2siVjfa.js} +1 -1
  62. package/dist/client/assets/{gh-utils-D00lyruw.js → gh-utils-B0Nlmxep.js} +1 -1
  63. package/dist/client/assets/{gitGraphDiagram-DS77QQ5N-DoGRli0p.js → gitGraphDiagram-DS77QQ5N-CIvIFcxR.js} +1 -1
  64. package/dist/client/assets/index-BOPi2b1j.js +47 -0
  65. package/dist/client/assets/index-CryuKDT3.css +1 -0
  66. package/dist/client/assets/{infoDiagram-6WML65LV-CxkxF5pn.js → infoDiagram-6WML65LV-DRvl8KfO.js} +1 -1
  67. package/dist/client/assets/{ishikawaDiagram-WSZJBQD7-l6dk2-PS.js → ishikawaDiagram-WSZJBQD7-H5EQq6uE.js} +1 -1
  68. package/dist/client/assets/{journeyDiagram-NVQOT4AX-wJY4ZF5o.js → journeyDiagram-NVQOT4AX-CCwLmD-U.js} +1 -1
  69. package/dist/client/assets/{kanban-definition-27J2QSJJ-CIcwUmJo.js → kanban-definition-27J2QSJJ-DS--XHEu.js} +1 -1
  70. package/dist/client/assets/{linear-Tf-dXwQ9.js → linear-Q3JNM6CR.js} +1 -1
  71. package/dist/client/assets/{mermaid.core-DnaJSnLe.js → mermaid.core-EwS_m22C.js} +4 -4
  72. package/dist/client/assets/{mindmap-definition-FAOFIHXS-jFdJ2bLh.js → mindmap-definition-FAOFIHXS-D15nrwfe.js} +1 -1
  73. package/dist/client/assets/{pegDiagram-VL7TDLO6-vq0WE66k.js → pegDiagram-VL7TDLO6-DOG19gxx.js} +1 -1
  74. package/dist/client/assets/{pieDiagram-7S7Q4E2Y-3edKDMpI.js → pieDiagram-7S7Q4E2Y-Bstdr7Wh.js} +1 -1
  75. package/dist/client/assets/{quadrantDiagram-CIZ2JOQS-B6M8U4XV.js → quadrantDiagram-CIZ2JOQS-DfKs4qZW.js} +1 -1
  76. package/dist/client/assets/{railroadDiagram-AXF67PYL-C-d5-0YS.js → railroadDiagram-AXF67PYL-DJKxyuhV.js} +1 -1
  77. package/dist/client/assets/{render-markdown-GXIpf9CM.js → render-markdown-C7X2TwRk.js} +1 -1
  78. package/dist/client/assets/{requirementDiagram-LRYGKXZP-FVzmEbFu.js → requirementDiagram-LRYGKXZP-SGJWVmBV.js} +1 -1
  79. package/dist/client/assets/{sankeyDiagram-W5VNT64P-B-qcUamt.js → sankeyDiagram-W5VNT64P-CpZFct0O.js} +1 -1
  80. package/dist/client/assets/{sequenceDiagram-SI44F4Z6-DgFXRLSt.js → sequenceDiagram-SI44F4Z6-B7plRik9.js} +1 -1
  81. package/dist/client/assets/{sizeCapture-X5ZJPWSS-CWi_pMb2.js → sizeCapture-X5ZJPWSS-CNbK285t.js} +1 -1
  82. package/dist/client/assets/{stateDiagram-OKZ733FA-amQwzlgU.js → stateDiagram-OKZ733FA-BIHk9QCC.js} +1 -1
  83. package/dist/client/assets/stateDiagram-v2-UEYNNEHI-Cqw0H5cq.js +1 -0
  84. package/dist/client/assets/{swimlanes-SLNWSIFB-L88WlaUb.js → swimlanes-SLNWSIFB-7g_XCosC.js} +2 -2
  85. package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-BzKpdiGK.js +8 -0
  86. package/dist/client/assets/{tanstack-Bsd5UOY4.js → tanstack-B8_amOz8.js} +1 -1
  87. package/dist/client/assets/{timeline-definition-Z64GVDOM-D4TJxxc3.js → timeline-definition-Z64GVDOM-B-cgSggY.js} +1 -1
  88. package/dist/client/assets/{vennDiagram-T6HMQDX7-ClJWOyzQ.js → vennDiagram-T6HMQDX7-Bt5-8VZ2.js} +1 -1
  89. package/dist/client/assets/{viewer-tabs-Cp_MC_J3.js → viewer-tabs-DxCOe0ut.js} +1 -1
  90. package/dist/client/assets/{wardleyDiagram-T6FBY63Y-Cxfjpd6V.js → wardleyDiagram-T6FBY63Y-B5Imx6zh.js} +1 -1
  91. package/dist/client/assets/{xychartDiagram-ELKLHX3M-BYqbTvmt.js → xychartDiagram-ELKLHX3M-CDaY4xFS.js} +1 -1
  92. package/dist/client/index.html +4 -4
  93. package/dist/dev.mjs +1 -1
  94. package/dist/manifest.json +1 -1
  95. package/dist/server.mjs +54 -3
  96. package/package.json +1 -1
  97. package/dist/client/assets/App-CeDVj5Hh.js +0 -118
  98. package/dist/client/assets/CreatePullRequestDialog-DMHY_u8X.js +0 -2
  99. package/dist/client/assets/HistoryView-CivGwdxV.js +0 -1
  100. package/dist/client/assets/PierreEditBoundary-UfvbKDbd.js +0 -2
  101. package/dist/client/assets/PullRequestsView-BHcnarLS.js +0 -1
  102. package/dist/client/assets/RepositoryProjectsDialog-VAiZrDlA.js +0 -1
  103. package/dist/client/assets/SearchView-Bv4bA4UJ.js +0 -1
  104. package/dist/client/assets/SettingsDialog-D33V9Fry.js +0 -9
  105. package/dist/client/assets/Viewer-I1lC_oJU.js +0 -3
  106. package/dist/client/assets/channel-CE-pdA-6.js +0 -1
  107. package/dist/client/assets/classDiagram-JCYQIIEL-2elbt6qi.js +0 -1
  108. package/dist/client/assets/classDiagram-v2-OCEON4UE-2elbt6qi.js +0 -1
  109. package/dist/client/assets/index-BdjG_WtS.js +0 -3
  110. package/dist/client/assets/index-Uku28hIV.css +0 -1
  111. package/dist/client/assets/stateDiagram-v2-UEYNNEHI-TdV8eIV2.js +0 -1
  112. package/dist/client/assets/swimlanesDiagram-ULZ7WXOC-AWimqvIC.js +0 -8
@@ -0,0 +1,8 @@
1
+ import{c as r,s as e}from"./flowDiagram-UKHOOZJN-CWU5VVbw.js";import{_ as o}from"./mermaid.core-EwS_m22C.js";import"./chunk-5VM5RSS4-DyOEOe90.js";import"./chunk-XXDRQBXY-bnohf1yd.js";import"./chunk-KBJHAD2P-Bfty2upo.js";import"./chunk-2GRJ4B5K-spRCgfPY.js";import"./render-markdown-C7X2TwRk.js";import"./App-CBetJ5ZN.js";import"./index-BOPi2b1j.js";import"./react-rd22PHbN.js";import"./tanstack-B8_amOz8.js";import"./base-ui-qeHDA5zu.js";import"./one-light-CoLDteqg.js";import"./index-BgLrS_2D.js";import"./channel-DrMuSkDK.js";var m=o(t=>`${e(t)}
2
+ .swimlane.cluster rect {
3
+ stroke: ${t.clusterBorder} !important;
4
+ }
5
+ [data-look="neo"].cluster rect {
6
+ filter: none;
7
+ }
8
+ `,"getStyles"),a=m,S=r({defaultLayout:"swimlane",styles:a});export{S as diagram};
@@ -1 +1 @@
1
- import{r as M,j as Ht,a as Nt,R as qt}from"./react-rd22PHbN.js";import{w as Kt}from"./base-ui-D4MeJpa3.js";var B=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(){}},Ut=class extends B{#e;#t;#s;constructor(){super(),this.#s=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#s=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Ie=new Ut,Wt={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Gt=class{#e=Wt;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},L=new Gt;function $t(e){setTimeout(e,0)}var Bt=typeof window>"u"||"Deno"in globalThis;function E(){}function Jt(e,t){return typeof e=="function"?e(t):e}function pe(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ye(e,t){return Math.max(e+(t||0)-Date.now(),0)}function z(e,t){return typeof e=="function"?e(t):e}function A(e,t){return typeof e=="function"?e(t):e}function Te(e,t){const{type:s="all",exact:n,fetchStatus:i,predicate:r,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==Fe(o,t.options))return!1}else if(!N(t.queryKey,o))return!1}if(s!=="all"){const l=t.isActive();if(s==="active"&&!l||s==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||r&&!r(t))}function je(e,t){const{exact:s,status:n,predicate:i,mutationKey:r}=e;if(r){if(!t.options.mutationKey)return!1;if(s){if(G(t.options.mutationKey)!==G(r))return!1}else if(!N(t.options.mutationKey,r))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Fe(e,t){return(t?.queryKeyHashFn||G)(e)}function G(e){return JSON.stringify(e,(t,s)=>ye(s)?Object.keys(s).sort().reduce((n,i)=>(n[i]=s[i],n),{}):s)}function N(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!N(e[n],t[n]))return!1;return!0}const s=Object.keys(t);for(const n of s)if(!N(e[n],t[n]))return!1;return!0}return!1}var Xt=Object.prototype.hasOwnProperty;function et(e,t,s=0){if(e===t)return e;if(s>500)return t;const n=ze(e)&&ze(t);if(!n&&!(ye(e)&&ye(t)))return t;const r=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),a=o.length,l=n?new Array(a):{};let u=0;for(let c=0;c<a;c++){const f=n?c:o[c],h=e[f],d=t[f];if(h===d){l[f]=h,(n?c<r:Xt.call(e,f))&&u++;continue}if(h===null||d===null||typeof h!="object"||typeof d!="object"){l[f]=d;continue}const g=et(h,d,s+1);l[f]=g,g===h&&u++}return r===a&&u===r?e:l}function me(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function ze(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ye(e){if(!ke(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!ke(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ke(e){return Object.prototype.toString.call(e)==="[object Object]"}function Zt(e){return new Promise(t=>{L.setTimeout(t,e)})}function ve(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?et(e,t):t}function Yt(e,t,s=0){const n=[...e,t];return s&&n.length>s?n.slice(1):n}function es(e,t,s=0){const n=[t,...e];return s&&n.length>s?n.slice(0,-1):n}var Pe=Symbol();function tt(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Pe?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function st(e,t){return typeof e=="function"?e(...t):!!e}function ts(e,t,s){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),n||(n=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),e}var $=(()=>{let e=()=>Bt;return{isServer(){return e()},setIsServer(t){e=t}}})();function Se(){let e,t;const s=new Promise((i,r)=>{e=i,t=r});s.status="pending",s.catch(()=>{});function n(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},s.reject=i=>{n({status:"rejected",reason:i}),t(i)},s}var ss=$t;function ns(){let e=[],t=0,s=a=>{a()},n=a=>{a()},i=ss;const r=a=>{t?e.push(a):i(()=>{s(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{n(()=>{a.forEach(l=>{s(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{r(()=>{a(...l)})},schedule:r,setNotifyFunction:a=>{s=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{i=a}}}var x=ns(),is=class extends B{#e=!0;#t;#s;constructor(){super(),this.#s=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#s=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#e}},te=new is;function rs(e){return Math.min(1e3*2**e,3e4)}function nt(e){return(e??"online")==="online"?te.isOnline():!0}var be=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function it(e){let t=!1,s=0,n;const i=Se(),r=()=>i.status!=="pending",o=p=>{if(!r()){const S=new be(p);h(S),e.onCancel?.(S)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>Ie.isFocused()&&(e.networkMode==="always"||te.isOnline())&&e.canRun(),c=()=>nt(e.networkMode)&&e.canRun(),f=p=>{r()||(n?.(),i.resolve(p))},h=p=>{r()||(n?.(),i.reject(p))},d=()=>new Promise(p=>{n=S=>{(r()||u())&&p(S)},e.onPause?.()}).then(()=>{n=void 0,r()||e.onContinue?.()}),g=()=>{if(r())return;let p;const S=s===0?e.initialPromise:void 0;try{p=S??e.fn()}catch(y){p=Promise.reject(y)}Promise.resolve(p).then(f).catch(y=>{if(r())return;const m=e.retry??($.isServer()?0:3),b=e.retryDelay??rs,_=typeof b=="function"?b(s,y):b,w=m===!0||typeof m=="number"&&s<m||typeof m=="function"&&m(s,y);if(t||!w){h(y);return}s++,e.onFail?.(s,y),Zt(_).then(()=>u()?void 0:d()).then(()=>{t?h(y):g()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n?.(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?g():d().then(g),i)}}var rt=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pe(this.gcTime)&&(this.#e=L.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(L.clearTimeout(this.#e),this.#e=void 0)}};function os(e){return{onFetch:(t,s)=>{const n=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,r=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let c=!1;const f=g=>{ts(g,()=>t.signal,()=>c=!0)},h=tt(t.options,t.fetchOptions),d=async(g,p,S)=>{if(c)return Promise.reject(t.signal.reason);if(p==null&&g.pages.length)return Promise.resolve(g);const m=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:p,direction:S?"backward":"forward",meta:t.options.meta};return f(R),R})(),b=await h(m),{maxPages:_}=t.options,w=S?es:Yt;return{pages:w(g.pages,b,_),pageParams:w(g.pageParams,p,_)}};if(i&&r.length){const g=i==="backward",p=g?ot:we,S={pages:r,pageParams:o},y=p(n,S);a=await d(S,y,g)}else{const g=e??r.length;do{const p=l===0?o[0]??n.initialPageParam:we(n,a);if(l>0&&p==null)break;a=await d(a,p),l++}while(l<g)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=u}}}function we(e,{pages:t,pageParams:s}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,s[n],s):void 0}function ot(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}function as(e,t){return t?we(e,t)!=null:!1}function ls(e,t){return!t||!e.getPreviousPageParam?!1:ot(e,t)!=null}var us=class extends rt{#e;#t;#s;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ve(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Ve(this.options);t.data!==void 0&&(this.setState(Le(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const s=ve(this.state.data,e,this.options);return this.#l({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(E).catch(E):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>A(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Pe||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>z(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Ye(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#c()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(u=>u.options.queryFn);l&&this.setOptions(l.options)}const s=new AbortController,n=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},i=()=>{const l=tt(this.options,t),c=(()=>{const f={client:this.#r,queryKey:this.queryKey,meta:this.meta};return n(f),f})();return this.#o=!1,this.options.persister?this.options.persister(l,c,this):l(c)},o=(()=>{const l={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return n(l),l})();(this.#e==="infinite"?os(this.options.pages):this.options.behavior)?.onFetch(o,this),this.#s=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#l({type:"fetch",meta:o.fetchOptions?.meta}),this.#i=it({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:l=>{l instanceof be&&l.revert&&this.setState({...this.#s,fetchStatus:"idle"}),s.abort()},onFail:(l,u)=>{this.#l({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const l=await this.#i.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#n.config.onSuccess?.(l,this),this.#n.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof be){if(l.silent)return this.#i.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#l({type:"error",error:l}),this.#n.config.onError?.(l,this),this.#n.config.onSettled?.(this.state.data,l,this),l}finally{this.scheduleGc()}}#l(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...at(s.data,this.options),fetchMeta:e.meta??null};case"success":const n={...s,...Le(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=e.manual?n:void 0,n;case"error":const i=e.error;return{...s,error:i,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),x.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function at(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nt(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Le(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ve(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,n=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var lt=class extends B{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#a=Se(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#s=void 0;#n=void 0;#r;#i;#a;#o;#c;#l;#g;#h;#f;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Qe(this.#t,this.options)?this.#d():this.updateResult(),this.#S())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _e(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _e(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof A(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),t._defaulted&&!me(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const n=this.hasListeners();n&&He(this.#t,s,this.options,t)&&this.#d(),this.updateResult(),n&&(this.#t!==s||A(this.options.enabled,this.#t)!==A(t.enabled,this.#t)||z(this.options.staleTime,this.#t)!==z(t.staleTime,this.#t))&&this.#m();const i=this.#y();n&&(this.#t!==s||A(this.options.enabled,this.#t)!==A(t.enabled,this.#t)||i!==this.#u)&&this.#v(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),s=this.createResult(t,e);return hs(this,s)&&(this.#n=s,this.#i=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(s,n)=>(this.trackProp(n),t?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),s=this.#e.getQueryCache().build(this.#e,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#d(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(E)),t}#m(){this.#b();const e=z(this.options.staleTime,this.#t);if($.isServer()||this.#n.isStale||!pe(e))return;const s=Ye(this.#n.dataUpdatedAt,e)+1;this.#h=L.setTimeout(()=>{this.#n.isStale||this.updateResult()},s)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#u=e,!($.isServer()||A(this.options.enabled,this.#t)===!1||!pe(this.#u)||this.#u===0)&&(this.#f=L.setInterval(()=>{(this.options.refetchIntervalInBackground||Ie.isFocused())&&this.#d()},this.#u))}#S(){this.#m(),this.#v(this.#y())}#b(){this.#h!==void 0&&(L.clearTimeout(this.#h),this.#h=void 0)}#w(){this.#f!==void 0&&(L.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const s=this.#t,n=this.options,i=this.#n,r=this.#r,o=this.#i,l=e!==s?e.state:this.#s,{state:u}=e;let c={...u},f=!1,h;if(t._optimisticResults){const C=this.hasListeners(),I=!C&&Qe(e,t),O=C&&He(e,s,t,n);(I||O)&&(c={...c,...at(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:d,errorUpdatedAt:g,status:p}=c;h=c.data;let S=!1;if(t.placeholderData!==void 0&&h===void 0&&p==="pending"){let C;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(C=i.data,S=!0):C=typeof t.placeholderData=="function"?t.placeholderData(this.#g?.state.data,this.#g):t.placeholderData,C!==void 0&&(p="success",h=ve(i?.data,C,t),f=!0)}if(t.select&&h!==void 0&&!S)if(i&&h===r?.data&&t.select===this.#c)h=this.#l;else try{this.#c=t.select,h=t.select(h),h=ve(i?.data,h,t),this.#l=h,this.#o=null}catch(C){this.#o=C}this.#o&&(d=this.#o,h=this.#l,g=Date.now(),p="error");const y=c.fetchStatus==="fetching",m=p==="pending",b=p==="error",_=m&&y,w=h!==void 0,v={status:p,fetchStatus:c.fetchStatus,isPending:m,isSuccess:p==="success",isError:b,isInitialLoading:_,isLoading:_,data:h,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:g,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:c.dataUpdateCount>l.dataUpdateCount||c.errorUpdateCount>l.errorUpdateCount,isFetching:y,isRefetching:y&&!m,isLoadingError:b&&!w,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:b&&w,isStale:Ee(e,t),refetch:this.refetch,promise:this.#a,isEnabled:A(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const C=v.data!==void 0,I=v.status==="error"&&!C,O=P=>{I?P.reject(v.error):C&&P.resolve(v.data)},F=()=>{const P=this.#a=v.promise=Se();O(P)},D=this.#a;switch(D.status){case"pending":e.queryHash===s.queryHash&&O(D);break;case"fulfilled":(I||v.data!==D.value)&&F();break;case"rejected":(!I||v.error!==D.reason)&&F();break}}return v}updateResult(){const e=this.#n,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#g=this.#t),me(t,e))return;this.#n=t;const s=()=>{if(!e)return!0;const{notifyOnChangeProps:n}=this.options,i=typeof n=="function"?n():n;if(i==="all"||!i&&!this.#p.size)return!0;const r=new Set(i??this.#p);return this.options.throwOnError&&r.add("error"),Object.keys(this.#n).some(o=>{const a=o;return this.#n[a]!==e[a]&&r.has(a)})};this.#C({listeners:s()})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#s=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#S()}#C(e){x.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function cs(e,t){return A(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&A(t.retryOnMount,e)===!1)}function Qe(e,t){return cs(e,t)||e.state.data!==void 0&&_e(e,t,t.refetchOnMount)}function _e(e,t,s){if(A(t.enabled,e)!==!1&&z(t.staleTime,e)!=="static"){const n=typeof s=="function"?s(e):s;return n==="always"||n!==!1&&Ee(e,t)}return!1}function He(e,t,s,n){return(e!==t||A(n.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Ee(e,s)}function Ee(e,t){return A(t.enabled,e)!==!1&&e.isStaleByTime(z(t.staleTime,e))}function hs(e,t){return!me(e.getCurrentResult(),t)}var fs=class extends lt{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:r,isError:o,isRefetchError:a}=n,l=s.fetchMeta?.fetchMore?.direction,u=o&&l==="forward",c=i&&l==="forward",f=o&&l==="backward",h=i&&l==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:as(t,s.data),hasPreviousPage:ls(t,s.data),isFetchNextPageError:u,isFetchingNextPage:c,isFetchPreviousPageError:f,isFetchingPreviousPage:h,isRefetchError:a&&!u&&!f,isRefetching:r&&!c&&!h}}},ds=class extends rt{#e;#t;#s;#n;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#s=e.mutationCache,this.#t=[],this.state=e.state||gs(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=it({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(r,o)=>{this.#r({type:"failed",failureCount:r,error:o})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const n=this.state.status==="pending",i=!this.#n.canStart();try{if(n)t();else{this.#r({type:"pending",variables:e,isPaused:i}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,s);const o=await this.options.onMutate?.(e,s);o!==this.state.context&&this.#r({type:"pending",context:o,variables:e,isPaused:i})}const r=await this.#n.start();return await this.#s.config.onSuccess?.(r,e,this.state.context,this,s),await this.options.onSuccess?.(r,e,this.state.context,s),await this.#s.config.onSettled?.(r,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(r,null,e,this.state.context,s),this.#r({type:"success",data:r}),r}catch(r){try{await this.#s.config.onError?.(r,e,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onError?.(r,e,this.state.context,s)}catch(o){Promise.reject(o)}try{await this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,r,e,this.state.context,s)}catch(o){Promise.reject(o)}throw this.#r({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#r(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),x.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}};function gs(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ps=class extends B{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#s=0}#e;#t;#s;build(e,t,s){const n=new ds({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:s});return this.add(n),n}add(e){this.#e.add(e);const t=X(e);if(typeof t=="string"){const s=this.#t.get(t);s?s.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=X(e);if(typeof t=="string"){const s=this.#t.get(t);if(s)if(s.length>1){const n=s.indexOf(e);n!==-1&&s.splice(n,1)}else s[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=X(e);if(typeof t=="string"){const n=this.#t.get(t)?.find(i=>i.state.status==="pending");return!n||n===e}else return!0}runNext(e){const t=X(e);return typeof t=="string"?this.#t.get(t)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){x.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(s=>je(t,s))}findAll(e={}){return this.getAll().filter(t=>je(e,t))}notify(e){x.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return x.batch(()=>Promise.all(e.map(t=>t.continue().catch(E))))}};function X(e){return e.options.scope?.id}var ms=class extends B{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,s){const n=t.queryKey,i=t.queryHash??Fe(n,t);let r=this.get(i);return r||(r=new us({client:e,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(n)}),this.add(r)),r}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){x.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>Te(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>Te(e,s)):t}notify(e){x.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){x.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){x.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Xi=class{#e;#t;#s;#n;#r;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new ms,this.#t=e.mutationCache||new ps,this.#s=e.defaultOptions||{},this.#n=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Ie.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=te.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#e.build(this,t),n=s.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(z(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:s})=>{const n=s.data;return[t,n]})}setQueryData(e,t,s){const n=this.defaultQueryOptions({queryKey:e}),r=this.#e.get(n.queryHash)?.state.data,o=Jt(t,r);if(o!==void 0)return this.#e.build(this,n).setData(o,{...s,manual:!0})}setQueriesData(e,t,s){return x.batch(()=>this.#e.findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;x.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#e;return x.batch(()=>(s.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},n=x.batch(()=>this.#e.findAll(e).map(i=>i.cancel(s)));return Promise.all(n).then(E).catch(E)}invalidateQueries(e,t={}){return x.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},n=x.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let r=i.fetch(void 0,s);return s.throwOnError||(r=r.catch(E)),i.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(n).then(E)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#e.build(this,t);return s.isStaleByTime(z(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(E).catch(E)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(E).catch(E)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return te.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#s}setDefaultOptions(e){this.#s=e}setQueryDefaults(e,t){this.#n.set(G(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],s={};return t.forEach(n=>{N(e,n.queryKey)&&Object.assign(s,n.defaultOptions)}),s}setMutationDefaults(e,t){this.#r.set(G(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],s={};return t.forEach(n=>{N(e,n.mutationKey)&&Object.assign(s,n.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#s.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Fe(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===Pe&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#s.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},ut=M.createContext(void 0),ys=e=>{const t=M.useContext(ut);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Zi=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Ht.jsx(ut.Provider,{value:e,children:t})),ct=M.createContext(!1),vs=()=>M.useContext(ct);ct.Provider;function Ss(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var bs=M.createContext(Ss()),ws=()=>M.useContext(bs),_s=(e,t,s)=>{const n=s?.state.error&&typeof e.throwOnError=="function"?st(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Cs=e=>{M.useEffect(()=>{e.clearReset()},[e])},Rs=({result:e,errorResetBoundary:t,throwOnError:s,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||st(s,[e.error,n])),Ms=e=>{if(e.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>s(n(...i)):s(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Os=(e,t)=>e.isLoading&&e.isFetching&&!t,xs=(e,t)=>e?.suspense&&t.isPending,Ne=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function ht(e,t,s){const n=vs(),i=ws(),r=ys(),o=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const a=r.getQueryCache().get(o.queryHash),l=e.subscribed!==!1;o._optimisticResults=n?"isRestoring":l?"optimistic":void 0,Ms(o),_s(o,i,a),Cs(i);const u=!r.getQueryCache().get(o.queryHash),[c]=M.useState(()=>new t(r,o)),f=c.getOptimisticResult(o),h=!n&&l;if(M.useSyncExternalStore(M.useCallback(d=>{const g=h?c.subscribe(x.batchCalls(d)):E;return c.updateResult(),g},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),M.useEffect(()=>{c.setOptions(o)},[o,c]),xs(o,f))throw Ne(o,c,i);if(Rs({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw f.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!$.isServer()&&Os(f,n)&&(u?Ne(o,c,i):a?.promise)?.catch(E).finally(()=>{c.updateResult()}),o.notifyOnChangeProps?f:c.trackResult(f)}function Yi(e,t){return ht(e,lt)}function er(e,t){return ht(e,fs)}function Is(e,t,s){const n=new Array(e);return new Proxy(n,{get(i,r,o){if(typeof r=="string"){const a=r.charCodeAt(0);if(a>=48&&a<=57){const l=+r;if(Number.isInteger(l)&&l>=0&&l<e){let u=i[l];if(!u){const c=t[l*2];u=i[l]={index:l,key:s(l),start:c,size:t[l*2+1],end:c+t[l*2+1],lane:0}}return u}}if(r==="length")return e}return Reflect.get(i,r,o)}})}function H(e,t,s){let n=s.initialDeps??[],i,r=!0;function o(){const a=e();return(a.length!==n.length||a.some((u,c)=>n[c]!==u))&&(n=a,i=t(...a),s?.onChange&&!(r&&s.skipInitialOnChange)&&s.onChange(i),r=!1),i}return o.updateDeps=a=>{n=a},o}function qe(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Fs=(e,t)=>Math.abs(e-t)<1.01,Ps=(e,t,s)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),s)}};let U;const de=()=>{if(U!==void 0)return U;if(typeof navigator>"u")return U=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return U=!0;const e=navigator.maxTouchPoints;return U=navigator.platform==="MacIntel"&&e!==void 0&&e>0},Ke=e=>{const{offsetWidth:t,offsetHeight:s}=e;return{width:t,height:s}},Es=e=>e,As=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,i=new Array(n);for(let r=0;r<n;r++)i[r]=t+r;return i},Ds=(e,t)=>{const s=e.scrollElement;if(!s)return;const n=e.targetWindow;if(!n)return;const i=o=>{const{width:a,height:l}=o;t({width:Math.round(a),height:Math.round(l)})};if(i(Ke(s)),!n.ResizeObserver)return()=>{};const r=new n.ResizeObserver(o=>{const a=()=>{const l=o[0];if(l?.borderBoxSize){const u=l.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(Ke(s))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return r.observe(s,{box:"border-box"}),()=>{r.unobserve(s)}},se={passive:!0},Ts=typeof window>"u"?!0:"onscrollend"in window,js=(e,t,s)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const r=e.options.useScrollendEvent&&Ts;let o=0;const a=r?null:Ps(i,()=>t(o,!1),e.options.isScrollingResetDelay),l=f=>()=>{o=s(n),a?.(),t(o,f)},u=l(!0),c=l(!1);return n.addEventListener("scroll",u,se),r&&n.addEventListener("scrollend",c,se),()=>{n.removeEventListener("scroll",u),r&&n.removeEventListener("scrollend",c)}},zs=(e,t)=>js(e,t,s=>{const{horizontal:n,isRtl:i}=e.options;return n?s.scrollLeft*(i&&-1||1):s.scrollTop}),ks=(e,t,s)=>{if(s.options.useCachedMeasurements){const n=s.indexFromElement(e),i=s.options.getItemKey(n);return s.itemSizeCache.get(i)??s.options.estimateSize(n)}if(t?.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[s.options.horizontal?"inlineSize":"blockSize"])}if(!t){const n=s.indexFromElement(e),i=s.options.getItemKey(n),r=s.itemSizeCache.get(i);if(r!==void 0)return r}return e[s.options.horizontal?"offsetWidth":"offsetHeight"]},Ls=(e,{adjustments:t=0,behavior:s},n)=>{var i,r;(r=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||r.call(i,{[n.options.horizontal?"left":"top"]:e+t,behavior:s})},Vs=Ls;class Qs{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var s,n,i;return((i=(n=(s=this.targetWindow)==null?void 0:s.performance)==null?void 0:n.now)==null?void 0:i.call(n))??Date.now()},this.observer=(()=>{let s=null;const n=()=>s||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:s=new this.targetWindow.ResizeObserver(i=>{i.forEach(r=>{const o=()=>{const a=r.target,l=this.indexFromElement(a);if(!a.isConnected){this.observer.unobserve(a);for(const[u,c]of this.elementsCache)if(c===a){this.elementsCache.delete(u);break}return}this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(a,r,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var i;(i=n())==null||i.disconnect(),s=null},observe:i=>{var r;return(r=n())==null?void 0:r.observe(i,{box:"border-box"})},unobserve:i=>{var r;return(r=n())==null?void 0:r.unobserve(i)}}})(),this.range=null,this.setOptions=s=>{var n,i;const r={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Es,rangeExtractor:As,onChange:()=>{},measureElement:ks,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const h in s){const d=s[h];d!==void 0&&(r[h]=d)}const o=this.options;let a=null,l=null,u=!1;if(o!==void 0&&o.enabled&&r.enabled&&r.anchorTo==="end"&&this.scrollElement!==null){const h=o.count,d=r.count,g=this.getMeasurements(),p=h>0?((n=g[0])==null?void 0:n.key)??o.getItemKey(0):null,S=h>0?((i=g[h-1])==null?void 0:i.key)??o.getItemKey(h-1):null;if(d!==h||h>0&&d>0&&(r.getItemKey(0)!==p||r.getItemKey(d-1)!==S)){u=!0;const b=h>0?this.getVirtualItemForOffset(this.getScrollOffset())??g[0]:null;b&&(a=[b.key,this.getScrollOffset()-b.start]);const _=r.followOnAppend===!0?"auto":r.followOnAppend||null;_&&d>h&&this.isAtEnd(o.scrollEndThreshold)&&(h===0||r.getItemKey(d-1)!==S)&&(l=_)}}this.options=r,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let c=!1,f=0;if(a&&this.scrollOffset!==null){const[h,d]=a,g=this.getMeasurements(),{count:p,getItemKey:S}=this.options;let y=0;for(;y<p&&S(y)!==h;)y++;if(y<p){const m=g[y];if(m){const b=Math.max(0,m.start+d);b!==this.scrollOffset&&(f=b-this.scrollOffset,this.scrollOffset=b,c=!0)}}}(c||l)&&(this.pendingScrollAnchor=[c?a[0]:null,c?a[1]:0,l,f])},this.notify=s=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,s)},this.maybeNotify=H(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),s=>{this.notify(s)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(s=>s()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var s;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}if(this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((s=this.scrollElement)==null?void 0:s.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,o)=>{if(o&&this._intendedScrollOffset===null&&r===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(r-this._intendedScrollOffset)<1.5&&(r=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const a=this.getScrollOffset();this.scrollDirection=o?a===r?this.scrollDirection:a<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=o,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const r=this.scrollElement,o=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},a=()=>{this._iosTouching=!1,!(!de()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};r.addEventListener("touchstart",o,se),r.addEventListener("touchend",a,se),this.unsubs.push(()=>{r.removeEventListener("touchstart",o),r.removeEventListener("touchend",a),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const i=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,i&&this.scrollElement&&this.options.enabled){const[r,o,a,l]=i;r!==null&&!a&&(de()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?l!==0&&(this._iosDeferredAdjustment+=l):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),a&&this.scrollToEnd({behavior:a})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const s=this.getScrollOffset(),n=this.getMaxScrollOffset();if(s<0||s>n)return;if(this._iosDeferredAdjustment<0&&s>=n-1){this._iosDeferredAdjustment=0;return}const i=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(s,{adjustments:this.scrollAdjustments+=i,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=H(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(s,n,i,r,o,a,l,u)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:s,paddingStart:n,scrollMargin:i,getItemKey:r,enabled:o,lanes:a,laneAssignmentMode:l,gap:u}),{key:!1}),this.getMeasurements=H(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:s,paddingStart:n,scrollMargin:i,getItemKey:r,enabled:o,lanes:a,laneAssignmentMode:l,gap:u},c)=>{const f=this.itemSizeCache;if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>s)for(const y of this.laneAssignments.keys())y>=s&&this.laneAssignments.delete(y);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(y=>{this.itemSizeCache.set(y.key,y.size)}));const h=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===s&&(this.lanesSettling=!1),a===1){const y=s*2;let m=this._flatMeasurements;if(!m||m.length<y){const w=new Float64Array(y);m&&h>0&&w.set(m.subarray(0,h*2)),m=w,this._flatMeasurements=m}let b;if(h===0)b=n+i;else{const w=h-1;b=m[w*2]+m[w*2+1]+u}for(let w=h;w<s;w++){const R=r(w),v=f.get(R),C=typeof v=="number"?v:this.options.estimateSize(w);m[w*2]=b,m[w*2+1]=C,b+=C+u}const _=Is(s,m,r);return this.measurementsCache=_,_}const d=this.measurementsCache.slice(0,h),g=new Array(a).fill(void 0),p=new Float64Array(a);let S=0;for(let y=0;y<h;y++){const m=d[y];m&&(g[m.lane]===void 0&&S++,g[m.lane]=y,p[m.lane]=m.end)}for(let y=h;y<s;y++){const m=r(y),b=this.laneAssignments.get(y);let _,w;const R=l==="estimate"||f.has(m);if(b!==void 0&&this.options.lanes>1){_=b;const O=g[_],F=O!==void 0?d[O]:void 0;w=F?F.end+u:n+i}else if(S===a){let O=0,F=p[0],D=g[0];for(let P=1;P<a;P++){const fe=p[P];(fe<F||fe===F&&g[P]<D)&&(O=P,F=fe,D=g[P])}_=O,w=F+u,R&&this.laneAssignments.set(y,_)}else _=y%this.options.lanes,w=n+i,R&&this.laneAssignments.set(y,_);const v=f.get(m),C=typeof v=="number"?v:this.options.estimateSize(y),I=w+C;d[y]={index:y,start:w,size:C,end:I,key:m,lane:_},g[_]===void 0&&S++,g[_]=y,p[_]=I}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=H(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(s,n,i,r)=>s.length===0||n===0?(this.range=null,null):(this.range=Ns(s,n,i,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=H(()=>{let s=null,n=null;const i=this.calculateRange();return i&&(s=i.startIndex,n=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,s,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,s,n]},(s,n,i,r,o)=>r===null||o===null?[]:s({startIndex:r,endIndex:o,overscan:n,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=s=>{const n=this.options.indexAttribute,i=s.getAttribute(n);return i?parseInt(i,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=s=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(i!==void 0&&this.range){const r=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),o=Math.max(0,i-r),a=Math.min(this.options.count-1,i+r);return s>=o&&s<=a}return!0},this.measureElement=s=>{if(!s){this.elementsCache.forEach((o,a)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(a))});return}const n=this.indexFromElement(s),i=this.options.getItemKey(n),r=this.elementsCache.get(i);r!==s&&(r&&this.observer.unobserve(r),this.observer.observe(s),this.elementsCache.set(i,s)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(s,void 0,this))},this.resizeItem=(s,n)=>{var i,r;if(s<0||s>=this.options.count)return;let o,a,l;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)l=this.options.getItemKey(s),a=u[s*2],o=u[s*2+1];else{const h=this.measurementsCache[s];if(!h)return;l=h.key,a=h.start,o=h.size}const c=this.itemSizeCache.get(l)??o,f=n-c;if(f!==0){const h=this.options.anchorTo==="end"&&((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,d=h?this.getTotalSize():0,g=this.getScrollOffset()+this.scrollAdjustments,S=!this.itemSizeCache.has(l)?a<g:a+c<=g&&this.scrollDirection!=="backward",y=((r=this.scrollState)==null?void 0:r.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[s]??{index:s,key:l,start:a,size:o,end:a+o,lane:0},f,this):S);(this.pendingMin===null||s<this.pendingMin)&&(this.pendingMin=s),this.itemSizeCache.set(l,n),this.itemSizeCacheVersion++,h?this.applyScrollAdjustment(this.getTotalSize()-d):y&&this.applyScrollAdjustment(f),this.notify(!1)}},this.getVirtualItems=H(()=>[this.getVirtualIndexes(),this.getMeasurements()],(s,n)=>{const i=[];for(let r=0,o=s.length;r<o;r++){const a=s[r],l=n[a];i.push(l)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=s=>{const n=this.getMeasurements();if(n.length===0)return;const i=this._flatMeasurements,r=this.options.lanes===1&&i!=null,o=ft(0,n.length-1,r?a=>i[a*2]:a=>qe(n[a]).start,s);return qe(n[o])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const s=this.scrollElement.document.documentElement;return this.options.horizontal?s.scrollWidth-this.scrollElement.innerWidth:s.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(s=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=s,this.getOffsetForAlignment=(s,n,i=0)=>{if(!this.scrollElement)return 0;const r=this.getSize(),o=this.getScrollOffset();n==="auto"&&(n=s>=o+r?"end":"start"),n==="center"?s+=(i-r)/2:n==="end"&&(s-=r);const a=this.getMaxScrollOffset();return Math.max(Math.min(a,s),0)},this.getOffsetForIndex=(s,n="auto")=>{s=Math.max(0,Math.min(s,this.options.count-1));const i=this.getSize(),r=this.getScrollOffset(),o=this.measurementsCache[s];if(!o)return;if(n==="auto")if(o.end>=r+i-this.options.scrollPaddingEnd)n="end";else if(o.start<=r+this.options.scrollPaddingStart)n="start";else return[r,n];if(n==="end"&&s===this.options.count-1)return[this.getMaxScrollOffset(),n];const a=n==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,n,o.size),n]},this.scrollToOffset=(s,{align:n="start",behavior:i="auto"}={})=>{this._iosDeferredAdjustment=0;const r=this.getOffsetForAlignment(s,n),o=this.now();this.scrollState={index:null,align:n,behavior:i,startedAt:o,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(s,{align:n="auto",behavior:i="auto"}={})=>{this._iosDeferredAdjustment=0,s=Math.max(0,Math.min(s,this.options.count-1));const r=this.getOffsetForIndex(s,n);if(!r)return;const[o,a]=r,l=this.now();this.scrollState={index:s,align:a,behavior:i,startedAt:l,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(s,{behavior:n="auto"}={})=>{const i=this.getScrollOffset()+s,r=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:r,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:s="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:s});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:s})},this.getTotalSize=()=>{var s;const n=this.getMeasurements();let i;if(n.length===0)i=this.options.paddingStart;else if(this.options.lanes===1){const r=n.length-1,o=this._flatMeasurements;o!=null?i=o[r*2]+o[r*2+1]:i=((s=n[r])==null?void 0:s.end)??0}else{const r=Array(this.options.lanes).fill(null);let o=n.length-1;for(;o>=0&&r.some(a=>a===null);){const a=n[o];r[a.lane]===null&&(r[a.lane]=a.end),o--}i=Math.max(...r.filter(a=>a!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const s=[];if(this.itemSizeCache.size===0)return s;const n=this.getMeasurements();for(const i of n)i&&this.itemSizeCache.has(i.key)&&s.push({index:i.index,key:i.key,start:i.start,size:i.size,end:i.end,lane:i.lane});return s},this._scrollToOffset=(s,{adjustments:n,behavior:i})=>{this._intendedScrollOffset=s+(n??0),this.options.scrollToFn(s,{behavior:i,adjustments:n},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,s){t!==0&&(de()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=t:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:s}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=n?n[0]:this.scrollState.lastTargetOffset,r=1,o=i!==this.scrollState.lastTargetOffset;if(!o&&Fs(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=r){this.getScrollOffset()!==i&&this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,o){const a=this.getSize()||600,l=Math.abs(i-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&l>a;this.scrollState.lastTargetOffset=i,u||(this.scrollState.behavior="auto"),this._scrollToOffset(i,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const ft=(e,t,s,n)=>{for(;e<=t;){const i=(e+t)/2|0,r=s(i);if(r<n)e=i+1;else if(r>n)t=i-1;else return i}return e>0?e-1:0};function Hs(e,t,s){let n=0;for(;n<=t;){const i=(n+t)/2|0,r=e[i*2];if(r<s)n=i+1;else if(r>s)t=i-1;else return i}return n>0?n-1:0}function Ns(e,t,s,n,i){const r=e.length-1;if(e.length<=n)return{startIndex:0,endIndex:r};if(n===1&&i!==null){const u=Hs(i,r,s);let c=u;const f=s+t;for(;c<r&&i[c*2]+i[c*2+1]<f;)c++;return{startIndex:u,endIndex:c}}let a=ft(0,r,u=>e[u].start,s),l=a;if(n===1)for(;l<r&&e[l].end<s+t;)l++;else if(n>1){const u=Array(n).fill(0);for(;l<r&&u.some(f=>f<s+t);){const f=e[l];u[f.lane]=f.end,l++}const c=Array(n).fill(s+t);for(;a>=0&&c.some(f=>f>=s);){const f=e[a];c[f.lane]=f.start,a--}a=Math.max(0,a-a%n),l=Math.min(r,l+(n-1-l%n))}return{startIndex:a,endIndex:l}}const ge=typeof document<"u"?M.useLayoutEffect:M.useEffect;function qs({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:s="transform",...n}){const i=M.useReducer(c=>c+1,0)[1],r=M.useRef({enabled:t,mode:s,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});r.current.enabled=t,r.current.mode=s;const o=c=>{const f=r.current;if(!f.enabled||!f.container)return;const h=c.getTotalSize();if(h!==f.lastSize){f.lastSize=h;const d=c.options.horizontal?"width":"height";f.container.style[d]=`${h}px`}},a=c=>{const f=r.current;if(!f.enabled||!f.container)return;o(c);const h=!!c.options.horizontal,d=f.mode==="transform",g=h?"left":"top",p=c.options.scrollMargin,S=c.getVirtualItems();for(const y of S){const m=y.start-p,b=c.elementsCache.get(y.key);b&&f.lastPositions.get(b)!==m&&(f.lastPositions.set(b,m),d?b.style.transform=h?`translate3d(${m}px, 0, 0)`:`translate3d(0, ${m}px, 0)`:b.style[g]=`${m}px`)}},l={...n,onChange:(c,f)=>{var h;const d=r.current;let g=!0;if(d.enabled){a(c);const p=c.range,S=d.prevRange;g=!S||S.isScrolling!==c.isScrolling||S.startIndex!==p?.startIndex||S.endIndex!==p?.endIndex,g&&(d.prevRange=p?{startIndex:p.startIndex,endIndex:p.endIndex,isScrolling:c.isScrolling}:null)}g&&(e&&f?Nt.flushSync(i):i()),(h=n.onChange)==null||h.call(n,c,f)}},[u]=M.useState(()=>{const c=new Qs(l);return Object.assign(c,{containerRef:f=>{const h=r.current;if(h.container=f,h.lastSize=null,f&&h.enabled){const d=c.getTotalSize();h.lastSize=d;const g=c.options.horizontal?"width":"height";f.style[g]=`${d}px`}}})});return u.setOptions(l),ge(()=>u._didMount(),[]),ge(()=>(o(u),u._willUpdate())),ge(()=>{a(u)}),u}function tr(e){return qs({observeElementRect:Ds,observeElementOffset:zs,scrollToFn:Vs,...e})}function Ks(e){return Us(e)||typeof e=="function"||Ws(e)}function Us(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Ws(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Z(e,t){return e==null?null:Ks(e)?qt.createElement(e,t):e}function Gs(e){if("cell"in e&&e.cell){const t=e.cell,s=t.column.columnDef,n=t,i=s;return n.getIsAggregated?.()?Z(i.aggregatedCell??s.cell,t.getContext()):n.getIsPlaceholder?.()?null:Z(s.cell,t.getContext())}return"header"in e&&e.header?Z(e.header.column.columnDef.header,e.header.getContext()):"footer"in e&&e.footer?Z(e.footer.column.columnDef.footer,e.footer.getContext()):null}function $s({update:e,notify:t,unwatched:s}){return{link:n,unlink:i,propagate:r,checkDirty:o,shallowPropagate:a};function n(u,c,f){const h=c.depsTail;if(h!==void 0&&h.dep===u)return;const d=h!==void 0?h.nextDep:c.deps;if(d!==void 0&&d.dep===u){d.version=f,c.depsTail=d;return}const g=u.subsTail;if(g!==void 0&&g.version===f&&g.sub===c)return;const p=c.depsTail=u.subsTail={version:f,dep:u,sub:c,prevDep:h,nextDep:d,prevSub:g,nextSub:void 0};d!==void 0&&(d.prevDep=p),h!==void 0?h.nextDep=p:c.deps=p,g!==void 0?g.nextSub=p:u.subs=p}function i(u,c=u.sub){const f=u.dep,h=u.prevDep,d=u.nextDep,g=u.nextSub,p=u.prevSub;return d!==void 0?d.prevDep=h:c.depsTail=h,h!==void 0?h.nextDep=d:c.deps=d,g!==void 0?g.prevSub=p:f.subsTail=p,p!==void 0?p.nextSub=g:(f.subs=g)===void 0&&s(f),d}function r(u){let c=u.nextSub,f;e:do{const h=u.sub;let d=h.flags;if(d&60?d&12?d&4?!(d&48)&&l(u,h)?(h.flags=d|40,d&=1):d=0:h.flags=d&-9|32:d=0:h.flags=d|32,d&2&&t(h),d&1){const g=h.subs;if(g!==void 0){const p=(u=g).nextSub;p!==void 0&&(f={value:c,prev:f},c=p);continue}}if((u=c)!==void 0){c=u.nextSub;continue}for(;f!==void 0;)if(u=f.value,f=f.prev,u!==void 0){c=u.nextSub;continue e}break}while(!0)}function o(u,c){let f,h=0,d=!1;e:do{const g=u.dep,p=g.flags;if(c.flags&16)d=!0;else if((p&17)===17){if(e(g)){const S=g.subs;S.nextSub!==void 0&&a(S),d=!0}}else if((p&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(f={value:u,prev:f}),u=g.deps,c=g,++h;continue}if(!d){const S=u.nextDep;if(S!==void 0){u=S;continue}}for(;h--;){const S=c.subs,y=S.nextSub!==void 0;if(y?(u=f.value,f=f.prev):u=S,d){if(e(c)){y&&a(S),c=u.sub;continue}d=!1}else c.flags&=-33;c=u.sub;const m=u.nextDep;if(m!==void 0){u=m;continue e}}return d}while(!0)}function a(u){do{const c=u.sub,f=c.flags;(f&48)===32&&(c.flags=f|16,(f&6)===2&&t(c))}while((u=u.nextSub)!==void 0)}function l(u,c){let f=c.depsTail;for(;f!==void 0;){if(f===u)return!0;f=f.prevDep}return!1}}function Bs(e,t,s){const n=typeof e=="object",i=n?e:void 0;return{next:(n?e.next:e)?.bind(i),error:(n?e.error:t)?.bind(i),complete:(n?e.complete:s)?.bind(i)}}const Ce=[];let ee=0;const{link:Ue,unlink:Js,propagate:Xs,checkDirty:dt,shallowPropagate:We}=$s({update(e){return e._update()},notify(e){Ce[Re++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,ne(e))}});let Y=0,Re=0,T,Me=0;function Zs(e){try{++Me,e()}finally{--Me||gt()}}function ne(e){const t=e.depsTail;let s=t!==void 0?t.nextDep:e.deps;for(;s!==void 0;)s=Js(s,e)}function gt(){if(!(Me>0)){for(;Y<Re;){const e=Ce[Y];Ce[Y++]=void 0,e.notify()}Y=0,Re=0}}function Ys(e,t){const s=typeof e=="function",n=e,i={_snapshot:s?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?0:1,get(){return T!==void 0&&Ue(i,T,ee),i._snapshot},subscribe(r){const o=Bs(r),a={current:!1},l=en(()=>{i.get(),a.current?o.next?.(i._snapshot):a.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(r){const o=T,a=t?.compare??Object.is;if(s)T=i,++ee,i.depsTail=void 0;else if(r===void 0)return!1;s&&(i.flags=5);try{const l=i._snapshot,u=typeof r=="function"?r(l):r===void 0&&s?n(l):r;return l===void 0||!a(l,u)?(i._snapshot=u,!0):!1}finally{T=o,s&&(i.flags&=-5),ne(i)}}};return s?(i.flags=17,i.get=function(){const r=i.flags;if(r&16||r&32&&dt(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&We(o)}}else r&32&&(i.flags=r&-33);return T!==void 0&&Ue(i,T,ee),i._snapshot}):i.set=function(r){if(i._update(r)){const o=i.subs;o!==void 0&&(Xs(o),We(o),gt())}},i}function en(e){const t=()=>{const n=T;T=s,++ee,s.depsTail=void 0,s.flags=6;try{return e()}finally{T=n,s.flags&=-5,ne(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const n=this.flags;n&16||n&32&&dt(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,ne(this)}};return t(),s}function W(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[n,i]of e)if(!t.has(n)||!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const s=Ge(e);if(s.length!==Ge(t).length)return!1;for(let n=0;n<s.length;n++)if(!Object.prototype.hasOwnProperty.call(t,s[n])||!Object.is(e[s[n]],t[s[n]]))return!1;return!0}function Ge(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}function tn(e,t){return e===t}function pt(e,t=n=>n,s){const n=s?.compare??tn,i=M.useCallback(o=>{const{unsubscribe:a}=e.subscribe(o);return a},[e]),r=M.useCallback(()=>e.get(),[e]);return Kt.useSyncExternalStoreWithSelector(i,r,r,t,n)}function sn(e){const t=pt(e.source,e.selector,{compare:W});return typeof e.children=="function"?e.children(t):e.children}function nn(e){const t=e;return Object.defineProperty(e,"state",{get(){return e.get()}}),"set"in e&&(t.setState=e.set.bind(e)),t}function rn(e){const{createAtom:t,batch:s}=e,n=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw new Error("Feature not supported in current reactivity implementation")},unmount:()=>{throw new Error("Feature not supported in current reactivity implementation")},schedule:e.schedule??(i=>queueMicrotask(i)),batch:s,untrack:i=>i(),createReadonlyAtom:(i,r)=>{const o=r?.compare??Object.is;let a=!1,l;const u=()=>{const f=i();return(!a||!o(l,f))&&(l=f,a=!0),l},c=t(()=>(n.get(),u()),{compare:o});return{get:u,subscribe:c.subscribe.bind(c)}},createWritableAtom:(i,r)=>t(i,{compare:r?.compare}),commit:()=>{n.set(i=>i+1)}}}function on(e,t=Object.is){let s=!1,n;return{get:e.get,markCommitted:i=>{n=i,s=!0},subscribe:i=>e.subscribe(r=>{(!s||!t(n,r))&&i(r)})}}function an(){return rn({createAtom:Ys,batch:Zs})}function oe(e,t){return typeof e=="function"?e(t):e}function V(e){if(Array.isArray(e))return e.map(V);if(e&&typeof e=="object"){const t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;const s=t===null?k():{},n=Object.keys(e);for(let i=0;i<n.length;i++){const r=n[i];Object.defineProperty(s,r,{configurable:!0,enumerable:!0,value:V(e[r]),writable:!0})}return s}return e}function ln(e,t){const s=Object.keys(t),n=e;for(let i=0;i<s.length;i++){const r=s[i];!r.startsWith("_memo_")&&r!=="_cellsCache"&&(n[r]=t[r])}return e}function k(){return Object.create(null)}function ae(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function un(e,t){return s=>{(t.options.atoms?.[e]??t.baseAtoms[e]).set(n=>oe(s,n))}}function $e(e){if(typeof e!="object"||e===null)return!1;if(Array.isArray(e))return!0;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Be(e){return Reflect.ownKeys(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}const cn=3;function hn(e,t){return mt(e,t,cn)}function mt(e,t,s){if(Object.is(e,t))return!0;if(s<=0||!$e(e)||!$e(t)||(Array.isArray(e)||Array.isArray(t))&&(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length))return!1;const n=Be(e),i=Be(t);if(n.length!==i.length)return!1;const r=e,o=t;for(let a=0;a<n.length;a++){const l=n[a];if(!Object.prototype.propertyIsEnumerable.call(t,l)||!mt(r[l],o[l],s-1))return!1}return!0}function le(e,t,s,n=hn){const i=`on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`,r=e.options[i];r&&r(o=>{const a=oe(s,o);return n(o,a)?o:a})}function fn(e){return e instanceof Function}function dn(e,t){const s=[],n=i=>{i.forEach(r=>{s.push(r);const o=t(r);o.length&&n(o)})};return n(e),s}const gn=({fn:e,memoDeps:t,onAfterCompare:s,onAfterUpdate:n,onBeforeCompare:i,onBeforeUpdate:r})=>{let o=[],a;return u=>{i?.();const c=t?.(u);let f=!c||c.length!==o?.length;if(!f&&c){for(let h=0;h<c.length;h++)if(c[h]!==o[h]){f=!0;break}}return s?.(f),f&&(o=c,r?.(),a=e(...c??[]),n?.(a)),a}};function yt(e){let t=!1;return()=>{if(!t){t=!0;return}e()}}function ue({feature:e,fnName:t,objectId:s,onAfterUpdate:n,table:i,...r}){const o=()=>{if(!n)return;const{schedule:l,untrack:u}=i._reactivity;l(()=>u(()=>n()))};return gn({...r,...{onAfterUpdate:()=>{o()}}})}function vt(e,t="_"){const[s,n]=e.split(t);return{fnKey:n,fnName:`${s}.${n}`,parentName:s}}function q(e,t,s){for(const[n,{fn:i,memoDeps:r}]of Object.entries(s)){const{fnKey:o,fnName:a}=vt(n);t[o]=r?ue({memoDeps:r,fn:i,fnName:a,table:t,feature:e}):i}}function J(e,t,s,n){for(const[i,{fn:r,memoDeps:o}]of Object.entries(n)){const{fnKey:a,fnName:l}=vt(i);if(o){const u=`_memo_${a}`;t[a]=function(...c){if(!this[u]){const f=this;this[u]=ue({memoDeps:h=>o(f,h),fn:(...h)=>r(f,...h),fnName:l,objectId:f.id,table:s,feature:e})}return this[u](...c)}}else t[a]=function(...u){return r(this,...u)}}}function j(e,t,s,...n){return e[t]?.(...n)??s(e,...n)}function pn(e){return e.row.getValue(e.column.id)}function mn(e){return e.getValue()??e.table.options.renderFallbackValue}function yn(e){return{table:e.table,column:e.column,row:e.row,cell:e,getValue:()=>e.getValue(),renderValue:()=>e.renderValue()}}const vn={assignCellPrototype:(e,t)=>{J("coreCellsFeature",e,t,{cell_getValue:{fn:s=>pn(s)},cell_renderValue:{fn:s=>mn(s)},cell_getContext:{fn:s=>yn(s),memoDeps:s=>[s]}})}};function Sn(e){if(!e._headerPrototype){e._headerPrototype={table:e};const t=Object.values(e._features);for(let s=0;s<t.length;s++)t[s].assignHeaderPrototype?.(e._headerPrototype,e)}return e._headerPrototype}function St(e,t,s){const n=Sn(e),i=Object.create(n);i.colSpan=0,i.column=t,i.depth=s.depth,i.headerGroup=null,i.id=s.id??t.id,i.index=s.index,i.isPlaceholder=!!s.isPlaceholder,i.placeholderId=s.placeholderId,i.rowSpan=0,i.subHeaders=[];const r=e._headerInstanceInitFns;for(let o=0;o<r.length;o++)r[o](i);return i}function bn(){return{start:[],end:[]}}function Q(e){const t=e.table.atoms.columnVisibility?.get();if(!t)return!0;const s=e.columns;return s.length?s.some(n=>j(n,"getIsVisible",Q)):(ae(t,e.id)?t[e.id]:void 0)??!0}function wn(e){return e.getAllLeafColumns().filter(t=>j(t,"getIsVisible",Q))}function bt(e,t=1){let s=t;for(let n=0;n<e.length;n++){const i=e[n];j(i,"getIsVisible",Q)&&i.columns.length&&(s=Math.max(s,bt(i.columns,t+1)))}return s}function _n(e,t){return String(t)}function Cn(e,t,s,n){let i=e??"";return t&&(i=i?`${i}_${t}`:String(t)),s&&(i=i?`${i}_${s}`:s),n&&(i=i?`${i}_${n}`:n),i}function Rn(e,t){let s=0;for(let n=0;n<e.length;n++)e[n].column===t&&s++;return s}function wt(e,t,s,n,i,r){const o={depth:t,id:_n(n,t),headers:[]},a=[];for(let l=0;l<e.length;l++){if(!(l in e))continue;const u=e[l],c=a[a.length-1],f=u.column.depth===o.depth;let h,d=!1;if(f&&u.column.parent?h=u.column.parent:(h=u.column,d=!0),c&&c.column===h)c.subHeaders.push(u);else{const g=St(s,h,{id:Cn(n,t,h.id,u.id),isPlaceholder:d,placeholderId:d?String(Rn(a,h)):void 0,depth:t,index:a.length});g.subHeaders.push(u),a.push(g)}o.headers.push(u),u.headerGroup=o}for(let l=0;l<r.length;l++)r[l](o);i.push(o),t>0&&wt(a,t-1,s,n,i,r)}function _t(e){for(let t=0;t<e.length;t++){const s=e[t];if(!j(s.column,"getIsVisible",Q))continue;let n=0;if(s.subHeaders.length){_t(s.subHeaders);for(let i=0;i<s.subHeaders.length;i++){const r=s.subHeaders[i];j(r.column,"getIsVisible",Q)&&(n+=r.colSpan)}}else n=1;if(s.colSpan=n,s.isPlaceholder&&s.subHeaders.length===1&&s.subHeaders[0].column===s.column){let i=1,r=s.subHeaders[0];for(;r;)r.rowSpan=0,i++,r=r.subHeaders.length===1&&r.subHeaders[0].column===s.column?r.subHeaders[0]:void 0;s.rowSpan=i}else s.rowSpan=1}}function Je(e,t,s,n){const i=bt(e),r=[],o=s._headerGroupInstanceInitFns,a=new Array(t.length);for(let l=0;l<t.length;l++)l in t&&(a[l]=St(s,t[l],{depth:i,index:l}));return wt(a,i-1,s,n,r,o),r.reverse(),_t(r[0]?.headers??[]),r}function Mn(e){if(!e._columnPrototype){e._columnPrototype={table:e};const t=Object.values(e._features);for(let s=0;s<t.length;s++)t[s].assignColumnPrototype?.(e._columnPrototype,e)}return e._columnPrototype}function On(e,t,s,n){const i={...e.getDefaultColumnDef(),...t},r=i.accessorKey,o=r===void 0?void 0:String(r),a=i.id??o?.replaceAll(".","_")??(typeof i.header=="string"?i.header:void 0);let l;if(i.accessorFn)l=i.accessorFn;else if(r!==void 0)if(typeof r=="string"&&r.includes(".")){const h=r.split(".");l=d=>{let g=d;for(let p=0;p<h.length;p++){const S=h[p];g=g?.[S]}return g}}else l=h=>h[i.accessorKey];if(!a)throw new Error;const u=Mn(e),c=Object.create(u);c.accessorFn=l,c.columnDef=i,c.columns=[],c.depth=s,c.id=`${String(a)}`,c.parent=n;const f=e._columnInstanceInitFns;for(let h=0;h<f.length;h++)f[h](c);return c}function Ct(e){const t=e.atoms.columnOrder?.get();return s=>{let n=[];if(!t?.length)n=s;else{const i=new Map;for(let r=0;r<s.length;r++){const o=s[r];i.set(o.id,o)}for(let r=0;r<t.length;r++){const o=t[r],a=i.get(o);a&&(n.push(a),i.delete(o))}for(let r=0;r<s.length;r++){const o=s[r];i.has(o.id)&&n.push(o)}}return xn(e,n)}}function xn(e,t){const s=e.atoms.grouping?.get()??[],{groupedColumnMode:n}=e.options;if(!s.length||!n)return t;const i=t.filter(a=>!s.includes(a.id));if(n==="remove")return i;const r=new Map;for(let a=0;a<t.length;a++){const l=t[a];r.set(l.id,l)}const o=[];for(let a=0;a<s.length;a++){const l=r.get(s[a]);l&&o.push(l)}return[...o,...i]}function In(e){return[e,...e.columns.flatMap(t=>t.getFlatColumns())]}function Fn(e){if(e.columns.length){const t=e.columns.flatMap(s=>s.getLeafColumns());return j(e.table,"getOrderColumns",Ct)(t)}return[e]}function Pn(e){return{header:t=>{const s=t.header.column.columnDef;return s.accessorKey?s.accessorKey:s.accessorFn?s.id:null},cell:t=>t.renderValue()?.toString?.()??null,...Object.values(e._features).reduce((t,s)=>Object.assign(t,s.getDefaultColumnDef?.()),{}),...e.options.defaultColumn}}function Rt(e,t,s,n=0){const i=new Array(t.length);for(let r=0;r<t.length;r++){if(!(r in t))continue;const o=t[r],a=On(e,o,n,s),l=o;a.columns=l.columns?Rt(e,l.columns,a,n+1):[],i[r]=a}return i}function En(e){return Rt(e,e.options.columns)}function An(e){return e.getAllColumns().flatMap(t=>t.getFlatColumns())}function Dn(e){const t=k(),s=e.getAllFlatColumns();for(let n=0;n<s.length;n++){const i=s[n];t[i.id]=i}return t}function Tn(e){const t=e.getAllColumns().flatMap(s=>s.getLeafColumns());return j(e,"getOrderColumns",Ct)(t)}function jn(e){const t=k(),s=e.getAllLeafColumns();for(let n=0;n<s.length;n++){const i=s[n];t[i.id]=i}return t}function zn(e,t){return e.getAllFlatColumnsById()[t]}const kn={assignColumnPrototype:(e,t)=>{J("coreColumnsFeature",e,t,{column_getFlatColumns:{fn:s=>In(s),memoDeps:s=>[s.table.options.columns]},column_getLeafColumns:{fn:s=>Fn(s),memoDeps:s=>[s.table.atoms.columnOrder?.get(),s.table.atoms.grouping?.get(),s.table.options.columns,s.table.options.groupedColumnMode]}})},constructTableAPIs:e=>{q("coreColumnsFeature",e,{table_getDefaultColumnDef:{fn:()=>Pn(e),memoDeps:()=>[e.options.defaultColumn]},table_getAllColumns:{fn:()=>En(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumns:{fn:()=>An(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumnsById:{fn:()=>Dn(e),memoDeps:()=>[e.options.columns]},table_getAllLeafColumns:{fn:()=>Tn(e),memoDeps:()=>[e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_getAllLeafColumnsById:{fn:()=>jn(e),memoDeps:()=>[e.getAllLeafColumns()]},table_getColumn:{fn:t=>zn(e,t)}})}};function Mt(e,t){for(let s=0;s<e.subHeaders.length;s++)Mt(e.subHeaders[s],t);t.push(e)}function Ln(e){const t=[];return Mt(e,t),t}function Vn(e){return{column:e.column,header:e,table:e.column.table}}function Qn(e){const{start:t,end:s}=e.atoms.columnPinning?.get()??bn(),n=e.getAllColumns(),i=j(e,"getVisibleLeafColumns",wn);if(!t.length&&!s.length)return Je(n,i,e);const r=e.getAllLeafColumnsById(),o=[];for(let u=0;u<t.length;u++){const c=r[t[u]];c&&j(c,"getIsVisible",Q)&&o.push(c)}const a=[];for(let u=0;u<s.length;u++){const c=r[s[u]];c&&j(c,"getIsVisible",Q)&&a.push(c)}const l=i.filter(u=>!t.includes(u.id)&&!s.includes(u.id));return Je(n,[...o,...l,...a],e)}function Hn(e){return[...e.getHeaderGroups()].reverse()}function Nn(e){const t=e.getHeaderGroups(),s=[];for(let n=0;n<t.length;n++){const i=t[n].headers;for(let r=0;r<i.length;r++)s.push(i[r])}return s}function qn(e){const t=e.getHeaderGroups()[0]?.headers??[],s=[];for(let n=0;n<t.length;n++){const i=t[n].getLeafHeaders();for(let r=0;r<i.length;r++)s.push(i[r])}return s}const Kn={assignHeaderPrototype:(e,t)=>{J("coreHeadersFeature",e,t,{header_getLeafHeaders:{fn:s=>Ln(s),memoDeps:s=>[s.column.table.options.columns]},header_getContext:{fn:s=>Vn(s),memoDeps:s=>[s.column.table.options.columns]}})},constructTableAPIs:e=>{q("coreHeadersFeature",e,{table_getHeaderGroups:{fn:()=>Qn(e),memoDeps:()=>[e.options.columns,e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.atoms.columnPinning?.get(),e.atoms.columnVisibility?.get(),e.options.groupedColumnMode]},table_getFooterGroups:{fn:()=>Hn(e),memoDeps:()=>[e.getHeaderGroups()]},table_getFlatHeaders:{fn:()=>Nn(e),memoDeps:()=>[e.getHeaderGroups()]},table_getLeafHeaders:{fn:()=>qn(e),memoDeps:()=>[e.getHeaderGroups()]}})}};function Un(e){if(!e._rowPrototype){e._rowPrototype={table:e};const t=Object.values(e._features);for(let s=0;s<t.length;s++)t[s].assignRowPrototype?.(e._rowPrototype,e)}return e._rowPrototype}const Wn=(e,t,s,n,i,r,o)=>{const a=Un(e),l=Object.create(a);l._displayIndexCache=-1,l._uniqueValuesCache=k(),l._valuesCache=k(),l.depth=i,l.id=t,l.index=n,l.original=s,l.parentId=o,l.subRows=[];const u=e._rowInstanceInitFns;for(let c=0;c<u.length;c++)u[c](l);return l},Gn=/([0-9]+)/gm;function K(e){const t=Object.assign((s,n,i)=>{let r=s.getValue(i),o=n.getValue(i);const a=t.resolveDataValue;return a&&(r=a(r),o=a(o)),t.sort(r,o,s,n,i)},e);return t}K({resolveDataValue:e=>ce(e).toLowerCase(),sort:(e,t)=>xt(e,t)});K({resolveDataValue:e=>ce(e),sort:(e,t)=>xt(e,t)});K({resolveDataValue:e=>ce(e).toLowerCase(),sort:(e,t)=>Ae(e,t)});K({resolveDataValue:e=>ce(e),sort:(e,t)=>Ae(e,t)});K({resolveDataValue:e=>$n(e),sort:(e,t)=>e>t?1:e<t?-1:0});const Ot=K({sort:(e,t)=>Ae(e,t)});function Ae(e,t){return e===t?0:e>t?1:-1}function $n(e){return e instanceof Date?e.getTime():e}function ce(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function xt(e,t){let s=0,n=0;const i=e.length,r=t.length;for(;s<i&&n<r;){const o=ie(e.charCodeAt(s)),a=ie(t.charCodeAt(n)),l=Oe(e,s,o),u=Oe(t,n,a);if(!o&&!a){const f=Bn(e,s,l,t,n,u);if(f)return f;s=l,n=u;continue}if(o!==a)return o?1:-1;const c=Jn(e,s,l,t,n,u);if(c)return c;s=l,n=u}return Ze(e,s)-Ze(t,n)}function ie(e){return e>=48&&e<=57}function Oe(e,t,s){let n=t+1;for(;n<e.length&&ie(e.charCodeAt(n))===s;)n++;return n}function Bn(e,t,s,n,i,r){const o=s-t,a=r-i,l=o<a?o:a;for(let u=0;u<l;u++){const c=e.charCodeAt(t+u),f=n.charCodeAt(i+u);if(c>f)return 1;if(f>c)return-1}return o>a?1:a>o?-1:0}function Jn(e,t,s,n,i,r){let o=t;for(;o<s&&e.charCodeAt(o)===48;)o++;let a=i;for(;a<r&&n.charCodeAt(a)===48;)a++;const l=s-o,u=r-a;if(l===0&&u===0)return 0;if(l<=15&&u<=15){const h=Xe(e,o,s),d=Xe(n,a,r);return h>d?1:d>h?-1:0}const c=parseInt(e.slice(t,s),10),f=parseInt(n.slice(i,r),10);return c>f?1:f>c?-1:0}function Xe(e,t,s){let n=0;for(let i=t;i<s;i++)n=n*10+e.charCodeAt(i)-48;return n}function Ze(e,t){let s=0,n=t;for(;n<e.length;)s++,n=Oe(e,n,ie(e.charCodeAt(n)));return s}function Xn(){return[]}function Zn(e,t){le(e,"cellSelection",V(e.initialState.cellSelection)??Xn())}function Yn(e){e.atoms.cellSelection&&(e.options.autoResetAll??e.options.autoResetCellSelection??!0)&&e._reactivity.schedule(()=>Zn(e))}function ei(e){e.atoms.expanded&&(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding)&&e._reactivity.schedule(()=>ti(e))}function ti(e,t){const s=e.initialState.expanded;le(e,"expanded",s===!0?!0:Object.assign(k(),V(s??{})))}const xe=0;function It(e){if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if((e.atoms.pagination?.get()?.pageIndex??xe)===xe)return;ii(e)}}function si(e,t){le(e,"pagination",t)}function ni(e,t){si(e,s=>{let n=oe(t,s.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return n=Math.max(0,Math.min(n,i)),{...s,pageIndex:n}})}function ii(e,t){ni(e,xe)}function ri(){return[]}function he(e,t){le(e,"sorting",t)}function Ft(e,t){he(e,t?[]:V(e.initialState.sorting??[]))}function oi(e){e.atoms.sorting&&(e.options.autoResetAll??e.options.autoResetSorting??!1)&&Ft(e)}function Pt(e){const t=e.table._rowModelFns.sortFns,s=e.table.getFilteredRowModel().flatRows.slice(0,10);let n,i=!1;for(let r=0;r<s.length;r++){const o=s[r].getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]"){n="datetime";break}if(typeof o=="string"&&(i=!0,o.split(Gn).length>1)){n="alphanumeric";break}}if(!n&&i&&(n="text"),n){let r=t?.[n];if(r||n==="alphanumeric"&&(r=t?.text),r)return r}return Ot}function Et(e){const t=e.table.getFilteredRowModel().flatRows.slice(0,10);for(let s=0;s<t.length;s++){const n=t[s].getValue(e.id);if(n!=null)return typeof n=="string"?"asc":"desc"}return"desc"}function At(e){const t=e.table._rowModelFns.sortFns;return fn(e.columnDef.sortFn)?e.columnDef.sortFn:e.columnDef.sortFn==="auto"?Pt(e):t?.[e.columnDef.sortFn]??Ot}function Dt(e,t,s){const n=jt(e,s&&re(e)),i=typeof t<"u";he(e.table,r=>{const o=r.findIndex(h=>h.id===e.id),a=o===-1?void 0:r[o];let l=[],u;const c=i?t:n==="desc",f=!!(r.length&&re(e)&&s);return f?a?u="toggle":u="add":a?u="toggle":u="replace",u==="toggle"&&(i||n||(u="remove")),u==="add"?(l=[...r,{id:e.id,desc:c}],l.splice(0,l.length-(e.table.options.maxMultiSortColCount??Number.MAX_SAFE_INTEGER))):u==="toggle"?l=f?r.map(h=>h.id===e.id?{...h,desc:c}:h):[{id:e.id,desc:c}]:u==="remove"?l=f?r.filter(h=>h.id!==e.id):[]:l=[{id:e.id,desc:c}],l})}function Tt(e){return e.columnDef.sortDescFirst??e.table.options.sortDescFirst??Et(e)==="desc"?"desc":"asc"}function jt(e,t){const s=Tt(e),n=zt(e);return n?n!==s&&(e.table.options.enableSortingRemoval??!0)&&(!t||(e.table.options.enableMultiRemove??!0))?!1:n==="desc"?"asc":"desc":s}function De(e){return(e.columnDef.enableSorting??!0)&&(e.table.options.enableSorting??!0)&&!!e.accessorFn}function re(e){return e.columnDef.enableMultiSort??e.table.options.enableMultiSort??!!e.accessorFn}function zt(e){const t=e.table.atoms.sorting?.get()?.find(s=>s.id===e.id);return t?t.desc?"desc":"asc":!1}function ai(e){return e.table.atoms.sorting?.get()?.findIndex(t=>t.id===e.id)??-1}function li(e){he(e.table,t=>t.length?t.filter(s=>s.id!==e.id):[])}function ui(e){const t=De(e);return s=>{t&&Dt(e,void 0,re(e)?e.table.options.isMultiSortEvent?.(s):!1)}}function ci(){return e=>ue({feature:"coreRowModelsFeature",table:e,fnName:"table.getCoreRowModel",memoDeps:()=>[e.options.data],fn:()=>hi(e,e.options.data),onAfterUpdate:yt(()=>{ei(e),It(e),oi(e),Yn(e)})})}function kt(e,t,s,n=0,i){const r=[];for(let o=0;o<s.length;o++){const a=s[o],l=Wn(e,e.getRowId(a,o,i),a,o,n,void 0,i?.id);t.flatRows.push(l),t.rowsById[l.id]=l,r.push(l),e.options.getSubRows&&(l.originalSubRows=e.options.getSubRows(a,o),l.originalSubRows?.length&&(l.subRows=kt(e,t,l.originalSubRows,n+1,l)))}return r}function hi(e,t){const s={rows:[],flatRows:[],rowsById:k()};return s.rows=kt(e,s,t),s}function fi(e){return e._rowModels.coreRowModel||(e._rowModels.coreRowModel=e.options.features.coreRowModel?.(e)??ci()(e)),e._rowModels.coreRowModel()}function di(e){return e.getCoreRowModel()}function gi(e){return e._rowModels.filteredRowModel||(e._rowModels.filteredRowModel=e.options.features.filteredRowModel?.(e)),e.options.manualFiltering||!e._rowModels.filteredRowModel?e.getPreFilteredRowModel():e._rowModels.filteredRowModel()}function pi(e){return e.getFilteredRowModel()}function mi(e){return e._rowModels.groupedRowModel||(e._rowModels.groupedRowModel=e.options.features.groupedRowModel?.(e)),e.options.manualGrouping||!e._rowModels.groupedRowModel?e.getPreGroupedRowModel():e._rowModels.groupedRowModel()}function yi(e){return e.getGroupedRowModel()}function vi(e){return e._rowModels.sortedRowModel||(e._rowModels.sortedRowModel=e.options.features.sortedRowModel?.(e)),e.options.manualSorting||!e._rowModels.sortedRowModel?e.getPreSortedRowModel():e._rowModels.sortedRowModel()}function Si(e){return e.getSortedRowModel()}function bi(e){return e._rowModels.expandedRowModel||(e._rowModels.expandedRowModel=e.options.features.expandedRowModel?.(e)),e.options.manualExpanding||!e._rowModels.expandedRowModel?e.getPreExpandedRowModel():e._rowModels.expandedRowModel()}function wi(e){return e.getExpandedRowModel()}function _i(e){return e._rowModels.paginatedRowModel||(e._rowModels.paginatedRowModel=e.options.features.paginatedRowModel?.(e)),e.options.manualPagination||!e._rowModels.paginatedRowModel?e.getPrePaginatedRowModel():e._rowModels.paginatedRowModel()}function Ci(e){return e.getPaginatedRowModel()}const Ri={constructTableAPIs:e=>{q("coreRowModelsFeature",e,{table_getCoreRowModel:{fn:()=>fi(e)},table_getPreFilteredRowModel:{fn:()=>di(e)},table_getFilteredRowModel:{fn:()=>gi(e)},table_getPreGroupedRowModel:{fn:()=>pi(e)},table_getGroupedRowModel:{fn:()=>mi(e)},table_getPreSortedRowModel:{fn:()=>yi(e)},table_getSortedRowModel:{fn:()=>vi(e)},table_getPreExpandedRowModel:{fn:()=>Si(e)},table_getExpandedRowModel:{fn:()=>bi(e)},table_getPrePaginatedRowModel:{fn:()=>wi(e)},table_getPaginatedRowModel:{fn:()=>_i(e)},table_getRowModel:{fn:()=>Ci(e)}})}};function Mi(e){if(!e._cellPrototype){e._cellPrototype={table:e};const t=Object.values(e._features);for(let s=0;s<t.length;s++)t[s].assignCellPrototype?.(e._cellPrototype,e)}return e._cellPrototype}function Oi(e,t,s){const n=Mi(s),i=Object.create(n);i.column=e,i.id=`${t.id}_${e.id}`,i.row=t;const r=s._cellInstanceInitFns;for(let o=0;o<r.length;o++)r[o](i);return i}function xi(e){const t=e.table.getRowsInDisplayOrder(),s=e._displayIndexCache;return t[s]===e?s:-1}function Ii(e){const t=e.getPrePaginatedRowModel().rows;if(e.options.paginateExpandedRows===!1){const s=[],n=i=>{i._displayIndexCache=s.length,s.push(i),i.subRows.length&&i.getIsExpanded?.()&&i.subRows.forEach(n)};return t.forEach(n),s}for(let s=0;s<t.length;s++)t[s]._displayIndexCache=s;return t}function Fi(e,t){if(ae(e._valuesCache,t))return e._valuesCache[t];const s=e.table.getColumn(t);if(s?.accessorFn)return e._valuesCache[t]=s.accessorFn(e.original,e.index),e._valuesCache[t]}function Pi(e,t){if(ae(e._uniqueValuesCache,t))return e._uniqueValuesCache[t];const s=e.table.getColumn(t);if(s?.accessorFn)return s.columnDef.getUniqueValues?(e._uniqueValuesCache[t]=s.columnDef.getUniqueValues(e.original,e.index),e._uniqueValuesCache[t]):(e._uniqueValuesCache[t]=[e.getValue(t)],e._uniqueValuesCache[t])}function Ei(e,t){return e.getValue(t)??e.table.options.renderFallbackValue}function Ai(e){return dn(e.subRows,t=>t.subRows)}function Di(e){const t=e.getCoreRowModel().flatRows;let s=0;for(let n=0;n<t.length;n++)s=Math.max(s,t[n].depth);return s}function Ti(e){if(e.parentId)return e.table.getCoreRowModel().rowsById[e.parentId]??e.table.getRow(e.parentId,!0)}function ji(e){const t=[];let s=e;for(;;){const n=s.getParentRow();if(!n)break;t.push(n),s=n}return t.reverse()}function zi(e){const t=e.table.getAllLeafColumns();let s=e._cellsCache;s||(s=e._cellsCache=new WeakMap);const n=new Array(t.length);for(let i=0;i<t.length;i++){const r=t[i];let o=s.get(r);o||(o=Oi(r,e,e.table),s.set(r,o)),n[i]=o}return n}function ki(e){const t=k(),s=e.getAllCells();for(let n=0;n<s.length;n++){const i=s[n];t[i.column.id]=i}return t}function Li(e,t,s,n){return t.options.getRowId?.(e,s,n)??(n?`${n.id}.${s}`:String(s))}function Vi(e,t,s){let n=(s?e.getPrePaginatedRowModel():e.getRowModel()).rowsById[t];if(!n&&(n=e.getCoreRowModel().rowsById[t],!n))throw new Error;return n}const Qi={assignRowPrototype:(e,t)=>{J("coreRowsFeature",e,t,{row_getDisplayIndex:{fn:s=>xi(s)},row_getAllCellsByColumnId:{fn:s=>ki(s),memoDeps:s=>[s.getAllCells()]},row_getAllCells:{fn:s=>zi(s),memoDeps:s=>[s.table.getAllLeafColumns()]},row_getLeafRows:{fn:s=>Ai(s),memoDeps:s=>[s.subRows]},row_getParentRow:{fn:s=>Ti(s)},row_getParentRows:{fn:s=>ji(s)},row_getUniqueValues:{fn:(s,n)=>Pi(s,n)},row_getValue:{fn:(s,n)=>Fi(s,n)},row_renderValue:{fn:(s,n)=>Ei(s,n)}})},constructTableAPIs:e=>{q("coreRowsFeature",e,{table_getRowsInDisplayOrder:{fn:()=>Ii(e),memoDeps:()=>[e.getPrePaginatedRowModel().rows,e.options.paginateExpandedRows,e.options.paginateExpandedRows===!1?e.atoms.expanded?.get():void 0]},table_getRowId:{fn:(t,s,n)=>Li(t,e,s,n)},table_getRow:{fn:(t,s)=>Vi(e,t,s)},table_getMaxSubRowDepth:{fn:()=>Di(e),memoDeps:()=>[e.getCoreRowModel()]}})}};function Lt(e,t,s=(n,i)=>n===i){const n=t===void 0?e.options.state:t;e._reactivity.batch(()=>{if(n)for(const i in n){const r=e.baseAtoms[i];if(!r)continue;const o=n[i],a=o===void 0?e.initialState[i]:o;s(e._reactivity.untrack(()=>r.get()),a)||r.set(()=>a)}})}function Vt(e,t,s=(n,i)=>n===i){e._reactivity.batch(()=>{Lt(e,t,s),e._reactivity.commit?.()})}function Hi(e){const t=V(e.initialState);e._reactivity.batch(()=>{const n=Object.keys(t);for(let i=0;i<n.length;i++){const r=n[i];e.baseAtoms[r].set(t[r])}});const s=Object.values(e._features);for(let n=0;n<s.length;n++)s[n].resetTableInstanceData?.(e)}function Ni(e,t){const{features:s,atoms:n,initialState:i}=e.options;if(!e.options.mergeOptions)return{...e.options,...t,features:s,atoms:n,initialState:i};const r=e.options.mergeOptions(e.options,t),o={...Object.getOwnPropertyDescriptors(r)};return Object.defineProperties(Object.create(Object.getPrototypeOf(r)),{...o,features:{value:s,enumerable:!0,configurable:!0,writable:!0},atoms:{value:n,enumerable:!0,configurable:!0,writable:!0},initialState:{value:i,enumerable:!0,configurable:!0,writable:!0}})}function Qt(e,t,s){const n=Ni(e,oe(t,e.options));e.optionsStore?e.optionsStore.set(()=>n):e.options=n,s?.syncExternalState!==!1&&Vt(e,n.state??null)}const qi={constructTableAPIs:e=>{q("coreTablesFeature",e,{table_reset:{fn:()=>Hi(e)},table_setOptions:{fn:t=>Qt(e,t)}})}},Ki={coreCellsFeature:vn,coreColumnsFeature:kn,coreHeadersFeature:Kn,coreRowModelsFeature:Ri,coreRowsFeature:Qi,coreTablesFeature:qi};function sr(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},columns:e=>e,display:e=>e,group:e=>e}}function nr(e){return e}function Ui(e,t={}){return Object.values(e).forEach(s=>{t=s.getInitialState?.(t)??t}),V(t)}function Wi(e){const t=e.features.coreReactivityFeature,{aggregationFns:s,columnMeta:n,coreRowModel:i,expandedRowModel:r,facetedMinMaxValues:o,facetedRowModel:a,facetedUniqueValues:l,filterFns:u,filterMeta:c,filteredRowModel:f,groupedRowModel:h,paginatedRowModel:d,sortFns:g,sortedRowModel:p,tableMeta:S,...y}=e.features,m={_cellInstanceInitFns:[],_columnInstanceInitFns:[],_features:{...Ki,...y},_headerGroupInstanceInitFns:[],_headerInstanceInitFns:[],_reactivity:t,_rowInstanceInitFns:[],_rowModelFns:{aggregationFns:s,filterFns:u,sortFns:g},_rowModels:{},atoms:{},baseAtoms:{}},b=Object.values(m._features),_={...b.reduce((R,v)=>Object.assign(R,v.getDefaultTableOptions?.(m)),{}),...e};if(t.wrapExternalAtoms&&_.atoms)for(const[R,v]of Object.entries(_.atoms)){const C=v,I=t.createWritableAtom(C.get(),{debugName:`externalAtom/${R}`});_.atoms[R]=I;let O=!1;const F=C.subscribe(P=>{O||I.set(P)}),D=I.subscribe(P=>{O=!0,C.set(P),O=!1});t.addSubscription(F),t.addSubscription(D)}t.createOptionsStore?(m.optionsStore=t.createWritableAtom(_,{debugName:"table/optionsStore"}),Object.defineProperty(m,"options",{configurable:!0,enumerable:!0,get(){return m.optionsStore.get()},set(R){m.optionsStore.set(()=>R)}})):m.options=_,m.initialState=Ui(m._features,m.options.initialState);const w=Object.keys(m.initialState);for(let R=0;R<w.length;R++){const v=w[R];m.baseAtoms[v]=t.createWritableAtom(m.initialState[v],{debugName:`table/baseAtoms/${v}`}),m.atoms[v]=t.createReadonlyAtom(()=>{const C=m.options,I=C.atoms?.[v],O=I?I.get():m.baseAtoms[v].get();if(I)return O;const F=C.state;if(F&&ae(F,v)){const D=F[v];return D===void 0?m.initialState[v]:D}return O},{debugName:`table/atoms/${v}`})}Lt(m),m.store=nn(t.createReadonlyAtom(()=>{const R={};for(let v=0;v<w.length;v++){const C=w[v];R[C]=m.atoms[C].get()}return R},{compare:W,debugName:"table/store"}));for(let R=0;R<b.length;R++){const v=b[R];v.initTableInstanceData?.(m),v.initCellInstanceData&&m._cellInstanceInitFns.push(v.initCellInstanceData.bind(v)),v.initColumnInstanceData&&m._columnInstanceInitFns.push(v.initColumnInstanceData.bind(v)),v.initHeaderGroupInstanceData&&m._headerGroupInstanceInitFns.push(v.initHeaderGroupInstanceData.bind(v)),v.initHeaderInstanceData&&m._headerInstanceInitFns.push(v.initHeaderInstanceData.bind(v)),v.initRowInstanceData&&m._rowInstanceInitFns.push(v.initRowInstanceData.bind(v)),v.constructTableAPIs?.(m)}return m}const ir={getInitialState(e){return{sorting:ri(),...e}},getDefaultColumnDef(){return{sortFn:"auto",sortUndefined:1}},getDefaultTableOptions(e){return{autoResetSorting:!1,onSortingChange:un("sorting",e),isMultiSortEvent:t=>t.shiftKey}},assignColumnPrototype(e,t){J("rowSortingFeature",e,t,{column_getAutoSortFn:{fn:s=>Pt(s)},column_getAutoSortDir:{fn:s=>Et(s)},column_getSortFn:{fn:s=>At(s)},column_toggleSorting:{fn:(s,n,i)=>Dt(s,n,i)},column_getFirstSortDir:{fn:s=>Tt(s)},column_getNextSortingOrder:{fn:(s,n)=>jt(s,n)},column_getCanSort:{fn:s=>De(s)},column_getCanMultiSort:{fn:s=>re(s)},column_getIsSorted:{fn:s=>zt(s)},column_getSortIndex:{fn:s=>ai(s)},column_clearSorting:{fn:s=>li(s)},column_getToggleSortingHandler:{fn:s=>ui(s)}})},constructTableAPIs(e){q("rowSortingFeature",e,{table_setSorting:{fn:t=>he(e,t)},table_resetSorting:{fn:t=>Ft(e,t)}})}};function rr(){return e=>{const t=e;return ue({feature:"rowSortingFeature",table:t,fnName:"table.getSortedRowModel",memoDeps:()=>[t.atoms.sorting?.get(),t.getPreSortedRowModel()],fn:()=>Gi(t),onAfterUpdate:yt(()=>It(t))})}}function Gi(e){const t=e.getPreSortedRowModel(),s=e.atoms.sorting?.get();if(!t.rows.length||!s?.length)return t;const n=[],i=s.filter(l=>{const u=e.getColumn(l.id);return u?De(u):!1});if(!i.length)return t;const r=[];for(let l=0;l<i.length;l++){const u=i[l],c=e.getColumn(u.id);c&&r.push({id:u.id,desc:u.desc,sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortFn:At(c)})}const o=(l,u)=>{for(let c=0;c<r.length;c++){const f=r[c],h=f.sortUndefined,d=f.desc;let g=0;if(h){const p=l.getValue(f.id),S=u.getValue(f.id),y=p===void 0,m=S===void 0;if(y&&m)continue;if(y||m){if(h==="first")return y?-1:1;if(h==="last")return y?1:-1;g=y?h:-h}}if(g===0&&(g=f.sortFn(l,u,f.id)),g!==0)return d&&(g*=-1),f.invertSorting&&(g*=-1),g}return l.index-u.index},a=l=>{const u=l.slice();u.sort(o);let c=!1;for(let f=0;f<u.length;f++){const h=u[f];h!==l[f]&&(c=!0);const d=n.length;if(n.push(h),h.subRows.length){const g=a(h.subRows);if(g.changed){const p=Object.create(Object.getPrototypeOf(h));ln(p,h),p.subRows=g.rows,u[f]=p,n[d]=p,c=!0}}}return{rows:u,changed:c}};return{rows:a(t.rows).rows,flatRows:n,rowsById:t.rowsById}}const $i=typeof window>"u"?M.useEffect:M.useLayoutEffect;function or(e,t){const[{table:s,rootSource:n}]=M.useState(()=>{const l=Wi({...e,features:{coreReactivityFeature:an(),...e.features}});return l.Subscribe=(u=>sn({...u,source:u.source??l.store})),l.FlexRender=Gs,{table:l,rootSource:on(l.store,W)}}),i=s;Qt(i,l=>({...l,...e}),{syncExternalState:!1});const r=i.options.state,o=n.get(),a=pt(n,t,{compare:W});return $i(()=>{n.markCommitted(o),Vt(i,r??null,W)}),M.useMemo(()=>({...s,options:e,state:a}),[s,e,a])}export{Xi as Q,tr as a,or as b,sr as c,rr as d,Zi as e,ys as f,er as g,ir as r,nr as t,Yi as u};
1
+ import{r as M,j as Ht,a as Nt,R as qt}from"./react-rd22PHbN.js";import{w as Kt}from"./base-ui-qeHDA5zu.js";var B=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(){}},Ut=class extends B{#e;#t;#s;constructor(){super(),this.#s=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#s=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Ie=new Ut,Wt={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Gt=class{#e=Wt;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},L=new Gt;function $t(e){setTimeout(e,0)}var Bt=typeof window>"u"||"Deno"in globalThis;function E(){}function Jt(e,t){return typeof e=="function"?e(t):e}function pe(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ye(e,t){return Math.max(e+(t||0)-Date.now(),0)}function z(e,t){return typeof e=="function"?e(t):e}function A(e,t){return typeof e=="function"?e(t):e}function Te(e,t){const{type:s="all",exact:n,fetchStatus:i,predicate:r,queryKey:o,stale:a}=e;if(o){if(n){if(t.queryHash!==Fe(o,t.options))return!1}else if(!N(t.queryKey,o))return!1}if(s!=="all"){const l=t.isActive();if(s==="active"&&!l||s==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||r&&!r(t))}function je(e,t){const{exact:s,status:n,predicate:i,mutationKey:r}=e;if(r){if(!t.options.mutationKey)return!1;if(s){if(G(t.options.mutationKey)!==G(r))return!1}else if(!N(t.options.mutationKey,r))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Fe(e,t){return(t?.queryKeyHashFn||G)(e)}function G(e){return JSON.stringify(e,(t,s)=>ye(s)?Object.keys(s).sort().reduce((n,i)=>(n[i]=s[i],n),{}):s)}function N(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!N(e[n],t[n]))return!1;return!0}const s=Object.keys(t);for(const n of s)if(!N(e[n],t[n]))return!1;return!0}return!1}var Xt=Object.prototype.hasOwnProperty;function et(e,t,s=0){if(e===t)return e;if(s>500)return t;const n=ze(e)&&ze(t);if(!n&&!(ye(e)&&ye(t)))return t;const r=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),a=o.length,l=n?new Array(a):{};let u=0;for(let c=0;c<a;c++){const f=n?c:o[c],h=e[f],d=t[f];if(h===d){l[f]=h,(n?c<r:Xt.call(e,f))&&u++;continue}if(h===null||d===null||typeof h!="object"||typeof d!="object"){l[f]=d;continue}const g=et(h,d,s+1);l[f]=g,g===h&&u++}return r===a&&u===r?e:l}function me(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function ze(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ye(e){if(!ke(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!ke(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ke(e){return Object.prototype.toString.call(e)==="[object Object]"}function Zt(e){return new Promise(t=>{L.setTimeout(t,e)})}function ve(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?et(e,t):t}function Yt(e,t,s=0){const n=[...e,t];return s&&n.length>s?n.slice(1):n}function es(e,t,s=0){const n=[t,...e];return s&&n.length>s?n.slice(0,-1):n}var Pe=Symbol();function tt(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Pe?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function st(e,t){return typeof e=="function"?e(...t):!!e}function ts(e,t,s){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),n||(n=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),e}var $=(()=>{let e=()=>Bt;return{isServer(){return e()},setIsServer(t){e=t}}})();function Se(){let e,t;const s=new Promise((i,r)=>{e=i,t=r});s.status="pending",s.catch(()=>{});function n(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},s.reject=i=>{n({status:"rejected",reason:i}),t(i)},s}var ss=$t;function ns(){let e=[],t=0,s=a=>{a()},n=a=>{a()},i=ss;const r=a=>{t?e.push(a):i(()=>{s(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{n(()=>{a.forEach(l=>{s(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{r(()=>{a(...l)})},schedule:r,setNotifyFunction:a=>{s=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{i=a}}}var x=ns(),is=class extends B{#e=!0;#t;#s;constructor(){super(),this.#s=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#s=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#e}},te=new is;function rs(e){return Math.min(1e3*2**e,3e4)}function nt(e){return(e??"online")==="online"?te.isOnline():!0}var be=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function it(e){let t=!1,s=0,n;const i=Se(),r=()=>i.status!=="pending",o=p=>{if(!r()){const S=new be(p);h(S),e.onCancel?.(S)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>Ie.isFocused()&&(e.networkMode==="always"||te.isOnline())&&e.canRun(),c=()=>nt(e.networkMode)&&e.canRun(),f=p=>{r()||(n?.(),i.resolve(p))},h=p=>{r()||(n?.(),i.reject(p))},d=()=>new Promise(p=>{n=S=>{(r()||u())&&p(S)},e.onPause?.()}).then(()=>{n=void 0,r()||e.onContinue?.()}),g=()=>{if(r())return;let p;const S=s===0?e.initialPromise:void 0;try{p=S??e.fn()}catch(y){p=Promise.reject(y)}Promise.resolve(p).then(f).catch(y=>{if(r())return;const m=e.retry??($.isServer()?0:3),b=e.retryDelay??rs,_=typeof b=="function"?b(s,y):b,w=m===!0||typeof m=="number"&&s<m||typeof m=="function"&&m(s,y);if(t||!w){h(y);return}s++,e.onFail?.(s,y),Zt(_).then(()=>u()?void 0:d()).then(()=>{t?h(y):g()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n?.(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?g():d().then(g),i)}}var rt=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pe(this.gcTime)&&(this.#e=L.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(L.clearTimeout(this.#e),this.#e=void 0)}};function os(e){return{onFetch:(t,s)=>{const n=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,r=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let c=!1;const f=g=>{ts(g,()=>t.signal,()=>c=!0)},h=tt(t.options,t.fetchOptions),d=async(g,p,S)=>{if(c)return Promise.reject(t.signal.reason);if(p==null&&g.pages.length)return Promise.resolve(g);const m=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:p,direction:S?"backward":"forward",meta:t.options.meta};return f(R),R})(),b=await h(m),{maxPages:_}=t.options,w=S?es:Yt;return{pages:w(g.pages,b,_),pageParams:w(g.pageParams,p,_)}};if(i&&r.length){const g=i==="backward",p=g?ot:we,S={pages:r,pageParams:o},y=p(n,S);a=await d(S,y,g)}else{const g=e??r.length;do{const p=l===0?o[0]??n.initialPageParam:we(n,a);if(l>0&&p==null)break;a=await d(a,p),l++}while(l<g)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=u}}}function we(e,{pages:t,pageParams:s}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,s[n],s):void 0}function ot(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}function as(e,t){return t?we(e,t)!=null:!1}function ls(e,t){return!t||!e.getPreviousPageParam?!1:ot(e,t)!=null}var us=class extends rt{#e;#t;#s;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ve(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Ve(this.options);t.data!==void 0&&(this.setState(Le(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const s=ve(this.state.data,e,this.options);return this.#l({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(E).catch(E):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>A(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Pe||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>z(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Ye(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#c()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(u=>u.options.queryFn);l&&this.setOptions(l.options)}const s=new AbortController,n=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},i=()=>{const l=tt(this.options,t),c=(()=>{const f={client:this.#r,queryKey:this.queryKey,meta:this.meta};return n(f),f})();return this.#o=!1,this.options.persister?this.options.persister(l,c,this):l(c)},o=(()=>{const l={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return n(l),l})();(this.#e==="infinite"?os(this.options.pages):this.options.behavior)?.onFetch(o,this),this.#s=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#l({type:"fetch",meta:o.fetchOptions?.meta}),this.#i=it({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:l=>{l instanceof be&&l.revert&&this.setState({...this.#s,fetchStatus:"idle"}),s.abort()},onFail:(l,u)=>{this.#l({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const l=await this.#i.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#n.config.onSuccess?.(l,this),this.#n.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof be){if(l.silent)return this.#i.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#l({type:"error",error:l}),this.#n.config.onError?.(l,this),this.#n.config.onSettled?.(this.state.data,l,this),l}finally{this.scheduleGc()}}#l(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...at(s.data,this.options),fetchMeta:e.meta??null};case"success":const n={...s,...Le(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=e.manual?n:void 0,n;case"error":const i=e.error;return{...s,error:i,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),x.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function at(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nt(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Le(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ve(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,n=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var lt=class extends B{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#a=Se(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#s=void 0;#n=void 0;#r;#i;#a;#o;#c;#l;#g;#h;#f;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Qe(this.#t,this.options)?this.#d():this.updateResult(),this.#S())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _e(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _e(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof A(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),t._defaulted&&!me(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const n=this.hasListeners();n&&He(this.#t,s,this.options,t)&&this.#d(),this.updateResult(),n&&(this.#t!==s||A(this.options.enabled,this.#t)!==A(t.enabled,this.#t)||z(this.options.staleTime,this.#t)!==z(t.staleTime,this.#t))&&this.#m();const i=this.#y();n&&(this.#t!==s||A(this.options.enabled,this.#t)!==A(t.enabled,this.#t)||i!==this.#u)&&this.#v(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),s=this.createResult(t,e);return hs(this,s)&&(this.#n=s,this.#i=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(s,n)=>(this.trackProp(n),t?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),s=this.#e.getQueryCache().build(this.#e,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#d(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(E)),t}#m(){this.#b();const e=z(this.options.staleTime,this.#t);if($.isServer()||this.#n.isStale||!pe(e))return;const s=Ye(this.#n.dataUpdatedAt,e)+1;this.#h=L.setTimeout(()=>{this.#n.isStale||this.updateResult()},s)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#u=e,!($.isServer()||A(this.options.enabled,this.#t)===!1||!pe(this.#u)||this.#u===0)&&(this.#f=L.setInterval(()=>{(this.options.refetchIntervalInBackground||Ie.isFocused())&&this.#d()},this.#u))}#S(){this.#m(),this.#v(this.#y())}#b(){this.#h!==void 0&&(L.clearTimeout(this.#h),this.#h=void 0)}#w(){this.#f!==void 0&&(L.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const s=this.#t,n=this.options,i=this.#n,r=this.#r,o=this.#i,l=e!==s?e.state:this.#s,{state:u}=e;let c={...u},f=!1,h;if(t._optimisticResults){const C=this.hasListeners(),I=!C&&Qe(e,t),O=C&&He(e,s,t,n);(I||O)&&(c={...c,...at(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:d,errorUpdatedAt:g,status:p}=c;h=c.data;let S=!1;if(t.placeholderData!==void 0&&h===void 0&&p==="pending"){let C;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(C=i.data,S=!0):C=typeof t.placeholderData=="function"?t.placeholderData(this.#g?.state.data,this.#g):t.placeholderData,C!==void 0&&(p="success",h=ve(i?.data,C,t),f=!0)}if(t.select&&h!==void 0&&!S)if(i&&h===r?.data&&t.select===this.#c)h=this.#l;else try{this.#c=t.select,h=t.select(h),h=ve(i?.data,h,t),this.#l=h,this.#o=null}catch(C){this.#o=C}this.#o&&(d=this.#o,h=this.#l,g=Date.now(),p="error");const y=c.fetchStatus==="fetching",m=p==="pending",b=p==="error",_=m&&y,w=h!==void 0,v={status:p,fetchStatus:c.fetchStatus,isPending:m,isSuccess:p==="success",isError:b,isInitialLoading:_,isLoading:_,data:h,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:g,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:c.dataUpdateCount>l.dataUpdateCount||c.errorUpdateCount>l.errorUpdateCount,isFetching:y,isRefetching:y&&!m,isLoadingError:b&&!w,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:b&&w,isStale:Ee(e,t),refetch:this.refetch,promise:this.#a,isEnabled:A(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const C=v.data!==void 0,I=v.status==="error"&&!C,O=P=>{I?P.reject(v.error):C&&P.resolve(v.data)},F=()=>{const P=this.#a=v.promise=Se();O(P)},D=this.#a;switch(D.status){case"pending":e.queryHash===s.queryHash&&O(D);break;case"fulfilled":(I||v.data!==D.value)&&F();break;case"rejected":(!I||v.error!==D.reason)&&F();break}}return v}updateResult(){const e=this.#n,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#g=this.#t),me(t,e))return;this.#n=t;const s=()=>{if(!e)return!0;const{notifyOnChangeProps:n}=this.options,i=typeof n=="function"?n():n;if(i==="all"||!i&&!this.#p.size)return!0;const r=new Set(i??this.#p);return this.options.throwOnError&&r.add("error"),Object.keys(this.#n).some(o=>{const a=o;return this.#n[a]!==e[a]&&r.has(a)})};this.#C({listeners:s()})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#s=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#S()}#C(e){x.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function cs(e,t){return A(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&A(t.retryOnMount,e)===!1)}function Qe(e,t){return cs(e,t)||e.state.data!==void 0&&_e(e,t,t.refetchOnMount)}function _e(e,t,s){if(A(t.enabled,e)!==!1&&z(t.staleTime,e)!=="static"){const n=typeof s=="function"?s(e):s;return n==="always"||n!==!1&&Ee(e,t)}return!1}function He(e,t,s,n){return(e!==t||A(n.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Ee(e,s)}function Ee(e,t){return A(t.enabled,e)!==!1&&e.isStaleByTime(z(t.staleTime,e))}function hs(e,t){return!me(e.getCurrentResult(),t)}var fs=class extends lt{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:r,isError:o,isRefetchError:a}=n,l=s.fetchMeta?.fetchMore?.direction,u=o&&l==="forward",c=i&&l==="forward",f=o&&l==="backward",h=i&&l==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:as(t,s.data),hasPreviousPage:ls(t,s.data),isFetchNextPageError:u,isFetchingNextPage:c,isFetchPreviousPageError:f,isFetchingPreviousPage:h,isRefetchError:a&&!u&&!f,isRefetching:r&&!c&&!h}}},ds=class extends rt{#e;#t;#s;#n;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#s=e.mutationCache,this.#t=[],this.state=e.state||gs(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=it({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(r,o)=>{this.#r({type:"failed",failureCount:r,error:o})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const n=this.state.status==="pending",i=!this.#n.canStart();try{if(n)t();else{this.#r({type:"pending",variables:e,isPaused:i}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,s);const o=await this.options.onMutate?.(e,s);o!==this.state.context&&this.#r({type:"pending",context:o,variables:e,isPaused:i})}const r=await this.#n.start();return await this.#s.config.onSuccess?.(r,e,this.state.context,this,s),await this.options.onSuccess?.(r,e,this.state.context,s),await this.#s.config.onSettled?.(r,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(r,null,e,this.state.context,s),this.#r({type:"success",data:r}),r}catch(r){try{await this.#s.config.onError?.(r,e,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onError?.(r,e,this.state.context,s)}catch(o){Promise.reject(o)}try{await this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,r,e,this.state.context,s)}catch(o){Promise.reject(o)}throw this.#r({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#r(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),x.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}};function gs(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ps=class extends B{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#s=0}#e;#t;#s;build(e,t,s){const n=new ds({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:s});return this.add(n),n}add(e){this.#e.add(e);const t=X(e);if(typeof t=="string"){const s=this.#t.get(t);s?s.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=X(e);if(typeof t=="string"){const s=this.#t.get(t);if(s)if(s.length>1){const n=s.indexOf(e);n!==-1&&s.splice(n,1)}else s[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=X(e);if(typeof t=="string"){const n=this.#t.get(t)?.find(i=>i.state.status==="pending");return!n||n===e}else return!0}runNext(e){const t=X(e);return typeof t=="string"?this.#t.get(t)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){x.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(s=>je(t,s))}findAll(e={}){return this.getAll().filter(t=>je(e,t))}notify(e){x.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return x.batch(()=>Promise.all(e.map(t=>t.continue().catch(E))))}};function X(e){return e.options.scope?.id}var ms=class extends B{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,s){const n=t.queryKey,i=t.queryHash??Fe(n,t);let r=this.get(i);return r||(r=new us({client:e,queryKey:n,queryHash:i,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(n)}),this.add(r)),r}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){x.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>Te(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>Te(e,s)):t}notify(e){x.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){x.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){x.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Xi=class{#e;#t;#s;#n;#r;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new ms,this.#t=e.mutationCache||new ps,this.#s=e.defaultOptions||{},this.#n=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Ie.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=te.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#e.build(this,t),n=s.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(z(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:s})=>{const n=s.data;return[t,n]})}setQueryData(e,t,s){const n=this.defaultQueryOptions({queryKey:e}),r=this.#e.get(n.queryHash)?.state.data,o=Jt(t,r);if(o!==void 0)return this.#e.build(this,n).setData(o,{...s,manual:!0})}setQueriesData(e,t,s){return x.batch(()=>this.#e.findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;x.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#e;return x.batch(()=>(s.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},n=x.batch(()=>this.#e.findAll(e).map(i=>i.cancel(s)));return Promise.all(n).then(E).catch(E)}invalidateQueries(e,t={}){return x.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},n=x.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let r=i.fetch(void 0,s);return s.throwOnError||(r=r.catch(E)),i.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(n).then(E)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#e.build(this,t);return s.isStaleByTime(z(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(E).catch(E)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(E).catch(E)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return te.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#s}setDefaultOptions(e){this.#s=e}setQueryDefaults(e,t){this.#n.set(G(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],s={};return t.forEach(n=>{N(e,n.queryKey)&&Object.assign(s,n.defaultOptions)}),s}setMutationDefaults(e,t){this.#r.set(G(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],s={};return t.forEach(n=>{N(e,n.mutationKey)&&Object.assign(s,n.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#s.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Fe(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===Pe&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#s.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},ut=M.createContext(void 0),ys=e=>{const t=M.useContext(ut);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Zi=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Ht.jsx(ut.Provider,{value:e,children:t})),ct=M.createContext(!1),vs=()=>M.useContext(ct);ct.Provider;function Ss(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var bs=M.createContext(Ss()),ws=()=>M.useContext(bs),_s=(e,t,s)=>{const n=s?.state.error&&typeof e.throwOnError=="function"?st(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Cs=e=>{M.useEffect(()=>{e.clearReset()},[e])},Rs=({result:e,errorResetBoundary:t,throwOnError:s,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||st(s,[e.error,n])),Ms=e=>{if(e.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>s(n(...i)):s(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Os=(e,t)=>e.isLoading&&e.isFetching&&!t,xs=(e,t)=>e?.suspense&&t.isPending,Ne=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function ht(e,t,s){const n=vs(),i=ws(),r=ys(),o=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const a=r.getQueryCache().get(o.queryHash),l=e.subscribed!==!1;o._optimisticResults=n?"isRestoring":l?"optimistic":void 0,Ms(o),_s(o,i,a),Cs(i);const u=!r.getQueryCache().get(o.queryHash),[c]=M.useState(()=>new t(r,o)),f=c.getOptimisticResult(o),h=!n&&l;if(M.useSyncExternalStore(M.useCallback(d=>{const g=h?c.subscribe(x.batchCalls(d)):E;return c.updateResult(),g},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),M.useEffect(()=>{c.setOptions(o)},[o,c]),xs(o,f))throw Ne(o,c,i);if(Rs({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw f.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!$.isServer()&&Os(f,n)&&(u?Ne(o,c,i):a?.promise)?.catch(E).finally(()=>{c.updateResult()}),o.notifyOnChangeProps?f:c.trackResult(f)}function Yi(e,t){return ht(e,lt)}function er(e,t){return ht(e,fs)}function Is(e,t,s){const n=new Array(e);return new Proxy(n,{get(i,r,o){if(typeof r=="string"){const a=r.charCodeAt(0);if(a>=48&&a<=57){const l=+r;if(Number.isInteger(l)&&l>=0&&l<e){let u=i[l];if(!u){const c=t[l*2];u=i[l]={index:l,key:s(l),start:c,size:t[l*2+1],end:c+t[l*2+1],lane:0}}return u}}if(r==="length")return e}return Reflect.get(i,r,o)}})}function H(e,t,s){let n=s.initialDeps??[],i,r=!0;function o(){const a=e();return(a.length!==n.length||a.some((u,c)=>n[c]!==u))&&(n=a,i=t(...a),s?.onChange&&!(r&&s.skipInitialOnChange)&&s.onChange(i),r=!1),i}return o.updateDeps=a=>{n=a},o}function qe(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Fs=(e,t)=>Math.abs(e-t)<1.01,Ps=(e,t,s)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),s)}};let U;const de=()=>{if(U!==void 0)return U;if(typeof navigator>"u")return U=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return U=!0;const e=navigator.maxTouchPoints;return U=navigator.platform==="MacIntel"&&e!==void 0&&e>0},Ke=e=>{const{offsetWidth:t,offsetHeight:s}=e;return{width:t,height:s}},Es=e=>e,As=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,i=new Array(n);for(let r=0;r<n;r++)i[r]=t+r;return i},Ds=(e,t)=>{const s=e.scrollElement;if(!s)return;const n=e.targetWindow;if(!n)return;const i=o=>{const{width:a,height:l}=o;t({width:Math.round(a),height:Math.round(l)})};if(i(Ke(s)),!n.ResizeObserver)return()=>{};const r=new n.ResizeObserver(o=>{const a=()=>{const l=o[0];if(l?.borderBoxSize){const u=l.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(Ke(s))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return r.observe(s,{box:"border-box"}),()=>{r.unobserve(s)}},se={passive:!0},Ts=typeof window>"u"?!0:"onscrollend"in window,js=(e,t,s)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const r=e.options.useScrollendEvent&&Ts;let o=0;const a=r?null:Ps(i,()=>t(o,!1),e.options.isScrollingResetDelay),l=f=>()=>{o=s(n),a?.(),t(o,f)},u=l(!0),c=l(!1);return n.addEventListener("scroll",u,se),r&&n.addEventListener("scrollend",c,se),()=>{n.removeEventListener("scroll",u),r&&n.removeEventListener("scrollend",c)}},zs=(e,t)=>js(e,t,s=>{const{horizontal:n,isRtl:i}=e.options;return n?s.scrollLeft*(i&&-1||1):s.scrollTop}),ks=(e,t,s)=>{if(s.options.useCachedMeasurements){const n=s.indexFromElement(e),i=s.options.getItemKey(n);return s.itemSizeCache.get(i)??s.options.estimateSize(n)}if(t?.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[s.options.horizontal?"inlineSize":"blockSize"])}if(!t){const n=s.indexFromElement(e),i=s.options.getItemKey(n),r=s.itemSizeCache.get(i);if(r!==void 0)return r}return e[s.options.horizontal?"offsetWidth":"offsetHeight"]},Ls=(e,{adjustments:t=0,behavior:s},n)=>{var i,r;(r=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||r.call(i,{[n.options.horizontal?"left":"top"]:e+t,behavior:s})},Vs=Ls;class Qs{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var s,n,i;return((i=(n=(s=this.targetWindow)==null?void 0:s.performance)==null?void 0:n.now)==null?void 0:i.call(n))??Date.now()},this.observer=(()=>{let s=null;const n=()=>s||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:s=new this.targetWindow.ResizeObserver(i=>{i.forEach(r=>{const o=()=>{const a=r.target,l=this.indexFromElement(a);if(!a.isConnected){this.observer.unobserve(a);for(const[u,c]of this.elementsCache)if(c===a){this.elementsCache.delete(u);break}return}this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(a,r,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var i;(i=n())==null||i.disconnect(),s=null},observe:i=>{var r;return(r=n())==null?void 0:r.observe(i,{box:"border-box"})},unobserve:i=>{var r;return(r=n())==null?void 0:r.unobserve(i)}}})(),this.range=null,this.setOptions=s=>{var n,i;const r={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Es,rangeExtractor:As,onChange:()=>{},measureElement:ks,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const h in s){const d=s[h];d!==void 0&&(r[h]=d)}const o=this.options;let a=null,l=null,u=!1;if(o!==void 0&&o.enabled&&r.enabled&&r.anchorTo==="end"&&this.scrollElement!==null){const h=o.count,d=r.count,g=this.getMeasurements(),p=h>0?((n=g[0])==null?void 0:n.key)??o.getItemKey(0):null,S=h>0?((i=g[h-1])==null?void 0:i.key)??o.getItemKey(h-1):null;if(d!==h||h>0&&d>0&&(r.getItemKey(0)!==p||r.getItemKey(d-1)!==S)){u=!0;const b=h>0?this.getVirtualItemForOffset(this.getScrollOffset())??g[0]:null;b&&(a=[b.key,this.getScrollOffset()-b.start]);const _=r.followOnAppend===!0?"auto":r.followOnAppend||null;_&&d>h&&this.isAtEnd(o.scrollEndThreshold)&&(h===0||r.getItemKey(d-1)!==S)&&(l=_)}}this.options=r,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let c=!1,f=0;if(a&&this.scrollOffset!==null){const[h,d]=a,g=this.getMeasurements(),{count:p,getItemKey:S}=this.options;let y=0;for(;y<p&&S(y)!==h;)y++;if(y<p){const m=g[y];if(m){const b=Math.max(0,m.start+d);b!==this.scrollOffset&&(f=b-this.scrollOffset,this.scrollOffset=b,c=!0)}}}(c||l)&&(this.pendingScrollAnchor=[c?a[0]:null,c?a[1]:0,l,f])},this.notify=s=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,s)},this.maybeNotify=H(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),s=>{this.notify(s)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(s=>s()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var s;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}if(this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((s=this.scrollElement)==null?void 0:s.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,o)=>{if(o&&this._intendedScrollOffset===null&&r===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(r-this._intendedScrollOffset)<1.5&&(r=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const a=this.getScrollOffset();this.scrollDirection=o?a===r?this.scrollDirection:a<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=o,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const r=this.scrollElement,o=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},a=()=>{this._iosTouching=!1,!(!de()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};r.addEventListener("touchstart",o,se),r.addEventListener("touchend",a,se),this.unsubs.push(()=>{r.removeEventListener("touchstart",o),r.removeEventListener("touchend",a),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const i=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,i&&this.scrollElement&&this.options.enabled){const[r,o,a,l]=i;r!==null&&!a&&(de()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?l!==0&&(this._iosDeferredAdjustment+=l):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),a&&this.scrollToEnd({behavior:a})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const s=this.getScrollOffset(),n=this.getMaxScrollOffset();if(s<0||s>n)return;if(this._iosDeferredAdjustment<0&&s>=n-1){this._iosDeferredAdjustment=0;return}const i=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(s,{adjustments:this.scrollAdjustments+=i,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=H(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(s,n,i,r,o,a,l,u)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:s,paddingStart:n,scrollMargin:i,getItemKey:r,enabled:o,lanes:a,laneAssignmentMode:l,gap:u}),{key:!1}),this.getMeasurements=H(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:s,paddingStart:n,scrollMargin:i,getItemKey:r,enabled:o,lanes:a,laneAssignmentMode:l,gap:u},c)=>{const f=this.itemSizeCache;if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>s)for(const y of this.laneAssignments.keys())y>=s&&this.laneAssignments.delete(y);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(y=>{this.itemSizeCache.set(y.key,y.size)}));const h=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===s&&(this.lanesSettling=!1),a===1){const y=s*2;let m=this._flatMeasurements;if(!m||m.length<y){const w=new Float64Array(y);m&&h>0&&w.set(m.subarray(0,h*2)),m=w,this._flatMeasurements=m}let b;if(h===0)b=n+i;else{const w=h-1;b=m[w*2]+m[w*2+1]+u}for(let w=h;w<s;w++){const R=r(w),v=f.get(R),C=typeof v=="number"?v:this.options.estimateSize(w);m[w*2]=b,m[w*2+1]=C,b+=C+u}const _=Is(s,m,r);return this.measurementsCache=_,_}const d=this.measurementsCache.slice(0,h),g=new Array(a).fill(void 0),p=new Float64Array(a);let S=0;for(let y=0;y<h;y++){const m=d[y];m&&(g[m.lane]===void 0&&S++,g[m.lane]=y,p[m.lane]=m.end)}for(let y=h;y<s;y++){const m=r(y),b=this.laneAssignments.get(y);let _,w;const R=l==="estimate"||f.has(m);if(b!==void 0&&this.options.lanes>1){_=b;const O=g[_],F=O!==void 0?d[O]:void 0;w=F?F.end+u:n+i}else if(S===a){let O=0,F=p[0],D=g[0];for(let P=1;P<a;P++){const fe=p[P];(fe<F||fe===F&&g[P]<D)&&(O=P,F=fe,D=g[P])}_=O,w=F+u,R&&this.laneAssignments.set(y,_)}else _=y%this.options.lanes,w=n+i,R&&this.laneAssignments.set(y,_);const v=f.get(m),C=typeof v=="number"?v:this.options.estimateSize(y),I=w+C;d[y]={index:y,start:w,size:C,end:I,key:m,lane:_},g[_]===void 0&&S++,g[_]=y,p[_]=I}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=H(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(s,n,i,r)=>s.length===0||n===0?(this.range=null,null):(this.range=Ns(s,n,i,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=H(()=>{let s=null,n=null;const i=this.calculateRange();return i&&(s=i.startIndex,n=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,s,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,s,n]},(s,n,i,r,o)=>r===null||o===null?[]:s({startIndex:r,endIndex:o,overscan:n,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=s=>{const n=this.options.indexAttribute,i=s.getAttribute(n);return i?parseInt(i,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=s=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(i!==void 0&&this.range){const r=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),o=Math.max(0,i-r),a=Math.min(this.options.count-1,i+r);return s>=o&&s<=a}return!0},this.measureElement=s=>{if(!s){this.elementsCache.forEach((o,a)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(a))});return}const n=this.indexFromElement(s),i=this.options.getItemKey(n),r=this.elementsCache.get(i);r!==s&&(r&&this.observer.unobserve(r),this.observer.observe(s),this.elementsCache.set(i,s)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(s,void 0,this))},this.resizeItem=(s,n)=>{var i,r;if(s<0||s>=this.options.count)return;let o,a,l;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)l=this.options.getItemKey(s),a=u[s*2],o=u[s*2+1];else{const h=this.measurementsCache[s];if(!h)return;l=h.key,a=h.start,o=h.size}const c=this.itemSizeCache.get(l)??o,f=n-c;if(f!==0){const h=this.options.anchorTo==="end"&&((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,d=h?this.getTotalSize():0,g=this.getScrollOffset()+this.scrollAdjustments,S=!this.itemSizeCache.has(l)?a<g:a+c<=g&&this.scrollDirection!=="backward",y=((r=this.scrollState)==null?void 0:r.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[s]??{index:s,key:l,start:a,size:o,end:a+o,lane:0},f,this):S);(this.pendingMin===null||s<this.pendingMin)&&(this.pendingMin=s),this.itemSizeCache.set(l,n),this.itemSizeCacheVersion++,h?this.applyScrollAdjustment(this.getTotalSize()-d):y&&this.applyScrollAdjustment(f),this.notify(!1)}},this.getVirtualItems=H(()=>[this.getVirtualIndexes(),this.getMeasurements()],(s,n)=>{const i=[];for(let r=0,o=s.length;r<o;r++){const a=s[r],l=n[a];i.push(l)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=s=>{const n=this.getMeasurements();if(n.length===0)return;const i=this._flatMeasurements,r=this.options.lanes===1&&i!=null,o=ft(0,n.length-1,r?a=>i[a*2]:a=>qe(n[a]).start,s);return qe(n[o])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const s=this.scrollElement.document.documentElement;return this.options.horizontal?s.scrollWidth-this.scrollElement.innerWidth:s.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(s=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=s,this.getOffsetForAlignment=(s,n,i=0)=>{if(!this.scrollElement)return 0;const r=this.getSize(),o=this.getScrollOffset();n==="auto"&&(n=s>=o+r?"end":"start"),n==="center"?s+=(i-r)/2:n==="end"&&(s-=r);const a=this.getMaxScrollOffset();return Math.max(Math.min(a,s),0)},this.getOffsetForIndex=(s,n="auto")=>{s=Math.max(0,Math.min(s,this.options.count-1));const i=this.getSize(),r=this.getScrollOffset(),o=this.measurementsCache[s];if(!o)return;if(n==="auto")if(o.end>=r+i-this.options.scrollPaddingEnd)n="end";else if(o.start<=r+this.options.scrollPaddingStart)n="start";else return[r,n];if(n==="end"&&s===this.options.count-1)return[this.getMaxScrollOffset(),n];const a=n==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,n,o.size),n]},this.scrollToOffset=(s,{align:n="start",behavior:i="auto"}={})=>{this._iosDeferredAdjustment=0;const r=this.getOffsetForAlignment(s,n),o=this.now();this.scrollState={index:null,align:n,behavior:i,startedAt:o,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(s,{align:n="auto",behavior:i="auto"}={})=>{this._iosDeferredAdjustment=0,s=Math.max(0,Math.min(s,this.options.count-1));const r=this.getOffsetForIndex(s,n);if(!r)return;const[o,a]=r,l=this.now();this.scrollState={index:s,align:a,behavior:i,startedAt:l,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(s,{behavior:n="auto"}={})=>{const i=this.getScrollOffset()+s,r=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:r,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:s="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:s});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:s})},this.getTotalSize=()=>{var s;const n=this.getMeasurements();let i;if(n.length===0)i=this.options.paddingStart;else if(this.options.lanes===1){const r=n.length-1,o=this._flatMeasurements;o!=null?i=o[r*2]+o[r*2+1]:i=((s=n[r])==null?void 0:s.end)??0}else{const r=Array(this.options.lanes).fill(null);let o=n.length-1;for(;o>=0&&r.some(a=>a===null);){const a=n[o];r[a.lane]===null&&(r[a.lane]=a.end),o--}i=Math.max(...r.filter(a=>a!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const s=[];if(this.itemSizeCache.size===0)return s;const n=this.getMeasurements();for(const i of n)i&&this.itemSizeCache.has(i.key)&&s.push({index:i.index,key:i.key,start:i.start,size:i.size,end:i.end,lane:i.lane});return s},this._scrollToOffset=(s,{adjustments:n,behavior:i})=>{this._intendedScrollOffset=s+(n??0),this.options.scrollToFn(s,{behavior:i,adjustments:n},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,s){t!==0&&(de()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=t:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:s}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=n?n[0]:this.scrollState.lastTargetOffset,r=1,o=i!==this.scrollState.lastTargetOffset;if(!o&&Fs(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=r){this.getScrollOffset()!==i&&this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,o){const a=this.getSize()||600,l=Math.abs(i-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&l>a;this.scrollState.lastTargetOffset=i,u||(this.scrollState.behavior="auto"),this._scrollToOffset(i,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const ft=(e,t,s,n)=>{for(;e<=t;){const i=(e+t)/2|0,r=s(i);if(r<n)e=i+1;else if(r>n)t=i-1;else return i}return e>0?e-1:0};function Hs(e,t,s){let n=0;for(;n<=t;){const i=(n+t)/2|0,r=e[i*2];if(r<s)n=i+1;else if(r>s)t=i-1;else return i}return n>0?n-1:0}function Ns(e,t,s,n,i){const r=e.length-1;if(e.length<=n)return{startIndex:0,endIndex:r};if(n===1&&i!==null){const u=Hs(i,r,s);let c=u;const f=s+t;for(;c<r&&i[c*2]+i[c*2+1]<f;)c++;return{startIndex:u,endIndex:c}}let a=ft(0,r,u=>e[u].start,s),l=a;if(n===1)for(;l<r&&e[l].end<s+t;)l++;else if(n>1){const u=Array(n).fill(0);for(;l<r&&u.some(f=>f<s+t);){const f=e[l];u[f.lane]=f.end,l++}const c=Array(n).fill(s+t);for(;a>=0&&c.some(f=>f>=s);){const f=e[a];c[f.lane]=f.start,a--}a=Math.max(0,a-a%n),l=Math.min(r,l+(n-1-l%n))}return{startIndex:a,endIndex:l}}const ge=typeof document<"u"?M.useLayoutEffect:M.useEffect;function qs({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:s="transform",...n}){const i=M.useReducer(c=>c+1,0)[1],r=M.useRef({enabled:t,mode:s,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});r.current.enabled=t,r.current.mode=s;const o=c=>{const f=r.current;if(!f.enabled||!f.container)return;const h=c.getTotalSize();if(h!==f.lastSize){f.lastSize=h;const d=c.options.horizontal?"width":"height";f.container.style[d]=`${h}px`}},a=c=>{const f=r.current;if(!f.enabled||!f.container)return;o(c);const h=!!c.options.horizontal,d=f.mode==="transform",g=h?"left":"top",p=c.options.scrollMargin,S=c.getVirtualItems();for(const y of S){const m=y.start-p,b=c.elementsCache.get(y.key);b&&f.lastPositions.get(b)!==m&&(f.lastPositions.set(b,m),d?b.style.transform=h?`translate3d(${m}px, 0, 0)`:`translate3d(0, ${m}px, 0)`:b.style[g]=`${m}px`)}},l={...n,onChange:(c,f)=>{var h;const d=r.current;let g=!0;if(d.enabled){a(c);const p=c.range,S=d.prevRange;g=!S||S.isScrolling!==c.isScrolling||S.startIndex!==p?.startIndex||S.endIndex!==p?.endIndex,g&&(d.prevRange=p?{startIndex:p.startIndex,endIndex:p.endIndex,isScrolling:c.isScrolling}:null)}g&&(e&&f?Nt.flushSync(i):i()),(h=n.onChange)==null||h.call(n,c,f)}},[u]=M.useState(()=>{const c=new Qs(l);return Object.assign(c,{containerRef:f=>{const h=r.current;if(h.container=f,h.lastSize=null,f&&h.enabled){const d=c.getTotalSize();h.lastSize=d;const g=c.options.horizontal?"width":"height";f.style[g]=`${d}px`}}})});return u.setOptions(l),ge(()=>u._didMount(),[]),ge(()=>(o(u),u._willUpdate())),ge(()=>{a(u)}),u}function tr(e){return qs({observeElementRect:Ds,observeElementOffset:zs,scrollToFn:Vs,...e})}function Ks(e){return Us(e)||typeof e=="function"||Ws(e)}function Us(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Ws(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Z(e,t){return e==null?null:Ks(e)?qt.createElement(e,t):e}function Gs(e){if("cell"in e&&e.cell){const t=e.cell,s=t.column.columnDef,n=t,i=s;return n.getIsAggregated?.()?Z(i.aggregatedCell??s.cell,t.getContext()):n.getIsPlaceholder?.()?null:Z(s.cell,t.getContext())}return"header"in e&&e.header?Z(e.header.column.columnDef.header,e.header.getContext()):"footer"in e&&e.footer?Z(e.footer.column.columnDef.footer,e.footer.getContext()):null}function $s({update:e,notify:t,unwatched:s}){return{link:n,unlink:i,propagate:r,checkDirty:o,shallowPropagate:a};function n(u,c,f){const h=c.depsTail;if(h!==void 0&&h.dep===u)return;const d=h!==void 0?h.nextDep:c.deps;if(d!==void 0&&d.dep===u){d.version=f,c.depsTail=d;return}const g=u.subsTail;if(g!==void 0&&g.version===f&&g.sub===c)return;const p=c.depsTail=u.subsTail={version:f,dep:u,sub:c,prevDep:h,nextDep:d,prevSub:g,nextSub:void 0};d!==void 0&&(d.prevDep=p),h!==void 0?h.nextDep=p:c.deps=p,g!==void 0?g.nextSub=p:u.subs=p}function i(u,c=u.sub){const f=u.dep,h=u.prevDep,d=u.nextDep,g=u.nextSub,p=u.prevSub;return d!==void 0?d.prevDep=h:c.depsTail=h,h!==void 0?h.nextDep=d:c.deps=d,g!==void 0?g.prevSub=p:f.subsTail=p,p!==void 0?p.nextSub=g:(f.subs=g)===void 0&&s(f),d}function r(u){let c=u.nextSub,f;e:do{const h=u.sub;let d=h.flags;if(d&60?d&12?d&4?!(d&48)&&l(u,h)?(h.flags=d|40,d&=1):d=0:h.flags=d&-9|32:d=0:h.flags=d|32,d&2&&t(h),d&1){const g=h.subs;if(g!==void 0){const p=(u=g).nextSub;p!==void 0&&(f={value:c,prev:f},c=p);continue}}if((u=c)!==void 0){c=u.nextSub;continue}for(;f!==void 0;)if(u=f.value,f=f.prev,u!==void 0){c=u.nextSub;continue e}break}while(!0)}function o(u,c){let f,h=0,d=!1;e:do{const g=u.dep,p=g.flags;if(c.flags&16)d=!0;else if((p&17)===17){if(e(g)){const S=g.subs;S.nextSub!==void 0&&a(S),d=!0}}else if((p&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(f={value:u,prev:f}),u=g.deps,c=g,++h;continue}if(!d){const S=u.nextDep;if(S!==void 0){u=S;continue}}for(;h--;){const S=c.subs,y=S.nextSub!==void 0;if(y?(u=f.value,f=f.prev):u=S,d){if(e(c)){y&&a(S),c=u.sub;continue}d=!1}else c.flags&=-33;c=u.sub;const m=u.nextDep;if(m!==void 0){u=m;continue e}}return d}while(!0)}function a(u){do{const c=u.sub,f=c.flags;(f&48)===32&&(c.flags=f|16,(f&6)===2&&t(c))}while((u=u.nextSub)!==void 0)}function l(u,c){let f=c.depsTail;for(;f!==void 0;){if(f===u)return!0;f=f.prevDep}return!1}}function Bs(e,t,s){const n=typeof e=="object",i=n?e:void 0;return{next:(n?e.next:e)?.bind(i),error:(n?e.error:t)?.bind(i),complete:(n?e.complete:s)?.bind(i)}}const Ce=[];let ee=0;const{link:Ue,unlink:Js,propagate:Xs,checkDirty:dt,shallowPropagate:We}=$s({update(e){return e._update()},notify(e){Ce[Re++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,ne(e))}});let Y=0,Re=0,T,Me=0;function Zs(e){try{++Me,e()}finally{--Me||gt()}}function ne(e){const t=e.depsTail;let s=t!==void 0?t.nextDep:e.deps;for(;s!==void 0;)s=Js(s,e)}function gt(){if(!(Me>0)){for(;Y<Re;){const e=Ce[Y];Ce[Y++]=void 0,e.notify()}Y=0,Re=0}}function Ys(e,t){const s=typeof e=="function",n=e,i={_snapshot:s?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?0:1,get(){return T!==void 0&&Ue(i,T,ee),i._snapshot},subscribe(r){const o=Bs(r),a={current:!1},l=en(()=>{i.get(),a.current?o.next?.(i._snapshot):a.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(r){const o=T,a=t?.compare??Object.is;if(s)T=i,++ee,i.depsTail=void 0;else if(r===void 0)return!1;s&&(i.flags=5);try{const l=i._snapshot,u=typeof r=="function"?r(l):r===void 0&&s?n(l):r;return l===void 0||!a(l,u)?(i._snapshot=u,!0):!1}finally{T=o,s&&(i.flags&=-5),ne(i)}}};return s?(i.flags=17,i.get=function(){const r=i.flags;if(r&16||r&32&&dt(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&We(o)}}else r&32&&(i.flags=r&-33);return T!==void 0&&Ue(i,T,ee),i._snapshot}):i.set=function(r){if(i._update(r)){const o=i.subs;o!==void 0&&(Xs(o),We(o),gt())}},i}function en(e){const t=()=>{const n=T;T=s,++ee,s.depsTail=void 0,s.flags=6;try{return e()}finally{T=n,s.flags&=-5,ne(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const n=this.flags;n&16||n&32&&dt(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,ne(this)}};return t(),s}function W(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[n,i]of e)if(!t.has(n)||!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const s=Ge(e);if(s.length!==Ge(t).length)return!1;for(let n=0;n<s.length;n++)if(!Object.prototype.hasOwnProperty.call(t,s[n])||!Object.is(e[s[n]],t[s[n]]))return!1;return!0}function Ge(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}function tn(e,t){return e===t}function pt(e,t=n=>n,s){const n=s?.compare??tn,i=M.useCallback(o=>{const{unsubscribe:a}=e.subscribe(o);return a},[e]),r=M.useCallback(()=>e.get(),[e]);return Kt.useSyncExternalStoreWithSelector(i,r,r,t,n)}function sn(e){const t=pt(e.source,e.selector,{compare:W});return typeof e.children=="function"?e.children(t):e.children}function nn(e){const t=e;return Object.defineProperty(e,"state",{get(){return e.get()}}),"set"in e&&(t.setState=e.set.bind(e)),t}function rn(e){const{createAtom:t,batch:s}=e,n=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw new Error("Feature not supported in current reactivity implementation")},unmount:()=>{throw new Error("Feature not supported in current reactivity implementation")},schedule:e.schedule??(i=>queueMicrotask(i)),batch:s,untrack:i=>i(),createReadonlyAtom:(i,r)=>{const o=r?.compare??Object.is;let a=!1,l;const u=()=>{const f=i();return(!a||!o(l,f))&&(l=f,a=!0),l},c=t(()=>(n.get(),u()),{compare:o});return{get:u,subscribe:c.subscribe.bind(c)}},createWritableAtom:(i,r)=>t(i,{compare:r?.compare}),commit:()=>{n.set(i=>i+1)}}}function on(e,t=Object.is){let s=!1,n;return{get:e.get,markCommitted:i=>{n=i,s=!0},subscribe:i=>e.subscribe(r=>{(!s||!t(n,r))&&i(r)})}}function an(){return rn({createAtom:Ys,batch:Zs})}function oe(e,t){return typeof e=="function"?e(t):e}function V(e){if(Array.isArray(e))return e.map(V);if(e&&typeof e=="object"){const t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;const s=t===null?k():{},n=Object.keys(e);for(let i=0;i<n.length;i++){const r=n[i];Object.defineProperty(s,r,{configurable:!0,enumerable:!0,value:V(e[r]),writable:!0})}return s}return e}function ln(e,t){const s=Object.keys(t),n=e;for(let i=0;i<s.length;i++){const r=s[i];!r.startsWith("_memo_")&&r!=="_cellsCache"&&(n[r]=t[r])}return e}function k(){return Object.create(null)}function ae(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function un(e,t){return s=>{(t.options.atoms?.[e]??t.baseAtoms[e]).set(n=>oe(s,n))}}function $e(e){if(typeof e!="object"||e===null)return!1;if(Array.isArray(e))return!0;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Be(e){return Reflect.ownKeys(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}const cn=3;function hn(e,t){return mt(e,t,cn)}function mt(e,t,s){if(Object.is(e,t))return!0;if(s<=0||!$e(e)||!$e(t)||(Array.isArray(e)||Array.isArray(t))&&(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length))return!1;const n=Be(e),i=Be(t);if(n.length!==i.length)return!1;const r=e,o=t;for(let a=0;a<n.length;a++){const l=n[a];if(!Object.prototype.propertyIsEnumerable.call(t,l)||!mt(r[l],o[l],s-1))return!1}return!0}function le(e,t,s,n=hn){const i=`on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`,r=e.options[i];r&&r(o=>{const a=oe(s,o);return n(o,a)?o:a})}function fn(e){return e instanceof Function}function dn(e,t){const s=[],n=i=>{i.forEach(r=>{s.push(r);const o=t(r);o.length&&n(o)})};return n(e),s}const gn=({fn:e,memoDeps:t,onAfterCompare:s,onAfterUpdate:n,onBeforeCompare:i,onBeforeUpdate:r})=>{let o=[],a;return u=>{i?.();const c=t?.(u);let f=!c||c.length!==o?.length;if(!f&&c){for(let h=0;h<c.length;h++)if(c[h]!==o[h]){f=!0;break}}return s?.(f),f&&(o=c,r?.(),a=e(...c??[]),n?.(a)),a}};function yt(e){let t=!1;return()=>{if(!t){t=!0;return}e()}}function ue({feature:e,fnName:t,objectId:s,onAfterUpdate:n,table:i,...r}){const o=()=>{if(!n)return;const{schedule:l,untrack:u}=i._reactivity;l(()=>u(()=>n()))};return gn({...r,...{onAfterUpdate:()=>{o()}}})}function vt(e,t="_"){const[s,n]=e.split(t);return{fnKey:n,fnName:`${s}.${n}`,parentName:s}}function q(e,t,s){for(const[n,{fn:i,memoDeps:r}]of Object.entries(s)){const{fnKey:o,fnName:a}=vt(n);t[o]=r?ue({memoDeps:r,fn:i,fnName:a,table:t,feature:e}):i}}function J(e,t,s,n){for(const[i,{fn:r,memoDeps:o}]of Object.entries(n)){const{fnKey:a,fnName:l}=vt(i);if(o){const u=`_memo_${a}`;t[a]=function(...c){if(!this[u]){const f=this;this[u]=ue({memoDeps:h=>o(f,h),fn:(...h)=>r(f,...h),fnName:l,objectId:f.id,table:s,feature:e})}return this[u](...c)}}else t[a]=function(...u){return r(this,...u)}}}function j(e,t,s,...n){return e[t]?.(...n)??s(e,...n)}function pn(e){return e.row.getValue(e.column.id)}function mn(e){return e.getValue()??e.table.options.renderFallbackValue}function yn(e){return{table:e.table,column:e.column,row:e.row,cell:e,getValue:()=>e.getValue(),renderValue:()=>e.renderValue()}}const vn={assignCellPrototype:(e,t)=>{J("coreCellsFeature",e,t,{cell_getValue:{fn:s=>pn(s)},cell_renderValue:{fn:s=>mn(s)},cell_getContext:{fn:s=>yn(s),memoDeps:s=>[s]}})}};function Sn(e){if(!e._headerPrototype){e._headerPrototype={table:e};const t=Object.values(e._features);for(let s=0;s<t.length;s++)t[s].assignHeaderPrototype?.(e._headerPrototype,e)}return e._headerPrototype}function St(e,t,s){const n=Sn(e),i=Object.create(n);i.colSpan=0,i.column=t,i.depth=s.depth,i.headerGroup=null,i.id=s.id??t.id,i.index=s.index,i.isPlaceholder=!!s.isPlaceholder,i.placeholderId=s.placeholderId,i.rowSpan=0,i.subHeaders=[];const r=e._headerInstanceInitFns;for(let o=0;o<r.length;o++)r[o](i);return i}function bn(){return{start:[],end:[]}}function Q(e){const t=e.table.atoms.columnVisibility?.get();if(!t)return!0;const s=e.columns;return s.length?s.some(n=>j(n,"getIsVisible",Q)):(ae(t,e.id)?t[e.id]:void 0)??!0}function wn(e){return e.getAllLeafColumns().filter(t=>j(t,"getIsVisible",Q))}function bt(e,t=1){let s=t;for(let n=0;n<e.length;n++){const i=e[n];j(i,"getIsVisible",Q)&&i.columns.length&&(s=Math.max(s,bt(i.columns,t+1)))}return s}function _n(e,t){return String(t)}function Cn(e,t,s,n){let i=e??"";return t&&(i=i?`${i}_${t}`:String(t)),s&&(i=i?`${i}_${s}`:s),n&&(i=i?`${i}_${n}`:n),i}function Rn(e,t){let s=0;for(let n=0;n<e.length;n++)e[n].column===t&&s++;return s}function wt(e,t,s,n,i,r){const o={depth:t,id:_n(n,t),headers:[]},a=[];for(let l=0;l<e.length;l++){if(!(l in e))continue;const u=e[l],c=a[a.length-1],f=u.column.depth===o.depth;let h,d=!1;if(f&&u.column.parent?h=u.column.parent:(h=u.column,d=!0),c&&c.column===h)c.subHeaders.push(u);else{const g=St(s,h,{id:Cn(n,t,h.id,u.id),isPlaceholder:d,placeholderId:d?String(Rn(a,h)):void 0,depth:t,index:a.length});g.subHeaders.push(u),a.push(g)}o.headers.push(u),u.headerGroup=o}for(let l=0;l<r.length;l++)r[l](o);i.push(o),t>0&&wt(a,t-1,s,n,i,r)}function _t(e){for(let t=0;t<e.length;t++){const s=e[t];if(!j(s.column,"getIsVisible",Q))continue;let n=0;if(s.subHeaders.length){_t(s.subHeaders);for(let i=0;i<s.subHeaders.length;i++){const r=s.subHeaders[i];j(r.column,"getIsVisible",Q)&&(n+=r.colSpan)}}else n=1;if(s.colSpan=n,s.isPlaceholder&&s.subHeaders.length===1&&s.subHeaders[0].column===s.column){let i=1,r=s.subHeaders[0];for(;r;)r.rowSpan=0,i++,r=r.subHeaders.length===1&&r.subHeaders[0].column===s.column?r.subHeaders[0]:void 0;s.rowSpan=i}else s.rowSpan=1}}function Je(e,t,s,n){const i=bt(e),r=[],o=s._headerGroupInstanceInitFns,a=new Array(t.length);for(let l=0;l<t.length;l++)l in t&&(a[l]=St(s,t[l],{depth:i,index:l}));return wt(a,i-1,s,n,r,o),r.reverse(),_t(r[0]?.headers??[]),r}function Mn(e){if(!e._columnPrototype){e._columnPrototype={table:e};const t=Object.values(e._features);for(let s=0;s<t.length;s++)t[s].assignColumnPrototype?.(e._columnPrototype,e)}return e._columnPrototype}function On(e,t,s,n){const i={...e.getDefaultColumnDef(),...t},r=i.accessorKey,o=r===void 0?void 0:String(r),a=i.id??o?.replaceAll(".","_")??(typeof i.header=="string"?i.header:void 0);let l;if(i.accessorFn)l=i.accessorFn;else if(r!==void 0)if(typeof r=="string"&&r.includes(".")){const h=r.split(".");l=d=>{let g=d;for(let p=0;p<h.length;p++){const S=h[p];g=g?.[S]}return g}}else l=h=>h[i.accessorKey];if(!a)throw new Error;const u=Mn(e),c=Object.create(u);c.accessorFn=l,c.columnDef=i,c.columns=[],c.depth=s,c.id=`${String(a)}`,c.parent=n;const f=e._columnInstanceInitFns;for(let h=0;h<f.length;h++)f[h](c);return c}function Ct(e){const t=e.atoms.columnOrder?.get();return s=>{let n=[];if(!t?.length)n=s;else{const i=new Map;for(let r=0;r<s.length;r++){const o=s[r];i.set(o.id,o)}for(let r=0;r<t.length;r++){const o=t[r],a=i.get(o);a&&(n.push(a),i.delete(o))}for(let r=0;r<s.length;r++){const o=s[r];i.has(o.id)&&n.push(o)}}return xn(e,n)}}function xn(e,t){const s=e.atoms.grouping?.get()??[],{groupedColumnMode:n}=e.options;if(!s.length||!n)return t;const i=t.filter(a=>!s.includes(a.id));if(n==="remove")return i;const r=new Map;for(let a=0;a<t.length;a++){const l=t[a];r.set(l.id,l)}const o=[];for(let a=0;a<s.length;a++){const l=r.get(s[a]);l&&o.push(l)}return[...o,...i]}function In(e){return[e,...e.columns.flatMap(t=>t.getFlatColumns())]}function Fn(e){if(e.columns.length){const t=e.columns.flatMap(s=>s.getLeafColumns());return j(e.table,"getOrderColumns",Ct)(t)}return[e]}function Pn(e){return{header:t=>{const s=t.header.column.columnDef;return s.accessorKey?s.accessorKey:s.accessorFn?s.id:null},cell:t=>t.renderValue()?.toString?.()??null,...Object.values(e._features).reduce((t,s)=>Object.assign(t,s.getDefaultColumnDef?.()),{}),...e.options.defaultColumn}}function Rt(e,t,s,n=0){const i=new Array(t.length);for(let r=0;r<t.length;r++){if(!(r in t))continue;const o=t[r],a=On(e,o,n,s),l=o;a.columns=l.columns?Rt(e,l.columns,a,n+1):[],i[r]=a}return i}function En(e){return Rt(e,e.options.columns)}function An(e){return e.getAllColumns().flatMap(t=>t.getFlatColumns())}function Dn(e){const t=k(),s=e.getAllFlatColumns();for(let n=0;n<s.length;n++){const i=s[n];t[i.id]=i}return t}function Tn(e){const t=e.getAllColumns().flatMap(s=>s.getLeafColumns());return j(e,"getOrderColumns",Ct)(t)}function jn(e){const t=k(),s=e.getAllLeafColumns();for(let n=0;n<s.length;n++){const i=s[n];t[i.id]=i}return t}function zn(e,t){return e.getAllFlatColumnsById()[t]}const kn={assignColumnPrototype:(e,t)=>{J("coreColumnsFeature",e,t,{column_getFlatColumns:{fn:s=>In(s),memoDeps:s=>[s.table.options.columns]},column_getLeafColumns:{fn:s=>Fn(s),memoDeps:s=>[s.table.atoms.columnOrder?.get(),s.table.atoms.grouping?.get(),s.table.options.columns,s.table.options.groupedColumnMode]}})},constructTableAPIs:e=>{q("coreColumnsFeature",e,{table_getDefaultColumnDef:{fn:()=>Pn(e),memoDeps:()=>[e.options.defaultColumn]},table_getAllColumns:{fn:()=>En(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumns:{fn:()=>An(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumnsById:{fn:()=>Dn(e),memoDeps:()=>[e.options.columns]},table_getAllLeafColumns:{fn:()=>Tn(e),memoDeps:()=>[e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_getAllLeafColumnsById:{fn:()=>jn(e),memoDeps:()=>[e.getAllLeafColumns()]},table_getColumn:{fn:t=>zn(e,t)}})}};function Mt(e,t){for(let s=0;s<e.subHeaders.length;s++)Mt(e.subHeaders[s],t);t.push(e)}function Ln(e){const t=[];return Mt(e,t),t}function Vn(e){return{column:e.column,header:e,table:e.column.table}}function Qn(e){const{start:t,end:s}=e.atoms.columnPinning?.get()??bn(),n=e.getAllColumns(),i=j(e,"getVisibleLeafColumns",wn);if(!t.length&&!s.length)return Je(n,i,e);const r=e.getAllLeafColumnsById(),o=[];for(let u=0;u<t.length;u++){const c=r[t[u]];c&&j(c,"getIsVisible",Q)&&o.push(c)}const a=[];for(let u=0;u<s.length;u++){const c=r[s[u]];c&&j(c,"getIsVisible",Q)&&a.push(c)}const l=i.filter(u=>!t.includes(u.id)&&!s.includes(u.id));return Je(n,[...o,...l,...a],e)}function Hn(e){return[...e.getHeaderGroups()].reverse()}function Nn(e){const t=e.getHeaderGroups(),s=[];for(let n=0;n<t.length;n++){const i=t[n].headers;for(let r=0;r<i.length;r++)s.push(i[r])}return s}function qn(e){const t=e.getHeaderGroups()[0]?.headers??[],s=[];for(let n=0;n<t.length;n++){const i=t[n].getLeafHeaders();for(let r=0;r<i.length;r++)s.push(i[r])}return s}const Kn={assignHeaderPrototype:(e,t)=>{J("coreHeadersFeature",e,t,{header_getLeafHeaders:{fn:s=>Ln(s),memoDeps:s=>[s.column.table.options.columns]},header_getContext:{fn:s=>Vn(s),memoDeps:s=>[s.column.table.options.columns]}})},constructTableAPIs:e=>{q("coreHeadersFeature",e,{table_getHeaderGroups:{fn:()=>Qn(e),memoDeps:()=>[e.options.columns,e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.atoms.columnPinning?.get(),e.atoms.columnVisibility?.get(),e.options.groupedColumnMode]},table_getFooterGroups:{fn:()=>Hn(e),memoDeps:()=>[e.getHeaderGroups()]},table_getFlatHeaders:{fn:()=>Nn(e),memoDeps:()=>[e.getHeaderGroups()]},table_getLeafHeaders:{fn:()=>qn(e),memoDeps:()=>[e.getHeaderGroups()]}})}};function Un(e){if(!e._rowPrototype){e._rowPrototype={table:e};const t=Object.values(e._features);for(let s=0;s<t.length;s++)t[s].assignRowPrototype?.(e._rowPrototype,e)}return e._rowPrototype}const Wn=(e,t,s,n,i,r,o)=>{const a=Un(e),l=Object.create(a);l._displayIndexCache=-1,l._uniqueValuesCache=k(),l._valuesCache=k(),l.depth=i,l.id=t,l.index=n,l.original=s,l.parentId=o,l.subRows=[];const u=e._rowInstanceInitFns;for(let c=0;c<u.length;c++)u[c](l);return l},Gn=/([0-9]+)/gm;function K(e){const t=Object.assign((s,n,i)=>{let r=s.getValue(i),o=n.getValue(i);const a=t.resolveDataValue;return a&&(r=a(r),o=a(o)),t.sort(r,o,s,n,i)},e);return t}K({resolveDataValue:e=>ce(e).toLowerCase(),sort:(e,t)=>xt(e,t)});K({resolveDataValue:e=>ce(e),sort:(e,t)=>xt(e,t)});K({resolveDataValue:e=>ce(e).toLowerCase(),sort:(e,t)=>Ae(e,t)});K({resolveDataValue:e=>ce(e),sort:(e,t)=>Ae(e,t)});K({resolveDataValue:e=>$n(e),sort:(e,t)=>e>t?1:e<t?-1:0});const Ot=K({sort:(e,t)=>Ae(e,t)});function Ae(e,t){return e===t?0:e>t?1:-1}function $n(e){return e instanceof Date?e.getTime():e}function ce(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function xt(e,t){let s=0,n=0;const i=e.length,r=t.length;for(;s<i&&n<r;){const o=ie(e.charCodeAt(s)),a=ie(t.charCodeAt(n)),l=Oe(e,s,o),u=Oe(t,n,a);if(!o&&!a){const f=Bn(e,s,l,t,n,u);if(f)return f;s=l,n=u;continue}if(o!==a)return o?1:-1;const c=Jn(e,s,l,t,n,u);if(c)return c;s=l,n=u}return Ze(e,s)-Ze(t,n)}function ie(e){return e>=48&&e<=57}function Oe(e,t,s){let n=t+1;for(;n<e.length&&ie(e.charCodeAt(n))===s;)n++;return n}function Bn(e,t,s,n,i,r){const o=s-t,a=r-i,l=o<a?o:a;for(let u=0;u<l;u++){const c=e.charCodeAt(t+u),f=n.charCodeAt(i+u);if(c>f)return 1;if(f>c)return-1}return o>a?1:a>o?-1:0}function Jn(e,t,s,n,i,r){let o=t;for(;o<s&&e.charCodeAt(o)===48;)o++;let a=i;for(;a<r&&n.charCodeAt(a)===48;)a++;const l=s-o,u=r-a;if(l===0&&u===0)return 0;if(l<=15&&u<=15){const h=Xe(e,o,s),d=Xe(n,a,r);return h>d?1:d>h?-1:0}const c=parseInt(e.slice(t,s),10),f=parseInt(n.slice(i,r),10);return c>f?1:f>c?-1:0}function Xe(e,t,s){let n=0;for(let i=t;i<s;i++)n=n*10+e.charCodeAt(i)-48;return n}function Ze(e,t){let s=0,n=t;for(;n<e.length;)s++,n=Oe(e,n,ie(e.charCodeAt(n)));return s}function Xn(){return[]}function Zn(e,t){le(e,"cellSelection",V(e.initialState.cellSelection)??Xn())}function Yn(e){e.atoms.cellSelection&&(e.options.autoResetAll??e.options.autoResetCellSelection??!0)&&e._reactivity.schedule(()=>Zn(e))}function ei(e){e.atoms.expanded&&(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding)&&e._reactivity.schedule(()=>ti(e))}function ti(e,t){const s=e.initialState.expanded;le(e,"expanded",s===!0?!0:Object.assign(k(),V(s??{})))}const xe=0;function It(e){if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if((e.atoms.pagination?.get()?.pageIndex??xe)===xe)return;ii(e)}}function si(e,t){le(e,"pagination",t)}function ni(e,t){si(e,s=>{let n=oe(t,s.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return n=Math.max(0,Math.min(n,i)),{...s,pageIndex:n}})}function ii(e,t){ni(e,xe)}function ri(){return[]}function he(e,t){le(e,"sorting",t)}function Ft(e,t){he(e,t?[]:V(e.initialState.sorting??[]))}function oi(e){e.atoms.sorting&&(e.options.autoResetAll??e.options.autoResetSorting??!1)&&Ft(e)}function Pt(e){const t=e.table._rowModelFns.sortFns,s=e.table.getFilteredRowModel().flatRows.slice(0,10);let n,i=!1;for(let r=0;r<s.length;r++){const o=s[r].getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]"){n="datetime";break}if(typeof o=="string"&&(i=!0,o.split(Gn).length>1)){n="alphanumeric";break}}if(!n&&i&&(n="text"),n){let r=t?.[n];if(r||n==="alphanumeric"&&(r=t?.text),r)return r}return Ot}function Et(e){const t=e.table.getFilteredRowModel().flatRows.slice(0,10);for(let s=0;s<t.length;s++){const n=t[s].getValue(e.id);if(n!=null)return typeof n=="string"?"asc":"desc"}return"desc"}function At(e){const t=e.table._rowModelFns.sortFns;return fn(e.columnDef.sortFn)?e.columnDef.sortFn:e.columnDef.sortFn==="auto"?Pt(e):t?.[e.columnDef.sortFn]??Ot}function Dt(e,t,s){const n=jt(e,s&&re(e)),i=typeof t<"u";he(e.table,r=>{const o=r.findIndex(h=>h.id===e.id),a=o===-1?void 0:r[o];let l=[],u;const c=i?t:n==="desc",f=!!(r.length&&re(e)&&s);return f?a?u="toggle":u="add":a?u="toggle":u="replace",u==="toggle"&&(i||n||(u="remove")),u==="add"?(l=[...r,{id:e.id,desc:c}],l.splice(0,l.length-(e.table.options.maxMultiSortColCount??Number.MAX_SAFE_INTEGER))):u==="toggle"?l=f?r.map(h=>h.id===e.id?{...h,desc:c}:h):[{id:e.id,desc:c}]:u==="remove"?l=f?r.filter(h=>h.id!==e.id):[]:l=[{id:e.id,desc:c}],l})}function Tt(e){return e.columnDef.sortDescFirst??e.table.options.sortDescFirst??Et(e)==="desc"?"desc":"asc"}function jt(e,t){const s=Tt(e),n=zt(e);return n?n!==s&&(e.table.options.enableSortingRemoval??!0)&&(!t||(e.table.options.enableMultiRemove??!0))?!1:n==="desc"?"asc":"desc":s}function De(e){return(e.columnDef.enableSorting??!0)&&(e.table.options.enableSorting??!0)&&!!e.accessorFn}function re(e){return e.columnDef.enableMultiSort??e.table.options.enableMultiSort??!!e.accessorFn}function zt(e){const t=e.table.atoms.sorting?.get()?.find(s=>s.id===e.id);return t?t.desc?"desc":"asc":!1}function ai(e){return e.table.atoms.sorting?.get()?.findIndex(t=>t.id===e.id)??-1}function li(e){he(e.table,t=>t.length?t.filter(s=>s.id!==e.id):[])}function ui(e){const t=De(e);return s=>{t&&Dt(e,void 0,re(e)?e.table.options.isMultiSortEvent?.(s):!1)}}function ci(){return e=>ue({feature:"coreRowModelsFeature",table:e,fnName:"table.getCoreRowModel",memoDeps:()=>[e.options.data],fn:()=>hi(e,e.options.data),onAfterUpdate:yt(()=>{ei(e),It(e),oi(e),Yn(e)})})}function kt(e,t,s,n=0,i){const r=[];for(let o=0;o<s.length;o++){const a=s[o],l=Wn(e,e.getRowId(a,o,i),a,o,n,void 0,i?.id);t.flatRows.push(l),t.rowsById[l.id]=l,r.push(l),e.options.getSubRows&&(l.originalSubRows=e.options.getSubRows(a,o),l.originalSubRows?.length&&(l.subRows=kt(e,t,l.originalSubRows,n+1,l)))}return r}function hi(e,t){const s={rows:[],flatRows:[],rowsById:k()};return s.rows=kt(e,s,t),s}function fi(e){return e._rowModels.coreRowModel||(e._rowModels.coreRowModel=e.options.features.coreRowModel?.(e)??ci()(e)),e._rowModels.coreRowModel()}function di(e){return e.getCoreRowModel()}function gi(e){return e._rowModels.filteredRowModel||(e._rowModels.filteredRowModel=e.options.features.filteredRowModel?.(e)),e.options.manualFiltering||!e._rowModels.filteredRowModel?e.getPreFilteredRowModel():e._rowModels.filteredRowModel()}function pi(e){return e.getFilteredRowModel()}function mi(e){return e._rowModels.groupedRowModel||(e._rowModels.groupedRowModel=e.options.features.groupedRowModel?.(e)),e.options.manualGrouping||!e._rowModels.groupedRowModel?e.getPreGroupedRowModel():e._rowModels.groupedRowModel()}function yi(e){return e.getGroupedRowModel()}function vi(e){return e._rowModels.sortedRowModel||(e._rowModels.sortedRowModel=e.options.features.sortedRowModel?.(e)),e.options.manualSorting||!e._rowModels.sortedRowModel?e.getPreSortedRowModel():e._rowModels.sortedRowModel()}function Si(e){return e.getSortedRowModel()}function bi(e){return e._rowModels.expandedRowModel||(e._rowModels.expandedRowModel=e.options.features.expandedRowModel?.(e)),e.options.manualExpanding||!e._rowModels.expandedRowModel?e.getPreExpandedRowModel():e._rowModels.expandedRowModel()}function wi(e){return e.getExpandedRowModel()}function _i(e){return e._rowModels.paginatedRowModel||(e._rowModels.paginatedRowModel=e.options.features.paginatedRowModel?.(e)),e.options.manualPagination||!e._rowModels.paginatedRowModel?e.getPrePaginatedRowModel():e._rowModels.paginatedRowModel()}function Ci(e){return e.getPaginatedRowModel()}const Ri={constructTableAPIs:e=>{q("coreRowModelsFeature",e,{table_getCoreRowModel:{fn:()=>fi(e)},table_getPreFilteredRowModel:{fn:()=>di(e)},table_getFilteredRowModel:{fn:()=>gi(e)},table_getPreGroupedRowModel:{fn:()=>pi(e)},table_getGroupedRowModel:{fn:()=>mi(e)},table_getPreSortedRowModel:{fn:()=>yi(e)},table_getSortedRowModel:{fn:()=>vi(e)},table_getPreExpandedRowModel:{fn:()=>Si(e)},table_getExpandedRowModel:{fn:()=>bi(e)},table_getPrePaginatedRowModel:{fn:()=>wi(e)},table_getPaginatedRowModel:{fn:()=>_i(e)},table_getRowModel:{fn:()=>Ci(e)}})}};function Mi(e){if(!e._cellPrototype){e._cellPrototype={table:e};const t=Object.values(e._features);for(let s=0;s<t.length;s++)t[s].assignCellPrototype?.(e._cellPrototype,e)}return e._cellPrototype}function Oi(e,t,s){const n=Mi(s),i=Object.create(n);i.column=e,i.id=`${t.id}_${e.id}`,i.row=t;const r=s._cellInstanceInitFns;for(let o=0;o<r.length;o++)r[o](i);return i}function xi(e){const t=e.table.getRowsInDisplayOrder(),s=e._displayIndexCache;return t[s]===e?s:-1}function Ii(e){const t=e.getPrePaginatedRowModel().rows;if(e.options.paginateExpandedRows===!1){const s=[],n=i=>{i._displayIndexCache=s.length,s.push(i),i.subRows.length&&i.getIsExpanded?.()&&i.subRows.forEach(n)};return t.forEach(n),s}for(let s=0;s<t.length;s++)t[s]._displayIndexCache=s;return t}function Fi(e,t){if(ae(e._valuesCache,t))return e._valuesCache[t];const s=e.table.getColumn(t);if(s?.accessorFn)return e._valuesCache[t]=s.accessorFn(e.original,e.index),e._valuesCache[t]}function Pi(e,t){if(ae(e._uniqueValuesCache,t))return e._uniqueValuesCache[t];const s=e.table.getColumn(t);if(s?.accessorFn)return s.columnDef.getUniqueValues?(e._uniqueValuesCache[t]=s.columnDef.getUniqueValues(e.original,e.index),e._uniqueValuesCache[t]):(e._uniqueValuesCache[t]=[e.getValue(t)],e._uniqueValuesCache[t])}function Ei(e,t){return e.getValue(t)??e.table.options.renderFallbackValue}function Ai(e){return dn(e.subRows,t=>t.subRows)}function Di(e){const t=e.getCoreRowModel().flatRows;let s=0;for(let n=0;n<t.length;n++)s=Math.max(s,t[n].depth);return s}function Ti(e){if(e.parentId)return e.table.getCoreRowModel().rowsById[e.parentId]??e.table.getRow(e.parentId,!0)}function ji(e){const t=[];let s=e;for(;;){const n=s.getParentRow();if(!n)break;t.push(n),s=n}return t.reverse()}function zi(e){const t=e.table.getAllLeafColumns();let s=e._cellsCache;s||(s=e._cellsCache=new WeakMap);const n=new Array(t.length);for(let i=0;i<t.length;i++){const r=t[i];let o=s.get(r);o||(o=Oi(r,e,e.table),s.set(r,o)),n[i]=o}return n}function ki(e){const t=k(),s=e.getAllCells();for(let n=0;n<s.length;n++){const i=s[n];t[i.column.id]=i}return t}function Li(e,t,s,n){return t.options.getRowId?.(e,s,n)??(n?`${n.id}.${s}`:String(s))}function Vi(e,t,s){let n=(s?e.getPrePaginatedRowModel():e.getRowModel()).rowsById[t];if(!n&&(n=e.getCoreRowModel().rowsById[t],!n))throw new Error;return n}const Qi={assignRowPrototype:(e,t)=>{J("coreRowsFeature",e,t,{row_getDisplayIndex:{fn:s=>xi(s)},row_getAllCellsByColumnId:{fn:s=>ki(s),memoDeps:s=>[s.getAllCells()]},row_getAllCells:{fn:s=>zi(s),memoDeps:s=>[s.table.getAllLeafColumns()]},row_getLeafRows:{fn:s=>Ai(s),memoDeps:s=>[s.subRows]},row_getParentRow:{fn:s=>Ti(s)},row_getParentRows:{fn:s=>ji(s)},row_getUniqueValues:{fn:(s,n)=>Pi(s,n)},row_getValue:{fn:(s,n)=>Fi(s,n)},row_renderValue:{fn:(s,n)=>Ei(s,n)}})},constructTableAPIs:e=>{q("coreRowsFeature",e,{table_getRowsInDisplayOrder:{fn:()=>Ii(e),memoDeps:()=>[e.getPrePaginatedRowModel().rows,e.options.paginateExpandedRows,e.options.paginateExpandedRows===!1?e.atoms.expanded?.get():void 0]},table_getRowId:{fn:(t,s,n)=>Li(t,e,s,n)},table_getRow:{fn:(t,s)=>Vi(e,t,s)},table_getMaxSubRowDepth:{fn:()=>Di(e),memoDeps:()=>[e.getCoreRowModel()]}})}};function Lt(e,t,s=(n,i)=>n===i){const n=t===void 0?e.options.state:t;e._reactivity.batch(()=>{if(n)for(const i in n){const r=e.baseAtoms[i];if(!r)continue;const o=n[i],a=o===void 0?e.initialState[i]:o;s(e._reactivity.untrack(()=>r.get()),a)||r.set(()=>a)}})}function Vt(e,t,s=(n,i)=>n===i){e._reactivity.batch(()=>{Lt(e,t,s),e._reactivity.commit?.()})}function Hi(e){const t=V(e.initialState);e._reactivity.batch(()=>{const n=Object.keys(t);for(let i=0;i<n.length;i++){const r=n[i];e.baseAtoms[r].set(t[r])}});const s=Object.values(e._features);for(let n=0;n<s.length;n++)s[n].resetTableInstanceData?.(e)}function Ni(e,t){const{features:s,atoms:n,initialState:i}=e.options;if(!e.options.mergeOptions)return{...e.options,...t,features:s,atoms:n,initialState:i};const r=e.options.mergeOptions(e.options,t),o={...Object.getOwnPropertyDescriptors(r)};return Object.defineProperties(Object.create(Object.getPrototypeOf(r)),{...o,features:{value:s,enumerable:!0,configurable:!0,writable:!0},atoms:{value:n,enumerable:!0,configurable:!0,writable:!0},initialState:{value:i,enumerable:!0,configurable:!0,writable:!0}})}function Qt(e,t,s){const n=Ni(e,oe(t,e.options));e.optionsStore?e.optionsStore.set(()=>n):e.options=n,s?.syncExternalState!==!1&&Vt(e,n.state??null)}const qi={constructTableAPIs:e=>{q("coreTablesFeature",e,{table_reset:{fn:()=>Hi(e)},table_setOptions:{fn:t=>Qt(e,t)}})}},Ki={coreCellsFeature:vn,coreColumnsFeature:kn,coreHeadersFeature:Kn,coreRowModelsFeature:Ri,coreRowsFeature:Qi,coreTablesFeature:qi};function sr(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},columns:e=>e,display:e=>e,group:e=>e}}function nr(e){return e}function Ui(e,t={}){return Object.values(e).forEach(s=>{t=s.getInitialState?.(t)??t}),V(t)}function Wi(e){const t=e.features.coreReactivityFeature,{aggregationFns:s,columnMeta:n,coreRowModel:i,expandedRowModel:r,facetedMinMaxValues:o,facetedRowModel:a,facetedUniqueValues:l,filterFns:u,filterMeta:c,filteredRowModel:f,groupedRowModel:h,paginatedRowModel:d,sortFns:g,sortedRowModel:p,tableMeta:S,...y}=e.features,m={_cellInstanceInitFns:[],_columnInstanceInitFns:[],_features:{...Ki,...y},_headerGroupInstanceInitFns:[],_headerInstanceInitFns:[],_reactivity:t,_rowInstanceInitFns:[],_rowModelFns:{aggregationFns:s,filterFns:u,sortFns:g},_rowModels:{},atoms:{},baseAtoms:{}},b=Object.values(m._features),_={...b.reduce((R,v)=>Object.assign(R,v.getDefaultTableOptions?.(m)),{}),...e};if(t.wrapExternalAtoms&&_.atoms)for(const[R,v]of Object.entries(_.atoms)){const C=v,I=t.createWritableAtom(C.get(),{debugName:`externalAtom/${R}`});_.atoms[R]=I;let O=!1;const F=C.subscribe(P=>{O||I.set(P)}),D=I.subscribe(P=>{O=!0,C.set(P),O=!1});t.addSubscription(F),t.addSubscription(D)}t.createOptionsStore?(m.optionsStore=t.createWritableAtom(_,{debugName:"table/optionsStore"}),Object.defineProperty(m,"options",{configurable:!0,enumerable:!0,get(){return m.optionsStore.get()},set(R){m.optionsStore.set(()=>R)}})):m.options=_,m.initialState=Ui(m._features,m.options.initialState);const w=Object.keys(m.initialState);for(let R=0;R<w.length;R++){const v=w[R];m.baseAtoms[v]=t.createWritableAtom(m.initialState[v],{debugName:`table/baseAtoms/${v}`}),m.atoms[v]=t.createReadonlyAtom(()=>{const C=m.options,I=C.atoms?.[v],O=I?I.get():m.baseAtoms[v].get();if(I)return O;const F=C.state;if(F&&ae(F,v)){const D=F[v];return D===void 0?m.initialState[v]:D}return O},{debugName:`table/atoms/${v}`})}Lt(m),m.store=nn(t.createReadonlyAtom(()=>{const R={};for(let v=0;v<w.length;v++){const C=w[v];R[C]=m.atoms[C].get()}return R},{compare:W,debugName:"table/store"}));for(let R=0;R<b.length;R++){const v=b[R];v.initTableInstanceData?.(m),v.initCellInstanceData&&m._cellInstanceInitFns.push(v.initCellInstanceData.bind(v)),v.initColumnInstanceData&&m._columnInstanceInitFns.push(v.initColumnInstanceData.bind(v)),v.initHeaderGroupInstanceData&&m._headerGroupInstanceInitFns.push(v.initHeaderGroupInstanceData.bind(v)),v.initHeaderInstanceData&&m._headerInstanceInitFns.push(v.initHeaderInstanceData.bind(v)),v.initRowInstanceData&&m._rowInstanceInitFns.push(v.initRowInstanceData.bind(v)),v.constructTableAPIs?.(m)}return m}const ir={getInitialState(e){return{sorting:ri(),...e}},getDefaultColumnDef(){return{sortFn:"auto",sortUndefined:1}},getDefaultTableOptions(e){return{autoResetSorting:!1,onSortingChange:un("sorting",e),isMultiSortEvent:t=>t.shiftKey}},assignColumnPrototype(e,t){J("rowSortingFeature",e,t,{column_getAutoSortFn:{fn:s=>Pt(s)},column_getAutoSortDir:{fn:s=>Et(s)},column_getSortFn:{fn:s=>At(s)},column_toggleSorting:{fn:(s,n,i)=>Dt(s,n,i)},column_getFirstSortDir:{fn:s=>Tt(s)},column_getNextSortingOrder:{fn:(s,n)=>jt(s,n)},column_getCanSort:{fn:s=>De(s)},column_getCanMultiSort:{fn:s=>re(s)},column_getIsSorted:{fn:s=>zt(s)},column_getSortIndex:{fn:s=>ai(s)},column_clearSorting:{fn:s=>li(s)},column_getToggleSortingHandler:{fn:s=>ui(s)}})},constructTableAPIs(e){q("rowSortingFeature",e,{table_setSorting:{fn:t=>he(e,t)},table_resetSorting:{fn:t=>Ft(e,t)}})}};function rr(){return e=>{const t=e;return ue({feature:"rowSortingFeature",table:t,fnName:"table.getSortedRowModel",memoDeps:()=>[t.atoms.sorting?.get(),t.getPreSortedRowModel()],fn:()=>Gi(t),onAfterUpdate:yt(()=>It(t))})}}function Gi(e){const t=e.getPreSortedRowModel(),s=e.atoms.sorting?.get();if(!t.rows.length||!s?.length)return t;const n=[],i=s.filter(l=>{const u=e.getColumn(l.id);return u?De(u):!1});if(!i.length)return t;const r=[];for(let l=0;l<i.length;l++){const u=i[l],c=e.getColumn(u.id);c&&r.push({id:u.id,desc:u.desc,sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortFn:At(c)})}const o=(l,u)=>{for(let c=0;c<r.length;c++){const f=r[c],h=f.sortUndefined,d=f.desc;let g=0;if(h){const p=l.getValue(f.id),S=u.getValue(f.id),y=p===void 0,m=S===void 0;if(y&&m)continue;if(y||m){if(h==="first")return y?-1:1;if(h==="last")return y?1:-1;g=y?h:-h}}if(g===0&&(g=f.sortFn(l,u,f.id)),g!==0)return d&&(g*=-1),f.invertSorting&&(g*=-1),g}return l.index-u.index},a=l=>{const u=l.slice();u.sort(o);let c=!1;for(let f=0;f<u.length;f++){const h=u[f];h!==l[f]&&(c=!0);const d=n.length;if(n.push(h),h.subRows.length){const g=a(h.subRows);if(g.changed){const p=Object.create(Object.getPrototypeOf(h));ln(p,h),p.subRows=g.rows,u[f]=p,n[d]=p,c=!0}}}return{rows:u,changed:c}};return{rows:a(t.rows).rows,flatRows:n,rowsById:t.rowsById}}const $i=typeof window>"u"?M.useEffect:M.useLayoutEffect;function or(e,t){const[{table:s,rootSource:n}]=M.useState(()=>{const l=Wi({...e,features:{coreReactivityFeature:an(),...e.features}});return l.Subscribe=(u=>sn({...u,source:u.source??l.store})),l.FlexRender=Gs,{table:l,rootSource:on(l.store,W)}}),i=s;Qt(i,l=>({...l,...e}),{syncExternalState:!1});const r=i.options.state,o=n.get(),a=pt(n,t,{compare:W});return $i(()=>{n.markCommitted(o),Vt(i,r??null,W)}),M.useMemo(()=>({...s,options:e,state:a}),[s,e,a])}export{Xi as Q,tr as a,or as b,sr as c,rr as d,ys as e,er as f,Zi as g,ir as r,nr as t,Yi as u};
@@ -1,4 +1,4 @@
1
- import{_ as o,z as pt,a9 as Rt,aa as Ct,ab as Wt,c as gt,l as E,F as Pt,a1 as Bt,ac as ft,d as U,u as Vt,ad as Ft,q as zt}from"./mermaid.core-DnaJSnLe.js";import{d as ot}from"./arc-B9cXI-QL.js";import"./index-BdjG_WtS.js";import"./react-rd22PHbN.js";import"./tanstack-Bsd5UOY4.js";import"./base-ui-D4MeJpa3.js";import"./render-markdown-GXIpf9CM.js";import"./App-CeDVj5Hh.js";import"./one-light-CoLDteqg.js";import"./index-BgLrS_2D.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,R=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var K=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,C={},G,B,X,Z;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";Z=[];for(G in S[$])this.terminals_[G]&&G>W&&Z.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`:
1
+ import{_ as o,z as pt,a9 as Rt,aa as Ct,ab as Wt,c as gt,l as E,F as Pt,a1 as Bt,ac as ft,d as U,u as Vt,ad as Ft,q as zt}from"./mermaid.core-EwS_m22C.js";import{d as ot}from"./arc-D-Yei3Vr.js";import"./index-BOPi2b1j.js";import"./react-rd22PHbN.js";import"./tanstack-B8_amOz8.js";import"./base-ui-qeHDA5zu.js";import"./render-markdown-C7X2TwRk.js";import"./App-CBetJ5ZN.js";import"./one-light-CoLDteqg.js";import"./index-BgLrS_2D.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,R=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var K=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,C={},G,B,X,Z;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";Z=[];for(G in S[$])this.terminals_[G]&&G>W&&Z.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`:
2
2
  `+w.showPosition()+`
3
3
  Expecting `+Z.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on line "+(I+1)+": Unexpected "+(_==O?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Y,{text:w.match,token:this.terminals_[_]||_,line:w.yylineno,loc:F,expected:Z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+_);switch(T[0]){case 1:l.push(_),x.push(w.yytext),u.push(w.yylloc),l.push(T[1]),_=null,R=w.yyleng,v=w.yytext,I=w.yylineno,F=w.yylloc;break;case 2:if(B=this.productions_[T[1]][1],C.$=x[x.length-B],C._$={first_line:u[u.length-(B||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(B||1)].first_column,last_column:u[u.length-1].last_column},K&&(C._$.range=[u[u.length-(B||1)].range[0],u[u.length-1].range[1]]),P=this.performAction.apply(C,[v,R,I,H.yy,T[1],x,u].concat(L)),typeof P<"u")return P;B&&(l=l.slice(0,-1*B*2),x=x.slice(0,-1*B),u=u.slice(0,-1*B)),l.push(this.productions_[T[1]][0]),x.push(C.$),u.push(C._$),X=S[l[l.length-2]][l[l.length-1]],l.push(X);break;case 3:return!0}}return!0},"parse")},m=(function(){var k={EOF:1,parseError:o(function(d,l){if(this.yy.parser)this.yy.parser.parseError(d,l);else throw new Error(d)},"parseError"),setInput:o(function(s,d){return this.yy=d||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:o(function(s){var d=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+`