ocean-brain 0.4.0 → 0.4.1

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 (62) hide show
  1. package/dist/index.js +5 -0
  2. package/package.json +2 -1
  3. package/server/client/dist/assets/{Calendar-CSXEuWmQ.js → Calendar-D4KkvcU8.js} +1 -1
  4. package/server/client/dist/assets/{Callout-Ap1OcxWN.js → Callout-CaSzc-1y.js} +1 -1
  5. package/server/client/dist/assets/{Graph-C0Ax9qjI.js → Graph-C8pBdJzV.js} +1 -1
  6. package/server/client/dist/assets/{Image-CSbcG-5a.js → Image-DlJ4MDo3.js} +1 -1
  7. package/server/client/dist/assets/{Image.es-Fbe7aDDo.js → Image.es-C8g5NwNt.js} +1 -1
  8. package/server/client/dist/assets/Note-ODOESft3.js +21 -0
  9. package/server/client/dist/assets/Plus.es-Bkl1ZXE0.js +1 -0
  10. package/server/client/dist/assets/Reminders-FrTR9ny8.js +1 -0
  11. package/server/client/dist/assets/Search-BPf2LO1Y.js +1 -0
  12. package/server/client/dist/assets/{SurfaceCard-Br6TjX5W.js → SurfaceCard-WSk7zWeM.js} +1 -1
  13. package/server/client/dist/assets/Tag-uArdLjo1.js +1 -0
  14. package/server/client/dist/assets/TagNotes-DDvXHB9I.js +1 -0
  15. package/server/client/dist/assets/{Trash.es-BfCEiL3-.js → Trash.es-DumPfiUz.js} +1 -1
  16. package/server/client/dist/assets/ViewNotes-BVu9lEs-.js +1 -0
  17. package/server/client/dist/assets/Views-D4LGh30P.js +1 -0
  18. package/server/client/dist/assets/{image.api-DGXlQ_Ca.js → image.api-D3Ei3fbf.js} +1 -1
  19. package/server/client/dist/assets/index-46ZUXbW5.js +232 -0
  20. package/server/client/dist/assets/{index-B28TO4FC.js → index-C7YGbIuA.js} +1 -1
  21. package/server/client/dist/assets/{index-Bm9l_L20.css → index-D2gRB1ig.css} +1 -1
  22. package/server/client/dist/assets/manage-image-DiuREdeE.js +1 -0
  23. package/server/client/dist/assets/{manage-image-detail-hk6jWyiB.js → manage-image-detail-D8Eorq3u.js} +1 -1
  24. package/server/client/dist/assets/{mcp-CSjmBjFR.js → mcp-CvCGaYSz.js} +1 -1
  25. package/server/client/dist/assets/{note-vendor-5N5mRkIT.js → note-vendor-B0t5F04o.js} +3 -3
  26. package/server/client/dist/assets/{placeholder-Bmiowo28.js → placeholder-znZDfNAE.js} +4 -4
  27. package/server/client/dist/assets/trash-R0sww0ur.js +1 -0
  28. package/server/client/dist/assets/{useReminderMutate-DsIvVpCQ.js → useReminderMutate-Bkj-oIm4.js} +2 -2
  29. package/server/client/dist/assets/{view-dashboard-CP8nhfxQ.js → view-dashboard-ClpF_qLM.js} +1 -1
  30. package/server/client/dist/index.html +3 -3
  31. package/server/dist/app.js +1 -1
  32. package/server/dist/app.js.map +1 -1
  33. package/server/dist/features/auth/http/api.js +2 -5
  34. package/server/dist/features/auth/http/api.js.map +1 -1
  35. package/server/dist/features/auth/http/login-page.js +1 -1
  36. package/server/dist/features/auth/http/pages.js +1 -1
  37. package/server/dist/features/auth/http/pages.js.map +1 -1
  38. package/server/dist/features/auth/service.js +11 -42
  39. package/server/dist/features/auth/service.js.map +1 -1
  40. package/server/dist/features/note/graphql/note.query.resolver.js +4 -1
  41. package/server/dist/features/note/graphql/note.query.resolver.js.map +1 -1
  42. package/server/dist/features/note/graphql/note.type-defs.js +3 -0
  43. package/server/dist/features/note/graphql/note.type-defs.js.map +1 -1
  44. package/server/dist/features/note/services/trash.js +37 -12
  45. package/server/dist/features/note/services/trash.js.map +1 -1
  46. package/server/dist/modules/auth-guard.js +13 -19
  47. package/server/dist/modules/auth-guard.js.map +1 -1
  48. package/server/dist/modules/auth-mode.js +16 -39
  49. package/server/dist/modules/auth-mode.js.map +1 -1
  50. package/server/dist/routes/client.js +2 -2
  51. package/server/dist/routes/client.js.map +1 -1
  52. package/server/client/dist/assets/ModalActionRow-DjI5b4bl.js +0 -1
  53. package/server/client/dist/assets/Note-BY6WgYLq.js +0 -1
  54. package/server/client/dist/assets/Reminders-vRksvSQE.js +0 -1
  55. package/server/client/dist/assets/Search-Cq4tuiJO.js +0 -1
  56. package/server/client/dist/assets/Tag-ARDLA-Pb.js +0 -1
  57. package/server/client/dist/assets/TagNotes-CDGVrCJU.js +0 -1
  58. package/server/client/dist/assets/ViewNotes-ZBOQ1adH.js +0 -1
  59. package/server/client/dist/assets/Views-DQHPfdwM.js +0 -1
  60. package/server/client/dist/assets/index-Bsx4P7EA.js +0 -210
  61. package/server/client/dist/assets/manage-image-Dg297A_h.js +0 -1
  62. package/server/client/dist/assets/trash-CM7SbVtW.js +0 -1
