ocean-brain 0.7.5 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/index.js +3 -3
  2. package/dist/mcp.js +180 -736
  3. package/package.json +4 -1
  4. package/server/client/dist/assets/ArrowRight.es-C4zlc54Z.js +1 -0
  5. package/server/client/dist/assets/{Calendar-Bc2zJueR.js → Calendar-COrN6Hjv.js} +2 -2
  6. package/server/client/dist/assets/Callout-BK0K9E74.js +1 -0
  7. package/server/client/dist/assets/Copy.es-zm8f_XXX.js +1 -0
  8. package/server/client/dist/assets/Graph-BH1fzhue.js +1 -0
  9. package/server/client/dist/assets/{Image-DxWhlIDG.js → Image-KXuHOG4b.js} +1 -1
  10. package/server/client/dist/assets/Image.es-BKahRbIm.js +1 -0
  11. package/server/client/dist/assets/Note-C143cKKw.js +12 -0
  12. package/server/client/dist/assets/Plus.es-BqeC8T8h.js +1 -0
  13. package/server/client/dist/assets/Reminders-BYG5rz1M.js +1 -0
  14. package/server/client/dist/assets/Search-DBWsIMDP.js +1 -0
  15. package/server/client/dist/assets/{SurfaceCard-CkAVMLPs.js → SurfaceCard-CNSQfYfM.js} +1 -1
  16. package/server/client/dist/assets/Tag-5aCfSO8Y.js +1 -0
  17. package/server/client/dist/assets/TagNotes-BPZjN-6l.js +1 -0
  18. package/server/client/dist/assets/Trash.es-CRQkTnXZ.js +1 -0
  19. package/server/client/dist/assets/ViewNotes-DGLNF96x.js +1 -0
  20. package/server/client/dist/assets/ViewSectionDialog-CzskgmMF.js +102 -0
  21. package/server/client/dist/assets/Views-DR5jT23G.js +1 -0
  22. package/server/client/dist/assets/{graph-vendor-CUxe67Lr.js → graph-vendor-UTvF2NS_.js} +2 -2
  23. package/server/client/dist/assets/image.api-8dlMwzMd.js +17 -0
  24. package/server/client/dist/assets/{index-C5BGzDgt.css → index-BEUqDuAZ.css} +1 -1
  25. package/server/client/dist/assets/{index-D3BfroIT.js → index-DGIAh3ZY.js} +1 -1
  26. package/server/client/dist/assets/index-VHp17GQX.js +342 -0
  27. package/server/client/dist/assets/manage-image-RqtWKas2.js +1 -0
  28. package/server/client/dist/assets/{manage-image-detail-C8Q7K7I3.js → manage-image-detail-BTSIbLlQ.js} +1 -1
  29. package/server/client/dist/assets/mcp-EDurbggR.js +4 -0
  30. package/server/client/dist/assets/mcp-admin-adapter-DmGUo5G8.js +1 -0
  31. package/server/client/dist/assets/{note-core-Z6kqulGB.js → note-core-BklwyZHk.js} +1 -1
  32. package/server/client/dist/assets/{note-vendor-i1M2FSI2.js → note-vendor-DkYKUmLo.js} +1 -1
  33. package/server/client/dist/assets/{placeholder-Cr_nI8UI.js → placeholder-DeKgSBnC.js} +4 -4
  34. package/server/client/dist/assets/{properties-CvYWJWUM.js → properties-BjrZvOYn.js} +1 -1
  35. package/server/client/dist/assets/tag.api-Dl8DQd0m.js +21 -0
  36. package/server/client/dist/assets/trash-C5ntddLu.js +1 -0
  37. package/server/client/dist/assets/{useReminderMutate-CDmIEwsw.js → useReminderMutate-CoXXqJY2.js} +1 -1
  38. package/server/client/dist/index.html +5 -5
  39. package/server/dist/features/auth/http/login-page.js +1 -1
  40. package/server/dist/features/image/http/upload.js +34 -23
  41. package/server/dist/features/image/http/upload.js.map +1 -1
  42. package/server/dist/features/image/services/validation.js +111 -0
  43. package/server/dist/features/image/services/validation.js.map +1 -0
  44. package/server/dist/features/mcp-admin/http/handlers.js +11 -3
  45. package/server/dist/features/mcp-admin/http/handlers.js.map +1 -1
  46. package/server/dist/features/note/http/mcp.js +8 -43
  47. package/server/dist/features/note/http/mcp.js.map +1 -1
  48. package/server/dist/features/note/services/cleanup.js +2 -2
  49. package/server/dist/features/note/services/cleanup.js.map +1 -1
  50. package/server/dist/features/note/services/markdown-intent-write.js +11 -43
  51. package/server/dist/features/note/services/markdown-intent-write.js.map +1 -1
  52. package/server/dist/features/note/services/markdown-patch.js +4 -123
  53. package/server/dist/features/note/services/markdown-patch.js.map +1 -1
  54. package/server/dist/features/note/services/write.js +13 -13
  55. package/server/dist/features/note/services/write.js.map +1 -1
  56. package/server/dist/features/tag/graphql/tag.query.resolver.js +16 -1
  57. package/server/dist/features/tag/graphql/tag.query.resolver.js.map +1 -1
  58. package/server/dist/features/tag/graphql/tag.type-defs.js +2 -0
  59. package/server/dist/features/tag/graphql/tag.type-defs.js.map +1 -1
  60. package/server/dist/modules/app-version.js +105 -0
  61. package/server/dist/modules/app-version.js.map +1 -0
  62. package/server/dist/modules/mcp-auth.js +62 -1
  63. package/server/dist/modules/mcp-auth.js.map +1 -1
  64. package/server/dist/paths.js +1 -0
  65. package/server/dist/paths.js.map +1 -1
  66. package/server/dist/routes/api.js +2 -8
  67. package/server/dist/routes/api.js.map +1 -1
  68. package/server/dist/routes/client.js +51 -1
  69. package/server/dist/routes/client.js.map +1 -1
  70. package/server/client/dist/assets/Callout-B4kA_Cvr.js +0 -1
  71. package/server/client/dist/assets/Graph-uq5jfJgt.js +0 -1
  72. package/server/client/dist/assets/Image.es-BpAOJjJT.js +0 -1
  73. package/server/client/dist/assets/Note-Bo8ZYRP-.js +0 -22
  74. package/server/client/dist/assets/Plus.es-Dc_js8AC.js +0 -1
  75. package/server/client/dist/assets/Reminders-lj7Equld.js +0 -1
  76. package/server/client/dist/assets/Search-1wcRO5--.js +0 -1
  77. package/server/client/dist/assets/Tag-CeygwFfv.js +0 -1
  78. package/server/client/dist/assets/TagNotes-B8DqItxw.js +0 -1
  79. package/server/client/dist/assets/Trash.es-OuQVb_SX.js +0 -1
  80. package/server/client/dist/assets/ViewNotes-BH7PbdOD.js +0 -1
  81. package/server/client/dist/assets/ViewSectionTableRenderer-BJwhd5be.js +0 -102
  82. package/server/client/dist/assets/Views-eYFtsdFj.js +0 -1
  83. package/server/client/dist/assets/image.api-C0eYGCeH.js +0 -17
  84. package/server/client/dist/assets/index-jIfkRdY_.js +0 -361
  85. package/server/client/dist/assets/manage-image-C0YwkLIP.js +0 -1
  86. package/server/client/dist/assets/mcp-DHHhTLC8.js +0 -1
  87. package/server/client/dist/assets/trash-DA27aW7L.js +0 -1
  88. package/server/dist/features/image/services/remote-fetch.js +0 -176
  89. package/server/dist/features/image/services/remote-fetch.js.map +0 -1
@@ -1,361 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Calendar-Bc2zJueR.js","assets/note-vendor-i1M2FSI2.js","assets/graph-vendor-CUxe67Lr.js","assets/note-core-Z6kqulGB.js","assets/Callout-B4kA_Cvr.js","assets/Views-eYFtsdFj.js","assets/ViewSectionTableRenderer-BJwhd5be.js","assets/SurfaceCard-CkAVMLPs.js","assets/Plus.es-Dc_js8AC.js","assets/Reminders-lj7Equld.js","assets/useReminderMutate-CDmIEwsw.js","assets/Graph-uq5jfJgt.js","assets/Search-1wcRO5--.js","assets/Tag-CeygwFfv.js","assets/Note-Bo8ZYRP-.js","assets/image.api-C0eYGCeH.js","assets/TagNotes-B8DqItxw.js","assets/ViewNotes-BH7PbdOD.js","assets/index-D3BfroIT.js","assets/Trash.es-OuQVb_SX.js","assets/Image.es-BpAOJjJT.js","assets/mcp-DHHhTLC8.js","assets/trash-DA27aW7L.js","assets/manage-image-C0YwkLIP.js","assets/Image-DxWhlIDG.js","assets/manage-image-detail-C8Q7K7I3.js","assets/properties-CvYWJWUM.js","assets/placeholder-Cr_nI8UI.js"])))=>i.map(i=>d[i]);
2
- import{j as h,w as t1,r as $t,R as nu,a as Ja,c as n1,u as r1,o as o1,s as s1,f as a1,b as i1,d as c1,h as l1,e as u1,l as d1,_ as Ze,g as f1}from"./note-vendor-i1M2FSI2.js";import{a as c,R as Wo,N as M,g as Ir,r as h1,P as xe}from"./graph-vendor-CUxe67Lr.js";import"./note-core-Z6kqulGB.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();const ei={DARK:"(prefers-color-scheme: dark)",LIGHT:"(prefers-color-scheme: light)",RETINA:"(min-resolution: 2dppx)",RESPONSIVE:e=>`screen and (max-width: ${e})`},ru=e=>typeof window<"u"&&window.matchMedia?window.matchMedia(e):null,ti=(e,t,n=!0)=>{const r=ru(e);n&&t(r?.matches||!1);const o=s=>{t?.(s.matches)};return r?.addEventListener("change",o),()=>{r?.removeEventListener("change",o)}},p1=(e,t=!0)=>ti(ei.DARK,e,t),m1=(e,t,n=!0)=>ti(ei.RESPONSIVE(e),t,n),g1={MEDIA_QUERY:ei,listenThemeChange:p1,listenResponsiveChange:m1,createMediaQuery:ru,listenMediaQueryChange:ti};var Ee=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Ee||{});function ou({update:e,notify:t,unwatched:n}){return{link:r,unlink:o,propagate:s,checkDirty:a,shallowPropagate:i};function r(u,f,d){const p=f.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:f.deps;if(m!==void 0&&m.dep===u){m.version=d,f.depsTail=m;return}const v=u.subsTail;if(v!==void 0&&v.version===d&&v.sub===f)return;const g=f.depsTail=u.subsTail={version:d,dep:u,sub:f,prevDep:p,nextDep:m,prevSub:v,nextSub:void 0};m!==void 0&&(m.prevDep=g),p!==void 0?p.nextDep=g:f.deps=g,v!==void 0?v.nextSub=g:u.subs=g}function o(u,f=u.sub){const d=u.dep,p=u.prevDep,m=u.nextDep,v=u.nextSub,g=u.prevSub;return m!==void 0?m.prevDep=p:f.depsTail=p,p!==void 0?p.nextDep=m:f.deps=m,v!==void 0?v.prevSub=g:d.subsTail=g,g!==void 0?g.nextSub=v:(d.subs=v)===void 0&&n(d),m}function s(u){let f=u.nextSub,d;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&l(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&t(p),m&1){const v=p.subs;if(v!==void 0){const g=(u=v).nextSub;g!==void 0&&(d={value:f,prev:d},f=g);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){f=u.nextSub;continue e}break}while(!0)}function a(u,f){let d,p=0,m=!1;e:do{const v=u.dep,g=v.flags;if(f.flags&16)m=!0;else if((g&17)===17){if(e(v)){const y=v.subs;y.nextSub!==void 0&&i(y),m=!0}}else if((g&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=v.deps,f=v,++p;continue}if(!m){const y=u.nextDep;if(y!==void 0){u=y;continue}}for(;p--;){const y=f.subs,b=y.nextSub!==void 0;if(b?(u=d.value,d=d.prev):u=y,m){if(e(f)){b&&i(y),f=u.sub;continue}m=!1}else f.flags&=-33;f=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return m}while(!0)}function i(u){do{const f=u.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&t(f))}while((u=u.nextSub)!==void 0)}function l(u,f){let d=f.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}let ni=0,rn=0,mr=0;const kt=[],{link:JC,unlink:su,propagate:e5,checkDirty:v1,shallowPropagate:t5}=ou({update(e){return e.depsTail!==void 0?w1(e):E1(e)},notify(e){let t=mr,n=t;do if(kt[t++]=e,e.flags&=-3,e=e.subs?.sub,e===void 0||!(e.flags&2))break;while(!0);for(mr=t;n<--t;){const r=kt[n];kt[n++]=kt[t],kt[t]=r}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Go(e)):C1.call(e)}});function y1(){return ni}function b1(){++ni}function x1(){--ni||R1()}function w1(e){e.depsTail=void 0,e.flags=5;try{const t=e.value;return t!==(e.value=e.getter(t))}finally{e.flags&=-5,Go(e)}}function E1(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function S1(e){const t=e.flags;if(t&16||t&32&&v1(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,Go(e)}}else e.flags=2}function R1(){try{for(;rn<mr;){const e=kt[rn];kt[rn++]=void 0,S1(e)}}finally{for(;rn<mr;){const e=kt[rn];kt[rn++]=void 0,e.flags|=10}rn=0,mr=0}}function C1(){this.depsTail=void 0,this.flags=0,Go(this);const e=this.subs;e!==void 0&&su(e)}function Go(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=su(n,e)}function ri(e,t,n){const r=typeof e=="object",o=r?e:void 0;return{next:(r?e.next:e)?.bind(o),error:(r?e.error:t)?.bind(o),complete:(r?e.complete:n)?.bind(o)}}const da=[];let ho=0;const{link:cc,unlink:A1,propagate:T1,checkDirty:au,shallowPropagate:lc}=ou({update(e){return e._update()},notify(e){da[fa++]=e,e.flags&=~Ee.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ee.Mutable|Ee.Dirty,Eo(e))}});let Qr=0,fa=0,At;function Eo(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=A1(n,e)}function iu(){if(!(y1()>0)){for(;Qr<fa;){const e=da[Qr];da[Qr++]=void 0,e.notify()}Qr=0,fa=0}}function cu(e,t){const n=typeof e=="function",r=e,o={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Ee.None:Ee.Mutable,get(){return At!==void 0&&cc(o,At,ho),o._snapshot},subscribe(s){const a=ri(s),i={current:!1},l=P1(()=>{o.get(),i.current?a.next?.(o._snapshot):i.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(s){const a=At,i=Object.is;if(n)At=o,++ho,o.depsTail=void 0;else if(s===void 0)return!1;n&&(o.flags=Ee.Mutable|Ee.RecursedCheck);try{const l=o._snapshot,u=typeof s=="function"?s(l):s===void 0&&n?r(l):s;return l===void 0||!i(l,u)?(o._snapshot=u,!0):!1}finally{At=a,n&&(o.flags&=~Ee.RecursedCheck),Eo(o)}}};return n?(o.flags=Ee.Mutable|Ee.Dirty,o.get=function(){const s=o.flags;if(s&Ee.Dirty||s&Ee.Pending&&au(o.deps,o)){if(o._update()){const a=o.subs;a!==void 0&&lc(a)}}else s&Ee.Pending&&(o.flags=s&~Ee.Pending);return At!==void 0&&cc(o,At,ho),o._snapshot}):o.set=function(s){if(o._update(s)){const a=o.subs;a!==void 0&&(T1(a),lc(a),iu())}},o}function P1(e){const t=()=>{const r=At;At=n,++ho,n.depsTail=void 0,n.flags=Ee.Watching|Ee.RecursedCheck;try{return e()}finally{At=r,n.flags&=~Ee.RecursedCheck,Eo(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ee.Watching|Ee.RecursedCheck,notify(){const r=this.flags;r&Ee.Dirty||r&Ee.Pending&&au(this.deps,this)?t():this.flags=Ee.Watching},stop(){this.flags=Ee.None,this.depsTail=void 0,Eo(this)}};return t(),n}class M1{constructor(t){this.atom=cu(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(ri(t))}}class _1{constructor(t){this.atom=cu(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(ri(t))}}function N1(e){return typeof e=="function"?new _1(e):new M1(e)}function O1(e){try{b1(),e()}finally{x1(),iu()}}const Yt="__TSR_index",uc="popstate",dc="beforeunload";function I1(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(i=>i({location:t,action:a}))},o=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},s=async({task:a,navigateOpts:i,...l})=>{if(i?.ignoreBlocker??!1){a();return}const f=e.getBlockers?.()??[],d=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&f.length&&d)for(const p of f){const m=So(l.path,l.state);if(await p.blockerFn({currentLocation:t,nextLocation:m,action:l.type})){e.onBlocked?.();return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,i,l)=>{const u=t.state[Yt];i=fc(u+1,i),s({task:()=>{e.pushState(a,i),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:a,state:i})},replace:(a,i,l)=>{const u=t.state[Yt];i=fc(u,i),s({task:()=>{e.replaceState(a,i),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:a,state:i})},go:(a,i)=>{s({task:()=>{e.go(a),o({type:"GO",index:a})},navigateOpts:i,type:"GO"})},back:a=>{s({task:()=>{e.back(a?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{s({task:()=>{e.forward(a?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[Yt]!==0,createHref:a=>e.createHref(a),block:a=>{if(!e.setBlockers)return()=>{};const i=e.getBlockers?.()??[];return e.setBlockers([...i,a]),()=>{const l=e.getBlockers?.()??[];e.setBlockers?.(l.filter(u=>u!==a))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function fc(e,t){t||(t={});const n=oi();return{...t,key:n,__TSR_key:n,[Yt]:e}}function D1(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const s=()=>o,a=S=>o=S,i=(S=>S),l=(()=>So(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const S=oi();t.history.replaceState({[Yt]:0,key:S,__TSR_key:S},"")}let u=l(),f,d=!1,p=!1,m=!1,v=!1;const g=()=>u;let y,b;const x=()=>{y&&(C._ignoreSubscribers=!0,(y.isPush?t.history.pushState:t.history.replaceState)(y.state,"",y.href),C._ignoreSubscribers=!1,y=void 0,b=void 0,f=void 0)},w=(S,N,I)=>{const P=i(N);b||(f=u),u=So(N,I),y={href:P,state:I,isPush:y?.isPush||S==="push"},b||(b=Promise.resolve().then(()=>x()))},E=S=>{u=l(),C.notify({type:S})},T=async()=>{if(p){p=!1;return}const S=l(),N=S.state[Yt]-u.state[Yt],I=N===1,P=N===-1,H=!I&&!P||d;d=!1;const z=H?"GO":P?"BACK":"FORWARD",L=H?{type:"GO",index:N}:{type:P?"BACK":"FORWARD"};if(m)m=!1;else{const k=s();if(typeof document<"u"&&k.length){for(const A of k)if(await A.blockerFn({currentLocation:u,nextLocation:S,action:z})){p=!0,t.history.go(1),C.notify(L);return}}}u=l(),C.notify(L)},O=S=>{if(v){v=!1;return}let N=!1;const I=s();if(typeof document<"u"&&I.length)for(const P of I){const H=P.enableBeforeUnload??!0;if(H===!0){N=!0;break}if(typeof H=="function"&&H()===!0){N=!0;break}}if(N)return S.preventDefault(),S.returnValue=""},C=I1({getLocation:g,getLength:()=>t.history.length,pushState:(S,N)=>w("push",S,N),replaceState:(S,N)=>w("replace",S,N),back:S=>(S&&(m=!0),v=!0,t.history.back()),forward:S=>{S&&(m=!0),v=!0,t.history.forward()},go:S=>{d=!0,t.history.go(S)},createHref:S=>i(S),flush:x,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(dc,O,{capture:!0}),t.removeEventListener(uc,T)},onBlocked:()=>{f&&u!==f&&(u=f)},getBlockers:s,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(dc,O,{capture:!0}),t.addEventListener(uc,T),t.history.pushState=function(...S){const N=n.apply(t.history,S);return C._ignoreSubscribers||E("PUSH"),N},t.history.replaceState=function(...S){const N=r.apply(t.history,S);return C._ignoreSubscribers||E("REPLACE"),N},C}function L1(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function So(e,t){const n=L1(e),r=n.indexOf("#"),o=n.indexOf("?"),s=oi();return{href:n,pathname:n.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:n.length),hash:r>-1?n.substring(r):"",search:o>-1?n.slice(o,r===-1?void 0:r):"",state:t||{[Yt]:0,key:s,__TSR_key:s}}}function oi(){return(Math.random()+1).toString(36).substring(7)}const j1=!1;function gr(e){let t;return O1(()=>{t=e()}),t}function wr(e){return e[e.length-1]}function k1(e){return typeof e=="function"}function Wt(e,t){return k1(e)?e(t):e}const F1=Object.prototype.hasOwnProperty,hc=Object.prototype.propertyIsEnumerable;function st(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,o=gc(e)&&gc(r);if(!o&&!(Ro(e)&&Ro(r)))return r;const s=o?e:pc(e);if(!s)return r;const a=o?r:pc(r);if(!a)return r;const i=s.length,l=a.length,u=o?new Array(l):{};let f=0;for(let d=0;d<l;d++){const p=o?d:a[d],m=e[p],v=r[p];if(m===v){u[p]=m,(o?d<i:F1.call(e,p))&&f++;continue}if(m===null||v===null||typeof m!="object"||typeof v!="object"){u[p]=v;continue}const g=st(m,v,n+1);u[p]=g,g===m&&f++}return i===l&&f===i?e:u}function pc(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!hc.call(e,o))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const o of n){if(!hc.call(e,o))return!1;r.push(o)}return r}function Ro(e){if(!mc(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!mc(n)||!n.hasOwnProperty("isPrototypeOf"))}function mc(e){return Object.prototype.toString.call(e)==="[object Object]"}function gc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ln(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,o=e.length;r<o;r++)if(!ln(e[r],t[r],n))return!1;return!0}if(Ro(e)&&Ro(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in t)if((!r||t[a]!==void 0)&&!ln(e[a],t[a],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const a in e)e[a]!==void 0&&o++;let s=0;for(const a in t)if((!r||t[a]!==void 0)&&(s++,s>o||!ln(e[a],t[a],n)))return!1;return o===s}return!1}function Zn(e){let t,n;const r=new Promise((o,s)=>{t=o,n=s});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,t(o),e?.(o)},r.reject=o=>{r.status="rejected",n(o)},r}function $1(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Er(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function H1(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function vc(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return H1(t)}const B1=["http:","https:","mailto:","tel:"];function Co(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function sr(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",o;for(;(o=t.exec(e))!==null;)r+=vc(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+vc(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function V1(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var Z1="Invariant failed";function Jt(e,t){if(!e)throw new Error(Z1)}function Ao(e){const t=new Map;let n,r;const o=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const a=t.get(s);if(a)return o(a),a.value},set(s,a){if(t.size>=e&&n){const l=n;t.delete(l.key),l.next&&(n=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const i=t.get(s);if(i)i.value=a,o(i);else{const l={key:s,value:a,prev:r};r&&(r.next=l),r=l,n||(n=l),t.set(s,l)}},clear(){t.clear(),n=void 0,r=void 0}}}const Un=0,hn=1,pn=2,Sr=3,on=4,lu=5;function U1(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function si(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),o=r===-1?e.length:r,s=e.substring(t,o);if(!s||!s.includes("$"))return n[0]=Un,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(s==="$"){const i=e.length;return n[0]=pn,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}if(s.charCodeAt(0)===36)return n[0]=hn,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const a=U1(s);if(a){const[i,l]=a,u=s.charCodeAt(i+1);if(u===45){if(i+2<s.length&&s.charCodeAt(i+2)===36){const f=i+3,d=l;if(f<d)return n[0]=Sr,n[1]=t+i,n[2]=t+f,n[3]=t+d,n[4]=t+l+1,n[5]=o,n}}else if(u===36){const f=i+1,d=i+2;return d===l?(n[0]=pn,n[1]=t+i,n[2]=t+f,n[3]=t+d,n[4]=t+l+1,n[5]=e.length,n):(n[0]=hn,n[1]=t+i,n[2]=t+d,n[3]=t+l,n[4]=t+l+1,n[5]=o,n)}}return n[0]=Un,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function Yo(e,t,n,r,o,s,a){a?.(n);let i=r;{const l=n.fullPath??n.from,u=l.length,f=n.options?.caseSensitive??e,d=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;i<u;){const m=si(l,i,t);let v;const g=i,y=m[5];switch(i=y+1,s++,m[0]){case Un:{const x=l.substring(m[2],m[3]);if(f){const w=o.static?.get(x);if(w)v=w;else{o.static??=new Map;const E=sn(n.fullPath??n.from);E.parent=o,E.depth=s,v=E,o.static.set(x,E)}}else{const w=x.toLowerCase(),E=o.staticInsensitive?.get(w);if(E)v=E;else{o.staticInsensitive??=new Map;const T=sn(n.fullPath??n.from);T.parent=o,T.depth=s,v=T,o.staticInsensitive.set(w,T)}}break}case hn:{const x=l.substring(g,m[1]),w=l.substring(m[4],y),E=f&&!!(x||w),T=x?E?x:x.toLowerCase():void 0,O=w?E?w:w.toLowerCase():void 0,C=!d&&o.dynamic?.find(S=>!S.skipOnParamError&&S.caseSensitive===E&&S.prefix===T&&S.suffix===O);if(C)v=C;else{const S=js(hn,n.fullPath??n.from,E,T,O);v=S,S.depth=s,S.parent=o,o.dynamic??=[],o.dynamic.push(S)}break}case Sr:{const x=l.substring(g,m[1]),w=l.substring(m[4],y),E=f&&!!(x||w),T=x?E?x:x.toLowerCase():void 0,O=w?E?w:w.toLowerCase():void 0,C=!d&&o.optional?.find(S=>!S.skipOnParamError&&S.caseSensitive===E&&S.prefix===T&&S.suffix===O);if(C)v=C;else{const S=js(Sr,n.fullPath??n.from,E,T,O);v=S,S.parent=o,S.depth=s,o.optional??=[],o.optional.push(S)}break}case pn:{const x=l.substring(g,m[1]),w=l.substring(m[4],y),E=f&&!!(x||w),T=x?E?x:x.toLowerCase():void 0,O=w?E?w:w.toLowerCase():void 0,C=js(pn,n.fullPath??n.from,E,T,O);v=C,C.parent=o,C.depth=s,o.wildcard??=[],o.wildcard.push(C)}}o=v}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const m=sn(n.fullPath??n.from);m.kind=lu,m.parent=o,s++,m.depth=s,o.pathless??=[],o.pathless.push(m),o=m}const p=(n.path||!n.children)&&!n.isRoot;if(p&&l.endsWith("/")){const m=sn(n.fullPath??n.from);m.kind=on,m.parent=o,s++,m.depth=s,o.index=m,o=m}o.parse=n.options?.params?.parse??null,o.skipOnParamError=d,o.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,p&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const l of n.children)Yo(e,t,l,i,o,s,a)}function Ls(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function zt(e){if(e.pathless)for(const t of e.pathless)zt(t);if(e.static)for(const t of e.static.values())zt(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())zt(t);if(e.dynamic?.length){e.dynamic.sort(Ls);for(const t of e.dynamic)zt(t)}if(e.optional?.length){e.optional.sort(Ls);for(const t of e.optional)zt(t)}if(e.wildcard?.length){e.wildcard.sort(Ls);for(const t of e.wildcard)zt(t)}}function sn(e){return{kind:Un,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function js(e,t,n,r,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:o}}function q1(e,t){const n=sn("/"),r=new Uint16Array(6);for(const o of e)Yo(!1,r,o,1,n,0);zt(n),t.masksTree=n,t.flatCache=Ao(1e3)}function z1(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=ai(e,t.masksTree);return t.flatCache.set(e,r),r}function K1(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let a=o.singleCache.get(s);if(!a){a=sn("/");const i=new Uint16Array(6);Yo(t,i,{from:e},1,a,0),o.singleCache.set(s,a)}return ai(r,a,n)}function W1(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,o=t.matchCache.get(r);if(o!==void 0)return o;e||="/";let s;try{s=ai(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)s=null;else throw a}return s&&(s.branch=Q1(s.route)),t.matchCache.set(r,s),s}function G1(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Y1(e,t=!1,n){const r=sn(e.fullPath),o=new Uint16Array(6),s={},a={};let i=0;return Yo(t,o,e,1,r,0,u=>{if(n?.(u,i),Jt(!(u.id in s),`Duplicate routes found with id: ${String(u.id)}`),s[u.id]=u,i!==0&&u.path){const f=G1(u.fullPath);(!a[f]||u.fullPath.endsWith("/"))&&(a[f]=u)}i++}),zt(r),{processedTree:{segmentTree:r,singleCache:Ao(1e3),matchCache:Ao(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:a}}function ai(e,t,n=!1){const r=e.split("/"),o=J1(e,r,t,n);if(!o)return null;const[s]=uu(e,r,o);return{route:o.node.route,rawParams:s,parsedParams:o.parsedParams}}function uu(e,t,n){const r=X1(n.node);let o=null;const s={};let a=n.extract?.part??0,i=n.extract?.node??0,l=n.extract?.path??0,u=n.extract?.segment??0;for(;i<r.length;a++,i++,l++,u++){const f=r[i];if(f.kind===on)break;if(f.kind===lu){u--,a--,l--;continue}const d=t[a],p=l;if(d&&(l+=d.length),f.kind===hn){o??=n.node.fullPath.split("/");const m=o[u],v=f.prefix?.length??0;if(m.charCodeAt(v)===123){const y=f.suffix?.length??0,b=m.substring(v+2,m.length-y-1),x=d.substring(v,d.length-y);s[b]=decodeURIComponent(x)}else{const y=m.substring(1);s[y]=decodeURIComponent(d)}}else if(f.kind===Sr){if(n.skipped&1<<i){a--,l=p-1;continue}o??=n.node.fullPath.split("/");const m=o[u],v=f.prefix?.length??0,g=f.suffix?.length??0,y=m.substring(v+3,m.length-g-1),b=f.suffix||f.prefix?d.substring(v,d.length-g):d;b&&(s[y]=decodeURIComponent(b))}else if(f.kind===pn){const m=f,v=e.substring(p+(m.prefix?.length??0),e.length-(m.suffix?.length??0)),g=decodeURIComponent(v);s["*"]=g,s._splat=g;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:a,node:i,path:l,segment:u}]}function Q1(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function X1(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function J1(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!wr(t),s=o&&e!=="/",a=t.length-(o?1:0),i=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let l=null,u=null,f=null;for(;i.length;){const d=i.pop(),{node:p,index:m,skipped:v,depth:g,statics:y,dynamics:b,optionals:x}=d;let{extract:w,rawParams:E,parsedParams:T}=d;if(p.skipOnParamError){if(!ks(e,t,d))continue;E=d.rawParams,w=d.extract,T=d.parsedParams}r&&p.route&&p.kind!==on&&ar(u,d)&&(u=d);const O=m===a;if(O&&(p.route&&!s&&ar(f,d)&&(f=d),!p.optional&&!p.wildcard&&!p.index&&!p.pathless))continue;const C=O?void 0:t[m];let S;if(O&&p.index){const N={node:p.index,index:m,skipped:v,depth:g+1,statics:y,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:T};let I=!0;if(p.index.skipOnParamError&&(ks(e,t,N)||(I=!1)),I){if(y===a&&!b&&!x&&!v)return N;ar(f,N)&&(f=N)}}if(p.wildcard&&ar(l,d))for(const N of p.wildcard){const{prefix:I,suffix:P}=N;if(I&&(O||!(N.caseSensitive?C:S??=C.toLowerCase()).startsWith(I)))continue;if(P){if(O)continue;const z=t.slice(m).join("/").slice(-P.length);if((N.caseSensitive?z:z.toLowerCase())!==P)continue}const H={node:N,index:a,skipped:v,depth:g,statics:y,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:T};if(!(N.skipOnParamError&&!ks(e,t,H))){l=H;break}}if(p.optional){const N=v|1<<g,I=g+1;for(let P=p.optional.length-1;P>=0;P--){const H=p.optional[P];i.push({node:H,index:m,skipped:N,depth:I,statics:y,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:T})}if(!O)for(let P=p.optional.length-1;P>=0;P--){const H=p.optional[P],{prefix:z,suffix:L}=H;if(z||L){const k=H.caseSensitive?C:S??=C.toLowerCase();if(z&&!k.startsWith(z)||L&&!k.endsWith(L))continue}i.push({node:H,index:m+1,skipped:v,depth:I,statics:y,dynamics:b,optionals:x+1,extract:w,rawParams:E,parsedParams:T})}}if(!O&&p.dynamic&&C)for(let N=p.dynamic.length-1;N>=0;N--){const I=p.dynamic[N],{prefix:P,suffix:H}=I;if(P||H){const z=I.caseSensitive?C:S??=C.toLowerCase();if(P&&!z.startsWith(P)||H&&!z.endsWith(H))continue}i.push({node:I,index:m+1,skipped:v,depth:g+1,statics:y,dynamics:b+1,optionals:x,extract:w,rawParams:E,parsedParams:T})}if(!O&&p.staticInsensitive){const N=p.staticInsensitive.get(S??=C.toLowerCase());N&&i.push({node:N,index:m+1,skipped:v,depth:g+1,statics:y+1,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:T})}if(!O&&p.static){const N=p.static.get(C);N&&i.push({node:N,index:m+1,skipped:v,depth:g+1,statics:y+1,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:T})}if(p.pathless){const N=g+1;for(let I=p.pathless.length-1;I>=0;I--){const P=p.pathless[I];i.push({node:P,index:m,skipped:v,depth:N,statics:y,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:T})}}}if(f&&l)return ar(l,f)?f:l;if(f)return f;if(l)return l;if(r&&u){let d=u.index;for(let m=0;m<u.index;m++)d+=t[m].length;const p=d===e.length?"/":e.slice(d);return u.rawParams??={},u.rawParams["**"]=decodeURIComponent(p),u}return null}function ks(e,t,n){try{const[r,o]=uu(e,t,n);n.rawParams=r,n.extract=o;const s=n.node.parse(r);return n.parsedParams=Object.assign({},n.parsedParams,s),!0}catch{return null}}function ar(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===on)>(e.node.kind===on)||t.node.kind===on==(e.node.kind===on)&&t.depth>e.depth))):!0}function po(e){return ii(e.filter(t=>t!==void 0).join("/"))}function ii(e){return e.replace(/\/{2,}/g,"/")}function du(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Qt(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function fu(e){return Qt(du(e))}function To(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function em(e,t,n){return To(e,n)===To(t,n)}function tm({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),s=!o&&t===".";let a;if(r){a=o?t:s?e:e+"\0"+t;const d=r.get(a);if(d)return d}let i;if(s)i=e.split("/");else if(o)i=t.split("/");else{for(i=e.split("/");i.length>1&&wr(i)==="";)i.pop();const d=t.split("/");for(let p=0,m=d.length;p<m;p++){const v=d[p];v===""?p?p===m-1&&i.push(v):i=[v]:v===".."?i.pop():v==="."||i.push(v)}}i.length>1&&(wr(i)===""?n==="never"&&i.pop():n==="always"&&i.push(""));let l,u="";for(let d=0;d<i.length;d++){d>0&&(u+="/");const p=i[d];if(!p)continue;l=si(p,0,l);const m=l[0];if(m===Un){u+=p;continue}const v=l[5],g=p.substring(0,l[1]),y=p.substring(l[4],v),b=p.substring(l[2],l[3]);m===hn?u+=g||y?`${g}{$${b}}${y}`:`$${b}`:m===pn?u+=g||y?`${g}{$}${y}`:"$":u+=`${g}{-$${b}}${y}`}u=ii(u);const f=u||"/";return a&&r&&r.set(a,f),f}function nm(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),n=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return o=>o.replace(r,s=>t.get(s)??s)}function Fs(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>bc(o,n)).join("/"):bc(r,n)}function yc({path:e,params:t,decoder:n,...r}){let o=!1;const s={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:o};const a=e.length;let i=0,l,u="";for(;i<a;){const d=i;l=si(e,d,l);const p=l[5];if(i=p+1,d===p)continue;const m=l[0];if(m===Un){u+="/"+e.substring(d,p);continue}if(m===pn){const v=t._splat;s._splat=v,s["*"]=v;const g=e.substring(d,l[1]),y=e.substring(l[4],p);if(!v){o=!0,(g||y)&&(u+="/"+g+y);continue}const b=Fs("_splat",t,n);u+="/"+g+b+y;continue}if(m===hn){const v=e.substring(l[2],l[3]);!o&&!(v in t)&&(o=!0),s[v]=t[v];const g=e.substring(d,l[1]),y=e.substring(l[4],p),b=Fs(v,t,n)??"undefined";u+="/"+g+b+y;continue}if(m===Sr){const v=e.substring(l[2],l[3]),g=t[v];if(g==null)continue;s[v]=g;const y=e.substring(d,l[1]),b=e.substring(l[4],p),x=Fs(v,t,n)??"";u+="/"+y+x+b;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:s,interpolatedPath:u||"/",isMissingParams:o}}function bc(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function hu(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function et(e){return!!e?.isNotFound}function rm(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const ha="tsr-scroll-restoration-v1_3",om=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function sm(){const e=rm();if(!e)return null;const t=e.getItem(ha);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=Wt(r,n)||n;try{e.setItem(ha,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Xr=sm(),am=e=>e.state.__TSR_key||e.href;function im(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Po=!1;function cm({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:o,location:s}){let a;try{a=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(u){console.error(u);return}const i=t||window.history.state?.__TSR_key,l=a[i];Po=!0;e:{if(r&&l&&Object.keys(l).length>0){for(const d in l){const p=l[d];if(d==="window")window.scrollTo({top:p.scrollY,left:p.scrollX,behavior:n});else if(d){const m=document.querySelector(d);m&&(m.scrollLeft=p.scrollX,m.scrollTop=p.scrollY)}}break e}const u=(s??window.location).hash.split("#",2)[1];if(u){const d=window.history.state?.__hashScrollIntoViewOptions??!0;if(d){const p=document.getElementById(u);p&&p.scrollIntoView(d)}break e}const f={top:0,left:0,behavior:n};if(window.scrollTo(f),o)for(const d of o){if(d==="window")continue;const p=typeof d=="function"?d():document.querySelector(d);p&&p.scrollTo(f)}}Po=!1}function lm(e,t){if(!Xr||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!Xr))return;e.isScrollRestorationSetup=!0,Po=!1;const r=e.options.getScrollRestorationKey||am;window.history.scrollRestoration="manual";const o=s=>{if(Po||!e.isScrollRestoring)return;let a="";if(s.target===document||s.target===window)a="window";else{const l=s.target.getAttribute("data-scroll-restoration-id");l?a=`[data-scroll-restoration-id="${l}"]`:a=im(s.target)}const i=r(e.state.location);Xr.set(l=>{const u=l[i]||={},f=u[a]||={};if(a==="window")f.scrollX=window.scrollX||0,f.scrollY=window.scrollY||0;else if(a){const d=document.querySelector(a);d&&(f.scrollX=d.scrollLeft||0,f.scrollY=d.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",om(o,100),!0),e.subscribe("onRendered",s=>{const a=r(s.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(cm({storageKey:ha,key:a,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Xr.set(i=>(i[a]||={},i)))})}function um(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function dm(e,t=String){const n=new URLSearchParams;for(const r in e){const o=e[r];o!==void 0&&n.set(r,t(o))}return n.toString()}function $s(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function fm(e){const t=new URLSearchParams(e),n={};for(const[r,o]of t.entries()){const s=n[r];s==null?n[r]=$s(o):Array.isArray(s)?s.push($s(o)):n[r]=[s,$s(o)]}return n}const hm=mm(JSON.parse),pm=gm(JSON.stringify,JSON.parse);function mm(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=fm(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function gm(e,t){const n=typeof t=="function";function r(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const s=dm(o,r);return s?`?${s}`:""}}const ft="__root__";function pu(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function at(e){return e instanceof Response&&!!e.options}const pa=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Qo=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),$n=(e,t,n=!0)=>{const r={...e.router.options.context??{}},o=n?t:t-1;for(let s=0;s<=o;s++){const a=e.matches[s];if(!a)continue;const i=e.router.getMatch(a.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},xc=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(a=>a.routeId===e.router.routeTree.id),o=r>=0?r:0;let s=n?e.matches.findIndex(a=>a.routeId===n):e.firstBadMatchIndex??e.matches.length-1;s<0&&(s=o);for(let a=s;a>=0;a--){const i=e.matches[a];if(e.router.looseRoutesById[i.routeId].options.notFoundComponent)return a}return n?s:o},Gt=(e,t,n)=>{if(!(!at(n)&&!et(n)))throw at(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:at(n)?"redirected":r.status==="pending"?"success":r.status,context:$n(e,t.index),isFetching:!1,error:n})),et(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),at(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},mu=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,ir=(e,t,n,r)=>{const{id:o,routeId:s}=e.matches[t],a=e.router.looseRoutesById[s];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Gt(e,e.router.getMatch(o),n);try{a.options.onError?.(n)}catch(i){n=i,Gt(e,e.router.getMatch(o),n)}e.updateMatch(o,i=>(i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,i._nonReactive.loadPromise?.resolve(),{...i,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!at(n)&&!et(n)&&(e.serialError??=n)},gu=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Qo(e,t)&&(n.options.loader||n.options.beforeLoad||yu(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const a=setTimeout(()=>{pa(e)},o);r._nonReactive.pendingTimeout=a}},vm=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;gu(e,t,n,r);const o=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Gt(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},ym=(e,t,n,r)=>{const o=e.router.getMatch(t),s=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Zn(()=>{s?.resolve()});const{paramsError:a,searchError:i}=o;a&&ir(e,n,a,"PARSE_PARAMS"),i&&ir(e,n,i,"VALIDATE_SEARCH"),gu(e,t,r,o);const l=new AbortController;let u=!1;const f=()=>{u||(u=!0,e.updateMatch(t,E=>({...E,isFetching:"beforeLoad",fetchCount:E.fetchCount+1,abortController:l})))},d=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,E=>({...E,isFetching:!1}))};if(!r.options.beforeLoad){gr(()=>{f(),d()});return}o._nonReactive.beforeLoadPromise=Zn();const p={...$n(e,n,!1),...o.__routeContext},{search:m,params:v,cause:g}=o,y=Qo(e,t),b={search:m,abortController:l,params:v,preload:y,context:p,location:e.location,navigate:E=>e.router.navigate({...E,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:y?"preload":g,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},x=E=>{if(E===void 0){gr(()=>{f(),d()});return}(at(E)||et(E))&&(f(),ir(e,n,E,"BEFORE_LOAD")),gr(()=>{f(),e.updateMatch(t,T=>({...T,__beforeLoadContext:E})),d()})};let w;try{if(w=r.options.beforeLoad(b),Er(w))return f(),w.catch(E=>{ir(e,n,E,"BEFORE_LOAD")}).then(x)}catch(E){f(),ir(e,n,E,"BEFORE_LOAD")}x(w)},bm=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],s=()=>i(),a=()=>ym(e,n,t,o),i=()=>{if(mu(e,n))return;const l=vm(e,n,o);return Er(l)?l.then(a):a()};return s()},xm=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([s,a,i])=>{const l=s?.meta,u=s?.links,f=s?.scripts,d=s?.styles;return{meta:l,links:u,headScripts:f,headers:i,scripts:a,styles:d}})},vu=(e,t,n,r,o)=>{const s=t[r-1],{params:a,loaderDeps:i,abortController:l,cause:u}=e.router.getMatch(n),f=$n(e,r),d=Qo(e,n);return{params:a,deps:i,preload:!!d,parentMatchPromise:s,abortController:l,context:f,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:d?"preload":u,route:o,...e.router.options.additionalContext}},wc=async(e,t,n,r,o)=>{try{const s=e.router.getMatch(n);try{(!(j1??e.router.isServer)||s.ssr===!0)&&Mo(o);const a=o.options.loader?.(vu(e,t,n,r,o)),i=o.options.loader&&Er(a);if((i||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(n,f=>({...f,isFetching:"loader"})),o.options.loader){const f=i?await a:a;Gt(e,e.router.getMatch(n),f),f!==void 0&&e.updateMatch(n,d=>({...d,loaderData:f}))}o._lazyPromise&&await o._lazyPromise;const u=s._nonReactive.minPendingPromise;u&&await u,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,f=>({...f,error:void 0,context:$n(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let i=a;if(i?.name==="AbortError"){if(s.abortController.signal.aborted){s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,u=>({...u,status:u.status==="pending"?"success":u.status,isFetching:!1,context:$n(e,r)}));return}const l=s._nonReactive.minPendingPromise;l&&await l,et(a)&&await o.options.notFoundComponent?.preload?.(),Gt(e,e.router.getMatch(n),a);try{o.options.onError?.(a)}catch(u){i=u,Gt(e,e.router.getMatch(n),u)}e.updateMatch(n,u=>({...u,error:i,context:$n(e,r),status:"error",isFetching:!1}))}}catch(s){const a=e.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Gt(e,a,s)}},wm=async(e,t,n)=>{async function r(d,p,m,v){const g=Date.now()-p.updatedAt,y=d?v.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:v.options.staleTime??e.router.options.defaultStaleTime??0,b=v.options.shouldReload,x=typeof b=="function"?b(vu(e,t,o,n,v)):b,{status:w,invalid:E}=m;a=w==="success"&&(E||(x??g>y)),d&&v.options.preload===!1||(a&&!e.sync?(i=!0,(async()=>{try{await wc(e,t,o,n,v);const T=e.router.getMatch(o);T._nonReactive.loaderPromise?.resolve(),T._nonReactive.loadPromise?.resolve(),T._nonReactive.loaderPromise=void 0}catch(T){at(T)&&await e.router.navigate(T.options)}})()):(w!=="success"||a&&e.sync)&&await wc(e,t,o,n,v))}const{id:o,routeId:s}=e.matches[n];let a=!1,i=!1;const l=e.router.looseRoutesById[s];if(!mu(e,o)){const d=e.router.getMatch(o),p=Qo(e,o);if(d._nonReactive.loaderPromise){if(d.status==="success"&&!e.sync&&!d.preload)return d;await d._nonReactive.loaderPromise;const m=e.router.getMatch(o),v=m._nonReactive.error||m.error;v&&Gt(e,m,v),m.status==="pending"&&await r(p,d,m,l)}else{const m=p&&!e.router.state.matches.some(g=>g.id===o),v=e.router.getMatch(o);v._nonReactive.loaderPromise=Zn(),m!==v.preload&&e.updateMatch(o,g=>({...g,preload:m})),await r(p,d,v,l)}}const u=e.router.getMatch(o);i||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve()),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,i||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;const f=i?u.isFetching:!1;return f!==u.isFetching||u.invalid!==!1?(e.updateMatch(o,d=>({...d,isFetching:f,invalid:!1})),e.router.getMatch(o)):u};async function Ec(e){const t=e,n=[];t.router.state.matches.some(p=>p._forcePending)&&pa(t);let r;for(let p=0;p<t.matches.length;p++){try{const m=bm(t,p);Er(m)&&await m}catch(m){if(at(m))throw m;if(et(m))r=m;else if(!t.preload)throw m;break}if(t.serialError)break}const o=t.firstBadMatchIndex??t.matches.length,s=r&&!t.preload?xc(t,r):void 0,a=r&&t.preload?0:s!==void 0?Math.min(s+1,o):o;let i,l;for(let p=0;p<a;p++)n.push(wm(t,n,p));try{await Promise.all(n)}catch{const p=await Promise.allSettled(n);for(const m of p){if(m.status!=="rejected")continue;const v=m.reason;if(at(v))throw v;et(v)?i??=v:l??=v}if(l!==void 0)throw l}const u=i??(r&&!t.preload?r:void 0);let f=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!u&&r&&t.preload)return t.matches;if(u){const p=xc(t,u);Jt(p!==void 0);const m=t.matches[p],v=t.router.looseRoutesById[m.routeId],g=t.router.options?.defaultNotFoundComponent;!v.options.notFoundComponent&&g&&(v.options.notFoundComponent=g),u.routeId=m.routeId;const y=m.routeId===t.router.routeTree.id;t.updateMatch(m.id,b=>({...b,...y?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),f=p,await Mo(v)}else if(!t.preload){const p=t.matches[0];p.globalNotFound||t.router.getMatch(p.id)?.globalNotFound&&t.updateMatch(p.id,v=>({...v,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const p=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Mo(p)}for(let p=0;p<=f;p++){const m=t.matches[p],{id:v,routeId:g}=m,y=t.router.looseRoutesById[g];try{const b=xm(t,v,y);if(b){const x=await b;t.updateMatch(v,w=>({...w,...x}))}}catch(b){console.error(`Error executing head for route ${g}:`,b)}}const d=pa(t);if(Er(d)&&await d,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}async function Mo(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of bu){const o=e.options[r]?.preload;o&&n.push(o())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function yu(e){for(const t of bu)if(e.options[t]?.preload)return!0;return!1}const bu=["component","errorComponent","pendingComponent","notFoundComponent"];function Em(e){return{input:({url:t})=>{for(const n of e)t=ma(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=xu(e[n],t);return t}}}function Sm(e){const t=fu(e.basepath),n=`/${t}`,r=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),s=e.caseSensitive?r:r.toLowerCase();return{input:({url:a})=>{const i=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return i===o?a.pathname="/":i.startsWith(s)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=po(["/",t,a.pathname]),a)}}function ma(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function xu(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function un(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,o=t?.href!==n.href,s=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:o,hashChanged:s}}function Rm(e){const t=e.filter(n=>n.status!=="redirected");return t.length===e.length?e:t}class Cm{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{const r=this.options,o=this.basepath??r?.basepath??"/",s=this.basepath===void 0,a=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=nm(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=D1()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let p;this.resolvePathCache=Ao(1e3),p=this.buildRouteTree(),this.setRoutes(p)}!this.__store&&this.latestLocation&&(this.__store=N1(Tm(this.latestLocation)),lm(this));let i=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(s||o!==l||a!==u){this.basepath=l;const p=[],m=fu(l);m&&m!=="/"&&p.push(Sm({basepath:l})),u&&p.push(u),this.rewrite=p.length===0?void 0:p.length===1?p[0]:Em(p),this.history&&this.updateLatestLocation(),i=!0}i&&this.__store&&this.__store.setState(p=>({...p,location:this.latestLocation})),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=Y1(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&q1(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const o={eventType:n,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const o=({pathname:l,search:u,hash:f,href:d,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const x=this.options.parseSearch(u),w=this.options.stringifySearch(x);return{href:l+w+f,publicHref:d,pathname:sr(l).path,external:!1,searchStr:w,search:st(r?.search,x),hash:sr(f.slice(1)).path,state:st(r?.state,p)}}const m=new URL(d,this.origin),v=ma(this.rewrite,m),g=this.options.parseSearch(v.search),y=this.options.stringifySearch(g);return v.search=y,{href:v.href.replace(v.origin,""),publicHref:d,pathname:sr(v.pathname).path,external:!!this.rewrite&&v.origin!==this.origin,searchStr:y,search:st(r?.search,g),hash:sr(v.hash.slice(1)).path,state:st(r?.state,p)}},s=o(n),{__tempLocation:a,__tempKey:i}=s.state;if(a&&(!i||i===this.tempLocationKey)){const l=o(a);return l.state.key=s.state.key,l.state.__TSR_key=s.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>tm({base:n,to:ii(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},o):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>Pm({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(s=>s.status==="pending"),r=this.state.matches.filter(s=>s.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(s=>{this.cancelMatch(s.id)})},this.buildLocation=n=>{const r=(s={})=>{const a=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,i=this.matchRoutesLightweight(a);s.from;const l=s.unsafeRelative==="path"?a.pathname:s.from??i.fullPath,u=this.resolvePathWithBase(l,"."),f=i.search,d={...i.params},p=s.to?this.resolvePathWithBase(u,`${s.to}`):this.resolvePathWithBase(u,"."),m=s.params===!1||s.params===null?{}:(s.params??!0)===!0?d:Object.assign(d,Wt(s.params,d)),v=this.getMatchedRoutes(p);let g=v.matchedRoutes;if((!v.foundRoute||v.foundRoute.path!=="/"&&v.routeParams["**"])&&this.options.notFoundRoute&&(g=[...g,this.options.notFoundRoute]),Object.keys(m).length>0)for(const P of g){const H=P.options.params?.stringify??P.options.stringifyParams;if(H)try{Object.assign(m,H(m))}catch{}}const b=n.leaveParams?p:sr(yc({path:p,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=f;if(n._includeValidateSearch&&this.options.search?.strict){const P={};g.forEach(H=>{if(H.options.validateSearch)try{Object.assign(P,mo(H.options.validateSearch,{...P,...x}))}catch{}}),x=P}x=Mm({search:x,dest:s,destRoutes:g,_includeValidateSearch:n._includeValidateSearch}),x=st(f,x);const w=this.options.stringifySearch(x),E=s.hash===!0?a.hash:s.hash?Wt(s.hash,a.hash):void 0,T=E?`#${E}`:"";let O=s.state===!0?a.state:s.state?Wt(s.state,a.state):{};O=st(a.state,O);const C=`${b}${w}${T}`;let S,N,I=!1;if(this.rewrite){const P=new URL(C,this.origin),H=xu(this.rewrite,P);S=P.href.replace(P.origin,""),H.origin!==this.origin?(N=H.href,I=!0):N=H.pathname+H.search+H.hash}else S=V1(C),N=S;return{publicHref:N,href:S,pathname:b,search:x,searchStr:w,state:O,hash:E??"",external:I,unmaskOnReload:s.unmaskOnReload}},o=(s={},a)=>{const i=r(s);let l=a?r(a):void 0;if(!l){const u={};if(this.options.routeMasks){const f=z1(i.pathname,this.processedTree);if(f){Object.assign(u,f.rawParams);const{from:d,params:p,...m}=f.route,v=p===!1||p===null?{}:(p??!0)===!0?u:Object.assign(u,Wt(p,u));a={from:n.from,...m,params:v},l=r(a)}}}return l&&(i.maskedLocation=l),i};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...o})=>{const s=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(f=>{o.state[f]=this.latestLocation.state[f]});const u=ln(o.state,this.latestLocation.state);return l.forEach(f=>{delete o.state[f]}),u},a=Qt(this.latestLocation.href)===Qt(o.href),i=this.commitLocationPromise;if(this.commitLocationPromise=Zn(()=>{i?.resolve()}),a&&s())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...f}=o;l&&(f={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](f.publicHref,f.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:s,ignoreBlocker:a,href:i,...l}={})=>{if(i){const d=this.history.location.state.__TSR_index,p=So(i,{__TSR_index:n?d:d+1}),m=new URL(p.pathname,this.origin),v=ma(this.rewrite,m);l.to=v.pathname,l.search=this.options.parseSearch(p.search),l.hash=p.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const f=this.commitLocation({...u,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),f},this.navigate=async({to:n,reloadDocument:r,href:o,publicHref:s,...a})=>{let i=!1;if(o)try{new URL(`${o}`),i=!0}catch{}if(i&&!r&&(r=!0),r){if(n!==void 0||!o){const u=this.buildLocation({to:n,...a});o=o??u.publicHref,s=s??u.publicHref}const l=!i&&s?s:o;if(Co(l,this.protocolAllowlist))return Promise.resolve();if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const d of f)if(d?.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return a.replace?window.location.replace(l):window.location.href=l,Promise.resolve()}return this.buildAndCommitLocation({...a,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(o=>!n.some(s=>s.id===o.id))}))},this.load=async n=>{let r,o,s;for(s=new Promise(i=>{this.startTransition(async()=>{try{this.beforeLoad();const l=this.latestLocation,u=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...un({resolvedLocation:u,location:l})}),this.emit({type:"onBeforeLoad",...un({resolvedLocation:u,location:l})}),await Ec({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:l,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let f=[],d=[],p=[],m=[];gr(()=>{this.__store.setState(v=>{const g=v.matches,y=v.pendingMatches||v.matches;return f=g.filter(b=>!y.some(x=>x.id===b.id)),d=g.filter(b=>!y.some(x=>x.routeId===b.routeId)),p=y.filter(b=>!g.some(x=>x.routeId===b.routeId)),m=y.filter(b=>g.some(x=>x.routeId===b.routeId)),{...v,isLoading:!1,loadedAt:Date.now(),matches:y,pendingMatches:void 0,cachedMatches:[...v.cachedMatches,...f.filter(b=>b.status!=="error"&&b.status!=="notFound"&&b.status!=="redirected")]}}),this.clearExpiredCache()}),[[d,"onLeave"],[p,"onEnter"],[m,"onStay"]].forEach(([v,g])=>{v.forEach(y=>{this.looseRoutesById[y.routeId].options[g]?.(y)})})})})}})}catch(l){at(l)?(r=l,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):et(l)&&(o=l),this.__store.setState(u=>({...u,statusCode:r?r.status:o?404:u.matches.some(f=>f.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===s&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.__store.state.matches.some(i=>i.status==="error")&&(a=500),a!==void 0&&this.__store.setState(i=>({...i,statusCode:a}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,a=this.state.resolvedLocation,i=typeof r.types=="function"?r.types(un({resolvedLocation:a,location:s})):r.types;if(i===!1){n();return}o={update:n,types:i}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const o=this.state.pendingMatches?.some(s=>s.id===n)?"pendingMatches":this.state.matches.some(s=>s.id===n)?"matches":this.state.cachedMatches.some(s=>s.id===n)?"cachedMatches":"";o&&(o==="cachedMatches"?this.__store.setState(s=>({...s,cachedMatches:Rm(s.cachedMatches.map(a=>a.id===n?r(a):a))})):this.__store.setState(s=>({...s,[o]:s[o]?.map(a=>a.id===n?r(a):a)})))})},this.getMatch=n=>{const r=o=>o.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.__store.setState(o=>({...o,matches:o.matches.map(r),cachedMatches:o.cachedMatches.map(r),pendingMatches:o.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),s=this.getParsedLocationHref(o);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const s=o.pathname+o.search+o.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&Co(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(s=>!r(s))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const o=this.looseRoutesById[r.routeId];if(!o.options.loader)return!0;const s=(r.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=s};this.clearCache({filter:n})},this.loadRouteChunk=Mo,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(i=>i.id)),a=new Set([...s,...this.state.cachedMatches.map(i=>i.id)]);gr(()=>{o.forEach(i=>{a.has(i.id)||this.__store.setState(l=>({...l,cachedMatches:[...l.cachedMatches,i]}))})});try{return o=await Ec({router:this,matches:o,location:r,preload:!0,updateMatch:(i,l)=>{s.has(i)?o=o.map(u=>u.id===i?l(u):u):this.updateMatch(i,l)}}),o}catch(i){if(at(i))return i.options.reloadDocument?void 0:await this.preloadRoute({...i.options,_fromLocation:r});et(i)||console.error(i);return}},this.matchRoute=(n,r)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(o);if(r?.pending&&this.state.status!=="pending")return!1;const i=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,l=K1(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,i.pathname,this.processedTree);return!l||n.params&&!ln(l.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?ln(i.search,s.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??pm,parseSearch:t.parseSearch??hm,protocolAllowlist:t.protocolAllowlist??B1}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:r}){this.routesById=t,this.routesByPath=n,this.processedTree=r;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:o,routeParams:s,parsedParams:a}=r;let{matchedRoutes:i}=r,l=!1;(o?o.path!=="/"&&s["**"]:Qt(t.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:l=!0);const u=l?Nm(this.options.notFoundMode,i):void 0,f=new Array(i.length),d=new Map(this.state.matches.map(p=>[p.routeId,p]));for(let p=0;p<i.length;p++){const m=i[p],v=f[p-1];let g,y,b;{const L=v?.search??t.search,k=v?._strictSearch??void 0;try{const A=mo(m.options.validateSearch,{...L})??void 0;g={...L,...A},y={...k,...A},b=void 0}catch(A){let D=A;if(A instanceof _o||(D=new _o(A.message,{cause:A})),n?.throwOnError)throw D;g=L,y={},b=D}}const x=m.options.loaderDeps?.({search:g})??"",w=x?JSON.stringify(x):"",{interpolatedPath:E,usedParams:T}=yc({path:m.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),O=m.id+E+w,C=this.getMatch(O),S=d.get(m.id),N=C?._strictParams??T;let I;if(!C)try{Sc(m,T,a,N)}catch(L){if(et(L)||at(L)?I=L:I=new Am(L.message,{cause:L}),n?.throwOnError)throw I}Object.assign(s,N);const P=S?"stay":"enter";let H;if(C)H={...C,cause:P,params:S?.params??s,_strictParams:N,search:st(S?S.search:C.search,g),_strictSearch:y};else{const L=m.options.loader||m.options.beforeLoad||m.lazyFn||yu(m)?"pending":"success";H={id:O,ssr:m.options.ssr,index:p,routeId:m.id,params:S?.params??s,_strictParams:N,pathname:E,updatedAt:Date.now(),search:S?st(S.search,g):g,_strictSearch:y,searchError:void 0,status:L,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:Zn()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:P,loaderDeps:S?st(S.loaderDeps,x):x,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}n?.preload||(H.globalNotFound=u===m.id),H.searchError=b;const z=this.getParentContext(v);H.context={...z,...H.__routeContext,...H.__beforeLoadContext},f[p]=H}for(let p=0;p<f.length;p++){const m=f[p],v=this.looseRoutesById[m.routeId],g=this.getMatch(m.id),y=d.get(m.routeId);if(m.params=y?st(y.params,s):s,!g){const b=f[p-1],x=this.getParentContext(b);if(v.options.context){const w={deps:m.loaderDeps,params:m.params,context:x??{},location:t,navigate:E=>this.navigate({...E,_fromLocation:t}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:f,routeId:v.id};m.__routeContext=v.options.context(w)??void 0}m.context={...x,...m.__routeContext,...m.__beforeLoadContext}}}return f}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:r,parsedParams:o}=this.getMatchedRoutes(t.pathname),s=wr(n),a={...t.search};for(const f of n)try{Object.assign(a,mo(f.options.validateSearch,a))}catch{}const i=wr(this.state.matches),l=i&&i.routeId===s.id&&t.pathname===this.state.location.pathname;let u;if(l)u=i.params;else{const f={...r};for(const d of n)try{Sc(d,r,o??{},f)}catch{}u=f}return{matchedRoutes:n,fullPath:s.fullPath,search:a,params:u}}}class _o extends Error{}class Am extends Error{}function Tm(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function mo(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new _o("Async validation not supported");if(n.issues)throw new _o(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function Pm({pathname:e,routesById:t,processedTree:n}){const r={},o=Qt(e);let s,a;const i=W1(o,n,!0);return i&&(s=i.route,Object.assign(r,i.rawParams),a=Object.assign({},i.parsedParams)),{matchedRoutes:i?.branch||[t[ft]],routeParams:r,foundRoute:s,parsedParams:a}}function Mm({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return _m(n)(e,t,r??!1)}function _m(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const s=({search:a,next:i})=>{let l=a;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(l=o.options.preSearchFilters.reduce((f,d)=>d(f),a));const u=i(l);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((f,d)=>d(f),u):u};t.middlewares.push(s)}if(o.options.validateSearch){const s=({search:a,next:i})=>{const l=i(a);if(!t._includeValidateSearch)return l;try{return{...l,...mo(o.options.validateSearch,l)??void 0}}catch{return l}};t.middlewares.push(s)}}const n=({search:o})=>{const s=t.dest;return s.search?s.search===!0?o:Wt(s.search,o):{}};t.middlewares.push(n);const r=(o,s,a)=>{if(o>=a.length)return s;const i=a[o];return i({search:s,next:u=>r(o+1,u,a)})};return function(s,a,i){return t.dest=a,t._includeValidateSearch=i,r(0,s,t.middlewares)}}function Nm(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return ft}function Sc(e,t,n,r){const o=e.options.params?.parse??e.options.parseParams;if(o)if(e.options.skipRouteOnParseError)for(const s in t)s in n&&(r[s]=n[s]);else{const s=o(r);Object.assign(r,s)}}const Om="Error preloading route! ☝️";class wu{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,o=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),o?this._path=ft:this.parentRoute||Jt(!1);let s=o?ft:r?.path;s&&s!=="/"&&(s=du(s));const a=r?.id||s;let i=o?ft:po([this.parentRoute.id===ft?"":this.parentRoute.id,a]);s===ft&&(s="/"),i!==ft&&(i=po(["/",i]));const l=i===ft?"/":po([this.parentRoute.fullPath,s]);this._path=s,this._id=i,this._fullPath=l,this._to=Qt(l)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>pu({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class Im{constructor({id:t}){this.notFound=n=>hu({routeId:this.id,...n}),this.redirect=n=>pu({from:this.id,...n}),this.id=t}}class Dm extends wu{constructor(t){super(t)}}const Lm="use",Rc=Wo[Lm],Jr=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Hs(e){const t=c.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function jm(e,t,n={},r={}){c.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([s])=>{t(s)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,r.disabled,e])}function km(e){const t=c.useRef(null);return c.useImperativeHandle(e,()=>t.current,[]),t}function ci(e){const t=e.errorComponent??li;return h.jsx(Fm,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?c.createElement(t,{error:n,reset:r}):e.children})}class Fm extends c.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function li({error:e}){const[t,n]=c.useState(!1);return h.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[h.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),h.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),h.jsx("div",{style:{height:".25rem"}}),t?h.jsx("div",{children:h.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?h.jsx("code",{children:e.message}):null})}):null]})}function $m({children:e,fallback:t=null}){return Eu()?h.jsx(M.Fragment,{children:e}):h.jsx(M.Fragment,{children:t})}function Eu(){return M.useSyncExternalStore(Hm,()=>!0,()=>!1)}function Hm(){return()=>{}}function Bm(e,t){return e===t}function Vm(e,t,n=Bm){const r=c.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:i}=e.subscribe(a);return i},[e]),o=c.useCallback(()=>e?.get(),[e]);return t1.useSyncExternalStoreWithSelector(r,o,o,t,n)}const Su=c.createContext(null);function Ge(e){const t=c.useContext(Su);return e?.warn,t}function it(e){const t=Ge({warn:e?.router===void 0}),n=e?.router||t,r=c.useRef(void 0);return Vm(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=st(r.current,e.select(o));return r.current=s,s}return e.select(o)}return o})}const Xo=c.createContext(void 0),Zm=c.createContext(void 0);function gt(e){const t=c.useContext(e.from?Zm:Xo);return it({select:r=>{const o=r.matches.find(s=>e.from?e.from===s.routeId:s.id===t);if(Jt(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function Jo(e){return gt({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function es(e){const{select:t,...n}=e;return gt({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function ts(e){return gt({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function ns(e){return gt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function En(e){const t=Ge();return c.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Um(e,t){const n=Ge(),r=km(t),{activeProps:o,inactiveProps:s,activeOptions:a,to:i,preload:l,preloadDelay:u,hashScrollIntoView:f,replace:d,startTransition:p,resetScroll:m,viewTransition:v,children:g,target:y,disabled:b,style:x,className:w,onClick:E,onBlur:T,onFocus:O,onMouseEnter:C,onMouseLeave:S,onTouchStart:N,ignoreBlocker:I,params:P,search:H,hash:z,state:L,mask:k,reloadDocument:A,unsafeRelative:D,from:j,_fromLocation:_,...V}=e,K=Eu(),Y=it({select:ce=>{const ve=ce.matches[ce.matches.length-1];return{search:ve?.search,hash:ce.location.hash,path:ve?.pathname}},structuralSharing:!0}),B=e.from,q=c.useMemo(()=>({...e,from:B}),[n,Y,B,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),U=c.useMemo(()=>n.buildLocation({...q}),[n,q]),J=U.maskedLocation?U.maskedLocation.publicHref:U.publicHref,$=U.maskedLocation?U.maskedLocation.external:U.external,F=c.useMemo(()=>Ym(J,$,n.history,b),[b,$,J,n.history]),ee=c.useMemo(()=>{if(F?.external)return Co(F.href,n.protocolAllowlist)?void 0:F.href;if(!Qm(i)&&!(typeof i!="string"||i.indexOf(":")===-1))try{return new URL(i),Co(i,n.protocolAllowlist)?void 0:i}catch{}},[i,F,n.protocolAllowlist]),Z=it({select:ce=>{if(ee)return!1;if(a?.exact){if(!em(ce.location.pathname,U.pathname,n.basepath))return!1}else{const ve=To(ce.location.pathname,n.basepath),Re=To(U.pathname,n.basepath);if(!(ve.startsWith(Re)&&(ve.length===Re.length||ve[Re.length]==="/")))return!1}return(a?.includeSearch??!0)&&!ln(ce.location.search,U.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?K&&ce.location.hash===U.hash:!0}}),X=Z?Wt(o,{})??qm:Bs,te=Z?Bs:Wt(s,{})??Bs,ie=[w,X.className,te.className].filter(Boolean).join(" "),ue=(x||X.style||te.style)&&{...x,...X.style,...te.style},[Qe,Fe]=c.useState(!1),qe=c.useRef(!1),ct=e.reloadDocument||ee?!1:l??n.options.defaultPreload,Le=u??n.options.defaultPreloadDelay??0,Ne=c.useCallback(()=>{n.preloadRoute({...q,_builtLocation:U}).catch(ce=>{console.warn(ce),console.warn(Om)})},[n,q,U]),Zt=c.useCallback(ce=>{ce?.isIntersecting&&Ne()},[Ne]);jm(r,Zt,Gm,{disabled:!!b||ct!=="viewport"}),c.useEffect(()=>{qe.current||!b&&ct==="render"&&(Ne(),qe.current=!0)},[b,Ne,ct]);const Te=ce=>{const ve=ce.currentTarget.getAttribute("target"),Re=y!==void 0?y:ve;if(!b&&!Xm(ce)&&!ce.defaultPrevented&&(!Re||Re==="_self")&&ce.button===0){ce.preventDefault(),$t.flushSync(()=>{Fe(!0)});const ut=n.subscribe("onResolved",()=>{ut(),Fe(!1)});n.navigate({...q,replace:d,resetScroll:m,hashScrollIntoView:f,startTransition:p,viewTransition:v,ignoreBlocker:I})}};if(ee)return{...V,ref:r,href:ee,...g&&{children:g},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...w&&{className:w},...E&&{onClick:E},...T&&{onBlur:T},...O&&{onFocus:O},...C&&{onMouseEnter:C},...S&&{onMouseLeave:S},...N&&{onTouchStart:N}};const lt=ce=>{if(b||ct!=="intent")return;if(!Le){Ne();return}const ve=ce.currentTarget;if(cr.has(ve))return;const Re=setTimeout(()=>{cr.delete(ve),Ne()},Le);cr.set(ve,Re)},An=ce=>{b||ct!=="intent"||Ne()},Tn=ce=>{if(b||!ct||!Le)return;const ve=ce.currentTarget,Re=cr.get(ve);Re&&(clearTimeout(Re),cr.delete(ve))};return{...V,...X,...te,href:F?.href,ref:r,onClick:_n([E,Te]),onBlur:_n([T,Tn]),onFocus:_n([O,lt]),onMouseEnter:_n([C,lt]),onMouseLeave:_n([S,Tn]),onTouchStart:_n([N,An]),disabled:!!b,target:y,...ue&&{style:ue},...ie&&{className:ie},...b&&zm,...Z&&Km,...K&&Qe&&Wm}}const Bs={},qm={className:"active"},zm={role:"link","aria-disabled":!0},Km={"data-status":"active","aria-current":"page"},Wm={"data-transitioning":"transitioning"},cr=new WeakMap,Gm={rootMargin:"100px"},_n=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Ym(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function Qm(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Pt=c.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=Um(r,t),a=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:i,...l}=s;return c.createElement("a",l,a)}return c.createElement(n,s,a)});function Xm(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Jm(e){return new eg({id:e})}class eg extends Im{constructor({id:t}){super({id:t}),this.useMatch=n=>gt({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>gt({from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>ns({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>ts({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>es({...n,from:this.id,strict:!1}),this.useLoaderData=n=>Jo({...n,from:this.id,strict:!1}),this.useNavigate=()=>{const n=Ge();return En({from:n.routesById[this.id].fullPath})},this.notFound=n=>hu({routeId:this.id,...n}),this.Link=M.forwardRef((n,r)=>{const s=Ge().routesById[this.id].fullPath;return h.jsx(Pt,{ref:r,from:s,...n})})}}let tg=class extends wu{constructor(t){super(t),this.useMatch=n=>gt({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>gt({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>ns({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>ts({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>es({...n,from:this.id}),this.useLoaderData=n=>Jo({...n,from:this.id}),this.useNavigate=()=>En({from:this.fullPath}),this.Link=M.forwardRef((n,r)=>h.jsx(Pt,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function Ie(e){return new tg(e)}class ng extends Dm{constructor(t){super(t),this.useMatch=n=>gt({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>gt({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>ns({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>ts({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>es({...n,from:this.id}),this.useLoaderData=n=>Jo({...n,from:this.id}),this.useNavigate=()=>En({from:this.fullPath}),this.Link=M.forwardRef((n,r)=>h.jsx(Pt,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function rg(e){return new ng(e)}function Cc(e){return typeof e=="object"?new Ac(e,{silent:!0}).createRoute(e):new Ac(e,{silent:!0}).createRoute}class Ac{constructor(t,n){this.path=t,this.createRoute=r=>{const o=Ie(r);return o.isRoot=!1,o},this.silent=n?.silent}}class Tc{constructor(t){this.useMatch=n=>gt({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>gt({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>ns({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>ts({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>es({...n,from:this.options.id}),this.useLoaderData=n=>Jo({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ge();return En({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Pc(e){return typeof e=="object"?new Tc(e):t=>new Tc({id:e,...t})}function Ue(e,t){let n,r,o,s;const a=()=>(n||(n=e().then(l=>{n=void 0,r=l.default}).catch(l=>{if(o=l,$1(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const u=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(u)||(sessionStorage.setItem(u,"1"),s=!0)}})),n),i=function(u){if(s)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!r)if(Rc)Rc(a());else throw a();return c.createElement(r,u)};return i.preload=a,i}function og(){const e=Ge(),t=c.useRef({router:e,mounted:!1}),[n,r]=c.useState(!1),{hasPendingMatches:o,isLoading:s}=it({select:d=>({isLoading:d.isLoading,hasPendingMatches:d.matches.some(p=>p.status==="pending")}),structuralSharing:!0}),a=Hs(s),i=s||n||o,l=Hs(i),u=s||o,f=Hs(u);return e.startTransition=d=>{r(!0),c.startTransition(()=>{d(),r(!1)})},c.useEffect(()=>{const d=e.history.subscribe(e.load),p=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Qt(e.latestLocation.publicHref)!==Qt(p.publicHref)&&e.commitLocation({...p,replace:!0}),()=>{d()}},[e,e.history]),Jr(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(p){console.error(p)}})()},[e]),Jr(()=>{a&&!s&&e.emit({type:"onLoad",...un(e.state)})},[a,e,s]),Jr(()=>{f&&!u&&e.emit({type:"onBeforeRouteMount",...un(e.state)})},[u,f,e]),Jr(()=>{if(l&&!i){const d=un(e.state);e.emit({type:"onResolved",...d}),e.__store.setState(p=>({...p,status:"idle",resolvedLocation:p.location})),d.hrefChanged&&um(e)}},[i,l,e]),null}function sg(e){const t=it({select:n=>`not-found-${n.location.pathname}-${n.status}`});return h.jsx(ci,{getResetKey:()=>t,onCatch:(n,r)=>{if(et(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(et(n))return e.fallback?.(n);throw n},children:e.children})}function ag(){return h.jsx("p",{children:"Not Found"})}function jn(e){return h.jsx(h.Fragment,{children:e.children})}function Ru(e,t,n){return t.options.notFoundComponent?h.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?h.jsx(e.options.defaultNotFoundComponent,{...n}):h.jsx(ag,{})}function ig(){return Ge().isScrollRestoring,null}const Cu=c.memo(function({matchId:t}){const n=Ge(),r=it({select:g=>{const y=g.matches.findIndex(x=>x.id===t),b=g.matches[y];return Jt(b),{routeId:b.routeId,ssr:b.ssr,_displayPending:b._displayPending,resetKey:g.loadedAt,parentRouteId:g.matches[y-1]?.routeId}},structuralSharing:!0}),o=n.routesById[r.routeId],s=o.options.pendingComponent??n.options.defaultPendingComponent,a=s?h.jsx(s,{}):null,i=o.options.errorComponent??n.options.defaultErrorComponent,l=o.options.onCatch??n.options.defaultOnCatch,u=o.isRoot?o.options.notFoundComponent??n.options.notFoundRoute?.options.component:o.options.notFoundComponent,f=r.ssr===!1||r.ssr==="data-only",d=(!o.isRoot||o.options.wrapInSuspense||f)&&(o.options.wrapInSuspense??s??(o.options.errorComponent?.preload||f))?c.Suspense:jn,p=i?ci:jn,m=u?sg:jn,v=o.isRoot?o.options.shellComponent??jn:jn;return h.jsxs(v,{children:[h.jsx(Xo.Provider,{value:t,children:h.jsx(d,{fallback:a,children:h.jsx(p,{getResetKey:()=>r.resetKey,errorComponent:i||li,onCatch:(g,y)=>{if(et(g))throw g;l?.(g,y)},children:h.jsx(m,{fallback:g=>{if(!u||g.routeId&&g.routeId!==r.routeId||!g.routeId&&!o.isRoot)throw g;return c.createElement(u,g)},children:f||r._displayPending?h.jsx($m,{fallback:a,children:h.jsx(Mc,{matchId:t})}):h.jsx(Mc,{matchId:t})})})})}),r.parentRouteId===ft&&n.options.scrollRestoration?h.jsxs(h.Fragment,{children:[h.jsx(cg,{}),h.jsx(ig,{})]}):null]})});function cg(){const e=Ge(),t=c.useRef(void 0);return h.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...un(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Mc=c.memo(function({matchId:t}){const n=Ge(),{match:r,key:o,routeId:s}=it({select:l=>{const u=l.matches.find(v=>v.id===t),f=u.routeId,p=(n.routesById[f].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:f,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return{key:p?JSON.stringify(p):void 0,routeId:f,match:{id:u.id,status:u.status,error:u.error,invalid:u.invalid,_forcePending:u._forcePending,_displayPending:u._displayPending}}},structuralSharing:!0}),a=n.routesById[s],i=c.useMemo(()=>{const l=a.options.component??n.options.defaultComponent;return l?h.jsx(l,{},o):h.jsx(Au,{})},[o,a.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const l=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(l){const u=n.getMatch(r.id);if(u&&!u._nonReactive.minPendingPromise){const f=Zn();u._nonReactive.minPendingPromise=f,setTimeout(()=>{f.resolve(),u._nonReactive.minPendingPromise=void 0},l)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return Jt(et(r.error)),Ru(n,a,r.error);if(r.status==="redirected")throw Jt(at(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error")throw r.error;return i}),Au=c.memo(function(){const t=Ge(),n=c.useContext(Xo),r=it({select:u=>u.matches.find(f=>f.id===n)?.routeId}),o=t.routesById[r],s=it({select:u=>{const d=u.matches.find(p=>p.id===n);return Jt(d),d.globalNotFound}}),a=it({select:u=>{const f=u.matches,d=f.findIndex(p=>p.id===n);return f[d+1]?.id}}),i=t.options.defaultPendingComponent?h.jsx(t.options.defaultPendingComponent,{}):null;if(s)return Ru(t,o,void 0);if(!a)return null;const l=h.jsx(Cu,{matchId:a});return r===ft?h.jsx(c.Suspense,{fallback:i,children:l}):l});function lg(){const e=Ge(),n=e.routesById[ft].options.pendingComponent??e.options.defaultPendingComponent,r=n?h.jsx(n,{}):null,o=typeof document<"u"&&e.ssr?jn:c.Suspense,s=h.jsxs(o,{fallback:r,children:[h.jsx(og,{}),h.jsx(ug,{})]});return e.options.InnerWrap?h.jsx(e.options.InnerWrap,{children:s}):s}function ug(){const e=Ge(),t=it({select:o=>o.matches[0]?.id}),n=it({select:o=>o.loadedAt}),r=t?h.jsx(Cu,{matchId:t}):null;return h.jsx(Xo.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:h.jsx(ci,{getResetKey:()=>n,errorComponent:li,onCatch:void 0,children:r})})}const dg=e=>new fg(e);class fg extends Cm{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Cc,globalThis.createLazyFileRoute=Pc):typeof window<"u"&&(window.createFileRoute=Cc,window.createLazyFileRoute=Pc);function hg({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=h.jsx(Su.Provider,{value:e,children:t});return e.options.Wrap?h.jsx(e.options.Wrap,{children:r}):r}function pg({router:e,...t}){return h.jsx(hg,{router:e,...t,children:h.jsx(lg,{})})}function rs(e){return it({select:t=>e?.select?e.select(t.location):t.location})}var Wn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},mg={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gg=class{#e=mg;#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)}},an=new gg;function vg(e){setTimeout(e,0)}var mn=typeof window>"u"||"Deno"in globalThis;function Ke(){}function yg(e,t){return typeof e=="function"?e(t):e}function ga(e){return typeof e=="number"&&e>=0&&e!==1/0}function Tu(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xt(e,t){return typeof e=="function"?e(t):e}function ht(e,t){return typeof e=="function"?e(t):e}function _c(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==ui(a,t.options))return!1}else if(!Rr(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||o&&o!==t.state.fetchStatus||s&&!s(t))}function Nc(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(gn(t.options.mutationKey)!==gn(s))return!1}else if(!Rr(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function ui(e,t){return(t?.queryKeyHashFn||gn)(e)}function gn(e){return JSON.stringify(e,(t,n)=>va(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Rr(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Rr(e[n],t[n])):!1}var bg=Object.prototype.hasOwnProperty;function Pu(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Oc(e)&&Oc(t);if(!r&&!(va(e)&&va(t)))return t;const s=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),i=a.length,l=r?new Array(i):{};let u=0;for(let f=0;f<i;f++){const d=r?f:a[f],p=e[d],m=t[d];if(p===m){l[d]=p,(r?f<s:bg.call(e,d))&&u++;continue}if(p===null||m===null||typeof p!="object"||typeof m!="object"){l[d]=m;continue}const v=Pu(p,m,n+1);l[d]=v,v===p&&u++}return s===i&&u===s?e:l}function No(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Oc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function va(e){if(!Ic(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ic(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ic(e){return Object.prototype.toString.call(e)==="[object Object]"}function xg(e){return new Promise(t=>{an.setTimeout(t,e)})}function ya(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Pu(e,t):t}function wg(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Eg(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var di=Symbol();function Mu(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===di?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function fi(e,t){return typeof e=="function"?e(...t):!!e}function Sg(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Rg=class extends Wn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!mn&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(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"}},hi=new Rg;function ba(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var Cg=vg;function Ag(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=Cg;const s=i=>{t?e.push(i):o(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&o(()=>{r(()=>{i.forEach(l=>{n(l)})})})};return{batch:i=>{let l;t++;try{l=i()}finally{t--,t||a()}return l},batchCalls:i=>(...l)=>{s(()=>{i(...l)})},schedule:s,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{o=i}}}var _e=Ag(),Tg=class extends Wn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!mn&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Oo=new Tg;function Pg(e){return Math.min(1e3*2**e,3e4)}function _u(e){return(e??"online")==="online"?Oo.isOnline():!0}var xa=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Nu(e){let t=!1,n=0,r;const o=ba(),s=()=>o.status!=="pending",a=g=>{if(!s()){const y=new xa(g);p(y),e.onCancel?.(y)}},i=()=>{t=!0},l=()=>{t=!1},u=()=>hi.isFocused()&&(e.networkMode==="always"||Oo.isOnline())&&e.canRun(),f=()=>_u(e.networkMode)&&e.canRun(),d=g=>{s()||(r?.(),o.resolve(g))},p=g=>{s()||(r?.(),o.reject(g))},m=()=>new Promise(g=>{r=y=>{(s()||u())&&g(y)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),v=()=>{if(s())return;let g;const y=n===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(d).catch(b=>{if(s())return;const x=e.retry??(mn?0:3),w=e.retryDelay??Pg,E=typeof w=="function"?w(n,b):w,T=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,b);if(t||!T){p(b);return}n++,e.onFail?.(n,b),xg(E).then(()=>u()?void 0:m()).then(()=>{t?p(b):v()})})};return{promise:o,status:()=>o.status,cancel:a,continue:()=>(r?.(),o),cancelRetry:i,continueRetry:l,canStart:f,start:()=>(f()?v():m().then(v),o)}}var Ou=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ga(this.gcTime)&&(this.#e=an.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mn?1/0:300*1e3))}clearGcTimeout(){this.#e&&(an.clearTimeout(this.#e),this.#e=void 0)}},Mg=class extends Ou{#e;#t;#n;#o;#r;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Lc(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Lc(this.options);t.data!==void 0&&(this.setState(Dc(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=ya(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Ke).catch(Ke):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>ht(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===di||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Xt(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:!Tu(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.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.#r&&(this.#i?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const i=this.observers.find(l=>l.options.queryFn);i&&this.setOptions(i.options)}const n=new AbortController,r=i=>{Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},o=()=>{const i=Mu(this.options,t),u=(()=>{const f={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(f),f})();return this.#i=!1,this.options.persister?this.options.persister(i,u,this):i(u)},a=(()=>{const i={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:o};return r(i),i})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:"fetch",meta:a.fetchOptions?.meta}),this.#r=Nu({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:i=>{i instanceof xa&&i.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(i,l)=>{this.#s({type:"failed",failureCount:i,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const i=await this.#r.start();if(i===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(i),this.#n.config.onSuccess?.(i,this),this.#n.config.onSettled?.(i,this.state.error,this),i}catch(i){if(i instanceof xa){if(i.silent)return this.#r.promise;if(i.revert){if(this.state.data===void 0)throw i;return this.state.data}}throw this.#s({type:"error",error:i}),this.#n.config.onError?.(i,this),this.#n.config.onSettled?.(this.state.data,i,this),i}finally{this.scheduleGc()}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Iu(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Dc(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),_e.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Iu(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_u(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Dc(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Lc(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Du=class extends Wn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#i=ba(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#a;#i;#s;#m;#f;#h;#l;#u;#c;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),jc(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wa(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wa(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ht(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#t.setOptions(this.options),t._defaulted&&!No(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&kc(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||ht(this.options.enabled,this.#t)!==ht(t.enabled,this.#t)||Xt(this.options.staleTime,this.#t)!==Xt(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||ht(this.options.enabled,this.#t)!==ht(t.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ng(this,n)&&(this.#o=n,this.#a=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Ke)),t}#g(){this.#x();const e=Xt(this.options.staleTime,this.#t);if(mn||this.#o.isStale||!ga(e))return;const n=Tu(this.#o.dataUpdatedAt,e)+1;this.#l=an.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#c=e,!(mn||ht(this.options.enabled,this.#t)===!1||!ga(this.#c)||this.#c===0)&&(this.#u=an.setInterval(()=>{(this.options.refetchIntervalInBackground||hi.isFocused())&&this.#d()},this.#c))}#b(){this.#g(),this.#y(this.#v())}#x(){this.#l&&(an.clearTimeout(this.#l),this.#l=void 0)}#w(){this.#u&&(an.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#o,s=this.#r,a=this.#a,l=e!==n?e.state:this.#n,{state:u}=e;let f={...u},d=!1,p;if(t._optimisticResults){const S=this.hasListeners(),N=!S&&jc(e,t),I=S&&kc(e,n,t,r);(N||I)&&(f={...f,...Iu(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:m,errorUpdatedAt:v,status:g}=f;p=f.data;let y=!1;if(t.placeholderData!==void 0&&p===void 0&&g==="pending"){let S;o?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(S=o.data,y=!0):S=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,S!==void 0&&(g="success",p=ya(o?.data,S,t),d=!0)}if(t.select&&p!==void 0&&!y)if(o&&p===s?.data&&t.select===this.#m)p=this.#f;else try{this.#m=t.select,p=t.select(p),p=ya(o?.data,p,t),this.#f=p,this.#s=null}catch(S){this.#s=S}this.#s&&(m=this.#s,p=this.#f,v=Date.now(),g="error");const b=f.fetchStatus==="fetching",x=g==="pending",w=g==="error",E=x&&b,T=p!==void 0,C={status:g,fetchStatus:f.fetchStatus,isPending:x,isSuccess:g==="success",isError:w,isInitialLoading:E,isLoading:E,data:p,dataUpdatedAt:f.dataUpdatedAt,error:m,errorUpdatedAt:v,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:w&&!T,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&T,isStale:pi(e,t),refetch:this.refetch,promise:this.#i,isEnabled:ht(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const S=C.data!==void 0,N=C.status==="error"&&!S,I=z=>{N?z.reject(C.error):S&&z.resolve(C.data)},P=()=>{const z=this.#i=C.promise=ba();I(z)},H=this.#i;switch(H.status){case"pending":e.queryHash===n.queryHash&&I(H);break;case"fulfilled":(N||C.data!==H.value)&&P();break;case"rejected":(!N||C.error!==H.reason)&&P();break}}return C}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#h=this.#t),No(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#p.size)return!0;const s=new Set(o??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#o).some(a=>{const i=a;return this.#o[i]!==e[i]&&s.has(i)})};this.#S({listeners:n()})}#E(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){_e.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function _g(e,t){return ht(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function jc(e,t){return _g(e,t)||e.state.data!==void 0&&wa(e,t,t.refetchOnMount)}function wa(e,t,n){if(ht(t.enabled,e)!==!1&&Xt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&pi(e,t)}return!1}function kc(e,t,n,r){return(e!==t||ht(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&pi(e,n)}function pi(e,t){return ht(t.enabled,e)!==!1&&e.isStaleByTime(Xt(t.staleTime,e))}function Ng(e,t){return!No(e.getCurrentResult(),t)}function Fc(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let i={pages:[],pageParams:[]},l=0;const u=async()=>{let f=!1;const d=v=>{Sg(v,()=>t.signal,()=>f=!0)},p=Mu(t.options,t.fetchOptions),m=async(v,g,y)=>{if(f)return Promise.reject();if(g==null&&v.pages.length)return Promise.resolve(v);const x=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:g,direction:y?"backward":"forward",meta:t.options.meta};return d(O),O})(),w=await p(x),{maxPages:E}=t.options,T=y?Eg:wg;return{pages:T(v.pages,w,E),pageParams:T(v.pageParams,g,E)}};if(o&&s.length){const v=o==="backward",g=v?Og:$c,y={pages:s,pageParams:a},b=g(r,y);i=await m(y,b,v)}else{const v=e??s.length;do{const g=l===0?a[0]??r.initialPageParam:$c(r,i);if(l>0&&g==null)break;i=await m(i,g),l++}while(l<v)}return i};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function $c(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Og(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ig=class extends Ou{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Lu(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=Nu({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,a)=>{this.#r({type:"failed",failureCount:s,error:a})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",o=!this.#o.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#r({type:"pending",context:a,variables:e,isPaused:o})}const s=await this.#o.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#r({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#r({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),_e.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Lu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Dg=class extends Wn{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new Ig({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=eo(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=eo(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=eo(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=eo(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){_e.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(n=>Nc(t,n))}findAll(e={}){return this.getAll().filter(t=>Nc(e,t))}notify(e){_e.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return _e.batch(()=>Promise.all(e.map(t=>t.continue().catch(Ke))))}};function eo(e){return e.options.scope?.id}var Lg=class extends Wn{#e;#t=void 0;#n;#o;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),No(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&gn(n.mutationKey)!==gn(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#a(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(t,n){return this.#o=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??Lu();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){_e.batch(()=>{if(this.#o&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,n,r,o)}catch(s){Promise.reject(s)}try{this.#o.onSettled?.(t.data,null,n,r,o)}catch(s){Promise.reject(s)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,n,r,o)}catch(s){Promise.reject(s)}try{this.#o.onSettled?.(void 0,t.error,n,r,o)}catch(s){Promise.reject(s)}}}this.listeners.forEach(n=>{n(this.#t)})})}},jg=class extends Wn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??ui(r,t);let s=this.get(o);return s||(s=new Mg({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}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(){_e.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(n=>_c(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>_c(e,n)):t}notify(e){_e.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){_e.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){_e.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},kg=class{#e;#t;#n;#o;#r;#a;#i;#s;constructor(e={}){this.#e=e.queryCache||new jg,this.#t=e.mutationCache||new Dg,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=hi.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Oo.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#s?.(),this.#s=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),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Xt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(r.queryHash)?.state.data,a=yg(t,s);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return _e.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;_e.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return _e.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=_e.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Ke).catch(Ke)}invalidateQueries(e,t={}){return _e.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=_e.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ke)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ke)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Xt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ke).catch(Ke)}fetchInfiniteQuery(e){return e.behavior=Fc(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ke).catch(Ke)}ensureInfiniteQueryData(e){return e.behavior=Fc(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Oo.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(gn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{Rr(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(gn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Rr(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ui(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===di&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},ju=c.createContext(void 0),Gn=e=>{const t=c.useContext(ju);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Fg=({client:e,children:t})=>(c.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(ju.Provider,{value:e,children:t})),ku=c.createContext(!1),$g=()=>c.useContext(ku);ku.Provider;function Fu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $u=c.createContext(Fu()),Hg=()=>c.useContext($u),Bg=({children:e})=>{const[t]=c.useState(()=>Fu());return h.jsx($u.Provider,{value:t,children:typeof e=="function"?e(t):e})},Vg=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?fi(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Zg=e=>{c.useEffect(()=>{e.clearReset()},[e])},Ug=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||fi(n,[e.error,r])),qg=(e,t)=>t.state.data===void 0,zg=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Kg=(e,t)=>e.isLoading&&e.isFetching&&!t,Wg=(e,t)=>e?.suspense&&t.isPending,Hc=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Hu(e,t,n){const r=$g(),o=Hg(),s=Gn(),a=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const i=s.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",zg(a),Vg(a,o,i),Zg(o);const l=!s.getQueryCache().get(a.queryHash),[u]=c.useState(()=>new t(s,a)),f=u.getOptimisticResult(a),d=!r&&e.subscribed!==!1;if(c.useSyncExternalStore(c.useCallback(p=>{const m=d?u.subscribe(_e.batchCalls(p)):Ke;return u.updateResult(),m},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),c.useEffect(()=>{u.setOptions(a)},[a,u]),Wg(a,f))throw Hc(a,u,o);if(Ug({result:f,errorResetBoundary:o,throwOnError:a.throwOnError,query:i,suspense:a.suspense}))throw f.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(a,f),a.experimental_prefetchInRender&&!mn&&Kg(f,r)&&(l?Hc(a,u,o):i?.promise)?.catch(Ke).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?f:u.trackResult(f)}function Gg(e,t){return Hu(e,Du)}function Bu(e,t){return Hu({...e,enabled:!0,suspense:!0,throwOnError:qg,placeholderData:void 0},Du)}function Yg(e,t){const n=Gn(),[r]=c.useState(()=>new Lg(n,e));c.useEffect(()=>{r.setOptions(e)},[r,e]);const o=c.useSyncExternalStore(c.useCallback(a=>r.subscribe(_e.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=c.useCallback((a,i)=>{r.mutate(a,i).catch(Ke)},[r]);if(o.error&&fi(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}var Vs={confirmLabel:"OK",dismissible:!0},Bc={confirmLabel:"Continue",cancelLabel:"Cancel",tone:"default",dismissible:!0},Qg=e=>typeof e=="string"?{title:e,...Vs}:{...Vs,...e,dismissible:e.dismissible??Vs.dismissible},Xg=e=>typeof e=="string"?{title:e,...Bc}:{...Bc,...e,dismissible:e.dismissible??e.tone!=="danger"},Jg=()=>{let e={current:null};const t=new Set,n=()=>{t.forEach(l=>l())},r=l=>{e=l,n()},o=()=>e,s=()=>{const l=e.current;!l||l.kind!=="alert"||(r({current:null}),l.resolver())},a=l=>{const u=e.current;!u||u.kind!=="confirm"||(r({current:null}),u.resolver(l))},i=()=>{const l=e.current;if(l){if(l.kind==="confirm"){a(!1);return}s()}};return{subscribe:l=>(t.add(l),()=>{t.delete(l)}),getSnapshot:o,alert:l=>{const u=Qg(l);return i(),new Promise(f=>{r({current:{kind:"alert",options:u,resolver:f}})})},confirm:l=>{const u=Xg(l);return i(),new Promise(f=>{r({current:{kind:"confirm",options:u,resolver:f}})})},resolveAlert:s,resolveConfirm:a,dismiss:i,reset:()=>{i()}}},Vu=c.createContext(null),e2=()=>{const e=c.useRef();return e.current||(e.current=Jg()),e.current},t2=({children:e,components:t})=>{const n=e2(),r=c.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot);c.useEffect(()=>()=>{n.reset()},[n]);const o=n,s=r.current;return h.jsxs(Vu.Provider,{value:o,children:[e,s?.kind==="alert"&&h.jsx(t.Alert,{open:!0,options:s.options,onClose:n.resolveAlert}),s?.kind==="confirm"&&h.jsx(t.Confirm,{open:!0,options:s.options,onCancel:()=>n.resolveConfirm(!1),onConfirm:()=>n.resolveConfirm(!0)})]})},n2=()=>{const e=c.useContext(Vu);if(!e)throw new Error("useModal must be used within ModalProvider");return e};function r2(e,t){const n=c.createContext(t),r=s=>{const{children:a,...i}=s,l=c.useMemo(()=>i,Object.values(i));return h.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(s){const a=c.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Nt(e,t=[]){let n=[];function r(s,a){const i=c.createContext(a),l=n.length;n=[...n,a];const u=d=>{const{scope:p,children:m,...v}=d,g=p?.[e]?.[l]||i,y=c.useMemo(()=>v,Object.values(v));return h.jsx(g.Provider,{value:y,children:m})};u.displayName=s+"Provider";function f(d,p){const m=p?.[e]?.[l]||i,v=c.useContext(m);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(a=>c.createContext(a));return function(i){const l=i?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,o2(o,...t)]}function o2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...i,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Vc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Dr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Vc(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Vc(e[o],null)}}}}function le(...e){return c.useCallback(Dr(...e),e)}function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Ve=globalThis?.document?c.useLayoutEffect:()=>{},s2=Wo[" useId ".trim().toString()]||(()=>{}),a2=0;function Tt(e){const[t,n]=c.useState(s2());return Ve(()=>{n(r=>r??String(a2++))},[e]),t?`radix-${t}`:""}var i2=Wo[" useInsertionEffect ".trim().toString()]||Ve;function Bt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=c2({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const d=f.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,r])}const u=c.useCallback(f=>{if(i){const d=l2(f)?f(e):f;d!==e&&a.current?.(d)}else s(f)},[i,e,s,a]);return[l,u]}function c2({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),s=c.useRef(t);return i2(()=>{s.current=t},[t]),c.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function l2(e){return typeof e=="function"}function qn(e){const t=u2(e),n=c.forwardRef((r,o)=>{const{children:s,...a}=r,i=c.Children.toArray(s),l=i.find(d2);if(l){const u=l.props.children,f=i.map(d=>d===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:d);return h.jsx(t,{...a,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return h.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function u2(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const a=h2(o),i=f2(s,o.props);return o.type!==c.Fragment&&(i.ref=r?Dr(r,a):a),c.cloneElement(o,i)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zu=Symbol("radix.slottable");function Uu(e){const t=({children:n})=>h.jsx(h.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Zu,t}function d2(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zu}function f2(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function h2(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var p2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],re=p2.reduce((e,t)=>{const n=qn(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:a,...i}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qu(e,t){e&&$t.flushSync(()=>e.dispatchEvent(t))}function Mt(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function m2(e,t=globalThis?.document){const n=Mt(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var g2="DismissableLayer",Ea="dismissableLayer.update",v2="dismissableLayer.pointerDownOutside",y2="dismissableLayer.focusOutside",Zc,zu=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lr=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...l}=e,u=c.useContext(zu),[f,d]=c.useState(null),p=f?.ownerDocument??globalThis?.document,[,m]=c.useState({}),v=le(t,C=>d(C)),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),x=f?g.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,E=x>=b,T=w2(C=>{const S=C.target,N=[...u.branches].some(I=>I.contains(S));!E||N||(o?.(C),a?.(C),C.defaultPrevented||i?.())},p),O=E2(C=>{const S=C.target;[...u.branches].some(I=>I.contains(S))||(s?.(C),a?.(C),C.defaultPrevented||i?.())},p);return m2(C=>{x===u.layers.size-1&&(r?.(C),!C.defaultPrevented&&i&&(C.preventDefault(),i()))},p),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Zc=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Uc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Zc)}},[f,p,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Uc())},[f,u]),c.useEffect(()=>{const C=()=>m({});return document.addEventListener(Ea,C),()=>document.removeEventListener(Ea,C)},[]),h.jsx(re.div,{...l,ref:v,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,O.onFocusCapture),onBlurCapture:W(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,T.onPointerDownCapture)})});Lr.displayName=g2;var b2="DismissableLayerBranch",x2=c.forwardRef((e,t)=>{const n=c.useContext(zu),r=c.useRef(null),o=le(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx(re.div,{...e,ref:o})});x2.displayName=b2;function w2(e,t=globalThis?.document){const n=Mt(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let l=function(){Ku(v2,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function E2(e,t=globalThis?.document){const n=Mt(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&Ku(y2,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Uc(){const e=new CustomEvent(Ea);document.dispatchEvent(e)}function Ku(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?qu(o,s):o.dispatchEvent(s)}var Zs="focusScope.autoFocusOnMount",Us="focusScope.autoFocusOnUnmount",qc={bubbles:!1,cancelable:!0},S2="FocusScope",os=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,l]=c.useState(null),u=Mt(o),f=Mt(s),d=c.useRef(null),p=le(t,g=>l(g)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let g=function(w){if(m.paused||!i)return;const E=w.target;i.contains(E)?d.current=E:qt(d.current,{select:!0})},y=function(w){if(m.paused||!i)return;const E=w.relatedTarget;E!==null&&(i.contains(E)||qt(d.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const T of w)T.removedNodes.length>0&&qt(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const x=new MutationObserver(b);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),x.disconnect()}}},[r,i,m.paused]),c.useEffect(()=>{if(i){Kc.add(m);const g=document.activeElement;if(!i.contains(g)){const b=new CustomEvent(Zs,qc);i.addEventListener(Zs,u),i.dispatchEvent(b),b.defaultPrevented||(R2(M2(Wu(i)),{select:!0}),document.activeElement===g&&qt(i))}return()=>{i.removeEventListener(Zs,u),setTimeout(()=>{const b=new CustomEvent(Us,qc);i.addEventListener(Us,f),i.dispatchEvent(b),b.defaultPrevented||qt(g??document.body,{select:!0}),i.removeEventListener(Us,f),Kc.remove(m)},0)}}},[i,u,f,m]);const v=c.useCallback(g=>{if(!n&&!r||m.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(y&&b){const x=g.currentTarget,[w,E]=C2(x);w&&E?!g.shiftKey&&b===E?(g.preventDefault(),n&&qt(w,{select:!0})):g.shiftKey&&b===w&&(g.preventDefault(),n&&qt(E,{select:!0})):b===x&&g.preventDefault()}},[n,r,m.paused]);return h.jsx(re.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});os.displayName=S2;function R2(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(qt(r,{select:t}),document.activeElement!==n)return}function C2(e){const t=Wu(e),n=zc(t,e),r=zc(t.reverse(),e);return[n,r]}function Wu(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zc(e,t){for(const n of e)if(!A2(n,{upTo:t}))return n}function A2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function T2(e){return e instanceof HTMLInputElement&&"select"in e}function qt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&T2(e)&&t&&e.select()}}var Kc=P2();function P2(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Wc(e,t),e.unshift(t)},remove(t){e=Wc(e,t),e[0]?.resume()}}}function Wc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function M2(e){return e.filter(t=>t.tagName!=="A")}var _2="Portal",jr=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=c.useState(!1);Ve(()=>s(!0),[]);const a=n||o&&globalThis?.document?.body;return a?nu.createPortal(h.jsx(re.div,{...r,ref:t}),a):null});jr.displayName=_2;function N2(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var Ot=e=>{const{present:t,children:n}=e,r=O2(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=le(r.ref,I2(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};Ot.displayName="Presence";function O2(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,l]=N2(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=to(r.current);s.current=i==="mounted"?u:"none"},[i]),Ve(()=>{const u=r.current,f=o.current;if(f!==e){const p=s.current,m=to(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ve(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=m=>{const g=to(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(l("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=m=>{m.target===t&&(s.current=to(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function to(e){return e?.animationName||"none"}function I2(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qs=0;function mi(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gc()),document.body.insertAdjacentElement("beforeend",e[1]??Gc()),qs++,()=>{qs===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qs--}},[])}function Gc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var D2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Nn=new WeakMap,no=new WeakMap,ro={},zs=0,Gu=function(e){return e&&(e.host||Gu(e.parentNode))},L2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Gu(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},j2=function(e,t,n,r){var o=L2(t,Array.isArray(e)?e:[e]);ro[n]||(ro[n]=new WeakMap);var s=ro[n],a=[],i=new Set,l=new Set(o),u=function(d){!d||i.has(d)||(i.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(i.has(p))f(p);else try{var m=p.getAttribute(r),v=m!==null&&m!=="false",g=(Nn.get(p)||0)+1,y=(s.get(p)||0)+1;Nn.set(p,g),s.set(p,y),a.push(p),g===1&&v&&no.set(p,!0),y===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return f(t),i.clear(),zs++,function(){a.forEach(function(d){var p=Nn.get(d)-1,m=s.get(d)-1;Nn.set(d,p),s.set(d,m),p||(no.has(d)||d.removeAttribute(r),no.delete(d)),m||d.removeAttribute(n)}),zs--,zs||(Nn=new WeakMap,Nn=new WeakMap,no=new WeakMap,ro={})}},gi=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=D2(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),j2(r,o,n,"aria-hidden")):function(){return null}},ss="Dialog",[Yu,Qu]=Nt(ss),[k2,Et]=Yu(ss),Xu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=c.useRef(null),l=c.useRef(null),[u,f]=Bt({prop:r,defaultProp:o??!1,onChange:s,caller:ss});return h.jsx(k2,{scope:t,triggerRef:i,contentRef:l,contentId:Tt(),titleId:Tt(),descriptionId:Tt(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(d=>!d),[f]),modal:a,children:n})};Xu.displayName=ss;var Ju="DialogTrigger",ed=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Et(Ju,n),s=le(t,o.triggerRef);return h.jsx(re.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":bi(o.open),...r,ref:s,onClick:W(e.onClick,o.onOpenToggle)})});ed.displayName=Ju;var vi="DialogPortal",[F2,td]=Yu(vi,{forceMount:void 0}),nd=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Et(vi,t);return h.jsx(F2,{scope:t,forceMount:n,children:c.Children.map(r,a=>h.jsx(Ot,{present:n||s.open,children:h.jsx(jr,{asChild:!0,container:o,children:a})}))})};nd.displayName=vi;var Io="DialogOverlay",rd=c.forwardRef((e,t)=>{const n=td(Io,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Et(Io,e.__scopeDialog);return s.modal?h.jsx(Ot,{present:r||s.open,children:h.jsx(H2,{...o,ref:t})}):null});rd.displayName=Io;var $2=qn("DialogOverlay.RemoveScroll"),H2=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Et(Io,n);return h.jsx(Ja,{as:$2,allowPinchZoom:!0,shards:[o.contentRef],children:h.jsx(re.div,{"data-state":bi(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),vn="DialogContent",od=c.forwardRef((e,t)=>{const n=td(vn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Et(vn,e.__scopeDialog);return h.jsx(Ot,{present:r||s.open,children:s.modal?h.jsx(B2,{...o,ref:t}):h.jsx(V2,{...o,ref:t})})});od.displayName=vn;var B2=c.forwardRef((e,t)=>{const n=Et(vn,e.__scopeDialog),r=c.useRef(null),o=le(t,n.contentRef,r);return c.useEffect(()=>{const s=r.current;if(s)return gi(s)},[]),h.jsx(sd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:W(e.onFocusOutside,s=>s.preventDefault())})}),V2=c.forwardRef((e,t)=>{const n=Et(vn,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return h.jsx(sd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),sd=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=Et(vn,n),l=c.useRef(null),u=le(t,l);return mi(),h.jsxs(h.Fragment,{children:[h.jsx(os,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:h.jsx(Lr,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":bi(i.open),...a,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(U2,{titleId:i.titleId}),h.jsx(z2,{contentRef:l,descriptionId:i.descriptionId})]})]})}),yi="DialogTitle",ad=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Et(yi,n);return h.jsx(re.h2,{id:o.titleId,...r,ref:t})});ad.displayName=yi;var id="DialogDescription",cd=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Et(id,n);return h.jsx(re.p,{id:o.descriptionId,...r,ref:t})});cd.displayName=id;var ld="DialogClose",ud=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Et(ld,n);return h.jsx(re.button,{type:"button",...r,ref:t,onClick:W(e.onClick,()=>o.onOpenChange(!1))})});ud.displayName=ld;function bi(e){return e?"open":"closed"}var dd="DialogTitleWarning",[Z2,fd]=r2(dd,{contentName:vn,titleName:yi,docsSlug:"dialog"}),U2=({titleId:e})=>{const t=fd(dd),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
3
-
4
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
5
-
6
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},q2="DialogDescriptionWarning",z2=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fd(q2).contentName}}.`;return c.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},hd=Xu,K2=ed,pd=nd,md=rd,gd=od,vd=ad,yd=cd,xi=ud,bd="AlertDialog",[W2]=Nt(bd,[Qu]),Vt=Qu(),xd=e=>{const{__scopeAlertDialog:t,...n}=e,r=Vt(t);return h.jsx(hd,{...r,...n,modal:!0})};xd.displayName=bd;var G2="AlertDialogTrigger",Y2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Vt(n);return h.jsx(K2,{...o,...r,ref:t})});Y2.displayName=G2;var Q2="AlertDialogPortal",wd=e=>{const{__scopeAlertDialog:t,...n}=e,r=Vt(t);return h.jsx(pd,{...r,...n})};wd.displayName=Q2;var X2="AlertDialogOverlay",Ed=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Vt(n);return h.jsx(md,{...o,...r,ref:t})});Ed.displayName=X2;var Hn="AlertDialogContent",[J2,ev]=W2(Hn),tv=Uu("AlertDialogContent"),Sd=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,s=Vt(n),a=c.useRef(null),i=le(t,a),l=c.useRef(null);return h.jsx(Z2,{contentName:Hn,titleName:Rd,docsSlug:"alert-dialog",children:h.jsx(J2,{scope:n,cancelRef:l,children:h.jsxs(gd,{role:"alertdialog",...s,...o,ref:i,onOpenAutoFocus:W(o.onOpenAutoFocus,u=>{u.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[h.jsx(tv,{children:r}),h.jsx(rv,{contentRef:a})]})})})});Sd.displayName=Hn;var Rd="AlertDialogTitle",Cd=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Vt(n);return h.jsx(vd,{...o,...r,ref:t})});Cd.displayName=Rd;var Ad="AlertDialogDescription",Td=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Vt(n);return h.jsx(yd,{...o,...r,ref:t})});Td.displayName=Ad;var nv="AlertDialogAction",Pd=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Vt(n);return h.jsx(xi,{...o,...r,ref:t})});Pd.displayName=nv;var Md="AlertDialogCancel",_d=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=ev(Md,n),s=Vt(n),a=le(t,o);return h.jsx(xi,{...s,...r,ref:a})});_d.displayName=Md;var rv=({contentRef:e})=>{const t=`\`${Hn}\` requires a description for the component to be accessible for screen reader users.
7
-
8
- You can add a description to the \`${Hn}\` by passing a \`${Ad}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
9
-
10
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Hn}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
11
-
12
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return c.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},ov=xd,sv=wd,av=Ed,iv=Sd,cv=Pd,lv=_d,uv=Cd,dv=Td,Nd=ov,Od=sv,Id=av,Dd=iv,fv=lv,Ld=cv,jd=uv,kd=dv,Ks={exports:{}};var Yc;function hv(){return Yc||(Yc=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",a=0;a<arguments.length;a++){var i=arguments[a];i&&(s=o(s,r(i)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var i in s)t.call(s,i)&&s[i]&&(a=o(a,i));return a}function o(s,a){return a?s?s+" "+a:s+a:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ks)),Ks.exports}var pv=hv();const ae=Ir(pv);var mv=Symbol.for("react.lazy"),Do=Wo[" use ".trim().toString()];function gv(e){return typeof e=="object"&&e!==null&&"then"in e}function Fd(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===mv&&"_payload"in e&&gv(e._payload)}function vv(e){const t=bv(e),n=c.forwardRef((r,o)=>{let{children:s,...a}=r;Fd(s)&&typeof Do=="function"&&(s=Do(s._payload));const i=c.Children.toArray(s),l=i.find(wv);if(l){const u=l.props.children,f=i.map(d=>d===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:d);return h.jsx(t,{...a,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return h.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var yv=vv("Slot");function bv(e){const t=c.forwardRef((n,r)=>{let{children:o,...s}=n;if(Fd(o)&&typeof Do=="function"&&(o=Do(o._payload)),c.isValidElement(o)){const a=Sv(o),i=Ev(s,o.props);return o.type!==c.Fragment&&(i.ref=r?Dr(r,a):a),c.cloneElement(o,i)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xv=Symbol("radix.slottable");function wv(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xv}function Ev(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Sv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Rv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),c.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"}))]]),Cv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,28H188V24a12,12,0,0,0-24,0v4H92V24a12,12,0,0,0-24,0v4H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28ZM68,52a12,12,0,0,0,24,0h72a12,12,0,0,0,24,0h16V76H52V52ZM52,204V100H204V204Zm60-80v56a12,12,0,0,1-24,0V143.32a12,12,0,0,1-9.37-22l16-8A12,12,0,0,1,112,124Zm61.49,33.88L163.9,168H168a12,12,0,0,1,0,24H136a12,12,0,0,1-8.71-20.25L155.45,142a4,4,0,0,0,.55-2,4,4,0,0,0-7.47-2,12,12,0,0,1-20.78-12A28,28,0,0,1,180,140a27.77,27.77,0,0,1-5.64,16.86A10.63,10.63,0,0,1,173.49,157.88Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,48V88H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),c.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-96-88v64a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm59.16,30.45L152,176h16a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136,23.76,23.76,0,0,1,171.16,150.45Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM112,184a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm56-8a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136a23.76,23.76,0,0,1-4.84,14.45L152,176ZM48,80V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,34H182V24a6,6,0,0,0-12,0V34H86V24a6,6,0,0,0-12,0V34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H74V56a6,6,0,0,0,12,0V46h84V56a6,6,0,0,0,12,0V46h26a2,2,0,0,1,2,2V82H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V94H210V208A2,2,0,0,1,208,210Zm-98-90v64a6,6,0,0,1-12,0V129.71l-7.32,3.66a6,6,0,1,1-5.36-10.74l16-8A6,6,0,0,1,110,120Zm59.57,29.25L148,178h20a6,6,0,0,1,0,12H136a6,6,0,0,1-4.8-9.6L160,142a10,10,0,1,0-16.65-11A6,6,0,1,1,133,125a22,22,0,1,1,36.62,24.26Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-96-88v64a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm59.16,30.45L152,176h16a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136,23.76,23.76,0,0,1,171.16,150.45Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,36H180V24a4,4,0,0,0-8,0V36H84V24a4,4,0,0,0-8,0V36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H76V56a4,4,0,0,0,8,0V44h88V56a4,4,0,0,0,8,0V44h28a4,4,0,0,1,4,4V84H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V92H212V208A4,4,0,0,1,208,212ZM108,120v64a4,4,0,0,1-8,0V126.47l-10.21,5.11a4,4,0,0,1-3.58-7.16l16-8A4,4,0,0,1,108,120Zm60,28-24,32h24a4,4,0,0,1,0,8H136a4,4,0,0,1-3.2-6.4l28.78-38.37A11.88,11.88,0,0,0,164,136a12,12,0,0,0-22.4-6,4,4,0,0,1-6.92-4A20,20,0,0,1,172,136,19.79,19.79,0,0,1,168,148Z"}))]]),Av=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),c.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),Tv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),c.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]),Pv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),c.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),Mv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),c.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),_v=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M108,60A16,16,0,1,1,92,44,16,16,0,0,1,108,60Zm56,16a16,16,0,1,0-16-16A16,16,0,0,0,164,76ZM92,112a16,16,0,1,0,16,16A16,16,0,0,0,92,112Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,112ZM92,180a16,16,0,1,0,16,16A16,16,0,0,0,92,180Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,180Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32V224a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V32A16,16,0,0,1,64,16H192A16,16,0,0,1,208,32Z",opacity:"0.2"}),c.createElement("path",{d:"M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M192,16H64A16,16,0,0,0,48,32V224a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V32A16,16,0,0,0,192,16ZM100,200a12,12,0,1,1,12-12A12,12,0,0,1,100,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,80Zm56,120a12,12,0,1,1,12-12A12,12,0,0,1,156,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,80Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M102,60A10,10,0,1,1,92,50,10,10,0,0,1,102,60Zm62,10a10,10,0,1,0-10-10A10,10,0,0,0,164,70ZM92,118a10,10,0,1,0,10,10A10,10,0,0,0,92,118Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,118ZM92,186a10,10,0,1,0,10,10A10,10,0,0,0,92,186Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,186Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M100,60a8,8,0,1,1-8-8A8,8,0,0,1,100,60Zm64,8a8,8,0,1,0-8-8A8,8,0,0,0,164,68ZM92,120a8,8,0,1,0,8,8A8,8,0,0,0,92,120Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,120ZM92,188a8,8,0,1,0,8,8A8,8,0,0,0,92,188Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,188Z"}))]]),Nv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M112,60a16,16,0,1,1,16,16A16,16,0,0,1,112,60Zm16,52a16,16,0,1,0,16,16A16,16,0,0,0,128,112Zm0,68a16,16,0,1,0,16,16A16,16,0,0,0,128,180Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M176,32V224a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16V32A16,16,0,0,1,96,16h64A16,16,0,0,1,176,32Z",opacity:"0.2"}),c.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM128,72a12,12,0,1,0-12-12A12,12,0,0,0,128,72Zm0,112a12,12,0,1,0,12,12A12,12,0,0,0,128,184Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M160,16H96A16,16,0,0,0,80,32V224a16,16,0,0,0,16,16h64a16,16,0,0,0,16-16V32A16,16,0,0,0,160,16ZM128,208a12,12,0,1,1,12-12A12,12,0,0,1,128,208Zm0-68a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm0-68a12,12,0,1,1,12-12A12,12,0,0,1,128,72Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M118,60a10,10,0,1,1,10,10A10,10,0,0,1,118,60Zm10,58a10,10,0,1,0,10,10A10,10,0,0,0,128,118Zm0,68a10,10,0,1,0,10,10A10,10,0,0,0,128,186Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM128,72a12,12,0,1,0-12-12A12,12,0,0,0,128,72Zm0,112a12,12,0,1,0,12,12A12,12,0,0,0,128,184Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M120,60a8,8,0,1,1,8,8A8,8,0,0,1,120,60Zm8,60a8,8,0,1,0,8,8A8,8,0,0,0,128,120Zm0,68a8,8,0,1,0,8,8A8,8,0,0,0,128,188Z"}))]]),Ov=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),c.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),Iv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm112-80a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,132Zm0,40a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,172Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),c.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,176H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm-8-56V44l44,44Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-34-82a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,136Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,168Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-36-84a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,136Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,168Z"}))]]),Dv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),c.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z"}))]]),Lv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,80H140V60h56ZM116,60v56H60V60ZM60,140h56v56H60Zm80,56V140h56v56Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),c.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,56v60a4,4,0,0,1-4,4H136V44a4,4,0,0,1,4-4h60A16,16,0,0,1,216,56ZM116,40H56A16,16,0,0,0,40,56v60a4,4,0,0,0,4,4h76V44A4,4,0,0,0,116,40Zm96,96H136v76a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136ZM40,140v60a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V136H44A4,4,0,0,0,40,140Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,14v66H134V54h66A2,2,0,0,1,202,56ZM56,54h66v68H54V56A2,2,0,0,1,56,54ZM54,200V134h68v68H56A2,2,0,0,1,54,200Zm146,2H134V134h68v66A2,2,0,0,1,200,202Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,12v68H132V52h68A4,4,0,0,1,204,56ZM56,52h68v72H52V56A4,4,0,0,1,56,52ZM52,200V132h72v72H56A4,4,0,0,1,52,200Zm148,4H132V132h72v68A4,4,0,0,1,200,204Z"}))]]),jv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,64V192H40V64Z",opacity:"0.2"}),c.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z"}))]]),kv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),c.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),Fv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),c.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),$v=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M238.15,78.54,177.46,17.86a20,20,0,0,0-28.3,0L97.2,70c-12.43-3.33-36.68-5.72-61.74,14.5a20,20,0,0,0-1.6,29.73l45.46,45.47-39.8,39.8a12,12,0,0,0,17,17l39.8-39.81,45.47,45.46A20,20,0,0,0,155.91,228c.46,0,.93,0,1.4-.05A20,20,0,0,0,171.87,220c4.69-6.23,11-16.13,14.44-28s3.45-22.88.16-33.4l51.7-51.87A20,20,0,0,0,238.15,78.54Zm-74.26,68.79a12,12,0,0,0-2.23,13.84c3.43,6.86,6.9,21-6.28,40.65L54.08,100.53c21.09-14.59,39.53-6.64,41-6a11.67,11.67,0,0,0,13.81-2.29l54.43-54.61,55,55Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M229.66,98.34,172.39,155.8c11.46,22.93-1.72,45.86-10.11,57a8,8,0,0,1-12,.83L42.34,105.76A8,8,0,0,1,43,93.85c29.65-23.92,57.4-10,57.4-10l57.27-57.46a8,8,0,0,1,11.31,0L229.66,87A8,8,0,0,1,229.66,98.34Z",opacity:"0.2"}),c.createElement("path",{d:"M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M235.33,104l-53.47,53.65c4.56,12.67,6.45,33.89-13.19,60A15.93,15.93,0,0,1,157,224c-.38,0-.75,0-1.13,0a16,16,0,0,1-11.32-4.69L96.29,171,53.66,213.66a8,8,0,0,1-11.32-11.32L85,159.71l-48.3-48.3A16,16,0,0,1,38,87.63c25.42-20.51,49.75-16.48,60.4-13.14L152,20.7a16,16,0,0,1,22.63,0l60.69,60.68A16,16,0,0,1,235.33,104Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M233.91,82.79,173.22,22.1a14,14,0,0,0-19.81,0L98.93,76.77c-9.52-3.25-34-8.34-59.71,12.41A14,14,0,0,0,38.1,110l49.71,49.71-44.05,44a6,6,0,1,0,8.48,8.48l44.05-44.05L146,217.89a14,14,0,0,0,9.9,4.11q.49,0,1,0a14,14,0,0,0,10.19-5.54c19.72-26.21,17.15-47.23,12.46-59.3l54.37-54.55A14,14,0,0,0,233.91,82.79ZM225.42,94.1h0l-57.27,57.46a6,6,0,0,0-1.11,6.92c9.94,19.88-1.71,40.32-9.54,50.72a2,2,0,0,1-3,.2L46.58,101.51a2,2,0,0,1,.18-3c12.5-10.09,24.5-12.76,33.7-12.76a42.13,42.13,0,0,1,17.25,3.41A6,6,0,0,0,104.64,88L161.9,30.59a2,2,0,0,1,2.83,0l60.69,60.68A2,2,0,0,1,225.42,94.1Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232.49,84.2,171.8,23.51a12,12,0,0,0-17,0L99.45,79.07c-8.08-3-32.79-9.45-59,11.67a12,12,0,0,0-1,17.84l51.13,51.13L45.17,205.17a4,4,0,0,0,5.66,5.66l45.46-45.47,51.12,51.12A12,12,0,0,0,155.9,220c.28,0,.57,0,.85,0a12,12,0,0,0,8.73-4.74c19.83-26.36,16.51-47.18,11.71-58.57l55.3-55.49A12,12,0,0,0,232.49,84.2Zm-5.66,11.31h0L169.56,153a4,4,0,0,0-.75,4.61c10.43,20.85-1.62,42-9.73,52.83a4,4,0,0,1-6,.4L45.17,102.93a4,4,0,0,1,.33-6C58.44,86.53,70.86,83.74,80.44,83.74A43.9,43.9,0,0,1,98.6,87.38a4,4,0,0,0,4.62-.75l57.27-57.46a4,4,0,0,1,5.66,0l60.68,60.69A4,4,0,0,1,226.83,95.51Z"}))]]),Hv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,128a12,12,0,0,1-12,12H48a12,12,0,0,1,0-24h68A12,12,0,0,1,128,128ZM48,76H180a12,12,0,0,0,0-24H48a12,12,0,0,0,0,24Zm52,104H48a12,12,0,0,0,0,24h52a12,12,0,0,0,0-24Zm132.49-20.49a12,12,0,0,0-17,0L196,179V112a12,12,0,0,0-24,0v67l-19.51-19.52a12,12,0,0,0-17,17l40,40a12,12,0,0,0,17,0l40-40A12,12,0,0,0,232.49,159.51Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,80v88l-24,24H48V64H208A16,16,0,0,1,224,80Z",opacity:"0.2"}),c.createElement("path",{d:"M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,72h96a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm40,112H72a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Zm8-48H72a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm77.66,29.66-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L160,164.69V120a8,8,0,0,1,16,0v44.69l10.34-10.35a8,8,0,0,1,11.32,11.32Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M126,128a6,6,0,0,1-6,6H48a6,6,0,0,1,0-12h72A6,6,0,0,1,126,128ZM48,70H184a6,6,0,0,0,0-12H48a6,6,0,0,0,0,12Zm56,116H48a6,6,0,0,0,0,12h56a6,6,0,0,0,0-12Zm124.24-22.24a6,6,0,0,0-8.48,0L190,193.51V112a6,6,0,0,0-12,0v81.51l-29.76-29.75a6,6,0,0,0-8.48,8.48l40,40a6,6,0,0,0,8.48,0l40-40A6,6,0,0,0,228.24,163.76Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M124,128a4,4,0,0,1-4,4H48a4,4,0,0,1,0-8h72A4,4,0,0,1,124,128ZM48,68H184a4,4,0,0,0,0-8H48a4,4,0,0,0,0,8Zm56,120H48a4,4,0,0,0,0,8h56a4,4,0,0,0,0-8Zm122.83-22.83a4,4,0,0,0-5.66,0L188,198.34V112a4,4,0,0,0-8,0v86.34l-33.17-33.17a4,4,0,0,0-5.66,5.66l40,40a4,4,0,0,0,5.66,0l40-40A4,4,0,0,0,226.83,165.17Z"}))]]),Bv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),c.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"}))]]),Vv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M246.15,133.18,146.83,33.86A19.85,19.85,0,0,0,132.69,28H40A12,12,0,0,0,28,40v92.69a19.85,19.85,0,0,0,5.86,14.14l99.32,99.32a20,20,0,0,0,28.28,0l84.69-84.69A20,20,0,0,0,246.15,133.18Zm-98.83,93.17L52,131V52h79l95.32,95.32ZM104,88A16,16,0,1,1,88,72,16,16,0,0,1,104,88Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M237.66,153,153,237.66a8,8,0,0,1-11.31,0L42.34,138.34A8,8,0,0,1,40,132.69V40h92.69a8,8,0,0,1,5.65,2.34l99.32,99.32A8,8,0,0,1,237.66,153Z",opacity:"0.2"}),c.createElement("path",{d:"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63Zm-96,96L48,132.69V48h84.69L232,147.31ZM96,84A12,12,0,1,1,84,72,12,12,0,0,1,96,84Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63ZM84,96A12,12,0,1,1,96,84,12,12,0,0,1,84,96Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M241.91,137.42,142.59,38.1a13.94,13.94,0,0,0-9.9-4.1H40a6,6,0,0,0-6,6v92.69a13.94,13.94,0,0,0,4.1,9.9l99.32,99.32a14,14,0,0,0,19.8,0l84.69-84.69A14,14,0,0,0,241.91,137.42Zm-8.49,11.31-84.69,84.69a2,2,0,0,1-2.83,0L46.59,134.1a2,2,0,0,1-.59-1.41V46h86.69a2,2,0,0,1,1.41.59l99.32,99.31A2,2,0,0,1,233.42,148.73ZM94,84A10,10,0,1,1,84,74,10,10,0,0,1,94,84Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63Zm-96,96L48,132.69V48h84.69L232,147.31ZM96,84A12,12,0,1,1,84,72,12,12,0,0,1,96,84Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M240.49,138.83,141.17,39.51A11.93,11.93,0,0,0,132.69,36H40a4,4,0,0,0-4,4v92.69a11.93,11.93,0,0,0,3.51,8.48l99.32,99.32a12,12,0,0,0,17,0l84.69-84.69a12,12,0,0,0,0-17Zm-5.66,11.31-84.69,84.69a4,4,0,0,1-5.65,0L45.17,135.51A4,4,0,0,1,44,132.69V44h88.69a4,4,0,0,1,2.82,1.17l99.32,99.32A4,4,0,0,1,234.83,150.14ZM92,84a8,8,0,1,1-8-8A8,8,0,0,1,92,84Z"}))]]),Zv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),c.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),Uv=c.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Ae=c.forwardRef((e,t)=>{const{alt:n,color:r,size:o,weight:s,mirrored:a,children:i,weights:l,...u}=e,{color:f="currentColor",size:d,weight:p="regular",mirrored:m=!1,...v}=c.useContext(Uv);return c.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:o??d,height:o??d,fill:r??f,viewBox:"0 0 256 256",transform:a||m?"scale(-1, 1)":void 0,...v,...u},!!n&&c.createElement("title",null,n),i,l.get(s??p))});Ae.displayName="IconBase";const $d=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Rv}));$d.displayName="BellIcon";const qv=$d,Hd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Cv}));Hd.displayName="CalendarIcon";const zv=Hd,Bd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Av}));Bd.displayName="CaretDownIcon";const Kv=Bd,Vd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Tv}));Vd.displayName="CaretLeftIcon";const Ws=Vd,Zd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Pv}));Zd.displayName="CaretRightIcon";const vr=Zd,Ud=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Mv}));Ud.displayName="CheckIcon";const Wv=Ud,qd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:_v}));qd.displayName="DotsSixVerticalIcon";const Gv=qd,zd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Nv}));zd.displayName="DotsThreeVerticalIcon";const Yv=zd,Kd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Ov}));Kd.displayName="EyeIcon";const Qv=Kd,Wd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Iv}));Wd.displayName="FileTextIcon";const Xv=Wd,Gd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Dv}));Gd.displayName="GearIcon";const Jv=Gd,Yd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Lv}));Yd.displayName="GridFourIcon";const Qd=Yd,Xd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:jv}));Xd.displayName="ListIcon";const ey=Xd,Jd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:kv}));Jd.displayName="MagnifyingGlassIcon";const ty=Jd,ef=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Fv}));ef.displayName="PencilSimpleIcon";const ny=ef,tf=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:$v}));tf.displayName="PushPinIcon";const nf=tf,rf=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Hv}));rf.displayName="SortAscendingIcon";const ry=rf,of=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Bv}));of.displayName="SpinnerIcon";const oy=of,sf=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Vv}));sf.displayName="TagIcon";const sy=sf,af=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Zv}));af.displayName="XIcon";const cf=af;function ay(e){return h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[h.jsx("circle",{cx:"6",cy:"6",r:"3"}),h.jsx("circle",{cx:"18",cy:"6",r:"3"}),h.jsx("circle",{cx:"6",cy:"18",r:"3"}),h.jsx("circle",{cx:"18",cy:"18",r:"3"}),h.jsx("circle",{cx:"12",cy:"12",r:"3"}),h.jsx("line",{x1:"8.5",y1:"7.5",x2:"10",y2:"10"}),h.jsx("line",{x1:"15.5",y1:"7.5",x2:"14",y2:"10"}),h.jsx("line",{x1:"8.5",y1:"16.5",x2:"10",y2:"14"}),h.jsx("line",{x1:"15.5",y1:"16.5",x2:"14",y2:"14"})]})}const Qc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Xc=n1,je=(e,t)=>n=>{var r;if(t?.variants==null)return Xc(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(u=>{const f=n?.[u],d=s?.[u];if(f===null)return null;const p=Qc(f)||Qc(d);return o[u][p]}),i=n&&Object.entries(n).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:p,...m}=f;return Object.entries(m).every(v=>{let[g,y]=v;return Array.isArray(y)?y.includes({...s,...i}[g]):{...s,...i}[g]===y})?[...u,d,p]:u},[]);return Xc(e,a,l,n?.class,n?.className)},iy=je(["inline-flex","items-center","justify-center","gap-2","whitespace-nowrap","font-medium","transition-colors","duration-200","border","focus-ring-soft","outline-none","disabled:pointer-events-none","disabled:opacity-50"],{variants:{variant:{primary:["bg-cta","border-transparent","text-fg-on-filled","hover:bg-cta-hover","active:bg-cta-hover"],signature:["bg-accent-secondary","border-transparent","text-fg-on-filled","hover:bg-accent-secondary-hover","active:bg-accent-secondary-hover"],subtle:["bg-transparent","border-border","text-fg-default","hover:bg-hover-subtle","hover:border-border-secondary","active:bg-hover"],ghost:["border-transparent","bg-transparent","text-fg-secondary","hover:bg-hover-subtle","hover:border-border-subtle","hover:text-fg-default","active:bg-hover"],danger:["bg-accent-danger","border-transparent","text-fg-on-filled","hover:bg-accent-danger-hover","active:bg-accent-danger-hover"],"soft-success":["bg-accent-soft-success","border-transparent","text-accent-success","hover:bg-accent-soft-success-hover","active:bg-accent-soft-success-hover"],"soft-danger":["bg-accent-soft-danger","border-transparent","text-fg-error","hover:bg-accent-soft-danger-hover","active:bg-accent-soft-danger-hover"]},size:{sm:"h-8 px-3 text-sm rounded-[12px]",md:"h-9 px-4 text-sm rounded-[14px]",lg:"h-11 px-5 text-body rounded-[16px]",icon:"h-9 w-9 rounded-[14px]","icon-sm":"h-8 w-8 rounded-[12px]"}},defaultVariants:{variant:"primary",size:"md"}}),bt=c.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isLoading:o,children:s,disabled:a,...i},l)=>{const u=r?yv:"button";return h.jsx(u,{ref:l,className:iy({variant:t,size:n,className:e}),disabled:a||o,...i,children:o?h.jsxs(h.Fragment,{children:[h.jsx(oy,{className:"animate-spin h-4 w-4"}),s]}):s})});bt.displayName="Button";const wi=je(["relative","pointer-events-auto","w-full","max-h-[calc(100dvh-2rem)]","overflow-y-auto","border","border-border-subtle","overscroll-contain","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95","data-[state=open]:zoom-in-95"],{variants:{variant:{default:"max-w-[640px] rounded-[20px] bg-elevated shadow-[0_24px_64px_-32px_rgba(15,18,24,0.36)]",compact:"max-w-[480px] rounded-[18px] bg-surface shadow-[0_18px_44px_-28px_rgba(15,18,24,0.28)]",form:"max-w-[560px] rounded-[20px] bg-elevated shadow-[0_22px_56px_-30px_rgba(15,18,24,0.32)]",inspect:"max-w-[640px] rounded-[20px] bg-elevated shadow-[0_24px_64px_-30px_rgba(15,18,24,0.34)]",confirm:"max-w-[336px] rounded-[18px] bg-surface shadow-[0_16px_36px_-24px_rgba(15,18,24,0.24)]"}},defaultVariants:{variant:"default"}}),cy=je(["flex","items-center","justify-between"],{variants:{variant:{default:"border-b border-border-subtle/70 px-4 py-3.5",compact:"border-b border-border-subtle/60 px-4 py-3",form:"border-b border-border-subtle/65 px-4 py-3 sm:px-5",inspect:"border-b border-border-subtle/70 px-4 py-3.5 sm:px-5",confirm:"px-4 pb-1 pt-4"}},defaultVariants:{variant:"default"}}),Ei=je("",{variants:{variant:{default:"px-4 py-5 sm:px-5",compact:"px-4 py-4",form:"px-4 py-4 sm:px-5 sm:py-5",inspect:"px-4 py-4 sm:px-5 sm:py-5",confirm:"space-y-1 px-5 pb-4 pt-5"}},defaultVariants:{variant:"default"}}),Si=je(["flex","items-center","justify-end"],{variants:{variant:{default:"border-t border-border-subtle/70 px-4 py-3.5",compact:"px-4 pb-4 pt-0",form:"border-t border-border-subtle/65 px-4 py-3 sm:px-5",inspect:"border-t border-border-subtle/70 px-4 py-3.5 sm:px-5",confirm:"justify-end gap-2 px-5 pb-5 pt-0"}},defaultVariants:{variant:"default"}}),ly=je(["flex","items-center","justify-center","text-fg-secondary","transition-colors","hover:bg-hover-subtle","hover:text-fg-default","focus-ring-soft"],{variants:{variant:{default:"h-10 w-10 rounded-[14px]",compact:"h-9 w-9 rounded-[12px]",form:"h-9 w-9 rounded-[12px]",inspect:"h-10 w-10 rounded-[14px]",confirm:"h-9 w-9 rounded-[12px]"}},defaultVariants:{variant:"default"}}),Ri=je("text-fg-default font-semibold",{variants:{variant:{default:"text-heading tracking-[-0.02em]",compact:"text-subheading tracking-[-0.01em]",form:"text-heading tracking-[-0.02em]",inspect:"text-heading tracking-[-0.02em]",confirm:"text-subheading tracking-[-0.01em]"}},defaultVariants:{variant:"default"}}),Ci=je("text-fg-secondary",{variants:{variant:{default:"text-meta",compact:"text-meta",form:"text-meta",inspect:"text-meta",confirm:"text-meta"}},defaultVariants:{variant:"default"}}),uy=je("",{variants:{variant:{display:"text-display",heading:"text-heading",subheading:"text-subheading",body:"text-body",meta:"text-meta",label:"text-label",micro:"text-micro"},weight:{regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},tone:{default:"text-fg-default",secondary:"text-fg-secondary",tertiary:"text-fg-tertiary",muted:"text-fg-muted",placeholder:"text-fg-placeholder",error:"text-fg-error",onFilled:"text-fg-on-filled"},tracking:{normal:"",tight:"tracking-[-0.01em]",tighter:"tracking-[-0.02em]",wide:"tracking-[0.08em]",wider:"tracking-[0.12em]",widest:"tracking-[0.16em]"},transform:{none:"",uppercase:"uppercase"},truncate:{true:"truncate",false:""}},defaultVariants:{variant:"body",weight:"regular",tone:"default",tracking:"normal",transform:"none",truncate:!1}});function se({as:e="span",className:t,variant:n,weight:r,tone:o,tracking:s,transform:a,truncate:i,children:l,...u}){const f=e;return h.jsx(f,{className:uy({variant:n,weight:r,tone:o,tracking:s,transform:a,truncate:i,className:t}),...u,children:l})}const lf=ae("fixed","inset-0","z-[1090]","bg-overlay","backdrop-blur-[2px]","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0"),dy=({open:e,options:t,onClose:n})=>h.jsx(Nd,{open:e,onOpenChange:r=>{!r&&t.dismissible&&n()},children:h.jsxs(Od,{children:[h.jsx(Id,{className:lf}),h.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-center justify-center p-4",children:h.jsxs(Dd,{className:wi({variant:"confirm"}),children:[h.jsxs("div",{className:Ei({variant:"confirm"}),children:[h.jsx(jd,{className:Ri({variant:"confirm"}),children:t.title}),t.description?h.jsx(kd,{className:Ci({variant:"confirm"}),children:t.description}):null]}),h.jsx("div",{className:Si({variant:"confirm"}),children:h.jsx(Ld,{asChild:!0,children:h.jsx(bt,{size:"sm",onClick:n,children:t.confirmLabel})})})]})})]})}),fy=({open:e,options:t,onCancel:n,onConfirm:r})=>h.jsx(Nd,{open:e,onOpenChange:o=>{!o&&t.dismissible&&n()},children:h.jsxs(Od,{children:[h.jsx(Id,{className:lf}),h.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-center justify-center p-4",children:h.jsxs(Dd,{className:wi({variant:"confirm"}),children:[h.jsxs("div",{className:Ei({variant:"confirm"}),children:[h.jsx(jd,{className:Ri({variant:"confirm"}),children:t.title}),t.description?h.jsx(kd,{className:Ci({variant:"confirm"}),children:h.jsx(se,{as:"span",variant:"meta",tone:"secondary",children:t.description})}):null]}),h.jsxs("div",{className:Si({variant:"confirm"}),children:[h.jsx(fv,{asChild:!0,children:h.jsx(bt,{variant:"ghost",size:"sm",onClick:n,children:t.cancelLabel})}),h.jsx(Ld,{asChild:!0,children:h.jsx(bt,{variant:t.tone==="danger"?"danger":"primary",size:"sm",onClick:r,children:t.confirmLabel})})]})]})})]})});function hy({children:e}){return h.jsx(t2,{components:{Alert:dy,Confirm:fy},children:e})}function uf(){const{confirm:e}=n2();return c.useCallback(t=>e({title:"Confirm",description:t,confirmLabel:"OK",cancelLabel:"Cancel",tone:"danger"}),[e])}function py(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const my=e=>{switch(e){case"success":return yy;case"info":return xy;case"warning":return by;case"error":return wy;default:return null}},gy=Array(12).fill(0),vy=({visible:e,className:t})=>M.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},M.createElement("div",{className:"sonner-spinner"},gy.map((n,r)=>M.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),yy=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),by=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},M.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),xy=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),wy=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Ey=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},M.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),M.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Sy=()=>{const[e,t]=M.useState(document.hidden);return M.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Sa=1;class Ry{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Sa++,a=this.toasts.find(l=>l.id===s),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:i,title:r}):l):this.addToast({title:r,...o,dismissible:i,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,a;const i=o.then(async u=>{if(a=["resolve",u],M.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(Ay(u)&&!u.ok){s=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,v=typeof d=="object"&&!M.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...v})}else if(u instanceof Error){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,v=typeof d=="object"&&!M.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...v})}else if(n.success!==void 0){s=!1;const d=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,v=typeof d=="object"&&!M.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:p,...v})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,m=typeof f=="object"&&!M.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...m})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,f)=>i.then(()=>a[0]==="reject"?f(a[1]):u(a[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=n?.id||Sa++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Je=new Ry,Cy=(e,t)=>{const n=t?.id||Sa++;return Je.addToast({title:e,...t,id:n}),n},Ay=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Ty=Cy,Py=()=>Je.toasts,My=()=>Je.getActiveToasts(),_y=Object.assign(Ty,{success:Je.success,info:Je.info,warning:Je.warning,error:Je.error,custom:Je.custom,message:Je.message,promise:Je.promise,dismiss:Je.dismiss,loading:Je.loading},{getHistory:Py,getToasts:My});py("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function oo(e){return e.label!==void 0}const Ny=3,Oy="24px",Iy="16px",Jc=4e3,Dy=356,Ly=14,jy=45,ky=200;function Ct(...e){return e.filter(Boolean).join(" ")}function Fy(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const $y=e=>{var t,n,r,o,s,a,i,l,u;const{invert:f,toast:d,unstyled:p,interacting:m,setHeights:v,visibleToasts:g,heights:y,index:b,toasts:x,expanded:w,removeToast:E,defaultRichColors:T,closeButton:O,style:C,cancelButtonStyle:S,actionButtonStyle:N,className:I="",descriptionClassName:P="",duration:H,position:z,gap:L,expandByDefault:k,classNames:A,icons:D,closeButtonAriaLabel:j="Close toast"}=e,[_,V]=M.useState(null),[K,Y]=M.useState(null),[B,q]=M.useState(!1),[U,J]=M.useState(!1),[$,F]=M.useState(!1),[ee,Z]=M.useState(!1),[X,te]=M.useState(!1),[ie,ue]=M.useState(0),[Qe,Fe]=M.useState(0),qe=M.useRef(d.duration||H||Jc),ct=M.useRef(null),Le=M.useRef(null),Ne=b===0,Zt=b+1<=g,Te=d.type,lt=d.dismissible!==!1,An=d.className||"",Tn=d.descriptionClassName||"",ce=M.useMemo(()=>y.findIndex(Q=>Q.toastId===d.id)||0,[y,d.id]),ve=M.useMemo(()=>{var Q;return(Q=d.closeButton)!=null?Q:O},[d.closeButton,O]),Re=M.useMemo(()=>d.duration||H||Jc,[d.duration,H]),ut=M.useRef(0),It=M.useRef(0),vt=M.useRef(0),Dt=M.useRef(null),[Ms,_s]=z.split("-"),Pn=M.useMemo(()=>y.reduce((Q,me,he)=>he>=ce?Q:Q+me.height,0),[y,ce]),rr=Sy(),Ns=d.invert||f,Mn=Te==="loading";It.current=M.useMemo(()=>ce*L+Pn,[ce,Pn]),M.useEffect(()=>{qe.current=Re},[Re]),M.useEffect(()=>{q(!0)},[]),M.useEffect(()=>{const Q=Le.current;if(Q){const me=Q.getBoundingClientRect().height;return Fe(me),v(he=>[{toastId:d.id,height:me,position:d.position},...he]),()=>v(he=>he.filter(ge=>ge.toastId!==d.id))}},[v,d.id]),M.useLayoutEffect(()=>{if(!B)return;const Q=Le.current,me=Q.style.height;Q.style.height="auto";const he=Q.getBoundingClientRect().height;Q.style.height=me,Fe(he),v(ge=>ge.find(be=>be.toastId===d.id)?ge.map(be=>be.toastId===d.id?{...be,height:he}:be):[{toastId:d.id,height:he,position:d.position},...ge])},[B,d.title,d.description,v,d.id,d.jsx,d.action,d.cancel]);const Rt=M.useCallback(()=>{J(!0),ue(It.current),v(Q=>Q.filter(me=>me.toastId!==d.id)),setTimeout(()=>{E(d)},ky)},[d,E,v,It]);M.useEffect(()=>{if(d.promise&&Te==="loading"||d.duration===1/0||d.type==="loading")return;let Q;return w||m||rr?(()=>{if(vt.current<ut.current){const ge=new Date().getTime()-ut.current;qe.current=qe.current-ge}vt.current=new Date().getTime()})():qe.current!==1/0&&(ut.current=new Date().getTime(),Q=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Rt()},qe.current)),()=>clearTimeout(Q)},[w,m,d,Te,rr,Rt]),M.useEffect(()=>{d.delete&&(Rt(),d.onDismiss==null||d.onDismiss.call(d,d))},[Rt,d.delete]);function Os(){var Q;if(D?.loading){var me;return M.createElement("div",{className:Ct(A?.loader,d==null||(me=d.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":Te==="loading"},D.loading)}return M.createElement(vy,{className:Ct(A?.loader,d==null||(Q=d.classNames)==null?void 0:Q.loader),visible:Te==="loading"})}const Is=d.icon||D?.[Te]||my(Te);var Pe,$e;return M.createElement("li",{tabIndex:0,ref:Le,className:Ct(I,An,A?.toast,d==null||(t=d.classNames)==null?void 0:t.toast,A?.default,A?.[Te],d==null||(n=d.classNames)==null?void 0:n[Te]),"data-sonner-toast":"","data-rich-colors":(Pe=d.richColors)!=null?Pe:T,"data-styled":!(d.jsx||d.unstyled||p),"data-mounted":B,"data-promise":!!d.promise,"data-swiped":X,"data-removed":U,"data-visible":Zt,"data-y-position":Ms,"data-x-position":_s,"data-index":b,"data-front":Ne,"data-swiping":$,"data-dismissible":lt,"data-type":Te,"data-invert":Ns,"data-swipe-out":ee,"data-swipe-direction":K,"data-expanded":!!(w||k&&B),"data-testid":d.testId,style:{"--index":b,"--toasts-before":b,"--z-index":x.length-b,"--offset":`${U?ie:It.current}px`,"--initial-height":k?"auto":`${Qe}px`,...C,...d.style},onDragEnd:()=>{F(!1),V(null),Dt.current=null},onPointerDown:Q=>{Q.button!==2&&(Mn||!lt||(ct.current=new Date,ue(It.current),Q.target.setPointerCapture(Q.pointerId),Q.target.tagName!=="BUTTON"&&(F(!0),Dt.current={x:Q.clientX,y:Q.clientY})))},onPointerUp:()=>{var Q,me,he;if(ee||!lt)return;Dt.current=null;const ge=Number(((Q=Le.current)==null?void 0:Q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ze=Number(((me=Le.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),be=new Date().getTime()-((he=ct.current)==null?void 0:he.getTime()),de=_==="x"?ge:ze,rt=Math.abs(de)/be;if(Math.abs(de)>=jy||rt>.11){ue(It.current),d.onDismiss==null||d.onDismiss.call(d,d),Y(_==="x"?ge>0?"right":"left":ze>0?"down":"up"),Rt(),Z(!0);return}else{var Se,Ce;(Se=Le.current)==null||Se.style.setProperty("--swipe-amount-x","0px"),(Ce=Le.current)==null||Ce.style.setProperty("--swipe-amount-y","0px")}te(!1),F(!1),V(null)},onPointerMove:Q=>{var me,he,ge;if(!Dt.current||!lt||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;const be=Q.clientY-Dt.current.y,de=Q.clientX-Dt.current.x;var rt;const Se=(rt=e.swipeDirections)!=null?rt:Fy(z);!_&&(Math.abs(de)>1||Math.abs(be)>1)&&V(Math.abs(de)>Math.abs(be)?"x":"y");let Ce={x:0,y:0};const Ut=ot=>1/(1.5+Math.abs(ot)/20);if(_==="y"){if(Se.includes("top")||Se.includes("bottom"))if(Se.includes("top")&&be<0||Se.includes("bottom")&&be>0)Ce.y=be;else{const ot=be*Ut(be);Ce.y=Math.abs(ot)<Math.abs(be)?ot:be}}else if(_==="x"&&(Se.includes("left")||Se.includes("right")))if(Se.includes("left")&&de<0||Se.includes("right")&&de>0)Ce.x=de;else{const ot=de*Ut(de);Ce.x=Math.abs(ot)<Math.abs(de)?ot:de}(Math.abs(Ce.x)>0||Math.abs(Ce.y)>0)&&te(!0),(he=Le.current)==null||he.style.setProperty("--swipe-amount-x",`${Ce.x}px`),(ge=Le.current)==null||ge.style.setProperty("--swipe-amount-y",`${Ce.y}px`)}},ve&&!d.jsx&&Te!=="loading"?M.createElement("button",{"aria-label":j,"data-disabled":Mn,"data-close-button":!0,onClick:Mn||!lt?()=>{}:()=>{Rt(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Ct(A?.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},($e=D?.close)!=null?$e:Ey):null,(Te||d.icon||d.promise)&&d.icon!==null&&(D?.[Te]!==null||d.icon)?M.createElement("div",{"data-icon":"",className:Ct(A?.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Os():null,d.type!=="loading"?Is:null):null,M.createElement("div",{"data-content":"",className:Ct(A?.content,d==null||(s=d.classNames)==null?void 0:s.content)},M.createElement("div",{"data-title":"",className:Ct(A?.title,d==null||(a=d.classNames)==null?void 0:a.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?M.createElement("div",{"data-description":"",className:Ct(P,Tn,A?.description,d==null||(i=d.classNames)==null?void 0:i.description)},typeof d.description=="function"?d.description():d.description):null),M.isValidElement(d.cancel)?d.cancel:d.cancel&&oo(d.cancel)?M.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||S,onClick:Q=>{oo(d.cancel)&&lt&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,Q),Rt())},className:Ct(A?.cancelButton,d==null||(l=d.classNames)==null?void 0:l.cancelButton)},d.cancel.label):null,M.isValidElement(d.action)?d.action:d.action&&oo(d.action)?M.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||N,onClick:Q=>{oo(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,Q),!Q.defaultPrevented&&Rt())},className:Ct(A?.actionButton,d==null||(u=d.classNames)==null?void 0:u.actionButton)},d.action.label):null)};function el(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Hy(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,a=s?"--mobile-offset":"--offset",i=s?Iy:Oy;function l(u){["top","right","bottom","left"].forEach(f=>{n[`${a}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=i:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),n}const By=M.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:f,mobileOffset:d,theme:p="light",richColors:m,duration:v,style:g,visibleToasts:y=Ny,toastOptions:b,dir:x=el(),gap:w=Ly,icons:E,containerAriaLabel:T="Notifications"}=t,[O,C]=M.useState([]),S=M.useMemo(()=>r?O.filter(B=>B.toasterId===r):O.filter(B=>!B.toasterId),[O,r]),N=M.useMemo(()=>Array.from(new Set([s].concat(S.filter(B=>B.position).map(B=>B.position)))),[S,s]),[I,P]=M.useState([]),[H,z]=M.useState(!1),[L,k]=M.useState(!1),[A,D]=M.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=M.useRef(null),_=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),V=M.useRef(null),K=M.useRef(!1),Y=M.useCallback(B=>{C(q=>{var U;return(U=q.find(J=>J.id===B.id))!=null&&U.delete||Je.dismiss(B.id),q.filter(({id:J})=>J!==B.id)})},[]);return M.useEffect(()=>Je.subscribe(B=>{if(B.dismiss){requestAnimationFrame(()=>{C(q=>q.map(U=>U.id===B.id?{...U,delete:!0}:U))});return}setTimeout(()=>{nu.flushSync(()=>{C(q=>{const U=q.findIndex(J=>J.id===B.id);return U!==-1?[...q.slice(0,U),{...q[U],...B},...q.slice(U+1)]:[B,...q]})})})}),[O]),M.useEffect(()=>{if(p!=="system"){D(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;const B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:q})=>{D(q?"dark":"light")})}catch{B.addListener(({matches:U})=>{try{D(U?"dark":"light")}catch(J){console.error(J)}})}},[p]),M.useEffect(()=>{O.length<=1&&z(!1)},[O]),M.useEffect(()=>{const B=q=>{var U;if(a.every(F=>q[F]||q.code===F)){var $;z(!0),($=j.current)==null||$.focus()}q.code==="Escape"&&(document.activeElement===j.current||(U=j.current)!=null&&U.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[a]),M.useEffect(()=>{if(j.current)return()=>{V.current&&(V.current.focus({preventScroll:!0}),V.current=null,K.current=!1)}},[j.current]),M.createElement("section",{ref:n,"aria-label":`${T} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((B,q)=>{var U;const[J,$]=B.split("-");return S.length?M.createElement("ol",{key:B,dir:x==="auto"?el():x,tabIndex:-1,ref:j,className:u,"data-sonner-toaster":!0,"data-sonner-theme":A,"data-y-position":J,"data-x-position":$,style:{"--front-toast-height":`${((U=I[0])==null?void 0:U.height)||0}px`,"--width":`${Dy}px`,"--gap":`${w}px`,...g,...Hy(f,d)},onBlur:F=>{K.current&&!F.currentTarget.contains(F.relatedTarget)&&(K.current=!1,V.current&&(V.current.focus({preventScroll:!0}),V.current=null))},onFocus:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||K.current||(K.current=!0,V.current=F.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{L||z(!1)},onDragEnd:()=>z(!1),onPointerDown:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||k(!0)},onPointerUp:()=>k(!1)},S.filter(F=>!F.position&&q===0||F.position===B).map((F,ee)=>{var Z,X;return M.createElement($y,{key:F.id,icons:E,index:ee,toast:F,defaultRichColors:m,duration:(Z=b?.duration)!=null?Z:v,className:b?.className,descriptionClassName:b?.descriptionClassName,invert:o,visibleToasts:y,closeButton:(X=b?.closeButton)!=null?X:l,interacting:L,position:B,style:b?.style,unstyled:b?.unstyled,classNames:b?.classNames,cancelButtonStyle:b?.cancelButtonStyle,actionButtonStyle:b?.actionButtonStyle,closeButtonAriaLabel:b?.closeButtonAriaLabel,removeToast:Y,toasts:S.filter(te=>te.position==F.position),heights:I.filter(te=>te.position==F.position),setHeights:P,expandByDefault:i,gap:w,expanded:H,swipeDirections:t.swipeDirections})})):null}))});var On=(e,t)=>({...e,...t}),Vy=(e,t)=>Object.assign((n,r)=>e(n,On(t,r)),{success:(n,r)=>e.success(n,On(t,r)),error:(n,r)=>e.error(n,On(t,r)),info:(n,r)=>e.info(n,On(t,r)),warning:(n,r)=>e.warning(n,On(t,r)),loading:(n,r)=>e.loading(n,On(t,r)),dismiss:n=>e.dismiss(n)}),df=(e={})=>Vy(_y,e);df();var Zy=e=>h.jsx(By,{...e});const Uy=df({duration:3e3});function qy({children:e}){return h.jsxs(h.Fragment,{children:[e,h.jsx(Zy,{position:"bottom-center",expand:!1,visibleToasts:3,toastOptions:{duration:3e3,classNames:{toast:"surface-floating whitespace-nowrap px-5 py-3 text-sm font-medium text-fg-secondary shadow-sm",title:"text-sm font-medium text-fg-secondary"}}})]})}function ff(){return Uy}const zy=new kg({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});function hf(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ky}=Object.prototype,{getPrototypeOf:as}=Object,{iterator:is,toStringTag:pf}=Symbol,cs=(e=>t=>{const n=Ky.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),St=e=>(e=e.toLowerCase(),t=>cs(t)===e),ls=e=>t=>typeof t===e,{isArray:Yn}=Array,zn=ls("undefined");function kr(e){return e!==null&&!zn(e)&&e.constructor!==null&&!zn(e.constructor)&&tt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mf=St("ArrayBuffer");function Wy(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mf(e.buffer),t}const Gy=ls("string"),tt=ls("function"),gf=ls("number"),Fr=e=>e!==null&&typeof e=="object",Yy=e=>e===!0||e===!1,go=e=>{if(cs(e)!=="object")return!1;const t=as(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(pf in e)&&!(is in e)},Qy=e=>{if(!Fr(e)||kr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Xy=St("Date"),Jy=St("File"),e6=e=>!!(e&&typeof e.uri<"u"),t6=e=>e&&typeof e.getParts<"u",n6=St("Blob"),r6=St("FileList"),o6=e=>Fr(e)&&tt(e.pipe);function s6(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const tl=s6(),nl=typeof tl.FormData<"u"?tl.FormData:void 0,a6=e=>{if(!e)return!1;if(nl&&e instanceof nl)return!0;const t=as(e);if(!t||t===Object.prototype||!tt(e.append))return!1;const n=cs(e);return n==="formdata"||n==="object"&&tt(e.toString)&&e.toString()==="[object FormData]"},i6=St("URLSearchParams"),[c6,l6,u6,d6]=["ReadableStream","Request","Response","Headers"].map(St),f6=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $r(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Yn(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(kr(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(r=0;r<a;r++)i=s[r],t.call(null,e[i],i,e)}}function vf(e,t){if(kr(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const cn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,yf=e=>!zn(e)&&e!==cn;function Ra(...e){const{caseless:t,skipUndefined:n}=yf(this)&&this||{},r={},o=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const i=t&&vf(r,a)||a,l=Ca(r,i)?r[i]:void 0;go(l)&&go(s)?r[i]=Ra(l,s):go(s)?r[i]=Ra({},s):Yn(s)?r[i]=s.slice():(!n||!zn(s))&&(r[i]=s)};for(let s=0,a=e.length;s<a;s++)e[s]&&$r(e[s],o);return r}const h6=(e,t,n,{allOwnKeys:r}={})=>($r(t,(o,s)=>{n&&tt(o)?Object.defineProperty(e,s,{__proto__:null,value:hf(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),p6=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),m6=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},g6=(e,t,n,r)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!r||r(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=n!==!1&&as(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},v6=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},y6=e=>{if(!e)return null;if(Yn(e))return e;let t=e.length;if(!gf(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},b6=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&as(Uint8Array)),x6=(e,t)=>{const r=(e&&e[is]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},w6=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},E6=St("HTMLFormElement"),S6=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ca=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),R6=St("RegExp"),bf=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};$r(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},C6=e=>{bf(e,(t,n)=>{if(tt(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(tt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},A6=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Yn(e)?r(e):r(String(e).split(t)),n},T6=()=>{},P6=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function M6(e){return!!(e&&tt(e.append)&&e[pf]==="FormData"&&e[is])}const _6=e=>{const t=new Array(10),n=(r,o)=>{if(Fr(r)){if(t.indexOf(r)>=0)return;if(kr(r))return r;if(!("toJSON"in r)){t[o]=r;const s=Yn(r)?[]:{};return $r(r,(a,i)=>{const l=n(a,o+1);!zn(l)&&(s[i]=l)}),t[o]=void 0,s}}return r};return n(e,0)},N6=St("AsyncFunction"),O6=e=>e&&(Fr(e)||tt(e))&&tt(e.then)&&tt(e.catch),xf=((e,t)=>e?setImmediate:t?((n,r)=>(cn.addEventListener("message",({source:o,data:s})=>{o===cn&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),cn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",tt(cn.postMessage)),I6=typeof queueMicrotask<"u"?queueMicrotask.bind(cn):typeof process<"u"&&process.nextTick||xf,D6=e=>e!=null&&tt(e[is]),R={isArray:Yn,isArrayBuffer:mf,isBuffer:kr,isFormData:a6,isArrayBufferView:Wy,isString:Gy,isNumber:gf,isBoolean:Yy,isObject:Fr,isPlainObject:go,isEmptyObject:Qy,isReadableStream:c6,isRequest:l6,isResponse:u6,isHeaders:d6,isUndefined:zn,isDate:Xy,isFile:Jy,isReactNativeBlob:e6,isReactNative:t6,isBlob:n6,isRegExp:R6,isFunction:tt,isStream:o6,isURLSearchParams:i6,isTypedArray:b6,isFileList:r6,forEach:$r,merge:Ra,extend:h6,trim:f6,stripBOM:p6,inherits:m6,toFlatObject:g6,kindOf:cs,kindOfTest:St,endsWith:v6,toArray:y6,forEachEntry:x6,matchAll:w6,isHTMLForm:E6,hasOwnProperty:Ca,hasOwnProp:Ca,reduceDescriptors:bf,freezeMethods:C6,toObjectSet:A6,toCamelCase:S6,noop:T6,toFiniteNumber:P6,findKey:vf,global:cn,isContextDefined:yf,isSpecCompliantForm:M6,toJSONObject:_6,isAsyncFn:N6,isThenable:O6,setImmediate:xf,asap:I6,isIterable:D6},L6=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),j6=e=>{const t={};let n,r,o;return e&&e.split(`
13
- `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&L6[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},rl=Symbol("internals"),k6=/[^\x09\x20-\x7E\x80-\xFF]/g;function F6(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function lr(e){return e&&String(e).trim().toLowerCase()}function $6(e){return F6(e.replace(k6,""))}function vo(e){return e===!1||e==null?e:R.isArray(e)?e.map(vo):$6(String(e))}function H6(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const B6=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Gs(e,t,n,r,o){if(R.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function V6(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Z6(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}let We=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,l,u){const f=lr(l);if(!f)throw new Error("header name must be a non-empty string");const d=R.findKey(o,f);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||l]=vo(i))}const a=(i,l)=>R.forEach(i,(u,f)=>s(u,f,l));if(R.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(R.isString(t)&&(t=t.trim())&&!B6(t))a(j6(t),n);else if(R.isObject(t)&&R.isIterable(t)){let i={},l,u;for(const f of t){if(!R.isArray(f))throw TypeError("Object iterator must return a key-value pair");i[u=f[0]]=(l=i[u])?R.isArray(l)?[...l,f[1]]:[l,f[1]]:f[1]}a(i,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=lr(t),t){const r=R.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return H6(o);if(R.isFunction(n))return n.call(this,o,r);if(R.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=lr(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Gs(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=lr(a),a){const i=R.findKey(r,a);i&&(!n||Gs(r,r[i],i,n))&&(delete r[i],o=!0)}}return R.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Gs(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return R.forEach(this,(o,s)=>{const a=R.findKey(r,s);if(a){n[a]=vo(o),delete n[s];return}const i=t?V6(s):String(s).trim();i!==s&&delete n[s],n[i]=vo(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
14
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[rl]=this[rl]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=lr(a);r[i]||(Z6(o,a),r[i]=!0)}return R.isArray(t)?t.forEach(s):s(t),this}};We.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.reduceDescriptors(We.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});R.freezeMethods(We);const U6="[REDACTED ****]";function q6(e){if(R.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(R.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function z6(e,t){const n=new Set(t.map(s=>String(s).toLowerCase())),r=[],o=s=>{if(s===null||typeof s!="object"||R.isBuffer(s))return s;if(r.indexOf(s)!==-1)return;s instanceof We&&(s=s.toJSON()),r.push(s);let a;if(R.isArray(s))a=[],s.forEach((i,l)=>{const u=o(i);R.isUndefined(u)||(a[l]=u)});else{if(!R.isPlainObject(s)&&q6(s))return r.pop(),s;a=Object.create(null);for(const[i,l]of Object.entries(s)){const u=n.has(i.toLowerCase())?U6:o(l);R.isUndefined(u)||(a[i]=u)}}return r.pop(),a};return o(e)}let G=class wf extends Error{static from(t,n,r,o,s,a){const i=new wf(t.message,n||t.code,r,o,s);return i.cause=t,i.name=t.name,t.status!=null&&i.status==null&&(i.status=t.status),a&&Object.assign(i,a),i}constructor(t,n,r,o,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,n=t&&R.hasOwnProp(t,"redact")?t.redact:void 0,r=R.isArray(n)&&n.length>0?z6(t,n):R.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};G.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";G.ERR_BAD_OPTION="ERR_BAD_OPTION";G.ECONNABORTED="ECONNABORTED";G.ETIMEDOUT="ETIMEDOUT";G.ECONNREFUSED="ECONNREFUSED";G.ERR_NETWORK="ERR_NETWORK";G.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";G.ERR_DEPRECATED="ERR_DEPRECATED";G.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";G.ERR_BAD_REQUEST="ERR_BAD_REQUEST";G.ERR_CANCELED="ERR_CANCELED";G.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";G.ERR_INVALID_URL="ERR_INVALID_URL";G.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const K6=null;function Aa(e){return R.isPlainObject(e)||R.isArray(e)}function Ef(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function Ys(e,t,n){return e?e.concat(t).map(function(o,s){return o=Ef(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function W6(e){return R.isArray(e)&&!e.some(Aa)}const G6=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function us(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,b){return!R.isUndefined(b[y])});const r=n.metaTokens,o=n.visitor||d,s=n.dots,a=n.indexes,i=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,u=i&&R.isSpecCompliantForm(t);if(!R.isFunction(o))throw new TypeError("visitor must be a function");function f(g){if(g===null)return"";if(R.isDate(g))return g.toISOString();if(R.isBoolean(g))return g.toString();if(!u&&R.isBlob(g))throw new G("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(g)||R.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,y,b){let x=g;if(R.isReactNative(t)&&R.isReactNativeBlob(g))return t.append(Ys(b,y,s),f(g)),!1;if(g&&!b&&typeof g=="object"){if(R.endsWith(y,"{}"))y=r?y:y.slice(0,-2),g=JSON.stringify(g);else if(R.isArray(g)&&W6(g)||(R.isFileList(g)||R.endsWith(y,"[]"))&&(x=R.toArray(g)))return y=Ef(y),x.forEach(function(E,T){!(R.isUndefined(E)||E===null)&&t.append(a===!0?Ys([y],T,s):a===null?y:y+"[]",f(E))}),!1}return Aa(g)?!0:(t.append(Ys(b,y,s),f(g)),!1)}const p=[],m=Object.assign(G6,{defaultVisitor:d,convertValue:f,isVisitable:Aa});function v(g,y,b=0){if(!R.isUndefined(g)){if(b>l)throw new G("Object is too deeply nested ("+b+" levels). Max depth: "+l,G.ERR_FORM_DATA_DEPTH_EXCEEDED);if(p.indexOf(g)!==-1)throw Error("Circular reference detected in "+y.join("."));p.push(g),R.forEach(g,function(w,E){(!(R.isUndefined(w)||w===null)&&o.call(t,w,R.isString(E)?E.trim():E,y,m))===!0&&v(w,y?y.concat(E):[E],b+1)}),p.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return v(e),t}function ol(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Ai(e,t){this._pairs=[],e&&us(e,this,t)}const Sf=Ai.prototype;Sf.append=function(t,n){this._pairs.push([t,n])};Sf.toString=function(t){const n=t?function(r){return t.call(this,r,ol)}:ol;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Y6(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Rf(e,t,n){if(!t)return e;const r=n&&n.encode||Y6,o=R.isFunction(n)?{serialize:n}:n,s=o&&o.serialize;let a;if(s?a=s(t,o):a=R.isURLSearchParams(t)?t.toString():new Ai(t,o).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class sl{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ti={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Q6=typeof URLSearchParams<"u"?URLSearchParams:Ai,X6=typeof FormData<"u"?FormData:null,J6=typeof Blob<"u"?Blob:null,e8={isBrowser:!0,classes:{URLSearchParams:Q6,FormData:X6,Blob:J6},protocols:["http","https","file","blob","url","data"]},Pi=typeof window<"u"&&typeof document<"u",Ta=typeof navigator=="object"&&navigator||void 0,t8=Pi&&(!Ta||["ReactNative","NativeScript","NS"].indexOf(Ta.product)<0),n8=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",r8=Pi&&window.location.href||"http://localhost",o8=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pi,hasStandardBrowserEnv:t8,hasStandardBrowserWebWorkerEnv:n8,navigator:Ta,origin:r8},Symbol.toStringTag,{value:"Module"})),Be={...o8,...e8};function s8(e,t){return us(e,new Be.classes.URLSearchParams,{visitor:function(n,r,o,s){return Be.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function a8(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function i8(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Cf(e){function t(n,r,o,s){let a=n[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),l=s>=n.length;return a=!a&&R.isArray(o)?o.length:a,l?(R.hasOwnProp(o,a)?o[a]=R.isArray(o[a])?o[a].concat(r):[o[a],r]:o[a]=r,!i):((!o[a]||!R.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&R.isArray(o[a])&&(o[a]=i8(o[a])),!i)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(a8(r),o,n,0)}),n}return null}const In=(e,t)=>e!=null&&R.hasOwnProp(e,t)?e[t]:void 0;function c8(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Hr={transitional:Ti,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=R.isObject(t);if(s&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return o?JSON.stringify(Cf(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){const l=In(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return s8(t,l).toString();if((i=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=In(this,"env"),f=u&&u.FormData;return us(i?{"files[]":t}:t,f&&new f,l)}}return s||o?(n.setContentType("application/json",!1),c8(t)):t}],transformResponse:[function(t){const n=In(this,"transitional")||Hr.transitional,r=n&&n.forcedJSONParsing,o=In(this,"responseType"),s=o==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(r&&!o||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,In(this,"parseReviver"))}catch(l){if(i)throw l.name==="SyntaxError"?G.from(l,G.ERR_BAD_RESPONSE,this,null,In(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Be.classes.FormData,Blob:Be.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch","query"],e=>{Hr.headers[e]={}});function Qs(e,t){const n=this||Hr,r=t||n,o=We.from(r.headers);let s=r.data;return R.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Af(e){return!!(e&&e.__CANCEL__)}let Br=class extends G{constructor(t,n,r){super(t??"canceled",G.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Tf(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new G("Request failed with status code "+n.status,n.status>=400&&n.status<500?G.ERR_BAD_REQUEST:G.ERR_BAD_RESPONSE,n.config,n.request,n))}function l8(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function u8(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=r[s];a||(a=u),n[o]=l,r[o]=u;let d=s,p=0;for(;d!==o;)p+=n[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-a<t)return;const m=f&&u-f;return m?Math.round(p*1e3/m):void 0}}function d8(e,t){let n=0,r=1e3/t,o,s;const a=(u,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const f=Date.now(),d=f-n;d>=r?a(u,f):(o=u,s||(s=setTimeout(()=>{s=null,a(o)},r-d)))},()=>o&&a(o)]}const Lo=(e,t,n=3)=>{let r=0;const o=u8(50,250);return d8(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,l=i!=null?Math.min(a,i):a,u=Math.max(0,l-r),f=o(u);r=Math.max(r,l);const d={loaded:l,total:i,progress:i?l/i:void 0,bytes:u,rate:f||void 0,estimated:f&&i?(i-l)/f:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},n)},al=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},il=e=>(...t)=>R.asap(()=>e(...t)),f8=Be.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Be.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Be.origin),Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent)):()=>!0,h8=Be.hasStandardBrowserEnv?{write(e,t,n,r,o,s,a){if(typeof document>"u")return;const i=[`${e}=${encodeURIComponent(t)}`];R.isNumber(n)&&i.push(`expires=${new Date(n).toUTCString()}`),R.isString(r)&&i.push(`path=${r}`),R.isString(o)&&i.push(`domain=${o}`),s===!0&&i.push("secure"),R.isString(a)&&i.push(`SameSite=${a}`),document.cookie=i.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function p8(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function m8(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Pf(e,t,n){let r=!p8(t);return e&&(r||n===!1)?m8(e,t):t}const cl=e=>e instanceof We?{...e}:e;function yn(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,f,d,p){return R.isPlainObject(u)&&R.isPlainObject(f)?R.merge.call({caseless:p},u,f):R.isPlainObject(f)?R.merge({},f):R.isArray(f)?f.slice():f}function o(u,f,d,p){if(R.isUndefined(f)){if(!R.isUndefined(u))return r(void 0,u,d,p)}else return r(u,f,d,p)}function s(u,f){if(!R.isUndefined(f))return r(void 0,f)}function a(u,f){if(R.isUndefined(f)){if(!R.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function i(u,f,d){if(R.hasOwnProp(t,d))return r(u,f);if(R.hasOwnProp(e,d))return r(void 0,u)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:i,headers:(u,f,d)=>o(cl(u),cl(f),d,!0)};return R.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const d=R.hasOwnProp(l,f)?l[f]:o,p=R.hasOwnProp(e,f)?e[f]:void 0,m=R.hasOwnProp(t,f)?t[f]:void 0,v=d(p,m,f);R.isUndefined(v)&&d!==i||(n[f]=v)}),n}const g8=["content-type","content-length"];function v8(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{g8.includes(r.toLowerCase())&&e.set(r,o)})}const y8=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Mf=e=>{const t=yn({},e),n=p=>R.hasOwnProp(t,p)?t[p]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),a=n("xsrfCookieName");let i=n("headers");const l=n("auth"),u=n("baseURL"),f=n("allowAbsoluteUrls"),d=n("url");if(t.headers=i=We.from(i),t.url=Rf(Pf(u,d,f),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?y8(l.password):""))),R.isFormData(r)&&(Be.hasStandardBrowserEnv||Be.hasStandardBrowserWebWorkerEnv?i.setContentType(void 0):R.isFunction(r.getHeaders)&&v8(i,r.getHeaders(),n("formDataHeaderPolicy"))),Be.hasStandardBrowserEnv&&(R.isFunction(o)&&(o=o(t)),o===!0||o==null&&f8(t.url))){const m=s&&a&&h8.read(a);m&&i.set(s,m)}return t},b8=typeof XMLHttpRequest<"u",x8=b8&&function(e){return new Promise(function(n,r){const o=Mf(e);let s=o.data;const a=We.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:u}=o,f,d,p,m,v;function g(){m&&m(),v&&v(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function b(){if(!y)return;const w=We.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),T={data:!i||i==="text"||i==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:w,config:e,request:y};Tf(function(C){n(C),g()},function(C){r(C),g()},T),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(b)},y.onabort=function(){y&&(r(new G("Request aborted",G.ECONNABORTED,e,y)),g(),y=null)},y.onerror=function(E){const T=E&&E.message?E.message:"Network Error",O=new G(T,G.ERR_NETWORK,e,y);O.event=E||null,r(O),g(),y=null},y.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||Ti;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new G(E,T.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,e,y)),g(),y=null},s===void 0&&a.setContentType(null),"setRequestHeader"in y&&R.forEach(a.toJSON(),function(E,T){y.setRequestHeader(T,E)}),R.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),i&&i!=="json"&&(y.responseType=o.responseType),u&&([p,v]=Lo(u,!0),y.addEventListener("progress",p)),l&&y.upload&&([d,m]=Lo(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=w=>{y&&(r(!w||w.type?new Br(null,e,y):w),y.abort(),g(),y=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const x=l8(o.url);if(x&&!Be.protocols.includes(x)){r(new G("Unsupported protocol "+x+":",G.ERR_BAD_REQUEST,e));return}y.send(s||null)})},w8=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(u){if(!o){o=!0,i();const f=u instanceof Error?u:this.reason;r.abort(f instanceof G?f:new Br(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new G(`timeout of ${t}ms exceeded`,G.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>R.asap(i),l}},E8=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},S8=async function*(e,t){for await(const n of R8(e))yield*E8(n,t)},R8=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ll=(e,t,n,r)=>{const o=S8(e,t);let s=0,a,i=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:f}=await o.next();if(u){i(),l.close();return}let d=f.byteLength;if(n){let p=s+=d;n(p)}l.enqueue(new Uint8Array(f))}catch(u){throw i(u),u}},cancel(l){return i(l),o.return()}},{highWaterMark:2})};function C8(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let a=r.length;const i=r.length;for(let m=0;m<i;m++)if(r.charCodeAt(m)===37&&m+2<i){const v=r.charCodeAt(m+1),g=r.charCodeAt(m+2);(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(a-=2,m+=2)}let l=0,u=i-1;const f=m=>m>=2&&r.charCodeAt(m-2)===37&&r.charCodeAt(m-1)===51&&(r.charCodeAt(m)===68||r.charCodeAt(m)===100);u>=0&&(r.charCodeAt(u)===61?(l++,u--):f(u)&&(l++,u-=3)),l===1&&u>=0&&(r.charCodeAt(u)===61||f(u))&&l++;const p=Math.floor(a/4)*3-(l||0);return p>0?p:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let s=0;for(let a=0,i=r.length;a<i;a++){const l=r.charCodeAt(a);if(l<128)s+=1;else if(l<2048)s+=2;else if(l>=55296&&l<=56319&&a+1<i){const u=r.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const Mi="1.16.0",ul=64*1024,{isFunction:so}=R,dl=(e,...t)=>{try{return!!e(...t)}catch{return!1}},A8=e=>{const t=R.global??globalThis,{ReadableStream:n,TextEncoder:r}=t;e=R.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:s,Response:a}=e,i=o?so(o):typeof fetch=="function",l=so(s),u=so(a);if(!i)return!1;const f=i&&so(n),d=i&&(typeof r=="function"?(b=>x=>b.encode(x))(new r):async b=>new Uint8Array(await new s(b).arrayBuffer())),p=l&&f&&dl(()=>{let b=!1;const x=new s(Be.origin,{body:new n,method:"POST",get duplex(){return b=!0,"half"}}),w=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),b&&!w}),m=u&&f&&dl(()=>R.isReadableStream(new a("").body)),v={stream:m&&(b=>b.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!v[b]&&(v[b]=(x,w)=>{let E=x&&x[b];if(E)return E.call(x);throw new G(`Response type '${b}' is not supported`,G.ERR_NOT_SUPPORT,w)})});const g=async b=>{if(b==null)return 0;if(R.isBlob(b))return b.size;if(R.isSpecCompliantForm(b))return(await new s(Be.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(R.isArrayBufferView(b)||R.isArrayBuffer(b))return b.byteLength;if(R.isURLSearchParams(b)&&(b=b+""),R.isString(b))return(await d(b)).byteLength},y=async(b,x)=>{const w=R.toFiniteNumber(b.getContentLength());return w??g(x)};return async b=>{let{url:x,method:w,data:E,signal:T,cancelToken:O,timeout:C,onDownloadProgress:S,onUploadProgress:N,responseType:I,headers:P,withCredentials:H="same-origin",fetchOptions:z,maxContentLength:L,maxBodyLength:k}=Mf(b);const A=R.isNumber(L)&&L>-1,D=R.isNumber(k)&&k>-1;let j=o||fetch;I=I?(I+"").toLowerCase():"text";let _=w8([T,O&&O.toAbortSignal()],C),V=null;const K=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let Y;try{if(A&&typeof x=="string"&&x.startsWith("data:")&&C8(x)>L)throw new G("maxContentLength size of "+L+" exceeded",G.ERR_BAD_RESPONSE,b,V);if(D&&w!=="get"&&w!=="head"){const F=await y(P,E);if(typeof F=="number"&&isFinite(F)&&F>k)throw new G("Request body larger than maxBodyLength limit",G.ERR_BAD_REQUEST,b,V)}if(N&&p&&w!=="get"&&w!=="head"&&(Y=await y(P,E))!==0){let F=new s(x,{method:"POST",body:E,duplex:"half"}),ee;if(R.isFormData(E)&&(ee=F.headers.get("content-type"))&&P.setContentType(ee),F.body){const[Z,X]=al(Y,Lo(il(N)));E=ll(F.body,ul,Z,X)}}R.isString(H)||(H=H?"include":"omit");const B=l&&"credentials"in s.prototype;if(R.isFormData(E)){const F=P.getContentType();F&&/^multipart\/form-data/i.test(F)&&!/boundary=/i.test(F)&&P.delete("content-type")}P.set("User-Agent","axios/"+Mi,!1);const q={...z,signal:_,method:w.toUpperCase(),headers:P.normalize().toJSON(),body:E,duplex:"half",credentials:B?H:void 0};V=l&&new s(x,q);let U=await(l?j(V,z):j(x,q));if(A){const F=R.toFiniteNumber(U.headers.get("content-length"));if(F!=null&&F>L)throw new G("maxContentLength size of "+L+" exceeded",G.ERR_BAD_RESPONSE,b,V)}const J=m&&(I==="stream"||I==="response");if(m&&U.body&&(S||A||J&&K)){const F={};["status","statusText","headers"].forEach(ue=>{F[ue]=U[ue]});const ee=R.toFiniteNumber(U.headers.get("content-length")),[Z,X]=S&&al(ee,Lo(il(S),!0))||[];let te=0;const ie=ue=>{if(A&&(te=ue,te>L))throw new G("maxContentLength size of "+L+" exceeded",G.ERR_BAD_RESPONSE,b,V);Z&&Z(ue)};U=new a(ll(U.body,ul,ie,()=>{X&&X(),K&&K()}),F)}I=I||"text";let $=await v[R.findKey(v,I)||"text"](U,b);if(A&&!m&&!J){let F;if($!=null&&(typeof $.byteLength=="number"?F=$.byteLength:typeof $.size=="number"?F=$.size:typeof $=="string"&&(F=typeof r=="function"?new r().encode($).byteLength:$.length)),typeof F=="number"&&F>L)throw new G("maxContentLength size of "+L+" exceeded",G.ERR_BAD_RESPONSE,b,V)}return!J&&K&&K(),await new Promise((F,ee)=>{Tf(F,ee,{data:$,headers:We.from(U.headers),status:U.status,statusText:U.statusText,config:b,request:V})})}catch(B){if(K&&K(),_&&_.aborted&&_.reason instanceof G){const q=_.reason;throw q.config=b,V&&(q.request=V),B!==q&&(q.cause=B),q}throw B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new G("Network Error",G.ERR_NETWORK,b,V,B&&B.response),{cause:B.cause||B}):G.from(B,B&&B.code,b,V,B&&B.response)}}},T8=new Map,_f=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let a=s.length,i=a,l,u,f=T8;for(;i--;)l=s[i],u=f.get(l),u===void 0&&f.set(l,u=i?new Map:A8(t)),f=u;return u};_f();const _i={http:K6,xhr:x8,fetch:{get:_f}};R.forEach(_i,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const fl=e=>`- ${e}`,P8=e=>R.isFunction(e)||e===null||e===!1;function M8(e,t){e=R.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let a=0;a<n;a++){r=e[a];let i;if(o=r,!P8(r)&&(o=_i[(i=String(r)).toLowerCase()],o===void 0))throw new G(`Unknown adapter '${i}'`);if(o&&(R.isFunction(o)||(o=o.get(t))))break;s[i||"#"+a]=o}if(!o){const a=Object.entries(s).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=n?a.length>1?`since :
15
- `+a.map(fl).join(`
16
- `):" "+fl(a[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o}const Nf={getAdapter:M8,adapters:_i};function Xs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Br(null,e)}function hl(e){return Xs(e),e.headers=We.from(e.headers),e.data=Qs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Nf.getAdapter(e.adapter||Hr.adapter,e)(e).then(function(r){Xs(e),e.response=r;try{r.data=Qs.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=We.from(r.headers),r},function(r){if(!Af(r)&&(Xs(e),r&&r.response)){e.response=r.response;try{r.response.data=Qs.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=We.from(r.response.headers)}return Promise.reject(r)})}const ds={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ds[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pl={};ds.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Mi+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new G(o(a," has been removed"+(n?" in "+n:"")),G.ERR_DEPRECATED);return n&&!pl[a]&&(pl[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,i):!0}};ds.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function _8(e,t,n){if(typeof e!="object")throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(a){const i=e[s],l=i===void 0||a(i,s,e);if(l!==!0)throw new G("option "+s+" must be "+l,G.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new G("Unknown option "+s,G.ERR_BAD_OPTION)}}const yo={assertOptions:_8,validators:ds},dt=yo.validators;let dn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new sl,response:new sl}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=(()=>{if(!o.stack)return"";const a=o.stack.indexOf(`
17
- `);return a===-1?"":o.stack.slice(a+1)})();try{if(!r.stack)r.stack=s;else if(s){const a=s.indexOf(`
18
- `),i=a===-1?-1:s.indexOf(`
19
- `,a+1),l=i===-1?"":s.slice(i+1);String(r.stack).endsWith(l)||(r.stack+=`
20
- `+s)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=yn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&yo.assertOptions(r,{silentJSONParsing:dt.transitional(dt.boolean),forcedJSONParsing:dt.transitional(dt.boolean),clarifyTimeoutError:dt.transitional(dt.boolean),legacyInterceptorReqResOrdering:dt.transitional(dt.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:yo.assertOptions(o,{encode:dt.function,serialize:dt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),yo.assertOptions(n,{baseUrl:dt.spelling("baseURL"),withXsrfToken:dt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&R.merge(s.common,s[n.method]);s&&R.forEach(["delete","get","head","post","put","patch","query","common"],v=>{delete s[v]}),n.headers=We.concat(a,s);const i=[];let l=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;l=l&&g.synchronous;const y=n.transitional||Ti;y&&y.legacyInterceptorReqResOrdering?i.unshift(g.fulfilled,g.rejected):i.push(g.fulfilled,g.rejected)});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let f,d=0,p;if(!l){const v=[hl.bind(this),void 0];for(v.unshift(...i),v.push(...u),p=v.length,f=Promise.resolve(n);d<p;)f=f.then(v[d++],v[d++]);return f}p=i.length;let m=n;for(;d<p;){const v=i[d++],g=i[d++];try{m=v(m)}catch(y){g.call(this,y);break}}try{f=hl.call(this,m)}catch(v){return Promise.reject(v)}for(d=0,p=u.length;d<p;)f=f.then(u[d++],u[d++]);return f}getUri(t){t=yn(this.defaults,t);const n=Pf(t.baseURL,t.url,t.allowAbsoluteUrls);return Rf(n,t.params,t.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(t){dn.prototype[t]=function(n,r){return this.request(yn(r||{},{method:t,url:n,data:(r||{}).data}))}});R.forEach(["post","put","patch","query"],function(t){function n(r){return function(s,a,i){return this.request(yn(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}dn.prototype[t]=n(),t!=="query"&&(dn.prototype[t+"Form"]=n(!0))});let N8=class Of{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{r.subscribe(i),s=i}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,i){r.reason||(r.reason=new Br(s,a,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Of(function(o){t=o}),cancel:t}}};function O8(e){return function(n){return e.apply(null,n)}}function I8(e){return R.isObject(e)&&e.isAxiosError===!0}const Pa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Pa).forEach(([e,t])=>{Pa[t]=e});function If(e){const t=new dn(e),n=hf(dn.prototype.request,t);return R.extend(n,dn.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return If(yn(e,o))},n}const fe=If(Hr);fe.Axios=dn;fe.CanceledError=Br;fe.CancelToken=N8;fe.isCancel=Af;fe.VERSION=Mi;fe.toFormData=us;fe.AxiosError=G;fe.Cancel=fe.CanceledError;fe.all=function(t){return Promise.all(t)};fe.spread=O8;fe.isAxiosError=I8;fe.mergeConfig=yn;fe.AxiosHeaders=We;fe.formToJSON=e=>Cf(R.isHTMLForm(e)?new FormData(e):e);fe.getAdapter=Nf.getAdapter;fe.HttpStatusCode=Pa;fe.default=fe;const{Axios:i5,AxiosError:c5,CanceledError:l5,isCancel:u5,CancelToken:d5,VERSION:f5,all:h5,Cancel:p5,isAxiosError:m5,spread:g5,toFormData:v5,AxiosHeaders:y5,HttpStatusCode:b5,formToJSON:x5,getAdapter:w5,mergeConfig:E5,create:S5}=fe,Ni="/login",D8="/api/auth/";let ml=!1;const L8=e=>{const t=`${e.pathname||"/"}${e.search}${e.hash}`;return`${Ni}?next=${encodeURIComponent(t)}`},j8=e=>{if(!fe.isAxiosError(e)||e.response?.status!==401)return!1;const t=e.config?.url??"";return!t.startsWith(D8)&&t!==Ni},Df=(e=window.location)=>{ml||e.pathname===Ni||(ml=!0,e.assign(L8(e)))},k8="X-Ocean-Brain-Session-Generation";let gl=!1,ao;const F8=e=>!!(e.authRequired&&!e.authenticated),$8=e=>{const t=e.headers.get(k8);return t?ao?ao===t?!1:(ao=t,!0):(ao=t,!1):!1},H8=(e=window.location)=>{gl||(gl=!0,e.reload())},jo=async(e=fetch)=>{const t=await e("/api/auth/session").catch(()=>{});if(!t?.ok)return"unavailable";const n=$8(t),r=await t.json();return F8(r)?(Df(),"expired"):n?(H8(),"reloading"):"active"},B8=e=>!e||e.length===0?null:[...new Set(e)].sort(),V8=e=>!e||e.length===0?[]:[...new Set(e.map(t=>t.trim()).filter(Boolean))].sort(),Z8=e=>!e||e.length===0?null:[...new Set(e)].sort(),ye={notes:{all:()=>["notes"],listAll:()=>["notes","list"],list:(e={})=>["notes","list",{limit:e.limit??25,offset:e.offset??0,query:e.query??"",sortBy:e.sortBy??null,sortOrder:e.sortOrder??null,pinnedFirst:e.pinnedFirst??null,fields:B8(e.fields)}],tagListAll:()=>["notes","tag-list"],tagList:(e={})=>["notes","tag-list",{limit:e.limit??25,offset:e.offset??0,query:e.query??""}],tagNameListAll:()=>["notes","tag-name-list"],tagNameList:e=>["notes","tag-name-list",{limit:e.limit??25,offset:e.offset??0,mode:e.mode??"and",tagNames:V8(e.tagNames)}],detail:e=>["notes","detail",{id:e}],snapshots:(e,t=10)=>["notes","snapshots",{id:e,limit:t}],snapshotDetail:e=>["notes","snapshot-detail",{id:e}],trashAll:()=>["notes","trash"],trash:(e={})=>["notes","trash",{limit:e.limit??25,offset:e.offset??0}],trashDetail:e=>["notes","trash","detail",{id:e}],pinned:()=>["notes","pinned"],backReferencesAll:()=>["notes","back-references"],backReferences:e=>["notes","back-references",{noteId:e}],graph:()=>["notes","graph"],propertyKeysAll:()=>["notes","property-keys"],propertyKeys:(e={})=>["notes","property-keys",{query:e.query??"",limit:e.limit??50,offset:e.offset??0}]},tags:{all:()=>["tags"],list:(e={})=>["tags","list",{limit:e.limit??50,offset:e.offset??0,query:e.query??""}]},images:{all:()=>["images"],listAll:()=>["images","list"],list:(e={})=>["images","list",{limit:e.limit??50,offset:e.offset??0}],detail:e=>["images","detail",{id:e}],notes:e=>["images","notes",{id:e}]},reminders:{all:()=>["reminders"],note:(e,t={})=>["reminders","note",e,{limit:t.limit??10,offset:t.offset??0}],noteAllPages:e=>["reminders","note",e],upcoming:(e={})=>["reminders","upcoming",{limit:e.limit??10,offset:e.offset??0}],upcomingAllPages:()=>["reminders","upcoming"],inDateRangeAll:()=>["reminders","in-date-range"],inDateRange:(e,t)=>["reminders","in-date-range",{year:e,month:t}]},placeholders:{all:()=>["placeholders"],listAll:()=>["placeholders","list"],list:(e={})=>["placeholders","list",{limit:e.limit??25,offset:e.offset??0,query:e.query??"",fields:Z8(e.fields)}]},calendar:{all:()=>["calendar"],notesInDateRange:(e,t)=>["calendar","notes-in-date-range",{year:e,month:t}]},views:{all:()=>["views"],workspace:()=>["views","workspace"],section:e=>["views","section",{id:e}],sectionNotesAll:()=>["views","section-notes"],sectionNotes:(e,t={})=>["views","section-notes",{id:e,limit:t.limit??25,offset:t.offset??0}]},ui:{heroBanner:()=>["ui","hero-banner"]}},Ma=[{queryKey:ye.notes.listAll(),exact:!1},{queryKey:ye.notes.tagListAll(),exact:!1},{queryKey:ye.notes.tagNameListAll(),exact:!1},{queryKey:ye.notes.pinned(),exact:!0},{queryKey:ye.notes.backReferencesAll(),exact:!1},{queryKey:ye.notes.graph(),exact:!0},{queryKey:ye.views.sectionNotesAll(),exact:!1},{queryKey:ye.tags.all(),exact:!1}],Lf={queryKey:ye.notes.propertyKeysAll(),exact:!1},U8=[...Ma,Lf,{queryKey:ye.notes.trashAll(),exact:!1},{queryKey:ye.reminders.all(),exact:!1},{queryKey:ye.images.all(),exact:!1},{queryKey:ye.calendar.all(),exact:!1}],Js=async(e,t)=>{await Promise.all(t.map(n=>e.invalidateQueries(n)))},q8=async(e,t)=>{switch(t.type){case"mcp.note.created":case"web.note.updated":await Js(e,Ma);return;case"mcp.note.updated":await Js(e,[...Ma,Lf]);return;case"mcp.note.deleted":await Js(e,U8);return}},z8=["mcp.note.created","mcp.note.updated","mcp.note.deleted"],K8=["web.note.updated"],W8=[...z8,...K8],_a=new Set,G8="ocean-brain:web-note-events",jf="ocean-brain:web-note-event",ur=new Set;let vl=!1,Na=null;const kf=e=>typeof e=="object"&&e!==null,Y8=e=>!kf(e)||e.source!=="mcp"||typeof e.noteId!="string"||typeof e.type!="string"?!1:e.type==="mcp.note.deleted"||(e.type==="mcp.note.created"||e.type==="mcp.note.updated")&&typeof e.updatedAt=="string",Q8=e=>!(!kf(e)||e.source!=="web"||e.type!=="web.note.updated"||typeof e.noteId!="string"||typeof e.updatedAt!="string"||e.editSessionId!==void 0&&typeof e.editSessionId!="string"||e.eventId!==void 0&&typeof e.eventId!="string"),X8=e=>Y8(e)||Q8(e),Ff=e=>X8(e)?e:null,$f=e=>{try{const t=JSON.parse(e);return Ff(t)}catch{return null}},J8=e=>e.source!=="web"||!e.eventId?!1:ur.has(e.eventId)?!0:(ur.add(e.eventId),ur.size>200&&(ur.clear(),ur.add(e.eventId)),!1),Oi=e=>{J8(e)||_a.forEach(t=>{t(e)})},eb=e=>{const t=Ff(e);!t||t.source!=="web"||Oi(t)},Hf=()=>{vl||typeof window>"u"||(vl=!0,typeof BroadcastChannel<"u"&&(Na=new BroadcastChannel(G8),Na.onmessage=e=>{eb(e.data)}),window.addEventListener("storage",e=>{if(e.key!==jf||!e.newValue)return;const t=$f(e.newValue);t?.source==="web"&&Oi(t)}))},R5=({noteId:e,updatedAt:t,editSessionId:n})=>{if(typeof window>"u")return;Hf();const r={type:"web.note.updated",source:"web",noteId:e,updatedAt:t,...n?{editSessionId:n}:{},eventId:`${Date.now()}:${Math.random().toString(36).slice(2)}`};Na?.postMessage(r);try{window.localStorage.setItem(jf,JSON.stringify(r))}catch{}},tb=e=>(Hf(),_a.add(e),()=>{_a.delete(e)}),nb=e=>t=>{if(!(t instanceof MessageEvent)||typeof t.data!="string")return;const n=$f(t.data);!n||n.type!==e||Oi(n)},rb=()=>{const e=Gn();return c.useEffect(()=>tb(t=>{q8(e,t)}),[e]),c.useEffect(()=>{if(typeof EventSource>"u")return;const t=new EventSource("/api/events");let n=!1;const r=()=>{n=!0,jo()},o=()=>{n&&(n=!1,jo())},s=W8.map(a=>{const i=nb(a);return t.addEventListener(a,i),()=>{t.removeEventListener(a,i)}});return t.addEventListener("error",r),t.addEventListener("open",o),()=>{s.forEach(a=>{a()}),t.removeEventListener("error",r),t.removeEventListener("open",o),t.close()}},[]),null},ob=({children:e})=>h.jsx(Fg,{client:zy,children:h.jsx(hy,{children:h.jsxs(qy,{children:[h.jsx(rb,{}),e]})})}),sb={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},yl={sm:10,md:12,lg:14},Bf=c.forwardRef(({className:e,size:t="md",checked:n,disabled:r,...o},s)=>h.jsxs("label",{className:ae("relative inline-flex items-center justify-center cursor-pointer",r&&"cursor-not-allowed opacity-50",e),children:[h.jsx("input",{ref:s,type:"checkbox",checked:n,disabled:r,className:"sr-only peer",...o}),h.jsx("span",{className:ae(sb[t],"flex items-center justify-center","border border-border-secondary","rounded-[6px]","bg-surface","transition-all duration-200","peer-checked:bg-cta","peer-checked:border-cta","focus-ring-soft"),children:n&&h.jsx(Wv,{width:yl[t],height:yl[t],className:"text-fg-on-filled",weight:"bold"})})]}));Bf.displayName="Checkbox";var ab=hd,ib=pd,Vf=md,Zf=gd,cb=xi,Uf=vd,qf=yd;const lb=ab,ub=ib,db=cb,zf=c.createContext("default"),Vr=()=>c.useContext(zf),Kf=c.forwardRef(({className:e,...t},n)=>h.jsx(Vf,{ref:n,className:ae("fixed","inset-0","z-[1090]","bg-overlay","backdrop-blur-[2px]","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0",e),...t}));Kf.displayName=Vf.displayName;const Wf=c.forwardRef(({className:e,children:t,variant:n="default",...r},o)=>h.jsxs(ub,{children:[h.jsx(Kf,{}),h.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-center justify-center p-4",children:h.jsx(Zf,{ref:o,"data-dialog-variant":n,className:wi({variant:n,className:e}),...r,children:h.jsx(zf.Provider,{value:n,children:t})})})]}));Wf.displayName=Zf.displayName;const Gf=({title:e,onClose:t,className:n})=>{const r=Vr();return h.jsxs("div",{className:cy({variant:r,className:n}),children:[h.jsx(Xf,{children:e}),t&&h.jsx(db,{asChild:!0,children:h.jsx("button",{type:"button",className:ly({variant:r}),onClick:t,children:h.jsx(cf,{className:r==="compact"||r==="form"||r==="confirm"?"h-[18px] w-[18px]":"h-5 w-5"})})})]})};Gf.displayName="DialogHeader";const Yf=c.forwardRef(({className:e,...t},n)=>{const r=Vr();return h.jsx("div",{ref:n,className:Ei({variant:r,className:e}),...t})});Yf.displayName="DialogBody";const Qf=c.forwardRef(({className:e,...t},n)=>{const r=Vr();return h.jsx("div",{ref:n,className:Si({variant:r,className:e}),...t})});Qf.displayName="DialogFooter";const Xf=c.forwardRef(({className:e,...t},n)=>{const r=Vr();return h.jsx(Uf,{ref:n,className:ae(Ri({variant:r}),e),...t})});Xf.displayName=Uf.displayName;const Jf=c.forwardRef(({className:e,...t},n)=>{const r=Vr();return h.jsx(qf,{ref:n,className:ae(Ci({variant:r}),e),...t})});Jf.displayName=qf.displayName;const Ft=({isOpen:e,onClose:t,children:n,className:r,variant:o="default"})=>h.jsx(lb,{open:e,onOpenChange:s=>!s&&t(),children:h.jsx(Wf,{variant:o,className:r,children:n})});Ft.Header=Gf;Ft.Body=Yf;Ft.Footer=Qf;Ft.Description=Jf;function Ii(e){const t=e+"CollectionProvider",[n,r]=Nt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=g=>{const{scope:y,children:b}=g,x=M.useRef(null),w=M.useRef(new Map).current;return h.jsx(o,{scope:y,itemMap:w,collectionRef:x,children:b})};a.displayName=t;const i=e+"CollectionSlot",l=qn(i),u=M.forwardRef((g,y)=>{const{scope:b,children:x}=g,w=s(i,b),E=le(y,w.collectionRef);return h.jsx(l,{ref:E,children:x})});u.displayName=i;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=qn(f),m=M.forwardRef((g,y)=>{const{scope:b,children:x,...w}=g,E=M.useRef(null),T=le(y,E),O=s(f,b);return M.useEffect(()=>(O.itemMap.set(E,{ref:E,...w}),()=>{O.itemMap.delete(E)})),h.jsx(p,{[d]:"",ref:T,children:x})});m.displayName=f;function v(g){const y=s(e+"CollectionConsumer",g);return M.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((O,C)=>w.indexOf(O.ref.current)-w.indexOf(C.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},v,r]}var fb=c.createContext(void 0);function fs(e){const t=c.useContext(fb);return e||t||"ltr"}var hb="Arrow",e0=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return h.jsx(re.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});e0.displayName=hb;var pb=e0;function mb(e){const[t,n]=c.useState(void 0);return Ve(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,i=u.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Di="Popper",[t0,Qn]=Nt(Di),[gb,n0]=t0(Di),r0=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return h.jsx(gb,{scope:t,anchor:r,onAnchorChange:o,children:n})};r0.displayName=Di;var o0="PopperAnchor",s0=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=n0(o0,n),a=c.useRef(null),i=le(t,a),l=c.useRef(null);return c.useEffect(()=>{const u=l.current;l.current=r?.current||a.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:h.jsx(re.div,{...o,ref:i})});s0.displayName=o0;var Li="PopperContent",[vb,yb]=t0(Li),a0=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:v,...g}=e,y=n0(Li,n),[b,x]=c.useState(null),w=le(t,$=>x($)),[E,T]=c.useState(null),O=mb(E),C=O?.width??0,S=O?.height??0,N=r+(s!=="center"?"-"+s:""),I=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},P=Array.isArray(u)?u:[u],H=P.length>0,z={padding:I,boundary:P.filter(xb),altBoundary:H},{refs:L,floatingStyles:k,placement:A,isPositioned:D,middlewareData:j}=r1({strategy:"fixed",placement:N,whileElementsMounted:(...$)=>u1(...$,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[o1({mainAxis:o+S,alignmentAxis:a}),l&&s1({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?d1():void 0,...z}),l&&a1({...z}),i1({...z,apply:({elements:$,rects:F,availableWidth:ee,availableHeight:Z})=>{const{width:X,height:te}=F.reference,ie=$.floating.style;ie.setProperty("--radix-popper-available-width",`${ee}px`),ie.setProperty("--radix-popper-available-height",`${Z}px`),ie.setProperty("--radix-popper-anchor-width",`${X}px`),ie.setProperty("--radix-popper-anchor-height",`${te}px`)}}),E&&c1({element:E,padding:i}),wb({arrowWidth:C,arrowHeight:S}),p&&l1({strategy:"referenceHidden",...z})]}),[_,V]=l0(A),K=Mt(v);Ve(()=>{D&&K?.()},[D,K]);const Y=j.arrow?.x,B=j.arrow?.y,q=j.arrow?.centerOffset!==0,[U,J]=c.useState();return Ve(()=>{b&&J(window.getComputedStyle(b).zIndex)},[b]),h.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...k,transform:D?k.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(vb,{scope:n,placedSide:_,onArrowChange:T,arrowX:Y,arrowY:B,shouldHideArrow:q,children:h.jsx(re.div,{"data-side":_,"data-align":V,...g,ref:w,style:{...g.style,animation:D?void 0:"none"}})})})});a0.displayName=Li;var i0="PopperArrow",bb={top:"bottom",right:"left",bottom:"top",left:"right"},c0=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=yb(i0,r),a=bb[s.placedSide];return h.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:h.jsx(pb,{...o,ref:n,style:{...o.style,display:"block"}})})});c0.displayName=i0;function xb(e){return e!==null}var wb=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,f]=l0(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(o.arrow?.x??0)+i/2,m=(o.arrow?.y??0)+l/2;let v="",g="";return u==="bottom"?(v=a?d:`${p}px`,g=`${-l}px`):u==="top"?(v=a?d:`${p}px`,g=`${r.floating.height+l}px`):u==="right"?(v=`${-l}px`,g=a?d:`${m}px`):u==="left"&&(v=`${r.floating.width+l}px`,g=a?d:`${m}px`),{data:{x:v,y:g}}}});function l0(e){const[t,n="center"]=e.split("-");return[t,n]}var ji=r0,ki=s0,Fi=a0,$i=c0,ea="rovingFocusGroup.onEntryFocus",Eb={bubbles:!1,cancelable:!0},Zr="RovingFocusGroup",[Oa,u0,Sb]=Ii(Zr),[Rb,hs]=Nt(Zr,[Sb]),[Cb,Ab]=Rb(Zr),d0=c.forwardRef((e,t)=>h.jsx(Oa.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(Oa.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(Tb,{...e,ref:t})})}));d0.displayName=Zr;var Tb=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,p=c.useRef(null),m=le(t,p),v=fs(s),[g,y]=Bt({prop:a,defaultProp:i??null,onChange:l,caller:Zr}),[b,x]=c.useState(!1),w=Mt(u),E=u0(n),T=c.useRef(!1),[O,C]=c.useState(0);return c.useEffect(()=>{const S=p.current;if(S)return S.addEventListener(ea,w),()=>S.removeEventListener(ea,w)},[w]),h.jsx(Cb,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(S=>y(S),[y]),onItemShiftTab:c.useCallback(()=>x(!0),[]),onFocusableItemAdd:c.useCallback(()=>C(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>C(S=>S-1),[]),children:h.jsx(re.div,{tabIndex:b||O===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{T.current=!0}),onFocus:W(e.onFocus,S=>{const N=!T.current;if(S.target===S.currentTarget&&N&&!b){const I=new CustomEvent(ea,Eb);if(S.currentTarget.dispatchEvent(I),!I.defaultPrevented){const P=E().filter(A=>A.focusable),H=P.find(A=>A.active),z=P.find(A=>A.id===g),k=[H,z,...P].filter(Boolean).map(A=>A.ref.current);p0(k,f)}}T.current=!1}),onBlur:W(e.onBlur,()=>x(!1))})})}),f0="RovingFocusGroupItem",h0=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...i}=e,l=Tt(),u=s||l,f=Ab(f0,n),d=f.currentTabStopId===u,p=u0(n),{onFocusableItemAdd:m,onFocusableItemRemove:v,currentTabStopId:g}=f;return c.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),h.jsx(Oa.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:h.jsx(re.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:W(e.onMouseDown,y=>{r?f.onItemFocus(u):y.preventDefault()}),onFocus:W(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:W(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){f.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const b=_b(y,f.orientation,f.dir);if(b!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let w=p().filter(E=>E.focusable).map(E=>E.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const E=w.indexOf(y.currentTarget);w=f.loop?Nb(w,E+1):w.slice(E+1)}setTimeout(()=>p0(w))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:g!=null}):a})})});h0.displayName=f0;var Pb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Mb(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _b(e,t,n){const r=Mb(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Pb[r]}function p0(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Nb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var m0=d0,g0=h0,Ia=["Enter"," "],Ob=["ArrowDown","PageUp","Home"],v0=["ArrowUp","PageDown","End"],Ib=[...Ob,...v0],Db={ltr:[...Ia,"ArrowRight"],rtl:[...Ia,"ArrowLeft"]},Lb={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ur="Menu",[Cr,jb,kb]=Ii(Ur),[Sn,y0]=Nt(Ur,[kb,Qn,hs]),ps=Qn(),b0=hs(),[Fb,Rn]=Sn(Ur),[$b,qr]=Sn(Ur),x0=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,i=ps(t),[l,u]=c.useState(null),f=c.useRef(!1),d=Mt(s),p=fs(o);return c.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),h.jsx(ji,{...i,children:h.jsx(Fb,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u,children:h.jsx($b,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:a,children:r})})})};x0.displayName=Ur;var Hb="MenuAnchor",Hi=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ps(n);return h.jsx(ki,{...o,...r,ref:t})});Hi.displayName=Hb;var Bi="MenuPortal",[Bb,w0]=Sn(Bi,{forceMount:void 0}),E0=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Rn(Bi,t);return h.jsx(Bb,{scope:t,forceMount:n,children:h.jsx(Ot,{present:n||s.open,children:h.jsx(jr,{asChild:!0,container:o,children:r})})})};E0.displayName=Bi;var mt="MenuContent",[Vb,Vi]=Sn(mt),S0=c.forwardRef((e,t)=>{const n=w0(mt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Rn(mt,e.__scopeMenu),a=qr(mt,e.__scopeMenu);return h.jsx(Cr.Provider,{scope:e.__scopeMenu,children:h.jsx(Ot,{present:r||s.open,children:h.jsx(Cr.Slot,{scope:e.__scopeMenu,children:a.modal?h.jsx(Zb,{...o,ref:t}):h.jsx(Ub,{...o,ref:t})})})})}),Zb=c.forwardRef((e,t)=>{const n=Rn(mt,e.__scopeMenu),r=c.useRef(null),o=le(t,r);return c.useEffect(()=>{const s=r.current;if(s)return gi(s)},[]),h.jsx(Zi,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ub=c.forwardRef((e,t)=>{const n=Rn(mt,e.__scopeMenu);return h.jsx(Zi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),qb=qn("MenuContent.ScrollLock"),Zi=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...g}=e,y=Rn(mt,n),b=qr(mt,n),x=ps(n),w=b0(n),E=jb(n),[T,O]=c.useState(null),C=c.useRef(null),S=le(t,C,y.onContentChange),N=c.useRef(0),I=c.useRef(""),P=c.useRef(0),H=c.useRef(null),z=c.useRef("right"),L=c.useRef(0),k=v?Ja:c.Fragment,A=v?{as:qb,allowPinchZoom:!0}:void 0,D=_=>{const V=I.current+_,K=E().filter($=>!$.disabled),Y=document.activeElement,B=K.find($=>$.ref.current===Y)?.textValue,q=K.map($=>$.textValue),U=r4(q,V,B),J=K.find($=>$.textValue===U)?.ref.current;(function $(F){I.current=F,window.clearTimeout(N.current),F!==""&&(N.current=window.setTimeout(()=>$(""),1e3))})(V),J&&setTimeout(()=>J.focus())};c.useEffect(()=>()=>window.clearTimeout(N.current),[]),mi();const j=c.useCallback(_=>z.current===H.current?.side&&s4(_,H.current?.area),[]);return h.jsx(Vb,{scope:n,searchRef:I,onItemEnter:c.useCallback(_=>{j(_)&&_.preventDefault()},[j]),onItemLeave:c.useCallback(_=>{j(_)||(C.current?.focus(),O(null))},[j]),onTriggerLeave:c.useCallback(_=>{j(_)&&_.preventDefault()},[j]),pointerGraceTimerRef:P,onPointerGraceIntentChange:c.useCallback(_=>{H.current=_},[]),children:h.jsx(k,{...A,children:h.jsx(os,{asChild:!0,trapped:o,onMountAutoFocus:W(s,_=>{_.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:h.jsx(Lr,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:m,children:h.jsx(m0,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:O,onEntryFocus:W(l,_=>{b.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(Fi,{role:"menu","aria-orientation":"vertical","data-state":$0(y.open),"data-radix-menu-content":"",dir:b.dir,...x,...g,ref:S,style:{outline:"none",...g.style},onKeyDown:W(g.onKeyDown,_=>{const K=_.target.closest("[data-radix-menu-content]")===_.currentTarget,Y=_.ctrlKey||_.altKey||_.metaKey,B=_.key.length===1;K&&(_.key==="Tab"&&_.preventDefault(),!Y&&B&&D(_.key));const q=C.current;if(_.target!==q||!Ib.includes(_.key))return;_.preventDefault();const J=E().filter($=>!$.disabled).map($=>$.ref.current);v0.includes(_.key)&&J.reverse(),t4(J)}),onBlur:W(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(N.current),I.current="")}),onPointerMove:W(e.onPointerMove,Ar(_=>{const V=_.target,K=L.current!==_.clientX;if(_.currentTarget.contains(V)&&K){const Y=_.clientX>L.current?"right":"left";z.current=Y,L.current=_.clientX}}))})})})})})})});S0.displayName=mt;var zb="MenuGroup",Ui=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(re.div,{role:"group",...r,ref:t})});Ui.displayName=zb;var Kb="MenuLabel",R0=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(re.div,{...r,ref:t})});R0.displayName=Kb;var ko="MenuItem",bl="menu.itemSelect",ms=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=c.useRef(null),a=qr(ko,e.__scopeMenu),i=Vi(ko,e.__scopeMenu),l=le(t,s),u=c.useRef(!1),f=()=>{const d=s.current;if(!n&&d){const p=new CustomEvent(bl,{bubbles:!0,cancelable:!0});d.addEventListener(bl,m=>r?.(m),{once:!0}),qu(d,p),p.defaultPrevented?u.current=!1:a.onClose()}};return h.jsx(C0,{...o,ref:l,disabled:n,onClick:W(e.onClick,f),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:W(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:W(e.onKeyDown,d=>{const p=i.searchRef.current!=="";n||p&&d.key===" "||Ia.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});ms.displayName=ko;var C0=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=Vi(ko,n),i=b0(n),l=c.useRef(null),u=le(t,l),[f,d]=c.useState(!1),[p,m]=c.useState("");return c.useEffect(()=>{const v=l.current;v&&m((v.textContent??"").trim())},[s.children]),h.jsx(Cr.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:h.jsx(g0,{asChild:!0,...i,focusable:!r,children:h.jsx(re.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:W(e.onPointerMove,Ar(v=>{r?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,Ar(v=>a.onItemLeave(v))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),Wb="MenuCheckboxItem",A0=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsx(N0,{scope:e.__scopeMenu,checked:n,children:h.jsx(ms,{role:"menuitemcheckbox","aria-checked":Fo(n)?"mixed":n,...o,ref:t,"data-state":zi(n),onSelect:W(o.onSelect,()=>r?.(Fo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});A0.displayName=Wb;var T0="MenuRadioGroup",[Gb,Yb]=Sn(T0,{value:void 0,onValueChange:()=>{}}),P0=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Mt(r);return h.jsx(Gb,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsx(Ui,{...o,ref:t})})});P0.displayName=T0;var M0="MenuRadioItem",_0=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=Yb(M0,e.__scopeMenu),s=n===o.value;return h.jsx(N0,{scope:e.__scopeMenu,checked:s,children:h.jsx(ms,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":zi(s),onSelect:W(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});_0.displayName=M0;var qi="MenuItemIndicator",[N0,Qb]=Sn(qi,{checked:!1}),O0=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Qb(qi,n);return h.jsx(Ot,{present:r||Fo(s.checked)||s.checked===!0,children:h.jsx(re.span,{...o,ref:t,"data-state":zi(s.checked)})})});O0.displayName=qi;var Xb="MenuSeparator",I0=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(re.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});I0.displayName=Xb;var Jb="MenuArrow",D0=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ps(n);return h.jsx($i,{...o,...r,ref:t})});D0.displayName=Jb;var e4="MenuSub",[C5,L0]=Sn(e4),hr="MenuSubTrigger",j0=c.forwardRef((e,t)=>{const n=Rn(hr,e.__scopeMenu),r=qr(hr,e.__scopeMenu),o=L0(hr,e.__scopeMenu),s=Vi(hr,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const d=i.current;return()=>{window.clearTimeout(d),l(null)}},[i,l]),h.jsx(Hi,{asChild:!0,...u,children:h.jsx(C0,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":$0(n.open),...e,ref:Dr(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,Ar(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:W(e.onPointerLeave,Ar(d=>{f();const p=n.content?.getBoundingClientRect();if(p){const m=n.content?.dataset.side,v=m==="right",g=v?-5:5,y=p[v?"left":"right"],b=p[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x:y,y:p.top},{x:b,y:p.top},{x:b,y:p.bottom},{x:y,y:p.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:W(e.onKeyDown,d=>{const p=s.searchRef.current!=="";e.disabled||p&&d.key===" "||Db[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});j0.displayName=hr;var k0="MenuSubContent",F0=c.forwardRef((e,t)=>{const n=w0(mt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Rn(mt,e.__scopeMenu),a=qr(mt,e.__scopeMenu),i=L0(k0,e.__scopeMenu),l=c.useRef(null),u=le(t,l);return h.jsx(Cr.Provider,{scope:e.__scopeMenu,children:h.jsx(Ot,{present:r||s.open,children:h.jsx(Cr.Slot,{scope:e.__scopeMenu,children:h.jsx(Zi,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{a.isUsingKeyboardRef.current&&l.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:W(e.onFocusOutside,f=>{f.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:W(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:W(e.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),p=Lb[a.dir].includes(f.key);d&&p&&(s.onOpenChange(!1),i.trigger?.focus(),f.preventDefault())})})})})})});F0.displayName=k0;function $0(e){return e?"open":"closed"}function Fo(e){return e==="indeterminate"}function zi(e){return Fo(e)?"indeterminate":e?"checked":"unchecked"}function t4(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function n4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function r4(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=n4(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function o4(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],l=t[a],u=i.x,f=i.y,d=l.x,p=l.y;f>r!=p>r&&n<(d-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function s4(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return o4(n,t)}function Ar(e){return t=>t.pointerType==="mouse"?e(t):void 0}var a4=x0,i4=Hi,c4=E0,l4=S0,u4=Ui,d4=R0,f4=ms,h4=A0,p4=P0,m4=_0,g4=O0,v4=I0,y4=D0,b4=j0,x4=F0,gs="DropdownMenu",[w4]=Nt(gs,[y0]),Ye=y0(),[E4,H0]=w4(gs),B0=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,l=Ye(t),u=c.useRef(null),[f,d]=Bt({prop:o,defaultProp:s??!1,onChange:a,caller:gs});return h.jsx(E4,{scope:t,triggerId:Tt(),triggerRef:u,contentId:Tt(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(p=>!p),[d]),modal:i,children:h.jsx(a4,{...l,open:f,onOpenChange:d,dir:r,modal:i,children:n})})};B0.displayName=gs;var V0="DropdownMenuTrigger",Z0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=H0(V0,n),a=Ye(n);return h.jsx(i4,{asChild:!0,...a,children:h.jsx(re.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Dr(t,s.triggerRef),onPointerDown:W(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:W(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Z0.displayName=V0;var S4="DropdownMenuPortal",U0=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ye(t);return h.jsx(c4,{...r,...n})};U0.displayName=S4;var q0="DropdownMenuContent",z0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=H0(q0,n),s=Ye(n),a=c.useRef(!1);return h.jsx(l4,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:W(e.onCloseAutoFocus,i=>{a.current||o.triggerRef.current?.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:W(e.onInteractOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!o.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});z0.displayName=q0;var R4="DropdownMenuGroup",C4=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return h.jsx(u4,{...o,...r,ref:t})});C4.displayName=R4;var A4="DropdownMenuLabel",K0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return h.jsx(d4,{...o,...r,ref:t})});K0.displayName=A4;var T4="DropdownMenuItem",W0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return h.jsx(f4,{...o,...r,ref:t})});W0.displayName=T4;var P4="DropdownMenuCheckboxItem",G0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return h.jsx(h4,{...o,...r,ref:t})});G0.displayName=P4;var M4="DropdownMenuRadioGroup",_4=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return h.jsx(p4,{...o,...r,ref:t})});_4.displayName=M4;var N4="DropdownMenuRadioItem",Y0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return h.jsx(m4,{...o,...r,ref:t})});Y0.displayName=N4;var O4="DropdownMenuItemIndicator",Q0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return h.jsx(g4,{...o,...r,ref:t})});Q0.displayName=O4;var I4="DropdownMenuSeparator",X0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return h.jsx(v4,{...o,...r,ref:t})});X0.displayName=I4;var D4="DropdownMenuArrow",L4=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return h.jsx(y4,{...o,...r,ref:t})});L4.displayName=D4;var j4="DropdownMenuSubTrigger",J0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return h.jsx(b4,{...o,...r,ref:t})});J0.displayName=j4;var k4="DropdownMenuSubContent",eh=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return h.jsx(x4,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});eh.displayName=k4;var F4=B0,$4=Z0,H4=U0,B4=z0,V4=K0,Z4=W0,U4=G0,q4=Y0,z4=Q0,K4=X0,W4=J0,G4=eh,Y4=F4,Q4=$4,X4=H4,th=B4,nh=Z4,rh=U4,oh=q4,sh=z4,ah=V4,ih=K4,ch=W4,lh=G4;const J4=Y4,ex=Q4,tx=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>h.jsx(ch,{ref:o,className:ae("flex","cursor-default","select-none","items-center","rounded-[10px]","px-3","py-2","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","focus:bg-hover-subtle","focus:text-fg-default","data-[state=open]:bg-hover-subtle","data-[state=open]:text-fg-default",t&&"pl-8",e),...r,children:n}));tx.displayName=ch.displayName;const nx=c.forwardRef(({className:e,...t},n)=>h.jsx(lh,{ref:n,className:ae("z-50","min-w-[8rem]","overflow-hidden","surface-floating","p-1",e),...t}));nx.displayName=lh.displayName;const uh=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(X4,{children:h.jsx(th,{ref:r,sideOffset:t,className:ae("z-[1100]","min-w-[10rem]","overflow-hidden","surface-floating","p-1","data-[state=open]:animate-fade-in","data-[state=open]:animate-zoom-in",e),...n})}));uh.displayName=th.displayName;const dh=c.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(nh,{ref:r,className:ae("relative","flex","cursor-pointer","select-none","items-center","px-3","py-2","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","transition-colors","rounded-[10px]","focus:bg-hover-subtle","focus:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",t&&"pl-8",e),...n}));dh.displayName=nh.displayName;const rx=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>h.jsxs(rh,{ref:o,className:ae("relative","flex","cursor-pointer","select-none","items-center","rounded-[10px]","py-2","pl-8","pr-3","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","transition-colors","focus:bg-hover-subtle","focus:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e),checked:n,...r,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(sh,{children:"✓"})}),t]}));rx.displayName=rh.displayName;const ox=c.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(oh,{ref:r,className:ae("relative","flex","cursor-pointer","select-none","items-center","rounded-[10px]","py-2","pl-8","pr-3","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","transition-colors","focus:bg-hover-subtle","focus:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e),...n,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(sh,{children:"●"})}),t]}));ox.displayName=oh.displayName;const sx=c.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(ah,{ref:r,className:ae("px-2","py-1.5","text-sm","font-semibold","text-fg-secondary",t&&"pl-8",e),...n}));sx.displayName=ah.displayName;const fh=c.forwardRef(({className:e,...t},n)=>h.jsx(ih,{ref:n,className:ae("-mx-1","my-1","h-px","bg-divider",e),...t}));fh.displayName=ih.displayName;const ax=({button:e,items:t})=>h.jsxs(J4,{children:[h.jsx(ex,{asChild:!0,children:e}),h.jsx(uh,{align:"end",children:t.map((n,r)=>n.type==="separator"?h.jsx(fh,{},n.key??`separator-${r}`):h.jsx(dh,{onClick:n.onClick,children:n.name},n.name))})]}),hh=c.forwardRef(({title:e,description:t,className:n="",...r},o)=>h.jsxs("div",{ref:o,className:ae("flex flex-col items-center justify-center text-center","h-[400px]","bg-muted/30","border-2 border-dashed","border-border-secondary","rounded-[20px]","p-8",n),...r,children:[e&&h.jsx(se,{as:"h3",variant:"heading",weight:"bold",tone:"muted",className:"mb-2",children:e}),t&&h.jsx(se,{as:"p",variant:"meta",weight:"medium",tone:"tertiary",className:"max-w-[400px]",children:t})]}));hh.displayName="Empty";const ix=je(["w-full","border","border-border-subtle","bg-elevated","text-fg-default","placeholder:text-fg-placeholder","transition-colors","outline-none","focus-ring-soft","disabled:cursor-not-allowed","disabled:opacity-50"],{variants:{variant:{default:[],ghost:["border-transparent","bg-subtle","hover:bg-hover-subtle"],error:["border-border-error","bg-accent-soft-danger/40","text-fg-default"]},size:{sm:"h-8 px-3 text-sm rounded-[12px]",md:"h-9 px-3 text-sm rounded-[14px]",lg:"h-11 px-4 text-base rounded-[16px]"}},defaultVariants:{variant:"default",size:"md"}}),cx=c.forwardRef(({className:e,variant:t,size:n,type:r="text",...o},s)=>h.jsx("input",{ref:s,type:r,className:ix({variant:t,size:n,className:e}),...o}));cx.displayName="Input";const lx=je(["font-bold","text-fg-muted","whitespace-nowrap"],{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"sm"}}),ph=c.forwardRef(({className:e,size:t,...n},r)=>h.jsx("label",{ref:r,className:lx({size:t,className:e}),...n}));ph.displayName="Label";const ux=je(["focus-ring-soft","inline-flex","shrink-0","items-center","justify-center","bg-transparent","text-fg-default/70","outline-none","transition-colors","hover:bg-hover-subtle","hover:text-fg-default"],{variants:{size:{sm:"h-7 w-7 rounded-[8px]",md:"h-8 w-8 rounded-[10px]",lg:"h-9 w-9 rounded-[12px]"}},defaultVariants:{size:"md"}}),dx={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"};function fx({label:e,size:t="md",iconClassName:n,className:r,type:o="button",...s}){return h.jsx("button",{type:o,"aria-label":e,className:ux({size:t,className:r}),...s,children:h.jsx(Yv,{className:n??dx[t]})})}const mh=c.forwardRef(({page:e,last:t,onChange:n,className:r="",...o},s)=>{const a=Number(e),i=Number(t),l=[];for(let d=1;d<i+1;d++)(a===d||a===1&&d<a+5||a===2&&d<a+4||d>a-3&&d<a+3||a===i-1&&d>a-4||a===i&&d>a-5)&&l.push(d);const u=a===1,f=a===i;return h.jsxs("nav",{ref:s,className:`mt-8 flex justify-center items-center gap-1 ${r}`,...o,children:[h.jsxs(kn,{disabled:u,onClick:()=>!u&&n(1),"aria-label":"First page",isSkip:!0,children:[h.jsx(Ws,{width:16}),h.jsx(Ws,{width:16})]}),h.jsx(kn,{disabled:u,onClick:()=>!u&&n(a-1),"aria-label":"Previous page",children:h.jsx(Ws,{width:20})}),l.map(d=>h.jsx(kn,{active:a===d,onClick:()=>n(d),"aria-label":`Page ${d}`,"aria-current":a===d?"page":void 0,children:d},d)),h.jsx(kn,{disabled:f,onClick:()=>!f&&n(a+1),"aria-label":"Next page",children:h.jsx(vr,{width:20})}),h.jsxs(kn,{disabled:f,onClick:()=>!f&&n(i),"aria-label":"Last page",isSkip:!0,children:[h.jsx(vr,{width:16}),h.jsx(vr,{width:16})]})]})});mh.displayName="Pagination";const kn=c.forwardRef(({active:e,disabled:t,isSkip:n,children:r,className:o="",...s},a)=>{const i=`
21
- flex justify-center items-center
22
- leading-normal text-base font-medium
23
- w-9 h-9 md:w-10 md:h-10
24
- border border-transparent
25
- rounded-[10px]
26
- transition-all duration-200
27
- `,l=e?"cursor-default bg-cta border-cta text-fg-on-filled":t?"cursor-default text-fg-disabled border-transparent":"cursor-pointer text-fg-default hover:bg-hover hover:border-border-subtle",u=n?"relative [&>svg]:absolute [&>svg:first-child]:-translate-x-[3px] [&>svg:last-child]:translate-x-[3px]":"";return h.jsx("button",{ref:a,type:"button",disabled:t,className:`${i} ${l} ${u} ${o}`,...s,children:r})});kn.displayName="PaginationItem";const hx=je(["h-full","transition-all","duration-300","ease-out"],{variants:{color:{primary:"bg-pastel-blue-200",success:"bg-pastel-green-200",danger:"bg-pastel-pink-200",warning:"bg-pastel-orange-200"}},defaultVariants:{color:"primary"}}),px=c.forwardRef(({value:e,max:t,color:n,className:r="",...o},s)=>{const a=Math.min(100,Math.max(0,e/t*100));return h.jsx("div",{ref:s,className:ae("w-full h-3","bg-surface","border-2 border-border","rounded-[6px]","overflow-hidden",r),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,...o,children:h.jsx("div",{className:`progress-fill ${hx({color:n})}`,style:{"--progress-width":`${a}%`}})})});px.displayName="Progress";function xl(e,[t,n]){return Math.min(n,Math.max(t,e))}function mx(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var gh=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),gx="VisuallyHidden",vh=c.forwardRef((e,t)=>h.jsx(re.span,{...e,ref:t,style:{...gh,...e.style}}));vh.displayName=gx;var vx=vh,yx=[" ","Enter","ArrowUp","ArrowDown"],bx=[" ","Enter"],bn="Select",[vs,ys,xx]=Ii(bn),[Xn]=Nt(bn,[xx,Qn]),bs=Qn(),[wx,en]=Xn(bn),[Ex,Sx]=Xn(bn),yh=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:a,defaultValue:i,onValueChange:l,dir:u,name:f,autoComplete:d,disabled:p,required:m,form:v}=e,g=bs(t),[y,b]=c.useState(null),[x,w]=c.useState(null),[E,T]=c.useState(!1),O=fs(u),[C,S]=Bt({prop:r,defaultProp:o??!1,onChange:s,caller:bn}),[N,I]=Bt({prop:a,defaultProp:i,onChange:l,caller:bn}),P=c.useRef(null),H=y?v||!!y.closest("form"):!0,[z,L]=c.useState(new Set),k=Array.from(z).map(A=>A.props.value).join(";");return h.jsx(ji,{...g,children:h.jsxs(wx,{required:m,scope:t,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:E,onValueNodeHasChildrenChange:T,contentId:Tt(),value:N,onValueChange:I,open:C,onOpenChange:S,dir:O,triggerPointerDownPosRef:P,disabled:p,children:[h.jsx(vs.Provider,{scope:t,children:h.jsx(Ex,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(A=>{L(D=>new Set(D).add(A))},[]),onNativeOptionRemove:c.useCallback(A=>{L(D=>{const j=new Set(D);return j.delete(A),j})},[]),children:n})}),H?h.jsxs(kh,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:d,value:N,onChange:A=>I(A.target.value),disabled:p,form:v,children:[N===void 0?h.jsx("option",{value:""}):null,Array.from(z)]},k):null]})})};yh.displayName=bn;var bh="SelectTrigger",xh=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=bs(n),a=en(bh,n),i=a.disabled||r,l=le(t,a.onTriggerChange),u=ys(n),f=c.useRef("touch"),[d,p,m]=$h(g=>{const y=u().filter(w=>!w.disabled),b=y.find(w=>w.value===a.value),x=Hh(y,g,b);x!==void 0&&a.onValueChange(x.value)}),v=g=>{i||(a.onOpenChange(!0),m()),g&&(a.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return h.jsx(ki,{asChild:!0,...s,children:h.jsx(re.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Fh(a.value)?"":void 0,...o,ref:l,onClick:W(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&v(g)}),onPointerDown:W(o.onPointerDown,g=>{f.current=g.pointerType;const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:W(o.onKeyDown,g=>{const y=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(y&&g.key===" ")&&yx.includes(g.key)&&(v(),g.preventDefault())})})})});xh.displayName=bh;var wh="SelectValue",Eh=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:a="",...i}=e,l=en(wh,n),{onValueNodeHasChildrenChange:u}=l,f=s!==void 0,d=le(t,l.onValueNodeChange);return Ve(()=>{u(f)},[u,f]),h.jsx(re.span,{...i,ref:d,style:{pointerEvents:"none"},children:Fh(l.value)?h.jsx(h.Fragment,{children:a}):s})});Eh.displayName=wh;var Rx="SelectIcon",Sh=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return h.jsx(re.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Sh.displayName=Rx;var Cx="SelectPortal",Rh=e=>h.jsx(jr,{asChild:!0,...e});Rh.displayName=Cx;var xn="SelectContent",Ch=c.forwardRef((e,t)=>{const n=en(xn,e.__scopeSelect),[r,o]=c.useState();if(Ve(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?$t.createPortal(h.jsx(Ah,{scope:e.__scopeSelect,children:h.jsx(vs.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),s):null}return h.jsx(Th,{...e,ref:t})});Ch.displayName=xn;var yt=10,[Ah,tn]=Xn(xn),Ax="SelectContentImpl",Tx=qn("SelectContent.RemoveScroll"),Th=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:l,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:y,...b}=e,x=en(xn,n),[w,E]=c.useState(null),[T,O]=c.useState(null),C=le(t,$=>E($)),[S,N]=c.useState(null),[I,P]=c.useState(null),H=ys(n),[z,L]=c.useState(!1),k=c.useRef(!1);c.useEffect(()=>{if(w)return gi(w)},[w]),mi();const A=c.useCallback($=>{const[F,...ee]=H().map(te=>te.ref.current),[Z]=ee.slice(-1),X=document.activeElement;for(const te of $)if(te===X||(te?.scrollIntoView({block:"nearest"}),te===F&&T&&(T.scrollTop=0),te===Z&&T&&(T.scrollTop=T.scrollHeight),te?.focus(),document.activeElement!==X))return},[H,T]),D=c.useCallback(()=>A([S,w]),[A,S,w]);c.useEffect(()=>{z&&D()},[z,D]);const{onOpenChange:j,triggerPointerDownPosRef:_}=x;c.useEffect(()=>{if(w){let $={x:0,y:0};const F=Z=>{$={x:Math.abs(Math.round(Z.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(Z.pageY)-(_.current?.y??0))}},ee=Z=>{$.x<=10&&$.y<=10?Z.preventDefault():w.contains(Z.target)||j(!1),document.removeEventListener("pointermove",F),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",F),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",F),document.removeEventListener("pointerup",ee,{capture:!0})}}},[w,j,_]),c.useEffect(()=>{const $=()=>j(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[j]);const[V,K]=$h($=>{const F=H().filter(X=>!X.disabled),ee=F.find(X=>X.ref.current===document.activeElement),Z=Hh(F,$,ee);Z&&setTimeout(()=>Z.ref.current.focus())}),Y=c.useCallback(($,F,ee)=>{const Z=!k.current&&!ee;(x.value!==void 0&&x.value===F||Z)&&(N($),Z&&(k.current=!0))},[x.value]),B=c.useCallback(()=>w?.focus(),[w]),q=c.useCallback(($,F,ee)=>{const Z=!k.current&&!ee;(x.value!==void 0&&x.value===F||Z)&&P($)},[x.value]),U=r==="popper"?Da:Ph,J=U===Da?{side:i,sideOffset:l,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:m,sticky:v,hideWhenDetached:g,avoidCollisions:y}:{};return h.jsx(Ah,{scope:n,content:w,viewport:T,onViewportChange:O,itemRefCallback:Y,selectedItem:S,onItemLeave:B,itemTextRefCallback:q,focusSelectedItem:D,selectedItemText:I,position:r,isPositioned:z,searchRef:V,children:h.jsx(Ja,{as:Tx,allowPinchZoom:!0,children:h.jsx(os,{asChild:!0,trapped:x.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:W(o,$=>{x.trigger?.focus({preventScroll:!0}),$.preventDefault()}),children:h.jsx(Lr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:h.jsx(U,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:$=>$.preventDefault(),...b,...J,onPlaced:()=>L(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:W(b.onKeyDown,$=>{const F=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!F&&$.key.length===1&&K($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let Z=H().filter(X=>!X.disabled).map(X=>X.ref.current);if(["ArrowUp","End"].includes($.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const X=$.target,te=Z.indexOf(X);Z=Z.slice(te+1)}setTimeout(()=>A(Z)),$.preventDefault()}})})})})})})});Th.displayName=Ax;var Px="SelectItemAlignedPosition",Ph=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=en(xn,n),a=tn(xn,n),[i,l]=c.useState(null),[u,f]=c.useState(null),d=le(t,C=>f(C)),p=ys(n),m=c.useRef(!1),v=c.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=a,w=c.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&u&&g&&y&&b){const C=s.trigger.getBoundingClientRect(),S=u.getBoundingClientRect(),N=s.valueNode.getBoundingClientRect(),I=b.getBoundingClientRect();if(s.dir!=="rtl"){const X=I.left-S.left,te=N.left-X,ie=C.left-te,ue=C.width+ie,Qe=Math.max(ue,S.width),Fe=window.innerWidth-yt,qe=xl(te,[yt,Math.max(yt,Fe-Qe)]);i.style.minWidth=ue+"px",i.style.left=qe+"px"}else{const X=S.right-I.right,te=window.innerWidth-N.right-X,ie=window.innerWidth-C.right-te,ue=C.width+ie,Qe=Math.max(ue,S.width),Fe=window.innerWidth-yt,qe=xl(te,[yt,Math.max(yt,Fe-Qe)]);i.style.minWidth=ue+"px",i.style.right=qe+"px"}const P=p(),H=window.innerHeight-yt*2,z=g.scrollHeight,L=window.getComputedStyle(u),k=parseInt(L.borderTopWidth,10),A=parseInt(L.paddingTop,10),D=parseInt(L.borderBottomWidth,10),j=parseInt(L.paddingBottom,10),_=k+A+z+j+D,V=Math.min(y.offsetHeight*5,_),K=window.getComputedStyle(g),Y=parseInt(K.paddingTop,10),B=parseInt(K.paddingBottom,10),q=C.top+C.height/2-yt,U=H-q,J=y.offsetHeight/2,$=y.offsetTop+J,F=k+A+$,ee=_-F;if(F<=q){const X=P.length>0&&y===P[P.length-1].ref.current;i.style.bottom="0px";const te=u.clientHeight-g.offsetTop-g.offsetHeight,ie=Math.max(U,J+(X?B:0)+te+D),ue=F+ie;i.style.height=ue+"px"}else{const X=P.length>0&&y===P[0].ref.current;i.style.top="0px";const ie=Math.max(q,k+g.offsetTop+(X?Y:0)+J)+ee;i.style.height=ie+"px",g.scrollTop=F-q+g.offsetTop}i.style.margin=`${yt}px 0`,i.style.minHeight=V+"px",i.style.maxHeight=H+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[p,s.trigger,s.valueNode,i,u,g,y,b,s.dir,r]);Ve(()=>w(),[w]);const[E,T]=c.useState();Ve(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const O=c.useCallback(C=>{C&&v.current===!0&&(w(),x?.(),v.current=!1)},[w,x]);return h.jsx(_x,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:O,children:h.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:h.jsx(re.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Ph.displayName=Px;var Mx="SelectPopperPosition",Da=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=yt,...s}=e,a=bs(n);return h.jsx(Fi,{...a,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Da.displayName=Mx;var[_x,Ki]=Xn(xn,{}),La="SelectViewport",Mh=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=tn(La,n),a=Ki(La,n),i=le(t,s.onViewportChange),l=c.useRef(0);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsx(vs.Slot,{scope:n,children:h.jsx(re.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:W(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=a;if(p?.current&&d){const m=Math.abs(l.current-f.scrollTop);if(m>0){const v=window.innerHeight-yt*2,g=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),b=Math.max(g,y);if(b<v){const x=b+m,w=Math.min(v,x),E=x-w;d.style.height=w+"px",d.style.bottom==="0px"&&(f.scrollTop=E>0?E:0,d.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});Mh.displayName=La;var _h="SelectGroup",[Nx,Ox]=Xn(_h),Ix=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Tt();return h.jsx(Nx,{scope:n,id:o,children:h.jsx(re.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ix.displayName=_h;var Nh="SelectLabel",Dx=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ox(Nh,n);return h.jsx(re.div,{id:o.id,...r,ref:t})});Dx.displayName=Nh;var $o="SelectItem",[Lx,Oh]=Xn($o),Ih=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...a}=e,i=en($o,n),l=tn($o,n),u=i.value===r,[f,d]=c.useState(s??""),[p,m]=c.useState(!1),v=le(t,x=>l.itemRefCallback?.(x,r,o)),g=Tt(),y=c.useRef("touch"),b=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsx(Lx,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:c.useCallback(x=>{d(w=>w||(x?.textContent??"").trim())},[]),children:h.jsx(vs.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:h.jsx(re.div,{role:"option","aria-labelledby":g,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:v,onFocus:W(a.onFocus,()=>m(!0)),onBlur:W(a.onBlur,()=>m(!1)),onClick:W(a.onClick,()=>{y.current!=="mouse"&&b()}),onPointerUp:W(a.onPointerUp,()=>{y.current==="mouse"&&b()}),onPointerDown:W(a.onPointerDown,x=>{y.current=x.pointerType}),onPointerMove:W(a.onPointerMove,x=>{y.current=x.pointerType,o?l.onItemLeave?.():y.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:W(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:W(a.onKeyDown,x=>{l.searchRef?.current!==""&&x.key===" "||(bx.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});Ih.displayName=$o;var pr="SelectItemText",Dh=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,a=en(pr,n),i=tn(pr,n),l=Oh(pr,n),u=Sx(pr,n),[f,d]=c.useState(null),p=le(t,b=>d(b),l.onItemTextChange,b=>i.itemTextRefCallback?.(b,l.value,l.disabled)),m=f?.textContent,v=c.useMemo(()=>h.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=u;return Ve(()=>(g(v),()=>y(v)),[g,y,v]),h.jsxs(h.Fragment,{children:[h.jsx(re.span,{id:l.textId,...s,ref:p}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?$t.createPortal(s.children,a.valueNode):null]})});Dh.displayName=pr;var Lh="SelectItemIndicator",jx=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Oh(Lh,n).isSelected?h.jsx(re.span,{"aria-hidden":!0,...r,ref:t}):null});jx.displayName=Lh;var ja="SelectScrollUpButton",kx=c.forwardRef((e,t)=>{const n=tn(ja,e.__scopeSelect),r=Ki(ja,e.__scopeSelect),[o,s]=c.useState(!1),a=le(t,r.onScrollButtonChange);return Ve(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?h.jsx(jh,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});kx.displayName=ja;var ka="SelectScrollDownButton",Fx=c.forwardRef((e,t)=>{const n=tn(ka,e.__scopeSelect),r=Ki(ka,e.__scopeSelect),[o,s]=c.useState(!1),a=le(t,r.onScrollButtonChange);return Ve(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<u;s(f)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?h.jsx(jh,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Fx.displayName=ka;var jh=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=tn("SelectScrollButton",n),a=c.useRef(null),i=ys(n),l=c.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return c.useEffect(()=>()=>l(),[l]),Ve(()=>{i().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),h.jsx(re.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:W(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:W(o.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:W(o.onPointerLeave,()=>{l()})})}),$x="SelectSeparator",Hx=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsx(re.div,{"aria-hidden":!0,...r,ref:t})});Hx.displayName=$x;var Fa="SelectArrow",Bx=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=bs(n),s=en(Fa,n),a=tn(Fa,n);return s.open&&a.position==="popper"?h.jsx($i,{...o,...r,ref:t}):null});Bx.displayName=Fa;var Vx="SelectBubbleInput",kh=c.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=c.useRef(null),s=le(r,o),a=mx(t);return c.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&f){const d=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(d)}},[a,t]),h.jsx(re.select,{...n,style:{...gh,...n.style},ref:s,defaultValue:t})});kh.displayName=Vx;function Fh(e){return e===""||e===void 0}function $h(e){const t=Mt(e),n=c.useRef(""),r=c.useRef(0),o=c.useCallback(a=>{const i=n.current+a;t(i),(function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),s=c.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Hh(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Zx(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Zx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ux=yh,qx=xh,zx=Eh,Kx=Sh,Wx=Rh,Gx=Ch,Yx=Mh,Qx=Ih,Xx=Dh,Jx=Ux,ew=zx,tw=qx,nw=Kx,rw=Wx,ow=Gx,sw=Yx,aw=Qx,iw=Xx;const cw=je(["inline-flex","items-center","justify-between","gap-2","border","border-border-subtle","bg-elevated","text-fg-default","font-medium","transition-colors","outline-none","focus-ring-soft","disabled:cursor-not-allowed","disabled:opacity-50","cursor-pointer","whitespace-nowrap"],{variants:{variant:{default:["border-border-subtle"],ghost:["border-transparent","bg-subtle","hover:bg-hover-subtle"]},size:{sm:"h-8 px-3 text-sm rounded-[12px]",md:"h-9 px-3 text-sm rounded-[14px]",lg:"h-11 px-4 text-base rounded-[16px]"}},defaultVariants:{variant:"default",size:"md"}}),bo=({value:e,defaultValue:t,onValueChange:n,placeholder:r,ariaLabel:o,variant:s,size:a,className:i,children:l,disabled:u})=>h.jsxs(Jx,{value:e,defaultValue:t,onValueChange:n,disabled:u,children:[h.jsxs(tw,{"aria-label":o,className:cw({variant:s,size:a,className:i}),children:[h.jsx(ew,{className:"min-w-0 truncate",placeholder:r}),h.jsx(nw,{children:h.jsx(Kv,{className:"w-3.5 h-3.5 opacity-60"})})]}),h.jsx(rw,{children:h.jsx(Bh,{children:h.jsx(sw,{className:"p-1",children:l})})})]}),Bh=c.forwardRef(({className:e,children:t,...n},r)=>h.jsx(ow,{ref:r,position:"popper",sideOffset:4,className:ae("z-[1100]","min-w-[var(--radix-select-trigger-width)]","overflow-hidden","surface-floating","data-[state=open]:animate-fade-in","data-[state=open]:animate-zoom-in",e),...n,children:t}));Bh.displayName="SelectContent";const Fn=c.forwardRef(({className:e,children:t,...n},r)=>h.jsx(aw,{ref:r,className:ae("relative","flex","items-center","cursor-pointer","select-none","px-3","py-2","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","transition-colors","rounded-[10px]","data-[highlighted]:bg-hover-subtle","data-[highlighted]:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e),...n,children:h.jsx(iw,{children:t})}));Fn.displayName="SelectItem";bo.displayName="Select";const wl=e=>typeof e=="number"?`${e}px`:e,Ht=c.forwardRef(({width:e,height:t=30,opacity:n,className:r="",style:o,...s},a)=>h.jsx("div",{ref:a,className:ae("rounded-[14px]","skeleton-sized","bg-[length:200%_100%]","bg-gradient-to-r","from-pastel-lavender-200/30","via-pastel-yellow-200/20","to-pastel-lavender-200/30","animate-shimmer","animate-fade-in",r),style:{"--skeleton-width":wl(e),"--skeleton-height":wl(t),"--skeleton-opacity":n,...o},...s}));Ht.displayName="Skeleton";const lw=c.forwardRef(({checked:e,onCheckedChange:t,onClick:n,className:r,disabled:o,...s},a)=>h.jsx("button",{ref:a,type:"button",role:"switch","aria-checked":e,disabled:o,className:ae("focus-ring-soft relative inline-flex h-7 w-12 items-center rounded-full border p-1 transition-colors duration-200 outline-none",e?"border-transparent bg-cta hover:bg-cta-hover active:bg-cta-hover":"border-border bg-subtle hover:bg-hover active:bg-active",o&&"cursor-not-allowed opacity-80",r),onClick:i=>{n?.(i),!(i.defaultPrevented||o)&&t?.(!e)},...s,children:h.jsx("span",{"aria-hidden":"true",className:ae("pointer-events-none inline-block h-5 w-5 rounded-full shadow-sm transition-transform duration-200",e?"translate-x-5 bg-white":"translate-x-0 bg-fg-secondary")})}));lw.displayName="Switch";const uw=je(["w-full","border","border-border-subtle","bg-elevated","text-fg-default","placeholder:text-fg-placeholder","transition-colors","outline-none","focus-ring-soft","disabled:cursor-not-allowed","disabled:opacity-50","resize-none"],{variants:{variant:{default:[],ghost:["border-transparent","bg-subtle","hover:bg-hover-subtle"],error:["border-border-error","bg-accent-soft-danger/40","text-fg-default"]},size:{sm:"min-h-[60px] p-3 text-sm rounded-[12px]",md:"min-h-[80px] p-3 text-sm rounded-[14px]",lg:"min-h-[100px] p-4 text-base rounded-[16px]"}},defaultVariants:{variant:"default",size:"md"}}),dw=c.forwardRef(({className:e,variant:t,size:n,...r},o)=>h.jsx("textarea",{ref:o,className:uw({variant:t,size:n,className:e}),...r}));dw.displayName="Textarea";var Vh="Toggle",Zh=c.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...s}=e,[a,i]=Bt({prop:n,onChange:o,defaultProp:r??!1,caller:Vh});return h.jsx(re.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:W(e.onClick,()=>{e.disabled||i(!a)})})});Zh.displayName=Vh;var nn="ToggleGroup",[Uh]=Nt(nn,[hs]),qh=hs(),Wi=M.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return h.jsx(fw,{...o,ref:t})}if(n==="multiple"){const o=r;return h.jsx(hw,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${nn}\``)});Wi.displayName=nn;var[zh,Kh]=Uh(nn),fw=M.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,i]=Bt({prop:n,defaultProp:r??"",onChange:o,caller:nn});return h.jsx(zh,{scope:e.__scopeToggleGroup,type:"single",value:M.useMemo(()=>a?[a]:[],[a]),onItemActivate:i,onItemDeactivate:M.useCallback(()=>i(""),[i]),children:h.jsx(Wh,{...s,ref:t})})}),hw=M.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,i]=Bt({prop:n,defaultProp:r??[],onChange:o,caller:nn}),l=M.useCallback(f=>i((d=[])=>[...d,f]),[i]),u=M.useCallback(f=>i((d=[])=>d.filter(p=>p!==f)),[i]);return h.jsx(zh,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:u,children:h.jsx(Wh,{...s,ref:t})})});Wi.displayName=nn;var[pw,mw]=Uh(nn),Wh=M.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:s,dir:a,loop:i=!0,...l}=e,u=qh(n),f=fs(a),d={role:"group",dir:f,...l};return h.jsx(pw,{scope:n,rovingFocus:o,disabled:r,children:o?h.jsx(m0,{asChild:!0,...u,orientation:s,dir:f,loop:i,children:h.jsx(re.div,{...d,ref:t})}):h.jsx(re.div,{...d,ref:t})})}),Ho="ToggleGroupItem",Gh=M.forwardRef((e,t)=>{const n=Kh(Ho,e.__scopeToggleGroup),r=mw(Ho,e.__scopeToggleGroup),o=qh(e.__scopeToggleGroup),s=n.value.includes(e.value),a=r.disabled||e.disabled,i={...e,pressed:s,disabled:a},l=M.useRef(null);return r.rovingFocus?h.jsx(g0,{asChild:!0,...o,focusable:!a,active:s,ref:l,children:h.jsx(El,{...i,ref:t})}):h.jsx(El,{...i,ref:t})});Gh.displayName=Ho;var El=M.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,s=Kh(Ho,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=s.type==="single"?a:void 0;return h.jsx(Zh,{...i,...o,ref:t,onPressedChange:l=>{l?s.onItemActivate(r):s.onItemDeactivate(r)}})}),gw=Wi,vw=Gh,yw=gw,bw=vw;const xw=je(["inline-flex","gap-0.5","overflow-hidden"],{variants:{variant:{default:["border-2","border-border","rounded-[10px]","bg-surface"],outline:["border-2","border-border","rounded-[10px]","bg-transparent"],pills:["surface-base","p-1"],quiet:["rounded-[12px]","border","border-border-subtle/80","bg-hover-subtle/55","p-0.5"]}},defaultVariants:{variant:"default"}}),ww=je(["flex","items-center","justify-center","font-bold","border","border-transparent","transition-colors","duration-200","disabled:pointer-events-none","disabled:opacity-50"],{variants:{variant:{default:["text-fg-muted","hover:bg-hover","data-[state=on]:bg-cta","data-[state=on]:text-fg-on-filled"],outline:["text-fg-muted","hover:bg-hover-subtle","data-[state=on]:bg-cta","data-[state=on]:text-fg-on-filled"],pills:["text-fg-secondary","rounded-[10px]","hover:bg-hover-subtle","data-[state=on]:bg-cta","data-[state=on]:text-fg-on-filled","data-[state=on]:border-border-secondary"],quiet:["rounded-[10px]","font-medium","text-fg-secondary","hover:bg-hover-subtle/80","data-[state=on]:border-border-secondary/70","data-[state=on]:bg-elevated","data-[state=on]:text-fg-default","data-[state=on]:shadow-[0_8px_18px_-16px_rgba(15,18,24,0.28)]"]},size:{sm:"px-2 py-1.5 text-xs",md:"px-3 py-2 text-sm",lg:"px-4 py-2.5 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),Yh=c.createContext({}),Ew=c.forwardRef(({className:e,variant:t,size:n,children:r,...o},s)=>h.jsx(Yh.Provider,{value:{variant:t??"default",size:n??"md"},children:h.jsx(yw,{ref:s,className:xw({variant:t,className:e}),...o,children:r})}));Ew.displayName="ToggleGroup";const Sw=c.forwardRef(({className:e,activeClassName:t,children:n,...r},o)=>{const s=c.useContext(Yh);return h.jsx(bw,{ref:o,className:ww({variant:s.variant,size:s.size,className:ae(e,t)}),...r,children:n})});Sw.displayName="ToggleGroupItem";var[xs]=Nt("Tooltip",[Qn]),ws=Qn(),Qh="TooltipProvider",Rw=700,$a="tooltip.open",[Cw,Gi]=xs(Qh),Xh=e=>{const{__scopeTooltip:t,delayDuration:n=Rw,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=c.useRef(!0),i=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),h.jsx(Cw,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:c.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:s})};Xh.displayName=Qh;var Tr="Tooltip",[Aw,zr]=xs(Tr),Jh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,l=Gi(Tr,e.__scopeTooltip),u=ws(t),[f,d]=c.useState(null),p=Tt(),m=c.useRef(0),v=a??l.disableHoverableContent,g=i??l.delayDuration,y=c.useRef(!1),[b,x]=Bt({prop:r,defaultProp:o??!1,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent($a))):l.onClose(),s?.(C)},caller:Tr}),w=c.useMemo(()=>b?y.current?"delayed-open":"instant-open":"closed",[b]),E=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,x(!0)},[x]),T=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),O=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,x(!0),m.current=0},g)},[g,x]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),h.jsx(ji,{...u,children:h.jsx(Aw,{scope:t,contentId:p,open:b,stateAttribute:w,trigger:f,onTriggerChange:d,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?O():E()},[l.isOpenDelayedRef,O,E]),onTriggerLeave:c.useCallback(()=>{v?T():(window.clearTimeout(m.current),m.current=0)},[T,v]),onOpen:E,onClose:T,disableHoverableContent:v,children:n})})};Jh.displayName=Tr;var Ha="TooltipTrigger",ep=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=zr(Ha,n),s=Gi(Ha,n),a=ws(n),i=c.useRef(null),l=le(t,i,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),d=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),h.jsx(ki,{asChild:!0,...a,children:h.jsx(re.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:W(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:W(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:W(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:W(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:W(e.onBlur,o.onClose),onClick:W(e.onClick,o.onClose)})})});ep.displayName=Ha;var Yi="TooltipPortal",[Tw,Pw]=xs(Yi,{forceMount:void 0}),tp=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=zr(Yi,t);return h.jsx(Tw,{scope:t,forceMount:n,children:h.jsx(Ot,{present:n||s.open,children:h.jsx(jr,{asChild:!0,container:o,children:r})})})};tp.displayName=Yi;var Kn="TooltipContent",np=c.forwardRef((e,t)=>{const n=Pw(Kn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=zr(Kn,e.__scopeTooltip);return h.jsx(Ot,{present:r||a.open,children:a.disableHoverableContent?h.jsx(rp,{side:o,...s,ref:t}):h.jsx(Mw,{side:o,...s,ref:t})})}),Mw=c.forwardRef((e,t)=>{const n=zr(Kn,e.__scopeTooltip),r=Gi(Kn,e.__scopeTooltip),o=c.useRef(null),s=le(t,o),[a,i]=c.useState(null),{trigger:l,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,p=c.useCallback(()=>{i(null),d(!1)},[d]),m=c.useCallback((v,g)=>{const y=v.currentTarget,b={x:v.clientX,y:v.clientY},x=Dw(b,y.getBoundingClientRect()),w=Lw(b,x),E=jw(g.getBoundingClientRect()),T=Fw([...w,...E]);i(T),d(!0)},[d]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&f){const v=y=>m(y,f),g=y=>m(y,l);return l.addEventListener("pointerleave",v),f.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",g)}}},[l,f,m,p]),c.useEffect(()=>{if(a){const v=g=>{const y=g.target,b={x:g.clientX,y:g.clientY},x=l?.contains(y)||f?.contains(y),w=!kw(b,a);x?p():w&&(p(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,f,a,u,p]),h.jsx(rp,{...e,ref:s})}),[_w,Nw]=xs(Tr,{isInside:!1}),Ow=Uu("TooltipContent"),rp=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,l=zr(Kn,n),u=ws(n),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener($a,f),()=>document.removeEventListener($a,f)),[f]),c.useEffect(()=>{if(l.trigger){const d=p=>{p.target?.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),h.jsx(Lr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:h.jsxs(Fi,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsx(Ow,{children:r}),h.jsx(_w,{scope:n,isInside:!0,children:h.jsx(vx,{id:l.contentId,role:"tooltip",children:o||r})})]})})});np.displayName=Kn;var op="TooltipArrow",Iw=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ws(n);return Nw(op,n).isInside?null:h.jsx($i,{...o,...r,ref:t})});Iw.displayName=op;function Dw(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Lw(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function jw(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function kw(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],l=t[a],u=i.x,f=i.y,d=l.x,p=l.y;f>r!=p>r&&n<(d-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function Fw(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),$w(t)}function $w(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Hw=Xh,Bw=Jh,Vw=ep,Zw=tp,Uw=np,qw=Hw,zw=Bw,Kw=Vw,Ww=Zw,sp=Uw;const Gw=qw,Yw=zw,Qw=Kw,ap=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(sp,{ref:r,sideOffset:t,className:ae("z-50","overflow-hidden","px-3","py-1.5","text-xs","font-bold","bg-elevated","text-fg-secondary","border","border-border-subtle","shadow-sm","rounded-[8px]","animate-in","fade-in-0","zoom-in-95","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2",e),...n}));ap.displayName=sp.displayName;const A5=({content:e,children:t,side:n="top",delayDuration:r=200})=>h.jsx(Gw,{children:h.jsxs(Yw,{delayDuration:r,children:[h.jsx(Qw,{asChild:!0,children:t}),h.jsx(Ww,{children:h.jsx(ap,{side:n,children:e})})]})}),Sl=({children:e,fallback:t})=>e||t;function Xw({children:e}){return h.jsx("div",{className:"flex w-full flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:e})}const Es=28,Qi=[Es,50,100];function Jw(e){return Qi.includes(e)}function eE({itemsPerPage:e,onItemsPerPageChange:t,sortBy:n,onSortByChange:r,sortOrder:o,onSortOrderChange:s,pinnedFirst:a,onPinnedFirstChange:i}){return h.jsx("div",{className:"flex justify-end",children:h.jsxs("div",{className:"surface-base inline-flex flex-wrap items-center gap-3 rounded-[16px] px-3.5 py-2.5",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Qd,{className:"h-4 w-4 shrink-0 text-fg-tertiary"}),h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"tertiary",children:"Items"}),h.jsx(bo,{value:String(e),onValueChange:l=>{const u=Number(l);Jw(u)&&t(u)},variant:"ghost",size:"sm",children:Qi.map(l=>h.jsx(Fn,{value:String(l),children:l===Es?`Default (${l})`:l},l))})]}),h.jsx("div",{className:"h-5 w-px bg-divider"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(ry,{className:"h-4 w-4 shrink-0 text-fg-tertiary"}),h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"tertiary",children:"Sort"}),h.jsxs(bo,{value:n,onValueChange:l=>r(l),variant:"ghost",size:"sm",children:[h.jsx(Fn,{value:"updatedAt",children:"Updated"}),h.jsx(Fn,{value:"createdAt",children:"Created"})]}),h.jsxs(bo,{value:o,onValueChange:l=>s(l),variant:"ghost",size:"sm",children:[h.jsx(Fn,{value:"desc",children:"Newest"}),h.jsx(Fn,{value:"asc",children:"Oldest"})]})]}),h.jsx("div",{className:"h-5 w-px bg-divider"}),h.jsxs(ph,{htmlFor:"pinnedFirst",size:"sm",className:"flex cursor-pointer items-center gap-1.5",children:[h.jsx(Bf,{id:"pinnedFirst",size:"sm",checked:a,onChange:l=>i(l.target.checked)}),h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:"Pinned First"})]})]})})}var ta,Rl;function tE(){if(Rl)return ta;Rl=1;function e(i){return i&&typeof i=="object"&&"default"in i?i.default:i}var t=h1(),n=e(t);function r(i,l,u){return l in i?Object.defineProperty(i,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[l]=u,i}function o(i,l){i.prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l}var s=!!(typeof window<"u"&&window.document&&window.document.createElement);function a(i,l,u){if(typeof i!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof l!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof u<"u"&&typeof u!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function f(d){return d.displayName||d.name||"Component"}return function(p){if(typeof p!="function")throw new Error("Expected WrappedComponent to be a React component.");var m=[],v;function g(){v=i(m.map(function(b){return b.props})),y.canUseDOM?l(v):u&&(v=u(v))}var y=(function(b){o(x,b);function x(){return b.apply(this,arguments)||this}x.peek=function(){return v},x.rewind=function(){if(x.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var T=v;return v=void 0,m=[],T};var w=x.prototype;return w.UNSAFE_componentWillMount=function(){m.push(this),g()},w.componentDidUpdate=function(){g()},w.componentWillUnmount=function(){var T=m.indexOf(this);m.splice(T,1),g()},w.render=function(){return n.createElement(p,this.props)},x})(t.PureComponent);return r(y,"displayName","SideEffect("+f(p)+")"),r(y,"canUseDOM",s),y}}return ta=a,ta}var nE=tE();const rE=Ir(nE);var na,Cl;function oE(){if(Cl)return na;Cl=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(s,a){if(s===a)return!0;if(s&&a&&typeof s=="object"&&typeof a=="object"){if(s.constructor!==a.constructor)return!1;var i,l,u;if(Array.isArray(s)){if(i=s.length,i!=a.length)return!1;for(l=i;l--!==0;)if(!o(s[l],a[l]))return!1;return!0}var f;if(t&&s instanceof Map&&a instanceof Map){if(s.size!==a.size)return!1;for(f=s.entries();!(l=f.next()).done;)if(!a.has(l.value[0]))return!1;for(f=s.entries();!(l=f.next()).done;)if(!o(l.value[1],a.get(l.value[0])))return!1;return!0}if(n&&s instanceof Set&&a instanceof Set){if(s.size!==a.size)return!1;for(f=s.entries();!(l=f.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(s)&&ArrayBuffer.isView(a)){if(i=s.length,i!=a.length)return!1;for(l=i;l--!==0;)if(s[l]!==a[l])return!1;return!0}if(s.constructor===RegExp)return s.source===a.source&&s.flags===a.flags;if(s.valueOf!==Object.prototype.valueOf&&typeof s.valueOf=="function"&&typeof a.valueOf=="function")return s.valueOf()===a.valueOf();if(s.toString!==Object.prototype.toString&&typeof s.toString=="function"&&typeof a.toString=="function")return s.toString()===a.toString();if(u=Object.keys(s),i=u.length,i!==Object.keys(a).length)return!1;for(l=i;l--!==0;)if(!Object.prototype.hasOwnProperty.call(a,u[l]))return!1;if(e&&s instanceof Element)return!1;for(l=i;l--!==0;)if(!((u[l]==="_owner"||u[l]==="__v"||u[l]==="__o")&&s.$$typeof)&&!o(s[u[l]],a[u[l]]))return!1;return!0}return s!==s&&a!==a}return na=function(a,i){try{return o(a,i)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},na}var sE=oE();const aE=Ir(sE);var ra,Al;function iE(){if(Al)return ra;Al=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},i=0;i<10;i++)a["_"+String.fromCharCode(i)]=i;var l=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ra=o()?Object.assign:function(s,a){for(var i,l=r(s),u,f=1;f<arguments.length;f++){i=Object(arguments[f]);for(var d in i)t.call(i,d)&&(l[d]=i[d]);if(e){u=e(i);for(var p=0;p<u.length;p++)n.call(i,u[p])&&(l[u[p]]=i[u[p]])}}return l},ra}var cE=iE();const lE=Ir(cE);var fn={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},ne={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(ne).map(function(e){return ne[e]});var we={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},Bo={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Pr={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},uE=Object.keys(Bo).reduce(function(e,t){return e[Bo[t]]=t,e},{}),dE=[ne.NOSCRIPT,ne.SCRIPT,ne.STYLE],xt="data-react-helmet",fE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hE=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},pE=(function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}})(),Xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mE=function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},Tl=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},gE=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e},Ba=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n===!1?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},vE=function(t){var n=Bn(t,ne.TITLE),r=Bn(t,Pr.TITLE_TEMPLATE);if(r&&n)return r.replace(/%s/g,function(){return Array.isArray(n)?n.join(""):n});var o=Bn(t,Pr.DEFAULT_TITLE);return n||o||void 0},yE=function(t){return Bn(t,Pr.ON_CHANGE_CLIENT_STATE)||function(){}},oa=function(t,n){return n.filter(function(r){return typeof r[t]<"u"}).map(function(r){return r[t]}).reduce(function(r,o){return Xe({},r,o)},{})},bE=function(t,n){return n.filter(function(r){return typeof r[ne.BASE]<"u"}).map(function(r){return r[ne.BASE]}).reverse().reduce(function(r,o){if(!r.length)for(var s=Object.keys(o),a=0;a<s.length;a++){var i=s[a],l=i.toLowerCase();if(t.indexOf(l)!==-1&&o[l])return r.concat(o)}return r},[])},dr=function(t,n,r){var o={};return r.filter(function(s){return Array.isArray(s[t])?!0:(typeof s[t]<"u"&&SE("Helmet: "+t+' should be of type "Array". Instead found type "'+fE(s[t])+'"'),!1)}).map(function(s){return s[t]}).reverse().reduce(function(s,a){var i={};a.filter(function(p){for(var m=void 0,v=Object.keys(p),g=0;g<v.length;g++){var y=v[g],b=y.toLowerCase();n.indexOf(b)!==-1&&!(m===we.REL&&p[m].toLowerCase()==="canonical")&&!(b===we.REL&&p[b].toLowerCase()==="stylesheet")&&(m=b),n.indexOf(y)!==-1&&(y===we.INNER_HTML||y===we.CSS_TEXT||y===we.ITEM_PROP)&&(m=y)}if(!m||!p[m])return!1;var x=p[m].toLowerCase();return o[m]||(o[m]={}),i[m]||(i[m]={}),o[m][x]?!1:(i[m][x]=!0,!0)}).reverse().forEach(function(p){return s.push(p)});for(var l=Object.keys(i),u=0;u<l.length;u++){var f=l[u],d=lE({},o[f],i[f]);o[f]=d}return s},[]).reverse()},Bn=function(t,n){for(var r=t.length-1;r>=0;r--){var o=t[r];if(o.hasOwnProperty(n))return o[n]}return null},xE=function(t){return{baseTag:bE([we.HREF,we.TARGET],t),bodyAttributes:oa(fn.BODY,t),defer:Bn(t,Pr.DEFER),encode:Bn(t,Pr.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:oa(fn.HTML,t),linkTags:dr(ne.LINK,[we.REL,we.HREF],t),metaTags:dr(ne.META,[we.NAME,we.CHARSET,we.HTTPEQUIV,we.PROPERTY,we.ITEM_PROP],t),noscriptTags:dr(ne.NOSCRIPT,[we.INNER_HTML],t),onChangeClientState:yE(t),scriptTags:dr(ne.SCRIPT,[we.SRC,we.INNER_HTML],t),styleTags:dr(ne.STYLE,[we.CSS_TEXT],t),title:vE(t),titleAttributes:oa(fn.TITLE,t)}},Va=(function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout(function(){Va(t)},0)}})(),Pl=function(t){return clearTimeout(t)},wE=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Va:global.requestAnimationFrame||Va,EE=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||Pl:global.cancelAnimationFrame||Pl,SE=function(t){return console&&typeof console.warn=="function"&&console.warn(t)},fr=null,RE=function(t){fr&&EE(fr),t.defer?fr=wE(function(){Ml(t,function(){fr=null})}):(Ml(t),fr=null)},Ml=function(t,n){var r=t.baseTag,o=t.bodyAttributes,s=t.htmlAttributes,a=t.linkTags,i=t.metaTags,l=t.noscriptTags,u=t.onChangeClientState,f=t.scriptTags,d=t.styleTags,p=t.title,m=t.titleAttributes;Za(ne.BODY,o),Za(ne.HTML,s),CE(p,m);var v={baseTag:Dn(ne.BASE,r),linkTags:Dn(ne.LINK,a),metaTags:Dn(ne.META,i),noscriptTags:Dn(ne.NOSCRIPT,l),scriptTags:Dn(ne.SCRIPT,f),styleTags:Dn(ne.STYLE,d)},g={},y={};Object.keys(v).forEach(function(b){var x=v[b],w=x.newTags,E=x.oldTags;w.length&&(g[b]=w),E.length&&(y[b]=v[b].oldTags)}),n&&n(),u(t,g,y)},ip=function(t){return Array.isArray(t)?t.join(""):t},CE=function(t,n){typeof t<"u"&&document.title!==t&&(document.title=ip(t)),Za(ne.TITLE,n)},Za=function(t,n){var r=document.getElementsByTagName(t)[0];if(r){for(var o=r.getAttribute(xt),s=o?o.split(","):[],a=[].concat(s),i=Object.keys(n),l=0;l<i.length;l++){var u=i[l],f=n[u]||"";r.getAttribute(u)!==f&&r.setAttribute(u,f),s.indexOf(u)===-1&&s.push(u);var d=a.indexOf(u);d!==-1&&a.splice(d,1)}for(var p=a.length-1;p>=0;p--)r.removeAttribute(a[p]);s.length===a.length?r.removeAttribute(xt):r.getAttribute(xt)!==i.join(",")&&r.setAttribute(xt,i.join(","))}},Dn=function(t,n){var r=document.head||document.querySelector(ne.HEAD),o=r.querySelectorAll(t+"["+xt+"]"),s=Array.prototype.slice.call(o),a=[],i=void 0;return n&&n.length&&n.forEach(function(l){var u=document.createElement(t);for(var f in l)if(l.hasOwnProperty(f))if(f===we.INNER_HTML)u.innerHTML=l.innerHTML;else if(f===we.CSS_TEXT)u.styleSheet?u.styleSheet.cssText=l.cssText:u.appendChild(document.createTextNode(l.cssText));else{var d=typeof l[f]>"u"?"":l[f];u.setAttribute(f,d)}u.setAttribute(xt,"true"),s.some(function(p,m){return i=m,u.isEqualNode(p)})?s.splice(i,1):a.push(u)}),s.forEach(function(l){return l.parentNode.removeChild(l)}),a.forEach(function(l){return r.appendChild(l)}),{oldTags:s,newTags:a}},cp=function(t){return Object.keys(t).reduce(function(n,r){var o=typeof t[r]<"u"?r+'="'+t[r]+'"':""+r;return n?n+" "+o:o},"")},AE=function(t,n,r,o){var s=cp(r),a=ip(n);return s?"<"+t+" "+xt+'="true" '+s+">"+Ba(a,o)+"</"+t+">":"<"+t+" "+xt+'="true">'+Ba(a,o)+"</"+t+">"},TE=function(t,n,r){return n.reduce(function(o,s){var a=Object.keys(s).filter(function(u){return!(u===we.INNER_HTML||u===we.CSS_TEXT)}).reduce(function(u,f){var d=typeof s[f]>"u"?f:f+'="'+Ba(s[f],r)+'"';return u?u+" "+d:d},""),i=s.innerHTML||s.cssText||"",l=dE.indexOf(t)===-1;return o+"<"+t+" "+xt+'="true" '+a+(l?"/>":">"+i+"</"+t+">")},"")},lp=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[Bo[o]||o]=t[o],r},n)},PE=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[uE[o]||o]=t[o],r},n)},ME=function(t,n,r){var o,s=(o={key:n},o[xt]=!0,o),a=lp(r,s);return[M.createElement(ne.TITLE,a,n)]},_E=function(t,n){return n.map(function(r,o){var s,a=(s={key:o},s[xt]=!0,s);return Object.keys(r).forEach(function(i){var l=Bo[i]||i;if(l===we.INNER_HTML||l===we.CSS_TEXT){var u=r.innerHTML||r.cssText;a.dangerouslySetInnerHTML={__html:u}}else a[l]=r[i]}),M.createElement(t,a)})},jt=function(t,n,r){switch(t){case ne.TITLE:return{toComponent:function(){return ME(t,n.title,n.titleAttributes)},toString:function(){return AE(t,n.title,n.titleAttributes,r)}};case fn.BODY:case fn.HTML:return{toComponent:function(){return lp(n)},toString:function(){return cp(n)}};default:return{toComponent:function(){return _E(t,n)},toString:function(){return TE(t,n,r)}}}},up=function(t){var n=t.baseTag,r=t.bodyAttributes,o=t.encode,s=t.htmlAttributes,a=t.linkTags,i=t.metaTags,l=t.noscriptTags,u=t.scriptTags,f=t.styleTags,d=t.title,p=d===void 0?"":d,m=t.titleAttributes;return{base:jt(ne.BASE,n,o),bodyAttributes:jt(fn.BODY,r,o),htmlAttributes:jt(fn.HTML,s,o),link:jt(ne.LINK,a,o),meta:jt(ne.META,i,o),noscript:jt(ne.NOSCRIPT,l,o),script:jt(ne.SCRIPT,u,o),style:jt(ne.STYLE,f,o),title:jt(ne.TITLE,{title:p,titleAttributes:m},o)}},NE=function(t){var n,r;return r=n=(function(o){mE(s,o);function s(){return hE(this,s),gE(this,o.apply(this,arguments))}return s.prototype.shouldComponentUpdate=function(i){return!aE(this.props,i)},s.prototype.mapNestedChildrenToProps=function(i,l){if(!l)return null;switch(i.type){case ne.SCRIPT:case ne.NOSCRIPT:return{innerHTML:l};case ne.STYLE:return{cssText:l}}throw new Error("<"+i.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},s.prototype.flattenArrayTypeChildren=function(i){var l,u=i.child,f=i.arrayTypeChildren,d=i.newChildProps,p=i.nestedChildren;return Xe({},f,(l={},l[u.type]=[].concat(f[u.type]||[],[Xe({},d,this.mapNestedChildrenToProps(u,p))]),l))},s.prototype.mapObjectTypeChildren=function(i){var l,u,f=i.child,d=i.newProps,p=i.newChildProps,m=i.nestedChildren;switch(f.type){case ne.TITLE:return Xe({},d,(l={},l[f.type]=m,l.titleAttributes=Xe({},p),l));case ne.BODY:return Xe({},d,{bodyAttributes:Xe({},p)});case ne.HTML:return Xe({},d,{htmlAttributes:Xe({},p)})}return Xe({},d,(u={},u[f.type]=Xe({},p),u))},s.prototype.mapArrayTypeChildrenToProps=function(i,l){var u=Xe({},l);return Object.keys(i).forEach(function(f){var d;u=Xe({},u,(d={},d[f]=i[f],d))}),u},s.prototype.warnOnInvalidChildren=function(i,l){return!0},s.prototype.mapChildrenToProps=function(i,l){var u=this,f={};return M.Children.forEach(i,function(d){if(!(!d||!d.props)){var p=d.props,m=p.children,v=Tl(p,["children"]),g=PE(v);switch(u.warnOnInvalidChildren(d,m),d.type){case ne.LINK:case ne.META:case ne.NOSCRIPT:case ne.SCRIPT:case ne.STYLE:f=u.flattenArrayTypeChildren({child:d,arrayTypeChildren:f,newChildProps:g,nestedChildren:m});break;default:l=u.mapObjectTypeChildren({child:d,newProps:l,newChildProps:g,nestedChildren:m});break}}}),l=this.mapArrayTypeChildrenToProps(f,l),l},s.prototype.render=function(){var i=this.props,l=i.children,u=Tl(i,["children"]),f=Xe({},u);return l&&(f=this.mapChildrenToProps(l,f)),M.createElement(t,f)},pE(s,null,[{key:"canUseDOM",set:function(i){t.canUseDOM=i}}]),s})(M.Component),n.propTypes={base:xe.object,bodyAttributes:xe.object,children:xe.oneOfType([xe.arrayOf(xe.node),xe.node]),defaultTitle:xe.string,defer:xe.bool,encodeSpecialCharacters:xe.bool,htmlAttributes:xe.object,link:xe.arrayOf(xe.object),meta:xe.arrayOf(xe.object),noscript:xe.arrayOf(xe.object),onChangeClientState:xe.func,script:xe.arrayOf(xe.object),style:xe.arrayOf(xe.object),title:xe.string,titleAttributes:xe.object,titleTemplate:xe.string},n.defaultProps={defer:!0,encodeSpecialCharacters:!0},n.peek=t.peek,n.rewind=function(){var o=t.rewind();return o||(o=up({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),o},r},OE=function(){return null},IE=rE(xE,RE,up)(OE),Ua=NE(IE);Ua.renderStatic=Ua.rewind;function _l(e,t){return t==null?h.jsx(se,{as:"h1",variant:"heading",weight:"bold",tracking:"tighter",children:e}):typeof t=="string"||typeof t=="number"?h.jsx(se,{as:"h1",variant:"heading",weight:"bold",tracking:"tighter",children:t}):h.jsx("div",{role:"heading","aria-level":1,children:t})}function Nl(e){return e==null?null:typeof e=="string"||typeof e=="number"?h.jsx(se,{as:"p",variant:"meta",weight:"medium",tone:"tertiary",className:"mt-1",children:e}):h.jsx("div",{className:"mt-1",children:e})}function Ss({title:e,heading:t,variant:n="default",description:r,headerRight:o,children:s}){return h.jsxs(h.Fragment,{children:[h.jsx(Ua,{children:h.jsx("title",{children:e?`${e} | Ocean Brain`:"Ocean Brain"})}),n==="default"&&h.jsx("div",{className:"mb-5 border-b border-border-subtle/80 pb-4",children:h.jsxs("div",{className:o?"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between":void 0,children:[h.jsxs("div",{children:[_l(e,t),Nl(r)]}),o]})}),n==="subtle"&&h.jsx("div",{className:"mb-6",children:h.jsxs("div",{className:o?"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between":void 0,children:[h.jsxs("div",{children:[_l(e,t),Nl(r)]}),o]})}),s]})}const DE=e=>{let t=!1;return()=>{t||(window.requestAnimationFrame(()=>{e(),t=!1}),t=!0)}},sa=new Map;function LE(){const e=rs({select:n=>n.pathname}),t=c.useRef(null);return c.useEffect(()=>{if(t.current?.parentElement){const{parentElement:n}=t.current,r=a=>{if(a!==0){sa.set(e,a);return}sa.delete(e)},o=DE(()=>{if(t.current){const{scrollTop:a}=n;r(a)}}),s=sa.get(e);return s&&(n.scrollTop=s),n.addEventListener("scroll",o),()=>{n.removeEventListener("scroll",o)}}},[e]),h.jsx("div",{ref:t,className:"hidden"})}const Kr="/",dp="/views",jE="/views/notes",fp="/calendar",hp="/reminders",pp="/graph",mp="/search",gp="/tag",Jn="/$id",Xi="/tag/$id",vp="/setting",kE="/setting/mcp",FE="/setting/trash",$E="/setting/manage-image",HE="/setting/manage-image/$id",BE="/setting/placeholder",VE="/setting/properties",qa="An unexpected routing error occurred.",yp=e=>typeof e=="object"&&e!==null&&"errors"in e&&Array.isArray(e.errors),ZE=e=>e instanceof Error?e.message:yp(e)?e.errors?.[0]?.message??qa:qa,UE=e=>{if(yp(e))return e.errors?.[0]?.code};function Ji({title:e,error:t,description:n,onRetry:r,showBackAction:o=!0,showHomeAction:s=!0}){const a=En(),i=Ge(),[l,u]=c.useState("idle"),f=ZE(t),d=UE(t),p=async()=>{try{const m=[d,f].filter(Boolean).join(" :: ");await navigator.clipboard.writeText(m||qa),u("copied")}catch{u("failed")}};return h.jsxs("div",{className:"rounded-[18px] border-2 border-border bg-surface p-6",children:[h.jsx(se,{as:"p",variant:"heading",weight:"bold",tracking:"tighter",children:e}),n&&h.jsx(se,{as:"p",variant:"meta",tone:"tertiary",className:"mt-2",children:n}),h.jsxs(se,{as:"div",variant:"body",tone:"secondary",className:"mt-4 rounded-[14px] border border-border-subtle bg-subtle px-3 py-2",children:[f,d&&h.jsxs(se,{as:"span",variant:"body",weight:"bold",tone:"tertiary",className:"ml-2",children:["[",d,"]"]})]}),h.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[r&&h.jsx(bt,{size:"sm",onClick:r,children:"Try again"}),o&&h.jsx(bt,{size:"sm",variant:"ghost",onClick:()=>i.history.back(),children:"Go back"}),s&&h.jsx(bt,{size:"sm",variant:"ghost",onClick:()=>a({to:Kr,search:{page:1,limit:Es,sortBy:"updatedAt",sortOrder:"desc",pinnedFirst:!1}}),children:"Go home"}),h.jsx(bt,{size:"sm",variant:"ghost",onClick:p,children:l==="copied"?"Copied details":l==="failed"?"Copy failed":"Copy details"})]})]})}function ke({title:e="Loading page",description:t="Preparing route resources."}){return h.jsx(Ss,{title:e,description:t,variant:"none",children:h.jsxs("div",{role:"status","aria-label":e,className:"flex flex-col gap-4",children:[h.jsx(Ht,{height:"56px"}),h.jsx(Ht,{height:"220px"}),h.jsx(Ht,{height:"160px"})]})})}function qE({error:e,reset:t}){return h.jsx(Ss,{title:"Something went wrong",variant:"none",children:h.jsx(Ji,{title:"Route failed to render",description:"Retry the route or navigate somewhere safe.",error:e,onRetry:t})})}function zE(){return h.jsx(Ss,{title:"Not found",variant:"none",children:h.jsxs("div",{className:"rounded-[18px] border-2 border-border bg-surface p-6",children:[h.jsx(se,{as:"p",variant:"heading",weight:"bold",tracking:"tighter",children:"This page does not exist."}),h.jsx(se,{as:"p",variant:"meta",tone:"tertiary",className:"mt-2",children:"Check the URL or navigate from the sidebar."})]})})}const KE=(e=[],t=[])=>e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]));class WE extends c.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidUpdate(t){this.state.error!==null&&KE(t.resetKeys,this.props.resetKeys)&&this.resetErrorBoundary()}resetErrorBoundary=()=>{this.props.onReset?.(),this.setState({error:null})};render(){return this.state.error!==null?this.props.fallbackRender({error:this.state.error,resetErrorBoundary:this.resetErrorBoundary}):this.props.children}}function bp({children:e,fallback:t,errorTitle:n,errorDescription:r,resetKeys:o,renderError:s}){return h.jsx(Bg,{children:({reset:a})=>h.jsx(WE,{onReset:a,resetKeys:o,fallbackRender:({error:i,resetErrorBoundary:l})=>s?s({error:i,retry:l}):h.jsx(Ji,{title:n,description:r,error:i,onRetry:l}),children:h.jsx(c.Suspense,{fallback:t,children:e})})})}const Ol=e=>{let t;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,p))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,o,i);return i},GE=(e=>e?Ol(e):Ol),YE=e=>e;function QE(e,t=YE){const n=M.useSyncExternalStore(e.subscribe,M.useCallback(()=>t(e.getState()),[e,t]),M.useCallback(()=>t(e.getInitialState()),[e,t]));return M.useDebugValue(n),n}const Il=e=>{const t=GE(e),n=r=>QE(t,r);return Object.assign(n,t),n},XE=(e=>e?Il(e):Il),xp="theme",Dl="(prefers-color-scheme: dark)";function JE(e){return e==="light"||e==="dark"}function eS(){return typeof document>"u"?null:document.documentElement}function wp(){return typeof window>"u"?null:window.localStorage}function Ep(e){const t=eS();t&&(t.classList.remove("light","dark"),t.classList.add(e))}function Vo(){const e=wp()?.getItem(xp)??null;return JE(e)?e:null}function tS({storedTheme:e,systemPrefersDark:t}){return e||(t?"dark":"light")}function nS(e,t={}){Ep(e),t.persist!==!1&&wp()?.setItem(xp,e)}function rS(e={}){const t=e.matchMedia?e.matchMedia(Dl).matches:typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Dl).matches:!1,n=tS({storedTheme:Vo(),systemPrefersDark:t});return Ep(n),n}const Ll=Vo(),Zo=XE(e=>({explicitTheme:Ll,theme:Ll??"light",setTheme:t=>{e({explicitTheme:t,theme:t})},setSystemTheme:t=>{e(n=>n.explicitTheme?n:{theme:t})},toggleTheme:()=>{e(t=>{const n=t.theme==="light"?"dark":"light";return{explicitTheme:n,theme:n}})}}));Zo.subscribe(e=>{nS(e.theme,{persist:e.explicitTheme===e.theme})});const oS=()=>null,sS="flex h-dvh min-h-0 w-full flex-row overflow-hidden",aS=ae("fixed","bottom-4","left-4","z-[1003]","flex","h-12","w-12","items-center","justify-center","rounded-[14px]","border","border-border-subtle","bg-surface","text-fg-secondary","shadow-[0_12px_24px_-18px_rgba(0,0,0,0.35)]","transition-all","hover:bg-hover-subtle","hover:text-fg-default","active:translate-y-px","aria-expanded:bg-hover-subtle","aria-expanded:text-fg-default"),iS=ae("fixed","z-[1002]","h-full","w-full","flex-[0_0_300px]","overflow-y-auto","border-r-0","border-border-subtle","bg-[var(--page-bg)]","pb-20","md:static","md:w-auto","md:translate-x-0","md:border-r","md:pb-0","md:pointer-events-auto"),cS="pointer-events-none -translate-x-full",lS="pointer-events-auto translate-x-0",uS=ae("flex","h-full","min-h-0","min-w-0","flex-1","flex-col","overflow-x-hidden","overflow-y-auto","overscroll-contain","[scrollbar-gutter:stable]"),dS=ae("sticky","top-0","z-[1001]","border-b","border-border-subtle","bg-[var(--page-bg)]","max-md:after:content-['']","max-md:after:pointer-events-none","max-md:after:absolute","max-md:after:inset-y-0","max-md:after:right-0","max-md:after:w-12","max-md:after:bg-[linear-gradient(to_right,transparent,var(--page-bg))]"),fS=ae("flex","items-center","overflow-x-auto","whitespace-nowrap","[scrollbar-width:none]","[&::-webkit-scrollbar]:hidden"),hS=ae("min-h-0","min-w-0","max-w-full","flex-1","overflow-x-clip","px-4","pt-4","after:block","after:h-4","after:content-['']","max-md:after:h-24"),pS=({sidebar:e,topNavigation:t,children:n})=>{const r=rs({select:i=>i.pathname}),[o,s]=c.useState(!1),a="site-layout-sidebar";return c.useEffect(()=>{s(!1)},[r]),h.jsxs("div",{className:sS,children:[h.jsx("div",{className:"md:hidden",children:h.jsx("button",{type:"button",className:aS,"aria-label":"Toggle sidebar","aria-controls":a,"aria-expanded":o,onClick:()=>s(i=>!i),children:h.jsx(ey,{className:"h-6 w-6"})})}),h.jsx("aside",{id:a,className:ae(iS,o?lS:cS),children:e}),h.jsxs("main",{className:uS,children:[h.jsx("div",{className:dS,children:h.jsx("div",{className:fS,children:t})}),h.jsx("div",{className:hS,children:n}),h.jsx(LE,{})]})]})},mS=e=>({type:"error",category:"graphql",errors:e.map(t=>({code:t.extensions?.code??"GRAPHQL_ERROR",message:t.message??"GraphQL request failed",details:t}))}),gS=e=>{const t=fe.isAxiosError(e)?e.response?.data?.message??e.message??"Network request failed":"Network request failed",n=fe.isAxiosError(e)?e.code??(e.response?.status?`HTTP_${e.response.status}`:"NETWORK_ERROR"):"NETWORK_ERROR",r=fe.isAxiosError(e)?e.response?.data:void 0;return{type:"error",category:"network",errors:[{code:n,message:t,details:r}]}},vS={async execute(e){try{const{data:t}=await fe.post("/graphql",e);return t.errors&&t.errors.length>0?mS(t.errors):t.data?{type:"success",...t.data}:{type:"error",category:"graphql",errors:[{code:"EMPTY_RESPONSE",message:"GraphQL response data is empty",details:t}]}}catch(t){return gS(t)}}},yS={server:vS},bS=()=>yS.server;async function pe(e,t,n){const r=typeof e=="string"?{query:e,variables:t,operationName:n}:e;return bS().execute(r)}const Sp=e=>typeof e=="object"&&e!==null&&"value"in e&&typeof e.value=="string",Rp=(e,t)=>({type:"error",category:"graphql",errors:[{code:"INVALID_RESPONSE_SHAPE",message:`GraphQL response field "${e}" is missing or invalid`,details:t}]}),xS=async e=>{try{const t=await pe(`
28
- query GetServerCache($key: String!) {
29
- cache(key: $key) {
30
- value
31
- }
32
- }
33
- `,{key:e});if(t.type==="error")throw t;if(!Sp(t.cache))throw Rp("cache",t);return t.cache.value}catch{return""}},wS=async(e,t)=>{const n=await pe(`
34
- mutation SetServerCache($key: String!, $value: String!) {
35
- setCache(key: $key, value: $value) {
36
- value
37
- }
38
- }
39
- `,{key:e,value:encodeURIComponent(t)});return n.type==="error"?n:Sp(n.setCache)?{...n,setCache:n.setCache}:Rp("setCache",n)},ES=()=>{const e=uf(),t=ff(),n=Gn(),{data:r}=Gg({queryKey:ye.ui.heroBanner(),async queryFn(){return xS("heroBanner")}});return r?h.jsx("div",{className:"p-3 pb-0",children:h.jsxs("button",{type:"button","aria-label":"Remove hero banner",className:"surface-base focus-ring-soft group relative block w-full overflow-hidden text-left outline-none",onClick:async()=>{if(await e("Remove this hero banner from the sidebar?")){const o=await wS("heroBanner","");if(o.type==="error"){t(o.errors[0]?.message??"Failed to remove hero banner");return}await n.invalidateQueries({queryKey:ye.ui.heroBanner(),exact:!0})}},children:[h.jsx("img",{alt:"Studio atmosphere banner",className:"w-full object-cover transition duration-500 group-hover:scale-[1.01] group-hover:opacity-90 dark:brightness-[0.85] dark:saturate-[0.9]",src:r}),h.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[linear-gradient(180deg,rgba(18,24,34,0.1),rgba(18,24,34,0.38))] opacity-0 transition-opacity duration-300 group-hover:opacity-100"}),h.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 flex items-end justify-between gap-3 p-3",children:h.jsx(se,{as:"span",variant:"micro",weight:"semibold",tracking:"wider",transform:"uppercase",className:"rounded-[12px] border border-white/14 bg-black/16 px-2.5 py-2 text-white/80 opacity-0 backdrop-blur-sm transition-opacity duration-300 group-hover:opacity-100",children:"Remove"})})]})}):null},SS=new Set(["content","order","layout","properties"]),RS=`query FetchNotes(
40
- $searchFilter: SearchFilterInput,
41
- $pagination: PaginationInput
42
- ) {
43
- allNotes(
44
- searchFilter: $searchFilter,
45
- pagination: $pagination
46
- ) {
47
- totalCount
48
- notes {
49
- __NOTE_ADDITIONAL_FIELDS__ id
50
- title
51
- pinned
52
- createdAt
53
- updatedAt
54
- tags {
55
- id
56
- name
57
- }
58
- }
59
- }
60
- }`,CS=e=>{if(!e||e.length===0)return"";const t=Array.from(new Set(e.filter(n=>SS.has(n))));return t.length===0?"":t.map(n=>n==="properties"?` properties {
61
- key
62
- name
63
- value
64
- valueType
65
- option { id label value color order }
66
- createdAt
67
- updatedAt
68
- }`:" "+n).join(`
69
- `)+`
70
- `};function Cp({limit:e=25,offset:t=0,query:n="",sortBy:r,sortOrder:o,pinnedFirst:s,fields:a}={}){const i=CS(a),l=RS.replace("__NOTE_ADDITIONAL_FIELDS__",i);return pe(l,{searchFilter:{query:n,sortBy:r,sortOrder:o,pinnedFirst:s},pagination:{limit:e,offset:t}})}function T5({query:e="",limit:t=25,offset:n=0}={}){return pe(`query FetchTagNotes(
71
- $searchFilter: SearchFilterInput,
72
- $pagination: PaginationInput
73
- ) {
74
- tagNotes(
75
- searchFilter: $searchFilter,
76
- pagination: $pagination
77
- ) {
78
- totalCount
79
- notes {
80
- id
81
- title
82
- pinned
83
- tags {
84
- id
85
- name
86
- }
87
- createdAt
88
- updatedAt
89
- }
90
- }
91
- }`,{searchFilter:{query:e},pagination:{limit:t,offset:n}})}function P5(e){return pe(`query FetchNote($id: ID!) {
92
- note(id: $id) {
93
- title
94
- pinned
95
- layout
96
- content
97
- createdAt
98
- updatedAt
99
- properties {
100
- key
101
- name
102
- value
103
- valueType
104
- option { id label value color order }
105
- createdAt
106
- updatedAt
107
- }
108
- }
109
- }`,{id:e})}function AS(e){return pe(`query FetchBackReferences($id: ID!) {
110
- backReferences(id: $id) {
111
- id
112
- title
113
- }
114
- }`,{id:e})}function M5(e){return pe(`query FetchImageNotes($src: String!) {
115
- imageNotes(src: $src) {
116
- id
117
- title
118
- createdAt
119
- updatedAt
120
- }
121
- }`,{src:e})}function _5({query:e="",limit:t=50,offset:n=0}={}){return pe(`query FetchNotePropertyKeys($query: String, $pagination: PaginationInput) {
122
- notePropertyKeys(query: $query, pagination: $pagination) {
123
- totalCount
124
- keys {
125
- key
126
- name
127
- valueType
128
- noteCount
129
- options { id label value color order }
130
- updatedAt
131
- }
132
- }
133
- }`,{...e?{query:e}:{},pagination:{limit:t,offset:n}})}function N5(e){return pe(`mutation CreateNotePropertyKey($input: NotePropertyDefinitionInput!) {
134
- createNotePropertyKey(input: $input) {
135
- key
136
- name
137
- valueType
138
- noteCount
139
- options { id label value color order }
140
- updatedAt
141
- }
142
- }`,{input:e})}function O5({key:e,...t}){return pe(`mutation UpdateNotePropertyKey($key: String!, $input: NotePropertyDefinitionUpdateInput!) {
143
- updateNotePropertyKey(key: $key, input: $input) {
144
- key
145
- name
146
- valueType
147
- noteCount
148
- options { id label value color order }
149
- updatedAt
150
- }
151
- }`,{key:e,input:t})}function I5({key:e,confirmImpact:t}){return pe(`mutation DeleteNotePropertyKey($key: String!, $confirmImpact: Boolean) {
152
- deleteNotePropertyKey(key: $key, confirmImpact: $confirmImpact) {
153
- key
154
- name
155
- valueType
156
- affectedNoteCount
157
- deleted
158
- }
159
- }`,{key:e,...t?{confirmImpact:!0}:{}})}function TS(e){return pe(`mutation CreateNote($note: NoteInput!) {
160
- createNote(note: $note) {
161
- id
162
- }
163
- }`,{note:e})}function D5({id:e,set:t=[],deleteKeys:n=[],editSessionId:r,expectedUpdatedAt:o,force:s}){return pe(`mutation UpdateNoteProperties(
164
- $id: ID!,
165
- $patch: NotePropertiesPatchInput!,
166
- $editSessionId: String,
167
- $expectedUpdatedAt: String!,
168
- $force: Boolean
169
- ) {
170
- updateNoteProperties(
171
- id: $id,
172
- patch: $patch,
173
- editSessionId: $editSessionId,
174
- expectedUpdatedAt: $expectedUpdatedAt,
175
- force: $force
176
- ) {
177
- id
178
- updatedAt
179
- properties {
180
- key
181
- name
182
- value
183
- valueType
184
- option { id label value color order }
185
- createdAt
186
- updatedAt
187
- }
188
- }
189
- }`,{id:e,patch:{...t.length>0?{set:t}:{},...n.length>0?{deleteKeys:n}:{}},...r?{editSessionId:r}:{},expectedUpdatedAt:o,...s?{force:!0}:{}})}const L5=({id:e,editSessionId:t,expectedUpdatedAt:n,force:r,...o})=>pe(`mutation UpdateNote($id: ID!, $note: NoteInput!, $editSessionId: String, $expectedUpdatedAt: String, $force: Boolean) {
190
- updateNote(id: $id, note: $note, editSessionId: $editSessionId, expectedUpdatedAt: $expectedUpdatedAt, force: $force) {
191
- id
192
- title
193
- updatedAt
194
- }
195
- }`,{id:e,note:o,...t?{editSessionId:t}:{},...n?{expectedUpdatedAt:n}:{},...r?{force:!0}:{}});function j5(e,t=10){return pe(`query FetchNoteSnapshots($id: ID!, $limit: Int) {
196
- noteSnapshots(id: $id, limit: $limit) {
197
- id
198
- title
199
- contentPreview
200
- createdAt
201
- meta {
202
- entrypoint
203
- label
204
- }
205
- }
206
- }`,{id:e,limit:t})}function k5(e){return pe(`query FetchNoteSnapshot($id: ID!) {
207
- noteSnapshot(id: $id) {
208
- id
209
- title
210
- contentPreview
211
- contentAsMarkdown
212
- createdAt
213
- meta {
214
- entrypoint
215
- label
216
- }
217
- }
218
- }`,{id:e})}function F5(e,t="current"){return pe(`query FetchNoteSnapshotDiff($id: ID!, $target: NoteSnapshotDiffTarget, $contextLines: Int) {
219
- noteSnapshotDiff(id: $id, target: $target, contextLines: $contextLines) {
220
- noteId
221
- mode
222
- before {
223
- kind
224
- id
225
- title
226
- createdAt
227
- updatedAt
228
- meta {
229
- entrypoint
230
- label
231
- }
232
- }
233
- after {
234
- kind
235
- id
236
- title
237
- createdAt
238
- updatedAt
239
- meta {
240
- entrypoint
241
- label
242
- }
243
- }
244
- diff {
245
- markdown
246
- changedLineCount
247
- changedCharCount
248
- beforeMarkdownSha256
249
- afterMarkdownSha256
250
- }
251
- }
252
- }`,{id:e,target:t.toUpperCase(),contextLines:3})}function $5(e){return pe(`mutation RestoreNoteSnapshot($id: ID!) {
253
- restoreNoteSnapshot(id: $id) {
254
- id
255
- title
256
- pinned
257
- layout
258
- content
259
- updatedAt
260
- }
261
- }`,{id:e})}function H5({limit:e=25,offset:t=0}={}){return pe(`query FetchTrashedNotes($pagination: PaginationInput) {
262
- trashedNotes(pagination: $pagination) {
263
- totalCount
264
- notes {
265
- id
266
- title
267
- createdAt
268
- updatedAt
269
- deletedAt
270
- contentPreview
271
- pinned
272
- order
273
- layout
274
- tagNames
275
- }
276
- }
277
- }`,{pagination:{limit:e,offset:t}})}function B5(e){return pe(`query FetchTrashedNote($id: ID!) {
278
- trashedNote(id: $id) {
279
- id
280
- title
281
- createdAt
282
- updatedAt
283
- deletedAt
284
- contentPreview
285
- contentAsMarkdown
286
- pinned
287
- order
288
- layout
289
- tagNames
290
- }
291
- }`,{id:e})}function V5(e){return pe(`mutation RestoreTrashedNote($id: ID!) {
292
- restoreTrashedNote(id: $id) {
293
- id
294
- title
295
- pinned
296
- layout
297
- content
298
- updatedAt
299
- }
300
- }`,{id:e})}function Z5(e){return pe(`mutation PurgeTrashedNote($id: ID!) {
301
- purgeTrashedNote(id: $id)
302
- }`,{id:e})}function PS(e,t){return pe(`mutation PinNote($id: ID!, $pinned: Boolean!) {
303
- pinNote(id: $id, pinned: $pinned) {
304
- id
305
- title
306
- pinned
307
- createdAt
308
- updatedAt
309
- }
310
- }`,{id:e,pinned:t})}function MS(e){return pe(`mutation DeleteNote($id: ID!) {
311
- deleteNote(id: $id)
312
- }`,{id:e})}function _S(e){return pe(`mutation ReorderNotes($notes: [NoteOrderInput!]!) {
313
- reorderNotes(notes: $notes) {
314
- id
315
- order
316
- }
317
- }`,{notes:e})}function U5(){return pe(`query FetchNoteGraph {
318
- noteGraph {
319
- nodes {
320
- id
321
- title
322
- connections
323
- }
324
- links {
325
- source
326
- target
327
- }
328
- }
329
- }`)}const za=6e4,io=6e4,Ln=(e,t)=>`${e} ${t}${e===1?"":"s"} ago`;function Ap(e,t=Date.now()){const n=new Date(e),r=Math.max(0,Math.floor((t-n.getTime())/1e3));let o=Math.floor(r/31536e3);return o>=1?Ln(o,"year"):(o=Math.floor(r/2592e3),o>=1?Ln(o,"month"):(o=Math.floor(r/86400),o>=1?Ln(o,"day"):(o=Math.floor(r/3600),o>=1?Ln(o,"hour"):(o=Math.floor(r/60),o>=1?Ln(o,"minute"):Ln(Math.floor(r),"second")))))}function q5(e,t=Date.now()){return e===null||t-e<za?"just now":Ap(e,t)}function z5(e,t=Date.now()){if(e===null)return io;const n=Math.max(0,t-e);if(n<za)return za-n;const r=n%io;return r===0?io:io-r}function NS({id:e,title:t,tags:n,pinned:r,updatedAt:o,onPinned:s,onDelete:a}){const i=Ap(Number(o));return h.jsxs("div",{className:ae("surface-base group relative flex h-full flex-col px-4 py-3.5 transition-colors"),children:[r&&h.jsx("div",{className:"absolute left-1/2 top-0 z-[1] -translate-x-1/2 -translate-y-[38%]",children:h.jsxs("div",{className:"inline-flex h-7 w-7 items-center justify-center rounded-full border border-border-secondary/70 bg-elevated text-fg-tertiary shadow-[0_8px_18px_-14px_rgba(23,29,38,0.32)]",children:[h.jsx(nf,{className:"h-3.5 w-3.5",weight:"fill"}),h.jsx("span",{className:"sr-only",children:"Pinned note"})]})}),h.jsxs("div",{className:"flex h-full flex-col gap-2.5",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2.5",children:[h.jsx("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2.5 gap-y-1",children:h.jsxs(se,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:["Updated ",i]})}),h.jsx(ax,{button:h.jsx(fx,{label:"Note actions",size:"sm"}),items:[{name:r?"Unpin":"Pin",onClick:()=>s?.()},{name:"Delete",onClick:()=>a?.()}]})]}),h.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-2.5",children:[h.jsx(se,{as:"div",variant:"body",weight:"semibold",tracking:"tight",className:"leading-[1.45]",children:h.jsx(Pt,{className:"line-clamp-2 transition-colors hover:text-fg-default/85",to:Jn,params:{id:e},children:t||"Untitled"})}),n.length>0&&h.jsx("div",{className:"flex flex-wrap gap-1.5 pt-0.5",children:n.map(l=>h.jsx(Pt,{to:Xi,params:{id:l.id},search:{page:1},children:h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"secondary",className:"inline-flex items-center rounded-full border border-border-subtle bg-transparent px-2 py-0.5 transition-colors hover:bg-hover-subtle hover:text-fg-default",children:l.name})},l.id))})]})]})]},e)}function OS({isOpen:e,title:t,description:n,references:r,confirmLabel:o,onClose:s,onConfirm:a,confirmVariant:i="primary",isConfirming:l=!1}){return h.jsxs(Ft,{isOpen:e,onClose:s,variant:"inspect",children:[h.jsx(Ft.Header,{title:t,onClose:s}),h.jsx(Ft.Body,{children:h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx(Ft.Description,{className:"text-meta font-normal text-fg-secondary",children:n}),h.jsxs("div",{className:"overflow-hidden rounded-[16px] border border-border-subtle bg-hover-subtle/40",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border-subtle px-4 py-3",children:[h.jsx(se,{as:"p",variant:"micro",weight:"semibold",tracking:"wider",transform:"uppercase",tone:"tertiary",children:"Referenced notes"}),h.jsxs(se,{as:"p",variant:"label",tone:"tertiary",children:[r.length," ",r.length===1?"note":"notes"]})]}),h.jsx("ul",{className:"flex flex-col",children:r.map((u,f)=>h.jsx("li",{className:f>0?"border-t border-border-subtle":void 0,children:h.jsxs("div",{className:"flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[h.jsx(se,{as:"p",variant:"body",weight:"medium",className:"min-w-0 flex-1 break-words",children:u.title||"Untitled note"}),h.jsx(bt,{asChild:!0,variant:"ghost",size:"sm",className:"self-start sm:self-auto",children:h.jsx(Pt,{to:Jn,params:{id:u.id},children:"Open note"})})]})},u.id))})]})]})}),h.jsx(Ft.Footer,{children:h.jsxs(Xw,{children:[h.jsx(bt,{variant:"ghost",size:"sm",onClick:s,disabled:l,children:"Cancel"}),h.jsx(bt,{variant:i,size:"sm",onClick:a,isLoading:l,children:o})]})})]})}var xo={exports:{}},IS=xo.exports,jl;function DS(){return jl||(jl=1,(function(e,t){(function(n,r){e.exports=r()})(IS,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",a="second",i="minute",l="hour",u="day",f="week",d="month",p="quarter",m="year",v="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var k=["th","st","nd","rd"],A=L%100;return"["+L+(k[(A-20)%10]||k[A]||k[0])+"]"}},w=function(L,k,A){var D=String(L);return!D||D.length>=k?L:""+Array(k+1-D.length).join(A)+L},E={s:w,z:function(L){var k=-L.utcOffset(),A=Math.abs(k),D=Math.floor(A/60),j=A%60;return(k<=0?"+":"-")+w(D,2,"0")+":"+w(j,2,"0")},m:function L(k,A){if(k.date()<A.date())return-L(A,k);var D=12*(A.year()-k.year())+(A.month()-k.month()),j=k.clone().add(D,d),_=A-j<0,V=k.clone().add(D+(_?-1:1),d);return+(-(D+(A-j)/(_?j-V:V-j))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:d,y:m,w:f,d:u,D:v,h:l,m:i,s:a,ms:s,Q:p}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},T="en",O={};O[T]=x;var C="$isDayjsObject",S=function(L){return L instanceof H||!(!L||!L[C])},N=function L(k,A,D){var j;if(!k)return T;if(typeof k=="string"){var _=k.toLowerCase();O[_]&&(j=_),A&&(O[_]=A,j=_);var V=k.split("-");if(!j&&V.length>1)return L(V[0])}else{var K=k.name;O[K]=k,j=K}return!D&&j&&(T=j),j||!D&&T},I=function(L,k){if(S(L))return L.clone();var A=typeof k=="object"?k:{};return A.date=L,A.args=arguments,new H(A)},P=E;P.l=N,P.i=S,P.w=function(L,k){return I(L,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var H=(function(){function L(A){this.$L=N(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[C]=!0}var k=L.prototype;return k.parse=function(A){this.$d=(function(D){var j=D.date,_=D.utc;if(j===null)return new Date(NaN);if(P.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var V=j.match(y);if(V){var K=V[2]-1||0,Y=(V[7]||"0").substring(0,3);return _?new Date(Date.UTC(V[1],K,V[3]||1,V[4]||0,V[5]||0,V[6]||0,Y)):new Date(V[1],K,V[3]||1,V[4]||0,V[5]||0,V[6]||0,Y)}}return new Date(j)})(A),this.init()},k.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},k.$utils=function(){return P},k.isValid=function(){return this.$d.toString()!==g},k.isSame=function(A,D){var j=I(A);return this.startOf(D)<=j&&j<=this.endOf(D)},k.isAfter=function(A,D){return I(A)<this.startOf(D)},k.isBefore=function(A,D){return this.endOf(D)<I(A)},k.$g=function(A,D,j){return P.u(A)?this[D]:this.set(j,A)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(A,D){var j=this,_=!!P.u(D)||D,V=P.p(A),K=function(ee,Z){var X=P.w(j.$u?Date.UTC(j.$y,Z,ee):new Date(j.$y,Z,ee),j);return _?X:X.endOf(u)},Y=function(ee,Z){return P.w(j.toDate()[ee].apply(j.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(Z)),j)},B=this.$W,q=this.$M,U=this.$D,J="set"+(this.$u?"UTC":"");switch(V){case m:return _?K(1,0):K(31,11);case d:return _?K(1,q):K(0,q+1);case f:var $=this.$locale().weekStart||0,F=(B<$?B+7:B)-$;return K(_?U-F:U+(6-F),q);case u:case v:return Y(J+"Hours",0);case l:return Y(J+"Minutes",1);case i:return Y(J+"Seconds",2);case a:return Y(J+"Milliseconds",3);default:return this.clone()}},k.endOf=function(A){return this.startOf(A,!1)},k.$set=function(A,D){var j,_=P.p(A),V="set"+(this.$u?"UTC":""),K=(j={},j[u]=V+"Date",j[v]=V+"Date",j[d]=V+"Month",j[m]=V+"FullYear",j[l]=V+"Hours",j[i]=V+"Minutes",j[a]=V+"Seconds",j[s]=V+"Milliseconds",j)[_],Y=_===u?this.$D+(D-this.$W):D;if(_===d||_===m){var B=this.clone().set(v,1);B.$d[K](Y),B.init(),this.$d=B.set(v,Math.min(this.$D,B.daysInMonth())).$d}else K&&this.$d[K](Y);return this.init(),this},k.set=function(A,D){return this.clone().$set(A,D)},k.get=function(A){return this[P.p(A)]()},k.add=function(A,D){var j,_=this;A=Number(A);var V=P.p(D),K=function(q){var U=I(_);return P.w(U.date(U.date()+Math.round(q*A)),_)};if(V===d)return this.set(d,this.$M+A);if(V===m)return this.set(m,this.$y+A);if(V===u)return K(1);if(V===f)return K(7);var Y=(j={},j[i]=r,j[l]=o,j[a]=n,j)[V]||1,B=this.$d.getTime()+A*Y;return P.w(B,this)},k.subtract=function(A,D){return this.add(-1*A,D)},k.format=function(A){var D=this,j=this.$locale();if(!this.isValid())return j.invalidDate||g;var _=A||"YYYY-MM-DDTHH:mm:ssZ",V=P.z(this),K=this.$H,Y=this.$m,B=this.$M,q=j.weekdays,U=j.months,J=j.meridiem,$=function(Z,X,te,ie){return Z&&(Z[X]||Z(D,_))||te[X].slice(0,ie)},F=function(Z){return P.s(K%12||12,Z,"0")},ee=J||function(Z,X,te){var ie=Z<12?"AM":"PM";return te?ie.toLowerCase():ie};return _.replace(b,(function(Z,X){return X||(function(te){switch(te){case"YY":return String(D.$y).slice(-2);case"YYYY":return P.s(D.$y,4,"0");case"M":return B+1;case"MM":return P.s(B+1,2,"0");case"MMM":return $(j.monthsShort,B,U,3);case"MMMM":return $(U,B);case"D":return D.$D;case"DD":return P.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return $(j.weekdaysMin,D.$W,q,2);case"ddd":return $(j.weekdaysShort,D.$W,q,3);case"dddd":return q[D.$W];case"H":return String(K);case"HH":return P.s(K,2,"0");case"h":return F(1);case"hh":return F(2);case"a":return ee(K,Y,!0);case"A":return ee(K,Y,!1);case"m":return String(Y);case"mm":return P.s(Y,2,"0");case"s":return String(D.$s);case"ss":return P.s(D.$s,2,"0");case"SSS":return P.s(D.$ms,3,"0");case"Z":return V}return null})(Z)||V.replace(":","")}))},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(A,D,j){var _,V=this,K=P.p(D),Y=I(A),B=(Y.utcOffset()-this.utcOffset())*r,q=this-Y,U=function(){return P.m(V,Y)};switch(K){case m:_=U()/12;break;case d:_=U();break;case p:_=U()/3;break;case f:_=(q-B)/6048e5;break;case u:_=(q-B)/864e5;break;case l:_=q/o;break;case i:_=q/r;break;case a:_=q/n;break;default:_=q}return j?_:P.a(_)},k.daysInMonth=function(){return this.endOf(d).$D},k.$locale=function(){return O[this.$L]},k.locale=function(A,D){if(!A)return this.$L;var j=this.clone(),_=N(A,D,!0);return _&&(j.$L=_),j},k.clone=function(){return P.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},L})(),z=H.prototype;return I.prototype=z,[["$ms",s],["$s",a],["$m",i],["$H",l],["$W",u],["$M",d],["$y",m],["$D",v]].forEach((function(L){z[L[1]]=function(k){return this.$g(k,L[0],L[1])}})),I.extend=function(L,k){return L.$i||(L(k,H,I),L.$i=!0),I},I.locale=N,I.isDayjs=S,I.unix=function(L){return I(1e3*L)},I.en=O[T],I.Ls=O,I.p={},I}))})(xo)),xo.exports}var LS=DS();const He=Ir(LS),jS=()=>{const e=new Date,t=e.getDate(),n=e.getMonth(),r=e.getFullYear(),s=new Date(r,n,1).getDay();return Math.ceil((t+s)/7)},kS=()=>[{name:"Year",template:"year",replacement:He().format("YYYY")},{name:"Month",template:"month",replacement:He().format("MM")},{name:"Short Month",template:"mon",replacement:He().format("M")},{name:"Day",template:"day",replacement:He().format("DD")},{name:"Short Day",template:"d",replacement:He().format("D")},{name:"Week of Month",template:"week_of_month",replacement:jS().toString()},{name:"Hour 24",template:"hour",replacement:He().format("HH")},{name:"Hour 12",template:"hour_12",replacement:He().format("hh")},{name:"Short Hour 24",template:"h",replacement:He().format("H")},{name:"Short Hour 12",template:"h_12",replacement:He().format("h")},{name:"AM/PM",template:"ampm",replacement:He().format("A")},{name:"Minute",template:"minute",replacement:He().format("mm")},{name:"Short Minute",template:"m",replacement:He().format("m")},{name:"Second",template:"second",replacement:He().format("ss")},{name:"Short Second",template:"s",replacement:He().format("s")}],FS="{%",$S="%}",kl=e=>e.replace(new RegExp(`${FS}([^}]+)${$S}`,"g"),(t,n)=>kS().find(o=>o.template===n)?.replacement||t),co={title:"Move note to Trash?",description:"This note is referenced by the notes below. Those links may stop opening while this note stays in Trash. If you restore this note later, the links will work again.",confirmLabel:"Move to Trash",confirmVariant:"soft-danger"},Tp=()=>{const e=uf(),t=ff(),n=Gn(),r=En(),[o,s]=c.useState(null),a=async(d="",p="",m)=>{const v=kl(d),g=kl(p),y=await TS({title:v,content:g,...m&&{layout:m}});return y.type==="error"?(t(y.errors[0].message),null):(r({to:Jn,params:{id:y.createNote.id}}),y.createNote.id)},i=async(d,p,m)=>{try{const v=await PS(d,!p);if(v.type==="error"){t(v.errors[0].message);return}await Promise.all([n.invalidateQueries({queryKey:ye.notes.listAll(),exact:!1}),n.invalidateQueries({queryKey:ye.notes.tagListAll(),exact:!1}),n.invalidateQueries({queryKey:ye.notes.pinned(),exact:!0})]),m?.()}catch{t("Failed to update note pin status")}},l=async(d,p)=>{const m=await MS(d);if(m.type==="error"){t(m.errors[0].message);return}await Promise.all([n.invalidateQueries({queryKey:ye.notes.all(),exact:!1}),n.invalidateQueries({queryKey:ye.tags.all(),exact:!1}),n.invalidateQueries({queryKey:ye.reminders.all(),exact:!1}),n.invalidateQueries({queryKey:ye.images.all(),exact:!1}),n.invalidateQueries({queryKey:["calendar"],exact:!1})]),t("The note has been moved to trash."),p?.()},u=async()=>{if(!o)return;const{id:d,callback:p}=o;s(null),await l(d,p)};return{onCreate:a,onPinned:i,onDelete:async(d,p)=>{const m=await AS(d);if(m.type==="error"){t("Failed to check linked notes before moving this note to Trash.");return}if(n.setQueryData(ye.notes.backReferences(d),m.backReferences),m.backReferences.length>0){s({id:d,callback:p,backReferences:m.backReferences});return}await e("Move this note to trash?")&&await l(d,p)},deleteWarningDialog:h.jsx(OS,{isOpen:!!o,title:co.title,description:co.description,references:o?.backReferences??[],confirmLabel:co.confirmLabel,confirmVariant:co.confirmVariant,onClose:()=>s(null),onConfirm:()=>{u()}})}};function HS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Rs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function er(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function ec(e){return"nodeType"in e}function nt(e){var t,n;return e?er(e)?e:ec(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function tc(e){const{Document:t}=nt(e);return e instanceof t}function Wr(e){return er(e)?!1:e instanceof nt(e).HTMLElement}function Pp(e){return e instanceof nt(e).SVGElement}function tr(e){return e?er(e)?e.document:ec(e)?tc(e)?e:Wr(e)||Pp(e)?e.ownerDocument:document:document:document}const _t=Rs?c.useLayoutEffect:c.useEffect;function nc(e){const t=c.useRef(e);return _t(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function BS(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Mr(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return _t(()=>{n.current!==e&&(n.current=e)},t),n}function Gr(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Uo(e){const t=nc(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function Ka(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let aa={};function Yr(e,t){return c.useMemo(()=>{if(t)return t;const n=aa[e]==null?0:aa[e]+1;return aa[e]=n,e+"-"+n},[e,t])}function Mp(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const i=Object.entries(a);for(const[l,u]of i){const f=s[l];f!=null&&(s[l]=f+e*u)}return s},{...t})}}const Vn=Mp(1),_r=Mp(-1);function VS(e){return"clientX"in e&&"clientY"in e}function rc(e){if(!e)return!1;const{KeyboardEvent:t}=nt(e.target);return t&&e instanceof t}function ZS(e){if(!e)return!1;const{TouchEvent:t}=nt(e.target);return t&&e instanceof t}function Wa(e){if(ZS(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return VS(e)?{x:e.clientX,y:e.clientY}:null}const Nr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Nr.Translate.toString(e),Nr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Fl="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function US(e){return e.matches(Fl)?e:e.querySelector(Fl)}const qS={display:"none"};function zS(e){let{id:t,value:n}=e;return M.createElement("div",{id:t,style:qS},n)}function KS(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return M.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function WS(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const _p=c.createContext(null);function GS(e){const t=c.useContext(_p);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function YS(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:s}=r;e.forEach(a=>{var i;return(i=a[o])==null?void 0:i.call(a,s)})},[e]),t]}const QS={draggable:`
330
- To pick up a draggable item, press the space bar.
331
- While dragging, use the arrow keys to move the item.
332
- Press space again to drop the item in its new position, or press escape to cancel.
333
- `},XS={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function JS(e){let{announcements:t=XS,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=QS}=e;const{announce:s,announcement:a}=WS(),i=Yr("DndLiveRegion"),[l,u]=c.useState(!1);if(c.useEffect(()=>{u(!0)},[]),GS(c.useMemo(()=>({onDragStart(d){let{active:p}=d;s(t.onDragStart({active:p}))},onDragMove(d){let{active:p,over:m}=d;t.onDragMove&&s(t.onDragMove({active:p,over:m}))},onDragOver(d){let{active:p,over:m}=d;s(t.onDragOver({active:p,over:m}))},onDragEnd(d){let{active:p,over:m}=d;s(t.onDragEnd({active:p,over:m}))},onDragCancel(d){let{active:p,over:m}=d;s(t.onDragCancel({active:p,over:m}))}}),[s,t])),!l)return null;const f=M.createElement(M.Fragment,null,M.createElement(zS,{id:r,value:o.draggable}),M.createElement(KS,{id:i,announcement:a}));return n?$t.createPortal(f,n):f}var Me;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Me||(Me={}));function qo(){}function $l(e,t){return c.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function e3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const wt=Object.freeze({x:0,y:0});function Np(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Op(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function t3(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Hl(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function Ip(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Bl(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const n3=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Bl(t,t.left,t.top),s=[];for(const a of r){const{id:i}=a,l=n.get(i);if(l){const u=Np(Bl(l),o);s.push({id:i,data:{droppableContainer:a,value:u}})}}return s.sort(Op)},r3=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Hl(t),s=[];for(const a of r){const{id:i}=a,l=n.get(i);if(l){const u=Hl(l),f=o.reduce((p,m,v)=>p+Np(u[v],m),0),d=Number((f/4).toFixed(4));s.push({id:i,data:{droppableContainer:a,value:d}})}}return s.sort(Op)};function o3(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),a=o-r,i=s-n;if(r<o&&n<s){const l=t.width*t.height,u=e.width*e.height,f=a*i,d=f/(l+u-f);return Number(d.toFixed(4))}return 0}const s3=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:a}=s,i=n.get(a);if(i){const l=o3(i,t);l>0&&o.push({id:a,data:{droppableContainer:s,value:l}})}}return o.sort(t3)};function a3(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Dp(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:wt}function i3(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((a,i)=>({...a,top:a.top+e*i.y,bottom:a.bottom+e*i.y,left:a.left+e*i.x,right:a.right+e*i.x}),{...n})}}const c3=i3(1);function l3(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function u3(e,t,n){const r=l3(t);if(!r)return e;const{scaleX:o,scaleY:s,x:a,y:i}=r,l=e.left-a-(1-o)*parseFloat(n),u=e.top-i-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,d=s?e.height/s:e.height;return{width:f,height:d,top:u,right:l+f,bottom:u+d,left:l}}const d3={ignoreTransform:!1};function nr(e,t){t===void 0&&(t=d3);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=nt(e).getComputedStyle(e);u&&(n=u3(n,u,f))}const{top:r,left:o,width:s,height:a,bottom:i,right:l}=n;return{top:r,left:o,width:s,height:a,bottom:i,right:l}}function Vl(e){return nr(e,{ignoreTransform:!0})}function f3(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function h3(e,t){return t===void 0&&(t=nt(e).getComputedStyle(e)),t.position==="fixed"}function p3(e,t){t===void 0&&(t=nt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function Cs(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(tc(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Wr(o)||Pp(o)||n.includes(o))return n;const s=nt(e).getComputedStyle(o);return o!==e&&p3(o,s)&&n.push(o),h3(o,s)?n:r(o.parentNode)}return e?r(e):n}function Lp(e){const[t]=Cs(e,1);return t??null}function ia(e){return!Rs||!e?null:er(e)?e:ec(e)?tc(e)||e===tr(e).scrollingElement?window:Wr(e)?e:null:null}function jp(e){return er(e)?e.scrollX:e.scrollLeft}function kp(e){return er(e)?e.scrollY:e.scrollTop}function Ga(e){return{x:jp(e),y:kp(e)}}var Oe;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Oe||(Oe={}));function Fp(e){return!Rs||!e?!1:e===document.scrollingElement}function $p(e){const t={x:0,y:0},n=Fp(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,i=e.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:a,isRight:i,maxScroll:r,minScroll:t}}const m3={x:.2,y:.2};function g3(e,t,n,r,o){let{top:s,left:a,right:i,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=m3);const{isTop:u,isBottom:f,isLeft:d,isRight:p}=$p(e),m={x:0,y:0},v={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return!u&&s<=t.top+g.height?(m.y=Oe.Backward,v.y=r*Math.abs((t.top+g.height-s)/g.height)):!f&&l>=t.bottom-g.height&&(m.y=Oe.Forward,v.y=r*Math.abs((t.bottom-g.height-l)/g.height)),!p&&i>=t.right-g.width?(m.x=Oe.Forward,v.x=r*Math.abs((t.right-g.width-i)/g.width)):!d&&a<=t.left+g.width&&(m.x=Oe.Backward,v.x=r*Math.abs((t.left+g.width-a)/g.width)),{direction:m,speed:v}}function v3(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:a}=window;return{top:0,left:0,right:s,bottom:a,width:s,height:a}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Hp(e){return e.reduce((t,n)=>Vn(t,Ga(n)),wt)}function y3(e){return e.reduce((t,n)=>t+jp(n),0)}function b3(e){return e.reduce((t,n)=>t+kp(n),0)}function x3(e,t){if(t===void 0&&(t=nr),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);Lp(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const w3=[["x",["left","right"],y3],["y",["top","bottom"],b3]];class oc{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Cs(n),o=Hp(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,a,i]of w3)for(const l of a)Object.defineProperty(this,l,{get:()=>{const u=i(r),f=o[s]-u;return this.rect[l]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class yr{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function E3(e){const{EventTarget:t}=nt(e);return e instanceof t?e:tr(e)}function ca(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var pt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(pt||(pt={}));function Zl(e){e.preventDefault()}function S3(e){e.stopPropagation()}var oe;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(oe||(oe={}));const Bp={start:[oe.Space,oe.Enter],cancel:[oe.Esc],end:[oe.Space,oe.Enter,oe.Tab]},R3=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case oe.Right:return{...n,x:n.x+25};case oe.Left:return{...n,x:n.x-25};case oe.Down:return{...n,y:n.y+25};case oe.Up:return{...n,y:n.y-25}}};class sc{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new yr(tr(n)),this.windowListeners=new yr(nt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(pt.Resize,this.handleCancel),this.windowListeners.add(pt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(pt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&x3(r),n(wt)}handleKeyDown(t){if(rc(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=Bp,coordinateGetter:a=R3,scrollBehavior:i="smooth"}=o,{code:l}=t;if(s.end.includes(l)){this.handleEnd(t);return}if(s.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:wt;this.referenceCoordinates||(this.referenceCoordinates=f);const d=a(t,{active:n,context:r.current,currentCoordinates:f});if(d){const p=_r(d,f),m={x:0,y:0},{scrollableAncestors:v}=r.current;for(const g of v){const y=t.code,{isTop:b,isRight:x,isLeft:w,isBottom:E,maxScroll:T,minScroll:O}=$p(g),C=v3(g),S={x:Math.min(y===oe.Right?C.right-C.width/2:C.right,Math.max(y===oe.Right?C.left:C.left+C.width/2,d.x)),y:Math.min(y===oe.Down?C.bottom-C.height/2:C.bottom,Math.max(y===oe.Down?C.top:C.top+C.height/2,d.y))},N=y===oe.Right&&!x||y===oe.Left&&!w,I=y===oe.Down&&!E||y===oe.Up&&!b;if(N&&S.x!==d.x){const P=g.scrollLeft+p.x,H=y===oe.Right&&P<=T.x||y===oe.Left&&P>=O.x;if(H&&!p.y){g.scrollTo({left:P,behavior:i});return}H?m.x=g.scrollLeft-P:m.x=y===oe.Right?g.scrollLeft-T.x:g.scrollLeft-O.x,m.x&&g.scrollBy({left:-m.x,behavior:i});break}else if(I&&S.y!==d.y){const P=g.scrollTop+p.y,H=y===oe.Down&&P<=T.y||y===oe.Up&&P>=O.y;if(H&&!p.x){g.scrollTo({top:P,behavior:i});return}H?m.y=g.scrollTop-P:m.y=y===oe.Down?g.scrollTop-T.y:g.scrollTop-O.y,m.y&&g.scrollBy({top:-m.y,behavior:i});break}}this.handleMove(t,Vn(_r(d,this.referenceCoordinates),m))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}sc.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Bp,onActivation:o}=t,{active:s}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const i=s.activatorNode.current;return i&&e.target!==i?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function Ul(e){return!!(e&&"distance"in e)}function ql(e){return!!(e&&"delay"in e)}class ac{constructor(t,n,r){var o;r===void 0&&(r=E3(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:a}=s;this.props=t,this.events=n,this.document=tr(a),this.documentListeners=new yr(this.document),this.listeners=new yr(r),this.windowListeners=new yr(nt(a)),this.initialCoordinates=(o=Wa(s))!=null?o:wt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(pt.Resize,this.handleCancel),this.windowListeners.add(pt.DragStart,Zl),this.windowListeners.add(pt.VisibilityChange,this.handleCancel),this.windowListeners.add(pt.ContextMenu,Zl),this.documentListeners.add(pt.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ql(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Ul(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(pt.Click,S3,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(pt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:a,options:{activationConstraint:i}}=s;if(!o)return;const l=(n=Wa(t))!=null?n:wt,u=_r(o,l);if(!r&&i){if(Ul(i)){if(i.tolerance!=null&&ca(u,i.tolerance))return this.handleCancel();if(ca(u,i.distance))return this.handleStart()}if(ql(i)&&ca(u,i.tolerance))return this.handleCancel();this.handlePending(i,u);return}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===oe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const C3={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ic extends ac{constructor(t){const{event:n}=t,r=tr(n.target);super(t,C3,r)}}ic.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const A3={move:{name:"mousemove"},end:{name:"mouseup"}};var Ya;(function(e){e[e.RightClick=2]="RightClick"})(Ya||(Ya={}));class T3 extends ac{constructor(t){super(t,A3,tr(t.event.target))}}T3.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Ya.RightClick?!1:(r?.({event:n}),!0)}}];const la={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class P3 extends ac{constructor(t){super(t,la)}static setup(){return window.addEventListener(la.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(la.move.name,t)};function t(){}}}P3.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var br;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(br||(br={}));var zo;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(zo||(zo={}));function M3(e){let{acceleration:t,activator:n=br.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:a=5,order:i=zo.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:p}=e;const m=N3({delta:d,disabled:!s}),[v,g]=BS(),y=c.useRef({x:0,y:0}),b=c.useRef({x:0,y:0}),x=c.useMemo(()=>{switch(n){case br.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case br.DraggableRect:return o}},[n,o,l]),w=c.useRef(null),E=c.useCallback(()=>{const O=w.current;if(!O)return;const C=y.current.x*b.current.x,S=y.current.y*b.current.y;O.scrollBy(C,S)},[]),T=c.useMemo(()=>i===zo.TreeOrder?[...u].reverse():u,[i,u]);c.useEffect(()=>{if(!s||!u.length||!x){g();return}for(const O of T){if(r?.(O)===!1)continue;const C=u.indexOf(O),S=f[C];if(!S)continue;const{direction:N,speed:I}=g3(O,S,x,t,p);for(const P of["x","y"])m[P][N[P]]||(I[P]=0,N[P]=0);if(I.x>0||I.y>0){g(),w.current=O,v(E,a),y.current=I,b.current=N;return}}y.current={x:0,y:0},b.current={x:0,y:0},g()},[t,E,r,g,s,a,JSON.stringify(x),JSON.stringify(m),v,u,T,f,JSON.stringify(p)])}const _3={x:{[Oe.Backward]:!1,[Oe.Forward]:!1},y:{[Oe.Backward]:!1,[Oe.Forward]:!1}};function N3(e){let{delta:t,disabled:n}=e;const r=Ka(t);return Gr(o=>{if(n||!r||!o)return _3;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Oe.Backward]:o.x[Oe.Backward]||s.x===-1,[Oe.Forward]:o.x[Oe.Forward]||s.x===1},y:{[Oe.Backward]:o.y[Oe.Backward]||s.y===-1,[Oe.Forward]:o.y[Oe.Forward]||s.y===1}}},[n,t,r])}function O3(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Gr(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function I3(e,t){return c.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...s]},[]),[e,t])}var Or;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Or||(Or={}));var Qa;(function(e){e.Optimized="optimized"})(Qa||(Qa={}));const zl=new Map;function D3(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,a]=c.useState(null),{frequency:i,measure:l,strategy:u}=o,f=c.useRef(e),d=y(),p=Mr(d),m=c.useCallback(function(b){b===void 0&&(b=[]),!p.current&&a(x=>x===null?b:x.concat(b.filter(w=>!x.includes(w))))},[p]),v=c.useRef(null),g=Gr(b=>{if(d&&!n)return zl;if(!b||b===zl||f.current!==e||s!=null){const x=new Map;for(let w of e){if(!w)continue;if(s&&s.length>0&&!s.includes(w.id)&&w.rect.current){x.set(w.id,w.rect.current);continue}const E=w.node.current,T=E?new oc(l(E),E):null;w.rect.current=T,T&&x.set(w.id,T)}return x}return b},[e,s,n,d,l]);return c.useEffect(()=>{f.current=e},[e]),c.useEffect(()=>{d||m()},[n,d]),c.useEffect(()=>{s&&s.length>0&&a(null)},[JSON.stringify(s)]),c.useEffect(()=>{d||typeof i!="number"||v.current!==null||(v.current=setTimeout(()=>{m(),v.current=null},i))},[i,d,m,...r]),{droppableRects:g,measureDroppableContainers:m,measuringScheduled:s!=null};function y(){switch(u){case Or.Always:return!1;case Or.BeforeDragging:return n;default:return!n}}}function Vp(e,t){return Gr(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function L3(e,t){return Vp(e,t)}function j3(e){let{callback:t,disabled:n}=e;const r=nc(t),o=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return c.useEffect(()=>()=>o?.disconnect(),[o]),o}function As(e){let{callback:t,disabled:n}=e;const r=nc(t),o=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return c.useEffect(()=>()=>o?.disconnect(),[o]),o}function k3(e){return new oc(nr(e),e)}function Kl(e,t,n){t===void 0&&(t=k3);const[r,o]=c.useState(null);function s(){o(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const f=t(e);return JSON.stringify(l)===JSON.stringify(f)?l:f})}const a=j3({callback(l){if(e)for(const u of l){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){s();break}}}}),i=As({callback:s});return _t(()=>{s(),e?(i?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(i?.disconnect(),a?.disconnect())},[e]),r}function F3(e){const t=Vp(e);return Dp(e,t)}const Wl=[];function $3(e){const t=c.useRef(e),n=Gr(r=>e?r&&r!==Wl&&e&&t.current&&e.parentNode===t.current.parentNode?r:Cs(e):Wl,[e]);return c.useEffect(()=>{t.current=e},[e]),n}function H3(e){const[t,n]=c.useState(null),r=c.useRef(e),o=c.useCallback(s=>{const a=ia(s.target);a&&n(i=>i?(i.set(a,Ga(a)),new Map(i)):null)},[]);return c.useEffect(()=>{const s=r.current;if(e!==s){a(s);const i=e.map(l=>{const u=ia(l);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,Ga(u)]):null}).filter(l=>l!=null);n(i.length?new Map(i):null),r.current=e}return()=>{a(e),a(s)};function a(i){i.forEach(l=>{const u=ia(l);u?.removeEventListener("scroll",o)})}},[o,e]),c.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,a)=>Vn(s,a),wt):Hp(e):wt,[e,t])}function Gl(e,t){t===void 0&&(t=[]);const n=c.useRef(null);return c.useEffect(()=>{n.current=null},t),c.useEffect(()=>{const r=e!==wt;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?_r(e,n.current):wt}function B3(e){c.useEffect(()=>{if(!Rs)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function V3(e,t){return c.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=a=>{s(a,t)},n},{}),[e,t])}function Zp(e){return c.useMemo(()=>e?f3(e):null,[e])}const Yl=[];function Z3(e,t){t===void 0&&(t=nr);const[n]=e,r=Zp(n?nt(n):null),[o,s]=c.useState(Yl);function a(){s(()=>e.length?e.map(l=>Fp(l)?r:new oc(t(l),l)):Yl)}const i=As({callback:a});return _t(()=>{i?.disconnect(),a(),e.forEach(l=>i?.observe(l))},[e]),o}function U3(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Wr(t)?t:e}function q3(e){let{measure:t}=e;const[n,r]=c.useState(null),o=c.useCallback(u=>{for(const{target:f}of u)if(Wr(f)){r(d=>{const p=t(f);return d?{...d,width:p.width,height:p.height}:p});break}},[t]),s=As({callback:o}),a=c.useCallback(u=>{const f=U3(u);s?.disconnect(),f&&s?.observe(f),r(f?t(f):null)},[t,s]),[i,l]=Uo(a);return c.useMemo(()=>({nodeRef:i,rect:n,setRef:l}),[n,i,l])}const z3=[{sensor:ic,options:{}},{sensor:sc,options:{}}],K3={current:{}},wo={draggable:{measure:Vl},droppable:{measure:Vl,strategy:Or.WhileDragging,frequency:Qa.Optimized},dragOverlay:{measure:nr}};class xr extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const W3={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new xr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:qo},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:wo,measureDroppableContainers:qo,windowRect:null,measuringScheduled:!1},G3={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:qo,draggableNodes:new Map,over:null,measureDroppableContainers:qo},Ts=c.createContext(G3),Up=c.createContext(W3);function Y3(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new xr}}}function Q3(e,t){switch(t.type){case Me.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Me.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Me.DragEnd:case Me.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Me.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new xr(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Me.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const a=new xr(e.droppable.containers);return a.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Me.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new xr(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function X3(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=c.useContext(Ts),s=Ka(r),a=Ka(n?.id);return c.useEffect(()=>{if(!t&&!r&&s&&a!=null){if(!rc(s)||document.activeElement===s.target)return;const i=o.get(a);if(!i)return;const{activatorNode:l,node:u}=i;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[l.current,u.current]){if(!f)continue;const d=US(f);if(d){d.focus();break}}})}},[r,t,o,a,s]),null}function J3(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function eR(e){return c.useMemo(()=>({draggable:{...wo.draggable,...e?.draggable},droppable:{...wo.droppable,...e?.droppable},dragOverlay:{...wo.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function tR(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const s=c.useRef(!1),{x:a,y:i}=typeof o=="boolean"?{x:o,y:o}:o;_t(()=>{if(!a&&!i||!t){s.current=!1;return}if(s.current||!r)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const f=n(u),d=Dp(f,r);if(a||(d.x=0),i||(d.y=0),s.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=Lp(u);p&&p.scrollBy({top:d.y,left:d.x})}},[t,a,i,r,n])}const qp=c.createContext({...wt,scaleX:1,scaleY:1});var Kt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Kt||(Kt={}));const nR=c.memo(function(t){var n,r,o,s;let{id:a,accessibility:i,autoScroll:l=!0,children:u,sensors:f=z3,collisionDetection:d=s3,measuring:p,modifiers:m,...v}=t;const g=c.useReducer(Q3,void 0,Y3),[y,b]=g,[x,w]=YS(),[E,T]=c.useState(Kt.Uninitialized),O=E===Kt.Initialized,{draggable:{active:C,nodes:S,translate:N},droppable:{containers:I}}=y,P=C!=null?S.get(C):null,H=c.useRef({initial:null,translated:null}),z=c.useMemo(()=>{var Pe;return C!=null?{id:C,data:(Pe=P?.data)!=null?Pe:K3,rect:H}:null},[C,P]),L=c.useRef(null),[k,A]=c.useState(null),[D,j]=c.useState(null),_=Mr(v,Object.values(v)),V=Yr("DndDescribedBy",a),K=c.useMemo(()=>I.getEnabled(),[I]),Y=eR(p),{droppableRects:B,measureDroppableContainers:q,measuringScheduled:U}=D3(K,{dragging:O,dependencies:[N.x,N.y],config:Y.droppable}),J=O3(S,C),$=c.useMemo(()=>D?Wa(D):null,[D]),F=Is(),ee=L3(J,Y.draggable.measure);tR({activeNode:C!=null?S.get(C):null,config:F.layoutShiftCompensation,initialRect:ee,measure:Y.draggable.measure});const Z=Kl(J,Y.draggable.measure,ee),X=Kl(J?J.parentElement:null),te=c.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:B,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=I.getNodeFor((n=te.current.over)==null?void 0:n.id),ue=q3({measure:Y.dragOverlay.measure}),Qe=(r=ue.nodeRef.current)!=null?r:J,Fe=O?(o=ue.rect)!=null?o:Z:null,qe=!!(ue.nodeRef.current&&ue.rect),ct=F3(qe?null:Z),Le=Zp(Qe?nt(Qe):null),Ne=$3(O?ie??J:null),Zt=Z3(Ne),Te=J3(m,{transform:{x:N.x-ct.x,y:N.y-ct.y,scaleX:1,scaleY:1},activatorEvent:D,active:z,activeNodeRect:Z,containerNodeRect:X,draggingNodeRect:Fe,over:te.current.over,overlayNodeRect:ue.rect,scrollableAncestors:Ne,scrollableAncestorRects:Zt,windowRect:Le}),lt=$?Vn($,N):null,An=H3(Ne),Tn=Gl(An),ce=Gl(An,[Z]),ve=Vn(Te,Tn),Re=Fe?c3(Fe,Te):null,ut=z&&Re?d({active:z,collisionRect:Re,droppableRects:B,droppableContainers:K,pointerCoordinates:lt}):null,It=Ip(ut,"id"),[vt,Dt]=c.useState(null),Ms=qe?Te:Vn(Te,ce),_s=a3(Ms,(s=vt?.rect)!=null?s:null,Z),Pn=c.useRef(null),rr=c.useCallback((Pe,$e)=>{let{sensor:Q,options:me}=$e;if(L.current==null)return;const he=S.get(L.current);if(!he)return;const ge=Pe.nativeEvent,ze=new Q({active:L.current,activeNode:he,event:ge,options:me,context:te,onAbort(de){if(!S.get(de))return;const{onDragAbort:Se}=_.current,Ce={id:de};Se?.(Ce),x({type:"onDragAbort",event:Ce})},onPending(de,rt,Se,Ce){if(!S.get(de))return;const{onDragPending:ot}=_.current,Lt={id:de,constraint:rt,initialCoordinates:Se,offset:Ce};ot?.(Lt),x({type:"onDragPending",event:Lt})},onStart(de){const rt=L.current;if(rt==null)return;const Se=S.get(rt);if(!Se)return;const{onDragStart:Ce}=_.current,Ut={activatorEvent:ge,active:{id:rt,data:Se.data,rect:H}};$t.unstable_batchedUpdates(()=>{Ce?.(Ut),T(Kt.Initializing),b({type:Me.DragStart,initialCoordinates:de,active:rt}),x({type:"onDragStart",event:Ut}),A(Pn.current),j(ge)})},onMove(de){b({type:Me.DragMove,coordinates:de})},onEnd:be(Me.DragEnd),onCancel:be(Me.DragCancel)});Pn.current=ze;function be(de){return async function(){const{active:Se,collisions:Ce,over:Ut,scrollAdjustedTranslate:ot}=te.current;let Lt=null;if(Se&&ot){const{cancelDrop:or}=_.current;Lt={activatorEvent:ge,active:Se,collisions:Ce,delta:ot,over:Ut},de===Me.DragEnd&&typeof or=="function"&&await Promise.resolve(or(Lt))&&(de=Me.DragCancel)}L.current=null,$t.unstable_batchedUpdates(()=>{b({type:de}),T(Kt.Uninitialized),Dt(null),A(null),j(null),Pn.current=null;const or=de===Me.DragEnd?"onDragEnd":"onDragCancel";if(Lt){const Ds=_.current[or];Ds?.(Lt),x({type:or,event:Lt})}})}}},[S]),Ns=c.useCallback((Pe,$e)=>(Q,me)=>{const he=Q.nativeEvent,ge=S.get(me);if(L.current!==null||!ge||he.dndKit||he.defaultPrevented)return;const ze={active:ge};Pe(Q,$e.options,ze)===!0&&(he.dndKit={capturedBy:$e.sensor},L.current=me,rr(Q,$e))},[S,rr]),Mn=I3(f,Ns);B3(f),_t(()=>{Z&&E===Kt.Initializing&&T(Kt.Initialized)},[Z,E]),c.useEffect(()=>{const{onDragMove:Pe}=_.current,{active:$e,activatorEvent:Q,collisions:me,over:he}=te.current;if(!$e||!Q)return;const ge={active:$e,activatorEvent:Q,collisions:me,delta:{x:ve.x,y:ve.y},over:he};$t.unstable_batchedUpdates(()=>{Pe?.(ge),x({type:"onDragMove",event:ge})})},[ve.x,ve.y]),c.useEffect(()=>{const{active:Pe,activatorEvent:$e,collisions:Q,droppableContainers:me,scrollAdjustedTranslate:he}=te.current;if(!Pe||L.current==null||!$e||!he)return;const{onDragOver:ge}=_.current,ze=me.get(It),be=ze&&ze.rect.current?{id:ze.id,rect:ze.rect.current,data:ze.data,disabled:ze.disabled}:null,de={active:Pe,activatorEvent:$e,collisions:Q,delta:{x:he.x,y:he.y},over:be};$t.unstable_batchedUpdates(()=>{Dt(be),ge?.(de),x({type:"onDragOver",event:de})})},[It]),_t(()=>{te.current={activatorEvent:D,active:z,activeNode:J,collisionRect:Re,collisions:ut,droppableRects:B,draggableNodes:S,draggingNode:Qe,draggingNodeRect:Fe,droppableContainers:I,over:vt,scrollableAncestors:Ne,scrollAdjustedTranslate:ve},H.current={initial:Fe,translated:Re}},[z,J,ut,Re,S,Qe,Fe,B,I,vt,Ne,ve]),M3({...F,delta:N,draggingRect:Re,pointerCoordinates:lt,scrollableAncestors:Ne,scrollableAncestorRects:Zt});const Rt=c.useMemo(()=>({active:z,activeNode:J,activeNodeRect:Z,activatorEvent:D,collisions:ut,containerNodeRect:X,dragOverlay:ue,draggableNodes:S,droppableContainers:I,droppableRects:B,over:vt,measureDroppableContainers:q,scrollableAncestors:Ne,scrollableAncestorRects:Zt,measuringConfiguration:Y,measuringScheduled:U,windowRect:Le}),[z,J,Z,D,ut,X,ue,S,I,B,vt,q,Ne,Zt,Y,U,Le]),Os=c.useMemo(()=>({activatorEvent:D,activators:Mn,active:z,activeNodeRect:Z,ariaDescribedById:{draggable:V},dispatch:b,draggableNodes:S,over:vt,measureDroppableContainers:q}),[D,Mn,z,Z,b,V,S,vt,q]);return M.createElement(_p.Provider,{value:w},M.createElement(Ts.Provider,{value:Os},M.createElement(Up.Provider,{value:Rt},M.createElement(qp.Provider,{value:_s},u)),M.createElement(X3,{disabled:i?.restoreFocus===!1})),M.createElement(JS,{...i,hiddenTextDescribedById:V}));function Is(){const Pe=k?.autoScrollEnabled===!1,$e=typeof l=="object"?l.enabled===!1:l===!1,Q=O&&!Pe&&!$e;return typeof l=="object"?{...l,enabled:Q}:{enabled:Q}}}),rR=c.createContext(null),Ql="button",oR="Draggable";function sR(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=Yr(oR),{activators:a,activatorEvent:i,active:l,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:p}=c.useContext(Ts),{role:m=Ql,roleDescription:v="draggable",tabIndex:g=0}=o??{},y=l?.id===t,b=c.useContext(y?qp:rR),[x,w]=Uo(),[E,T]=Uo(),O=V3(a,t),C=Mr(n);_t(()=>(d.set(t,{id:t,key:s,node:x,activatorNode:E,data:C}),()=>{const N=d.get(t);N&&N.key===s&&d.delete(t)}),[d,t]);const S=c.useMemo(()=>({role:m,tabIndex:g,"aria-disabled":r,"aria-pressed":y&&m===Ql?!0:void 0,"aria-roledescription":v,"aria-describedby":f.draggable}),[r,m,g,y,v,f.draggable]);return{active:l,activatorEvent:i,activeNodeRect:u,attributes:S,isDragging:y,listeners:r?void 0:O,node:x,over:p,setNodeRef:w,setActivatorNodeRef:T,transform:b}}function aR(){return c.useContext(Up)}const iR="Droppable",cR={timeout:25};function lR(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=Yr(iR),{active:a,dispatch:i,over:l,measureDroppableContainers:u}=c.useContext(Ts),f=c.useRef({disabled:n}),d=c.useRef(!1),p=c.useRef(null),m=c.useRef(null),{disabled:v,updateMeasurementsFor:g,timeout:y}={...cR,...o},b=Mr(g??r),x=c.useCallback(()=>{if(!d.current){d.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{u(Array.isArray(b.current)?b.current:[b.current]),m.current=null},y)},[y]),w=As({callback:x,disabled:v||!a}),E=c.useCallback((S,N)=>{w&&(N&&(w.unobserve(N),d.current=!1),S&&w.observe(S))},[w]),[T,O]=Uo(E),C=Mr(t);return c.useEffect(()=>{!w||!T.current||(w.disconnect(),d.current=!1,w.observe(T.current))},[T,w]),c.useEffect(()=>(i({type:Me.RegisterDroppable,element:{id:r,key:s,disabled:n,node:T,rect:p,data:C}}),()=>i({type:Me.UnregisterDroppable,key:s,id:r})),[r]),c.useEffect(()=>{n!==f.current.disabled&&(i({type:Me.SetDroppableDisabled,id:r,key:s,disabled:n}),f.current.disabled=n)},[r,s,n,i]),{active:a,rect:p,isOver:l?.id===r,node:T,over:l,setNodeRef:O}}const K5=e=>{let{transform:t}=e;return{...t,y:0}},uR=e=>{let{transform:t}=e;return{...t,x:0}};function zp(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function dR(e,t){return e.reduce((n,r,o)=>{const s=t.get(r);return s&&(n[o]=s),n},Array(e.length))}function lo(e){return e!==null&&e>=0}function fR(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function hR(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const uo={scaleX:1,scaleY:1},W5=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:s,index:a}=e;const i=(t=n[o])!=null?t:r;if(!i)return null;const l=pR(n,a,o);if(a===o){const u=n[s];return u?{x:o<s?u.left+u.width-(i.left+i.width):u.left-i.left,y:0,...uo}:null}return a>o&&a<=s?{x:-i.width-l,y:0,...uo}:a<o&&a>=s?{x:i.width+l,y:0,...uo}:{x:0,y:0,...uo}};function pR(e,t,n){const r=e[t],o=e[t-1],s=e[t+1];return!r||!o&&!s?0:n<t?o?r.left-(o.left+o.width):s.left-(r.left+r.width):s?s.left-(r.left+r.width):r.left-(o.left+o.width)}const Kp=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const s=zp(t,r,n),a=t[o],i=s[o];return!i||!a?null:{x:i.left-a.left,y:i.top-a.top,scaleX:i.width/a.width,scaleY:i.height/a.height}},fo={scaleX:1,scaleY:1},mR=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:s,overIndex:a}=e;const i=(t=s[n])!=null?t:r;if(!i)return null;if(o===n){const u=s[a];return u?{x:0,y:n<a?u.top+u.height-(i.top+i.height):u.top-i.top,...fo}:null}const l=gR(s,o,n);return o>n&&o<=a?{x:0,y:-i.height-l,...fo}:o<n&&o>=a?{x:0,y:i.height+l,...fo}:{x:0,y:0,...fo}};function gR(e,t,n){const r=e[t],o=e[t-1],s=e[t+1];return r?n<t?o?r.top-(o.top+o.height):s?s.top-(r.top+r.height):0:s?s.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}const Wp="Sortable",Gp=M.createContext({activeIndex:-1,containerId:Wp,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Kp,disabled:{draggable:!1,droppable:!1}});function vR(e){let{children:t,id:n,items:r,strategy:o=Kp,disabled:s=!1}=e;const{active:a,dragOverlay:i,droppableRects:l,over:u,measureDroppableContainers:f}=aR(),d=Yr(Wp,n),p=i.rect!==null,m=c.useMemo(()=>r.map(O=>typeof O=="object"&&"id"in O?O.id:O),[r]),v=a!=null,g=a?m.indexOf(a.id):-1,y=u?m.indexOf(u.id):-1,b=c.useRef(m),x=!fR(m,b.current),w=y!==-1&&g===-1||x,E=hR(s);_t(()=>{x&&v&&f(m)},[x,m,v,f]),c.useEffect(()=>{b.current=m},[m]);const T=c.useMemo(()=>({activeIndex:g,containerId:d,disabled:E,disableTransforms:w,items:m,overIndex:y,useDragOverlay:p,sortedRects:dR(m,l),strategy:o}),[g,d,E.draggable,E.droppable,w,m,y,l,p,o]);return M.createElement(Gp.Provider,{value:T},t)}const yR=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return zp(n,r,o).indexOf(t)},bR=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:s,newIndex:a,previousItems:i,previousContainerId:l,transition:u}=e;return!u||!r||i!==s&&o===a?!1:n?!0:a!==o&&t===l},xR={duration:200,easing:"ease"},Yp="transform",wR=Nr.Transition.toString({property:Yp,duration:0,easing:"linear"}),ER={roleDescription:"sortable"};function SR(e){let{disabled:t,index:n,node:r,rect:o}=e;const[s,a]=c.useState(null),i=c.useRef(n);return _t(()=>{if(!t&&n!==i.current&&r.current){const l=o.current;if(l){const u=nr(r.current,{ignoreTransform:!0}),f={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(f.x||f.y)&&a(f)}}n!==i.current&&(i.current=n)},[t,n,r,o]),c.useEffect(()=>{s&&a(null)},[s]),s}function RR(e){let{animateLayoutChanges:t=bR,attributes:n,disabled:r,data:o,getNewIndex:s=yR,id:a,strategy:i,resizeObserverConfig:l,transition:u=xR}=e;const{items:f,containerId:d,activeIndex:p,disabled:m,disableTransforms:v,sortedRects:g,overIndex:y,useDragOverlay:b,strategy:x}=c.useContext(Gp),w=CR(r,m),E=f.indexOf(a),T=c.useMemo(()=>({sortable:{containerId:d,index:E,items:f},...o}),[d,o,E,f]),O=c.useMemo(()=>f.slice(f.indexOf(a)),[f,a]),{rect:C,node:S,isOver:N,setNodeRef:I}=lR({id:a,data:T,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...l}}),{active:P,activatorEvent:H,activeNodeRect:z,attributes:L,setNodeRef:k,listeners:A,isDragging:D,over:j,setActivatorNodeRef:_,transform:V}=sR({id:a,data:T,attributes:{...ER,...n},disabled:w.draggable}),K=HS(I,k),Y=!!P,B=Y&&!v&&lo(p)&&lo(y),q=!b&&D,U=q&&B?V:null,$=B?U??(i??x)({rects:g,activeNodeRect:z,activeIndex:p,overIndex:y,index:E}):null,F=lo(p)&&lo(y)?s({id:a,items:f,activeIndex:p,overIndex:y}):E,ee=P?.id,Z=c.useRef({activeId:ee,items:f,newIndex:F,containerId:d}),X=f!==Z.current.items,te=t({active:P,containerId:d,isDragging:D,isSorting:Y,id:a,index:E,items:f,newIndex:Z.current.newIndex,previousItems:Z.current.items,previousContainerId:Z.current.containerId,transition:u,wasDragging:Z.current.activeId!=null}),ie=SR({disabled:!te,index:E,node:S,rect:C});return c.useEffect(()=>{Y&&Z.current.newIndex!==F&&(Z.current.newIndex=F),d!==Z.current.containerId&&(Z.current.containerId=d),f!==Z.current.items&&(Z.current.items=f)},[Y,F,d,f]),c.useEffect(()=>{if(ee===Z.current.activeId)return;if(ee!=null&&Z.current.activeId==null){Z.current.activeId=ee;return}const Qe=setTimeout(()=>{Z.current.activeId=ee},50);return()=>clearTimeout(Qe)},[ee]),{active:P,activeIndex:p,attributes:L,data:T,rect:C,index:E,newIndex:F,items:f,isOver:N,isSorting:Y,isDragging:D,listeners:A,node:S,overIndex:y,over:j,setNodeRef:K,setActivatorNodeRef:_,setDroppableNodeRef:I,setDraggableNodeRef:k,transform:ie??$,transition:ue()};function ue(){if(ie||X&&Z.current.newIndex===E)return wR;if(!(q&&!rc(H)||!u)&&(Y||te))return Nr.Transition.toString({...u,property:Yp})}}function CR(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function Ko(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const AR=[oe.Down,oe.Right,oe.Up,oe.Left],TR=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:s,over:a,scrollableAncestors:i}}=t;if(AR.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];s.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=o.get(d.id);if(p)switch(e.code){case oe.Down:r.top<p.top&&l.push(d);break;case oe.Up:r.top>p.top&&l.push(d);break;case oe.Left:r.left>p.left&&l.push(d);break;case oe.Right:r.left<p.left&&l.push(d);break}});const u=r3({collisionRect:r,droppableRects:o,droppableContainers:l});let f=Ip(u,"id");if(f===a?.id&&u.length>1&&(f=u[1].id),f!=null){const d=s.get(n.id),p=s.get(f),m=p?o.get(p.id):null,v=p?.node.current;if(v&&m&&d&&p){const y=Cs(v).some((O,C)=>i[C]!==O),b=Qp(d,p),x=PR(d,p),w=y||!b?{x:0,y:0}:{x:x?r.width-m.width:0,y:x?r.height-m.height:0},E={x:m.left,y:m.top};return w.x&&w.y?E:_r(E,w)}}}};function Qp(e,t){return!Ko(e)||!Ko(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function PR(e,t){return!Ko(e)||!Ko(t)||!Qp(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const MR=e=>{const{data:t}=Bu({queryKey:ye.notes.list(e.searchParams),async queryFn(){const n=await Cp(e.searchParams);if(n.type==="error")throw n;return n.allNotes}});return e.render(t)},_R=e=>{const{data:t}=Bu({queryKey:ye.notes.pinned(),async queryFn(){const n=await pe(`
334
- query FetchPinnedNotes {
335
- pinnedNotes {
336
- id
337
- title
338
- order
339
- }
340
- }
341
- `);if(n.type==="error")throw n;return n.pinnedNotes}});return h.jsx(h.Fragment,{children:e.render(t)})};function NR({query:e="",limit:t=50,offset:n=0}={}){return pe(`query FetchTags(
342
- $searchFilter: SearchFilterInput,
343
- $pagination: PaginationInput
344
- ) {
345
- allTags(
346
- searchFilter: $searchFilter,
347
- pagination: $pagination
348
- ) {
349
- totalCount
350
- tags {
351
- id
352
- name
353
- referenceCount
354
- }
355
- }
356
- }`,{searchFilter:{query:e},pagination:{limit:t,offset:n}})}function G5({name:e=""}){return pe(`mutation CreateTag($name: String!) {
357
- createTag(name: $name) {
358
- id
359
- name
360
- }
361
- }`,{name:e})}const OR="focus-ring-soft flex h-8 w-8 items-center justify-center rounded-[10px] text-fg-default/70 outline-none transition-colors hover:text-fg-default active:cursor-grabbing touch-none",IR="focus-ring-soft block truncate rounded-[10px] px-1.5 py-1 outline-none transition-colors",DR=(e,t,n)=>{if(t===n)return null;const r=e.findIndex(i=>i.id===t),o=e.findIndex(i=>i.id===n);if(r<0||o<0)return null;const s=[...e],[a]=s.splice(r,1);return a?(s.splice(o,0,a),{nextItems:s,orders:s.map((i,l)=>({id:i.id,order:l}))}):null};function LR({id:e,title:t,isActive:n=!1,children:r}){const{attributes:o,listeners:s,setNodeRef:a,setActivatorNodeRef:i,transform:l,transition:u,isDragging:f}=RR({id:e}),d={transform:Nr.Transform.toString(l),transition:u,opacity:f?.5:1};return h.jsxs("div",{ref:a,style:d,className:ae("group flex min-h-[40px] items-center gap-1.5 rounded-[12px] px-1.5 py-1 transition-colors",n&&"bg-hover-subtle"),children:[h.jsx("button",{type:"button",ref:i,"aria-label":`Reorder note ${t??"Untitled"}`,...o,...s,className:ae(OR,f?"cursor-grabbing":"cursor-grab"),children:h.jsx(Gv,{className:"size-4"})}),h.jsx(se,{as:"div",truncate:!0,variant:"body",weight:"medium",className:"min-w-0 flex-1",children:r})]})}function jR({notes:e,pathname:t,pinnedItems:n,setPinnedItems:r,handleDragEnd:o,sensors:s}){c.useEffect(()=>{r(e)},[e,r]);const a=n.length>0?n:e;return a.length===0?null:h.jsx(nR,{sensors:s,collisionDetection:n3,onDragEnd:o,modifiers:[uR],children:h.jsx(vR,{items:a.map(i=>i.id),strategy:mR,children:a.map(i=>h.jsx(LR,{id:i.id,title:i.title||"Untitled",isActive:t===`/${i.id}`,children:h.jsx(Pt,{"aria-current":t===`/${i.id}`?"page":void 0,className:ae(IR,t===`/${i.id}`?"text-fg-default":"text-fg-secondary hover:bg-hover-subtle hover:text-fg-default"),to:Jn,params:{id:i.id},children:i.title||"Untitled"})},i.id))})})}const kR=()=>{const e=rs({select:i=>i.pathname}),t=Gn(),[n,r]=c.useState([]),o=Yg({mutationFn:_S,onSuccess:()=>{t.invalidateQueries({queryKey:ye.notes.pinned(),exact:!0})}}),s=e3($l(ic,{activationConstraint:{distance:8}}),$l(sc,{coordinateGetter:TR})),a=i=>{const{active:l,over:u}=i;u&&l.id!==u.id&&r(f=>{const d=DR(f,String(l.id),String(u.id));return d?(o.mutate(d.orders),d.nextItems):f})};return h.jsx("div",{className:"flex flex-col gap-1",children:h.jsx(bp,{fallback:h.jsxs("div",{className:"space-y-1",children:[h.jsx(Ht,{height:"40px",opacity:.4}),h.jsx(Ht,{height:"40px",opacity:.4})]}),errorTitle:"Failed to load pinned notes",errorDescription:"Retry loading the pinned note list.",renderError:({error:i,retry:l})=>h.jsx(Ji,{title:"Failed to load pinned notes",description:"Retry loading the pinned note list.",error:i,onRetry:l,showBackAction:!1,showHomeAction:!1}),children:h.jsx(_R,{render:i=>i.length>0?h.jsx(jR,{notes:i,pathname:e,pinnedItems:n,setPinnedItems:r,handleDragEnd:a,sensors:s}):h.jsx(se,{as:"div",variant:"meta",tone:"secondary",className:"px-2 py-2.5 leading-6",children:"Pin a note to keep it in view while the rest of the workspace changes."})})})})},FR="mb-2.5 flex items-center justify-between gap-3 px-1",$R="flex min-w-0 items-center gap-2",HR="inline-flex h-4 w-4 shrink-0 items-center justify-center text-fg-tertiary",BR=({title:e,icon:t,detail:n})=>h.jsxs("div",{className:FR,children:[h.jsxs("div",{className:$R,children:[t?h.jsx("span",{className:HR,children:t}):null,h.jsx(se,{variant:"label",weight:"medium",tone:"tertiary",children:e})]}),n?h.jsx(se,{as:"div",variant:"meta",weight:"medium",tone:"tertiary",children:n}):null]}),VR="flex flex-col gap-3.5 p-3 pt-2",ZR="focus-ring-soft surface-base group flex w-full items-center justify-between gap-2.5 px-3 py-2.5 text-left text-fg-default outline-none transition-colors hover:bg-hover-subtle",UR="flex items-center gap-2.5",qR="inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-[13px] bg-cta text-fg-on-filled",zR="flex flex-col",KR="h-4 w-4 text-fg-tertiary transition-colors group-hover:text-fg-default",WR=()=>{const{onCreate:e}=Tp();return h.jsxs("div",{className:VR,children:[h.jsxs("button",{type:"button",className:ZR,onClick:()=>e(),children:[h.jsxs("span",{className:UR,children:[h.jsx("span",{className:qR,children:h.jsx(ny,{className:"h-4.5 w-4.5",weight:"bold"})}),h.jsxs("span",{className:zR,children:[h.jsx(se,{variant:"meta",weight:"semibold",tracking:"tight",children:"Capture"}),h.jsx(se,{variant:"label",tone:"secondary",children:"Open a new note"})]})]}),h.jsx(vr,{className:KR,weight:"bold"})]}),h.jsxs("section",{className:"pt-1",children:[h.jsx(BR,{title:"Pinned",icon:h.jsx(nf,{className:"h-4 w-4",weight:"fill"})}),h.jsx(kR,{})]})]})},GR=e=>{const[t,n]=c.useState(!1),r=c.useRef(null),o=c.useRef(!0),s=c.useRef(0),a=c.useCallback(()=>{r.current!==null&&(clearTimeout(r.current),r.current=null)},[]);c.useEffect(()=>(o.current=!0,()=>{o.current=!1,a()}),[a]);const i=c.useCallback(l=>{s.current+=1;const u=s.current;a(),o.current&&n(!0),r.current=setTimeout(()=>{r.current=null,Promise.resolve().then(l).catch(()=>{}).finally(()=>{o.current&&s.current===u&&n(!1)})},e)},[a,e]);return[t,i]},YR="flex flex-col gap-2.5",QR="surface-base overflow-hidden",XR="grid-search-bar grid items-center border-b border-transparent px-2.5 py-1.5 transition-colors",JR="border-border-subtle/70 bg-muted/25",eC="hover:bg-hover-subtle/60",Xl="flex h-10 items-center justify-center text-fg-tertiary transition-colors hover:text-fg-default sm:h-8",tC="h-10 w-full bg-transparent py-2 text-meta text-fg-default outline-none placeholder:text-fg-placeholder sm:h-8 sm:py-1.5",nC="px-1 py-1.5",rC="px-2 pb-0.5 pt-1",oC="px-2 pb-0.5 pt-1.5",sC="flex min-h-10 items-center gap-2 rounded-[10px] px-2.5 py-2 transition-colors hover:bg-hover-subtle sm:min-h-0 sm:px-2 sm:py-1.5",aC="min-w-0 flex-1",iC="flex flex-wrap gap-1.5 px-1.5 py-1",cC="inline-flex items-center rounded-full border border-border-subtle bg-hover-subtle px-2 py-0.75 sm:py-0.5",lC="mt-1 border-t border-border-subtle/50 px-2 pb-0.5 pt-1.5",uC="flex min-h-9 items-center gap-1.5 text-fg-secondary transition-colors hover:text-fg-default",dC=()=>{const e=En(),[t,n]=c.useState(""),[r,o]=c.useState([]),[s,a]=c.useState([]),[,i]=GR(500);c.useEffect(()=>{if(t.length<=0){i(()=>{}),o([]),a([]);return}i(()=>{Cp({query:t,limit:5}).then(d=>{d.type==="success"&&o(d.allNotes.notes)}),NR({query:t,limit:5}).then(d=>{d.type==="success"&&a(d.allTags.tags)})})},[t,i]);const l=d=>{d?.preventDefault(),e({to:mp,search:{query:t,page:1}})},u=()=>{n("")},f=r.length>0||s.length>0;return h.jsx("div",{className:"p-3",children:h.jsx("form",{className:YR,onSubmit:l,children:h.jsxs("div",{className:QR,children:[h.jsxs("div",{className:`${XR} ${f?JR:eC}`,children:[h.jsx("button",{type:"submit",className:Xl,children:h.jsx(ty,{className:"h-4.5 w-4.5",weight:"bold"})}),h.jsx("input",{type:"text",placeholder:"Search notes or tags",value:t,onChange:d=>n(d.target.value),className:tC}),t&&h.jsx("button",{type:"button",className:Xl,onClick:u,children:h.jsx(cf,{className:"h-4 w-4",weight:"bold"})})]}),f&&h.jsxs("div",{className:nC,children:[r.length>0&&h.jsxs("div",{children:[s.length>0&&h.jsx(se,{as:"div",variant:"label",weight:"medium",tone:"tertiary",className:rC,children:"Notes"}),r.map(({id:d,title:p})=>h.jsxs(Pt,{to:Jn,params:{id:d},className:sC,children:[h.jsx(Xv,{className:"h-3.5 w-3.5 shrink-0 text-fg-tertiary"}),h.jsx(se,{as:"span",truncate:!0,variant:"meta",weight:"medium",className:aC,children:p||"Untitled"})]},d))]}),s.length>0&&h.jsxs("div",{children:[r.length>0&&h.jsx(se,{as:"div",variant:"label",weight:"medium",tone:"tertiary",className:oC,children:"Tags"}),h.jsx("div",{className:iC,children:s.map(({id:d,name:p})=>h.jsx(Pt,{to:Xi,params:{id:d},search:{page:1},children:h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"secondary",className:cC,children:p})},d))})]}),h.jsx("div",{className:lC,children:h.jsxs("button",{type:"submit",className:uC,children:[h.jsx(se,{as:"span",variant:"meta",weight:"medium",className:"text-current",children:"View all results"}),h.jsx(vr,{className:"h-3.5 w-3.5",weight:"bold"})]})})]})]})})})},fC=[{name:"Notes",path:Kr,icon:Qd},{name:"Views",path:dp,icon:Qv},{name:"Graph",path:pp,icon:ay},{name:"Calendar",path:fp,icon:zv},{name:"Reminders",path:hp,icon:qv},{name:"Tags",path:gp,icon:sy},{name:"Setting",path:vp,icon:Jv}],hC=()=>{const e=rs({select:t=>t.pathname});return h.jsx("nav",{"aria-label":"Primary navigation",className:"flex items-center gap-1 px-4 py-2.5",children:fC.map((t,n)=>{const r=e===t.path||t.path!==Kr&&e.startsWith(`${t.path}/`);return h.jsxs(c.Fragment,{children:[n>0&&h.jsx("span",{className:"h-3.5 w-px shrink-0 bg-border-subtle"}),h.jsx(Pt,{to:t.path,children:h.jsxs("div",{className:`flex min-w-26 items-center justify-center gap-2 border-b px-2 py-2 transition-colors ${r?"border-fg-muted text-fg-default":"border-transparent text-fg-secondary hover:border-border-subtle hover:text-fg-default"}`,children:[h.jsx(t.icon,{className:"size-5",weight:r?"fill":"regular"}),h.jsx(se,{as:"span",variant:"meta",weight:"medium",className:"text-current",children:t.name})]})})]},t.path)})})},pC=({children:e})=>h.jsx(pS,{sidebar:h.jsxs(h.Fragment,{children:[h.jsx(ES,{}),h.jsx(dC,{}),h.jsx(oS,{}),h.jsx(WR,{})]}),topNavigation:h.jsx(hC,{}),children:e}),mC=["updatedAt","createdAt"],gC=["asc","desc"],vC=["create","update"],Ps=e=>Array.isArray(e)?e[0]:e,wn=(e,t,{min:n=1,max:r=Number.MAX_SAFE_INTEGER}={})=>{const o=Ps(e),s=typeof o=="number"?o:typeof o=="string"?Number(o):Number.NaN;return!Number.isInteger(s)||s<n||s>r?t:s},yC=(e,t,n)=>{const r=wn(e,Number.NaN);return t.includes(r)?r:n},bC=(e,t=!1)=>{const n=Ps(e);return n===!0||n==="true"?!0:n===!1||n==="false"?!1:t},Xp=(e,t="")=>{const n=Ps(e);return typeof n=="string"?n:t},Xa=(e,t,n)=>{const r=Ps(e);return typeof r!="string"?n:t.includes(r)?r:n},xC=e=>({page:wn(e.page,1),limit:yC(e.limit,Qi,Es),sortBy:Xa(e.sortBy,mC,"updatedAt"),sortOrder:Xa(e.sortOrder,gC,"desc"),pinnedFirst:bC(e.pinnedFirst,!1)}),Cn=e=>({page:wn(e.page,1)}),wC=e=>({page:wn(e.page,1),query:Xp(e.query,"")}),EC=e=>({year:wn(e.year,He().year(),{min:1970,max:9999}),month:wn(e.month,He().month()+1,{min:1,max:12}),type:Xa(e.type,vC,"create")}),SC=e=>({page:wn(e.page,1),sectionId:Xp(e.sectionId,"")}),Jl=Jm(Kr);function RC(){const e=Jl.useNavigate(),{limit:t,page:n,sortBy:r,sortOrder:o,pinnedFirst:s}=Jl.useSearch(),{onDelete:a,onPinned:i,deleteWarningDialog:l}=Tp(),u=f=>{e({search:d=>({...d,...f})})};return h.jsxs(Ss,{title:"",variant:"none",children:[h.jsxs("div",{className:"flex flex-col gap-5",children:[h.jsx(eE,{itemsPerPage:t,onItemsPerPageChange:f=>u({limit:f,page:1}),sortBy:r,onSortByChange:f=>u({sortBy:f,page:1}),sortOrder:o,onSortOrderChange:f=>u({sortOrder:f,page:1}),pinnedFirst:s,onPinnedFirstChange:f=>u({pinnedFirst:f,page:1})}),h.jsx(bp,{fallback:h.jsxs("div",{className:"grid-auto-cards grid gap-5",children:[h.jsx(Ht,{height:"112px"}),h.jsx(Ht,{height:"112px"}),h.jsx(Ht,{height:"112px"})]}),errorTitle:"Failed to load notes",errorDescription:"Retry loading the current note list.",resetKeys:[n,t,r,o,s],children:h.jsx(MR,{searchParams:{offset:(n-1)*t,limit:t,sortBy:r,sortOrder:o,pinnedFirst:s},render:({notes:f,totalCount:d})=>h.jsx(Sl,{fallback:h.jsx(hh,{title:"Ocean is calm",description:"Capture anything and make waves in the ocean!"}),children:f.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"grid-auto-cards grid gap-5",children:f.map(p=>h.jsx(NS,{...p,onPinned:()=>i(p.id,p.pinned),onDelete:()=>a(p.id)},p.id))}),h.jsx(Sl,{fallback:null,children:d&&t<d&&h.jsx(mh,{page:n,last:Math.ceil(d/t),onChange:p=>{u({page:p})}})})]})})})})]}),l]})}const De=rg({component:()=>h.jsx(pC,{children:h.jsx(Au,{})}),errorComponent:qE,notFoundComponent:zE}),CC=Ie({getParentRoute:()=>De,path:Kr,component:RC,validateSearch:xC}),AC=Ie({getParentRoute:()=>De,path:fp,component:Ue(()=>Ze(()=>import("./Calendar-Bc2zJueR.js"),__vite__mapDeps([0,1,2,3,4]))),pendingComponent:()=>h.jsx(ke,{title:"Loading calendar",description:"Preparing note and reminder snapshots."}),validateSearch:EC}),TC=Ie({getParentRoute:()=>De,path:dp,component:Ue(()=>Ze(()=>import("./Views-eYFtsdFj.js"),__vite__mapDeps([5,1,2,3,6,7,8]))),pendingComponent:()=>h.jsx(ke,{title:"Loading views",description:"Preparing your saved dashboards."})}),PC=Ie({getParentRoute:()=>De,path:hp,component:Ue(()=>Ze(()=>import("./Reminders-lj7Equld.js"),__vite__mapDeps([9,1,2,3,10]))),pendingComponent:()=>h.jsx(ke,{title:"Loading reminders",description:"Collecting upcoming reminder cards."}),validateSearch:Cn}),MC=Ie({getParentRoute:()=>De,path:pp,component:Ue(()=>Ze(()=>import("./Graph-uq5jfJgt.js"),__vite__mapDeps([11,1,2,3]))),pendingComponent:()=>h.jsx(ke,{title:"Loading graph",description:"Preparing the linked note constellation."})}),_C=Ie({getParentRoute:()=>De,path:mp,component:Ue(()=>Ze(()=>import("./Search-1wcRO5--.js"),__vite__mapDeps([12,1,2,3]))),pendingComponent:()=>h.jsx(ke,{title:"Loading search",description:"Preparing indexed note results."}),validateSearch:wC}),NC=Ie({getParentRoute:()=>De,path:gp,component:Ue(()=>Ze(()=>import("./Tag-CeygwFfv.js"),__vite__mapDeps([13,1,2,3]))),pendingComponent:()=>h.jsx(ke,{title:"Loading tags",description:"Preparing the tag catalog."}),validateSearch:Cn}),OC=Ie({getParentRoute:()=>De,path:Jn,component:Ue(()=>Ze(()=>import("./Note-Bo8ZYRP-.js"),__vite__mapDeps([14,1,2,3,4,7,10,8,15]))),pendingComponent:()=>h.jsx(ke,{title:"Loading note",description:"Preparing the editor and note content."})}),IC=Ie({getParentRoute:()=>De,path:Xi,component:Ue(()=>Ze(()=>import("./TagNotes-B8DqItxw.js"),__vite__mapDeps([16,1,2,3]))),pendingComponent:()=>h.jsx(ke,{title:"Loading tagged notes",description:"Preparing notes for the selected tag."}),validateSearch:Cn}),DC=Ie({getParentRoute:()=>De,path:jE,component:Ue(()=>Ze(()=>import("./ViewNotes-BH7PbdOD.js"),__vite__mapDeps([17,1,2,3,6]))),pendingComponent:()=>h.jsx(ke,{title:"Loading view notes",description:"Preparing notes for this saved view section."}),validateSearch:SC}),LC=Ie({getParentRoute:()=>De,path:vp,component:Ue(()=>Ze(()=>import("./index-D3BfroIT.js"),__vite__mapDeps([18,1,2,3,19,20]))),pendingComponent:()=>h.jsx(ke,{title:"Loading settings",description:"Preparing workspace preferences."})}),jC=Ie({getParentRoute:()=>De,path:kE,component:Ue(()=>Ze(()=>import("./mcp-DHHhTLC8.js"),__vite__mapDeps([21,1,2,3,7]))),pendingComponent:()=>h.jsx(ke,{title:"Loading MCP settings",description:"Preparing MCP access controls."})}),kC=Ie({getParentRoute:()=>De,path:FE,component:Ue(()=>Ze(()=>import("./trash-DA27aW7L.js"),__vite__mapDeps([22,1,2,3,7]))),pendingComponent:()=>h.jsx(ke,{title:"Loading trash",description:"Preparing deleted notes for restore."}),validateSearch:Cn}),FC=Ie({getParentRoute:()=>De,path:$E,component:Ue(()=>Ze(()=>import("./manage-image-C0YwkLIP.js"),__vite__mapDeps([23,1,2,3,15,24,7,19]))),pendingComponent:()=>h.jsx(ke,{title:"Loading image manager",description:"Preparing uploaded image metadata."}),validateSearch:Cn}),$C=Ie({getParentRoute:()=>De,path:HE,component:Ue(()=>Ze(()=>import("./manage-image-detail-C8Q7K7I3.js"),__vite__mapDeps([25,1,2,3,15,24,7,19,20]))),pendingComponent:()=>h.jsx(ke,{title:"Loading image detail",description:"Preparing references for the selected image."})}),HC=Ie({getParentRoute:()=>De,path:VE,component:Ue(()=>Ze(()=>import("./properties-CvYWJWUM.js"),__vite__mapDeps([26,1,2,3]))),pendingComponent:()=>h.jsx(ke,{title:"Loading properties",description:"Preparing shared property definitions."}),validateSearch:Cn}),BC=Ie({getParentRoute:()=>De,path:BE,component:Ue(()=>Ze(()=>import("./placeholder-Cr_nI8UI.js"),__vite__mapDeps([27,1,2,3,7,8]))),pendingComponent:()=>h.jsx(ke,{title:"Loading placeholders",description:"Preparing template replacement rules."}),validateSearch:Cn}),VC=De.addChildren([CC,TC,AC,PC,MC,_C,NC,OC,IC,DC,LC,jC,kC,FC,$C,BC,HC]),ZC=dg({routeTree:VC,defaultPendingComponent:()=>h.jsx(ke,{title:"Loading page",description:"Preparing the next route."})});function UC(){const e=Zo(n=>n.setSystemTheme),t=Zo(n=>n.setTheme);return c.useEffect(()=>{const n=Vo();return n&&t(n),g1.listenThemeChange(r=>{Vo()||e(r?"dark":"light")},n==null)},[e,t]),h.jsx(ob,{children:h.jsx(pg,{router:ZC})})}const Jp="__oceanBrainCsrfRetry";let ua;const qC=e=>!fe.isAxiosError(e)||e.response?.status!==403?!1:e.response.data?.code==="CSRF_TOKEN_INVALID",e1=e=>{if(!qC(e)||!fe.isAxiosError(e))return!1;const t=e.config;return!!(t&&!t[Jp])},zC=()=>(ua??=jo().finally(()=>{ua=void 0}),ua),eu=(e,t)=>{if(!e)return;const n=e;if(typeof n.delete=="function"){n.delete(t);return}delete e[t]},KC=e=>{eu(e.headers,"X-XSRF-TOKEN"),eu(e.headers,"x-xsrf-token")},WC=async e=>{if(!e1(e)||!fe.isAxiosError(e))return Promise.reject(e);const t=e.config;return t[Jp]=!0,await zC()!=="active"?Promise.reject(e):(KC(t),fe.request(t))};let tu;const GC=()=>{tu===void 0&&(tu=fe.interceptors.response.use(e=>e,e=>{if(j8(e))Df();else if(e1(e))return WC(e);return Promise.reject(e)}))};Zo.setState({theme:rS()});GC();jo();f1.createRoot(document.getElementById("root")).render(h.jsx(M.StrictMode,{children:h.jsx(UC,{})}));export{Nr as $,e3 as A,bt as B,fp as C,ax as D,$l as E,TR as F,ic as G,_5 as H,cx as I,hh as J,sc as K,Pt as L,Ft as M,Jn as N,nR as O,Ss as P,K5 as Q,n3 as R,bo as S,se as T,vR as U,jE as V,W5 as W,uR as X,mR as Y,RR as Z,Gv as _,qv as a,wS as a$,bp as a0,mh as a1,hp as a2,Ji as a3,En as a4,Zo as a5,Bu as a6,U5 as a7,cf as a8,MR as a9,kl as aA,D5 as aB,J4 as aC,ex as aD,uh as aE,sx as aF,fh as aG,dh as aH,VE as aI,Jv as aJ,sy as aK,T5 as aL,NS as aM,kE as aN,$E as aO,BE as aP,ny as aQ,fe as aR,lw as aS,H5 as aT,V5 as aU,Z5 as aV,OS as aW,B5 as aX,HE as aY,Ua as aZ,M5 as a_,mp as aa,Es as ab,Sl as ac,Xi as ad,gp as ae,Ge as af,j5 as ag,Yg as ah,$5 as ai,F5 as aj,k5 as ak,AS as al,Kv as am,ey as an,Cp as ao,G5 as ap,L5 as aq,R5 as ar,P5 as as,z5 as at,tb as au,Tp as av,FE as aw,nf as ax,q5 as ay,TS as az,zv as b,A5 as b0,N5 as b1,O5 as b2,I5 as b3,kS as b4,FS as b5,$S as b6,je as b7,ae as c,He as d,Fn as e,Ws as f,vr as g,pe as h,Ht as i,Jm as j,Gn as k,fx as l,ff as m,ph as n,Ew as o,Ae as p,ye as q,Sw as r,Xv as s,Ap as t,Gg as u,Bf as v,dw as w,Xw as x,uf as y,NR as z};