@@ -1,210 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Calendar-CSXEuWmQ.js","assets/note-vendor-5N5mRkIT.js","assets/graph-vendor-CUxe67Lr.js","assets/note-core-GgFcksAF.js","assets/Callout-Ap1OcxWN.js","assets/Views-DQHPfdwM.js","assets/view-dashboard-CP8nhfxQ.js","assets/SurfaceCard-Br6TjX5W.js","assets/ModalActionRow-DjI5b4bl.js","assets/Reminders-vRksvSQE.js","assets/useReminderMutate-DsIvVpCQ.js","assets/Graph-C0Ax9qjI.js","assets/Search-Cq4tuiJO.js","assets/Tag-ARDLA-Pb.js","assets/Note-BY6WgYLq.js","assets/image.api-DGXlQ_Ca.js","assets/Note-W4f6H9K0.css","assets/TagNotes-CDGVrCJU.js","assets/ViewNotes-ZBOQ1adH.js","assets/index-B28TO4FC.js","assets/Trash.es-BfCEiL3-.js","assets/Image.es-Fbe7aDDo.js","assets/mcp-CSjmBjFR.js","assets/trash-CM7SbVtW.js","assets/manage-image-Dg297A_h.js","assets/Image-CSbcG-5a.js","assets/manage-image-detail-hk6jWyiB.js","assets/placeholder-Bmiowo28.js"])))=>i.map(i=>d[i]);
2
- import{j as h,w as Zh,r as wt,c as Uh,R as qh,a as Ea,u as zh,o as Kh,s as Wh,f as Gh,b as Qh,d as Yh,h as Xh,e as Jh,l as e1,_ as Le,g as t1}from"./note-vendor-5N5mRkIT.js";import{a as c,R as No,N as K,g as Nn,r as n1,P as fe}from"./graph-vendor-CUxe67Lr.js";import"./note-core-GgFcksAF.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 Sa={DARK:"(prefers-color-scheme: dark)",LIGHT:"(prefers-color-scheme: light)",RETINA:"(min-resolution: 2dppx)",RESPONSIVE:e=>`screen and (max-width: ${e})`},wl=e=>typeof window<"u"&&window.matchMedia?window.matchMedia(e):null,Ra=(e,t,n=!0)=>{const r=wl(e);n&&t(r?.matches||!1);const o=s=>{t?.(s.matches)};return r?.addEventListener("change",o),()=>{r?.removeEventListener("change",o)}},r1=(e,t=!0)=>Ra(Sa.DARK,e,t),o1=(e,t,n=!0)=>Ra(Sa.RESPONSIVE(e),t,n),s1={MEDIA_QUERY:Sa,listenThemeChange:r1,listenResponsiveChange:o1,createMediaQuery:wl,listenMediaQueryChange:Ra};var pe=(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))(pe||{});function El({update:e,notify:t,unwatched:n}){return{link:r,unlink:o,propagate:s,checkDirty:a,shallowPropagate:i};function r(u,d,f){const p=d.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:d.deps;if(m!==void 0&&m.dep===u){m.version=f,d.depsTail=m;return}const g=u.subsTail;if(g!==void 0&&g.version===f&&g.sub===d)return;const v=d.depsTail=u.subsTail={version:f,dep:u,sub:d,prevDep:p,nextDep:m,prevSub:g,nextSub:void 0};m!==void 0&&(m.prevDep=v),p!==void 0?p.nextDep=v:d.deps=v,g!==void 0?g.nextSub=v:u.subs=v}function o(u,d=u.sub){const f=u.dep,p=u.prevDep,m=u.nextDep,g=u.nextSub,v=u.prevSub;return m!==void 0?m.prevDep=p:d.depsTail=p,p!==void 0?p.nextDep=m:d.deps=m,g!==void 0?g.prevSub=v:f.subsTail=v,v!==void 0?v.nextSub=g:(f.subs=g)===void 0&&n(f),m}function s(u){let d=u.nextSub,f;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 g=p.subs;if(g!==void 0){const v=(u=g).nextSub;v!==void 0&&(f={value:d,prev:f},d=v);continue}}if((u=d)!==void 0){d=u.nextSub;continue}for(;f!==void 0;)if(u=f.value,f=f.prev,u!==void 0){d=u.nextSub;continue e}break}while(!0)}function a(u,d){let f,p=0,m=!1;e:do{const g=u.dep,v=g.flags;if(d.flags&16)m=!0;else if((v&17)===17){if(e(g)){const y=g.subs;y.nextSub!==void 0&&i(y),m=!0}}else if((v&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(f={value:u,prev:f}),u=g.deps,d=g,++p;continue}if(!m){const y=u.nextDep;if(y!==void 0){u=y;continue}}for(;p--;){const y=d.subs,b=y.nextSub!==void 0;if(b?(u=f.value,f=f.prev):u=y,m){if(e(d)){b&&i(y),d=u.sub;continue}m=!1}else d.flags&=-33;d=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return m}while(!0)}function i(u){do{const d=u.sub,f=d.flags;(f&48)===32&&(d.flags=f|16,(f&6)===2&&t(d))}while((u=u.nextSub)!==void 0)}function l(u,d){let f=d.depsTail;for(;f!==void 0;){if(f===u)return!0;f=f.prevDep}return!1}}let Ca=0,Ut=0,er=0;const xt=[],{link:KE,unlink:Sl,propagate:WE,checkDirty:a1,shallowPropagate:GE}=El({update(e){return e.depsTail!==void 0?u1(e):d1(e)},notify(e){let t=er,n=t;do if(xt[t++]=e,e.flags&=-3,e=e.subs?.sub,e===void 0||!(e.flags&2))break;while(!0);for(er=t;n<--t;){const r=xt[n];xt[n++]=xt[t],xt[t]=r}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Oo(e)):p1.call(e)}});function i1(){return Ca}function c1(){++Ca}function l1(){--Ca||h1()}function u1(e){e.depsTail=void 0,e.flags=5;try{const t=e.value;return t!==(e.value=e.getter(t))}finally{e.flags&=-5,Oo(e)}}function d1(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function f1(e){const t=e.flags;if(t&16||t&32&&a1(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,Oo(e)}}else e.flags=2}function h1(){try{for(;Ut<er;){const e=xt[Ut];xt[Ut++]=void 0,f1(e)}}finally{for(;Ut<er;){const e=xt[Ut];xt[Ut++]=void 0,e.flags|=10}Ut=0,er=0}}function p1(){this.depsTail=void 0,this.flags=0,Oo(this);const e=this.subs;e!==void 0&&Sl(e)}function Oo(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=Sl(n,e)}function Aa(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 Hs=[];let Qr=0;const{link:Pi,unlink:m1,propagate:g1,checkDirty:Rl,shallowPropagate:Ti}=El({update(e){return e._update()},notify(e){Hs[$s++]=e,e.flags&=~pe.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=pe.Mutable|pe.Dirty,so(e))}});let Hr=0,$s=0,ut;function so(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=m1(n,e)}function Cl(){if(!(i1()>0)){for(;Hr<$s;){const e=Hs[Hr];Hs[Hr++]=void 0,e.notify()}Hr=0,$s=0}}function Al(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?pe.None:pe.Mutable,get(){return ut!==void 0&&Pi(o,ut,Qr),o._snapshot},subscribe(s){const a=Aa(s),i={current:!1},l=v1(()=>{o.get(),i.current?a.next?.(o._snapshot):i.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(s){const a=ut,i=Object.is;if(n)ut=o,++Qr,o.depsTail=void 0;else if(s===void 0)return!1;n&&(o.flags=pe.Mutable|pe.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{ut=a,n&&(o.flags&=~pe.RecursedCheck),so(o)}}};return n?(o.flags=pe.Mutable|pe.Dirty,o.get=function(){const s=o.flags;if(s&pe.Dirty||s&pe.Pending&&Rl(o.deps,o)){if(o._update()){const a=o.subs;a!==void 0&&Ti(a)}}else s&pe.Pending&&(o.flags=s&~pe.Pending);return ut!==void 0&&Pi(o,ut,Qr),o._snapshot}):o.set=function(s){if(o._update(s)){const a=o.subs;a!==void 0&&(g1(a),Ti(a),Cl())}},o}function v1(e){const t=()=>{const r=ut;ut=n,++Qr,n.depsTail=void 0,n.flags=pe.Watching|pe.RecursedCheck;try{return e()}finally{ut=r,n.flags&=~pe.RecursedCheck,so(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:pe.Watching|pe.RecursedCheck,notify(){const r=this.flags;r&pe.Dirty||r&pe.Pending&&Rl(this.deps,this)?t():this.flags=pe.Watching},stop(){this.flags=pe.None,this.depsTail=void 0,so(this)}};return t(),n}class y1{constructor(t){this.atom=Al(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(Aa(t))}}class b1{constructor(t){this.atom=Al(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(Aa(t))}}function x1(e){return typeof e=="function"?new b1(e):new y1(e)}function w1(e){try{c1(),e()}finally{l1(),Cl()}}const jt="__TSR_index",Mi="popstate",_i="beforeunload";function E1(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 d=e.getBlockers?.()??[],f=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&d.length&&f)for(const p of d){const m=ao(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[jt];i=Ni(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[jt];i=Ni(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[jt]!==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 Ni(e,t){t||(t={});const n=Pa();return{...t,key:n,__TSR_key:n,[jt]:e}}function S1(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=(()=>ao(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const S=Pa();t.history.replaceState({[jt]:0,key:S,__TSR_key:S},"")}let u=l(),d,f=!1,p=!1,m=!1,g=!1;const v=()=>u;let y,b;const x=()=>{y&&(R._ignoreSubscribers=!0,(y.isPush?t.history.pushState:t.history.replaceState)(y.state,"",y.href),R._ignoreSubscribers=!1,y=void 0,b=void 0,d=void 0)},w=(S,M,I)=>{const T=i(M);b||(d=u),u=ao(M,I),y={href:T,state:I,isPush:y?.isPush||S==="push"},b||(b=Promise.resolve().then(()=>x()))},E=S=>{u=l(),R.notify({type:S})},C=async()=>{if(p){p=!1;return}const S=l(),M=S.state[jt]-u.state[jt],I=M===1,T=M===-1,F=!I&&!T||f;f=!1;const B=F?"GO":T?"BACK":"FORWARD",L=F?{type:"GO",index:M}:{type:T?"BACK":"FORWARD"};if(m)m=!1;else{const D=s();if(typeof document<"u"&&D.length){for(const P of D)if(await P.blockerFn({currentLocation:u,nextLocation:S,action:B})){p=!0,t.history.go(1),R.notify(L);return}}}u=l(),R.notify(L)},N=S=>{if(g){g=!1;return}let M=!1;const I=s();if(typeof document<"u"&&I.length)for(const T of I){const F=T.enableBeforeUnload??!0;if(F===!0){M=!0;break}if(typeof F=="function"&&F()===!0){M=!0;break}}if(M)return S.preventDefault(),S.returnValue=""},R=E1({getLocation:v,getLength:()=>t.history.length,pushState:(S,M)=>w("push",S,M),replaceState:(S,M)=>w("replace",S,M),back:S=>(S&&(m=!0),g=!0,t.history.back()),forward:S=>{S&&(m=!0),g=!0,t.history.forward()},go:S=>{f=!0,t.history.go(S)},createHref:S=>i(S),flush:x,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(_i,N,{capture:!0}),t.removeEventListener(Mi,C)},onBlocked:()=>{d&&u!==d&&(u=d)},getBlockers:s,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(_i,N,{capture:!0}),t.addEventListener(Mi,C),t.history.pushState=function(...S){const M=n.apply(t.history,S);return R._ignoreSubscribers||E("PUSH"),M},t.history.replaceState=function(...S){const M=r.apply(t.history,S);return R._ignoreSubscribers||E("REPLACE"),M},R}function R1(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function ao(e,t){const n=R1(e),r=n.indexOf("#"),o=n.indexOf("?"),s=Pa();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||{[jt]:0,key:s,__TSR_key:s}}}function Pa(){return(Math.random()+1).toString(36).substring(7)}const C1=!1;function tr(e){let t;return w1(()=>{t=e()}),t}function ar(e){return e[e.length-1]}function A1(e){return typeof e=="function"}function Lt(e,t){return A1(e)?e(t):e}const P1=Object.prototype.hasOwnProperty,Oi=Object.prototype.propertyIsEnumerable;function ze(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,o=Di(e)&&Di(r);if(!o&&!(io(e)&&io(r)))return r;const s=o?e:Ii(e);if(!s)return r;const a=o?r:Ii(r);if(!a)return r;const i=s.length,l=a.length,u=o?new Array(l):{};let d=0;for(let f=0;f<l;f++){const p=o?f:a[f],m=e[p],g=r[p];if(m===g){u[p]=m,(o?f<i:P1.call(e,p))&&d++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){u[p]=g;continue}const v=ze(m,g,n+1);u[p]=v,v===m&&d++}return i===l&&d===i?e:u}function Ii(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!Oi.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(!Oi.call(e,o))return!1;r.push(o)}return r}function io(e){if(!Li(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Li(n)||!n.hasOwnProperty("isPrototypeOf"))}function Li(e){return Object.prototype.toString.call(e)==="[object Object]"}function Di(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Yt(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(!Yt(e[r],t[r],n))return!1;return!0}if(io(e)&&io(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in t)if((!r||t[a]!==void 0)&&!Yt(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||!Yt(e[a],t[a],n)))return!1;return o===s}return!1}function An(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 T1(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 ir(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function M1(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function ji(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 M1(t)}const _1=["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 qn(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+=ji(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+ji(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function N1(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var O1="Invariant failed";function Ht(e,t){if(!e)throw new Error(O1)}function lo(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 Pn=0,nn=1,rn=2,cr=3,zt=4,Pl=5;function I1(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 Ta(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]=Pn,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]=rn,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}if(s.charCodeAt(0)===36)return n[0]=nn,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const a=I1(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 d=i+3,f=l;if(d<f)return n[0]=cr,n[1]=t+i,n[2]=t+d,n[3]=t+f,n[4]=t+l+1,n[5]=o,n}}else if(u===36){const d=i+1,f=i+2;return f===l?(n[0]=rn,n[1]=t+i,n[2]=t+d,n[3]=t+f,n[4]=t+l+1,n[5]=e.length,n):(n[0]=nn,n[1]=t+i,n[2]=t+f,n[3]=t+l,n[4]=t+l+1,n[5]=o,n)}}return n[0]=Pn,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function Io(e,t,n,r,o,s,a){a?.(n);let i=r;{const l=n.fullPath??n.from,u=l.length,d=n.options?.caseSensitive??e,f=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;i<u;){const m=Ta(l,i,t);let g;const v=i,y=m[5];switch(i=y+1,s++,m[0]){case Pn:{const x=l.substring(m[2],m[3]);if(d){const w=o.static?.get(x);if(w)g=w;else{o.static??=new Map;const E=Kt(n.fullPath??n.from);E.parent=o,E.depth=s,g=E,o.static.set(x,E)}}else{const w=x.toLowerCase(),E=o.staticInsensitive?.get(w);if(E)g=E;else{o.staticInsensitive??=new Map;const C=Kt(n.fullPath??n.from);C.parent=o,C.depth=s,g=C,o.staticInsensitive.set(w,C)}}break}case nn:{const x=l.substring(v,m[1]),w=l.substring(m[4],y),E=d&&!!(x||w),C=x?E?x:x.toLowerCase():void 0,N=w?E?w:w.toLowerCase():void 0,R=!f&&o.dynamic?.find(S=>!S.skipOnParamError&&S.caseSensitive===E&&S.prefix===C&&S.suffix===N);if(R)g=R;else{const S=fs(nn,n.fullPath??n.from,E,C,N);g=S,S.depth=s,S.parent=o,o.dynamic??=[],o.dynamic.push(S)}break}case cr:{const x=l.substring(v,m[1]),w=l.substring(m[4],y),E=d&&!!(x||w),C=x?E?x:x.toLowerCase():void 0,N=w?E?w:w.toLowerCase():void 0,R=!f&&o.optional?.find(S=>!S.skipOnParamError&&S.caseSensitive===E&&S.prefix===C&&S.suffix===N);if(R)g=R;else{const S=fs(cr,n.fullPath??n.from,E,C,N);g=S,S.parent=o,S.depth=s,o.optional??=[],o.optional.push(S)}break}case rn:{const x=l.substring(v,m[1]),w=l.substring(m[4],y),E=d&&!!(x||w),C=x?E?x:x.toLowerCase():void 0,N=w?E?w:w.toLowerCase():void 0,R=fs(rn,n.fullPath??n.from,E,C,N);g=R,R.parent=o,R.depth=s,o.wildcard??=[],o.wildcard.push(R)}}o=g}if(f&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const m=Kt(n.fullPath??n.from);m.kind=Pl,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=Kt(n.fullPath??n.from);m.kind=zt,m.parent=o,s++,m.depth=s,o.index=m,o=m}o.parse=n.options?.params?.parse??null,o.skipOnParamError=f,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)Io(e,t,l,i,o,s,a)}function ds(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 Ot(e){if(e.pathless)for(const t of e.pathless)Ot(t);if(e.static)for(const t of e.static.values())Ot(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Ot(t);if(e.dynamic?.length){e.dynamic.sort(ds);for(const t of e.dynamic)Ot(t)}if(e.optional?.length){e.optional.sort(ds);for(const t of e.optional)Ot(t)}if(e.wildcard?.length){e.wildcard.sort(ds);for(const t of e.wildcard)Ot(t)}}function Kt(e){return{kind:Pn,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 fs(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 L1(e,t){const n=Kt("/"),r=new Uint16Array(6);for(const o of e)Io(!1,r,o,1,n,0);Ot(n),t.masksTree=n,t.flatCache=lo(1e3)}function D1(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Ma(e,t.masksTree);return t.flatCache.set(e,r),r}function j1(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let a=o.singleCache.get(s);if(!a){a=Kt("/");const i=new Uint16Array(6);Io(t,i,{from:e},1,a,0),o.singleCache.set(s,a)}return Ma(r,a,n)}function F1(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=Ma(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)s=null;else throw a}return s&&(s.branch=$1(s.route)),t.matchCache.set(r,s),s}function k1(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function H1(e,t=!1,n){const r=Kt(e.fullPath),o=new Uint16Array(6),s={},a={};let i=0;return Io(t,o,e,1,r,0,u=>{if(n?.(u,i),Ht(!(u.id in s),`Duplicate routes found with id: ${String(u.id)}`),s[u.id]=u,i!==0&&u.path){const d=k1(u.fullPath);(!a[d]||u.fullPath.endsWith("/"))&&(a[d]=u)}i++}),Ot(r),{processedTree:{segmentTree:r,singleCache:lo(1e3),matchCache:lo(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:a}}function Ma(e,t,n=!1){const r=e.split("/"),o=B1(e,r,t,n);if(!o)return null;const[s]=Tl(e,r,o);return{route:o.node.route,rawParams:s,parsedParams:o.parsedParams}}function Tl(e,t,n){const r=V1(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 d=r[i];if(d.kind===zt)break;if(d.kind===Pl){u--,a--,l--;continue}const f=t[a],p=l;if(f&&(l+=f.length),d.kind===nn){o??=n.node.fullPath.split("/");const m=o[u],g=d.prefix?.length??0;if(m.charCodeAt(g)===123){const y=d.suffix?.length??0,b=m.substring(g+2,m.length-y-1),x=f.substring(g,f.length-y);s[b]=decodeURIComponent(x)}else{const y=m.substring(1);s[y]=decodeURIComponent(f)}}else if(d.kind===cr){if(n.skipped&1<<i){a--,l=p-1;continue}o??=n.node.fullPath.split("/");const m=o[u],g=d.prefix?.length??0,v=d.suffix?.length??0,y=m.substring(g+3,m.length-v-1),b=d.suffix||d.prefix?f.substring(g,f.length-v):f;b&&(s[y]=decodeURIComponent(b))}else if(d.kind===rn){const m=d,g=e.substring(p+(m.prefix?.length??0),e.length-(m.suffix?.length??0)),v=decodeURIComponent(g);s["*"]=v,s._splat=v;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:a,node:i,path:l,segment:u}]}function $1(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function V1(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function B1(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!ar(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,d=null;for(;i.length;){const f=i.pop(),{node:p,index:m,skipped:g,depth:v,statics:y,dynamics:b,optionals:x}=f;let{extract:w,rawParams:E,parsedParams:C}=f;if(p.skipOnParamError){if(!hs(e,t,f))continue;E=f.rawParams,w=f.extract,C=f.parsedParams}r&&p.route&&p.kind!==zt&&zn(u,f)&&(u=f);const N=m===a;if(N&&(p.route&&!s&&zn(d,f)&&(d=f),!p.optional&&!p.wildcard&&!p.index&&!p.pathless))continue;const R=N?void 0:t[m];let S;if(N&&p.index){const M={node:p.index,index:m,skipped:g,depth:v+1,statics:y,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:C};let I=!0;if(p.index.skipOnParamError&&(hs(e,t,M)||(I=!1)),I){if(y===a&&!b&&!x&&!g)return M;zn(d,M)&&(d=M)}}if(p.wildcard&&zn(l,f))for(const M of p.wildcard){const{prefix:I,suffix:T}=M;if(I&&(N||!(M.caseSensitive?R:S??=R.toLowerCase()).startsWith(I)))continue;if(T){if(N)continue;const B=t.slice(m).join("/").slice(-T.length);if((M.caseSensitive?B:B.toLowerCase())!==T)continue}const F={node:M,index:a,skipped:g,depth:v,statics:y,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:C};if(!(M.skipOnParamError&&!hs(e,t,F))){l=F;break}}if(p.optional){const M=g|1<<v,I=v+1;for(let T=p.optional.length-1;T>=0;T--){const F=p.optional[T];i.push({node:F,index:m,skipped:M,depth:I,statics:y,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:C})}if(!N)for(let T=p.optional.length-1;T>=0;T--){const F=p.optional[T],{prefix:B,suffix:L}=F;if(B||L){const D=F.caseSensitive?R:S??=R.toLowerCase();if(B&&!D.startsWith(B)||L&&!D.endsWith(L))continue}i.push({node:F,index:m+1,skipped:g,depth:I,statics:y,dynamics:b,optionals:x+1,extract:w,rawParams:E,parsedParams:C})}}if(!N&&p.dynamic&&R)for(let M=p.dynamic.length-1;M>=0;M--){const I=p.dynamic[M],{prefix:T,suffix:F}=I;if(T||F){const B=I.caseSensitive?R:S??=R.toLowerCase();if(T&&!B.startsWith(T)||F&&!B.endsWith(F))continue}i.push({node:I,index:m+1,skipped:g,depth:v+1,statics:y,dynamics:b+1,optionals:x,extract:w,rawParams:E,parsedParams:C})}if(!N&&p.staticInsensitive){const M=p.staticInsensitive.get(S??=R.toLowerCase());M&&i.push({node:M,index:m+1,skipped:g,depth:v+1,statics:y+1,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:C})}if(!N&&p.static){const M=p.static.get(R);M&&i.push({node:M,index:m+1,skipped:g,depth:v+1,statics:y+1,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:C})}if(p.pathless){const M=v+1;for(let I=p.pathless.length-1;I>=0;I--){const T=p.pathless[I];i.push({node:T,index:m,skipped:g,depth:M,statics:y,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:C})}}}if(d&&l)return zn(l,d)?d:l;if(d)return d;if(l)return l;if(r&&u){let f=u.index;for(let m=0;m<u.index;m++)f+=t[m].length;const p=f===e.length?"/":e.slice(f);return u.rawParams??={},u.rawParams["**"]=decodeURIComponent(p),u}return null}function hs(e,t,n){try{const[r,o]=Tl(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 zn(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===zt)>(e.node.kind===zt)||t.node.kind===zt==(e.node.kind===zt)&&t.depth>e.depth))):!0}function Yr(e){return _a(e.filter(t=>t!==void 0).join("/"))}function _a(e){return e.replace(/\/{2,}/g,"/")}function Ml(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ft(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function _l(e){return Ft(Ml(e))}function uo(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Z1(e,t,n){return uo(e,n)===uo(t,n)}function U1({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 f=r.get(a);if(f)return f}let i;if(s)i=e.split("/");else if(o)i=t.split("/");else{for(i=e.split("/");i.length>1&&ar(i)==="";)i.pop();const f=t.split("/");for(let p=0,m=f.length;p<m;p++){const g=f[p];g===""?p?p===m-1&&i.push(g):i=[g]:g===".."?i.pop():g==="."||i.push(g)}}i.length>1&&(ar(i)===""?n==="never"&&i.pop():n==="always"&&i.push(""));let l,u="";for(let f=0;f<i.length;f++){f>0&&(u+="/");const p=i[f];if(!p)continue;l=Ta(p,0,l);const m=l[0];if(m===Pn){u+=p;continue}const g=l[5],v=p.substring(0,l[1]),y=p.substring(l[4],g),b=p.substring(l[2],l[3]);m===nn?u+=v||y?`${v}{$${b}}${y}`:`$${b}`:m===rn?u+=v||y?`${v}{$}${y}`:"$":u+=`${v}{-$${b}}${y}`}u=_a(u);const d=u||"/";return a&&r&&r.set(a,d),d}function q1(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 ps(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=>ki(o,n)).join("/"):ki(r,n)}function Fi({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 f=i;l=Ta(e,f,l);const p=l[5];if(i=p+1,f===p)continue;const m=l[0];if(m===Pn){u+="/"+e.substring(f,p);continue}if(m===rn){const g=t._splat;s._splat=g,s["*"]=g;const v=e.substring(f,l[1]),y=e.substring(l[4],p);if(!g){o=!0,(v||y)&&(u+="/"+v+y);continue}const b=ps("_splat",t,n);u+="/"+v+b+y;continue}if(m===nn){const g=e.substring(l[2],l[3]);!o&&!(g in t)&&(o=!0),s[g]=t[g];const v=e.substring(f,l[1]),y=e.substring(l[4],p),b=ps(g,t,n)??"undefined";u+="/"+v+b+y;continue}if(m===cr){const g=e.substring(l[2],l[3]),v=t[g];if(v==null)continue;s[g]=v;const y=e.substring(f,l[1]),b=e.substring(l[4],p),x=ps(g,t,n)??"";u+="/"+y+x+b;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:s,interpolatedPath:u||"/",isMissingParams:o}}function ki(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function Nl(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function ke(e){return!!e?.isNotFound}function z1(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Vs="tsr-scroll-restoration-v1_3",K1=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function W1(){const e=z1();if(!e)return null;const t=e.getItem(Vs);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=Lt(r,n)||n;try{e.setItem(Vs,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const $r=W1(),G1=e=>e.state.__TSR_key||e.href;function Q1(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 fo=!1;function Y1({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];fo=!0;e:{if(r&&l&&Object.keys(l).length>0){for(const f in l){const p=l[f];if(f==="window")window.scrollTo({top:p.scrollY,left:p.scrollX,behavior:n});else if(f){const m=document.querySelector(f);m&&(m.scrollLeft=p.scrollX,m.scrollTop=p.scrollY)}}break e}const u=(s??window.location).hash.split("#",2)[1];if(u){const f=window.history.state?.__hashScrollIntoViewOptions??!0;if(f){const p=document.getElementById(u);p&&p.scrollIntoView(f)}break e}const d={top:0,left:0,behavior:n};if(window.scrollTo(d),o)for(const f of o){if(f==="window")continue;const p=typeof f=="function"?f():document.querySelector(f);p&&p.scrollTo(d)}}fo=!1}function X1(e,t){if(!$r||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!$r))return;e.isScrollRestorationSetup=!0,fo=!1;const r=e.options.getScrollRestorationKey||G1;window.history.scrollRestoration="manual";const o=s=>{if(fo||!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=Q1(s.target)}const i=r(e.state.location);$r.set(l=>{const u=l[i]||={},d=u[a]||={};if(a==="window")d.scrollX=window.scrollX||0,d.scrollY=window.scrollY||0;else if(a){const f=document.querySelector(a);f&&(d.scrollX=f.scrollLeft||0,d.scrollY=f.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",K1(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})||(Y1({storageKey:Vs,key:a,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&$r.set(i=>(i[a]||={},i)))})}function J1(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 ep(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 ms(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function tp(e){const t=new URLSearchParams(e),n={};for(const[r,o]of t.entries()){const s=n[r];s==null?n[r]=ms(o):Array.isArray(s)?s.push(ms(o)):n[r]=[s,ms(o)]}return n}const np=op(JSON.parse),rp=sp(JSON.stringify,JSON.parse);function op(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=tp(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function sp(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=ep(o,r);return s?`?${s}`:""}}const Xe="__root__";function Ol(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 Ke(e){return e instanceof Response&&!!e.options}const Bs=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Lo=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Sn=(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},Hi=(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},Dt=(e,t,n)=>{if(!(!Ke(n)&&!ke(n)))throw Ke(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:Ke(n)?"redirected":r.status==="pending"?"success":r.status,context:Sn(e,t.index),isFetching:!1,error:n})),ke(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Ke(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},Il=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,Kn=(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,Dt(e,e.router.getMatch(o),n);try{a.options.onError?.(n)}catch(i){n=i,Dt(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&&!Ke(n)&&!ke(n)&&(e.serialError??=n)},Ll=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Lo(e,t)&&(n.options.loader||n.options.beforeLoad||jl(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const a=setTimeout(()=>{Bs(e)},o);r._nonReactive.pendingTimeout=a}},ap=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Ll(e,t,n,r);const o=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Dt(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},ip=(e,t,n,r)=>{const o=e.router.getMatch(t),s=o._nonReactive.loadPromise;o._nonReactive.loadPromise=An(()=>{s?.resolve()});const{paramsError:a,searchError:i}=o;a&&Kn(e,n,a,"PARSE_PARAMS"),i&&Kn(e,n,i,"VALIDATE_SEARCH"),Ll(e,t,r,o);const l=new AbortController;let u=!1;const d=()=>{u||(u=!0,e.updateMatch(t,E=>({...E,isFetching:"beforeLoad",fetchCount:E.fetchCount+1,abortController:l})))},f=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,E=>({...E,isFetching:!1}))};if(!r.options.beforeLoad){tr(()=>{d(),f()});return}o._nonReactive.beforeLoadPromise=An();const p={...Sn(e,n,!1),...o.__routeContext},{search:m,params:g,cause:v}=o,y=Lo(e,t),b={search:m,abortController:l,params:g,preload:y,context:p,location:e.location,navigate:E=>e.router.navigate({...E,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:y?"preload":v,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},x=E=>{if(E===void 0){tr(()=>{d(),f()});return}(Ke(E)||ke(E))&&(d(),Kn(e,n,E,"BEFORE_LOAD")),tr(()=>{d(),e.updateMatch(t,C=>({...C,__beforeLoadContext:E})),f()})};let w;try{if(w=r.options.beforeLoad(b),ir(w))return d(),w.catch(E=>{Kn(e,n,E,"BEFORE_LOAD")}).then(x)}catch(E){d(),Kn(e,n,E,"BEFORE_LOAD")}x(w)},cp=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],s=()=>i(),a=()=>ip(e,n,t,o),i=()=>{if(Il(e,n))return;const l=ap(e,n,o);return ir(l)?l.then(a):a()};return s()},lp=(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,d=s?.scripts,f=s?.styles;return{meta:l,links:u,headScripts:d,headers:i,scripts:a,styles:f}})},Dl=(e,t,n,r,o)=>{const s=t[r-1],{params:a,loaderDeps:i,abortController:l,cause:u}=e.router.getMatch(n),d=Sn(e,r),f=Lo(e,n);return{params:a,deps:i,preload:!!f,parentMatchPromise:s,abortController:l,context:d,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:f?"preload":u,route:o,...e.router.options.additionalContext}},$i=async(e,t,n,r,o)=>{try{const s=e.router.getMatch(n);try{(!(C1??e.router.isServer)||s.ssr===!0)&&ho(o);const a=o.options.loader?.(Dl(e,t,n,r,o)),i=o.options.loader&&ir(a);if((i||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(n,d=>({...d,isFetching:"loader"})),o.options.loader){const d=i?await a:a;Dt(e,e.router.getMatch(n),d),d!==void 0&&e.updateMatch(n,f=>({...f,loaderData:d}))}o._lazyPromise&&await o._lazyPromise;const u=s._nonReactive.minPendingPromise;u&&await u,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,d=>({...d,error:void 0,context:Sn(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:Sn(e,r)}));return}const l=s._nonReactive.minPendingPromise;l&&await l,ke(a)&&await o.options.notFoundComponent?.preload?.(),Dt(e,e.router.getMatch(n),a);try{o.options.onError?.(a)}catch(u){i=u,Dt(e,e.router.getMatch(n),u)}e.updateMatch(n,u=>({...u,error:i,context:Sn(e,r),status:"error",isFetching:!1}))}}catch(s){const a=e.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Dt(e,a,s)}},up=async(e,t,n)=>{async function r(f,p,m,g){const v=Date.now()-p.updatedAt,y=f?g.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:g.options.staleTime??e.router.options.defaultStaleTime??0,b=g.options.shouldReload,x=typeof b=="function"?b(Dl(e,t,o,n,g)):b,{status:w,invalid:E}=m;a=w==="success"&&(E||(x??v>y)),f&&g.options.preload===!1||(a&&!e.sync?(i=!0,(async()=>{try{await $i(e,t,o,n,g);const C=e.router.getMatch(o);C._nonReactive.loaderPromise?.resolve(),C._nonReactive.loadPromise?.resolve(),C._nonReactive.loaderPromise=void 0}catch(C){Ke(C)&&await e.router.navigate(C.options)}})()):(w!=="success"||a&&e.sync)&&await $i(e,t,o,n,g))}const{id:o,routeId:s}=e.matches[n];let a=!1,i=!1;const l=e.router.looseRoutesById[s];if(!Il(e,o)){const f=e.router.getMatch(o),p=Lo(e,o);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(o),g=m._nonReactive.error||m.error;g&&Dt(e,m,g),m.status==="pending"&&await r(p,f,m,l)}else{const m=p&&!e.router.state.matches.some(v=>v.id===o),g=e.router.getMatch(o);g._nonReactive.loaderPromise=An(),m!==g.preload&&e.updateMatch(o,v=>({...v,preload:m})),await r(p,f,g,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 d=i?u.isFetching:!1;return d!==u.isFetching||u.invalid!==!1?(e.updateMatch(o,f=>({...f,isFetching:d,invalid:!1})),e.router.getMatch(o)):u};async function Vi(e){const t=e,n=[];t.router.state.matches.some(p=>p._forcePending)&&Bs(t);let r;for(let p=0;p<t.matches.length;p++){try{const m=cp(t,p);ir(m)&&await m}catch(m){if(Ke(m))throw m;if(ke(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?Hi(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(up(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 g=m.reason;if(Ke(g))throw g;ke(g)?i??=g:l??=g}if(l!==void 0)throw l}const u=i??(r&&!t.preload?r:void 0);let d=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!u&&r&&t.preload)return t.matches;if(u){const p=Hi(t,u);Ht(p!==void 0);const m=t.matches[p],g=t.router.looseRoutesById[m.routeId],v=t.router.options?.defaultNotFoundComponent;!g.options.notFoundComponent&&v&&(g.options.notFoundComponent=v),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})),d=p,await ho(g)}else if(!t.preload){const p=t.matches[0];p.globalNotFound||t.router.getMatch(p.id)?.globalNotFound&&t.updateMatch(p.id,g=>({...g,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const p=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await ho(p)}for(let p=0;p<=d;p++){const m=t.matches[p],{id:g,routeId:v}=m,y=t.router.looseRoutesById[v];try{const b=lp(t,g,y);if(b){const x=await b;t.updateMatch(g,w=>({...w,...x}))}}catch(b){console.error(`Error executing head for route ${v}:`,b)}}const f=Bs(t);if(ir(f)&&await f,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}async function ho(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 Fl){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 jl(e){for(const t of Fl)if(e.options[t]?.preload)return!0;return!1}const Fl=["component","errorComponent","pendingComponent","notFoundComponent"];function dp(e){return{input:({url:t})=>{for(const n of e)t=Zs(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=kl(e[n],t);return t}}}function fp(e){const t=_l(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=Yr(["/",t,a.pathname]),a)}}function Zs(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 kl(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 Xt(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 hp(e){const t=e.filter(n=>n.status!=="redirected");return t.length===e.length?e:t}class pp{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=q1(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=S1()),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=lo(1e3),p=this.buildRouteTree(),this.setRoutes(p)}!this.__store&&this.latestLocation&&(this.__store=x1(gp(this.latestLocation)),X1(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=_l(l);m&&m!=="/"&&p.push(fp({basepath:l})),u&&p.push(u),this.rewrite=p.length===0?void 0:p.length===1?p[0]:dp(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=H1(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&L1(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:d,href:f,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+d,publicHref:f,pathname:qn(l).path,external:!1,searchStr:w,search:ze(r?.search,x),hash:qn(d.slice(1)).path,state:ze(r?.state,p)}}const m=new URL(f,this.origin),g=Zs(this.rewrite,m),v=this.options.parseSearch(g.search),y=this.options.stringifySearch(v);return g.search=y,{href:g.href.replace(g.origin,""),publicHref:f,pathname:qn(g.pathname).path,external:!!this.rewrite&&g.origin!==this.origin,searchStr:y,search:ze(r?.search,v),hash:qn(g.hash.slice(1)).path,state:ze(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)=>U1({base:n,to:_a(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=>vp({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,"."),d=i.search,f={...i.params},p=s.to?this.resolvePathWithBase(u,`${s.to}`):this.resolvePathWithBase(u,"."),m=s.params===!1||s.params===null?{}:(s.params??!0)===!0?f:Object.assign(f,Lt(s.params,f)),g=this.getMatchedRoutes(p);let v=g.matchedRoutes;if((!g.foundRoute||g.foundRoute.path!=="/"&&g.routeParams["**"])&&this.options.notFoundRoute&&(v=[...v,this.options.notFoundRoute]),Object.keys(m).length>0)for(const T of v){const F=T.options.params?.stringify??T.options.stringifyParams;if(F)try{Object.assign(m,F(m))}catch{}}const b=n.leaveParams?p:qn(Fi({path:p,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=d;if(n._includeValidateSearch&&this.options.search?.strict){const T={};v.forEach(F=>{if(F.options.validateSearch)try{Object.assign(T,Xr(F.options.validateSearch,{...T,...x}))}catch{}}),x=T}x=yp({search:x,dest:s,destRoutes:v,_includeValidateSearch:n._includeValidateSearch}),x=ze(d,x);const w=this.options.stringifySearch(x),E=s.hash===!0?a.hash:s.hash?Lt(s.hash,a.hash):void 0,C=E?`#${E}`:"";let N=s.state===!0?a.state:s.state?Lt(s.state,a.state):{};N=ze(a.state,N);const R=`${b}${w}${C}`;let S,M,I=!1;if(this.rewrite){const T=new URL(R,this.origin),F=kl(this.rewrite,T);S=T.href.replace(T.origin,""),F.origin!==this.origin?(M=F.href,I=!0):M=F.pathname+F.search+F.hash}else S=N1(R),M=S;return{publicHref:M,href:S,pathname:b,search:x,searchStr:w,state:N,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 d=D1(i.pathname,this.processedTree);if(d){Object.assign(u,d.rawParams);const{from:f,params:p,...m}=d.route,g=p===!1||p===null?{}:(p??!0)===!0?u:Object.assign(u,Lt(p,u));a={from:n.from,...m,params:g},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(d=>{o.state[d]=this.latestLocation.state[d]});const u=Yt(o.state,this.latestLocation.state);return l.forEach(d=>{delete o.state[d]}),u},a=Ft(this.latestLocation.href)===Ft(o.href),i=this.commitLocationPromise;if(this.commitLocationPromise=An(()=>{i?.resolve()}),a&&s())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...d}=o;l&&(d={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...d,search:d.searchStr,state:{...d.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(d.unmaskOnReload??this.options.unmaskOnReload??!1)&&(d.state.__tempKey=this.tempLocationKey)),d.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](d.publicHref,d.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 f=this.history.location.state.__TSR_index,p=ao(i,{__TSR_index:n?f:f+1}),m=new URL(p.pathname,this.origin),g=Zs(this.rewrite,m);l.to=g.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 d=this.commitLocation({...u,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),d},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 d=this.history.getBlockers?.()??[];for(const f of d)if(f?.blockerFn&&await f.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",...Xt({resolvedLocation:u,location:l})}),this.emit({type:"onBeforeLoad",...Xt({resolvedLocation:u,location:l})}),await Vi({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:l,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let d=[],f=[],p=[],m=[];tr(()=>{this.__store.setState(g=>{const v=g.matches,y=g.pendingMatches||g.matches;return d=v.filter(b=>!y.some(x=>x.id===b.id)),f=v.filter(b=>!y.some(x=>x.routeId===b.routeId)),p=y.filter(b=>!v.some(x=>x.routeId===b.routeId)),m=y.filter(b=>v.some(x=>x.routeId===b.routeId)),{...g,isLoading:!1,loadedAt:Date.now(),matches:y,pendingMatches:void 0,cachedMatches:[...g.cachedMatches,...d.filter(b=>b.status!=="error"&&b.status!=="notFound"&&b.status!=="redirected")]}}),this.clearExpiredCache()}),[[f,"onLeave"],[p,"onEnter"],[m,"onStay"]].forEach(([g,v])=>{g.forEach(y=>{this.looseRoutesById[y.routeId].options[v]?.(y)})})})})}})}catch(l){Ke(l)?(r=l,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):ke(l)&&(o=l),this.__store.setState(u=>({...u,statusCode:r?r.status:o?404:u.matches.some(d=>d.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(Xt({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:hp(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=ho,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)]);tr(()=>{o.forEach(i=>{a.has(i.id)||this.__store.setState(l=>({...l,cachedMatches:[...l.cachedMatches,i]}))})});try{return o=await Vi({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(Ke(i))return i.options.reloadDocument?void 0:await this.preloadRoute({...i.options,_fromLocation:r});ke(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=j1(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,i.pathname,this.processedTree);return!l||n.params&&!Yt(l.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Yt(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??rp,parseSearch:t.parseSearch??np,protocolAllowlist:t.protocolAllowlist??_1}),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["**"]:Ft(t.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:l=!0);const u=l?xp(this.options.notFoundMode,i):void 0,d=new Array(i.length),f=new Map(this.state.matches.map(p=>[p.routeId,p]));for(let p=0;p<i.length;p++){const m=i[p],g=d[p-1];let v,y,b;{const L=g?.search??t.search,D=g?._strictSearch??void 0;try{const P=Xr(m.options.validateSearch,{...L})??void 0;v={...L,...P},y={...D,...P},b=void 0}catch(P){let j=P;if(P instanceof po||(j=new po(P.message,{cause:P})),n?.throwOnError)throw j;v=L,y={},b=j}}const x=m.options.loaderDeps?.({search:v})??"",w=x?JSON.stringify(x):"",{interpolatedPath:E,usedParams:C}=Fi({path:m.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),N=m.id+E+w,R=this.getMatch(N),S=f.get(m.id),M=R?._strictParams??C;let I;if(!R)try{Bi(m,C,a,M)}catch(L){if(ke(L)||Ke(L)?I=L:I=new mp(L.message,{cause:L}),n?.throwOnError)throw I}Object.assign(s,M);const T=S?"stay":"enter";let F;if(R)F={...R,cause:T,params:S?.params??s,_strictParams:M,search:ze(S?S.search:R.search,v),_strictSearch:y};else{const L=m.options.loader||m.options.beforeLoad||m.lazyFn||jl(m)?"pending":"success";F={id:N,ssr:m.options.ssr,index:p,routeId:m.id,params:S?.params??s,_strictParams:M,pathname:E,updatedAt:Date.now(),search:S?ze(S.search,v):v,_strictSearch:y,searchError:void 0,status:L,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:An()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:T,loaderDeps:S?ze(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||(F.globalNotFound=u===m.id),F.searchError=b;const B=this.getParentContext(g);F.context={...B,...F.__routeContext,...F.__beforeLoadContext},d[p]=F}for(let p=0;p<d.length;p++){const m=d[p],g=this.looseRoutesById[m.routeId],v=this.getMatch(m.id),y=f.get(m.routeId);if(m.params=y?ze(y.params,s):s,!v){const b=d[p-1],x=this.getParentContext(b);if(g.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:d,routeId:g.id};m.__routeContext=g.options.context(w)??void 0}m.context={...x,...m.__routeContext,...m.__beforeLoadContext}}}return d}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:r,parsedParams:o}=this.getMatchedRoutes(t.pathname),s=ar(n),a={...t.search};for(const d of n)try{Object.assign(a,Xr(d.options.validateSearch,a))}catch{}const i=ar(this.state.matches),l=i&&i.routeId===s.id&&t.pathname===this.state.location.pathname;let u;if(l)u=i.params;else{const d={...r};for(const f of n)try{Bi(f,r,o??{},d)}catch{}u=d}return{matchedRoutes:n,fullPath:s.fullPath,search:a,params:u}}}class po extends Error{}class mp extends Error{}function gp(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Xr(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new po("Async validation not supported");if(n.issues)throw new po(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 vp({pathname:e,routesById:t,processedTree:n}){const r={},o=Ft(e);let s,a;const i=F1(o,n,!0);return i&&(s=i.route,Object.assign(r,i.rawParams),a=Object.assign({},i.parsedParams)),{matchedRoutes:i?.branch||[t[Xe]],routeParams:r,foundRoute:s,parsedParams:a}}function yp({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return bp(n)(e,t,r??!1)}function bp(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((d,f)=>f(d),a));const u=i(l);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((d,f)=>f(d),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,...Xr(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:Lt(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 xp(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 Xe}function Bi(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 wp="Error preloading route! ☝️";class Hl{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=Xe:this.parentRoute||Ht(!1);let s=o?Xe:r?.path;s&&s!=="/"&&(s=Ml(s));const a=r?.id||s;let i=o?Xe:Yr([this.parentRoute.id===Xe?"":this.parentRoute.id,a]);s===Xe&&(s="/"),i!==Xe&&(i=Yr(["/",i]));const l=i===Xe?"/":Yr([this.parentRoute.fullPath,s]);this._path=s,this._id=i,this._fullPath=l,this._to=Ft(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=>Ol({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 Ep{constructor({id:t}){this.notFound=n=>Nl({routeId:this.id,...n}),this.redirect=n=>Ol({from:this.id,...n}),this.id=t}}class Sp extends Hl{constructor(t){super(t)}}const Rp="use",Zi=No[Rp],Vr=typeof window<"u"?c.useLayoutEffect:c.useEffect;function gs(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 Cp(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 Ap(e){const t=c.useRef(null);return c.useImperativeHandle(e,()=>t.current,[]),t}function Na(e){const t=e.errorComponent??Oa;return h.jsx(Pp,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?c.createElement(t,{error:n,reset:r}):e.children})}class Pp 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 Oa({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 Tp({children:e,fallback:t=null}){return $l()?h.jsx(K.Fragment,{children:e}):h.jsx(K.Fragment,{children:t})}function $l(){return K.useSyncExternalStore(Mp,()=>!0,()=>!1)}function Mp(){return()=>{}}function _p(e,t){return e===t}function Np(e,t,n=_p){const r=c.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:i}=e.subscribe(a);return i},[e]),o=c.useCallback(()=>e?.get(),[e]);return Zh.useSyncExternalStoreWithSelector(r,o,o,t,n)}const Vl=c.createContext(null);function Ie(e){const t=c.useContext(Vl);return e?.warn,t}function We(e){const t=Ie({warn:e?.router===void 0}),n=e?.router||t,r=c.useRef(void 0);return Np(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=ze(r.current,e.select(o));return r.current=s,s}return e.select(o)}return o})}const Do=c.createContext(void 0),Op=c.createContext(void 0);function nt(e){const t=c.useContext(e.from?Op:Do);return We({select:r=>{const o=r.matches.find(s=>e.from?e.from===s.routeId:s.id===t);if(Ht(!((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 nt({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Fo(e){const{select:t,...n}=e;return nt({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function ko(e){return nt({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 Ho(e){return nt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function fn(e){const t=Ie();return c.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Ip(e,t){const n=Ie(),r=Ap(t),{activeProps:o,inactiveProps:s,activeOptions:a,to:i,preload:l,preloadDelay:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:g,children:v,target:y,disabled:b,style:x,className:w,onClick:E,onBlur:C,onFocus:N,onMouseEnter:R,onMouseLeave:S,onTouchStart:M,ignoreBlocker:I,params:T,search:F,hash:B,state:L,mask:D,reloadDocument:P,unsafeRelative:j,from:O,_fromLocation:_,...$}=e,Z=$l(),U=We({select:ce=>{const de=ce.matches[ce.matches.length-1];return{search:de?.search,hash:ce.location.hash,path:de?.pathname}},structuralSharing:!0}),G=e.from,q=c.useMemo(()=>({...e,from:G}),[n,U,G,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Q=c.useMemo(()=>n.buildLocation({...q}),[n,q]),ne=Q.maskedLocation?Q.maskedLocation.publicHref:Q.publicHref,k=Q.maskedLocation?Q.maskedLocation.external:Q.external,W=c.useMemo(()=>Hp(ne,k,n.history,b),[b,k,ne,n.history]),ee=c.useMemo(()=>{if(W?.external)return co(W.href,n.protocolAllowlist)?void 0:W.href;if(!$p(i)&&!(typeof i!="string"||i.indexOf(":")===-1))try{return new URL(i),co(i,n.protocolAllowlist)?void 0:i}catch{}},[i,W,n.protocolAllowlist]),H=We({select:ce=>{if(ee)return!1;if(a?.exact){if(!Z1(ce.location.pathname,Q.pathname,n.basepath))return!1}else{const de=uo(ce.location.pathname,n.basepath),xe=uo(Q.pathname,n.basepath);if(!(de.startsWith(xe)&&(de.length===xe.length||de[xe.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Yt(ce.location.search,Q.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?Z&&ce.location.hash===Q.hash:!0}}),Y=H?Lt(o,{})??Lp:vs,J=H?vs:Lt(s,{})??vs,ie=[w,Y.className,J.className].filter(Boolean).join(" "),ve=(x||Y.style||J.style)&&{...x,...Y.style,...J.style},[Ge,Be]=c.useState(!1),mt=c.useRef(!1),gt=e.reloadDocument||ee?!1:l??n.options.defaultPreload,Zt=u??n.options.defaultPreloadDelay??0,Ae=c.useCallback(()=>{n.preloadRoute({...q,_builtLocation:Q}).catch(ce=>{console.warn(ce),console.warn(wp)})},[n,q,Q]),mn=c.useCallback(ce=>{ce?.isIntersecting&&Ae()},[Ae]);Cp(r,mn,kp,{disabled:!!b||gt!=="viewport"}),c.useEffect(()=>{mt.current||!b&&gt==="render"&&(Ae(),mt.current=!0)},[b,Ae,gt]);const gn=ce=>{const de=ce.currentTarget.getAttribute("target"),xe=y!==void 0?y:de;if(!b&&!Vp(ce)&&!ce.defaultPrevented&&(!xe||xe==="_self")&&ce.button===0){ce.preventDefault(),wt.flushSync(()=>{Be(!0)});const At=n.subscribe("onResolved",()=>{At(),Be(!1)});n.navigate({...q,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:g,ignoreBlocker:I})}};if(ee)return{...$,ref:r,href:ee,...v&&{children:v},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...w&&{className:w},...E&&{onClick:E},...C&&{onBlur:C},...N&&{onFocus:N},...R&&{onMouseEnter:R},...S&&{onMouseLeave:S},...M&&{onTouchStart:M}};const Vn=ce=>{if(b||gt!=="intent")return;if(!Zt){Ae();return}const de=ce.currentTarget;if(Wn.has(de))return;const xe=setTimeout(()=>{Wn.delete(de),Ae()},Zt);Wn.set(de,xe)},Fr=ce=>{b||gt!=="intent"||Ae()},kr=ce=>{if(b||!gt||!Zt)return;const de=ce.currentTarget,xe=Wn.get(de);xe&&(clearTimeout(xe),Wn.delete(de))};return{...$,...Y,...J,href:W?.href,ref:r,onClick:yn([E,gn]),onBlur:yn([C,kr]),onFocus:yn([N,Vn]),onMouseEnter:yn([R,Vn]),onMouseLeave:yn([S,kr]),onTouchStart:yn([M,Fr]),disabled:!!b,target:y,...ve&&{style:ve},...ie&&{className:ie},...b&&Dp,...H&&jp,...Z&&Ge&&Fp}}const vs={},Lp={className:"active"},Dp={role:"link","aria-disabled":!0},jp={"data-status":"active","aria-current":"page"},Fp={"data-transitioning":"transitioning"},Wn=new WeakMap,kp={rootMargin:"100px"},yn=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Hp(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function $p(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const St=c.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=Ip(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 Vp(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Bp(e){return new Zp({id:e})}class Zp extends Ep{constructor({id:t}){super({id:t}),this.useMatch=n=>nt({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>nt({from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ho({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>ko({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Fo({...n,from:this.id,strict:!1}),this.useLoaderData=n=>jo({...n,from:this.id,strict:!1}),this.useNavigate=()=>{const n=Ie();return fn({from:n.routesById[this.id].fullPath})},this.notFound=n=>Nl({routeId:this.id,...n}),this.Link=K.forwardRef((n,r)=>{const s=Ie().routesById[this.id].fullPath;return h.jsx(St,{ref:r,from:s,...n})})}}let Up=class extends Hl{constructor(t){super(t),this.useMatch=n=>nt({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>nt({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ho({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>ko({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Fo({...n,from:this.id}),this.useLoaderData=n=>jo({...n,from:this.id}),this.useNavigate=()=>fn({from:this.fullPath}),this.Link=K.forwardRef((n,r)=>h.jsx(St,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function Se(e){return new Up(e)}class qp extends Sp{constructor(t){super(t),this.useMatch=n=>nt({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>nt({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ho({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>ko({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Fo({...n,from:this.id}),this.useLoaderData=n=>jo({...n,from:this.id}),this.useNavigate=()=>fn({from:this.fullPath}),this.Link=K.forwardRef((n,r)=>h.jsx(St,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function zp(e){return new qp(e)}function Ui(e){return typeof e=="object"?new qi(e,{silent:!0}).createRoute(e):new qi(e,{silent:!0}).createRoute}class qi{constructor(t,n){this.path=t,this.createRoute=r=>{const o=Se(r);return o.isRoot=!1,o},this.silent=n?.silent}}class zi{constructor(t){this.useMatch=n=>nt({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>nt({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ho({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>ko({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Fo({...n,from:this.options.id}),this.useLoaderData=n=>jo({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ie();return fn({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Ki(e){return typeof e=="object"?new zi(e):t=>new zi({id:e,...t})}function De(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,T1(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(Zi)Zi(a());else throw a();return c.createElement(r,u)};return i.preload=a,i}function Kp(){const e=Ie(),t=c.useRef({router:e,mounted:!1}),[n,r]=c.useState(!1),{hasPendingMatches:o,isLoading:s}=We({select:f=>({isLoading:f.isLoading,hasPendingMatches:f.matches.some(p=>p.status==="pending")}),structuralSharing:!0}),a=gs(s),i=s||n||o,l=gs(i),u=s||o,d=gs(u);return e.startTransition=f=>{r(!0),c.startTransition(()=>{f(),r(!1)})},c.useEffect(()=>{const f=e.history.subscribe(e.load),p=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ft(e.latestLocation.publicHref)!==Ft(p.publicHref)&&e.commitLocation({...p,replace:!0}),()=>{f()}},[e,e.history]),Vr(()=>{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]),Vr(()=>{a&&!s&&e.emit({type:"onLoad",...Xt(e.state)})},[a,e,s]),Vr(()=>{d&&!u&&e.emit({type:"onBeforeRouteMount",...Xt(e.state)})},[u,d,e]),Vr(()=>{if(l&&!i){const f=Xt(e.state);e.emit({type:"onResolved",...f}),e.__store.setState(p=>({...p,status:"idle",resolvedLocation:p.location})),f.hrefChanged&&J1(e)}},[i,l,e]),null}function Wp(e){const t=We({select:n=>`not-found-${n.location.pathname}-${n.status}`});return h.jsx(Na,{getResetKey:()=>t,onCatch:(n,r)=>{if(ke(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(ke(n))return e.fallback?.(n);throw n},children:e.children})}function Gp(){return h.jsx("p",{children:"Not Found"})}function wn(e){return h.jsx(h.Fragment,{children:e.children})}function Bl(e,t,n){return t.options.notFoundComponent?h.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?h.jsx(e.options.defaultNotFoundComponent,{...n}):h.jsx(Gp,{})}function Qp(){return Ie().isScrollRestoring,null}const Zl=c.memo(function({matchId:t}){const n=Ie(),r=We({select:v=>{const y=v.matches.findIndex(x=>x.id===t),b=v.matches[y];return Ht(b),{routeId:b.routeId,ssr:b.ssr,_displayPending:b._displayPending,resetKey:v.loadedAt,parentRouteId:v.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,d=r.ssr===!1||r.ssr==="data-only",f=(!o.isRoot||o.options.wrapInSuspense||d)&&(o.options.wrapInSuspense??s??(o.options.errorComponent?.preload||d))?c.Suspense:wn,p=i?Na:wn,m=u?Wp:wn,g=o.isRoot?o.options.shellComponent??wn:wn;return h.jsxs(g,{children:[h.jsx(Do.Provider,{value:t,children:h.jsx(f,{fallback:a,children:h.jsx(p,{getResetKey:()=>r.resetKey,errorComponent:i||Oa,onCatch:(v,y)=>{if(ke(v))throw v;l?.(v,y)},children:h.jsx(m,{fallback:v=>{if(!u||v.routeId&&v.routeId!==r.routeId||!v.routeId&&!o.isRoot)throw v;return c.createElement(u,v)},children:d||r._displayPending?h.jsx(Tp,{fallback:a,children:h.jsx(Wi,{matchId:t})}):h.jsx(Wi,{matchId:t})})})})}),r.parentRouteId===Xe&&n.options.scrollRestoration?h.jsxs(h.Fragment,{children:[h.jsx(Yp,{}),h.jsx(Qp,{})]}):null]})});function Yp(){const e=Ie(),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",...Xt(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Wi=c.memo(function({matchId:t}){const n=Ie(),{match:r,key:o,routeId:s}=We({select:l=>{const u=l.matches.find(g=>g.id===t),d=u.routeId,p=(n.routesById[d].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:d,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return{key:p?JSON.stringify(p):void 0,routeId:d,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(Ul,{})},[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 d=An();u._nonReactive.minPendingPromise=d,setTimeout(()=>{d.resolve(),u._nonReactive.minPendingPromise=void 0},l)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return Ht(ke(r.error)),Bl(n,a,r.error);if(r.status==="redirected")throw Ht(Ke(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error")throw r.error;return i}),Ul=c.memo(function(){const t=Ie(),n=c.useContext(Do),r=We({select:u=>u.matches.find(d=>d.id===n)?.routeId}),o=t.routesById[r],s=We({select:u=>{const f=u.matches.find(p=>p.id===n);return Ht(f),f.globalNotFound}}),a=We({select:u=>{const d=u.matches,f=d.findIndex(p=>p.id===n);return d[f+1]?.id}}),i=t.options.defaultPendingComponent?h.jsx(t.options.defaultPendingComponent,{}):null;if(s)return Bl(t,o,void 0);if(!a)return null;const l=h.jsx(Zl,{matchId:a});return r===Xe?h.jsx(c.Suspense,{fallback:i,children:l}):l});function Xp(){const e=Ie(),n=e.routesById[Xe].options.pendingComponent??e.options.defaultPendingComponent,r=n?h.jsx(n,{}):null,o=typeof document<"u"&&e.ssr?wn:c.Suspense,s=h.jsxs(o,{fallback:r,children:[h.jsx(Kp,{}),h.jsx(Jp,{})]});return e.options.InnerWrap?h.jsx(e.options.InnerWrap,{children:s}):s}function Jp(){const e=Ie(),t=We({select:o=>o.matches[0]?.id}),n=We({select:o=>o.loadedAt}),r=t?h.jsx(Zl,{matchId:t}):null;return h.jsx(Do.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:h.jsx(Na,{getResetKey:()=>n,errorComponent:Oa,onCatch:void 0,children:r})})}const em=e=>new tm(e);class tm extends pp{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Ui,globalThis.createLazyFileRoute=Ki):typeof window<"u"&&(window.createFileRoute=Ui,window.createLazyFileRoute=Ki);function nm({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(Vl.Provider,{value:e,children:t});return e.options.Wrap?h.jsx(e.options.Wrap,{children:r}):r}function rm({router:e,...t}){return h.jsx(nm,{router:e,...t,children:h.jsx(Xp,{})})}function $o(e){return We({select:t=>e?.select?e.select(t.location):t.location})}var On=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(){}},om={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sm=class{#e=om;#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)}},Wt=new sm;function am(e){setTimeout(e,0)}var on=typeof window>"u"||"Deno"in globalThis;function Oe(){}function im(e,t){return typeof e=="function"?e(t):e}function Us(e){return typeof e=="number"&&e>=0&&e!==1/0}function ql(e,t){return Math.max(e+(t||0)-Date.now(),0)}function kt(e,t){return typeof e=="function"?e(t):e}function Je(e,t){return typeof e=="function"?e(t):e}function Gi(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Ia(a,t.options))return!1}else if(!lr(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 Qi(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(sn(t.options.mutationKey)!==sn(s))return!1}else if(!lr(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ia(e,t){return(t?.queryKeyHashFn||sn)(e)}function sn(e){return JSON.stringify(e,(t,n)=>qs(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function lr(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>lr(e[n],t[n])):!1}var cm=Object.prototype.hasOwnProperty;function zl(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Yi(e)&&Yi(t);if(!r&&!(qs(e)&&qs(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 d=0;d<i;d++){const f=r?d:a[d],p=e[f],m=t[f];if(p===m){l[f]=p,(r?d<s:cm.call(e,f))&&u++;continue}if(p===null||m===null||typeof p!="object"||typeof m!="object"){l[f]=m;continue}const g=zl(p,m,n+1);l[f]=g,g===p&&u++}return s===i&&u===s?e:l}function mo(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 Yi(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qs(e){if(!Xi(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Xi(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Xi(e){return Object.prototype.toString.call(e)==="[object Object]"}function lm(e){return new Promise(t=>{Wt.setTimeout(t,e)})}function zs(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?zl(e,t):t}function um(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function dm(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var La=Symbol();function Kl(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===La?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Da(e,t){return typeof e=="function"?e(...t):!!e}function fm(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 hm=class extends On{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!on&&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"}},ja=new hm;function Ks(){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 pm=am;function mm(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=pm;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 be=mm(),gm=class extends On{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!on&&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}},go=new gm;function vm(e){return Math.min(1e3*2**e,3e4)}function Wl(e){return(e??"online")==="online"?go.isOnline():!0}var Ws=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Gl(e){let t=!1,n=0,r;const o=Ks(),s=()=>o.status!=="pending",a=v=>{if(!s()){const y=new Ws(v);p(y),e.onCancel?.(y)}},i=()=>{t=!0},l=()=>{t=!1},u=()=>ja.isFocused()&&(e.networkMode==="always"||go.isOnline())&&e.canRun(),d=()=>Wl(e.networkMode)&&e.canRun(),f=v=>{s()||(r?.(),o.resolve(v))},p=v=>{s()||(r?.(),o.reject(v))},m=()=>new Promise(v=>{r=y=>{(s()||u())&&v(y)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),g=()=>{if(s())return;let v;const y=n===0?e.initialPromise:void 0;try{v=y??e.fn()}catch(b){v=Promise.reject(b)}Promise.resolve(v).then(f).catch(b=>{if(s())return;const x=e.retry??(on?0:3),w=e.retryDelay??vm,E=typeof w=="function"?w(n,b):w,C=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,b);if(t||!C){p(b);return}n++,e.onFail?.(n,b),lm(E).then(()=>u()?void 0:m()).then(()=>{t?p(b):g()})})};return{promise:o,status:()=>o.status,cancel:a,continue:()=>(r?.(),o),cancelRetry:i,continueRetry:l,canStart:d,start:()=>(d()?g():m().then(g),o)}}var Ql=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Us(this.gcTime)&&(this.#e=Wt.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(on?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Wt.clearTimeout(this.#e),this.#e=void 0)}},ym=class extends Ql{#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=ec(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=ec(this.options);t.data!==void 0&&(this.setState(Ji(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=zs(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(Oe).catch(Oe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Je(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===La||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>kt(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:!ql(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=Kl(this.options,t),u=(()=>{const d={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(d),d})();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=Gl({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:i=>{i instanceof Ws&&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 Ws){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,...Yl(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Ji(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),be.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Yl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Wl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ji(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ec(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 Xl=class extends On{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#i=Ks(),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),tc(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Gs(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Gs(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 Je(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&&!mo(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&nc(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||Je(this.options.enabled,this.#t)!==Je(t.enabled,this.#t)||kt(this.options.staleTime,this.#t)!==kt(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||Je(this.options.enabled,this.#t)!==Je(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 xm(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(Oe)),t}#g(){this.#x();const e=kt(this.options.staleTime,this.#t);if(on||this.#o.isStale||!Us(e))return;const n=ql(this.#o.dataUpdatedAt,e)+1;this.#l=Wt.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,!(on||Je(this.options.enabled,this.#t)===!1||!Us(this.#c)||this.#c===0)&&(this.#u=Wt.setInterval(()=>{(this.options.refetchIntervalInBackground||ja.isFocused())&&this.#d()},this.#c))}#b(){this.#g(),this.#y(this.#v())}#x(){this.#l&&(Wt.clearTimeout(this.#l),this.#l=void 0)}#w(){this.#u&&(Wt.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 d={...u},f=!1,p;if(t._optimisticResults){const S=this.hasListeners(),M=!S&&tc(e,t),I=S&&nc(e,n,t,r);(M||I)&&(d={...d,...Yl(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:v}=d;p=d.data;let y=!1;if(t.placeholderData!==void 0&&p===void 0&&v==="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&&(v="success",p=zs(o?.data,S,t),f=!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=zs(o?.data,p,t),this.#f=p,this.#s=null}catch(S){this.#s=S}this.#s&&(m=this.#s,p=this.#f,g=Date.now(),v="error");const b=d.fetchStatus==="fetching",x=v==="pending",w=v==="error",E=x&&b,C=p!==void 0,R={status:v,fetchStatus:d.fetchStatus,isPending:x,isSuccess:v==="success",isError:w,isInitialLoading:E,isLoading:E,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:w&&!C,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&C,isStale:Fa(e,t),refetch:this.refetch,promise:this.#i,isEnabled:Je(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const S=R.data!==void 0,M=R.status==="error"&&!S,I=B=>{M?B.reject(R.error):S&&B.resolve(R.data)},T=()=>{const B=this.#i=R.promise=Ks();I(B)},F=this.#i;switch(F.status){case"pending":e.queryHash===n.queryHash&&I(F);break;case"fulfilled":(M||R.data!==F.value)&&T();break;case"rejected":(!M||R.error!==F.reason)&&T();break}}return R}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),mo(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){be.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function bm(e,t){return Je(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function tc(e,t){return bm(e,t)||e.state.data!==void 0&&Gs(e,t,t.refetchOnMount)}function Gs(e,t,n){if(Je(t.enabled,e)!==!1&&kt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Fa(e,t)}return!1}function nc(e,t,n,r){return(e!==t||Je(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Fa(e,n)}function Fa(e,t){return Je(t.enabled,e)!==!1&&e.isStaleByTime(kt(t.staleTime,e))}function xm(e,t){return!mo(e.getCurrentResult(),t)}function rc(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 d=!1;const f=g=>{fm(g,()=>t.signal,()=>d=!0)},p=Kl(t.options,t.fetchOptions),m=async(g,v,y)=>{if(d)return Promise.reject();if(v==null&&g.pages.length)return Promise.resolve(g);const x=(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:v,direction:y?"backward":"forward",meta:t.options.meta};return f(N),N})(),w=await p(x),{maxPages:E}=t.options,C=y?dm:um;return{pages:C(g.pages,w,E),pageParams:C(g.pageParams,v,E)}};if(o&&s.length){const g=o==="backward",v=g?wm:oc,y={pages:s,pageParams:a},b=v(r,y);i=await m(y,b,g)}else{const g=e??s.length;do{const v=l===0?a[0]??r.initialPageParam:oc(r,i);if(l>0&&v==null)break;i=await m(i,v),l++}while(l<g)}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 oc(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 wm(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Em=class extends Ql{#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||Jl(),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=Gl({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),be.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Jl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sm=class extends On{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 Em({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=Br(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=Br(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=Br(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=Br(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){be.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=>Qi(t,n))}findAll(e={}){return this.getAll().filter(t=>Qi(e,t))}notify(e){be.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return be.batch(()=>Promise.all(e.map(t=>t.continue().catch(Oe))))}};function Br(e){return e.options.scope?.id}var Rm=class extends On{#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),mo(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&sn(n.mutationKey)!==sn(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??Jl();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){be.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)})})}},Cm=class extends On{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??Ia(r,t);let s=this.get(o);return s||(s=new ym({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(){be.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=>Gi(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Gi(e,n)):t}notify(e){be.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){be.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){be.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Am=class{#e;#t;#n;#o;#r;#a;#i;#s;constructor(e={}){this.#e=e.queryCache||new Cm,this.#t=e.mutationCache||new Sm,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=ja.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=go.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(kt(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=im(t,s);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return be.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;be.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return be.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=be.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Oe).catch(Oe)}invalidateQueries(e,t={}){return be.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=be.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(Oe)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Oe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(kt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Oe).catch(Oe)}fetchInfiniteQuery(e){return e.behavior=rc(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Oe).catch(Oe)}ensureInfiniteQueryData(e){return e.behavior=rc(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return go.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(sn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{lr(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(sn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{lr(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=Ia(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===La&&(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()}},eu=c.createContext(void 0),In=e=>{const t=c.useContext(eu);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Pm=({client:e,children:t})=>(c.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(eu.Provider,{value:e,children:t})),tu=c.createContext(!1),Tm=()=>c.useContext(tu);tu.Provider;function nu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ru=c.createContext(nu()),Mm=()=>c.useContext(ru),_m=({children:e})=>{const[t]=c.useState(()=>nu());return h.jsx(ru.Provider,{value:t,children:typeof e=="function"?e(t):e})},Nm=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?Da(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Om=e=>{c.useEffect(()=>{e.clearReset()},[e])},Im=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Da(n,[e.error,r])),Lm=(e,t)=>t.state.data===void 0,Dm=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))}},jm=(e,t)=>e.isLoading&&e.isFetching&&!t,Fm=(e,t)=>e?.suspense&&t.isPending,sc=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ou(e,t,n){const r=Tm(),o=Mm(),s=In(),a=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const i=s.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",Dm(a),Nm(a,o,i),Om(o);const l=!s.getQueryCache().get(a.queryHash),[u]=c.useState(()=>new t(s,a)),d=u.getOptimisticResult(a),f=!r&&e.subscribed!==!1;if(c.useSyncExternalStore(c.useCallback(p=>{const m=f?u.subscribe(be.batchCalls(p)):Oe;return u.updateResult(),m},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),c.useEffect(()=>{u.setOptions(a)},[a,u]),Fm(a,d))throw sc(a,u,o);if(Im({result:d,errorResetBoundary:o,throwOnError:a.throwOnError,query:i,suspense:a.suspense}))throw d.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(a,d),a.experimental_prefetchInRender&&!on&&jm(d,r)&&(l?sc(a,u,o):i?.promise)?.catch(Oe).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?d:u.trackResult(d)}function km(e,t){return ou(e,Xl)}function su(e,t){return ou({...e,enabled:!0,suspense:!0,throwOnError:Lm,placeholderData:void 0},Xl)}function Hm(e,t){const n=In(),[r]=c.useState(()=>new Rm(n,e));c.useEffect(()=>{r.setOptions(e)},[r,e]);const o=c.useSyncExternalStore(c.useCallback(a=>r.subscribe(be.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=c.useCallback((a,i)=>{r.mutate(a,i).catch(Oe)},[r]);if(o.error&&Da(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}function ac(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ac(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():ac(e[o],null)}}}}function ae(...e){return c.useCallback(yr(...e),e)}var $m=Symbol.for("react.lazy"),vo=No[" use ".trim().toString()];function Vm(e){return typeof e=="object"&&e!==null&&"then"in e}function au(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$m&&"_payload"in e&&Vm(e._payload)}function Bm(e){const t=Um(e),n=c.forwardRef((r,o)=>{let{children:s,...a}=r;au(s)&&typeof vo=="function"&&(s=vo(s._payload));const i=c.Children.toArray(s),l=i.find(zm);if(l){const u=l.props.children,d=i.map(f=>f===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:f);return h.jsx(t,{...a,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return h.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Zm=Bm("Slot");function Um(e){const t=c.forwardRef((n,r)=>{let{children:o,...s}=n;if(au(o)&&typeof vo=="function"&&(o=vo(o._payload)),c.isValidElement(o)){const a=Wm(o),i=Km(s,o.props);return o.type!==c.Fragment&&(i.ref=r?yr(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 qm=Symbol("radix.slottable");function zm(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qm}function Km(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 Wm(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 Gm=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"}))]]),Qm=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"}))]]),Ym=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"}))]]),Xm=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"}))]]),Jm=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"}))]]),eg=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"}))]]),tg=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"}))]]),ng=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"}))]]),rg=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"}))]]),og=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"}))]]),sg=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"}))]]),ag=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"}))]]),ig=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"}))]]),cg=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"}))]]),lg=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"}))]]),ug=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"}))]]),dg=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"}))]]),fg=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"}))]]),hg=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"}))]]),pg=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"}))]]),mg=c.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),me=c.forwardRef((e,t)=>{const{alt:n,color:r,size:o,weight:s,mirrored:a,children:i,weights:l,...u}=e,{color:d="currentColor",size:f,weight:p="regular",mirrored:m=!1,...g}=c.useContext(mg);return c.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:o??f,height:o??f,fill:r??d,viewBox:"0 0 256 256",transform:a||m?"scale(-1, 1)":void 0,...g,...u},!!n&&c.createElement("title",null,n),i,l.get(s??p))});me.displayName="IconBase";const iu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:Gm}));iu.displayName="BellIcon";const gg=iu,cu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:Qm}));cu.displayName="CalendarIcon";const vg=cu,lu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:Ym}));lu.displayName="CaretDownIcon";const yg=lu,uu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:Xm}));uu.displayName="CaretLeftIcon";const ys=uu,du=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:Jm}));du.displayName="CaretRightIcon";const nr=du,fu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:eg}));fu.displayName="CheckIcon";const bg=fu,hu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:tg}));hu.displayName="DotsSixVerticalIcon";const xg=hu,pu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:ng}));pu.displayName="DotsThreeVerticalIcon";const wg=pu,mu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:rg}));mu.displayName="EyeIcon";const Eg=mu,gu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:og}));gu.displayName="FileTextIcon";const Sg=gu,vu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:sg}));vu.displayName="GearIcon";const Rg=vu,yu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:ag}));yu.displayName="GridFourIcon";const bu=yu,xu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:ig}));xu.displayName="ListIcon";const Cg=xu,wu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:cg}));wu.displayName="MagnifyingGlassIcon";const Ag=wu,Eu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:lg}));Eu.displayName="PencilSimpleIcon";const Pg=Eu,Su=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:ug}));Su.displayName="PushPinIcon";const Ru=Su,Cu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:dg}));Cu.displayName="SortAscendingIcon";const Tg=Cu,Au=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:fg}));Au.displayName="SpinnerIcon";const Mg=Au,Pu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:hg}));Pu.displayName="TagIcon";const _g=Pu,Tu=c.forwardRef((e,t)=>c.createElement(me,{ref:t,...e,weights:pg}));Tu.displayName="XIcon";const Mu=Tu;function Ng(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 ic=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cc=Uh,Re=(e,t)=>n=>{var r;if(t?.variants==null)return cc(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(u=>{const d=n?.[u],f=s?.[u];if(d===null)return null;const p=ic(d)||ic(f);return o[u][p]}),i=n&&Object.entries(n).reduce((u,d)=>{let[f,p]=d;return p===void 0||(u[f]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:p,...m}=d;return Object.entries(m).every(g=>{let[v,y]=g;return Array.isArray(y)?y.includes({...s,...i}[v]):{...s,...i}[v]===y})?[...u,f,p]:u},[]);return cc(e,a,l,n?.class,n?.className)},Og=Re(["inline-flex","items-center","justify-center","gap-2","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"}}),Gt=c.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isLoading:o,children:s,disabled:a,...i},l)=>{const u=r?Zm:"button";return h.jsx(u,{ref:l,className:Og({variant:t,size:n,className:e}),disabled:a||o,...i,children:o?h.jsxs(h.Fragment,{children:[h.jsx(Mg,{className:"animate-spin h-4 w-4"}),s]}):s})});Gt.displayName="Button";function V(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Ig(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 Ct(e,t=[]){let n=[];function r(s,a){const i=c.createContext(a),l=n.length;n=[...n,a];const u=f=>{const{scope:p,children:m,...g}=f,v=p?.[e]?.[l]||i,y=c.useMemo(()=>g,Object.values(g));return h.jsx(v.Provider,{value:y,children:m})};u.displayName=s+"Provider";function d(f,p){const m=p?.[e]?.[l]||i,g=c.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}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,Lg(o,...t)]}function Lg(...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 f=l(s)[`__scope${u}`];return{...i,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var _e=globalThis?.document?c.useLayoutEffect:()=>{},Dg=No[" useId ".trim().toString()]||(()=>{}),jg=0;function dt(e){const[t,n]=c.useState(Dg());return _e(()=>{n(r=>r??String(jg++))},[e]),t?`radix-${t}`:""}var Fg=No[" useInsertionEffect ".trim().toString()]||_e;function Rt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=kg({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const d=c.useRef(e!==void 0);c.useEffect(()=>{const f=d.current;f!==i&&console.warn(`${r} is changing from ${f?"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.`),d.current=i},[i,r])}const u=c.useCallback(d=>{if(i){const f=Hg(d)?d(e):d;f!==e&&a.current?.(f)}else s(d)},[i,e,s,a]);return[l,u]}function kg({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),s=c.useRef(t);return Fg(()=>{s.current=t},[t]),c.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Hg(e){return typeof e=="function"}function Tn(e){const t=$g(e),n=c.forwardRef((r,o)=>{const{children:s,...a}=r,i=c.Children.toArray(s),l=i.find(Bg);if(l){const u=l.props.children,d=i.map(f=>f===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:f);return h.jsx(t,{...a,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,d):null})}return h.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function $g(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const a=Ug(o),i=Zg(s,o.props);return o.type!==c.Fragment&&(i.ref=r?yr(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 _u=Symbol("radix.slottable");function Vg(e){const t=({children:n})=>h.jsx(h.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=_u,t}function Bg(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_u}function Zg(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 Ug(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 qg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],te=qg.reduce((e,t)=>{const n=Tn(`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 Nu(e,t){e&&wt.flushSync(()=>e.dispatchEvent(t))}function ft(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function zg(e,t=globalThis?.document){const n=ft(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 Kg="DismissableLayer",Qs="dismissableLayer.update",Wg="dismissableLayer.pointerDownOutside",Gg="dismissableLayer.focusOutside",lc,Ou=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),br=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...l}=e,u=c.useContext(Ou),[d,f]=c.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=c.useState({}),g=ae(t,R=>f(R)),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=d?v.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,E=x>=b,C=Xg(R=>{const S=R.target,M=[...u.branches].some(I=>I.contains(S));!E||M||(o?.(R),a?.(R),R.defaultPrevented||i?.())},p),N=Jg(R=>{const S=R.target;[...u.branches].some(I=>I.contains(S))||(s?.(R),a?.(R),R.defaultPrevented||i?.())},p);return zg(R=>{x===u.layers.size-1&&(r?.(R),!R.defaultPrevented&&i&&(R.preventDefault(),i()))},p),c.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(lc=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),uc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=lc)}},[d,p,n,u]),c.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),uc())},[d,u]),c.useEffect(()=>{const R=()=>m({});return document.addEventListener(Qs,R),()=>document.removeEventListener(Qs,R)},[]),h.jsx(te.div,{...l,ref:g,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,N.onFocusCapture),onBlurCapture:V(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})});br.displayName=Kg;var Qg="DismissableLayerBranch",Yg=c.forwardRef((e,t)=>{const n=c.useContext(Ou),r=c.useRef(null),o=ae(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx(te.div,{...e,ref:o})});Yg.displayName=Qg;function Xg(e,t=globalThis?.document){const n=ft(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let l=function(){Iu(Wg,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 Jg(e,t=globalThis?.document){const n=ft(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&Iu(Gg,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(Qs);document.dispatchEvent(e)}function Iu(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?Nu(o,s):o.dispatchEvent(s)}var bs="focusScope.autoFocusOnMount",xs="focusScope.autoFocusOnUnmount",dc={bubbles:!1,cancelable:!0},e2="FocusScope",Vo=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,l]=c.useState(null),u=ft(o),d=ft(s),f=c.useRef(null),p=ae(t,v=>l(v)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let v=function(w){if(m.paused||!i)return;const E=w.target;i.contains(E)?f.current=E:Nt(f.current,{select:!0})},y=function(w){if(m.paused||!i)return;const E=w.relatedTarget;E!==null&&(i.contains(E)||Nt(f.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&Nt(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const x=new MutationObserver(b);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),x.disconnect()}}},[r,i,m.paused]),c.useEffect(()=>{if(i){hc.add(m);const v=document.activeElement;if(!i.contains(v)){const b=new CustomEvent(bs,dc);i.addEventListener(bs,u),i.dispatchEvent(b),b.defaultPrevented||(t2(a2(Lu(i)),{select:!0}),document.activeElement===v&&Nt(i))}return()=>{i.removeEventListener(bs,u),setTimeout(()=>{const b=new CustomEvent(xs,dc);i.addEventListener(xs,d),i.dispatchEvent(b),b.defaultPrevented||Nt(v??document.body,{select:!0}),i.removeEventListener(xs,d),hc.remove(m)},0)}}},[i,u,d,m]);const g=c.useCallback(v=>{if(!n&&!r||m.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(y&&b){const x=v.currentTarget,[w,E]=n2(x);w&&E?!v.shiftKey&&b===E?(v.preventDefault(),n&&Nt(w,{select:!0})):v.shiftKey&&b===w&&(v.preventDefault(),n&&Nt(E,{select:!0})):b===x&&v.preventDefault()}},[n,r,m.paused]);return h.jsx(te.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})});Vo.displayName=e2;function t2(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Nt(r,{select:t}),document.activeElement!==n)return}function n2(e){const t=Lu(e),n=fc(t,e),r=fc(t.reverse(),e);return[n,r]}function Lu(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 fc(e,t){for(const n of e)if(!r2(n,{upTo:t}))return n}function r2(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 o2(e){return e instanceof HTMLInputElement&&"select"in e}function Nt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&o2(e)&&t&&e.select()}}var hc=s2();function s2(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=pc(e,t),e.unshift(t)},remove(t){e=pc(e,t),e[0]?.resume()}}}function pc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function a2(e){return e.filter(t=>t.tagName!=="A")}var i2="Portal",xr=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=c.useState(!1);_e(()=>s(!0),[]);const a=n||o&&globalThis?.document?.body;return a?qh.createPortal(h.jsx(te.div,{...r,ref:t}),a):null});xr.displayName=i2;function c2(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var pt=e=>{const{present:t,children:n}=e,r=l2(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=ae(r.ref,u2(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};pt.displayName="Presence";function l2(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,l]=c2(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Zr(r.current);s.current=i==="mounted"?u:"none"},[i]),_e(()=>{const u=r.current,d=o.current;if(d!==e){const p=s.current,m=Zr(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),_e(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const v=Zr(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(l("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=m=>{m.target===t&&(s.current=Zr(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Zr(e){return e?.animationName||"none"}function u2(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 ws=0;function ka(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mc()),document.body.insertAdjacentElement("beforeend",e[1]??mc()),ws++,()=>{ws===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ws--}},[])}function mc(){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},bn=new WeakMap,Ur=new WeakMap,qr={},Es=0,Du=function(e){return e&&(e.host||Du(e.parentNode))},f2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Du(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})},h2=function(e,t,n,r){var o=f2(t,Array.isArray(e)?e:[e]);qr[n]||(qr[n]=new WeakMap);var s=qr[n],a=[],i=new Set,l=new Set(o),u=function(f){!f||i.has(f)||(i.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(i.has(p))d(p);else try{var m=p.getAttribute(r),g=m!==null&&m!=="false",v=(bn.get(p)||0)+1,y=(s.get(p)||0)+1;bn.set(p,v),s.set(p,y),a.push(p),v===1&&g&&Ur.set(p,!0),y===1&&p.setAttribute(n,"true"),g||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return d(t),i.clear(),Es++,function(){a.forEach(function(f){var p=bn.get(f)-1,m=s.get(f)-1;bn.set(f,p),s.set(f,m),p||(Ur.has(f)||f.removeAttribute(r),Ur.delete(f)),m||f.removeAttribute(n)}),Es--,Es||(bn=new WeakMap,bn=new WeakMap,Ur=new WeakMap,qr={})}},Ha=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"))),h2(r,o,n,"aria-hidden")):function(){return null}},Bo="Dialog",[ju]=Ct(Bo),[p2,at]=ju(Bo),Fu=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,d]=Rt({prop:r,defaultProp:o??!1,onChange:s,caller:Bo});return h.jsx(p2,{scope:t,triggerRef:i,contentRef:l,contentId:dt(),titleId:dt(),descriptionId:dt(),open:u,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),modal:a,children:n})};Fu.displayName=Bo;var ku="DialogTrigger",m2=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(ku,n),s=ae(t,o.triggerRef);return h.jsx(te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ba(o.open),...r,ref:s,onClick:V(e.onClick,o.onOpenToggle)})});m2.displayName=ku;var $a="DialogPortal",[g2,Hu]=ju($a,{forceMount:void 0}),$u=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=at($a,t);return h.jsx(g2,{scope:t,forceMount:n,children:c.Children.map(r,a=>h.jsx(pt,{present:n||s.open,children:h.jsx(xr,{asChild:!0,container:o,children:a})}))})};$u.displayName=$a;var yo="DialogOverlay",Vu=c.forwardRef((e,t)=>{const n=Hu(yo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=at(yo,e.__scopeDialog);return s.modal?h.jsx(pt,{present:r||s.open,children:h.jsx(y2,{...o,ref:t})}):null});Vu.displayName=yo;var v2=Tn("DialogOverlay.RemoveScroll"),y2=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(yo,n);return h.jsx(Ea,{as:v2,allowPinchZoom:!0,shards:[o.contentRef],children:h.jsx(te.div,{"data-state":Ba(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),an="DialogContent",Bu=c.forwardRef((e,t)=>{const n=Hu(an,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=at(an,e.__scopeDialog);return h.jsx(pt,{present:r||s.open,children:s.modal?h.jsx(b2,{...o,ref:t}):h.jsx(x2,{...o,ref:t})})});Bu.displayName=an;var b2=c.forwardRef((e,t)=>{const n=at(an,e.__scopeDialog),r=c.useRef(null),o=ae(t,n.contentRef,r);return c.useEffect(()=>{const s=r.current;if(s)return Ha(s)},[]),h.jsx(Zu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:V(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:V(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:V(e.onFocusOutside,s=>s.preventDefault())})}),x2=c.forwardRef((e,t)=>{const n=at(an,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return h.jsx(Zu,{...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()}})}),Zu=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=at(an,n),l=c.useRef(null),u=ae(t,l);return ka(),h.jsxs(h.Fragment,{children:[h.jsx(Vo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:h.jsx(br,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Ba(i.open),...a,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(w2,{titleId:i.titleId}),h.jsx(S2,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Va="DialogTitle",Uu=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(Va,n);return h.jsx(te.h2,{id:o.titleId,...r,ref:t})});Uu.displayName=Va;var qu="DialogDescription",zu=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(qu,n);return h.jsx(te.p,{id:o.descriptionId,...r,ref:t})});zu.displayName=qu;var Ku="DialogClose",Wu=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=at(Ku,n);return h.jsx(te.button,{type:"button",...r,ref:t,onClick:V(e.onClick,()=>o.onOpenChange(!1))})});Wu.displayName=Ku;function Ba(e){return e?"open":"closed"}var Gu="DialogTitleWarning",[XE,Qu]=Ig(Gu,{contentName:an,titleName:Va,docsSlug:"dialog"}),w2=({titleId:e})=>{const t=Qu(Gu),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},E2="DialogDescriptionWarning",S2=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Qu(E2).contentName}}.`;return c.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},R2=Fu,C2=$u,Yu=Vu,Xu=Bu,Ju=Uu,ed=zu,A2=Wu,Ss={exports:{}};var gc;function P2(){return gc||(gc=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})()})(Ss)),Ss.exports}var T2=P2();const ue=Nn(T2),M2=Re(["fixed","left-1/2","top-1/2","z-[1100]","-translate-x-1/2","-translate-y-1/2","w-[calc(100vw-2rem)]","max-h-[calc(100vh-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"}}),_2=Re(["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"}}),N2=Re("",{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"}}),O2=Re(["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"}}),I2=Re(["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"}}),L2=Re("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"}}),D2=Re("text-fg-secondary",{variants:{variant:{default:"text-meta",compact:"text-meta",form:"text-meta",inspect:"text-meta",confirm:"text-meta"}},defaultVariants:{variant:"default"}}),j2=R2,F2=C2,k2=A2,td=c.createContext("default"),wr=()=>c.useContext(td),nd=c.forwardRef(({className:e,...t},n)=>h.jsx(Yu,{ref:n,className:ue("fixed","inset-0","z-[1100]","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}));nd.displayName=Yu.displayName;const rd=c.forwardRef(({className:e,children:t,variant:n="default",...r},o)=>h.jsxs(F2,{children:[h.jsx(nd,{}),h.jsx(Xu,{ref:o,"data-dialog-variant":n,className:M2({variant:n,className:e}),...r,children:h.jsx(td.Provider,{value:n,children:t})})]}));rd.displayName=Xu.displayName;const od=({title:e,onClose:t,className:n})=>{const r=wr();return h.jsxs("div",{className:_2({variant:r,className:n}),children:[h.jsx(id,{children:e}),t&&h.jsx(k2,{asChild:!0,children:h.jsx("button",{type:"button",className:I2({variant:r}),onClick:t,children:h.jsx(Mu,{className:r==="compact"||r==="form"||r==="confirm"?"h-[18px] w-[18px]":"h-5 w-5"})})})]})};od.displayName="DialogHeader";const sd=c.forwardRef(({className:e,...t},n)=>{const r=wr();return h.jsx("div",{ref:n,className:N2({variant:r,className:e}),...t})});sd.displayName="DialogBody";const ad=c.forwardRef(({className:e,...t},n)=>{const r=wr();return h.jsx("div",{ref:n,className:O2({variant:r,className:e}),...t})});ad.displayName="DialogFooter";const id=c.forwardRef(({className:e,...t},n)=>{const r=wr();return h.jsx(Ju,{ref:n,className:ue(L2({variant:r}),e),...t})});id.displayName=Ju.displayName;const cd=c.forwardRef(({className:e,...t},n)=>{const r=wr();return h.jsx(ed,{ref:n,className:ue(D2({variant:r}),e),...t})});cd.displayName=ed.displayName;const Jt=({isOpen:e,onClose:t,children:n,className:r,variant:o="default"})=>h.jsx(j2,{open:e,onOpenChange:s=>!s&&t(),children:h.jsx(rd,{variant:o,className:r,children:n})});Jt.Header=od;Jt.Body=sd;Jt.Footer=ad;Jt.Description=cd;const H2=Re("",{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 d=e;return h.jsx(d,{className:H2({variant:n,weight:r,tone:o,tracking:s,transform:a,truncate:i,className:t}),...u,children:l})}const ld=c.createContext(null);function $2({children:e}){const[t,n]=c.useState(!1),[r,o]=c.useState(""),s=c.useRef(null),a=c.useCallback(u=>(o(u),n(!0),new Promise(d=>{s.current=d})),[]),i=()=>{s.current?.(!0),s.current=null,n(!1)},l=()=>{s.current?.(!1),s.current=null,n(!1)};return h.jsxs(ld.Provider,{value:{confirm:a},children:[e,h.jsxs(Jt,{isOpen:t,onClose:l,variant:"confirm",children:[h.jsxs(Jt.Body,{children:[h.jsx(se,{as:"p",variant:"subheading",weight:"semibold",tracking:"tight",children:"Confirm"}),h.jsx(se,{as:"p",variant:"meta",tone:"secondary",children:r})]}),h.jsxs(Jt.Footer,{children:[h.jsx(Gt,{variant:"ghost",size:"sm",onClick:l,children:"Cancel"}),h.jsx(Gt,{variant:"danger",size:"sm",onClick:i,children:"OK"})]})]})]})}function ud(){const e=c.useContext(ld);if(!e)throw new Error("useConfirm must be used within a ConfirmProvider");return e.confirm}const dd=c.createContext(null);let V2=0;function B2({children:e}){const[t,n]=c.useState([]),r=c.useRef(new Map),o=c.useCallback(s=>{const a=V2++;n(l=>[...l,{id:a,message:s}]);const i=setTimeout(()=>{n(l=>l.filter(u=>u.id!==a)),r.current.delete(a)},3e3);r.current.set(a,i)},[]);return c.useEffect(()=>{const s=r.current;return()=>{s.forEach(a=>clearTimeout(a))}},[]),h.jsxs(dd.Provider,{value:{toast:o},children:[e,t.length>0&&h.jsx("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-[1200] flex flex-col gap-2 items-center",children:t.map(s=>h.jsx("div",{className:"surface-floating whitespace-nowrap px-5 py-3 text-sm font-medium text-fg-secondary animate-slide-in-from-bottom",children:s.message},s.id))})]})}function fd(){const e=c.useContext(dd);if(!e)throw new Error("useToast must be used within a ToastProvider");return e.toast}const Z2=new Am({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});function hd(e,t){return function(){return e.apply(t,arguments)}}const{toString:U2}=Object.prototype,{getPrototypeOf:Za}=Object,{iterator:Zo,toStringTag:pd}=Symbol,Uo=(e=>t=>{const n=U2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),it=e=>(e=e.toLowerCase(),t=>Uo(t)===e),qo=e=>t=>typeof t===e,{isArray:Ln}=Array,Mn=qo("undefined");function Er(e){return e!==null&&!Mn(e)&&e.constructor!==null&&!Mn(e.constructor)&&He(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const md=it("ArrayBuffer");function q2(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&md(e.buffer),t}const z2=qo("string"),He=qo("function"),gd=qo("number"),Sr=e=>e!==null&&typeof e=="object",K2=e=>e===!0||e===!1,Jr=e=>{if(Uo(e)!=="object")return!1;const t=Za(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(pd in e)&&!(Zo in e)},W2=e=>{if(!Sr(e)||Er(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},G2=it("Date"),Q2=it("File"),Y2=e=>!!(e&&typeof e.uri<"u"),X2=e=>e&&typeof e.getParts<"u",J2=it("Blob"),ev=it("FileList"),tv=e=>Sr(e)&&He(e.pipe);function nv(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const vc=nv(),yc=typeof vc.FormData<"u"?vc.FormData:void 0,rv=e=>{let t;return e&&(yc&&e instanceof yc||He(e.append)&&((t=Uo(e))==="formdata"||t==="object"&&He(e.toString)&&e.toString()==="[object FormData]"))},ov=it("URLSearchParams"),[sv,av,iv,cv]=["ReadableStream","Request","Response","Headers"].map(it),lv=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Ln(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Er(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 vd(e,t){if(Er(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 Qt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,yd=e=>!Mn(e)&&e!==Qt;function Ys(){const{caseless:e,skipUndefined:t}=yd(this)&&this||{},n={},r=(o,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const a=e&&vd(n,s)||s;Jr(n[a])&&Jr(o)?n[a]=Ys(n[a],o):Jr(o)?n[a]=Ys({},o):Ln(o)?n[a]=o.slice():(!t||!Mn(o))&&(n[a]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&Rr(arguments[o],r);return n}const uv=(e,t,n,{allOwnKeys:r}={})=>(Rr(t,(o,s)=>{n&&He(o)?Object.defineProperty(e,s,{value:hd(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),dv=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),fv=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},hv=(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&&Za(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},pv=(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},mv=e=>{if(!e)return null;if(Ln(e))return e;let t=e.length;if(!gd(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},gv=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Za(Uint8Array)),vv=(e,t)=>{const r=(e&&e[Zo]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},yv=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},bv=it("HTMLFormElement"),xv=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),bc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),wv=it("RegExp"),bd=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Rr(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},Ev=e=>{bd(e,(t,n)=>{if(He(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(He(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+"'")})}})},Sv=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Ln(e)?r(e):r(String(e).split(t)),n},Rv=()=>{},Cv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Av(e){return!!(e&&He(e.append)&&e[pd]==="FormData"&&e[Zo])}const Pv=e=>{const t=new Array(10),n=(r,o)=>{if(Sr(r)){if(t.indexOf(r)>=0)return;if(Er(r))return r;if(!("toJSON"in r)){t[o]=r;const s=Ln(r)?[]:{};return Rr(r,(a,i)=>{const l=n(a,o+1);!Mn(l)&&(s[i]=l)}),t[o]=void 0,s}}return r};return n(e,0)},Tv=it("AsyncFunction"),Mv=e=>e&&(Sr(e)||He(e))&&He(e.then)&&He(e.catch),xd=((e,t)=>e?setImmediate:t?((n,r)=>(Qt.addEventListener("message",({source:o,data:s})=>{o===Qt&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Qt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",He(Qt.postMessage)),_v=typeof queueMicrotask<"u"?queueMicrotask.bind(Qt):typeof process<"u"&&process.nextTick||xd,Nv=e=>e!=null&&He(e[Zo]),A={isArray:Ln,isArrayBuffer:md,isBuffer:Er,isFormData:rv,isArrayBufferView:q2,isString:z2,isNumber:gd,isBoolean:K2,isObject:Sr,isPlainObject:Jr,isEmptyObject:W2,isReadableStream:sv,isRequest:av,isResponse:iv,isHeaders:cv,isUndefined:Mn,isDate:G2,isFile:Q2,isReactNativeBlob:Y2,isReactNative:X2,isBlob:J2,isRegExp:wv,isFunction:He,isStream:tv,isURLSearchParams:ov,isTypedArray:gv,isFileList:ev,forEach:Rr,merge:Ys,extend:uv,trim:lv,stripBOM:dv,inherits:fv,toFlatObject:hv,kindOf:Uo,kindOfTest:it,endsWith:pv,toArray:mv,forEachEntry:vv,matchAll:yv,isHTMLForm:bv,hasOwnProperty:bc,hasOwnProp:bc,reduceDescriptors:bd,freezeMethods:Ev,toObjectSet:Sv,toCamelCase:xv,noop:Rv,toFiniteNumber:Cv,findKey:vd,global:Qt,isContextDefined:yd,isSpecCompliantForm:Av,toJSONObject:Pv,isAsyncFn:Tv,isThenable:Mv,setImmediate:xd,asap:_v,isIterable:Nv};let z=class wd extends Error{static from(t,n,r,o,s,a){const i=new wd(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",{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(){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:A.toJSONObject(this.config),code:this.code,status:this.status}}};z.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";z.ERR_BAD_OPTION="ERR_BAD_OPTION";z.ECONNABORTED="ECONNABORTED";z.ETIMEDOUT="ETIMEDOUT";z.ERR_NETWORK="ERR_NETWORK";z.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";z.ERR_DEPRECATED="ERR_DEPRECATED";z.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";z.ERR_BAD_REQUEST="ERR_BAD_REQUEST";z.ERR_CANCELED="ERR_CANCELED";z.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";z.ERR_INVALID_URL="ERR_INVALID_URL";const Ov=null;function Xs(e){return A.isPlainObject(e)||A.isArray(e)}function Ed(e){return A.endsWith(e,"[]")?e.slice(0,-2):e}function Rs(e,t,n){return e?e.concat(t).map(function(o,s){return o=Ed(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Iv(e){return A.isArray(e)&&!e.some(Xs)}const Lv=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function zo(e,t,n){if(!A.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=A.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!A.isUndefined(y[v])});const r=n.metaTokens,o=n.visitor||d,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(t);if(!A.isFunction(o))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(A.isDate(g))return g.toISOString();if(A.isBoolean(g))return g.toString();if(!l&&A.isBlob(g))throw new z("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(g)||A.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,v,y){let b=g;if(A.isReactNative(t)&&A.isReactNativeBlob(g))return t.append(Rs(y,v,s),u(g)),!1;if(g&&!y&&typeof g=="object"){if(A.endsWith(v,"{}"))v=r?v:v.slice(0,-2),g=JSON.stringify(g);else if(A.isArray(g)&&Iv(g)||(A.isFileList(g)||A.endsWith(v,"[]"))&&(b=A.toArray(g)))return v=Ed(v),b.forEach(function(w,E){!(A.isUndefined(w)||w===null)&&t.append(a===!0?Rs([v],E,s):a===null?v:v+"[]",u(w))}),!1}return Xs(g)?!0:(t.append(Rs(y,v,s),u(g)),!1)}const f=[],p=Object.assign(Lv,{defaultVisitor:d,convertValue:u,isVisitable:Xs});function m(g,v){if(!A.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(g),A.forEach(g,function(b,x){(!(A.isUndefined(b)||b===null)&&o.call(t,b,A.isString(x)?x.trim():x,v,p))===!0&&m(b,v?v.concat(x):[x])}),f.pop()}}if(!A.isObject(e))throw new TypeError("data must be an object");return m(e),t}function xc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ua(e,t){this._pairs=[],e&&zo(e,this,t)}const Sd=Ua.prototype;Sd.append=function(t,n){this._pairs.push([t,n])};Sd.toString=function(t){const n=t?function(r){return t.call(this,r,xc)}:xc;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Dv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Rd(e,t,n){if(!t)return e;const r=n&&n.encode||Dv,o=A.isFunction(n)?{serialize:n}:n,s=o&&o.serialize;let a;if(s?a=s(t,o):a=A.isURLSearchParams(t)?t.toString():new Ua(t,o).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class wc{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){A.forEach(this.handlers,function(r){r!==null&&t(r)})}}const qa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},jv=typeof URLSearchParams<"u"?URLSearchParams:Ua,Fv=typeof FormData<"u"?FormData:null,kv=typeof Blob<"u"?Blob:null,Hv={isBrowser:!0,classes:{URLSearchParams:jv,FormData:Fv,Blob:kv},protocols:["http","https","file","blob","url","data"]},za=typeof window<"u"&&typeof document<"u",Js=typeof navigator=="object"&&navigator||void 0,$v=za&&(!Js||["ReactNative","NativeScript","NS"].indexOf(Js.product)<0),Vv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Bv=za&&window.location.href||"http://localhost",Zv=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:za,hasStandardBrowserEnv:$v,hasStandardBrowserWebWorkerEnv:Vv,navigator:Js,origin:Bv},Symbol.toStringTag,{value:"Module"})),Me={...Zv,...Hv};function Uv(e,t){return zo(e,new Me.classes.URLSearchParams,{visitor:function(n,r,o,s){return Me.isNode&&A.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function qv(e){return A.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function zv(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 Cd(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&&A.isArray(o)?o.length:a,l?(A.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!A.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&A.isArray(o[a])&&(o[a]=zv(o[a])),!i)}if(A.isFormData(e)&&A.isFunction(e.entries)){const n={};return A.forEachEntry(e,(r,o)=>{t(qv(r),o,n,0)}),n}return null}function Kv(e,t,n){if(A.isString(e))try{return(t||JSON.parse)(e),A.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Cr={transitional:qa,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=A.isObject(t);if(s&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return o?JSON.stringify(Cd(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t)||A.isReadableStream(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Uv(t,this.formSerializer).toString();if((i=A.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return zo(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Kv(t)):t}],transformResponse:[function(t){const n=this.transitional||Cr.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(A.isResponse(t)||A.isReadableStream(t))return t;if(t&&A.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(i){if(a)throw i.name==="SyntaxError"?z.from(i,z.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Me.classes.FormData,Blob:Me.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],e=>{Cr.headers[e]={}});const Wv=A.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"]),Gv=e=>{const t={};let n,r,o;return e&&e.split(`
7
- `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&Wv[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ec=Symbol("internals"),Qv=e=>!/[\r\n]/.test(e);function Ad(e,t){if(!(e===!1||e==null)){if(A.isArray(e)){e.forEach(n=>Ad(n,t));return}if(!Qv(String(e)))throw new Error(`Invalid character in header content ["${t}"]`)}}function Gn(e){return e&&String(e).trim().toLowerCase()}function Yv(e){let t=e.length;for(;t>0;){const n=e.charCodeAt(t-1);if(n!==10&&n!==13)break;t-=1}return t===e.length?e:e.slice(0,t)}function eo(e){return e===!1||e==null?e:A.isArray(e)?e.map(eo):Yv(String(e))}function Xv(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 Jv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Cs(e,t,n,r,o){if(A.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!A.isString(t)){if(A.isString(r))return t.indexOf(r)!==-1;if(A.isRegExp(r))return r.test(t)}}function e6(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function t6(e,t){const n=A.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}let $e=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,l,u){const d=Gn(l);if(!d)throw new Error("header name must be a non-empty string");const f=A.findKey(o,d);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(Ad(i,l),o[f||l]=eo(i))}const a=(i,l)=>A.forEach(i,(u,d)=>s(u,d,l));if(A.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(A.isString(t)&&(t=t.trim())&&!Jv(t))a(Gv(t),n);else if(A.isObject(t)&&A.isIterable(t)){let i={},l,u;for(const d of t){if(!A.isArray(d))throw TypeError("Object iterator must return a key-value pair");i[u=d[0]]=(l=i[u])?A.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}a(i,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=Gn(t),t){const r=A.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Xv(o);if(A.isFunction(n))return n.call(this,o,r);if(A.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Gn(t),t){const r=A.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Cs(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=Gn(a),a){const i=A.findKey(r,a);i&&(!n||Cs(r,r[i],i,n))&&(delete r[i],o=!0)}}return A.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||Cs(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return A.forEach(this,(o,s)=>{const a=A.findKey(r,s);if(a){n[a]=eo(o),delete n[s];return}const i=t?e6(s):String(s).trim();i!==s&&delete n[s],n[i]=eo(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return A.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&A.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(`
8
- `)}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[Ec]=this[Ec]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Gn(a);r[i]||(t6(o,a),r[i]=!0)}return A.isArray(t)?t.forEach(s):s(t),this}};$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);A.reduceDescriptors($e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});A.freezeMethods($e);function As(e,t){const n=this||Cr,r=t||n,o=$e.from(r.headers);let s=r.data;return A.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Pd(e){return!!(e&&e.__CANCEL__)}let Ar=class extends z{constructor(t,n,r){super(t??"canceled",z.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Td(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new z("Request failed with status code "+n.status,[z.ERR_BAD_REQUEST,z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function n6(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function r6(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(),d=r[s];a||(a=u),n[o]=l,r[o]=u;let f=s,p=0;for(;f!==o;)p+=n[f++],f=f%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-a<t)return;const m=d&&u-d;return m?Math.round(p*1e3/m):void 0}}function o6(e,t){let n=0,r=1e3/t,o,s;const a=(u,d=Date.now())=>{n=d,o=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=r?a(u,d):(o=u,s||(s=setTimeout(()=>{s=null,a(o)},r-f)))},()=>o&&a(o)]}const bo=(e,t,n=3)=>{let r=0;const o=r6(50,250);return o6(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,l=a-r,u=o(l),d=a<=i;r=a;const f={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:u||void 0,estimated:u&&i&&d?(i-a)/u:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(f)},n)},Sc=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Rc=e=>(...t)=>A.asap(()=>e(...t)),s6=Me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Me.origin),Me.navigator&&/(msie|trident)/i.test(Me.navigator.userAgent)):()=>!0,a6=Me.hasStandardBrowserEnv?{write(e,t,n,r,o,s,a){if(typeof document>"u")return;const i=[`${e}=${encodeURIComponent(t)}`];A.isNumber(n)&&i.push(`expires=${new Date(n).toUTCString()}`),A.isString(r)&&i.push(`path=${r}`),A.isString(o)&&i.push(`domain=${o}`),s===!0&&i.push("secure"),A.isString(a)&&i.push(`SameSite=${a}`),document.cookie=i.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function i6(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function c6(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Md(e,t,n){let r=!i6(t);return e&&(r||n==!1)?c6(e,t):t}const Cc=e=>e instanceof $e?{...e}:e;function cn(e,t){t=t||{};const n={};function r(u,d,f,p){return A.isPlainObject(u)&&A.isPlainObject(d)?A.merge.call({caseless:p},u,d):A.isPlainObject(d)?A.merge({},d):A.isArray(d)?d.slice():d}function o(u,d,f,p){if(A.isUndefined(d)){if(!A.isUndefined(u))return r(void 0,u,f,p)}else return r(u,d,f,p)}function s(u,d){if(!A.isUndefined(d))return r(void 0,d)}function a(u,d){if(A.isUndefined(d)){if(!A.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function i(u,d,f){if(f in t)return r(u,d);if(f in e)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,responseEncoding:a,validateStatus:i,headers:(u,d,f)=>o(Cc(u),Cc(d),f,!0)};return A.forEach(Object.keys({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const f=A.hasOwnProp(l,d)?l[d]:o,p=f(e[d],t[d],d);A.isUndefined(p)&&f!==i||(n[d]=p)}),n}const _d=e=>{const t=cn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;if(t.headers=a=$e.from(a),t.url=Rd(Md(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),A.isFormData(n)){if(Me.hasStandardBrowserEnv||Me.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(A.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([d,f])=>{u.includes(d.toLowerCase())&&a.set(d,f)})}}if(Me.hasStandardBrowserEnv&&(r&&A.isFunction(r)&&(r=r(t)),r||r!==!1&&s6(t.url))){const l=o&&s&&a6.read(s);l&&a.set(o,l)}return t},l6=typeof XMLHttpRequest<"u",u6=l6&&function(e){return new Promise(function(n,r){const o=_d(e);let s=o.data;const a=$e.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:u}=o,d,f,p,m,g;function v(){m&&m(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function b(){if(!y)return;const w=$e.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),C={data:!i||i==="text"||i==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:w,config:e,request:y};Td(function(R){n(R),v()},function(R){r(R),v()},C),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(r(new z("Request aborted",z.ECONNABORTED,e,y)),y=null)},y.onerror=function(E){const C=E&&E.message?E.message:"Network Error",N=new z(C,z.ERR_NETWORK,e,y);N.event=E||null,r(N),y=null},y.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const C=o.transitional||qa;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new z(E,C.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,e,y)),y=null},s===void 0&&a.setContentType(null),"setRequestHeader"in y&&A.forEach(a.toJSON(),function(E,C){y.setRequestHeader(C,E)}),A.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),i&&i!=="json"&&(y.responseType=o.responseType),u&&([p,g]=bo(u,!0),y.addEventListener("progress",p)),l&&y.upload&&([f,m]=bo(l),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(d=w=>{y&&(r(!w||w.type?new Ar(null,e,y):w),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const x=n6(o.url);if(x&&Me.protocols.indexOf(x)===-1){r(new z("Unsupported protocol "+x+":",z.ERR_BAD_REQUEST,e));return}y.send(s||null)})},d6=(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 d=u instanceof Error?u:this.reason;r.abort(d instanceof z?d:new Ar(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,s(new z(`timeout of ${t}ms exceeded`,z.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=()=>A.asap(i),l}},f6=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},h6=async function*(e,t){for await(const n of p6(e))yield*f6(n,t)},p6=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()}},Ac=(e,t,n,r)=>{const o=h6(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:d}=await o.next();if(u){i(),l.close();return}let f=d.byteLength;if(n){let p=s+=f;n(p)}l.enqueue(new Uint8Array(d))}catch(u){throw i(u),u}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},Pc=64*1024,{isFunction:zr}=A,m6=(({Request:e,Response:t})=>({Request:e,Response:t}))(A.global),{ReadableStream:Tc,TextEncoder:Mc}=A.global,_c=(e,...t)=>{try{return!!e(...t)}catch{return!1}},g6=e=>{e=A.merge.call({skipUndefined:!0},m6,e);const{fetch:t,Request:n,Response:r}=e,o=t?zr(t):typeof fetch=="function",s=zr(n),a=zr(r);if(!o)return!1;const i=o&&zr(Tc),l=o&&(typeof Mc=="function"?(g=>v=>g.encode(v))(new Mc):async g=>new Uint8Array(await new n(g).arrayBuffer())),u=s&&i&&_c(()=>{let g=!1;const v=new Tc,y=new n(Me.origin,{body:v,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return v.cancel(),g&&!y}),d=a&&i&&_c(()=>A.isReadableStream(new r("").body)),f={stream:d&&(g=>g.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!f[g]&&(f[g]=(v,y)=>{let b=v&&v[g];if(b)return b.call(v);throw new z(`Response type '${g}' is not supported`,z.ERR_NOT_SUPPORT,y)})});const p=async g=>{if(g==null)return 0;if(A.isBlob(g))return g.size;if(A.isSpecCompliantForm(g))return(await new n(Me.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(A.isArrayBufferView(g)||A.isArrayBuffer(g))return g.byteLength;if(A.isURLSearchParams(g)&&(g=g+""),A.isString(g))return(await l(g)).byteLength},m=async(g,v)=>{const y=A.toFiniteNumber(g.getContentLength());return y??p(v)};return async g=>{let{url:v,method:y,data:b,signal:x,cancelToken:w,timeout:E,onDownloadProgress:C,onUploadProgress:N,responseType:R,headers:S,withCredentials:M="same-origin",fetchOptions:I}=_d(g),T=t||fetch;R=R?(R+"").toLowerCase():"text";let F=d6([x,w&&w.toAbortSignal()],E),B=null;const L=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let D;try{if(N&&u&&y!=="get"&&y!=="head"&&(D=await m(S,b))!==0){let Z=new n(v,{method:"POST",body:b,duplex:"half"}),U;if(A.isFormData(b)&&(U=Z.headers.get("content-type"))&&S.setContentType(U),Z.body){const[G,q]=Sc(D,bo(Rc(N)));b=Ac(Z.body,Pc,G,q)}}A.isString(M)||(M=M?"include":"omit");const P=s&&"credentials"in n.prototype,j={...I,signal:F,method:y.toUpperCase(),headers:S.normalize().toJSON(),body:b,duplex:"half",credentials:P?M:void 0};B=s&&new n(v,j);let O=await(s?T(B,I):T(v,j));const _=d&&(R==="stream"||R==="response");if(d&&(C||_&&L)){const Z={};["status","statusText","headers"].forEach(Q=>{Z[Q]=O[Q]});const U=A.toFiniteNumber(O.headers.get("content-length")),[G,q]=C&&Sc(U,bo(Rc(C),!0))||[];O=new r(Ac(O.body,Pc,G,()=>{q&&q(),L&&L()}),Z)}R=R||"text";let $=await f[A.findKey(f,R)||"text"](O,g);return!_&&L&&L(),await new Promise((Z,U)=>{Td(Z,U,{data:$,headers:$e.from(O.headers),status:O.status,statusText:O.statusText,config:g,request:B})})}catch(P){throw L&&L(),P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)?Object.assign(new z("Network Error",z.ERR_NETWORK,g,B,P&&P.response),{cause:P.cause||P}):z.from(P,P&&P.code,g,B,P&&P.response)}}},v6=new Map,Nd=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,d=v6;for(;i--;)l=s[i],u=d.get(l),u===void 0&&d.set(l,u=i?new Map:g6(t)),d=u;return u};Nd();const Ka={http:Ov,xhr:u6,fetch:{get:Nd}};A.forEach(Ka,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Nc=e=>`- ${e}`,y6=e=>A.isFunction(e)||e===null||e===!1;function b6(e,t){e=A.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,!y6(r)&&(o=Ka[(i=String(r)).toLowerCase()],o===void 0))throw new z(`Unknown adapter '${i}'`);if(o&&(A.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 :
9
- `+a.map(Nc).join(`
10
- `):" "+Nc(a[0]):"as no adapter specified";throw new z("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o}const Od={getAdapter:b6,adapters:Ka};function Ps(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ar(null,e)}function Oc(e){return Ps(e),e.headers=$e.from(e.headers),e.data=As.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Od.getAdapter(e.adapter||Cr.adapter,e)(e).then(function(r){return Ps(e),r.data=As.call(e,e.transformResponse,r),r.headers=$e.from(r.headers),r},function(r){return Pd(r)||(Ps(e),r&&r.response&&(r.response.data=As.call(e,e.transformResponse,r.response),r.response.headers=$e.from(r.response.headers))),Promise.reject(r)})}const Id="1.15.0",Ko={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ko[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ic={};Ko.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Id+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new z(o(a," has been removed"+(n?" in "+n:"")),z.ERR_DEPRECATED);return n&&!Ic[a]&&(Ic[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}};Ko.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function x6(e,t,n){if(typeof e!="object")throw new z("options must be an object",z.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=t[s];if(a){const i=e[s],l=i===void 0||a(i,s,e);if(l!==!0)throw new z("option "+s+" must be "+l,z.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new z("Unknown option "+s,z.ERR_BAD_OPTION)}}const to={assertOptions:x6,validators:Ko},Ye=to.validators;let en=class{constructor(t){this.defaults=t||{},this.interceptors={request:new wc,response:new wc}}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(`
11
- `);return a===-1?"":o.stack.slice(a+1)})();try{if(!r.stack)r.stack=s;else if(s){const a=s.indexOf(`
12
- `),i=a===-1?-1:s.indexOf(`
13
- `,a+1),l=i===-1?"":s.slice(i+1);String(r.stack).endsWith(l)||(r.stack+=`
14
- `+s)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=cn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&to.assertOptions(r,{silentJSONParsing:Ye.transitional(Ye.boolean),forcedJSONParsing:Ye.transitional(Ye.boolean),clarifyTimeoutError:Ye.transitional(Ye.boolean),legacyInterceptorReqResOrdering:Ye.transitional(Ye.boolean)},!1),o!=null&&(A.isFunction(o)?n.paramsSerializer={serialize:o}:to.assertOptions(o,{encode:Ye.function,serialize:Ye.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),to.assertOptions(n,{baseUrl:Ye.spelling("baseURL"),withXsrfToken:Ye.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&A.merge(s.common,s[n.method]);s&&A.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=$e.concat(a,s);const i=[];let l=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;l=l&&v.synchronous;const y=n.transitional||qa;y&&y.legacyInterceptorReqResOrdering?i.unshift(v.fulfilled,v.rejected):i.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let d,f=0,p;if(!l){const g=[Oc.bind(this),void 0];for(g.unshift(...i),g.push(...u),p=g.length,d=Promise.resolve(n);f<p;)d=d.then(g[f++],g[f++]);return d}p=i.length;let m=n;for(;f<p;){const g=i[f++],v=i[f++];try{m=g(m)}catch(y){v.call(this,y);break}}try{d=Oc.call(this,m)}catch(g){return Promise.reject(g)}for(f=0,p=u.length;f<p;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=cn(this.defaults,t);const n=Md(t.baseURL,t.url,t.allowAbsoluteUrls);return Rd(n,t.params,t.paramsSerializer)}};A.forEach(["delete","get","head","options"],function(t){en.prototype[t]=function(n,r){return this.request(cn(r||{},{method:t,url:n,data:(r||{}).data}))}});A.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(cn(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}en.prototype[t]=n(),en.prototype[t+"Form"]=n(!0)});let w6=class Ld{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 Ar(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 Ld(function(o){t=o}),cancel:t}}};function E6(e){return function(n){return e.apply(null,n)}}function S6(e){return A.isObject(e)&&e.isAxiosError===!0}const ea={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(ea).forEach(([e,t])=>{ea[t]=e});function Dd(e){const t=new en(e),n=hd(en.prototype.request,t);return A.extend(n,en.prototype,t,{allOwnKeys:!0}),A.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Dd(cn(e,o))},n}const le=Dd(Cr);le.Axios=en;le.CanceledError=Ar;le.CancelToken=w6;le.isCancel=Pd;le.VERSION=Id;le.toFormData=zo;le.AxiosError=z;le.Cancel=le.CanceledError;le.all=function(t){return Promise.all(t)};le.spread=E6;le.isAxiosError=S6;le.mergeConfig=cn;le.AxiosHeaders=$e;le.formToJSON=e=>Cd(A.isHTMLForm(e)?new FormData(e):e);le.getAdapter=Od.getAdapter;le.HttpStatusCode=ea;le.default=le;const{Axios:nS,AxiosError:rS,CanceledError:oS,isCancel:sS,CancelToken:aS,VERSION:iS,all:cS,Cancel:lS,isAxiosError:uS,spread:dS,toFormData:fS,AxiosHeaders:hS,HttpStatusCode:pS,formToJSON:mS,getAdapter:gS,mergeConfig:vS}=le,jd="/auth/login";let Lc,Dc=!1;const R6=e=>{const t=`${e.pathname||"/"}${e.search}${e.hash}`;return`${jd}?next=${encodeURIComponent(t)}`},C6=e=>!le.isAxiosError(e)||e.response?.status!==401?!1:!(e.config?.url??"").startsWith("/auth/"),A6=e=>!!(e.authRequired&&!e.authenticated),Fd=(e=window.location)=>{Dc||e.pathname===jd||(Dc=!0,e.assign(R6(e)))},P6=async(e=fetch)=>{const t=await e("/api/auth/session").catch(()=>{});if(!t?.ok)return;const n=await t.json();A6(n)&&Fd()},T6=()=>{Lc===void 0&&(Lc=le.interceptors.response.use(e=>e,e=>(C6(e)&&Fd(),Promise.reject(e))))},M6=e=>!e||e.length===0?null:[...new Set(e)].sort(),_6=e=>!e||e.length===0?[]:[...new Set(e.map(t=>t.trim()).filter(Boolean))].sort(),N6=e=>!e||e.length===0?null:[...new Set(e)].sort(),oe={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:M6(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:_6(e.tagNames)}],detail:e=>["notes","detail",{id:e}],snapshots:(e,t=5)=>["notes","snapshots",{id:e,limit:t}],trashAll:()=>["notes","trash"],trash:(e={})=>["notes","trash",{limit:e.limit??25,offset:e.offset??0}],pinned:()=>["notes","pinned"],backReferencesAll:()=>["notes","back-references"],backReferences:e=>["notes","back-references",{noteId:e}],graph:()=>["notes","graph"]},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:N6(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"]}},O6=async(e,t)=>{switch(t.type){case"mcp.note.created":case"mcp.note.updated":await Promise.all([e.invalidateQueries({queryKey:oe.notes.listAll(),exact:!1}),e.invalidateQueries({queryKey:oe.notes.tagListAll(),exact:!1}),e.invalidateQueries({queryKey:oe.notes.tagNameListAll(),exact:!1}),e.invalidateQueries({queryKey:oe.notes.pinned(),exact:!0}),e.invalidateQueries({queryKey:oe.notes.backReferencesAll(),exact:!1}),e.invalidateQueries({queryKey:oe.notes.graph(),exact:!0}),e.invalidateQueries({queryKey:oe.views.sectionNotesAll(),exact:!1}),e.invalidateQueries({queryKey:oe.tags.all(),exact:!1})]);return;case"mcp.note.deleted":await Promise.all([e.invalidateQueries({queryKey:oe.notes.listAll(),exact:!1}),e.invalidateQueries({queryKey:oe.notes.tagListAll(),exact:!1}),e.invalidateQueries({queryKey:oe.notes.tagNameListAll(),exact:!1}),e.invalidateQueries({queryKey:oe.notes.trashAll(),exact:!1}),e.invalidateQueries({queryKey:oe.notes.pinned(),exact:!0}),e.invalidateQueries({queryKey:oe.notes.backReferencesAll(),exact:!1}),e.invalidateQueries({queryKey:oe.notes.graph(),exact:!0}),e.invalidateQueries({queryKey:oe.views.sectionNotesAll(),exact:!1}),e.invalidateQueries({queryKey:oe.tags.all(),exact:!1}),e.invalidateQueries({queryKey:oe.reminders.all(),exact:!1}),e.invalidateQueries({queryKey:oe.images.all(),exact:!1}),e.invalidateQueries({queryKey:oe.calendar.all(),exact:!1})]);return}},I6=["mcp.note.created","mcp.note.updated","mcp.note.deleted"],ta=new Set,L6=e=>typeof e=="object"&&e!==null,D6=e=>!L6(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",j6=e=>{try{const t=JSON.parse(e);return D6(t)?t:null}catch{return null}},F6=e=>{ta.forEach(t=>{t(e)})},yS=e=>(ta.add(e),()=>{ta.delete(e)}),k6=(e,t)=>n=>{if(!(n instanceof MessageEvent)||typeof n.data!="string")return;const r=j6(n.data);!r||r.type!==t||(F6(r),O6(e,r))},H6=()=>{const e=In();return c.useEffect(()=>{if(typeof EventSource>"u")return;const t=new EventSource("/api/events"),n=()=>{P6()},r=I6.map(o=>{const s=k6(e,o);return t.addEventListener(o,s),()=>{t.removeEventListener(o,s)}});return t.addEventListener("error",n),()=>{r.forEach(o=>{o()}),t.removeEventListener("error",n),t.close()}},[e]),null},$6=({children:e})=>h.jsx(Pm,{client:Z2,children:h.jsx($2,{children:h.jsxs(B2,{children:[h.jsx(H6,{}),e]})})}),V6={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},jc={sm:10,md:12,lg:14},kd=c.forwardRef(({className:e,size:t="md",checked:n,disabled:r,...o},s)=>h.jsxs("label",{className:ue("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:ue(V6[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(bg,{width:jc[t],height:jc[t],className:"text-fg-on-filled",weight:"bold"})})]}));kd.displayName="Checkbox";function Wa(e){const t=e+"CollectionProvider",[n,r]=Ct(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:y,children:b}=v,x=K.useRef(null),w=K.useRef(new Map).current;return h.jsx(o,{scope:y,itemMap:w,collectionRef:x,children:b})};a.displayName=t;const i=e+"CollectionSlot",l=Tn(i),u=K.forwardRef((v,y)=>{const{scope:b,children:x}=v,w=s(i,b),E=ae(y,w.collectionRef);return h.jsx(l,{ref:E,children:x})});u.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=Tn(d),m=K.forwardRef((v,y)=>{const{scope:b,children:x,...w}=v,E=K.useRef(null),C=ae(y,E),N=s(d,b);return K.useEffect(()=>(N.itemMap.set(E,{ref:E,...w}),()=>{N.itemMap.delete(E)})),h.jsx(p,{[f]:"",ref:C,children:x})});m.displayName=d;function g(v){const y=s(e+"CollectionConsumer",v);return K.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((N,R)=>w.indexOf(N.ref.current)-w.indexOf(R.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},g,r]}var B6=c.createContext(void 0);function Wo(e){const t=c.useContext(B6);return e||t||"ltr"}var Z6="Arrow",Hd=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return h.jsx(te.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"})})});Hd.displayName=Z6;var U6=Hd;function q6(e){const[t,n]=c.useState(void 0);return _e(()=>{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 Ga="Popper",[$d,Dn]=Ct(Ga),[z6,Vd]=$d(Ga),Bd=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return h.jsx(z6,{scope:t,anchor:r,onAnchorChange:o,children:n})};Bd.displayName=Ga;var Zd="PopperAnchor",Ud=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Vd(Zd,n),a=c.useRef(null),i=ae(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(te.div,{...o,ref:i})});Ud.displayName=Zd;var Qa="PopperContent",[K6,W6]=$d(Qa),qd=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:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:g,...v}=e,y=Vd(Qa,n),[b,x]=c.useState(null),w=ae(t,k=>x(k)),[E,C]=c.useState(null),N=q6(E),R=N?.width??0,S=N?.height??0,M=r+(s!=="center"?"-"+s:""),I=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},T=Array.isArray(u)?u:[u],F=T.length>0,B={padding:I,boundary:T.filter(Q6),altBoundary:F},{refs:L,floatingStyles:D,placement:P,isPositioned:j,middlewareData:O}=zh({strategy:"fixed",placement:M,whileElementsMounted:(...k)=>Jh(...k,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[Kh({mainAxis:o+S,alignmentAxis:a}),l&&Wh({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?e1():void 0,...B}),l&&Gh({...B}),Qh({...B,apply:({elements:k,rects:W,availableWidth:ee,availableHeight:H})=>{const{width:Y,height:J}=W.reference,ie=k.floating.style;ie.setProperty("--radix-popper-available-width",`${ee}px`),ie.setProperty("--radix-popper-available-height",`${H}px`),ie.setProperty("--radix-popper-anchor-width",`${Y}px`),ie.setProperty("--radix-popper-anchor-height",`${J}px`)}}),E&&Yh({element:E,padding:i}),Y6({arrowWidth:R,arrowHeight:S}),p&&Xh({strategy:"referenceHidden",...B})]}),[_,$]=Wd(P),Z=ft(g);_e(()=>{j&&Z?.()},[j,Z]);const U=O.arrow?.x,G=O.arrow?.y,q=O.arrow?.centerOffset!==0,[Q,ne]=c.useState();return _e(()=>{b&&ne(window.getComputedStyle(b).zIndex)},[b]),h.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:j?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[O.transformOrigin?.x,O.transformOrigin?.y].join(" "),...O.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(K6,{scope:n,placedSide:_,onArrowChange:C,arrowX:U,arrowY:G,shouldHideArrow:q,children:h.jsx(te.div,{"data-side":_,"data-align":$,...v,ref:w,style:{...v.style,animation:j?void 0:"none"}})})})});qd.displayName=Qa;var zd="PopperArrow",G6={top:"bottom",right:"left",bottom:"top",left:"right"},Kd=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=W6(zd,r),a=G6[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(U6,{...o,ref:n,style:{...o.style,display:"block"}})})});Kd.displayName=zd;function Q6(e){return e!==null}var Y6=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,d]=Wd(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(o.arrow?.x??0)+i/2,m=(o.arrow?.y??0)+l/2;let g="",v="";return u==="bottom"?(g=a?f:`${p}px`,v=`${-l}px`):u==="top"?(g=a?f:`${p}px`,v=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,v=a?f:`${m}px`):u==="left"&&(g=`${r.floating.width+l}px`,v=a?f:`${m}px`),{data:{x:g,y:v}}}});function Wd(e){const[t,n="center"]=e.split("-");return[t,n]}var Ya=Bd,Xa=Ud,Ja=qd,ei=Kd,Ts="rovingFocusGroup.onEntryFocus",X6={bubbles:!1,cancelable:!0},Pr="RovingFocusGroup",[na,Gd,J6]=Wa(Pr),[e8,Go]=Ct(Pr,[J6]),[t8,n8]=e8(Pr),Qd=c.forwardRef((e,t)=>h.jsx(na.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(na.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(r8,{...e,ref:t})})}));Qd.displayName=Pr;var r8=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=c.useRef(null),m=ae(t,p),g=Wo(s),[v,y]=Rt({prop:a,defaultProp:i??null,onChange:l,caller:Pr}),[b,x]=c.useState(!1),w=ft(u),E=Gd(n),C=c.useRef(!1),[N,R]=c.useState(0);return c.useEffect(()=>{const S=p.current;if(S)return S.addEventListener(Ts,w),()=>S.removeEventListener(Ts,w)},[w]),h.jsx(t8,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:v,onItemFocus:c.useCallback(S=>y(S),[y]),onItemShiftTab:c.useCallback(()=>x(!0),[]),onFocusableItemAdd:c.useCallback(()=>R(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>R(S=>S-1),[]),children:h.jsx(te.div,{tabIndex:b||N===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{C.current=!0}),onFocus:V(e.onFocus,S=>{const M=!C.current;if(S.target===S.currentTarget&&M&&!b){const I=new CustomEvent(Ts,X6);if(S.currentTarget.dispatchEvent(I),!I.defaultPrevented){const T=E().filter(P=>P.focusable),F=T.find(P=>P.active),B=T.find(P=>P.id===v),D=[F,B,...T].filter(Boolean).map(P=>P.ref.current);Jd(D,d)}}C.current=!1}),onBlur:V(e.onBlur,()=>x(!1))})})}),Yd="RovingFocusGroupItem",Xd=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...i}=e,l=dt(),u=s||l,d=n8(Yd,n),f=d.currentTabStopId===u,p=Gd(n),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:v}=d;return c.useEffect(()=>{if(r)return m(),()=>g()},[r,m,g]),h.jsx(na.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:h.jsx(te.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:V(e.onMouseDown,y=>{r?d.onItemFocus(u):y.preventDefault()}),onFocus:V(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:V(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){d.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const b=a8(y,d.orientation,d.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=d.loop?i8(w,E+1):w.slice(E+1)}setTimeout(()=>Jd(w))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:v!=null}):a})})});Xd.displayName=Yd;var o8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function s8(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function a8(e,t,n){const r=s8(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return o8[r]}function Jd(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function i8(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ef=Qd,tf=Xd,ra=["Enter"," "],c8=["ArrowDown","PageUp","Home"],nf=["ArrowUp","PageDown","End"],l8=[...c8,...nf],u8={ltr:[...ra,"ArrowRight"],rtl:[...ra,"ArrowLeft"]},d8={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Tr="Menu",[ur,f8,h8]=Wa(Tr),[hn,rf]=Ct(Tr,[h8,Dn,Go]),Qo=Dn(),of=Go(),[p8,pn]=hn(Tr),[m8,Mr]=hn(Tr),sf=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,i=Qo(t),[l,u]=c.useState(null),d=c.useRef(!1),f=ft(s),p=Wo(o);return c.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),h.jsx(Ya,{...i,children:h.jsx(p8,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:h.jsx(m8,{scope:t,onClose:c.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:a,children:r})})})};sf.displayName=Tr;var g8="MenuAnchor",ti=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Qo(n);return h.jsx(Xa,{...o,...r,ref:t})});ti.displayName=g8;var ni="MenuPortal",[v8,af]=hn(ni,{forceMount:void 0}),cf=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=pn(ni,t);return h.jsx(v8,{scope:t,forceMount:n,children:h.jsx(pt,{present:n||s.open,children:h.jsx(xr,{asChild:!0,container:o,children:r})})})};cf.displayName=ni;var tt="MenuContent",[y8,ri]=hn(tt),lf=c.forwardRef((e,t)=>{const n=af(tt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=pn(tt,e.__scopeMenu),a=Mr(tt,e.__scopeMenu);return h.jsx(ur.Provider,{scope:e.__scopeMenu,children:h.jsx(pt,{present:r||s.open,children:h.jsx(ur.Slot,{scope:e.__scopeMenu,children:a.modal?h.jsx(b8,{...o,ref:t}):h.jsx(x8,{...o,ref:t})})})})}),b8=c.forwardRef((e,t)=>{const n=pn(tt,e.__scopeMenu),r=c.useRef(null),o=ae(t,r);return c.useEffect(()=>{const s=r.current;if(s)return Ha(s)},[]),h.jsx(oi,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:V(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),x8=c.forwardRef((e,t)=>{const n=pn(tt,e.__scopeMenu);return h.jsx(oi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),w8=Tn("MenuContent.ScrollLock"),oi=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:g,...v}=e,y=pn(tt,n),b=Mr(tt,n),x=Qo(n),w=of(n),E=f8(n),[C,N]=c.useState(null),R=c.useRef(null),S=ae(t,R,y.onContentChange),M=c.useRef(0),I=c.useRef(""),T=c.useRef(0),F=c.useRef(null),B=c.useRef("right"),L=c.useRef(0),D=g?Ea:c.Fragment,P=g?{as:w8,allowPinchZoom:!0}:void 0,j=_=>{const $=I.current+_,Z=E().filter(k=>!k.disabled),U=document.activeElement,G=Z.find(k=>k.ref.current===U)?.textValue,q=Z.map(k=>k.textValue),Q=I8(q,$,G),ne=Z.find(k=>k.textValue===Q)?.ref.current;(function k(W){I.current=W,window.clearTimeout(M.current),W!==""&&(M.current=window.setTimeout(()=>k(""),1e3))})($),ne&&setTimeout(()=>ne.focus())};c.useEffect(()=>()=>window.clearTimeout(M.current),[]),ka();const O=c.useCallback(_=>B.current===F.current?.side&&D8(_,F.current?.area),[]);return h.jsx(y8,{scope:n,searchRef:I,onItemEnter:c.useCallback(_=>{O(_)&&_.preventDefault()},[O]),onItemLeave:c.useCallback(_=>{O(_)||(R.current?.focus(),N(null))},[O]),onTriggerLeave:c.useCallback(_=>{O(_)&&_.preventDefault()},[O]),pointerGraceTimerRef:T,onPointerGraceIntentChange:c.useCallback(_=>{F.current=_},[]),children:h.jsx(D,{...P,children:h.jsx(Vo,{asChild:!0,trapped:o,onMountAutoFocus:V(s,_=>{_.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:h.jsx(br,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:h.jsx(ef,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:N,onEntryFocus:V(l,_=>{b.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(Ja,{role:"menu","aria-orientation":"vertical","data-state":Cf(y.open),"data-radix-menu-content":"",dir:b.dir,...x,...v,ref:S,style:{outline:"none",...v.style},onKeyDown:V(v.onKeyDown,_=>{const Z=_.target.closest("[data-radix-menu-content]")===_.currentTarget,U=_.ctrlKey||_.altKey||_.metaKey,G=_.key.length===1;Z&&(_.key==="Tab"&&_.preventDefault(),!U&&G&&j(_.key));const q=R.current;if(_.target!==q||!l8.includes(_.key))return;_.preventDefault();const ne=E().filter(k=>!k.disabled).map(k=>k.ref.current);nf.includes(_.key)&&ne.reverse(),N8(ne)}),onBlur:V(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(M.current),I.current="")}),onPointerMove:V(e.onPointerMove,dr(_=>{const $=_.target,Z=L.current!==_.clientX;if(_.currentTarget.contains($)&&Z){const U=_.clientX>L.current?"right":"left";B.current=U,L.current=_.clientX}}))})})})})})})});lf.displayName=tt;var E8="MenuGroup",si=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(te.div,{role:"group",...r,ref:t})});si.displayName=E8;var S8="MenuLabel",uf=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(te.div,{...r,ref:t})});uf.displayName=S8;var xo="MenuItem",Fc="menu.itemSelect",Yo=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=c.useRef(null),a=Mr(xo,e.__scopeMenu),i=ri(xo,e.__scopeMenu),l=ae(t,s),u=c.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const p=new CustomEvent(Fc,{bubbles:!0,cancelable:!0});f.addEventListener(Fc,m=>r?.(m),{once:!0}),Nu(f,p),p.defaultPrevented?u.current=!1:a.onClose()}};return h.jsx(df,{...o,ref:l,disabled:n,onClick:V(e.onClick,d),onPointerDown:f=>{e.onPointerDown?.(f),u.current=!0},onPointerUp:V(e.onPointerUp,f=>{u.current||f.currentTarget?.click()}),onKeyDown:V(e.onKeyDown,f=>{const p=i.searchRef.current!=="";n||p&&f.key===" "||ra.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Yo.displayName=xo;var df=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=ri(xo,n),i=of(n),l=c.useRef(null),u=ae(t,l),[d,f]=c.useState(!1),[p,m]=c.useState("");return c.useEffect(()=>{const g=l.current;g&&m((g.textContent??"").trim())},[s.children]),h.jsx(ur.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:h.jsx(tf,{asChild:!0,...i,focusable:!r,children:h.jsx(te.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:V(e.onPointerMove,dr(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:V(e.onPointerLeave,dr(g=>a.onItemLeave(g))),onFocus:V(e.onFocus,()=>f(!0)),onBlur:V(e.onBlur,()=>f(!1))})})})}),R8="MenuCheckboxItem",ff=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsx(vf,{scope:e.__scopeMenu,checked:n,children:h.jsx(Yo,{role:"menuitemcheckbox","aria-checked":wo(n)?"mixed":n,...o,ref:t,"data-state":ii(n),onSelect:V(o.onSelect,()=>r?.(wo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ff.displayName=R8;var hf="MenuRadioGroup",[C8,A8]=hn(hf,{value:void 0,onValueChange:()=>{}}),pf=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=ft(r);return h.jsx(C8,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsx(si,{...o,ref:t})})});pf.displayName=hf;var mf="MenuRadioItem",gf=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=A8(mf,e.__scopeMenu),s=n===o.value;return h.jsx(vf,{scope:e.__scopeMenu,checked:s,children:h.jsx(Yo,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":ii(s),onSelect:V(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});gf.displayName=mf;var ai="MenuItemIndicator",[vf,P8]=hn(ai,{checked:!1}),yf=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=P8(ai,n);return h.jsx(pt,{present:r||wo(s.checked)||s.checked===!0,children:h.jsx(te.span,{...o,ref:t,"data-state":ii(s.checked)})})});yf.displayName=ai;var T8="MenuSeparator",bf=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(te.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});bf.displayName=T8;var M8="MenuArrow",xf=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Qo(n);return h.jsx(ei,{...o,...r,ref:t})});xf.displayName=M8;var _8="MenuSub",[bS,wf]=hn(_8),Xn="MenuSubTrigger",Ef=c.forwardRef((e,t)=>{const n=pn(Xn,e.__scopeMenu),r=Mr(Xn,e.__scopeMenu),o=wf(Xn,e.__scopeMenu),s=ri(Xn,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return c.useEffect(()=>d,[d]),c.useEffect(()=>{const f=i.current;return()=>{window.clearTimeout(f),l(null)}},[i,l]),h.jsx(ti,{asChild:!0,...u,children:h.jsx(df,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Cf(n.open),...e,ref:yr(t,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:V(e.onPointerMove,dr(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:V(e.onPointerLeave,dr(f=>{d();const p=n.content?.getBoundingClientRect();if(p){const m=n.content?.dataset.side,g=m==="right",v=g?-5:5,y=p[g?"left":"right"],b=p[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.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(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:V(e.onKeyDown,f=>{const p=s.searchRef.current!=="";e.disabled||p&&f.key===" "||u8[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});Ef.displayName=Xn;var Sf="MenuSubContent",Rf=c.forwardRef((e,t)=>{const n=af(tt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=pn(tt,e.__scopeMenu),a=Mr(tt,e.__scopeMenu),i=wf(Sf,e.__scopeMenu),l=c.useRef(null),u=ae(t,l);return h.jsx(ur.Provider,{scope:e.__scopeMenu,children:h.jsx(pt,{present:r||s.open,children:h.jsx(ur.Slot,{scope:e.__scopeMenu,children:h.jsx(oi,{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:d=>{a.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:V(e.onFocusOutside,d=>{d.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:V(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:V(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),p=d8[a.dir].includes(d.key);f&&p&&(s.onOpenChange(!1),i.trigger?.focus(),d.preventDefault())})})})})})});Rf.displayName=Sf;function Cf(e){return e?"open":"closed"}function wo(e){return e==="indeterminate"}function ii(e){return wo(e)?"indeterminate":e?"checked":"unchecked"}function N8(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function O8(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function I8(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=O8(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 L8(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,d=i.y,f=l.x,p=l.y;d>r!=p>r&&n<(f-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function D8(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return L8(n,t)}function dr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var j8=sf,F8=ti,k8=cf,H8=lf,$8=si,V8=uf,B8=Yo,Z8=ff,U8=pf,q8=gf,z8=yf,K8=bf,W8=xf,G8=Ef,Q8=Rf,Xo="DropdownMenu",[Y8]=Ct(Xo,[rf]),je=rf(),[X8,Af]=Y8(Xo),Pf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,l=je(t),u=c.useRef(null),[d,f]=Rt({prop:o,defaultProp:s??!1,onChange:a,caller:Xo});return h.jsx(X8,{scope:t,triggerId:dt(),triggerRef:u,contentId:dt(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:i,children:h.jsx(j8,{...l,open:d,onOpenChange:f,dir:r,modal:i,children:n})})};Pf.displayName=Xo;var Tf="DropdownMenuTrigger",Mf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Af(Tf,n),a=je(n);return h.jsx(F8,{asChild:!0,...a,children:h.jsx(te.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:yr(t,s.triggerRef),onPointerDown:V(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:V(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Mf.displayName=Tf;var J8="DropdownMenuPortal",_f=e=>{const{__scopeDropdownMenu:t,...n}=e,r=je(t);return h.jsx(k8,{...r,...n})};_f.displayName=J8;var Nf="DropdownMenuContent",Of=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Af(Nf,n),s=je(n),a=c.useRef(!1);return h.jsx(H8,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:V(e.onCloseAutoFocus,i=>{a.current||o.triggerRef.current?.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:V(e.onInteractOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!o.modal||d)&&(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)"}})});Of.displayName=Nf;var ey="DropdownMenuGroup",ty=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=je(n);return h.jsx($8,{...o,...r,ref:t})});ty.displayName=ey;var ny="DropdownMenuLabel",If=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=je(n);return h.jsx(V8,{...o,...r,ref:t})});If.displayName=ny;var ry="DropdownMenuItem",Lf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=je(n);return h.jsx(B8,{...o,...r,ref:t})});Lf.displayName=ry;var oy="DropdownMenuCheckboxItem",Df=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=je(n);return h.jsx(Z8,{...o,...r,ref:t})});Df.displayName=oy;var sy="DropdownMenuRadioGroup",ay=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=je(n);return h.jsx(U8,{...o,...r,ref:t})});ay.displayName=sy;var iy="DropdownMenuRadioItem",jf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=je(n);return h.jsx(q8,{...o,...r,ref:t})});jf.displayName=iy;var cy="DropdownMenuItemIndicator",Ff=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=je(n);return h.jsx(z8,{...o,...r,ref:t})});Ff.displayName=cy;var ly="DropdownMenuSeparator",kf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=je(n);return h.jsx(K8,{...o,...r,ref:t})});kf.displayName=ly;var uy="DropdownMenuArrow",dy=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=je(n);return h.jsx(W8,{...o,...r,ref:t})});dy.displayName=uy;var fy="DropdownMenuSubTrigger",Hf=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=je(n);return h.jsx(G8,{...o,...r,ref:t})});Hf.displayName=fy;var hy="DropdownMenuSubContent",$f=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=je(n);return h.jsx(Q8,{...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)"}})});$f.displayName=hy;var py=Pf,my=Mf,gy=_f,Vf=Of,Bf=If,Zf=Lf,Uf=Df,qf=jf,zf=Ff,Kf=kf,Wf=Hf,Gf=$f;const vy=py,yy=my,by=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>h.jsx(Wf,{ref:o,className:ue("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}));by.displayName=Wf.displayName;const xy=c.forwardRef(({className:e,...t},n)=>h.jsx(Gf,{ref:n,className:ue("z-50","min-w-[8rem]","overflow-hidden","surface-floating","p-1",e),...t}));xy.displayName=Gf.displayName;const Qf=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(gy,{children:h.jsx(Vf,{ref:r,sideOffset:t,className:ue("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})}));Qf.displayName=Vf.displayName;const Yf=c.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(Zf,{ref:r,className:ue("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}));Yf.displayName=Zf.displayName;const wy=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>h.jsxs(Uf,{ref:o,className:ue("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(zf,{children:"✓"})}),t]}));wy.displayName=Uf.displayName;const Ey=c.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(qf,{ref:r,className:ue("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(zf,{children:"●"})}),t]}));Ey.displayName=qf.displayName;const Sy=c.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(Bf,{ref:r,className:ue("px-2","py-1.5","text-sm","font-semibold","text-fg-secondary",t&&"pl-8",e),...n}));Sy.displayName=Bf.displayName;const Xf=c.forwardRef(({className:e,...t},n)=>h.jsx(Kf,{ref:n,className:ue("-mx-1","my-1","h-px","bg-divider",e),...t}));Xf.displayName=Kf.displayName;const Ry=({button:e,items:t})=>h.jsxs(vy,{children:[h.jsx(yy,{asChild:!0,children:e}),h.jsx(Qf,{align:"end",children:t.map((n,r)=>n.type==="separator"?h.jsx(Xf,{},n.key??`separator-${r}`):h.jsx(Yf,{onClick:n.onClick,children:n.name},n.name))})]}),Jf=c.forwardRef(({title:e,description:t,className:n="",...r},o)=>h.jsxs("div",{ref:o,className:ue("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})]}));Jf.displayName="Empty";const Cy=Re(["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"}}),Ay=c.forwardRef(({className:e,variant:t,size:n,type:r="text",...o},s)=>h.jsx("input",{ref:s,type:r,className:Cy({variant:t,size:n,className:e}),...o}));Ay.displayName="Input";const Py=Re(["font-bold","text-fg-muted","whitespace-nowrap"],{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"sm"}}),e0=c.forwardRef(({className:e,size:t,...n},r)=>h.jsx("label",{ref:r,className:Py({size:t,className:e}),...n}));e0.displayName="Label";const Ty=Re(["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"}}),My={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"};function _y({label:e,size:t="md",iconClassName:n,className:r,type:o="button",...s}){return h.jsx("button",{type:o,"aria-label":e,className:Ty({size:t,className:r}),...s,children:h.jsx(wg,{className:n??My[t]})})}const t0=c.forwardRef(({page:e,last:t,onChange:n,className:r="",...o},s)=>{const a=Number(e),i=Number(t),l=[];for(let f=1;f<i+1;f++)(a===f||a===1&&f<a+5||a===2&&f<a+4||f>a-3&&f<a+3||a===i-1&&f>a-4||a===i&&f>a-5)&&l.push(f);const u=a===1,d=a===i;return h.jsxs("nav",{ref:s,className:`mt-8 flex justify-center items-center gap-1 ${r}`,...o,children:[h.jsxs(En,{disabled:u,onClick:()=>!u&&n(1),"aria-label":"First page",isSkip:!0,children:[h.jsx(ys,{width:16}),h.jsx(ys,{width:16})]}),h.jsx(En,{disabled:u,onClick:()=>!u&&n(a-1),"aria-label":"Previous page",children:h.jsx(ys,{width:20})}),l.map(f=>h.jsx(En,{active:a===f,onClick:()=>n(f),"aria-label":`Page ${f}`,"aria-current":a===f?"page":void 0,children:f},f)),h.jsx(En,{disabled:d,onClick:()=>!d&&n(a+1),"aria-label":"Next page",children:h.jsx(nr,{width:20})}),h.jsxs(En,{disabled:d,onClick:()=>!d&&n(i),"aria-label":"Last page",isSkip:!0,children:[h.jsx(nr,{width:16}),h.jsx(nr,{width:16})]})]})});t0.displayName="Pagination";const En=c.forwardRef(({active:e,disabled:t,isSkip:n,children:r,className:o="",...s},a)=>{const i=`
15
- flex justify-center items-center
16
- leading-normal text-base font-medium
17
- w-9 h-9 md:w-10 md:h-10
18
- border border-transparent
19
- rounded-[10px]
20
- transition-all duration-200
21
- `,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})});En.displayName="PaginationItem";const Ny=Re(["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"}}),Oy=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:ue("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 ${Ny({color:n})}`,style:{"--progress-width":`${a}%`}})})});Oy.displayName="Progress";function kc(e,[t,n]){return Math.min(n,Math.max(t,e))}function Iy(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 n0=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"}),Ly="VisuallyHidden",r0=c.forwardRef((e,t)=>h.jsx(te.span,{...e,ref:t,style:{...n0,...e.style}}));r0.displayName=Ly;var Dy=r0,jy=[" ","Enter","ArrowUp","ArrowDown"],Fy=[" ","Enter"],ln="Select",[Jo,es,ky]=Wa(ln),[jn]=Ct(ln,[ky,Dn]),ts=Dn(),[Hy,$t]=jn(ln),[$y,Vy]=jn(ln),o0=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:a,defaultValue:i,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:m,form:g}=e,v=ts(t),[y,b]=c.useState(null),[x,w]=c.useState(null),[E,C]=c.useState(!1),N=Wo(u),[R,S]=Rt({prop:r,defaultProp:o??!1,onChange:s,caller:ln}),[M,I]=Rt({prop:a,defaultProp:i,onChange:l,caller:ln}),T=c.useRef(null),F=y?g||!!y.closest("form"):!0,[B,L]=c.useState(new Set),D=Array.from(B).map(P=>P.props.value).join(";");return h.jsx(Ya,{...v,children:h.jsxs(Hy,{required:m,scope:t,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:E,onValueNodeHasChildrenChange:C,contentId:dt(),value:M,onValueChange:I,open:R,onOpenChange:S,dir:N,triggerPointerDownPosRef:T,disabled:p,children:[h.jsx(Jo.Provider,{scope:t,children:h.jsx($y,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(P=>{L(j=>new Set(j).add(P))},[]),onNativeOptionRemove:c.useCallback(P=>{L(j=>{const O=new Set(j);return O.delete(P),O})},[]),children:n})}),F?h.jsxs(S0,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:M,onChange:P=>I(P.target.value),disabled:p,form:g,children:[M===void 0?h.jsx("option",{value:""}):null,Array.from(B)]},D):null]})})};o0.displayName=ln;var s0="SelectTrigger",a0=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=ts(n),a=$t(s0,n),i=a.disabled||r,l=ae(t,a.onTriggerChange),u=es(n),d=c.useRef("touch"),[f,p,m]=C0(v=>{const y=u().filter(w=>!w.disabled),b=y.find(w=>w.value===a.value),x=A0(y,v,b);x!==void 0&&a.onValueChange(x.value)}),g=v=>{i||(a.onOpenChange(!0),m()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return h.jsx(Xa,{asChild:!0,...s,children:h.jsx(te.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":R0(a.value)?"":void 0,...o,ref:l,onClick:V(o.onClick,v=>{v.currentTarget.focus(),d.current!=="mouse"&&g(v)}),onPointerDown:V(o.onPointerDown,v=>{d.current=v.pointerType;const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(g(v),v.preventDefault())}),onKeyDown:V(o.onKeyDown,v=>{const y=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&p(v.key),!(y&&v.key===" ")&&jy.includes(v.key)&&(g(),v.preventDefault())})})})});a0.displayName=s0;var i0="SelectValue",c0=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:a="",...i}=e,l=$t(i0,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,f=ae(t,l.onValueNodeChange);return _e(()=>{u(d)},[u,d]),h.jsx(te.span,{...i,ref:f,style:{pointerEvents:"none"},children:R0(l.value)?h.jsx(h.Fragment,{children:a}):s})});c0.displayName=i0;var By="SelectIcon",l0=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return h.jsx(te.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});l0.displayName=By;var Zy="SelectPortal",u0=e=>h.jsx(xr,{asChild:!0,...e});u0.displayName=Zy;var un="SelectContent",d0=c.forwardRef((e,t)=>{const n=$t(un,e.__scopeSelect),[r,o]=c.useState();if(_e(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?wt.createPortal(h.jsx(f0,{scope:e.__scopeSelect,children:h.jsx(Jo.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),s):null}return h.jsx(h0,{...e,ref:t})});d0.displayName=un;var rt=10,[f0,Vt]=jn(un),Uy="SelectContentImpl",qy=Tn("SelectContent.RemoveScroll"),h0=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:g,hideWhenDetached:v,avoidCollisions:y,...b}=e,x=$t(un,n),[w,E]=c.useState(null),[C,N]=c.useState(null),R=ae(t,k=>E(k)),[S,M]=c.useState(null),[I,T]=c.useState(null),F=es(n),[B,L]=c.useState(!1),D=c.useRef(!1);c.useEffect(()=>{if(w)return Ha(w)},[w]),ka();const P=c.useCallback(k=>{const[W,...ee]=F().map(J=>J.ref.current),[H]=ee.slice(-1),Y=document.activeElement;for(const J of k)if(J===Y||(J?.scrollIntoView({block:"nearest"}),J===W&&C&&(C.scrollTop=0),J===H&&C&&(C.scrollTop=C.scrollHeight),J?.focus(),document.activeElement!==Y))return},[F,C]),j=c.useCallback(()=>P([S,w]),[P,S,w]);c.useEffect(()=>{B&&j()},[B,j]);const{onOpenChange:O,triggerPointerDownPosRef:_}=x;c.useEffect(()=>{if(w){let k={x:0,y:0};const W=H=>{k={x:Math.abs(Math.round(H.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(H.pageY)-(_.current?.y??0))}},ee=H=>{k.x<=10&&k.y<=10?H.preventDefault():w.contains(H.target)||O(!1),document.removeEventListener("pointermove",W),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",ee,{capture:!0})}}},[w,O,_]),c.useEffect(()=>{const k=()=>O(!1);return window.addEventListener("blur",k),window.addEventListener("resize",k),()=>{window.removeEventListener("blur",k),window.removeEventListener("resize",k)}},[O]);const[$,Z]=C0(k=>{const W=F().filter(Y=>!Y.disabled),ee=W.find(Y=>Y.ref.current===document.activeElement),H=A0(W,k,ee);H&&setTimeout(()=>H.ref.current.focus())}),U=c.useCallback((k,W,ee)=>{const H=!D.current&&!ee;(x.value!==void 0&&x.value===W||H)&&(M(k),H&&(D.current=!0))},[x.value]),G=c.useCallback(()=>w?.focus(),[w]),q=c.useCallback((k,W,ee)=>{const H=!D.current&&!ee;(x.value!==void 0&&x.value===W||H)&&T(k)},[x.value]),Q=r==="popper"?oa:p0,ne=Q===oa?{side:i,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:g,hideWhenDetached:v,avoidCollisions:y}:{};return h.jsx(f0,{scope:n,content:w,viewport:C,onViewportChange:N,itemRefCallback:U,selectedItem:S,onItemLeave:G,itemTextRefCallback:q,focusSelectedItem:j,selectedItemText:I,position:r,isPositioned:B,searchRef:$,children:h.jsx(Ea,{as:qy,allowPinchZoom:!0,children:h.jsx(Vo,{asChild:!0,trapped:x.open,onMountAutoFocus:k=>{k.preventDefault()},onUnmountAutoFocus:V(o,k=>{x.trigger?.focus({preventScroll:!0}),k.preventDefault()}),children:h.jsx(br,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:k=>k.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:h.jsx(Q,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:k=>k.preventDefault(),...b,...ne,onPlaced:()=>L(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:V(b.onKeyDown,k=>{const W=k.ctrlKey||k.altKey||k.metaKey;if(k.key==="Tab"&&k.preventDefault(),!W&&k.key.length===1&&Z(k.key),["ArrowUp","ArrowDown","Home","End"].includes(k.key)){let H=F().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(k.key)&&(H=H.slice().reverse()),["ArrowUp","ArrowDown"].includes(k.key)){const Y=k.target,J=H.indexOf(Y);H=H.slice(J+1)}setTimeout(()=>P(H)),k.preventDefault()}})})})})})})});h0.displayName=Uy;var zy="SelectItemAlignedPosition",p0=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=$t(un,n),a=Vt(un,n),[i,l]=c.useState(null),[u,d]=c.useState(null),f=ae(t,R=>d(R)),p=es(n),m=c.useRef(!1),g=c.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=a,w=c.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&u&&v&&y&&b){const R=s.trigger.getBoundingClientRect(),S=u.getBoundingClientRect(),M=s.valueNode.getBoundingClientRect(),I=b.getBoundingClientRect();if(s.dir!=="rtl"){const Y=I.left-S.left,J=M.left-Y,ie=R.left-J,ve=R.width+ie,Ge=Math.max(ve,S.width),Be=window.innerWidth-rt,mt=kc(J,[rt,Math.max(rt,Be-Ge)]);i.style.minWidth=ve+"px",i.style.left=mt+"px"}else{const Y=S.right-I.right,J=window.innerWidth-M.right-Y,ie=window.innerWidth-R.right-J,ve=R.width+ie,Ge=Math.max(ve,S.width),Be=window.innerWidth-rt,mt=kc(J,[rt,Math.max(rt,Be-Ge)]);i.style.minWidth=ve+"px",i.style.right=mt+"px"}const T=p(),F=window.innerHeight-rt*2,B=v.scrollHeight,L=window.getComputedStyle(u),D=parseInt(L.borderTopWidth,10),P=parseInt(L.paddingTop,10),j=parseInt(L.borderBottomWidth,10),O=parseInt(L.paddingBottom,10),_=D+P+B+O+j,$=Math.min(y.offsetHeight*5,_),Z=window.getComputedStyle(v),U=parseInt(Z.paddingTop,10),G=parseInt(Z.paddingBottom,10),q=R.top+R.height/2-rt,Q=F-q,ne=y.offsetHeight/2,k=y.offsetTop+ne,W=D+P+k,ee=_-W;if(W<=q){const Y=T.length>0&&y===T[T.length-1].ref.current;i.style.bottom="0px";const J=u.clientHeight-v.offsetTop-v.offsetHeight,ie=Math.max(Q,ne+(Y?G:0)+J+j),ve=W+ie;i.style.height=ve+"px"}else{const Y=T.length>0&&y===T[0].ref.current;i.style.top="0px";const ie=Math.max(q,D+v.offsetTop+(Y?U:0)+ne)+ee;i.style.height=ie+"px",v.scrollTop=W-q+v.offsetTop}i.style.margin=`${rt}px 0`,i.style.minHeight=$+"px",i.style.maxHeight=F+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[p,s.trigger,s.valueNode,i,u,v,y,b,s.dir,r]);_e(()=>w(),[w]);const[E,C]=c.useState();_e(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const N=c.useCallback(R=>{R&&g.current===!0&&(w(),x?.(),g.current=!1)},[w,x]);return h.jsx(Wy,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:N,children:h.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:h.jsx(te.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});p0.displayName=zy;var Ky="SelectPopperPosition",oa=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=rt,...s}=e,a=ts(n);return h.jsx(Ja,{...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)"}})});oa.displayName=Ky;var[Wy,ci]=jn(un,{}),sa="SelectViewport",m0=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Vt(sa,n),a=ci(sa,n),i=ae(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(Jo.Slot,{scope:n,children:h.jsx(te.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:V(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=a;if(p?.current&&f){const m=Math.abs(l.current-d.scrollTop);if(m>0){const g=window.innerHeight-rt*2,v=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),b=Math.max(v,y);if(b<g){const x=b+m,w=Math.min(g,x),E=x-w;f.style.height=w+"px",f.style.bottom==="0px"&&(d.scrollTop=E>0?E:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});m0.displayName=sa;var g0="SelectGroup",[Gy,Qy]=jn(g0),Yy=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=dt();return h.jsx(Gy,{scope:n,id:o,children:h.jsx(te.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Yy.displayName=g0;var v0="SelectLabel",Xy=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Qy(v0,n);return h.jsx(te.div,{id:o.id,...r,ref:t})});Xy.displayName=v0;var Eo="SelectItem",[Jy,y0]=jn(Eo),b0=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...a}=e,i=$t(Eo,n),l=Vt(Eo,n),u=i.value===r,[d,f]=c.useState(s??""),[p,m]=c.useState(!1),g=ae(t,x=>l.itemRefCallback?.(x,r,o)),v=dt(),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(Jy,{scope:n,value:r,disabled:o,textId:v,isSelected:u,onItemTextChange:c.useCallback(x=>{f(w=>w||(x?.textContent??"").trim())},[]),children:h.jsx(Jo.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:h.jsx(te.div,{role:"option","aria-labelledby":v,"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:g,onFocus:V(a.onFocus,()=>m(!0)),onBlur:V(a.onBlur,()=>m(!1)),onClick:V(a.onClick,()=>{y.current!=="mouse"&&b()}),onPointerUp:V(a.onPointerUp,()=>{y.current==="mouse"&&b()}),onPointerDown:V(a.onPointerDown,x=>{y.current=x.pointerType}),onPointerMove:V(a.onPointerMove,x=>{y.current=x.pointerType,o?l.onItemLeave?.():y.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:V(a.onKeyDown,x=>{l.searchRef?.current!==""&&x.key===" "||(Fy.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});b0.displayName=Eo;var Jn="SelectItemText",x0=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,a=$t(Jn,n),i=Vt(Jn,n),l=y0(Jn,n),u=Vy(Jn,n),[d,f]=c.useState(null),p=ae(t,b=>f(b),l.onItemTextChange,b=>i.itemTextRefCallback?.(b,l.value,l.disabled)),m=d?.textContent,g=c.useMemo(()=>h.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=u;return _e(()=>(v(g),()=>y(g)),[v,y,g]),h.jsxs(h.Fragment,{children:[h.jsx(te.span,{id:l.textId,...s,ref:p}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?wt.createPortal(s.children,a.valueNode):null]})});x0.displayName=Jn;var w0="SelectItemIndicator",e4=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return y0(w0,n).isSelected?h.jsx(te.span,{"aria-hidden":!0,...r,ref:t}):null});e4.displayName=w0;var aa="SelectScrollUpButton",t4=c.forwardRef((e,t)=>{const n=Vt(aa,e.__scopeSelect),r=ci(aa,e.__scopeSelect),[o,s]=c.useState(!1),a=ae(t,r.onScrollButtonChange);return _e(()=>{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(E0,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});t4.displayName=aa;var ia="SelectScrollDownButton",n4=c.forwardRef((e,t)=>{const n=Vt(ia,e.__scopeSelect),r=ci(ia,e.__scopeSelect),[o,s]=c.useState(!1),a=ae(t,r.onScrollButtonChange);return _e(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?h.jsx(E0,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});n4.displayName=ia;var E0=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Vt("SelectScrollButton",n),a=c.useRef(null),i=es(n),l=c.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return c.useEffect(()=>()=>l(),[l]),_e(()=>{i().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),h.jsx(te.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:V(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:V(o.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:V(o.onPointerLeave,()=>{l()})})}),r4="SelectSeparator",o4=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsx(te.div,{"aria-hidden":!0,...r,ref:t})});o4.displayName=r4;var ca="SelectArrow",s4=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ts(n),s=$t(ca,n),a=Vt(ca,n);return s.open&&a.position==="popper"?h.jsx(ei,{...o,...r,ref:t}):null});s4.displayName=ca;var a4="SelectBubbleInput",S0=c.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=c.useRef(null),s=ae(r,o),a=Iy(t);return c.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&d){const f=new Event("change",{bubbles:!0});d.call(i,t),i.dispatchEvent(f)}},[a,t]),h.jsx(te.select,{...n,style:{...n0,...n.style},ref:s,defaultValue:t})});S0.displayName=a4;function R0(e){return e===""||e===void 0}function C0(e){const t=ft(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 A0(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=i4(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 i4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var c4=o0,l4=a0,u4=c0,d4=l0,f4=u0,h4=d0,p4=m0,m4=b0,g4=x0;const v4=Re(["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"}}),no=({value:e,defaultValue:t,onValueChange:n,placeholder:r,variant:o,size:s,className:a,children:i,disabled:l})=>h.jsxs(c4,{value:e,defaultValue:t,onValueChange:n,disabled:l,children:[h.jsxs(l4,{className:v4({variant:o,size:s,className:a}),children:[h.jsx(u4,{placeholder:r}),h.jsx(d4,{children:h.jsx(yg,{className:"w-3.5 h-3.5 opacity-60"})})]}),h.jsx(f4,{children:h.jsx(P0,{children:h.jsx(p4,{className:"p-1",children:i})})})]}),P0=c.forwardRef(({className:e,children:t,...n},r)=>h.jsx(h4,{ref:r,position:"popper",sideOffset:4,className:ue("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}));P0.displayName="SelectContent";const bt=c.forwardRef(({className:e,children:t,...n},r)=>h.jsx(m4,{ref:r,className:ue("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(g4,{children:t})}));bt.displayName="SelectItem";no.displayName="Select";const Hc=e=>typeof e=="number"?`${e}px`:e,Et=c.forwardRef(({width:e,height:t=30,opacity:n,className:r="",style:o,...s},a)=>h.jsx("div",{ref:a,className:ue("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":Hc(e),"--skeleton-height":Hc(t),"--skeleton-opacity":n,...o},...s}));Et.displayName="Skeleton";const y4=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:ue("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:ue("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")})}));y4.displayName="Switch";const b4=Re(["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"}}),x4=c.forwardRef(({className:e,variant:t,size:n,...r},o)=>h.jsx("textarea",{ref:o,className:b4({variant:t,size:n,className:e}),...r}));x4.displayName="Textarea";var T0="Toggle",M0=c.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...s}=e,[a,i]=Rt({prop:n,onChange:o,defaultProp:r??!1,caller:T0});return h.jsx(te.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:V(e.onClick,()=>{e.disabled||i(!a)})})});M0.displayName=T0;var Bt="ToggleGroup",[_0]=Ct(Bt,[Go]),N0=Go(),li=K.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return h.jsx(w4,{...o,ref:t})}if(n==="multiple"){const o=r;return h.jsx(E4,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Bt}\``)});li.displayName=Bt;var[O0,I0]=_0(Bt),w4=K.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,i]=Rt({prop:n,defaultProp:r??"",onChange:o,caller:Bt});return h.jsx(O0,{scope:e.__scopeToggleGroup,type:"single",value:K.useMemo(()=>a?[a]:[],[a]),onItemActivate:i,onItemDeactivate:K.useCallback(()=>i(""),[i]),children:h.jsx(L0,{...s,ref:t})})}),E4=K.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,i]=Rt({prop:n,defaultProp:r??[],onChange:o,caller:Bt}),l=K.useCallback(d=>i((f=[])=>[...f,d]),[i]),u=K.useCallback(d=>i((f=[])=>f.filter(p=>p!==d)),[i]);return h.jsx(O0,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:u,children:h.jsx(L0,{...s,ref:t})})});li.displayName=Bt;var[S4,R4]=_0(Bt),L0=K.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:s,dir:a,loop:i=!0,...l}=e,u=N0(n),d=Wo(a),f={role:"group",dir:d,...l};return h.jsx(S4,{scope:n,rovingFocus:o,disabled:r,children:o?h.jsx(ef,{asChild:!0,...u,orientation:s,dir:d,loop:i,children:h.jsx(te.div,{...f,ref:t})}):h.jsx(te.div,{...f,ref:t})})}),So="ToggleGroupItem",D0=K.forwardRef((e,t)=>{const n=I0(So,e.__scopeToggleGroup),r=R4(So,e.__scopeToggleGroup),o=N0(e.__scopeToggleGroup),s=n.value.includes(e.value),a=r.disabled||e.disabled,i={...e,pressed:s,disabled:a},l=K.useRef(null);return r.rovingFocus?h.jsx(tf,{asChild:!0,...o,focusable:!a,active:s,ref:l,children:h.jsx($c,{...i,ref:t})}):h.jsx($c,{...i,ref:t})});D0.displayName=So;var $c=K.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,s=I0(So,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=s.type==="single"?a:void 0;return h.jsx(M0,{...i,...o,ref:t,onPressedChange:l=>{l?s.onItemActivate(r):s.onItemDeactivate(r)}})}),C4=li,A4=D0;const P4=Re(["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"}}),T4=Re(["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"}}),j0=c.createContext({}),M4=c.forwardRef(({className:e,variant:t,size:n,children:r,...o},s)=>h.jsx(j0.Provider,{value:{variant:t??"default",size:n??"md"},children:h.jsx(C4,{ref:s,className:P4({variant:t,className:e}),...o,children:r})}));M4.displayName="ToggleGroup";const _4=c.forwardRef(({className:e,activeClassName:t,children:n,...r},o)=>{const s=c.useContext(j0);return h.jsx(A4,{ref:o,className:T4({variant:s.variant,size:s.size,className:ue(e,t)}),...r,children:n})});_4.displayName="ToggleGroupItem";var[ns]=Ct("Tooltip",[Dn]),rs=Dn(),F0="TooltipProvider",N4=700,la="tooltip.open",[O4,ui]=ns(F0),k0=e=>{const{__scopeTooltip:t,delayDuration:n=N4,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(O4,{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})};k0.displayName=F0;var fr="Tooltip",[I4,_r]=ns(fr),H0=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,l=ui(fr,e.__scopeTooltip),u=rs(t),[d,f]=c.useState(null),p=dt(),m=c.useRef(0),g=a??l.disableHoverableContent,v=i??l.delayDuration,y=c.useRef(!1),[b,x]=Rt({prop:r,defaultProp:o??!1,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(la))):l.onClose(),s?.(R)},caller:fr}),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]),C=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),N=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,x(!0),m.current=0},v)},[v,x]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),h.jsx(Ya,{...u,children:h.jsx(I4,{scope:t,contentId:p,open:b,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?N():E()},[l.isOpenDelayedRef,N,E]),onTriggerLeave:c.useCallback(()=>{g?C():(window.clearTimeout(m.current),m.current=0)},[C,g]),onOpen:E,onClose:C,disableHoverableContent:g,children:n})})};H0.displayName=fr;var ua="TooltipTrigger",$0=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=_r(ua,n),s=ui(ua,n),a=rs(n),i=c.useRef(null),l=ae(t,i,o.onTriggerChange),u=c.useRef(!1),d=c.useRef(!1),f=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),h.jsx(Xa,{asChild:!0,...a,children:h.jsx(te.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:V(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:V(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:V(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:V(e.onBlur,o.onClose),onClick:V(e.onClick,o.onClose)})})});$0.displayName=ua;var di="TooltipPortal",[L4,D4]=ns(di,{forceMount:void 0}),V0=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=_r(di,t);return h.jsx(L4,{scope:t,forceMount:n,children:h.jsx(pt,{present:n||s.open,children:h.jsx(xr,{asChild:!0,container:o,children:r})})})};V0.displayName=di;var _n="TooltipContent",B0=c.forwardRef((e,t)=>{const n=D4(_n,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=_r(_n,e.__scopeTooltip);return h.jsx(pt,{present:r||a.open,children:a.disableHoverableContent?h.jsx(Z0,{side:o,...s,ref:t}):h.jsx(j4,{side:o,...s,ref:t})})}),j4=c.forwardRef((e,t)=>{const n=_r(_n,e.__scopeTooltip),r=ui(_n,e.__scopeTooltip),o=c.useRef(null),s=ae(t,o),[a,i]=c.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,p=c.useCallback(()=>{i(null),f(!1)},[f]),m=c.useCallback((g,v)=>{const y=g.currentTarget,b={x:g.clientX,y:g.clientY},x=V4(b,y.getBoundingClientRect()),w=B4(b,x),E=Z4(v.getBoundingClientRect()),C=q4([...w,...E]);i(C),f(!0)},[f]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&d){const g=y=>m(y,d),v=y=>m(y,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",v)}}},[l,d,m,p]),c.useEffect(()=>{if(a){const g=v=>{const y=v.target,b={x:v.clientX,y:v.clientY},x=l?.contains(y)||d?.contains(y),w=!U4(b,a);x?p():w&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,a,u,p]),h.jsx(Z0,{...e,ref:s})}),[F4,k4]=ns(fr,{isInside:!1}),H4=Vg("TooltipContent"),Z0=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,l=_r(_n,n),u=rs(n),{onClose:d}=l;return c.useEffect(()=>(document.addEventListener(la,d),()=>document.removeEventListener(la,d)),[d]),c.useEffect(()=>{if(l.trigger){const f=p=>{p.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),h.jsx(br,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:h.jsxs(Ja,{"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(H4,{children:r}),h.jsx(F4,{scope:n,isInside:!0,children:h.jsx(Dy,{id:l.contentId,role:"tooltip",children:o||r})})]})})});B0.displayName=_n;var U0="TooltipArrow",$4=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=rs(n);return k4(U0,n).isInside?null:h.jsx(ei,{...o,...r,ref:t})});$4.displayName=U0;function V4(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 B4(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 Z4(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 U4(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,d=i.y,f=l.x,p=l.y;d>r!=p>r&&n<(f-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function q4(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),z4(t)}function z4(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 K4=k0,W4=H0,G4=$0,Q4=V0,q0=B0;const Y4=K4,X4=W4,J4=G4,z0=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(q0,{ref:r,sideOffset:t,className:ue("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}));z0.displayName=q0.displayName;const xS=({content:e,children:t,side:n="top",delayDuration:r=200})=>h.jsx(Y4,{children:h.jsxs(X4,{delayDuration:r,children:[h.jsx(J4,{asChild:!0,children:t}),h.jsx(Q4,{children:h.jsx(z0,{side:n,children:e})})]})}),Vc=({children:e,fallback:t})=>e||t;function eb({itemsPerPage:e,onItemsPerPageChange:t,isAutoLimit:n=!1,sortBy:r,onSortByChange:o,sortOrder:s,onSortOrderChange:a,pinnedFirst:i,onPinnedFirstChange:l}){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(bu,{className:"h-4 w-4 shrink-0 text-fg-tertiary"}),h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"tertiary",children:"Items"}),h.jsxs(no,{value:n?"auto":String(e),onValueChange:u=>{u!=="auto"&&t(Number(u))},variant:"ghost",size:"sm",children:[n&&h.jsxs(bt,{value:"auto",children:["Auto (",e,")"]}),h.jsx(bt,{value:"25",children:"25"}),h.jsx(bt,{value:"50",children:"50"}),h.jsx(bt,{value:"100",children:"100"})]})]}),h.jsx("div",{className:"h-5 w-px bg-divider"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Tg,{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(no,{value:r,onValueChange:u=>o(u),variant:"ghost",size:"sm",children:[h.jsx(bt,{value:"updatedAt",children:"Updated"}),h.jsx(bt,{value:"createdAt",children:"Created"})]}),h.jsxs(no,{value:s,onValueChange:u=>a(u),variant:"ghost",size:"sm",children:[h.jsx(bt,{value:"desc",children:"Newest"}),h.jsx(bt,{value:"asc",children:"Oldest"})]})]}),h.jsx("div",{className:"h-5 w-px bg-divider"}),h.jsxs(e0,{htmlFor:"pinnedFirst",size:"sm",className:"flex cursor-pointer items-center gap-1.5",children:[h.jsx(kd,{id:"pinnedFirst",size:"sm",checked:i,onChange:u=>l(u.target.checked)}),h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:"Pinned First"})]})]})})}var Ms,Bc;function tb(){if(Bc)return Ms;Bc=1;function e(i){return i&&typeof i=="object"&&"default"in i?i.default:i}var t=n1(),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 d(f){return f.displayName||f.name||"Component"}return function(p){if(typeof p!="function")throw new Error("Expected WrappedComponent to be a React component.");var m=[],g;function v(){g=i(m.map(function(b){return b.props})),y.canUseDOM?l(g):u&&(g=u(g))}var y=(function(b){o(x,b);function x(){return b.apply(this,arguments)||this}x.peek=function(){return g},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 C=g;return g=void 0,m=[],C};var w=x.prototype;return w.UNSAFE_componentWillMount=function(){m.push(this),v()},w.componentDidUpdate=function(){v()},w.componentWillUnmount=function(){var C=m.indexOf(this);m.splice(C,1),v()},w.render=function(){return n.createElement(p,this.props)},x})(t.PureComponent);return r(y,"displayName","SideEffect("+d(p)+")"),r(y,"canUseDOM",s),y}}return Ms=a,Ms}var nb=tb();const rb=Nn(nb);var _s,Zc;function ob(){if(Zc)return _s;Zc=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 d;if(t&&s instanceof Map&&a instanceof Map){if(s.size!==a.size)return!1;for(d=s.entries();!(l=d.next()).done;)if(!a.has(l.value[0]))return!1;for(d=s.entries();!(l=d.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(d=s.entries();!(l=d.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 _s=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}},_s}var sb=ob();const ab=Nn(sb);var Ns,Uc;function ib(){if(Uc)return Ns;Uc=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(d){return a[d]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ns=o()?Object.assign:function(s,a){for(var i,l=r(s),u,d=1;d<arguments.length;d++){i=Object(arguments[d]);for(var f in i)t.call(i,f)&&(l[f]=i[f]);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},Ns}var cb=ib();const lb=Nn(cb);var tn={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},X={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(X).map(function(e){return X[e]});var he={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"},Ro={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},hr={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},ub=Object.keys(Ro).reduce(function(e,t){return e[Ro[t]]=t,e},{}),db=[X.NOSCRIPT,X.SCRIPT,X.STYLE],ot="data-react-helmet",fb=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},hb=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},pb=(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}})(),Fe=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},mb=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)},qc=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},gb=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},da=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;")},vb=function(t){var n=Rn(t,X.TITLE),r=Rn(t,hr.TITLE_TEMPLATE);if(r&&n)return r.replace(/%s/g,function(){return Array.isArray(n)?n.join(""):n});var o=Rn(t,hr.DEFAULT_TITLE);return n||o||void 0},yb=function(t){return Rn(t,hr.ON_CHANGE_CLIENT_STATE)||function(){}},Os=function(t,n){return n.filter(function(r){return typeof r[t]<"u"}).map(function(r){return r[t]}).reduce(function(r,o){return Fe({},r,o)},{})},bb=function(t,n){return n.filter(function(r){return typeof r[X.BASE]<"u"}).map(function(r){return r[X.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},[])},Qn=function(t,n,r){var o={};return r.filter(function(s){return Array.isArray(s[t])?!0:(typeof s[t]<"u"&&Sb("Helmet: "+t+' should be of type "Array". Instead found type "'+fb(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,g=Object.keys(p),v=0;v<g.length;v++){var y=g[v],b=y.toLowerCase();n.indexOf(b)!==-1&&!(m===he.REL&&p[m].toLowerCase()==="canonical")&&!(b===he.REL&&p[b].toLowerCase()==="stylesheet")&&(m=b),n.indexOf(y)!==-1&&(y===he.INNER_HTML||y===he.CSS_TEXT||y===he.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 d=l[u],f=lb({},o[d],i[d]);o[d]=f}return s},[]).reverse()},Rn=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},xb=function(t){return{baseTag:bb([he.HREF,he.TARGET],t),bodyAttributes:Os(tn.BODY,t),defer:Rn(t,hr.DEFER),encode:Rn(t,hr.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Os(tn.HTML,t),linkTags:Qn(X.LINK,[he.REL,he.HREF],t),metaTags:Qn(X.META,[he.NAME,he.CHARSET,he.HTTPEQUIV,he.PROPERTY,he.ITEM_PROP],t),noscriptTags:Qn(X.NOSCRIPT,[he.INNER_HTML],t),onChangeClientState:yb(t),scriptTags:Qn(X.SCRIPT,[he.SRC,he.INNER_HTML],t),styleTags:Qn(X.STYLE,[he.CSS_TEXT],t),title:vb(t),titleAttributes:Os(tn.TITLE,t)}},fa=(function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout(function(){fa(t)},0)}})(),zc=function(t){return clearTimeout(t)},wb=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||fa:global.requestAnimationFrame||fa,Eb=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||zc:global.cancelAnimationFrame||zc,Sb=function(t){return console&&typeof console.warn=="function"&&console.warn(t)},Yn=null,Rb=function(t){Yn&&Eb(Yn),t.defer?Yn=wb(function(){Kc(t,function(){Yn=null})}):(Kc(t),Yn=null)},Kc=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,d=t.scriptTags,f=t.styleTags,p=t.title,m=t.titleAttributes;ha(X.BODY,o),ha(X.HTML,s),Cb(p,m);var g={baseTag:xn(X.BASE,r),linkTags:xn(X.LINK,a),metaTags:xn(X.META,i),noscriptTags:xn(X.NOSCRIPT,l),scriptTags:xn(X.SCRIPT,d),styleTags:xn(X.STYLE,f)},v={},y={};Object.keys(g).forEach(function(b){var x=g[b],w=x.newTags,E=x.oldTags;w.length&&(v[b]=w),E.length&&(y[b]=g[b].oldTags)}),n&&n(),u(t,v,y)},K0=function(t){return Array.isArray(t)?t.join(""):t},Cb=function(t,n){typeof t<"u"&&document.title!==t&&(document.title=K0(t)),ha(X.TITLE,n)},ha=function(t,n){var r=document.getElementsByTagName(t)[0];if(r){for(var o=r.getAttribute(ot),s=o?o.split(","):[],a=[].concat(s),i=Object.keys(n),l=0;l<i.length;l++){var u=i[l],d=n[u]||"";r.getAttribute(u)!==d&&r.setAttribute(u,d),s.indexOf(u)===-1&&s.push(u);var f=a.indexOf(u);f!==-1&&a.splice(f,1)}for(var p=a.length-1;p>=0;p--)r.removeAttribute(a[p]);s.length===a.length?r.removeAttribute(ot):r.getAttribute(ot)!==i.join(",")&&r.setAttribute(ot,i.join(","))}},xn=function(t,n){var r=document.head||document.querySelector(X.HEAD),o=r.querySelectorAll(t+"["+ot+"]"),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 d in l)if(l.hasOwnProperty(d))if(d===he.INNER_HTML)u.innerHTML=l.innerHTML;else if(d===he.CSS_TEXT)u.styleSheet?u.styleSheet.cssText=l.cssText:u.appendChild(document.createTextNode(l.cssText));else{var f=typeof l[d]>"u"?"":l[d];u.setAttribute(d,f)}u.setAttribute(ot,"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}},W0=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},"")},Ab=function(t,n,r,o){var s=W0(r),a=K0(n);return s?"<"+t+" "+ot+'="true" '+s+">"+da(a,o)+"</"+t+">":"<"+t+" "+ot+'="true">'+da(a,o)+"</"+t+">"},Pb=function(t,n,r){return n.reduce(function(o,s){var a=Object.keys(s).filter(function(u){return!(u===he.INNER_HTML||u===he.CSS_TEXT)}).reduce(function(u,d){var f=typeof s[d]>"u"?d:d+'="'+da(s[d],r)+'"';return u?u+" "+f:f},""),i=s.innerHTML||s.cssText||"",l=db.indexOf(t)===-1;return o+"<"+t+" "+ot+'="true" '+a+(l?"/>":">"+i+"</"+t+">")},"")},G0=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[Ro[o]||o]=t[o],r},n)},Tb=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[ub[o]||o]=t[o],r},n)},Mb=function(t,n,r){var o,s=(o={key:n},o[ot]=!0,o),a=G0(r,s);return[K.createElement(X.TITLE,a,n)]},_b=function(t,n){return n.map(function(r,o){var s,a=(s={key:o},s[ot]=!0,s);return Object.keys(r).forEach(function(i){var l=Ro[i]||i;if(l===he.INNER_HTML||l===he.CSS_TEXT){var u=r.innerHTML||r.cssText;a.dangerouslySetInnerHTML={__html:u}}else a[l]=r[i]}),K.createElement(t,a)})},yt=function(t,n,r){switch(t){case X.TITLE:return{toComponent:function(){return Mb(t,n.title,n.titleAttributes)},toString:function(){return Ab(t,n.title,n.titleAttributes,r)}};case tn.BODY:case tn.HTML:return{toComponent:function(){return G0(n)},toString:function(){return W0(n)}};default:return{toComponent:function(){return _b(t,n)},toString:function(){return Pb(t,n,r)}}}},Q0=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,d=t.styleTags,f=t.title,p=f===void 0?"":f,m=t.titleAttributes;return{base:yt(X.BASE,n,o),bodyAttributes:yt(tn.BODY,r,o),htmlAttributes:yt(tn.HTML,s,o),link:yt(X.LINK,a,o),meta:yt(X.META,i,o),noscript:yt(X.NOSCRIPT,l,o),script:yt(X.SCRIPT,u,o),style:yt(X.STYLE,d,o),title:yt(X.TITLE,{title:p,titleAttributes:m},o)}},Nb=function(t){var n,r;return r=n=(function(o){mb(s,o);function s(){return hb(this,s),gb(this,o.apply(this,arguments))}return s.prototype.shouldComponentUpdate=function(i){return!ab(this.props,i)},s.prototype.mapNestedChildrenToProps=function(i,l){if(!l)return null;switch(i.type){case X.SCRIPT:case X.NOSCRIPT:return{innerHTML:l};case X.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,d=i.arrayTypeChildren,f=i.newChildProps,p=i.nestedChildren;return Fe({},d,(l={},l[u.type]=[].concat(d[u.type]||[],[Fe({},f,this.mapNestedChildrenToProps(u,p))]),l))},s.prototype.mapObjectTypeChildren=function(i){var l,u,d=i.child,f=i.newProps,p=i.newChildProps,m=i.nestedChildren;switch(d.type){case X.TITLE:return Fe({},f,(l={},l[d.type]=m,l.titleAttributes=Fe({},p),l));case X.BODY:return Fe({},f,{bodyAttributes:Fe({},p)});case X.HTML:return Fe({},f,{htmlAttributes:Fe({},p)})}return Fe({},f,(u={},u[d.type]=Fe({},p),u))},s.prototype.mapArrayTypeChildrenToProps=function(i,l){var u=Fe({},l);return Object.keys(i).forEach(function(d){var f;u=Fe({},u,(f={},f[d]=i[d],f))}),u},s.prototype.warnOnInvalidChildren=function(i,l){return!0},s.prototype.mapChildrenToProps=function(i,l){var u=this,d={};return K.Children.forEach(i,function(f){if(!(!f||!f.props)){var p=f.props,m=p.children,g=qc(p,["children"]),v=Tb(g);switch(u.warnOnInvalidChildren(f,m),f.type){case X.LINK:case X.META:case X.NOSCRIPT:case X.SCRIPT:case X.STYLE:d=u.flattenArrayTypeChildren({child:f,arrayTypeChildren:d,newChildProps:v,nestedChildren:m});break;default:l=u.mapObjectTypeChildren({child:f,newProps:l,newChildProps:v,nestedChildren:m});break}}}),l=this.mapArrayTypeChildrenToProps(d,l),l},s.prototype.render=function(){var i=this.props,l=i.children,u=qc(i,["children"]),d=Fe({},u);return l&&(d=this.mapChildrenToProps(l,d)),K.createElement(t,d)},pb(s,null,[{key:"canUseDOM",set:function(i){t.canUseDOM=i}}]),s})(K.Component),n.propTypes={base:fe.object,bodyAttributes:fe.object,children:fe.oneOfType([fe.arrayOf(fe.node),fe.node]),defaultTitle:fe.string,defer:fe.bool,encodeSpecialCharacters:fe.bool,htmlAttributes:fe.object,link:fe.arrayOf(fe.object),meta:fe.arrayOf(fe.object),noscript:fe.arrayOf(fe.object),onChangeClientState:fe.func,script:fe.arrayOf(fe.object),style:fe.arrayOf(fe.object),title:fe.string,titleAttributes:fe.object,titleTemplate:fe.string},n.defaultProps={defer:!0,encodeSpecialCharacters:!0},n.peek=t.peek,n.rewind=function(){var o=t.rewind();return o||(o=Q0({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),o},r},Ob=function(){return null},Ib=rb(xb,Rb,Q0)(Ob),pa=Nb(Ib);pa.renderStatic=pa.rewind;function Wc(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 Gc(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 os({title:e,heading:t,variant:n="default",description:r,headerRight:o,children:s}){return h.jsxs(h.Fragment,{children:[h.jsx(pa,{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:[Wc(e,t),Gc(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:[Wc(e,t),Gc(r)]}),o]})}),s]})}const Lb=e=>{let t=!1;return()=>{t||(window.requestAnimationFrame(()=>{e(),t=!1}),t=!0)}},Is=new Map;function Db(){const e=$o({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){Is.set(e,a);return}Is.delete(e)},o=Lb(()=>{if(t.current){const{scrollTop:a}=n;r(a)}}),s=Is.get(e);return s&&(n.scrollTop=s),n.addEventListener("scroll",o),()=>{n.removeEventListener("scroll",o)}}},[e]),h.jsx("div",{ref:t,className:"hidden"})}const Nr="/",Y0="/views",jb="/views/notes",X0="/calendar",J0="/reminders",eh="/graph",th="/search",nh="/tag",Or="/$id",fi="/tag/$id",rh="/setting",Fb="/setting/mcp",kb="/setting/trash",Hb="/setting/manage-image",$b="/setting/manage-image/$id",Vb="/setting/placeholder",ma="An unexpected routing error occurred.",oh=e=>typeof e=="object"&&e!==null&&"errors"in e&&Array.isArray(e.errors),Bb=e=>e instanceof Error?e.message:oh(e)?e.errors?.[0]?.message??ma:ma,Zb=e=>{if(oh(e))return e.errors?.[0]?.code};function hi({title:e,error:t,description:n,onRetry:r,showBackAction:o=!0,showHomeAction:s=!0}){const a=fn(),i=Ie(),[l,u]=c.useState("idle"),d=Bb(t),f=Zb(t),p=async()=>{try{const m=[f,d].filter(Boolean).join(" :: ");await navigator.clipboard.writeText(m||ma),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:[d,f&&h.jsxs(se,{as:"span",variant:"body",weight:"bold",tone:"tertiary",className:"ml-2",children:["[",f,"]"]})]}),h.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[r&&h.jsx(Gt,{size:"sm",onClick:r,children:"Try again"}),o&&h.jsx(Gt,{size:"sm",variant:"ghost",onClick:()=>i.history.back(),children:"Go back"}),s&&h.jsx(Gt,{size:"sm",variant:"ghost",onClick:()=>a({to:Nr,search:{page:1,sortBy:"updatedAt",sortOrder:"desc",pinnedFirst:!1}}),children:"Go home"}),h.jsx(Gt,{size:"sm",variant:"ghost",onClick:p,children:l==="copied"?"Copied details":l==="failed"?"Copy failed":"Copy details"})]})]})}function Ne({title:e="Loading page",description:t="Preparing route resources."}){return h.jsx(os,{title:e,description:t,variant:"none",children:h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsx(Et,{height:"56px"}),h.jsx(Et,{height:"220px"}),h.jsx(Et,{height:"160px"})]})})}function Ub({error:e,reset:t}){return h.jsx(os,{title:"Something went wrong",variant:"none",children:h.jsx(hi,{title:"Route failed to render",description:"Retry the route or navigate somewhere safe.",error:e,onRetry:t})})}function qb(){return h.jsx(os,{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 zb=(e=[],t=[])=>e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]));class Kb extends c.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidUpdate(t){this.state.error!==null&&zb(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 sh({children:e,fallback:t,errorTitle:n,errorDescription:r,resetKeys:o,renderError:s}){return h.jsx(_m,{children:({reset:a})=>h.jsx(Kb,{onReset:a,resetKeys:o,fallbackRender:({error:i,resetErrorBoundary:l})=>s?s({error:i,retry:l}):h.jsx(hi,{title:n,description:r,error:i,onRetry:l}),children:h.jsx(c.Suspense,{fallback:t,children:e})})})}const Qc=e=>{let t;const n=new Set,r=(u,d)=>{const f=typeof u=="function"?u(t):u;if(!Object.is(f,t)){const p=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),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},Wb=(e=>e?Qc(e):Qc),Gb=e=>e;function Qb(e,t=Gb){const n=K.useSyncExternalStore(e.subscribe,K.useCallback(()=>t(e.getState()),[e,t]),K.useCallback(()=>t(e.getInitialState()),[e,t]));return K.useDebugValue(n),n}const Yc=e=>{const t=Wb(e),n=r=>Qb(t,r);return Object.assign(n,t),n},Yb=(e=>e?Yc(e):Yc),ah="theme",Xc="(prefers-color-scheme: dark)";function Xb(e){return e==="light"||e==="dark"}function Jb(){return typeof document>"u"?null:document.documentElement}function ih(){return typeof window>"u"?null:window.localStorage}function ch(e){const t=Jb();t&&(t.classList.remove("light","dark"),t.classList.add(e))}function Co(){const e=ih()?.getItem(ah)??null;return Xb(e)?e:null}function ex({storedTheme:e,systemPrefersDark:t}){return e||(t?"dark":"light")}function tx(e,t={}){ch(e),t.persist!==!1&&ih()?.setItem(ah,e)}function nx(e={}){const t=e.matchMedia?e.matchMedia(Xc).matches:typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Xc).matches:!1,n=ex({storedTheme:Co(),systemPrefersDark:t});return ch(n),n}const Jc=Co(),Ao=Yb(e=>({explicitTheme:Jc,theme:Jc??"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}})}}));Ao.subscribe(e=>{tx(e.theme,{persist:e.explicitTheme===e.theme})});var Ls={exports:{}};var el;function rx(){return el||(el=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.call(this,i)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return this&&this[s]||s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(this,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,this&&this[i]||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})()})(Ls)),Ls.exports}var ox=rx();const sx=Nn(ox),ax="_SiteLayout_lbflf_1",ix="_side_lbflf_7",cx="_open_lbflf_24",lx="_menu_lbflf_29",ux="_top_lbflf_57",dx="_center_lbflf_86",fx="_content_lbflf_96",hx={SiteLayout:ax,side:ix,open:cx,menu:lx,top:ux,"top-content":"_top-content_lbflf_76",center:dx,content:fx},qt=sx.bind(hx),px=({sidebar:e,topNavigation:t,children:n})=>{const r=$o({select:i=>i.pathname}),[o,s]=c.useState(!1),a="site-layout-sidebar";return c.useEffect(()=>{s(!1)},[r]),h.jsxs("div",{className:qt("SiteLayout"),children:[h.jsx("div",{className:"md:hidden",children:h.jsx("button",{type:"button",className:qt("menu"),"aria-label":"Toggle sidebar","aria-controls":a,"aria-expanded":o,onClick:()=>s(i=>!i),children:h.jsx(Cg,{className:"h-6 w-6"})})}),h.jsx("aside",{id:a,className:qt("side",{open:o}),children:e}),h.jsxs("main",{className:qt("center"),children:[h.jsx("div",{className:qt("top"),children:h.jsx("div",{className:qt("top-content"),children:t})}),h.jsx("div",{className:qt("content"),children:n}),h.jsx(Db,{})]})]})},mx=e=>({type:"error",category:"graphql",errors:e.map(t=>({code:t.extensions?.code??"GRAPHQL_ERROR",message:t.message??"GraphQL request failed",details:t}))}),gx=e=>{const t=le.isAxiosError(e)?e.response?.data?.message??e.message??"Network request failed":"Network request failed",n=le.isAxiosError(e)?e.code??(e.response?.status?`HTTP_${e.response.status}`:"NETWORK_ERROR"):"NETWORK_ERROR",r=le.isAxiosError(e)?e.response?.data:void 0;return{type:"error",category:"network",errors:[{code:n,message:t,details:r}]}};async function ge(e,t,n){const r=typeof e=="string"?{query:e,variables:t,operationName:n}:e;try{const{data:o}=await le.post("/graphql",r);return o.errors&&o.errors.length>0?mx(o.errors):o.data?{type:"success",...o.data}:{type:"error",category:"graphql",errors:[{code:"EMPTY_RESPONSE",message:"GraphQL response data is empty",details:o}]}}catch(o){return gx(o)}}const lh=e=>typeof e=="object"&&e!==null&&"value"in e&&typeof e.value=="string",uh=(e,t)=>({type:"error",category:"graphql",errors:[{code:"INVALID_RESPONSE_SHAPE",message:`GraphQL response field "${e}" is missing or invalid`,details:t}]}),vx=async e=>{try{const t=await ge(`
22
- query GetServerCache($key: String!) {
23
- cache(key: $key) {
24
- value
25
- }
26
- }
27
- `,{key:e});if(t.type==="error")throw t;if(!lh(t.cache))throw uh("cache",t);return t.cache.value}catch{return""}},yx=async(e,t)=>{const n=await ge(`
28
- mutation SetServerCache($key: String!, $value: String!) {
29
- setCache(key: $key, value: $value) {
30
- value
31
- }
32
- }
33
- `,{key:e,value:encodeURIComponent(t)});return n.type==="error"?n:lh(n.setCache)?{...n,setCache:n.setCache}:uh("setCache",n)},bx=()=>{const e=ud(),t=fd(),n=In(),{data:r}=km({queryKey:oe.ui.heroBanner(),async queryFn(){return vx("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 yx("heroBanner","");if(o.type==="error"){t(o.errors[0]?.message??"Failed to remove hero banner");return}await n.invalidateQueries({queryKey:oe.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},xx=new Set(["content","order","layout"]),wx=`query FetchNotes(
34
- $searchFilter: SearchFilterInput,
35
- $pagination: PaginationInput
36
- ) {
37
- allNotes(
38
- searchFilter: $searchFilter,
39
- pagination: $pagination
40
- ) {
41
- totalCount
42
- notes {
43
- __NOTE_ADDITIONAL_FIELDS__ id
44
- title
45
- pinned
46
- createdAt
47
- updatedAt
48
- tags {
49
- id
50
- name
51
- }
52
- }
53
- }
54
- }`,Ex=e=>{if(!e||e.length===0)return"";const t=Array.from(new Set(e.filter(n=>xx.has(n))));return t.length===0?"":t.map(n=>" "+n).join(`
55
- `)+`
56
- `};function dh({limit:e=25,offset:t=0,query:n="",sortBy:r,sortOrder:o,pinnedFirst:s,fields:a}={}){const i=Ex(a),l=wx.replace("__NOTE_ADDITIONAL_FIELDS__",i);return ge(l,{searchFilter:{query:n,sortBy:r,sortOrder:o,pinnedFirst:s},pagination:{limit:e,offset:t}})}function wS({query:e="",limit:t=25,offset:n=0}={}){return ge(`query FetchTagNotes(
57
- $searchFilter: SearchFilterInput,
58
- $pagination: PaginationInput
59
- ) {
60
- tagNotes(
61
- searchFilter: $searchFilter,
62
- pagination: $pagination
63
- ) {
64
- totalCount
65
- notes {
66
- id
67
- title
68
- pinned
69
- tags {
70
- id
71
- name
72
- }
73
- createdAt
74
- updatedAt
75
- }
76
- }
77
- }`,{searchFilter:{query:e},pagination:{limit:t,offset:n}})}function ES(e){return ge(`query FetchNote($id: ID!) {
78
- note(id: $id) {
79
- title
80
- pinned
81
- layout
82
- content
83
- updatedAt
84
- }
85
- }`,{id:e})}function SS(e){return ge(`query FetchBackReferences($id: ID!) {
86
- backReferences(id: $id) {
87
- id
88
- title
89
- }
90
- }`,{id:e})}function RS(e){return ge(`query FetchImageNotes($src: String!) {
91
- imageNotes(src: $src) {
92
- id
93
- title
94
- createdAt
95
- updatedAt
96
- }
97
- }`,{src:e})}function Sx(e){return ge(`mutation CreateNote($note: NoteInput!) {
98
- createNote(note: $note) {
99
- id
100
- }
101
- }`,{note:e})}const CS=({id:e,editSessionId:t,...n})=>ge(`mutation UpdateNote($id: ID!, $note: NoteInput!, $editSessionId: String) {
102
- updateNote(id: $id, note: $note, editSessionId: $editSessionId) {
103
- id
104
- title
105
- }
106
- }`,{id:e,note:n,...t?{editSessionId:t}:{}});function AS(e,t=5){return ge(`query FetchNoteSnapshots($id: ID!, $limit: Int) {
107
- noteSnapshots(id: $id, limit: $limit) {
108
- id
109
- title
110
- createdAt
111
- meta {
112
- entrypoint
113
- label
114
- }
115
- }
116
- }`,{id:e,limit:t})}function PS(e){return ge(`mutation RestoreNoteSnapshot($id: ID!) {
117
- restoreNoteSnapshot(id: $id) {
118
- id
119
- title
120
- pinned
121
- layout
122
- content
123
- updatedAt
124
- }
125
- }`,{id:e})}function TS({limit:e=25,offset:t=0}={}){return ge(`query FetchTrashedNotes($pagination: PaginationInput) {
126
- trashedNotes(pagination: $pagination) {
127
- totalCount
128
- notes {
129
- id
130
- title
131
- createdAt
132
- updatedAt
133
- deletedAt
134
- pinned
135
- order
136
- layout
137
- tagNames
138
- }
139
- }
140
- }`,{pagination:{limit:e,offset:t}})}function MS(e){return ge(`mutation RestoreTrashedNote($id: ID!) {
141
- restoreTrashedNote(id: $id) {
142
- id
143
- title
144
- pinned
145
- layout
146
- content
147
- updatedAt
148
- }
149
- }`,{id:e})}function _S(e){return ge(`mutation PurgeTrashedNote($id: ID!) {
150
- purgeTrashedNote(id: $id)
151
- }`,{id:e})}function Rx(e,t){return ge(`mutation PinNote($id: ID!, $pinned: Boolean!) {
152
- pinNote(id: $id, pinned: $pinned) {
153
- id
154
- title
155
- pinned
156
- createdAt
157
- updatedAt
158
- }
159
- }`,{id:e,pinned:t})}function Cx(e){return ge(`mutation DeleteNote($id: ID!) {
160
- deleteNote(id: $id)
161
- }`,{id:e})}function Ax(e){return ge(`mutation ReorderNotes($notes: [NoteOrderInput!]!) {
162
- reorderNotes(notes: $notes) {
163
- id
164
- order
165
- }
166
- }`,{notes:e})}function NS(){return ge(`query FetchNoteGraph {
167
- noteGraph {
168
- nodes {
169
- id
170
- title
171
- connections
172
- }
173
- links {
174
- source
175
- target
176
- }
177
- }
178
- }`)}var ro={exports:{}},Px=ro.exports,tl;function Tx(){return tl||(tl=1,(function(e,t){(function(n,r){e.exports=r()})(Px,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",a="second",i="minute",l="hour",u="day",d="week",f="month",p="quarter",m="year",g="date",v="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 D=["th","st","nd","rd"],P=L%100;return"["+L+(D[(P-20)%10]||D[P]||D[0])+"]"}},w=function(L,D,P){var j=String(L);return!j||j.length>=D?L:""+Array(D+1-j.length).join(P)+L},E={s:w,z:function(L){var D=-L.utcOffset(),P=Math.abs(D),j=Math.floor(P/60),O=P%60;return(D<=0?"+":"-")+w(j,2,"0")+":"+w(O,2,"0")},m:function L(D,P){if(D.date()<P.date())return-L(P,D);var j=12*(P.year()-D.year())+(P.month()-D.month()),O=D.clone().add(j,f),_=P-O<0,$=D.clone().add(j+(_?-1:1),f);return+(-(j+(P-O)/(_?O-$:$-O))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:f,y:m,w:d,d:u,D:g,h:l,m:i,s:a,ms:s,Q:p}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},C="en",N={};N[C]=x;var R="$isDayjsObject",S=function(L){return L instanceof F||!(!L||!L[R])},M=function L(D,P,j){var O;if(!D)return C;if(typeof D=="string"){var _=D.toLowerCase();N[_]&&(O=_),P&&(N[_]=P,O=_);var $=D.split("-");if(!O&&$.length>1)return L($[0])}else{var Z=D.name;N[Z]=D,O=Z}return!j&&O&&(C=O),O||!j&&C},I=function(L,D){if(S(L))return L.clone();var P=typeof D=="object"?D:{};return P.date=L,P.args=arguments,new F(P)},T=E;T.l=M,T.i=S,T.w=function(L,D){return I(L,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var F=(function(){function L(P){this.$L=M(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[R]=!0}var D=L.prototype;return D.parse=function(P){this.$d=(function(j){var O=j.date,_=j.utc;if(O===null)return new Date(NaN);if(T.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var $=O.match(y);if($){var Z=$[2]-1||0,U=($[7]||"0").substring(0,3);return _?new Date(Date.UTC($[1],Z,$[3]||1,$[4]||0,$[5]||0,$[6]||0,U)):new Date($[1],Z,$[3]||1,$[4]||0,$[5]||0,$[6]||0,U)}}return new Date(O)})(P),this.init()},D.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},D.$utils=function(){return T},D.isValid=function(){return this.$d.toString()!==v},D.isSame=function(P,j){var O=I(P);return this.startOf(j)<=O&&O<=this.endOf(j)},D.isAfter=function(P,j){return I(P)<this.startOf(j)},D.isBefore=function(P,j){return this.endOf(j)<I(P)},D.$g=function(P,j,O){return T.u(P)?this[j]:this.set(O,P)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(P,j){var O=this,_=!!T.u(j)||j,$=T.p(P),Z=function(ee,H){var Y=T.w(O.$u?Date.UTC(O.$y,H,ee):new Date(O.$y,H,ee),O);return _?Y:Y.endOf(u)},U=function(ee,H){return T.w(O.toDate()[ee].apply(O.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(H)),O)},G=this.$W,q=this.$M,Q=this.$D,ne="set"+(this.$u?"UTC":"");switch($){case m:return _?Z(1,0):Z(31,11);case f:return _?Z(1,q):Z(0,q+1);case d:var k=this.$locale().weekStart||0,W=(G<k?G+7:G)-k;return Z(_?Q-W:Q+(6-W),q);case u:case g:return U(ne+"Hours",0);case l:return U(ne+"Minutes",1);case i:return U(ne+"Seconds",2);case a:return U(ne+"Milliseconds",3);default:return this.clone()}},D.endOf=function(P){return this.startOf(P,!1)},D.$set=function(P,j){var O,_=T.p(P),$="set"+(this.$u?"UTC":""),Z=(O={},O[u]=$+"Date",O[g]=$+"Date",O[f]=$+"Month",O[m]=$+"FullYear",O[l]=$+"Hours",O[i]=$+"Minutes",O[a]=$+"Seconds",O[s]=$+"Milliseconds",O)[_],U=_===u?this.$D+(j-this.$W):j;if(_===f||_===m){var G=this.clone().set(g,1);G.$d[Z](U),G.init(),this.$d=G.set(g,Math.min(this.$D,G.daysInMonth())).$d}else Z&&this.$d[Z](U);return this.init(),this},D.set=function(P,j){return this.clone().$set(P,j)},D.get=function(P){return this[T.p(P)]()},D.add=function(P,j){var O,_=this;P=Number(P);var $=T.p(j),Z=function(q){var Q=I(_);return T.w(Q.date(Q.date()+Math.round(q*P)),_)};if($===f)return this.set(f,this.$M+P);if($===m)return this.set(m,this.$y+P);if($===u)return Z(1);if($===d)return Z(7);var U=(O={},O[i]=r,O[l]=o,O[a]=n,O)[$]||1,G=this.$d.getTime()+P*U;return T.w(G,this)},D.subtract=function(P,j){return this.add(-1*P,j)},D.format=function(P){var j=this,O=this.$locale();if(!this.isValid())return O.invalidDate||v;var _=P||"YYYY-MM-DDTHH:mm:ssZ",$=T.z(this),Z=this.$H,U=this.$m,G=this.$M,q=O.weekdays,Q=O.months,ne=O.meridiem,k=function(H,Y,J,ie){return H&&(H[Y]||H(j,_))||J[Y].slice(0,ie)},W=function(H){return T.s(Z%12||12,H,"0")},ee=ne||function(H,Y,J){var ie=H<12?"AM":"PM";return J?ie.toLowerCase():ie};return _.replace(b,(function(H,Y){return Y||(function(J){switch(J){case"YY":return String(j.$y).slice(-2);case"YYYY":return T.s(j.$y,4,"0");case"M":return G+1;case"MM":return T.s(G+1,2,"0");case"MMM":return k(O.monthsShort,G,Q,3);case"MMMM":return k(Q,G);case"D":return j.$D;case"DD":return T.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return k(O.weekdaysMin,j.$W,q,2);case"ddd":return k(O.weekdaysShort,j.$W,q,3);case"dddd":return q[j.$W];case"H":return String(Z);case"HH":return T.s(Z,2,"0");case"h":return W(1);case"hh":return W(2);case"a":return ee(Z,U,!0);case"A":return ee(Z,U,!1);case"m":return String(U);case"mm":return T.s(U,2,"0");case"s":return String(j.$s);case"ss":return T.s(j.$s,2,"0");case"SSS":return T.s(j.$ms,3,"0");case"Z":return $}return null})(H)||$.replace(":","")}))},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(P,j,O){var _,$=this,Z=T.p(j),U=I(P),G=(U.utcOffset()-this.utcOffset())*r,q=this-U,Q=function(){return T.m($,U)};switch(Z){case m:_=Q()/12;break;case f:_=Q();break;case p:_=Q()/3;break;case d:_=(q-G)/6048e5;break;case u:_=(q-G)/864e5;break;case l:_=q/o;break;case i:_=q/r;break;case a:_=q/n;break;default:_=q}return O?_:T.a(_)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return N[this.$L]},D.locale=function(P,j){if(!P)return this.$L;var O=this.clone(),_=M(P,j,!0);return _&&(O.$L=_),O},D.clone=function(){return T.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},L})(),B=F.prototype;return I.prototype=B,[["$ms",s],["$s",a],["$m",i],["$H",l],["$W",u],["$M",f],["$y",m],["$D",g]].forEach((function(L){B[L[1]]=function(D){return this.$g(D,L[0],L[1])}})),I.extend=function(L,D){return L.$i||(L(D,F,I),L.$i=!0),I},I.locale=M,I.isDayjs=S,I.unix=function(L){return I(1e3*L)},I.en=N[C],I.Ls=N,I.p={},I}))})(ro)),ro.exports}var Mx=Tx();const Te=Nn(Mx),_x=()=>{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)},Nx=()=>[{name:"Year",template:"year",replacement:Te().format("YYYY")},{name:"Month",template:"month",replacement:Te().format("MM")},{name:"Short Month",template:"mon",replacement:Te().format("M")},{name:"Day",template:"day",replacement:Te().format("DD")},{name:"Short Day",template:"d",replacement:Te().format("D")},{name:"Week of Month",template:"week_of_month",replacement:_x().toString()},{name:"Hour 24",template:"hour",replacement:Te().format("HH")},{name:"Hour 12",template:"hour_12",replacement:Te().format("hh")},{name:"Short Hour 24",template:"h",replacement:Te().format("H")},{name:"Short Hour 12",template:"h_12",replacement:Te().format("h")},{name:"AM/PM",template:"ampm",replacement:Te().format("A")},{name:"Minute",template:"minute",replacement:Te().format("mm")},{name:"Short Minute",template:"m",replacement:Te().format("m")},{name:"Second",template:"second",replacement:Te().format("ss")},{name:"Short Second",template:"s",replacement:Te().format("s")}],Ox="{%",Ix="%}",nl=e=>e.replace(new RegExp(`${Ox}([^}]+)${Ix}`,"g"),(t,n)=>Nx().find(o=>o.template===n)?.replacement||t),fh=()=>{const e=ud(),t=fd(),n=In(),r=fn();return{onCreate:async(i="",l="",u)=>{const d=nl(i),f=nl(l),p=await Sx({title:d,content:f,...u&&{layout:u}});p.type!=="error"&&r({to:Or,params:{id:p.createNote.id}})},onPinned:async(i,l,u)=>{try{const d=await Rx(i,!l);if(d.type==="error"){t(d.errors[0].message);return}await Promise.all([n.invalidateQueries({queryKey:oe.notes.listAll(),exact:!1}),n.invalidateQueries({queryKey:oe.notes.tagListAll(),exact:!1}),n.invalidateQueries({queryKey:oe.notes.pinned(),exact:!0})]),u?.()}catch{t("Failed to update note pin status")}},onDelete:async(i,l)=>{if(await e("Move this note to trash?")){const u=await Cx(i);if(u.type==="error"){t(u.errors[0].message);return}await Promise.all([n.invalidateQueries({queryKey:oe.notes.all(),exact:!1}),n.invalidateQueries({queryKey:oe.tags.all(),exact:!1}),n.invalidateQueries({queryKey:oe.reminders.all(),exact:!1}),n.invalidateQueries({queryKey:oe.images.all(),exact:!1}),n.invalidateQueries({queryKey:["calendar"],exact:!1})]),t("The note has been moved to trash."),l?.()}}}};function Lx(){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 ss=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Fn(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function pi(e){return"nodeType"in e}function Ve(e){var t,n;return e?Fn(e)?e:pi(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function mi(e){const{Document:t}=Ve(e);return e instanceof t}function Ir(e){return Fn(e)?!1:e instanceof Ve(e).HTMLElement}function hh(e){return e instanceof Ve(e).SVGElement}function kn(e){return e?Fn(e)?e.document:pi(e)?mi(e)?e:Ir(e)||hh(e)?e.ownerDocument:document:document:document}const ht=ss?c.useLayoutEffect:c.useEffect;function gi(e){const t=c.useRef(e);return ht(()=>{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 Dx(){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 pr(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return ht(()=>{n.current!==e&&(n.current=e)},t),n}function Lr(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Po(e){const t=gi(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ga(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let Ds={};function Dr(e,t){return c.useMemo(()=>{if(t)return t;const n=Ds[e]==null?0:Ds[e]+1;return Ds[e]=n,e+"-"+n},[e,t])}function ph(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 d=s[l];d!=null&&(s[l]=d+e*u)}return s},{...t})}}const Cn=ph(1),mr=ph(-1);function jx(e){return"clientX"in e&&"clientY"in e}function vi(e){if(!e)return!1;const{KeyboardEvent:t}=Ve(e.target);return t&&e instanceof t}function Fx(e){if(!e)return!1;const{TouchEvent:t}=Ve(e.target);return t&&e instanceof t}function va(e){if(Fx(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 jx(e)?{x:e.clientX,y:e.clientY}:null}const gr=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[gr.Translate.toString(e),gr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),rl="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function kx(e){return e.matches(rl)?e:e.querySelector(rl)}const Hx={display:"none"};function $x(e){let{id:t,value:n}=e;return K.createElement("div",{id:t,style:Hx},n)}function Vx(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 K.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Bx(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const mh=c.createContext(null);function Zx(e){const t=c.useContext(mh);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Ux(){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 qx={draggable:`
179
- To pick up a draggable item, press the space bar.
180
- While dragging, use the arrow keys to move the item.
181
- Press space again to drop the item in its new position, or press escape to cancel.
182
- `},zx={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 Kx(e){let{announcements:t=zx,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=qx}=e;const{announce:s,announcement:a}=Bx(),i=Dr("DndLiveRegion"),[l,u]=c.useState(!1);if(c.useEffect(()=>{u(!0)},[]),Zx(c.useMemo(()=>({onDragStart(f){let{active:p}=f;s(t.onDragStart({active:p}))},onDragMove(f){let{active:p,over:m}=f;t.onDragMove&&s(t.onDragMove({active:p,over:m}))},onDragOver(f){let{active:p,over:m}=f;s(t.onDragOver({active:p,over:m}))},onDragEnd(f){let{active:p,over:m}=f;s(t.onDragEnd({active:p,over:m}))},onDragCancel(f){let{active:p,over:m}=f;s(t.onDragCancel({active:p,over:m}))}}),[s,t])),!l)return null;const d=K.createElement(K.Fragment,null,K.createElement($x,{id:r,value:o.draggable}),K.createElement(Vx,{id:i,announcement:a}));return n?wt.createPortal(d,n):d}var ye;(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"})(ye||(ye={}));function To(){}function ol(e,t){return c.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Wx(){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 st=Object.freeze({x:0,y:0});function gh(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function vh(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Gx(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function sl(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 yh(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function al(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 Qx=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=al(t,t.left,t.top),s=[];for(const a of r){const{id:i}=a,l=n.get(i);if(l){const u=gh(al(l),o);s.push({id:i,data:{droppableContainer:a,value:u}})}}return s.sort(vh)},Yx=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=sl(t),s=[];for(const a of r){const{id:i}=a,l=n.get(i);if(l){const u=sl(l),d=o.reduce((p,m,g)=>p+gh(u[g],m),0),f=Number((d/4).toFixed(4));s.push({id:i,data:{droppableContainer:a,value:f}})}}return s.sort(vh)};function Xx(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,d=a*i,f=d/(l+u-d);return Number(f.toFixed(4))}return 0}const Jx=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=Xx(i,t);l>0&&o.push({id:a,data:{droppableContainer:s,value:l}})}}return o.sort(Gx)};function ew(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function bh(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:st}function tw(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 nw=tw(1);function rw(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 ow(e,t,n){const r=rw(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)),d=o?e.width/o:e.width,f=s?e.height/s:e.height;return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l}}const sw={ignoreTransform:!1};function Hn(e,t){t===void 0&&(t=sw);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=Ve(e).getComputedStyle(e);u&&(n=ow(n,u,d))}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 il(e){return Hn(e,{ignoreTransform:!0})}function aw(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function iw(e,t){return t===void 0&&(t=Ve(e).getComputedStyle(e)),t.position==="fixed"}function cw(e,t){t===void 0&&(t=Ve(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 as(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(mi(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Ir(o)||hh(o)||n.includes(o))return n;const s=Ve(e).getComputedStyle(o);return o!==e&&cw(o,s)&&n.push(o),iw(o,s)?n:r(o.parentNode)}return e?r(e):n}function xh(e){const[t]=as(e,1);return t??null}function js(e){return!ss||!e?null:Fn(e)?e:pi(e)?mi(e)||e===kn(e).scrollingElement?window:Ir(e)?e:null:null}function wh(e){return Fn(e)?e.scrollX:e.scrollLeft}function Eh(e){return Fn(e)?e.scrollY:e.scrollTop}function ya(e){return{x:wh(e),y:Eh(e)}}var we;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(we||(we={}));function Sh(e){return!ss||!e?!1:e===document.scrollingElement}function Rh(e){const t={x:0,y:0},n=Sh(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 lw={x:.2,y:.2};function uw(e,t,n,r,o){let{top:s,left:a,right:i,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=lw);const{isTop:u,isBottom:d,isLeft:f,isRight:p}=Rh(e),m={x:0,y:0},g={x:0,y:0},v={height:t.height*o.y,width:t.width*o.x};return!u&&s<=t.top+v.height?(m.y=we.Backward,g.y=r*Math.abs((t.top+v.height-s)/v.height)):!d&&l>=t.bottom-v.height&&(m.y=we.Forward,g.y=r*Math.abs((t.bottom-v.height-l)/v.height)),!p&&i>=t.right-v.width?(m.x=we.Forward,g.x=r*Math.abs((t.right-v.width-i)/v.width)):!f&&a<=t.left+v.width&&(m.x=we.Backward,g.x=r*Math.abs((t.left+v.width-a)/v.width)),{direction:m,speed:g}}function dw(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 Ch(e){return e.reduce((t,n)=>Cn(t,ya(n)),st)}function fw(e){return e.reduce((t,n)=>t+wh(n),0)}function hw(e){return e.reduce((t,n)=>t+Eh(n),0)}function pw(e,t){if(t===void 0&&(t=Hn),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);xh(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const mw=[["x",["left","right"],fw],["y",["top","bottom"],hw]];class yi{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=as(n),o=Ch(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,a,i]of mw)for(const l of a)Object.defineProperty(this,l,{get:()=>{const u=i(r),d=o[s]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class rr{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 gw(e){const{EventTarget:t}=Ve(e);return e instanceof t?e:kn(e)}function Fs(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 et;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(et||(et={}));function cl(e){e.preventDefault()}function vw(e){e.stopPropagation()}var re;(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"})(re||(re={}));const Ah={start:[re.Space,re.Enter],cancel:[re.Esc],end:[re.Space,re.Enter,re.Tab]},yw=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case re.Right:return{...n,x:n.x+25};case re.Left:return{...n,x:n.x-25};case re.Down:return{...n,y:n.y+25};case re.Up:return{...n,y:n.y-25}}};class bi{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 rr(kn(n)),this.windowListeners=new rr(Ve(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(et.Resize,this.handleCancel),this.windowListeners.add(et.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(et.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&pw(r),n(st)}handleKeyDown(t){if(vi(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=Ah,coordinateGetter:a=yw,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,d=u?{x:u.left,y:u.top}:st;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const p=mr(f,d),m={x:0,y:0},{scrollableAncestors:g}=r.current;for(const v of g){const y=t.code,{isTop:b,isRight:x,isLeft:w,isBottom:E,maxScroll:C,minScroll:N}=Rh(v),R=dw(v),S={x:Math.min(y===re.Right?R.right-R.width/2:R.right,Math.max(y===re.Right?R.left:R.left+R.width/2,f.x)),y:Math.min(y===re.Down?R.bottom-R.height/2:R.bottom,Math.max(y===re.Down?R.top:R.top+R.height/2,f.y))},M=y===re.Right&&!x||y===re.Left&&!w,I=y===re.Down&&!E||y===re.Up&&!b;if(M&&S.x!==f.x){const T=v.scrollLeft+p.x,F=y===re.Right&&T<=C.x||y===re.Left&&T>=N.x;if(F&&!p.y){v.scrollTo({left:T,behavior:i});return}F?m.x=v.scrollLeft-T:m.x=y===re.Right?v.scrollLeft-C.x:v.scrollLeft-N.x,m.x&&v.scrollBy({left:-m.x,behavior:i});break}else if(I&&S.y!==f.y){const T=v.scrollTop+p.y,F=y===re.Down&&T<=C.y||y===re.Up&&T>=N.y;if(F&&!p.x){v.scrollTo({top:T,behavior:i});return}F?m.y=v.scrollTop-T:m.y=y===re.Down?v.scrollTop-C.y:v.scrollTop-N.y,m.y&&v.scrollBy({top:-m.y,behavior:i});break}}this.handleMove(t,Cn(mr(f,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()}}bi.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Ah,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 ll(e){return!!(e&&"distance"in e)}function ul(e){return!!(e&&"delay"in e)}class xi{constructor(t,n,r){var o;r===void 0&&(r=gw(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=kn(a),this.documentListeners=new rr(this.document),this.listeners=new rr(r),this.windowListeners=new rr(Ve(a)),this.initialCoordinates=(o=va(s))!=null?o:st,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(et.Resize,this.handleCancel),this.windowListeners.add(et.DragStart,cl),this.windowListeners.add(et.VisibilityChange,this.handleCancel),this.windowListeners.add(et.ContextMenu,cl),this.documentListeners.add(et.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ul(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(ll(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(et.Click,vw,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(et.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=va(t))!=null?n:st,u=mr(o,l);if(!r&&i){if(ll(i)){if(i.tolerance!=null&&Fs(u,i.tolerance))return this.handleCancel();if(Fs(u,i.distance))return this.handleStart()}if(ul(i)&&Fs(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===re.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const bw={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class wi extends xi{constructor(t){const{event:n}=t,r=kn(n.target);super(t,bw,r)}}wi.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 xw={move:{name:"mousemove"},end:{name:"mouseup"}};var ba;(function(e){e[e.RightClick=2]="RightClick"})(ba||(ba={}));class ww extends xi{constructor(t){super(t,xw,kn(t.event.target))}}ww.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ba.RightClick?!1:(r?.({event:n}),!0)}}];const ks={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Ew extends xi{constructor(t){super(t,ks)}static setup(){return window.addEventListener(ks.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(ks.move.name,t)};function t(){}}}Ew.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 or;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(or||(or={}));var Mo;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Mo||(Mo={}));function Sw(e){let{acceleration:t,activator:n=or.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:a=5,order:i=Mo.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:p}=e;const m=Cw({delta:f,disabled:!s}),[g,v]=Dx(),y=c.useRef({x:0,y:0}),b=c.useRef({x:0,y:0}),x=c.useMemo(()=>{switch(n){case or.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case or.DraggableRect:return o}},[n,o,l]),w=c.useRef(null),E=c.useCallback(()=>{const N=w.current;if(!N)return;const R=y.current.x*b.current.x,S=y.current.y*b.current.y;N.scrollBy(R,S)},[]),C=c.useMemo(()=>i===Mo.TreeOrder?[...u].reverse():u,[i,u]);c.useEffect(()=>{if(!s||!u.length||!x){v();return}for(const N of C){if(r?.(N)===!1)continue;const R=u.indexOf(N),S=d[R];if(!S)continue;const{direction:M,speed:I}=uw(N,S,x,t,p);for(const T of["x","y"])m[T][M[T]]||(I[T]=0,M[T]=0);if(I.x>0||I.y>0){v(),w.current=N,g(E,a),y.current=I,b.current=M;return}}y.current={x:0,y:0},b.current={x:0,y:0},v()},[t,E,r,v,s,a,JSON.stringify(x),JSON.stringify(m),g,u,C,d,JSON.stringify(p)])}const Rw={x:{[we.Backward]:!1,[we.Forward]:!1},y:{[we.Backward]:!1,[we.Forward]:!1}};function Cw(e){let{delta:t,disabled:n}=e;const r=ga(t);return Lr(o=>{if(n||!r||!o)return Rw;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[we.Backward]:o.x[we.Backward]||s.x===-1,[we.Forward]:o.x[we.Forward]||s.x===1},y:{[we.Backward]:o.y[we.Backward]||s.y===-1,[we.Forward]:o.y[we.Forward]||s.y===1}}},[n,t,r])}function Aw(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Lr(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function Pw(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 vr;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(vr||(vr={}));var xa;(function(e){e.Optimized="optimized"})(xa||(xa={}));const dl=new Map;function Tw(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,a]=c.useState(null),{frequency:i,measure:l,strategy:u}=o,d=c.useRef(e),f=y(),p=pr(f),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]),g=c.useRef(null),v=Lr(b=>{if(f&&!n)return dl;if(!b||b===dl||d.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,C=E?new yi(l(E),E):null;w.rect.current=C,C&&x.set(w.id,C)}return x}return b},[e,s,n,f,l]);return c.useEffect(()=>{d.current=e},[e]),c.useEffect(()=>{f||m()},[n,f]),c.useEffect(()=>{s&&s.length>0&&a(null)},[JSON.stringify(s)]),c.useEffect(()=>{f||typeof i!="number"||g.current!==null||(g.current=setTimeout(()=>{m(),g.current=null},i))},[i,f,m,...r]),{droppableRects:v,measureDroppableContainers:m,measuringScheduled:s!=null};function y(){switch(u){case vr.Always:return!1;case vr.BeforeDragging:return n;default:return!n}}}function Ph(e,t){return Lr(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Mw(e,t){return Ph(e,t)}function _w(e){let{callback:t,disabled:n}=e;const r=gi(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 is(e){let{callback:t,disabled:n}=e;const r=gi(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 Nw(e){return new yi(Hn(e),e)}function fl(e,t,n){t===void 0&&(t=Nw);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 d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const a=_w({callback(l){if(e)for(const u of l){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){s();break}}}}),i=is({callback:s});return ht(()=>{s(),e?(i?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(i?.disconnect(),a?.disconnect())},[e]),r}function Ow(e){const t=Ph(e);return bh(e,t)}const hl=[];function Iw(e){const t=c.useRef(e),n=Lr(r=>e?r&&r!==hl&&e&&t.current&&e.parentNode===t.current.parentNode?r:as(e):hl,[e]);return c.useEffect(()=>{t.current=e},[e]),n}function Lw(e){const[t,n]=c.useState(null),r=c.useRef(e),o=c.useCallback(s=>{const a=js(s.target);a&&n(i=>i?(i.set(a,ya(a)),new Map(i)):null)},[]);return c.useEffect(()=>{const s=r.current;if(e!==s){a(s);const i=e.map(l=>{const u=js(l);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,ya(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=js(l);u?.removeEventListener("scroll",o)})}},[o,e]),c.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,a)=>Cn(s,a),st):Ch(e):st,[e,t])}function pl(e,t){t===void 0&&(t=[]);const n=c.useRef(null);return c.useEffect(()=>{n.current=null},t),c.useEffect(()=>{const r=e!==st;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?mr(e,n.current):st}function Dw(e){c.useEffect(()=>{if(!ss)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 jw(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 Th(e){return c.useMemo(()=>e?aw(e):null,[e])}const ml=[];function Fw(e,t){t===void 0&&(t=Hn);const[n]=e,r=Th(n?Ve(n):null),[o,s]=c.useState(ml);function a(){s(()=>e.length?e.map(l=>Sh(l)?r:new yi(t(l),l)):ml)}const i=is({callback:a});return ht(()=>{i?.disconnect(),a(),e.forEach(l=>i?.observe(l))},[e]),o}function kw(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ir(t)?t:e}function Hw(e){let{measure:t}=e;const[n,r]=c.useState(null),o=c.useCallback(u=>{for(const{target:d}of u)if(Ir(d)){r(f=>{const p=t(d);return f?{...f,width:p.width,height:p.height}:p});break}},[t]),s=is({callback:o}),a=c.useCallback(u=>{const d=kw(u);s?.disconnect(),d&&s?.observe(d),r(d?t(d):null)},[t,s]),[i,l]=Po(a);return c.useMemo(()=>({nodeRef:i,rect:n,setRef:l}),[n,i,l])}const $w=[{sensor:wi,options:{}},{sensor:bi,options:{}}],Vw={current:{}},oo={draggable:{measure:il},droppable:{measure:il,strategy:vr.WhileDragging,frequency:xa.Optimized},dragOverlay:{measure:Hn}};class sr 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 Bw={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new sr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:To},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:oo,measureDroppableContainers:To,windowRect:null,measuringScheduled:!1},Zw={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:To,draggableNodes:new Map,over:null,measureDroppableContainers:To},cs=c.createContext(Zw),Mh=c.createContext(Bw);function Uw(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new sr}}}function qw(e,t){switch(t.type){case ye.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ye.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 ye.DragEnd:case ye.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ye.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new sr(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case ye.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 sr(e.droppable.containers);return a.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case ye.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new sr(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function zw(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=c.useContext(cs),s=ga(r),a=ga(n?.id);return c.useEffect(()=>{if(!t&&!r&&s&&a!=null){if(!vi(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 d of[l.current,u.current]){if(!d)continue;const f=kx(d);if(f){f.focus();break}}})}},[r,t,o,a,s]),null}function Kw(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function Ww(e){return c.useMemo(()=>({draggable:{...oo.draggable,...e?.draggable},droppable:{...oo.droppable,...e?.droppable},dragOverlay:{...oo.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Gw(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;ht(()=>{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 d=n(u),f=bh(d,r);if(a||(f.x=0),i||(f.y=0),s.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const p=xh(u);p&&p.scrollBy({top:f.y,left:f.x})}},[t,a,i,r,n])}const _h=c.createContext({...st,scaleX:1,scaleY:1});var It;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(It||(It={}));const Qw=c.memo(function(t){var n,r,o,s;let{id:a,accessibility:i,autoScroll:l=!0,children:u,sensors:d=$w,collisionDetection:f=Jx,measuring:p,modifiers:m,...g}=t;const v=c.useReducer(qw,void 0,Uw),[y,b]=v,[x,w]=Ux(),[E,C]=c.useState(It.Uninitialized),N=E===It.Initialized,{draggable:{active:R,nodes:S,translate:M},droppable:{containers:I}}=y,T=R!=null?S.get(R):null,F=c.useRef({initial:null,translated:null}),B=c.useMemo(()=>{var Pe;return R!=null?{id:R,data:(Pe=T?.data)!=null?Pe:Vw,rect:F}:null},[R,T]),L=c.useRef(null),[D,P]=c.useState(null),[j,O]=c.useState(null),_=pr(g,Object.values(g)),$=Dr("DndDescribedBy",a),Z=c.useMemo(()=>I.getEnabled(),[I]),U=Ww(p),{droppableRects:G,measureDroppableContainers:q,measuringScheduled:Q}=Tw(Z,{dragging:N,dependencies:[M.x,M.y],config:U.droppable}),ne=Aw(S,R),k=c.useMemo(()=>j?va(j):null,[j]),W=Bh(),ee=Mw(ne,U.draggable.measure);Gw({activeNode:R!=null?S.get(R):null,config:W.layoutShiftCompensation,initialRect:ee,measure:U.draggable.measure});const H=fl(ne,U.draggable.measure,ee),Y=fl(ne?ne.parentElement:null),J=c.useRef({activatorEvent:null,active:null,activeNode:ne,collisionRect:null,collisions:null,droppableRects:G,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=I.getNodeFor((n=J.current.over)==null?void 0:n.id),ve=Hw({measure:U.dragOverlay.measure}),Ge=(r=ve.nodeRef.current)!=null?r:ne,Be=N?(o=ve.rect)!=null?o:H:null,mt=!!(ve.nodeRef.current&&ve.rect),gt=Ow(mt?null:H),Zt=Th(Ge?Ve(Ge):null),Ae=Iw(N?ie??ne:null),mn=Fw(Ae),gn=Kw(m,{transform:{x:M.x-gt.x,y:M.y-gt.y,scaleX:1,scaleY:1},activatorEvent:j,active:B,activeNodeRect:H,containerNodeRect:Y,draggingNodeRect:Be,over:J.current.over,overlayNodeRect:ve.rect,scrollableAncestors:Ae,scrollableAncestorRects:mn,windowRect:Zt}),Vn=k?Cn(k,M):null,Fr=Lw(Ae),kr=pl(Fr),ce=pl(Fr,[H]),de=Cn(gn,kr),xe=Be?nw(Be,gn):null,At=B&&xe?f({active:B,collisionRect:xe,droppableRects:G,droppableContainers:Z,pointerCoordinates:Vn}):null,Si=yh(At,"id"),[Pt,Ri]=c.useState(null),Fh=mt?gn:Cn(gn,ce),kh=ew(Fh,(s=Pt?.rect)!=null?s:null,H),ls=c.useRef(null),Ci=c.useCallback((Pe,Ze)=>{let{sensor:Ue,options:Tt}=Ze;if(L.current==null)return;const Qe=S.get(L.current);if(!Qe)return;const qe=Pe.nativeEvent,ct=new Ue({active:L.current,activeNode:Qe,event:qe,options:Tt,context:J,onAbort(Ee){if(!S.get(Ee))return;const{onDragAbort:lt}=_.current,vt={id:Ee};lt?.(vt),x({type:"onDragAbort",event:vt})},onPending(Ee,Mt,lt,vt){if(!S.get(Ee))return;const{onDragPending:Zn}=_.current,_t={id:Ee,constraint:Mt,initialCoordinates:lt,offset:vt};Zn?.(_t),x({type:"onDragPending",event:_t})},onStart(Ee){const Mt=L.current;if(Mt==null)return;const lt=S.get(Mt);if(!lt)return;const{onDragStart:vt}=_.current,Bn={activatorEvent:qe,active:{id:Mt,data:lt.data,rect:F}};wt.unstable_batchedUpdates(()=>{vt?.(Bn),C(It.Initializing),b({type:ye.DragStart,initialCoordinates:Ee,active:Mt}),x({type:"onDragStart",event:Bn}),P(ls.current),O(qe)})},onMove(Ee){b({type:ye.DragMove,coordinates:Ee})},onEnd:vn(ye.DragEnd),onCancel:vn(ye.DragCancel)});ls.current=ct;function vn(Ee){return async function(){const{active:lt,collisions:vt,over:Bn,scrollAdjustedTranslate:Zn}=J.current;let _t=null;if(lt&&Zn){const{cancelDrop:Un}=_.current;_t={activatorEvent:qe,active:lt,collisions:vt,delta:Zn,over:Bn},Ee===ye.DragEnd&&typeof Un=="function"&&await Promise.resolve(Un(_t))&&(Ee=ye.DragCancel)}L.current=null,wt.unstable_batchedUpdates(()=>{b({type:Ee}),C(It.Uninitialized),Ri(null),P(null),O(null),ls.current=null;const Un=Ee===ye.DragEnd?"onDragEnd":"onDragCancel";if(_t){const us=_.current[Un];us?.(_t),x({type:Un,event:_t})}})}}},[S]),Hh=c.useCallback((Pe,Ze)=>(Ue,Tt)=>{const Qe=Ue.nativeEvent,qe=S.get(Tt);if(L.current!==null||!qe||Qe.dndKit||Qe.defaultPrevented)return;const ct={active:qe};Pe(Ue,Ze.options,ct)===!0&&(Qe.dndKit={capturedBy:Ze.sensor},L.current=Tt,Ci(Ue,Ze))},[S,Ci]),Ai=Pw(d,Hh);Dw(d),ht(()=>{H&&E===It.Initializing&&C(It.Initialized)},[H,E]),c.useEffect(()=>{const{onDragMove:Pe}=_.current,{active:Ze,activatorEvent:Ue,collisions:Tt,over:Qe}=J.current;if(!Ze||!Ue)return;const qe={active:Ze,activatorEvent:Ue,collisions:Tt,delta:{x:de.x,y:de.y},over:Qe};wt.unstable_batchedUpdates(()=>{Pe?.(qe),x({type:"onDragMove",event:qe})})},[de.x,de.y]),c.useEffect(()=>{const{active:Pe,activatorEvent:Ze,collisions:Ue,droppableContainers:Tt,scrollAdjustedTranslate:Qe}=J.current;if(!Pe||L.current==null||!Ze||!Qe)return;const{onDragOver:qe}=_.current,ct=Tt.get(Si),vn=ct&&ct.rect.current?{id:ct.id,rect:ct.rect.current,data:ct.data,disabled:ct.disabled}:null,Ee={active:Pe,activatorEvent:Ze,collisions:Ue,delta:{x:Qe.x,y:Qe.y},over:vn};wt.unstable_batchedUpdates(()=>{Ri(vn),qe?.(Ee),x({type:"onDragOver",event:Ee})})},[Si]),ht(()=>{J.current={activatorEvent:j,active:B,activeNode:ne,collisionRect:xe,collisions:At,droppableRects:G,draggableNodes:S,draggingNode:Ge,draggingNodeRect:Be,droppableContainers:I,over:Pt,scrollableAncestors:Ae,scrollAdjustedTranslate:de},F.current={initial:Be,translated:xe}},[B,ne,At,xe,S,Ge,Be,G,I,Pt,Ae,de]),Sw({...W,delta:M,draggingRect:xe,pointerCoordinates:Vn,scrollableAncestors:Ae,scrollableAncestorRects:mn});const $h=c.useMemo(()=>({active:B,activeNode:ne,activeNodeRect:H,activatorEvent:j,collisions:At,containerNodeRect:Y,dragOverlay:ve,draggableNodes:S,droppableContainers:I,droppableRects:G,over:Pt,measureDroppableContainers:q,scrollableAncestors:Ae,scrollableAncestorRects:mn,measuringConfiguration:U,measuringScheduled:Q,windowRect:Zt}),[B,ne,H,j,At,Y,ve,S,I,G,Pt,q,Ae,mn,U,Q,Zt]),Vh=c.useMemo(()=>({activatorEvent:j,activators:Ai,active:B,activeNodeRect:H,ariaDescribedById:{draggable:$},dispatch:b,draggableNodes:S,over:Pt,measureDroppableContainers:q}),[j,Ai,B,H,b,$,S,Pt,q]);return K.createElement(mh.Provider,{value:w},K.createElement(cs.Provider,{value:Vh},K.createElement(Mh.Provider,{value:$h},K.createElement(_h.Provider,{value:kh},u)),K.createElement(zw,{disabled:i?.restoreFocus===!1})),K.createElement(Kx,{...i,hiddenTextDescribedById:$}));function Bh(){const Pe=D?.autoScrollEnabled===!1,Ze=typeof l=="object"?l.enabled===!1:l===!1,Ue=N&&!Pe&&!Ze;return typeof l=="object"?{...l,enabled:Ue}:{enabled:Ue}}}),Yw=c.createContext(null),gl="button",Xw="Draggable";function Jw(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=Dr(Xw),{activators:a,activatorEvent:i,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:p}=c.useContext(cs),{role:m=gl,roleDescription:g="draggable",tabIndex:v=0}=o??{},y=l?.id===t,b=c.useContext(y?_h:Yw),[x,w]=Po(),[E,C]=Po(),N=jw(a,t),R=pr(n);ht(()=>(f.set(t,{id:t,key:s,node:x,activatorNode:E,data:R}),()=>{const M=f.get(t);M&&M.key===s&&f.delete(t)}),[f,t]);const S=c.useMemo(()=>({role:m,tabIndex:v,"aria-disabled":r,"aria-pressed":y&&m===gl?!0:void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[r,m,v,y,g,d.draggable]);return{active:l,activatorEvent:i,activeNodeRect:u,attributes:S,isDragging:y,listeners:r?void 0:N,node:x,over:p,setNodeRef:w,setActivatorNodeRef:C,transform:b}}function e3(){return c.useContext(Mh)}const t3="Droppable",n3={timeout:25};function r3(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=Dr(t3),{active:a,dispatch:i,over:l,measureDroppableContainers:u}=c.useContext(cs),d=c.useRef({disabled:n}),f=c.useRef(!1),p=c.useRef(null),m=c.useRef(null),{disabled:g,updateMeasurementsFor:v,timeout:y}={...n3,...o},b=pr(v??r),x=c.useCallback(()=>{if(!f.current){f.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=is({callback:x,disabled:g||!a}),E=c.useCallback((S,M)=>{w&&(M&&(w.unobserve(M),f.current=!1),S&&w.observe(S))},[w]),[C,N]=Po(E),R=pr(t);return c.useEffect(()=>{!w||!C.current||(w.disconnect(),f.current=!1,w.observe(C.current))},[C,w]),c.useEffect(()=>(i({type:ye.RegisterDroppable,element:{id:r,key:s,disabled:n,node:C,rect:p,data:R}}),()=>i({type:ye.UnregisterDroppable,key:s,id:r})),[r]),c.useEffect(()=>{n!==d.current.disabled&&(i({type:ye.SetDroppableDisabled,id:r,key:s,disabled:n}),d.current.disabled=n)},[r,s,n,i]),{active:a,rect:p,isOver:l?.id===r,node:C,over:l,setNodeRef:N}}const OS=e=>{let{transform:t}=e;return{...t,y:0}},o3=e=>{let{transform:t}=e;return{...t,x:0}};function Ei(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function s3(e,t){return e.reduce((n,r,o)=>{const s=t.get(r);return s&&(n[o]=s),n},Array(e.length))}function Kr(e){return e!==null&&e>=0}function a3(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 i3(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Wr={scaleX:1,scaleY:1},IS=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=c3(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,...Wr}:null}return a>o&&a<=s?{x:-i.width-l,y:0,...Wr}:a<o&&a>=s?{x:i.width+l,y:0,...Wr}:{x:0,y:0,...Wr}};function c3(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 Nh=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const s=Ei(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}},Gr={scaleX:1,scaleY:1},l3=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,...Gr}:null}const l=u3(s,o,n);return o>n&&o<=a?{x:0,y:-i.height-l,...Gr}:o<n&&o>=a?{x:0,y:i.height+l,...Gr}:{x:0,y:0,...Gr}};function u3(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 Oh="Sortable",Ih=K.createContext({activeIndex:-1,containerId:Oh,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Nh,disabled:{draggable:!1,droppable:!1}});function d3(e){let{children:t,id:n,items:r,strategy:o=Nh,disabled:s=!1}=e;const{active:a,dragOverlay:i,droppableRects:l,over:u,measureDroppableContainers:d}=e3(),f=Dr(Oh,n),p=i.rect!==null,m=c.useMemo(()=>r.map(N=>typeof N=="object"&&"id"in N?N.id:N),[r]),g=a!=null,v=a?m.indexOf(a.id):-1,y=u?m.indexOf(u.id):-1,b=c.useRef(m),x=!a3(m,b.current),w=y!==-1&&v===-1||x,E=i3(s);ht(()=>{x&&g&&d(m)},[x,m,g,d]),c.useEffect(()=>{b.current=m},[m]);const C=c.useMemo(()=>({activeIndex:v,containerId:f,disabled:E,disableTransforms:w,items:m,overIndex:y,useDragOverlay:p,sortedRects:s3(m,l),strategy:o}),[v,f,E.draggable,E.droppable,w,m,y,l,p,o]);return K.createElement(Ih.Provider,{value:C},t)}const f3=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Ei(n,r,o).indexOf(t)},h3=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},p3={duration:200,easing:"ease"},Lh="transform",m3=gr.Transition.toString({property:Lh,duration:0,easing:"linear"}),g3={roleDescription:"sortable"};function v3(e){let{disabled:t,index:n,node:r,rect:o}=e;const[s,a]=c.useState(null),i=c.useRef(n);return ht(()=>{if(!t&&n!==i.current&&r.current){const l=o.current;if(l){const u=Hn(r.current,{ignoreTransform:!0}),d={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(d.x||d.y)&&a(d)}}n!==i.current&&(i.current=n)},[t,n,r,o]),c.useEffect(()=>{s&&a(null)},[s]),s}function y3(e){let{animateLayoutChanges:t=h3,attributes:n,disabled:r,data:o,getNewIndex:s=f3,id:a,strategy:i,resizeObserverConfig:l,transition:u=p3}=e;const{items:d,containerId:f,activeIndex:p,disabled:m,disableTransforms:g,sortedRects:v,overIndex:y,useDragOverlay:b,strategy:x}=c.useContext(Ih),w=b3(r,m),E=d.indexOf(a),C=c.useMemo(()=>({sortable:{containerId:f,index:E,items:d},...o}),[f,o,E,d]),N=c.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:R,node:S,isOver:M,setNodeRef:I}=r3({id:a,data:C,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...l}}),{active:T,activatorEvent:F,activeNodeRect:B,attributes:L,setNodeRef:D,listeners:P,isDragging:j,over:O,setActivatorNodeRef:_,transform:$}=Jw({id:a,data:C,attributes:{...g3,...n},disabled:w.draggable}),Z=Lx(I,D),U=!!T,G=U&&!g&&Kr(p)&&Kr(y),q=!b&&j,Q=q&&G?$:null,k=G?Q??(i??x)({rects:v,activeNodeRect:B,activeIndex:p,overIndex:y,index:E}):null,W=Kr(p)&&Kr(y)?s({id:a,items:d,activeIndex:p,overIndex:y}):E,ee=T?.id,H=c.useRef({activeId:ee,items:d,newIndex:W,containerId:f}),Y=d!==H.current.items,J=t({active:T,containerId:f,isDragging:j,isSorting:U,id:a,index:E,items:d,newIndex:H.current.newIndex,previousItems:H.current.items,previousContainerId:H.current.containerId,transition:u,wasDragging:H.current.activeId!=null}),ie=v3({disabled:!J,index:E,node:S,rect:R});return c.useEffect(()=>{U&&H.current.newIndex!==W&&(H.current.newIndex=W),f!==H.current.containerId&&(H.current.containerId=f),d!==H.current.items&&(H.current.items=d)},[U,W,f,d]),c.useEffect(()=>{if(ee===H.current.activeId)return;if(ee!=null&&H.current.activeId==null){H.current.activeId=ee;return}const Ge=setTimeout(()=>{H.current.activeId=ee},50);return()=>clearTimeout(Ge)},[ee]),{active:T,activeIndex:p,attributes:L,data:C,rect:R,index:E,newIndex:W,items:d,isOver:M,isSorting:U,isDragging:j,listeners:P,node:S,overIndex:y,over:O,setNodeRef:Z,setActivatorNodeRef:_,setDroppableNodeRef:I,setDraggableNodeRef:D,transform:ie??k,transition:ve()};function ve(){if(ie||Y&&H.current.newIndex===E)return m3;if(!(q&&!vi(F)||!u)&&(U||J))return gr.Transition.toString({...u,property:Lh})}}function b3(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 _o(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 x3=[re.Down,re.Right,re.Up,re.Left],w3=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:s,over:a,scrollableAncestors:i}}=t;if(x3.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];s.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const p=o.get(f.id);if(p)switch(e.code){case re.Down:r.top<p.top&&l.push(f);break;case re.Up:r.top>p.top&&l.push(f);break;case re.Left:r.left>p.left&&l.push(f);break;case re.Right:r.left<p.left&&l.push(f);break}});const u=Yx({collisionRect:r,droppableRects:o,droppableContainers:l});let d=yh(u,"id");if(d===a?.id&&u.length>1&&(d=u[1].id),d!=null){const f=s.get(n.id),p=s.get(d),m=p?o.get(p.id):null,g=p?.node.current;if(g&&m&&f&&p){const y=as(g).some((N,R)=>i[R]!==N),b=Dh(f,p),x=E3(f,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:mr(E,w)}}}};function Dh(e,t){return!_o(e)||!_o(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function E3(e,t){return!_o(e)||!_o(t)||!Dh(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const S3=e=>{const{data:t}=su({queryKey:oe.notes.list(e.searchParams),async queryFn(){const n=await dh(e.searchParams);if(n.type==="error")throw n;return n.allNotes}});return e.render(t)},R3=e=>{const{data:t}=su({queryKey:oe.notes.pinned(),async queryFn(){const n=await ge(`
183
- query {
184
- pinnedNotes {
185
- id
186
- title
187
- order
188
- }
189
- }
190
- `);if(n.type==="error")throw n;return n.pinnedNotes}});return h.jsx(h.Fragment,{children:e.render(t)})};function C3({query:e="",limit:t=50,offset:n=0}={}){return ge(`query FetchTags(
191
- $searchFilter: SearchFilterInput,
192
- $pagination: PaginationInput
193
- ) {
194
- allTags(
195
- searchFilter: $searchFilter,
196
- pagination: $pagination
197
- ) {
198
- totalCount
199
- tags {
200
- id
201
- name
202
- referenceCount
203
- }
204
- }
205
- }`,{searchFilter:{query:e},pagination:{limit:t,offset:n}})}function LS({name:e=""}){return ge(`mutation CreateTag($name: String!) {
206
- createTag(name: $name) {
207
- id
208
- name
209
- }
210
- }`,{name:e})}const A3="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",P3="focus-ring-soft block truncate rounded-[10px] px-1.5 py-1 outline-none transition-colors";function T3({id:e,title:t,isActive:n=!1,children:r}){const{attributes:o,listeners:s,setNodeRef:a,setActivatorNodeRef:i,transform:l,transition:u,isDragging:d}=y3({id:e}),f={transform:gr.Transform.toString(l),transition:u,opacity:d?.5:1};return h.jsxs("div",{ref:a,style:f,className:ue("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:ue(A3,d?"cursor-grabbing":"cursor-grab"),children:h.jsx(xg,{className:"size-4"})}),h.jsx(se,{as:"div",truncate:!0,variant:"body",weight:"medium",className:"min-w-0 flex-1",children:r})]})}function M3({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(Qw,{sensors:s,collisionDetection:Qx,onDragEnd:o,modifiers:[o3],children:h.jsx(d3,{items:a.map(i=>i.id),strategy:l3,children:a.map(i=>h.jsx(T3,{id:i.id,title:i.title||"Untitled",isActive:t===`/${i.id}`,children:h.jsx(St,{"aria-current":t===`/${i.id}`?"page":void 0,className:ue(P3,t===`/${i.id}`?"text-fg-default":"text-fg-secondary hover:bg-hover-subtle hover:text-fg-default"),to:Or,params:{id:i.id},children:i.title||"Untitled"})},i.id))})})}const _3=()=>{const e=$o({select:i=>i.pathname}),t=In(),[n,r]=c.useState([]),o=Hm({mutationFn:Ax,onSuccess:()=>{t.invalidateQueries({queryKey:oe.notes.pinned(),exact:!0})}}),s=Wx(ol(wi,{activationConstraint:{distance:8}}),ol(bi,{coordinateGetter:w3})),a=i=>{const{active:l,over:u}=i;u&&l.id!==u.id&&r(d=>{const f=d.findIndex(g=>g.id===l.id),p=d.findIndex(g=>g.id===u.id),m=Ei(d,f,p);return o.mutate(m.map((g,v)=>({id:g.id,order:v}))),m})};return h.jsx("div",{className:"flex flex-col gap-1",children:h.jsx(sh,{fallback:h.jsxs("div",{className:"space-y-1",children:[h.jsx(Et,{height:"40px",opacity:.4}),h.jsx(Et,{height:"40px",opacity:.4})]}),errorTitle:"Failed to load pinned notes",errorDescription:"Retry loading the pinned note list.",renderError:({error:i,retry:l})=>h.jsx(hi,{title:"Failed to load pinned notes",description:"Retry loading the pinned note list.",error:i,onRetry:l,showBackAction:!1,showHomeAction:!1}),children:h.jsx(R3,{render:i=>i.length>0?h.jsx(M3,{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."})})})})},N3="mb-2.5 flex items-center justify-between gap-3 px-1",O3="flex min-w-0 items-center gap-2",I3="inline-flex h-4 w-4 shrink-0 items-center justify-center text-fg-tertiary",L3=({title:e,icon:t,detail:n})=>h.jsxs("div",{className:N3,children:[h.jsxs("div",{className:O3,children:[t?h.jsx("span",{className:I3,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]}),D3="flex flex-col gap-3.5 p-3 pt-2",j3="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",F3="flex items-center gap-2.5",k3="inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-[13px] bg-cta text-fg-on-filled",H3="flex flex-col",$3="h-4 w-4 text-fg-tertiary transition-colors group-hover:text-fg-default",V3=()=>{const{onCreate:e}=fh();return h.jsxs("div",{className:D3,children:[h.jsxs("button",{type:"button",className:j3,onClick:()=>e(),children:[h.jsxs("span",{className:F3,children:[h.jsx("span",{className:k3,children:h.jsx(Pg,{className:"h-4.5 w-4.5",weight:"bold"})}),h.jsxs("span",{className:H3,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(nr,{className:$3,weight:"bold"})]}),h.jsxs("section",{className:"pt-1",children:[h.jsx(L3,{title:"Pinned",icon:h.jsx(Ru,{className:"h-4 w-4",weight:"fill"})}),h.jsx(_3,{})]})]})},B3=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]},Z3="flex flex-col gap-2.5",U3="surface-base overflow-hidden",q3="grid-search-bar grid items-center border-b border-transparent px-2.5 py-1.5 transition-colors",z3="border-border-subtle/70 bg-muted/25",K3="hover:bg-hover-subtle/60",vl="flex h-10 items-center justify-center text-fg-tertiary transition-colors hover:text-fg-default sm:h-8",W3="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",G3="px-1 py-1.5",Q3="px-2 pb-0.5 pt-1",Y3="px-2 pb-0.5 pt-1.5",X3="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",J3="min-w-0 flex-1",eE="flex flex-wrap gap-1.5 px-1.5 py-1",tE="inline-flex items-center rounded-full border border-border-subtle bg-hover-subtle px-2 py-0.75 sm:py-0.5",nE="mt-1 border-t border-border-subtle/50 px-2 pb-0.5 pt-1.5",rE="flex min-h-9 items-center gap-1.5 text-fg-secondary transition-colors hover:text-fg-default",oE=()=>{const e=fn(),[t,n]=c.useState(""),[r,o]=c.useState([]),[s,a]=c.useState([]),[,i]=B3(500);c.useEffect(()=>{if(t.length<=0){i(()=>{}),o([]),a([]);return}i(()=>{dh({query:t,limit:5}).then(f=>{f.type==="success"&&o(f.allNotes.notes)}),C3({query:t,limit:5}).then(f=>{f.type==="success"&&a(f.allTags.tags)})})},[t,i]);const l=f=>{f?.preventDefault(),e({to:th,search:{query:t,page:1}})},u=()=>{n("")},d=r.length>0||s.length>0;return h.jsx("div",{className:"p-3",children:h.jsx("form",{className:Z3,onSubmit:l,children:h.jsxs("div",{className:U3,children:[h.jsxs("div",{className:`${q3} ${d?z3:K3}`,children:[h.jsx("button",{type:"submit",className:vl,children:h.jsx(Ag,{className:"h-4.5 w-4.5",weight:"bold"})}),h.jsx("input",{type:"text",placeholder:"Search notes or tags",value:t,onChange:f=>n(f.target.value),className:W3}),t&&h.jsx("button",{type:"button",className:vl,onClick:u,children:h.jsx(Mu,{className:"h-4 w-4",weight:"bold"})})]}),d&&h.jsxs("div",{className:G3,children:[r.length>0&&h.jsxs("div",{children:[s.length>0&&h.jsx(se,{as:"div",variant:"label",weight:"medium",tone:"tertiary",className:Q3,children:"Notes"}),r.map(({id:f,title:p})=>h.jsxs(St,{to:Or,params:{id:f},className:X3,children:[h.jsx(Sg,{className:"h-3.5 w-3.5 shrink-0 text-fg-tertiary"}),h.jsx(se,{as:"span",truncate:!0,variant:"meta",weight:"medium",className:J3,children:p||"Untitled"})]},f))]}),s.length>0&&h.jsxs("div",{children:[r.length>0&&h.jsx(se,{as:"div",variant:"label",weight:"medium",tone:"tertiary",className:Y3,children:"Tags"}),h.jsx("div",{className:eE,children:s.map(({id:f,name:p})=>h.jsx(St,{to:fi,params:{id:f},search:{page:1},children:h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"secondary",className:tE,children:p})},f))})]}),h.jsx("div",{className:nE,children:h.jsxs("button",{type:"submit",className:rE,children:[h.jsx(se,{as:"span",variant:"meta",weight:"medium",className:"text-current",children:"View all results"}),h.jsx(nr,{className:"h-3.5 w-3.5",weight:"bold"})]})})]})]})})})},sE=[{name:"Notes",path:Nr,icon:bu},{name:"Views",path:Y0,icon:Eg},{name:"Graph",path:eh,icon:Ng},{name:"Calendar",path:X0,icon:vg},{name:"Reminders",path:J0,icon:gg},{name:"Tags",path:nh,icon:_g},{name:"Setting",path:rh,icon:Rg}],aE=()=>{const e=$o({select:t=>t.pathname});return h.jsx("nav",{"aria-label":"Primary navigation",className:"flex items-center gap-1 px-4 py-2.5",children:sE.map((t,n)=>{const r=e===t.path||t.path!==Nr&&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(St,{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)})})},iE=({children:e})=>h.jsx(px,{sidebar:h.jsxs(h.Fragment,{children:[h.jsx(bx,{}),h.jsx(oE,{}),h.jsx(V3,{})]}),topNavigation:h.jsx(aE,{}),children:e}),cE=["updatedAt","createdAt"],lE=["asc","desc"],uE=["create","update"],jr=e=>Array.isArray(e)?e[0]:e,dn=(e,t,{min:n=1,max:r=Number.MAX_SAFE_INTEGER}={})=>{const o=jr(e),s=typeof o=="number"?o:typeof o=="string"?Number(o):Number.NaN;return!Number.isInteger(s)||s<n||s>r?t:s},dE=e=>{const t=jr(e);if(t==null||t==="")return;const n=dn(t,Number.NaN);return Number.isNaN(n)?void 0:n},fE=(e,t=!1)=>{const n=jr(e);return n===!0||n==="true"?!0:n===!1||n==="false"?!1:t},jh=(e,t="")=>{const n=jr(e);return typeof n=="string"?n:t},wa=(e,t,n)=>{const r=jr(e);return typeof r!="string"?n:t.includes(r)?r:n},hE=e=>({page:dn(e.page,1),limit:dE(e.limit),sortBy:wa(e.sortBy,cE,"updatedAt"),sortOrder:wa(e.sortOrder,lE,"desc"),pinnedFirst:fE(e.pinnedFirst,!1)}),$n=e=>({page:dn(e.page,1)}),pE=e=>({page:dn(e.page,1),query:jh(e.query,"")}),mE=e=>({year:dn(e.year,Te().year(),{min:1970,max:9999}),month:dn(e.month,Te().month()+1,{min:1,max:12}),type:wa(e.type,uE,"create")}),gE=e=>({page:dn(e.page,1),sectionId:jh(e.sectionId,"")});function vE(e){const t=new Date,n=new Date(e),r=Math.floor((t.getTime()-n.getTime())/1e3);let o=Math.floor(r/31536e3);return o>=1?o+" years ago":(o=Math.floor(r/2592e3),o>=1?o+" months ago":(o=Math.floor(r/86400),o>=1?o+" days ago":(o=Math.floor(r/3600),o>=1?o+" hours ago":(o=Math.floor(r/60),o>=1?o+" minutes ago":Math.floor(r)+" seconds ago"))))}function yE({id:e,title:t,tags:n,pinned:r,updatedAt:o,onPinned:s,onDelete:a}){const i=vE(Number(o));return h.jsxs("div",{className:ue("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(Ru,{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(Ry,{button:h.jsx(_y,{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(St,{className:"line-clamp-2 transition-colors hover:text-fg-default/85",to:Or,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(St,{to:fi,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)}const yl=16;function bE(e,t,n){return Math.max(Math.floor((Math.max(e,0)+n)/(t+n)),1)}function bl(e,t,n){return e*t+(e-1)*n}function xE({minItemWidth:e,gap:t,rows:n,fallback:r,override:o}){const[s,a]=c.useState(null),[i,l]=c.useState(r??n),u=c.useRef(null),d=c.useCallback(m=>{a(m)},[]),f=o==null,p=f?i:o;return c.useLayoutEffect(()=>{if(!f){u.current=null;return}if(!s){u.current=null,l(y=>y===(r??n)?y:r??n);return}let m=null;const g=()=>{const y=s.offsetWidth,b=bE(y,e,t),x=u.current;let w=b;if(x!==null&&x!==b)if(b>x){const C=bl(x+1,e,t);y<C+yl&&(w=x)}else{const C=bl(x,e,t);y>C-yl&&(w=x)}u.current=w;const E=Math.max(w*n,n);l(C=>C===E?C:E)},v=()=>{m===null&&(m=window.requestAnimationFrame(()=>{m=null,g()}))};if(v(),typeof ResizeObserver<"u"){const y=new ResizeObserver(()=>{v()});return y.observe(s),()=>{y.disconnect(),m!==null&&window.cancelAnimationFrame(m)}}return window.addEventListener("resize",v),window.addEventListener("orientationchange",v),()=>{window.removeEventListener("resize",v),window.removeEventListener("orientationchange",v),m!==null&&window.cancelAnimationFrame(m)}},[s,r,t,f,e,n]),{containerRef:d,limit:p,isAutoLimit:f}}const wE=240,EE=20,SE=6,xl=Bp(Nr);function RE(){const e=xl.useNavigate(),{limit:t,page:n,sortBy:r,sortOrder:o,pinnedFirst:s}=xl.useSearch(),{containerRef:a,limit:i,isAutoLimit:l}=xE({minItemWidth:wE,gap:EE,rows:SE,override:t??null}),{onDelete:u,onPinned:d}=fh(),f=p=>{e({search:m=>({...m,...p})})};return h.jsx(os,{title:"",variant:"none",children:h.jsxs("div",{ref:a,className:"flex flex-col gap-5",children:[h.jsx(eb,{itemsPerPage:i,onItemsPerPageChange:p=>f({limit:p,page:1}),isAutoLimit:l,sortBy:r,onSortByChange:p=>f({sortBy:p,page:1}),sortOrder:o,onSortOrderChange:p=>f({sortOrder:p,page:1}),pinnedFirst:s,onPinnedFirstChange:p=>f({pinnedFirst:p,page:1})}),h.jsx(sh,{fallback:h.jsxs("div",{className:"grid-auto-cards grid gap-5",children:[h.jsx(Et,{height:"112px"}),h.jsx(Et,{height:"112px"}),h.jsx(Et,{height:"112px"})]}),errorTitle:"Failed to load notes",errorDescription:"Retry loading the current note list.",resetKeys:[n,i,r,o,s],children:h.jsx(S3,{searchParams:{offset:(n-1)*i,limit:i,sortBy:r,sortOrder:o,pinnedFirst:s},render:({notes:p,totalCount:m})=>h.jsx(Vc,{fallback:h.jsx(Jf,{title:"Ocean is calm",description:"Capture anything and make waves in the ocean!"}),children:p.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"grid-auto-cards grid gap-5",children:p.map(g=>h.jsx(yE,{...g,onPinned:()=>d(g.id,g.pinned),onDelete:()=>u(g.id)},g.id))}),h.jsx(Vc,{fallback:null,children:m&&i<m&&h.jsx(t0,{page:n,last:Math.ceil(m/i),onChange:g=>{f({page:g})}})})]})})})})]})})}const Ce=zp({component:()=>h.jsx(iE,{children:h.jsx(Ul,{})}),errorComponent:Ub,notFoundComponent:qb}),CE=Se({getParentRoute:()=>Ce,path:Nr,component:RE,validateSearch:hE}),AE=Se({getParentRoute:()=>Ce,path:X0,component:De(()=>Le(()=>import("./Calendar-CSXEuWmQ.js"),__vite__mapDeps([0,1,2,3,4]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading calendar",description:"Preparing note and reminder snapshots."}),validateSearch:mE}),PE=Se({getParentRoute:()=>Ce,path:Y0,component:De(()=>Le(()=>import("./Views-DQHPfdwM.js"),__vite__mapDeps([5,1,2,3,6,7,8]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading views",description:"Preparing your saved dashboards."})}),TE=Se({getParentRoute:()=>Ce,path:J0,component:De(()=>Le(()=>import("./Reminders-vRksvSQE.js"),__vite__mapDeps([9,1,2,3,10]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading reminders",description:"Collecting upcoming reminder cards."}),validateSearch:$n}),ME=Se({getParentRoute:()=>Ce,path:eh,component:De(()=>Le(()=>import("./Graph-C0Ax9qjI.js"),__vite__mapDeps([11,1,2,3]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading graph",description:"Preparing the linked note constellation."})}),_E=Se({getParentRoute:()=>Ce,path:th,component:De(()=>Le(()=>import("./Search-Cq4tuiJO.js"),__vite__mapDeps([12,1,2,3]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading search",description:"Preparing indexed note results."}),validateSearch:pE}),NE=Se({getParentRoute:()=>Ce,path:nh,component:De(()=>Le(()=>import("./Tag-ARDLA-Pb.js"),__vite__mapDeps([13,1,2,3]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading tags",description:"Preparing the tag catalog."}),validateSearch:$n}),OE=Se({getParentRoute:()=>Ce,path:Or,component:De(()=>Le(()=>import("./Note-BY6WgYLq.js"),__vite__mapDeps([14,1,2,3,8,4,10,15,16]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading note",description:"Preparing the editor and note content."})}),IE=Se({getParentRoute:()=>Ce,path:fi,component:De(()=>Le(()=>import("./TagNotes-CDGVrCJU.js"),__vite__mapDeps([17,1,2,3]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading tagged notes",description:"Preparing notes for the selected tag."}),validateSearch:$n}),LE=Se({getParentRoute:()=>Ce,path:jb,component:De(()=>Le(()=>import("./ViewNotes-ZBOQ1adH.js"),__vite__mapDeps([18,1,2,3,6]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading view notes",description:"Preparing notes for this saved view section."}),validateSearch:gE}),DE=Se({getParentRoute:()=>Ce,path:rh,component:De(()=>Le(()=>import("./index-B28TO4FC.js"),__vite__mapDeps([19,1,2,3,20,21]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading settings",description:"Preparing workspace preferences."})}),jE=Se({getParentRoute:()=>Ce,path:Fb,component:De(()=>Le(()=>import("./mcp-CSjmBjFR.js"),__vite__mapDeps([22,1,2,3,7]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading MCP settings",description:"Preparing MCP access controls."})}),FE=Se({getParentRoute:()=>Ce,path:kb,component:De(()=>Le(()=>import("./trash-CM7SbVtW.js"),__vite__mapDeps([23,1,2,3,7]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading trash",description:"Preparing deleted notes for restore."}),validateSearch:$n}),kE=Se({getParentRoute:()=>Ce,path:Hb,component:De(()=>Le(()=>import("./manage-image-Dg297A_h.js"),__vite__mapDeps([24,1,2,3,15,25,7,20]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading image manager",description:"Preparing uploaded image metadata."}),validateSearch:$n}),HE=Se({getParentRoute:()=>Ce,path:$b,component:De(()=>Le(()=>import("./manage-image-detail-hk6jWyiB.js"),__vite__mapDeps([26,1,2,3,15,25,7,20,21]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading image detail",description:"Preparing references for the selected image."})}),$E=Se({getParentRoute:()=>Ce,path:Vb,component:De(()=>Le(()=>import("./placeholder-Bmiowo28.js"),__vite__mapDeps([27,1,2,3,8,7]))),pendingComponent:()=>h.jsx(Ne,{title:"Loading placeholders",description:"Preparing template replacement rules."}),validateSearch:$n}),VE=Ce.addChildren([CE,PE,AE,TE,ME,_E,NE,OE,IE,LE,DE,jE,FE,kE,HE,$E]),BE=em({routeTree:VE,defaultPendingComponent:()=>h.jsx(Ne,{title:"Loading page",description:"Preparing the next route."})});function ZE(){const e=Ao(n=>n.setSystemTheme),t=Ao(n=>n.setTheme);return c.useEffect(()=>{const n=Co();return n&&t(n),s1.listenThemeChange(r=>{Co()||e(r?"dark":"light")},n==null)},[e,t]),h.jsx($6,{children:h.jsx(rm,{router:BE})})}Ao.setState({theme:nx()});T6();t1.createRoot(document.getElementById("root")).render(h.jsx(K.StrictMode,{children:h.jsx(ZE,{})}));export{t0 as $,w3 as A,Gt as B,X0 as C,Ry as D,wi as E,Jf as F,Qw as G,OS as H,Ay as I,Qx as J,bi as K,St as L,Jt as M,Or as N,d3 as O,os as P,IS as Q,o3 as R,no as S,se as T,l3 as U,jb as V,y3 as W,xg as X,gr as Y,kd as Z,sh as _,gg as a,J0 as a0,hi as a1,fn as a2,Ao as a3,su as a4,NS as a5,Mu as a6,S3 as a7,th as a8,xE as a9,y4 as aA,TS as aB,MS as aC,_S as aD,$b as aE,pa as aF,RS as aG,yx as aH,xS as aI,Nx as aJ,Ox as aK,Ix as aL,Re as aM,Vc as aa,fi as ab,nh as ac,SS as ad,AS as ae,Hm as af,PS as ag,yg as ah,Cg as ai,dh as aj,sx as ak,LS as al,ES as am,B3 as an,yS as ao,fh as ap,kb as aq,Ru as ar,CS as as,wS as at,yE as au,Fb as av,Hb as aw,Vb as ax,Pg as ay,le as az,vg as b,ue as c,Te as d,bt as e,ys as f,nr as g,ge as h,Et as i,Bp as j,_y as k,e0 as l,x4 as m,M4 as n,_4 as o,me as p,oe as q,ud as r,Sg as s,vE as t,km as u,fd as v,In as w,C3 as x,Wx as y,ol as z};