ocean-brain 0.12.2 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/package.json +1 -1
  2. package/server/client/dist/assets/{ArrowRight.es-CD1IMhU2.js → ArrowRight.es-BlNsZQFs.js} +1 -1
  3. package/server/client/dist/assets/AuxiliaryPanelHeader-HAttwVby.js +1 -0
  4. package/server/client/dist/assets/Calendar-CaeK7gTz.js +25 -0
  5. package/server/client/dist/assets/Callout-CcYyvHQP.js +1 -0
  6. package/server/client/dist/assets/CaretUp.es-C8iY5OlB.js +1 -0
  7. package/server/client/dist/assets/{CheckCircle.es-C7fkzE3t.js → CheckCircle.es-Dqr3WImn.js} +1 -1
  8. package/server/client/dist/assets/{Copy.es-D6rl6b78.js → Copy.es-fMv0ETir.js} +1 -1
  9. package/server/client/dist/assets/{File.es-CcjtzE38.js → File.es-CHtXXafR.js} +1 -1
  10. package/server/client/dist/assets/FileText.es-DPIwDCEe.js +1 -0
  11. package/server/client/dist/assets/{FlowArrow.es-CAIThqWk.js → FlowArrow.es-Dxee98ir.js} +1 -1
  12. package/server/client/dist/assets/Graph-CdEu8eAn.js +46 -0
  13. package/server/client/dist/assets/Graph-hVj6vAYJ.js +1 -0
  14. package/server/client/dist/assets/{Image.es-BDpo5R66.js → Image.es-CjXY1JVf.js} +1 -1
  15. package/server/client/dist/assets/Info.es-CYxg-Vku.js +1 -0
  16. package/server/client/dist/assets/LinkSimple.es-B-P-7Iem.js +1 -0
  17. package/server/client/dist/assets/{Note-Dq2Szaxd.js → Note-CGI-Y1__.js} +4 -4
  18. package/server/client/dist/assets/{NotePropertiesPanel-Cu3RgDic.js → NotePropertiesPanel-6P7UfRBR.js} +2 -2
  19. package/server/client/dist/assets/{Plus.es-P9Fjwtud.js → Plus.es-Dy6onD-Z.js} +1 -1
  20. package/server/client/dist/assets/Reminders-DnuALBL6.js +1 -0
  21. package/server/client/dist/assets/{Search-DVROxY_B.js → Search-DAYHxAml.js} +2 -2
  22. package/server/client/dist/assets/{SurfaceCard-D_OU_Oy6.js → SurfaceCard-D5QxOte_.js} +1 -1
  23. package/server/client/dist/assets/Tag-CG8b0l1j.js +1 -0
  24. package/server/client/dist/assets/TagNotes-COyaVsdn.js +1 -0
  25. package/server/client/dist/assets/{Trash.es-BeR1sZMe.js → Trash.es-XEcWG_aq.js} +1 -1
  26. package/server/client/dist/assets/{ViewChip-D-Ax5PdL.js → ViewChip-BVkZAXyx.js} +1 -1
  27. package/server/client/dist/assets/Views-BPxlw3vk.js +1 -0
  28. package/server/client/dist/assets/app-BezcjTfd.js +151 -0
  29. package/server/client/dist/assets/app-DjDwGe0t.css +1 -0
  30. package/server/client/dist/assets/calendar-data-wB0ifXdo.js +1 -0
  31. package/server/client/dist/assets/{image.api-CtfyPwkV.js → image.api-ChvlfuZg.js} +1 -1
  32. package/server/client/dist/assets/index-CzZFedXj.js +1 -0
  33. package/server/client/dist/assets/{manage-image-m-7v_Z1W.js → manage-image-CSJ3Flgc.js} +1 -1
  34. package/server/client/dist/assets/manage-image-detail-9hRTiAsR.js +1 -0
  35. package/server/client/dist/assets/{mcp-admin-adapter-Cw6w5mfg.js → mcp-admin-adapter-D0R8p9az.js} +1 -1
  36. package/server/client/dist/assets/{mcp-B-aGeAQD.js → mcp-ugdCKa6H.js} +1 -1
  37. package/server/client/dist/assets/{note-ui-CYsZc3DI.js → note-ui-BaqzP-YU.js} +1 -1
  38. package/server/client/dist/assets/placeholder-CZoqs4S3.js +34 -0
  39. package/server/client/dist/assets/{properties-B93_V2uD.js → properties-B7Fv95qY.js} +1 -1
  40. package/server/client/dist/assets/route-preload.js +2 -2
  41. package/server/client/dist/assets/{search-admin-adapter-Dj0KKKrJ.js → search-admin-adapter-Daf7e2YQ.js} +1 -1
  42. package/server/client/dist/assets/search-ddYl3qH-.js +1 -0
  43. package/server/client/dist/assets/{tag.api-BJ6eaHui.js → tag.api-DEUROVKQ.js} +1 -1
  44. package/server/client/dist/assets/time-PxWila4-.js +361 -0
  45. package/server/client/dist/assets/trash-BHida7BG.js +1 -0
  46. package/server/client/dist/assets/{url-BvjSC8PU.js → url-DKUMNVCI.js} +1 -1
  47. package/server/client/dist/assets/useNoteMutate-BjvZUmtX.js +9 -0
  48. package/server/client/dist/assets/{useReminderMutate-kTBRSjYc.js → useReminderMutate-C5n-5LM-.js} +2 -2
  49. package/server/client/dist/index.html +6 -6
  50. package/server/dist/features/note/services/properties.js +32 -8
  51. package/server/dist/features/view/graphql/view.query.resolver.js +20 -0
  52. package/server/dist/features/view/graphql/view.type-defs.js +17 -0
  53. package/server/dist/features/view/services/workspace.js +116 -1
  54. package/server/client/dist/assets/AuxiliaryPanelHeader-zoJGsYWR.js +0 -1
  55. package/server/client/dist/assets/Calendar-6otw_EJn.js +0 -25
  56. package/server/client/dist/assets/Callout-C1QiCWCa.js +0 -1
  57. package/server/client/dist/assets/Graph-BHsmPDPh.js +0 -46
  58. package/server/client/dist/assets/Reminders-DKm0GFI2.js +0 -1
  59. package/server/client/dist/assets/Tag-wMHTRwlF.js +0 -1
  60. package/server/client/dist/assets/TagNotes-BRza6i14.js +0 -1
  61. package/server/client/dist/assets/Views-CL7rC05G.js +0 -1
  62. package/server/client/dist/assets/app-CyQtGTtn.js +0 -139
  63. package/server/client/dist/assets/app-DGFNtdpS.css +0 -1
  64. package/server/client/dist/assets/index-BEfKfbvr.js +0 -1
  65. package/server/client/dist/assets/manage-image-detail-BNYOCSmu.js +0 -1
  66. package/server/client/dist/assets/placeholder-C5fNzKrL.js +0 -34
  67. package/server/client/dist/assets/search-BmXuuK26.js +0 -1
  68. package/server/client/dist/assets/sortable.esm-DgSW3bAA.js +0 -5
  69. package/server/client/dist/assets/time-DI902Sxa.js +0 -361
  70. package/server/client/dist/assets/trash-GulvRh9f.js +0 -1
  71. package/server/client/dist/assets/useNoteMutate-xEIypxi5.js +0 -9
@@ -1,361 +0,0 @@
1
- import{r as l,R as fr,b as R,j as p,w as Xd,a as pr,d as pi,g as Xt,e as Jd,u as ef,o as tf,s as nf,k as rf,p as of,n as sf,i as af,h as cf,l as lf,t as uf}from"./floating-ui.react-dom-BWTnA00G.js";import{H as df}from"./url-BvjSC8PU.js";function fo(e){return e[e.length-1]}function ff(e){return typeof e=="function"}function zs(e,t){return ff(e)?e(t):e}const pf=Object.prototype.hasOwnProperty,Gs=Object.prototype.propertyIsEnumerable;function hi(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,o=Ys(e)&&Ys(r);if(!o&&!(Jn(e)&&Jn(r)))return r;const s=o?e:Ks(e);if(!s)return r;const i=o?r:Ks(r);if(!i)return r;const a=s.length,c=i.length,d=o?new Array(c):{};let f=0;for(let u=0;u<c;u++){const h=o?u:i[u],m=e[h],b=r[h];if(m===b){d[h]=m,(o?u<a:pf.call(e,h))&&f++;continue}if(m===null||b===null||typeof m!="object"||typeof b!="object"){d[h]=b;continue}const g=hi(m,b,n+1);d[h]=g,g===m&&f++}return a===c&&f===a?e:d}function Ks(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!Gs.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(!Gs.call(e,o))return!1;r.push(o)}return r}function Jn(e){if(!Zs(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Zs(n)||!n.hasOwnProperty("isPrototypeOf"))}function Zs(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ys(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Wn(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(!Wn(e[r],t[r],n))return!1;return!0}if(Jn(e)&&Jn(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const i in t)if((!r||t[i]!==void 0)&&!Wn(e[i],t[i],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const i in e)e[i]!==void 0&&o++;let s=0;for(const i in t)if((!r||t[i]!==void 0)&&(s++,s>o||!Wn(e[i],t[i],n)))return!1;return o===s}return!1}function k1(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 F1(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 $1(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function hf(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Qs(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 hf(t)}const B1=["http:","https:","mailto:","tel:"];function Xs(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function U1(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+=Qs(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+Qs(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function H1(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var mf="Invariant failed";function Wo(e,t){if(!e)throw new Error(mf)}function po(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 i=t.get(s);if(i)return o(i),i.value},set(s,i){if(t.size>=e&&n){const c=n;t.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const a=t.get(s);if(a)a.value=i,o(a);else{const c={key:s,value:i,prev:r};r&&(r.next=c),r=c,n||(n=c),t.set(s,c)}},clear(){t.clear(),n=void 0,r=void 0}}}const zt=0,xt=1,wt=2,fn=3,ht=4,mi=5;function gf(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 zo(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]=zt,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(s==="$"){const a=e.length;return n[0]=wt,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}if(s.charCodeAt(0)===36)return n[0]=xt,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const i=gf(s);if(i){const[a,c]=i,d=s.charCodeAt(a+1);if(d===45){if(a+2<s.length&&s.charCodeAt(a+2)===36){const f=a+3,u=c;if(f<u)return n[0]=fn,n[1]=t+a,n[2]=t+f,n[3]=t+u,n[4]=t+c+1,n[5]=o,n}}else if(d===36){const f=a+1,u=a+2;return u===c?(n[0]=wt,n[1]=t+a,n[2]=t+f,n[3]=t+u,n[4]=t+c+1,n[5]=e.length,n):(n[0]=xt,n[1]=t+a,n[2]=t+u,n[3]=t+c,n[4]=t+c+1,n[5]=o,n)}}return n[0]=zt,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function hr(e,t,n,r,o,s,i){i?.(n);let a=r;{const c=n.fullPath??n.from,d=c.length,f=n.options?.caseSensitive??e,u=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;a<d;){const m=zo(c,a,t);let b;const g=a,y=m[5];switch(a=y+1,s++,m[0]){case zt:{const x=c.substring(m[2],m[3]);if(f){const w=o.static?.get(x);if(w)b=w;else{o.static??=new Map;const S=mt(n.fullPath??n.from);S.parent=o,S.depth=s,b=S,o.static.set(x,S)}}else{const w=x.toLowerCase(),S=o.staticInsensitive?.get(w);if(S)b=S;else{o.staticInsensitive??=new Map;const T=mt(n.fullPath??n.from);T.parent=o,T.depth=s,b=T,o.staticInsensitive.set(w,T)}}break}case xt:{const x=c.substring(g,m[1]),w=c.substring(m[4],y),S=f&&!!(x||w),T=x?S?x:x.toLowerCase():void 0,_=w?S?w:w.toLowerCase():void 0,P=!u&&o.dynamic?.find(M=>!M.skipOnParamError&&M.caseSensitive===S&&M.prefix===T&&M.suffix===_);if(P)b=P;else{const M=kr(xt,n.fullPath??n.from,S,T,_);b=M,M.depth=s,M.parent=o,o.dynamic??=[],o.dynamic.push(M)}break}case fn:{const x=c.substring(g,m[1]),w=c.substring(m[4],y),S=f&&!!(x||w),T=x?S?x:x.toLowerCase():void 0,_=w?S?w:w.toLowerCase():void 0,P=!u&&o.optional?.find(M=>!M.skipOnParamError&&M.caseSensitive===S&&M.prefix===T&&M.suffix===_);if(P)b=P;else{const M=kr(fn,n.fullPath??n.from,S,T,_);b=M,M.parent=o,M.depth=s,o.optional??=[],o.optional.push(M)}break}case wt:{const x=c.substring(g,m[1]),w=c.substring(m[4],y),S=f&&!!(x||w),T=x?S?x:x.toLowerCase():void 0,_=w?S?w:w.toLowerCase():void 0,P=kr(wt,n.fullPath??n.from,S,T,_);b=P,P.parent=o,P.depth=s,o.wildcard??=[],o.wildcard.push(P)}}o=b}if(u&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const m=mt(n.fullPath??n.from);m.kind=mi,m.parent=o,s++,m.depth=s,o.pathless??=[],o.pathless.push(m),o=m}const h=(n.path||!n.children)&&!n.isRoot;if(h&&c.endsWith("/")){const m=mt(n.fullPath??n.from);m.kind=ht,m.parent=o,s++,m.depth=s,o.index=m,o=m}o.parse=n.options?.params?.parse??null,o.skipOnParamError=u,o.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,h&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const c of n.children)hr(e,t,c,a,o,s,i)}function Lr(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 at(e){if(e.pathless)for(const t of e.pathless)at(t);if(e.static)for(const t of e.static.values())at(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())at(t);if(e.dynamic?.length){e.dynamic.sort(Lr);for(const t of e.dynamic)at(t)}if(e.optional?.length){e.optional.sort(Lr);for(const t of e.optional)at(t)}if(e.wildcard?.length){e.wildcard.sort(Lr);for(const t of e.wildcard)at(t)}}function mt(e){return{kind:zt,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 kr(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 V1(e,t){const n=mt("/"),r=new Uint16Array(6);for(const o of e)hr(!1,r,o,1,n,0);at(n),t.masksTree=n,t.flatCache=po(1e3)}function q1(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Go(e,t.masksTree);return t.flatCache.set(e,r),r}function W1(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let i=o.singleCache.get(s);if(!i){i=mt("/");const a=new Uint16Array(6);hr(t,a,{from:e},1,i,0),o.singleCache.set(s,i)}return Go(r,i,n)}function z1(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=Go(e,t.segmentTree,n)}catch(i){if(i instanceof URIError)s=null;else throw i}return s&&(s.branch=yf(s.route)),t.matchCache.set(r,s),s}function vf(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function G1(e,t=!1,n){const r=mt(e.fullPath),o=new Uint16Array(6),s={},i={};let a=0;return hr(t,o,e,1,r,0,d=>{if(n?.(d,a),Wo(!(d.id in s),`Duplicate routes found with id: ${String(d.id)}`),s[d.id]=d,a!==0&&d.path){const f=vf(d.fullPath);(!i[f]||d.fullPath.endsWith("/"))&&(i[f]=d)}a++}),at(r),{processedTree:{segmentTree:r,singleCache:po(1e3),matchCache:po(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:i}}function Go(e,t,n=!1){const r=e.split("/"),o=xf(e,r,t,n);if(!o)return null;const[s]=gi(e,r,o);return{route:o.node.route,rawParams:s,parsedParams:o.parsedParams}}function gi(e,t,n){const r=bf(n.node);let o=null;const s={};let i=n.extract?.part??0,a=n.extract?.node??0,c=n.extract?.path??0,d=n.extract?.segment??0;for(;a<r.length;i++,a++,c++,d++){const f=r[a];if(f.kind===ht)break;if(f.kind===mi){d--,i--,c--;continue}const u=t[i],h=c;if(u&&(c+=u.length),f.kind===xt){o??=n.node.fullPath.split("/");const m=o[d],b=f.prefix?.length??0;if(m.charCodeAt(b)===123){const y=f.suffix?.length??0,v=m.substring(b+2,m.length-y-1),x=u.substring(b,u.length-y);s[v]=decodeURIComponent(x)}else{const y=m.substring(1);s[y]=decodeURIComponent(u)}}else if(f.kind===fn){if(n.skipped&1<<a){i--,c=h-1;continue}o??=n.node.fullPath.split("/");const m=o[d],b=f.prefix?.length??0,g=f.suffix?.length??0,y=m.substring(b+3,m.length-g-1),v=f.suffix||f.prefix?u.substring(b,u.length-g):u;v&&(s[y]=decodeURIComponent(v))}else if(f.kind===wt){const m=f,b=e.substring(h+(m.prefix?.length??0),e.length-(m.suffix?.length??0)),g=decodeURIComponent(b);s["*"]=g,s._splat=g;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:i,node:a,path:c,segment:d}]}function yf(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function bf(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function xf(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!fo(t),s=o&&e!=="/",i=t.length-(o?1:0),a=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,d=null,f=null;for(;a.length;){const u=a.pop(),{node:h,index:m,skipped:b,depth:g,statics:y,dynamics:v,optionals:x}=u;let{extract:w,rawParams:S,parsedParams:T}=u;if(h.skipOnParamError){if(!Fr(e,t,u))continue;S=u.rawParams,w=u.extract,T=u.parsedParams}r&&h.route&&h.kind!==ht&&on(d,u)&&(d=u);const _=m===i;if(_&&(h.route&&!s&&on(f,u)&&(f=u),!h.optional&&!h.wildcard&&!h.index&&!h.pathless))continue;const P=_?void 0:t[m];let M;if(_&&h.index){const $={node:h.index,index:m,skipped:b,depth:g+1,statics:y,dynamics:v,optionals:x,extract:w,rawParams:S,parsedParams:T};let k=!0;if(h.index.skipOnParamError&&(Fr(e,t,$)||(k=!1)),k){if(y===i&&!v&&!x&&!b)return $;on(f,$)&&(f=$)}}if(h.wildcard&&on(c,u))for(const $ of h.wildcard){const{prefix:k,suffix:j}=$;if(k&&(_||!($.caseSensitive?P:M??=P.toLowerCase()).startsWith(k)))continue;if(j){if(_)continue;const Z=t.slice(m).join("/").slice(-j.length);if(($.caseSensitive?Z:Z.toLowerCase())!==j)continue}const K={node:$,index:i,skipped:b,depth:g,statics:y,dynamics:v,optionals:x,extract:w,rawParams:S,parsedParams:T};if(!($.skipOnParamError&&!Fr(e,t,K))){c=K;break}}if(h.optional){const $=b|1<<g,k=g+1;for(let j=h.optional.length-1;j>=0;j--){const K=h.optional[j];a.push({node:K,index:m,skipped:$,depth:k,statics:y,dynamics:v,optionals:x,extract:w,rawParams:S,parsedParams:T})}if(!_)for(let j=h.optional.length-1;j>=0;j--){const K=h.optional[j],{prefix:Z,suffix:L}=K;if(Z||L){const N=K.caseSensitive?P:M??=P.toLowerCase();if(Z&&!N.startsWith(Z)||L&&!N.endsWith(L))continue}a.push({node:K,index:m+1,skipped:b,depth:k,statics:y,dynamics:v,optionals:x+1,extract:w,rawParams:S,parsedParams:T})}}if(!_&&h.dynamic&&P)for(let $=h.dynamic.length-1;$>=0;$--){const k=h.dynamic[$],{prefix:j,suffix:K}=k;if(j||K){const Z=k.caseSensitive?P:M??=P.toLowerCase();if(j&&!Z.startsWith(j)||K&&!Z.endsWith(K))continue}a.push({node:k,index:m+1,skipped:b,depth:g+1,statics:y,dynamics:v+1,optionals:x,extract:w,rawParams:S,parsedParams:T})}if(!_&&h.staticInsensitive){const $=h.staticInsensitive.get(M??=P.toLowerCase());$&&a.push({node:$,index:m+1,skipped:b,depth:g+1,statics:y+1,dynamics:v,optionals:x,extract:w,rawParams:S,parsedParams:T})}if(!_&&h.static){const $=h.static.get(P);$&&a.push({node:$,index:m+1,skipped:b,depth:g+1,statics:y+1,dynamics:v,optionals:x,extract:w,rawParams:S,parsedParams:T})}if(h.pathless){const $=g+1;for(let k=h.pathless.length-1;k>=0;k--){const j=h.pathless[k];a.push({node:j,index:m,skipped:b,depth:$,statics:y,dynamics:v,optionals:x,extract:w,rawParams:S,parsedParams:T})}}}if(f&&c)return on(c,f)?f:c;if(f)return f;if(c)return c;if(r&&d){let u=d.index;for(let m=0;m<d.index;m++)u+=t[m].length;const h=u===e.length?"/":e.slice(u);return d.rawParams??={},d.rawParams["**"]=decodeURIComponent(h),d}return null}function Fr(e,t,n){try{const[r,o]=gi(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 on(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===ht)>(e.node.kind===ht)||t.node.kind===ht==(e.node.kind===ht)&&t.depth>e.depth))):!0}function $r(e){return vi(e.filter(t=>t!==void 0).join("/"))}function vi(e){return e.replace(/\/{2,}/g,"/")}function yi(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function bi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function K1(e){return bi(yi(e))}function er(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function wf(e,t,n){return er(e,n)===er(t,n)}function Z1({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),s=!o&&t===".";let i;if(r){i=o?t:s?e:e+"\0"+t;const u=r.get(i);if(u)return u}let a;if(s)a=e.split("/");else if(o)a=t.split("/");else{for(a=e.split("/");a.length>1&&fo(a)==="";)a.pop();const u=t.split("/");for(let h=0,m=u.length;h<m;h++){const b=u[h];b===""?h?h===m-1&&a.push(b):a=[b]:b===".."?a.pop():b==="."||a.push(b)}}a.length>1&&(fo(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let c,d="";for(let u=0;u<a.length;u++){u>0&&(d+="/");const h=a[u];if(!h)continue;c=zo(h,0,c);const m=c[0];if(m===zt){d+=h;continue}const b=c[5],g=h.substring(0,c[1]),y=h.substring(c[4],b),v=h.substring(c[2],c[3]);m===xt?d+=g||y?`${g}{$${v}}${y}`:`$${v}`:m===wt?d+=g||y?`${g}{$}${y}`:"$":d+=`${g}{-$${v}}${y}`}d=vi(d);const f=d||"/";return i&&r&&r.set(i,f),f}function Y1(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 Br(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=>Js(o,n)).join("/"):Js(r,n)}function Q1({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 i=e.length;let a=0,c,d="";for(;a<i;){const u=a;c=zo(e,u,c);const h=c[5];if(a=h+1,u===h)continue;const m=c[0];if(m===zt){d+="/"+e.substring(u,h);continue}if(m===wt){const b=t._splat;s._splat=b,s["*"]=b;const g=e.substring(u,c[1]),y=e.substring(c[4],h);if(!b){o=!0,(g||y)&&(d+="/"+g+y);continue}const v=Br("_splat",t,n);d+="/"+g+v+y;continue}if(m===xt){const b=e.substring(c[2],c[3]);!o&&!(b in t)&&(o=!0),s[b]=t[b];const g=e.substring(u,c[1]),y=e.substring(c[4],h),v=Br(b,t,n)??"undefined";d+="/"+g+v+y;continue}if(m===fn){const b=e.substring(c[2],c[3]),g=t[b];if(g==null)continue;s[b]=g;const y=e.substring(u,c[1]),v=e.substring(c[4],h),x=Br(b,t,n)??"";d+="/"+y+x+v;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:s,interpolatedPath:d||"/",isMissingParams:o}}function Js(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function xi(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function X1(e){return!!e?.isNotFound}const pt="__root__";function wi(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 J1(e){return e instanceof Response&&!!e.options}const Ef="Error preloading route! ☝️";class Ei{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=pt:this.parentRoute||Wo(!1);let s=o?pt:r?.path;s&&s!=="/"&&(s=yi(s));const i=r?.id||s;let a=o?pt:$r([this.parentRoute.id===pt?"":this.parentRoute.id,i]);s===pt&&(s="/"),a!==pt&&(a=$r(["/",a]));const c=a===pt?"/":$r([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=c,this._to=bi(c)},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=>wi({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 Sf{constructor({id:t}){this.notFound=n=>xi({routeId:this.id,...n}),this.redirect=n=>wi({from:this.id,...n}),this.id=t}}class Cf extends Ei{constructor(t){super(t)}}const Tf="use",eE=fr[Tf],tE=typeof window<"u"?l.useLayoutEffect:l.useEffect;function nE(e){const t=l.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Rf(e,t,n={},r={}){l.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 Pf(e){const t=l.useRef(null);return l.useImperativeHandle(e,()=>t.current,[]),t}function rE({children:e,fallback:t=null}){return Si()?p.jsx(R.Fragment,{children:e}):p.jsx(R.Fragment,{children:t})}function Si(){return R.useSyncExternalStore(Af,()=>!0,()=>!1)}function Af(){return()=>{}}function Of(e,t){return e===t}function _f(e,t,n=Of){const r=l.useCallback(i=>{if(!e)return()=>{};const{unsubscribe:a}=e.subscribe(i);return a},[e]),o=l.useCallback(()=>e?.get(),[e]);return Xd.useSyncExternalStoreWithSelector(r,o,o,t,n)}const Nf=l.createContext(null);function Gt(e){const t=l.useContext(Nf);return e?.warn,t}function ho(e){const t=Gt({warn:e?.router===void 0}),n=e?.router||t,r=l.useRef(void 0);return _f(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=hi(r.current,e.select(o));return r.current=s,s}return e.select(o)}return o})}const Mf=l.createContext(void 0),If=l.createContext(void 0);function Ye(e){const t=l.useContext(e.from?If:Mf);return ho({select:r=>{const o=r.matches.find(s=>e.from?e.from===s.routeId:s.id===t);if(Wo(!((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 Ko(e){return Ye({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Zo(e){const{select:t,...n}=e;return Ye({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Yo(e){return Ye({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 Qo(e){return Ye({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function mr(e){const t=Gt();return l.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Df(e,t){const n=Gt(),r=Pf(t),{activeProps:o,inactiveProps:s,activeOptions:i,to:a,preload:c,preloadDelay:d,hashScrollIntoView:f,replace:u,startTransition:h,resetScroll:m,viewTransition:b,children:g,target:y,disabled:v,style:x,className:w,onClick:S,onBlur:T,onFocus:_,onMouseEnter:P,onMouseLeave:M,onTouchStart:$,ignoreBlocker:k,params:j,search:K,hash:Z,state:L,mask:N,reloadDocument:C,unsafeRelative:I,from:O,_fromLocation:A,...F}=e,U=Si(),X=ho({select:ae=>{const ge=ae.matches[ae.matches.length-1];return{search:ge?.search,hash:ae.location.hash,path:ge?.pathname}},structuralSharing:!0}),B=e.from,z=l.useMemo(()=>({...e,from:B}),[n,X,B,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),G=l.useMemo(()=>n.buildLocation({...z}),[n,z]),q=G.maskedLocation?G.maskedLocation.publicHref:G.publicHref,D=G.maskedLocation?G.maskedLocation.external:G.external,V=l.useMemo(()=>Bf(q,D,n.history,v),[v,D,q,n.history]),re=l.useMemo(()=>{if(V?.external)return Xs(V.href,n.protocolAllowlist)?void 0:V.href;if(!Uf(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),Xs(a,n.protocolAllowlist)?void 0:a}catch{}},[a,V,n.protocolAllowlist]),Y=ho({select:ae=>{if(re)return!1;if(i?.exact){if(!wf(ae.location.pathname,G.pathname,n.basepath))return!1}else{const ge=er(ae.location.pathname,n.basepath),_e=er(G.pathname,n.basepath);if(!(ge.startsWith(_e)&&(ge.length===_e.length||ge[_e.length]==="/")))return!1}return(i?.includeSearch??!0)&&!Wn(ae.location.search,G.search,{partial:!i?.exact,ignoreUndefined:!i?.explicitUndefined})?!1:i?.includeHash?U&&ae.location.hash===G.hash:!0}}),ee=Y?zs(o,{})??jf:Ur,J=Y?Ur:zs(s,{})??Ur,ce=[w,ee.className,J.className].filter(Boolean).join(" "),ve=(x||ee.style||J.style)&&{...x,...ee.style,...J.style},[xe,Q]=l.useState(!1),ie=l.useRef(!1),ye=e.reloadDocument||re?!1:c??n.options.defaultPreload,he=d??n.options.defaultPreloadDelay??0,Le=l.useCallback(()=>{n.preloadRoute({...z,_builtLocation:G}).catch(ae=>{console.warn(ae),console.warn(Ef)})},[n,z,G]),rn=l.useCallback(ae=>{ae?.isIntersecting&&Le()},[Le]);Rf(r,rn,$f,{disabled:!!v||ye!=="viewport"}),l.useEffect(()=>{ie.current||!v&&ye==="render"&&(Le(),ie.current=!0)},[v,Le,ye]);const me=ae=>{const ge=ae.currentTarget.getAttribute("target"),_e=y!==void 0?y:ge;if(!v&&!Hf(ae)&&!ae.defaultPrevented&&(!_e||_e==="_self")&&ae.button===0){ae.preventDefault(),pr.flushSync(()=>{Q(!0)});const Nt=n.subscribe("onResolved",()=>{Nt(),Q(!1)});n.navigate({...z,replace:u,resetScroll:m,hashScrollIntoView:f,startTransition:h,viewTransition:b,ignoreBlocker:k})}};if(re)return{...F,ref:r,href:re,...g&&{children:g},...y&&{target:y},...v&&{disabled:v},...x&&{style:x},...w&&{className:w},...S&&{onClick:S},...T&&{onBlur:T},..._&&{onFocus:_},...P&&{onMouseEnter:P},...M&&{onMouseLeave:M},...$&&{onTouchStart:$}};const et=ae=>{if(v||ye!=="intent")return;if(!he){Le();return}const ge=ae.currentTarget;if(sn.has(ge))return;const _e=setTimeout(()=>{sn.delete(ge),Le()},he);sn.set(ge,_e)},Dr=ae=>{v||ye!=="intent"||Le()},In=ae=>{if(v||!ye||!he)return;const ge=ae.currentTarget,_e=sn.get(ge);_e&&(clearTimeout(_e),sn.delete(ge))};return{...F,...ee,...J,href:V?.href,ref:r,onClick:Dt([S,me]),onBlur:Dt([T,In]),onFocus:Dt([_,et]),onMouseEnter:Dt([P,et]),onMouseLeave:Dt([M,In]),onTouchStart:Dt([$,Dr]),disabled:!!v,target:y,...ve&&{style:ve},...ce&&{className:ce},...v&&Lf,...Y&&kf,...U&&xe&&Ff}}const Ur={},jf={className:"active"},Lf={role:"link","aria-disabled":!0},kf={"data-status":"active","aria-current":"page"},Ff={"data-transitioning":"transitioning"},sn=new WeakMap,$f={rootMargin:"100px"},Dt=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Bf(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function Uf(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Xo=l.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=Df(r,t),i=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:a,...c}=s;return l.createElement("a",c,i)}return l.createElement(n,s,i)});function Hf(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oE(e){return new Vf({id:e})}class Vf extends Sf{constructor({id:t}){super({id:t}),this.useMatch=n=>Ye({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Ye({from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Qo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Yo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Zo({...n,from:this.id,strict:!1}),this.useLoaderData=n=>Ko({...n,from:this.id,strict:!1}),this.useNavigate=()=>{const n=Gt();return mr({from:n.routesById[this.id].fullPath})},this.notFound=n=>xi({routeId:this.id,...n}),this.Link=R.forwardRef((n,r)=>{const s=Gt().routesById[this.id].fullPath;return p.jsx(Xo,{ref:r,from:s,...n})})}}class qf extends Ei{constructor(t){super(t),this.useMatch=n=>Ye({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Ye({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Qo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Yo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Zo({...n,from:this.id}),this.useLoaderData=n=>Ko({...n,from:this.id}),this.useNavigate=()=>mr({from:this.fullPath}),this.Link=R.forwardRef((n,r)=>p.jsx(Xo,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function sE(e){return new qf(e)}class Wf extends Cf{constructor(t){super(t),this.useMatch=n=>Ye({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Ye({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Qo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Yo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Zo({...n,from:this.id}),this.useLoaderData=n=>Ko({...n,from:this.id}),this.useNavigate=()=>mr({from:this.fullPath}),this.Link=R.forwardRef((n,r)=>p.jsx(Xo,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function aE(e){return new Wf(e)}var xn=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(){}},zf={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Gf=class{#e=zf;#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)}},gt=new Gf;function Kf(e){setTimeout(e,0)}var Et=typeof window>"u"||"Deno"in globalThis;function Ie(){}function Zf(e,t){return typeof e=="function"?e(t):e}function mo(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ci(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ct(e,t){return typeof e=="function"?e(t):e}function Fe(e,t){return typeof e=="function"?e(t):e}function ea(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==Jo(i,t.options))return!1}else if(!hn(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function ta(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(pn(t.options.mutationKey)!==pn(s))return!1}else if(!hn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Jo(e,t){return(t?.queryKeyHashFn||pn)(e)}function pn(e){return JSON.stringify(e,(t,n)=>vo(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function hn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>hn(e[n],t[n])):!1}var Yf=Object.prototype.hasOwnProperty;function Ti(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=na(e)&&na(t);if(!r&&!(vo(e)&&vo(t)))return t;const s=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),a=i.length,c=r?new Array(a):{};let d=0;for(let f=0;f<a;f++){const u=r?f:i[f],h=e[u],m=t[u];if(h===m){c[u]=h,(r?f<s:Yf.call(e,u))&&d++;continue}if(h===null||m===null||typeof h!="object"||typeof m!="object"){c[u]=m;continue}const b=Ti(h,m,n+1);c[u]=b,b===h&&d++}return s===a&&d===s?e:c}function go(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 na(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vo(e){if(!ra(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!ra(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ra(e){return Object.prototype.toString.call(e)==="[object Object]"}function Qf(e){return new Promise(t=>{gt.setTimeout(t,e)})}function yo(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Ti(e,t):t}function iE(e){return e}function Xf(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Jf(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var es=Symbol();function Ri(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===es?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Pi(e,t){return typeof e=="function"?e(...t):!!e}function ep(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 tp=class extends xn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Et&&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"}},ts=new tp;function bo(){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 np=Kf;function rp(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=np;const s=a=>{t?e.push(a):o(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||i()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var Ee=rp(),op=class extends xn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Et&&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}},tr=new op;function sp(e){return Math.min(1e3*2**e,3e4)}function Ai(e){return(e??"online")==="online"?tr.isOnline():!0}var xo=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Oi(e){let t=!1,n=0,r;const o=bo(),s=()=>o.status!=="pending",i=g=>{if(!s()){const y=new xo(g);h(y),e.onCancel?.(y)}},a=()=>{t=!0},c=()=>{t=!1},d=()=>ts.isFocused()&&(e.networkMode==="always"||tr.isOnline())&&e.canRun(),f=()=>Ai(e.networkMode)&&e.canRun(),u=g=>{s()||(r?.(),o.resolve(g))},h=g=>{s()||(r?.(),o.reject(g))},m=()=>new Promise(g=>{r=y=>{(s()||d())&&g(y)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),b=()=>{if(s())return;let g;const y=n===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(u).catch(v=>{if(s())return;const x=e.retry??(Et?0:3),w=e.retryDelay??sp,S=typeof w=="function"?w(n,v):w,T=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,v);if(t||!T){h(v);return}n++,e.onFail?.(n,v),Qf(S).then(()=>d()?void 0:m()).then(()=>{t?h(v):b()})})};return{promise:o,status:()=>o.status,cancel:i,continue:()=>(r?.(),o),cancelRetry:a,continueRetry:c,canStart:f,start:()=>(f()?b():m().then(b),o)}}var _i=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mo(this.gcTime)&&(this.#e=gt.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Et?1/0:300*1e3))}clearGcTimeout(){this.#e&&(gt.clearTimeout(this.#e),this.#e=void 0)}},ap=class extends _i{#e;#t;#n;#o;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=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=sa(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.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=sa(this.options);t.data!==void 0&&(this.setState(oa(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=yo(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(Ie).catch(Ie):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Fe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===es||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ct(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:!Ci(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.#a?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 a=this.observers.find(c=>c.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},o=()=>{const a=Ri(this.options,t),d=(()=>{const f={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(f),f})();return this.#a=!1,this.options.persister?this.options.persister(a,d,this):a(d)},i=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:o};return r(a),a})();this.options.behavior?.onFetch(i,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#s({type:"fetch",meta:i.fetchOptions?.meta}),this.#r=Oi({initialPromise:t?.initialPromise,fn:i.fetchFn,onCancel:a=>{a instanceof xo&&a.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(a,c)=>{this.#s({type:"failed",failureCount:a,error:c})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0});try{const a=await this.#r.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof xo){if(a.silent)return this.#r.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#s({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}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,...Ni(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...oa(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),Ee.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Ni(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ai(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function oa(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function sa(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 ip=class extends xn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#a=bo(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#a;#s;#m;#f;#p;#l;#u;#c;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),aa(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wo(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wo(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 Fe(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&&!go(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&ia(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||Fe(this.options.enabled,this.#t)!==Fe(t.enabled,this.#t)||ct(this.options.staleTime,this.#t)!==ct(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||Fe(this.options.enabled,this.#t)!==Fe(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 lp(this,n)&&(this.#o=n,this.#i=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.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#h.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(Ie)),t}#g(){this.#x();const e=ct(this.options.staleTime,this.#t);if(Et||this.#o.isStale||!mo(e))return;const n=Ci(this.#o.dataUpdatedAt,e)+1;this.#l=gt.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,!(Et||Fe(this.options.enabled,this.#t)===!1||!mo(this.#c)||this.#c===0)&&(this.#u=gt.setInterval(()=>{(this.options.refetchIntervalInBackground||ts.isFocused())&&this.#d()},this.#c))}#b(){this.#g(),this.#y(this.#v())}#x(){this.#l&&(gt.clearTimeout(this.#l),this.#l=void 0)}#w(){this.#u&&(gt.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#o,s=this.#r,i=this.#i,c=e!==n?e.state:this.#n,{state:d}=e;let f={...d},u=!1,h;if(t._optimisticResults){const M=this.hasListeners(),$=!M&&aa(e,t),k=M&&ia(e,n,t,r);($||k)&&(f={...f,...Ni(d.data,e.options)}),t._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:m,errorUpdatedAt:b,status:g}=f;h=f.data;let y=!1;if(t.placeholderData!==void 0&&h===void 0&&g==="pending"){let M;o?.isPlaceholderData&&t.placeholderData===i?.placeholderData?(M=o.data,y=!0):M=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,M!==void 0&&(g="success",h=yo(o?.data,M,t),u=!0)}if(t.select&&h!==void 0&&!y)if(o&&h===s?.data&&t.select===this.#m)h=this.#f;else try{this.#m=t.select,h=t.select(h),h=yo(o?.data,h,t),this.#f=h,this.#s=null}catch(M){this.#s=M}this.#s&&(m=this.#s,h=this.#f,b=Date.now(),g="error");const v=f.fetchStatus==="fetching",x=g==="pending",w=g==="error",S=x&&v,T=h!==void 0,P={status:g,fetchStatus:f.fetchStatus,isPending:x,isSuccess:g==="success",isError:w,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:f.dataUpdatedAt,error:m,errorUpdatedAt:b,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:w&&!T,isPaused:f.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:w&&T,isStale:ns(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Fe(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const M=P.data!==void 0,$=P.status==="error"&&!M,k=Z=>{$?Z.reject(P.error):M&&Z.resolve(P.data)},j=()=>{const Z=this.#a=P.promise=bo();k(Z)},K=this.#a;switch(K.status){case"pending":e.queryHash===n.queryHash&&k(K);break;case"fulfilled":($||P.data!==K.value)&&j();break;case"rejected":(!$||P.error!==K.reason)&&j();break}}return P}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#p=this.#t),go(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.#h.size)return!0;const s=new Set(o??this.#h);return this.options.throwOnError&&s.add("error"),Object.keys(this.#o).some(i=>{const a=i;return this.#o[a]!==e[a]&&s.has(a)})};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){Ee.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function cp(e,t){return Fe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function aa(e,t){return cp(e,t)||e.state.data!==void 0&&wo(e,t,t.refetchOnMount)}function wo(e,t,n){if(Fe(t.enabled,e)!==!1&&ct(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ns(e,t)}return!1}function ia(e,t,n,r){return(e!==t||Fe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ns(e,n)}function ns(e,t){return Fe(t.enabled,e)!==!1&&e.isStaleByTime(ct(t.staleTime,e))}function lp(e,t){return!go(e.getCurrentResult(),t)}function ca(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],i=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},c=0;const d=async()=>{let f=!1;const u=b=>{ep(b,()=>t.signal,()=>f=!0)},h=Ri(t.options,t.fetchOptions),m=async(b,g,y)=>{if(f)return Promise.reject();if(g==null&&b.pages.length)return Promise.resolve(b);const x=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:g,direction:y?"backward":"forward",meta:t.options.meta};return u(_),_})(),w=await h(x),{maxPages:S}=t.options,T=y?Jf:Xf;return{pages:T(b.pages,w,S),pageParams:T(b.pageParams,g,S)}};if(o&&s.length){const b=o==="backward",g=b?Mi:Eo,y={pages:s,pageParams:i},v=g(r,y);a=await m(y,v,b)}else{const b=e??s.length;do{const g=c===0?i[0]??r.initialPageParam:Eo(r,a);if(c>0&&g==null)break;a=await m(a,g),c++}while(c<b)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=d}}}function Eo(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 Mi(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function cE(e,t){return t?Eo(e,t)!=null:!1}function lE(e,t){return!t||!e.getPreviousPageParam?!1:Mi(e,t)!=null}var up=class extends _i{#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||dp(),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=Oi({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,i)=>{this.#r({type:"failed",failureCount:s,error:i})},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 i=await this.options.onMutate?.(e,n);i!==this.state.context&&this.#r({type:"pending",context:i,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(i){Promise.reject(i)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(i){Promise.reject(i)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(i){Promise.reject(i)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(i){Promise.reject(i)}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),Ee.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function dp(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fp=class extends xn{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 up({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=Ln(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=Ln(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=Ln(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=Ln(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ee.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=>ta(t,n))}findAll(e={}){return this.getAll().filter(t=>ta(e,t))}notify(e){Ee.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ee.batch(()=>Promise.all(e.map(t=>t.continue().catch(Ie))))}};function Ln(e){return e.options.scope?.id}var pp=class extends xn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??Jo(r,t);let s=this.get(o);return s||(s=new ap({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(){Ee.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=>ea(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>ea(e,n)):t}notify(e){Ee.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ee.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ee.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},hp=class{#e;#t;#n;#o;#r;#i;#a;#s;constructor(e={}){this.#e=e.queryCache||new pp,this.#t=e.mutationCache||new fp,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=ts.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=tr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=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(ct(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,i=Zf(t,s);if(i!==void 0)return this.#e.build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Ee.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;Ee.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Ee.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ee.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Ie).catch(Ie)}invalidateQueries(e,t={}){return Ee.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=Ee.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(Ie)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ie)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(ct(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ie).catch(Ie)}fetchInfiniteQuery(e){return e.behavior=ca(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ie).catch(Ie)}ensureInfiniteQueryData(e){return e.behavior=ca(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return tr.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(pn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{hn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(pn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{hn(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=Jo(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===es&&(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()}},Ii=l.createContext(void 0),mp=e=>{const t=l.useContext(Ii);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},uE=({client:e,children:t})=>(l.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(Ii.Provider,{value:e,children:t})),Di=l.createContext(!1),gp=()=>l.useContext(Di);Di.Provider;function ji(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Li=l.createContext(ji()),vp=()=>l.useContext(Li),yp=({children:e})=>{const[t]=l.useState(()=>ji());return p.jsx(Li.Provider,{value:t,children:typeof e=="function"?e(t):e})},bp=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?Pi(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},xp=e=>{l.useEffect(()=>{e.clearReset()},[e])},wp=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Pi(n,[e.error,r])),Ep=(e,t)=>t.state.data===void 0,Sp=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))}},Cp=(e,t)=>e.isLoading&&e.isFetching&&!t,Tp=(e,t)=>e?.suspense&&t.isPending,la=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Rp(e,t,n){const r=gp(),o=vp(),s=mp(),i=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(i);const a=s.getQueryCache().get(i.queryHash);i._optimisticResults=r?"isRestoring":"optimistic",Sp(i),bp(i,o,a),xp(o);const c=!s.getQueryCache().get(i.queryHash),[d]=l.useState(()=>new t(s,i)),f=d.getOptimisticResult(i),u=!r&&e.subscribed!==!1;if(l.useSyncExternalStore(l.useCallback(h=>{const m=u?d.subscribe(Ee.batchCalls(h)):Ie;return d.updateResult(),m},[d,u]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),l.useEffect(()=>{d.setOptions(i)},[i,d]),Tp(i,f))throw la(i,d,o);if(wp({result:f,errorResetBoundary:o,throwOnError:i.throwOnError,query:a,suspense:i.suspense}))throw f.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(i,f),i.experimental_prefetchInRender&&!Et&&Cp(f,r)&&(c?la(i,d,o):a?.promise)?.catch(Ie).finally(()=>{d.updateResult()}),i.notifyOnChangeProps?f:d.trackResult(f)}function dE(e,t){return Rp({...e,enabled:!0,suspense:!0,throwOnError:Ep,placeholderData:void 0},ip)}var Hr={confirmLabel:"OK",dismissible:!0},ua={confirmLabel:"Continue",cancelLabel:"Cancel",tone:"default",dismissible:!0},Pp=e=>typeof e=="string"?{title:e,...Hr}:{...Hr,...e,dismissible:e.dismissible??Hr.dismissible},Ap=e=>typeof e=="string"?{title:e,...ua}:{...ua,...e,dismissible:e.dismissible??e.tone!=="danger"},Op=()=>{let e={current:null};const t=new Set,n=()=>{t.forEach(c=>c())},r=c=>{e=c,n()},o=()=>e,s=()=>{const c=e.current;!c||c.kind!=="alert"||(r({current:null}),c.resolver())},i=c=>{const d=e.current;!d||d.kind!=="confirm"||(r({current:null}),d.resolver(c))},a=()=>{const c=e.current;if(c){if(c.kind==="confirm"){i(!1);return}s()}};return{subscribe:c=>(t.add(c),()=>{t.delete(c)}),getSnapshot:o,alert:c=>{const d=Pp(c);return a(),new Promise(f=>{r({current:{kind:"alert",options:d,resolver:f}})})},confirm:c=>{const d=Ap(c);return a(),new Promise(f=>{r({current:{kind:"confirm",options:d,resolver:f}})})},resolveAlert:s,resolveConfirm:i,dismiss:a,reset:()=>{a()}}},ki=l.createContext(null),_p=()=>{const e=l.useRef();return e.current||(e.current=Op()),e.current},Np=({children:e,components:t})=>{const n=_p(),r=l.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot);l.useEffect(()=>()=>{n.reset()},[n]);const o=n,s=r.current;return p.jsxs(ki.Provider,{value:o,children:[e,s?.kind==="alert"&&p.jsx(t.Alert,{open:!0,options:s.options,onClose:n.resolveAlert}),s?.kind==="confirm"&&p.jsx(t.Confirm,{open:!0,options:s.options,onCancel:()=>n.resolveConfirm(!1),onConfirm:()=>n.resolveConfirm(!0)})]})},fE=()=>{const e=l.useContext(ki);if(!e)throw new Error("useModal must be used within ModalProvider");return e};function Mp(e,t){const n=l.createContext(t),r=s=>{const{children:i,...a}=s,c=l.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=l.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Xe(e,t=[]){let n=[];function r(s,i){const a=l.createContext(i),c=n.length;n=[...n,i];const d=u=>{const{scope:h,children:m,...b}=u,g=h?.[e]?.[c]||a,y=l.useMemo(()=>b,Object.values(b));return p.jsx(g.Provider,{value:y,children:m})};d.displayName=s+"Provider";function f(u,h){const m=h?.[e]?.[c]||a,b=l.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[d,f]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(a){const c=a?.[e]||s;return l.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,Ip(o,...t)]}function Ip(...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 i=r.reduce((a,{useScope:c,scopeName:d})=>{const u=c(s)[`__scope${d}`];return{...a,...u}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function da(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=da(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():da(e[o],null)}}}}function se(...e){return l.useCallback(wn(...e),e)}function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Pe=globalThis?.document?l.useLayoutEffect:()=>{},Dp=fr[" useId ".trim().toString()]||(()=>{}),jp=0;function Ze(e){const[t,n]=l.useState(Dp());return Pe(()=>{n(r=>r??String(jp++))},[e]),t?`radix-${t}`:""}var Lp=fr[" useInsertionEffect ".trim().toString()]||Pe;function nt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=kp({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const u=f.current;u!==a&&console.warn(`${r} is changing from ${u?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const d=l.useCallback(f=>{if(a){const u=Fp(f)?f(e):f;u!==e&&i.current?.(u)}else s(f)},[a,e,s,i]);return[c,d]}function kp({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return Lp(()=>{s.current=t},[t]),l.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Fp(e){return typeof e=="function"}function Kt(e){const t=$p(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,a=l.Children.toArray(s),c=a.find(Bp);if(c){const d=c.props.children,f=a.map(u=>u===c?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:u);return p.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,f):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function $p(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=Hp(o),a=Up(s,o.props);return o.type!==l.Fragment&&(a.ref=r?wn(r,i):i),l.cloneElement(o,a)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fi=Symbol("radix.slottable");function $i(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Fi,t}function Bp(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fi}function Up(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]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Hp(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 Vp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oe=Vp.reduce((e,t)=>{const n=Kt(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Bi(e,t){e&&pr.flushSync(()=>e.dispatchEvent(t))}function Qe(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current?.(...n),[])}function qp(e,t=globalThis?.document){const n=Qe(e);l.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 Wp="DismissableLayer",So="dismissableLayer.update",zp="dismissableLayer.pointerDownOutside",Gp="dismissableLayer.focusOutside",fa,Ui=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),En=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,d=l.useContext(Ui),[f,u]=l.useState(null),h=f?.ownerDocument??globalThis?.document,[,m]=l.useState({}),b=se(t,P=>u(P)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(y),x=f?g.indexOf(f):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,S=x>=v,T=Yp(P=>{const M=P.target,$=[...d.branches].some(k=>k.contains(M));!S||$||(o?.(P),i?.(P),P.defaultPrevented||a?.())},h),_=Qp(P=>{const M=P.target;[...d.branches].some(k=>k.contains(M))||(s?.(P),i?.(P),P.defaultPrevented||a?.())},h);return qp(P=>{x===d.layers.size-1&&(r?.(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},h),l.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(fa=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),pa(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=fa)}},[f,h,n,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),pa())},[f,d]),l.useEffect(()=>{const P=()=>m({});return document.addEventListener(So,P),()=>document.removeEventListener(So,P)},[]),p.jsx(oe.div,{...c,ref:b,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,_.onFocusCapture),onBlurCapture:W(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,T.onPointerDownCapture)})});En.displayName=Wp;var Kp="DismissableLayerBranch",Zp=l.forwardRef((e,t)=>{const n=l.useContext(Ui),r=l.useRef(null),o=se(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(oe.div,{...e,ref:o})});Zp.displayName=Kp;function Yp(e,t=globalThis?.document){const n=Qe(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){Hi(zp,n,d,{discrete:!0})};const d={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Qp(e,t=globalThis?.document){const n=Qe(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&Hi(Gp,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 pa(){const e=new CustomEvent(So);document.dispatchEvent(e)}function Hi(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?Bi(o,s):o.dispatchEvent(s)}var Vr="focusScope.autoFocusOnMount",qr="focusScope.autoFocusOnUnmount",ha={bubbles:!1,cancelable:!0},Xp="FocusScope",gr=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=l.useState(null),d=Qe(o),f=Qe(s),u=l.useRef(null),h=se(t,g=>c(g)),m=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(w){if(m.paused||!a)return;const S=w.target;a.contains(S)?u.current=S:st(u.current,{select:!0})},y=function(w){if(m.paused||!a)return;const S=w.relatedTarget;S!==null&&(a.contains(S)||st(u.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const T of w)T.removedNodes.length>0&&st(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const x=new MutationObserver(v);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),x.disconnect()}}},[r,a,m.paused]),l.useEffect(()=>{if(a){ga.add(m);const g=document.activeElement;if(!a.contains(g)){const v=new CustomEvent(Vr,ha);a.addEventListener(Vr,d),a.dispatchEvent(v),v.defaultPrevented||(Jp(oh(Vi(a)),{select:!0}),document.activeElement===g&&st(a))}return()=>{a.removeEventListener(Vr,d),setTimeout(()=>{const v=new CustomEvent(qr,ha);a.addEventListener(qr,f),a.dispatchEvent(v),v.defaultPrevented||st(g??document.body,{select:!0}),a.removeEventListener(qr,f),ga.remove(m)},0)}}},[a,d,f,m]);const b=l.useCallback(g=>{if(!n&&!r||m.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(y&&v){const x=g.currentTarget,[w,S]=eh(x);w&&S?!g.shiftKey&&v===S?(g.preventDefault(),n&&st(w,{select:!0})):g.shiftKey&&v===w&&(g.preventDefault(),n&&st(S,{select:!0})):v===x&&g.preventDefault()}},[n,r,m.paused]);return p.jsx(oe.div,{tabIndex:-1,...i,ref:h,onKeyDown:b})});gr.displayName=Xp;function Jp(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(st(r,{select:t}),document.activeElement!==n)return}function eh(e){const t=Vi(e),n=ma(t,e),r=ma(t.reverse(),e);return[n,r]}function Vi(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 ma(e,t){for(const n of e)if(!th(n,{upTo:t}))return n}function th(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 nh(e){return e instanceof HTMLInputElement&&"select"in e}function st(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nh(e)&&t&&e.select()}}var ga=rh();function rh(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=va(e,t),e.unshift(t)},remove(t){e=va(e,t),e[0]?.resume()}}}function va(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function oh(e){return e.filter(t=>t.tagName!=="A")}var sh="Portal",Sn=l.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=l.useState(!1);Pe(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?pi.createPortal(p.jsx(oe.div,{...r,ref:t}),i):null});Sn.displayName=sh;function ah(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Je=e=>{const{present:t,children:n}=e,r=ih(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=se(r.ref,ch(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Je.displayName="Presence";function ih(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[a,c]=ah(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=kn(r.current);s.current=a==="mounted"?d:"none"},[a]),Pe(()=>{const d=r.current,f=o.current;if(f!==e){const h=s.current,m=kn(d);e?c("MOUNT"):m==="none"||d?.display==="none"?c("UNMOUNT"):c(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Pe(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,u=m=>{const g=kn(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(c("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=m=>{m.target===t&&(s.current=kn(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:l.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function kn(e){return e?.animationName||"none"}function ch(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 Wr=0;function rs(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ya()),document.body.insertAdjacentElement("beforeend",e[1]??ya()),Wr++,()=>{Wr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Wr--}},[])}function ya(){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 Ke=function(){return Ke=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ke.apply(this,arguments)};function qi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function lh(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var zn="right-scroll-bar-position",Gn="width-before-scroll-bar",uh="with-scroll-bars-hidden",dh="--removed-body-scroll-bar-size";function zr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fh(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var ph=typeof window<"u"?l.useLayoutEffect:l.useEffect,ba=new WeakMap;function hh(e,t){var n=fh(null,function(r){return e.forEach(function(o){return zr(o,r)})});return ph(function(){var r=ba.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||zr(a,null)}),s.forEach(function(a){o.has(a)||zr(a,i)})}ba.set(n,e)},[e]),n}function mh(e){return e}function gh(e,t){t===void 0&&(t=mh);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var f=i;i=[],f.forEach(s)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),n}}}};return o}function vh(e){e===void 0&&(e={});var t=gh(null);return t.options=Ke({async:!0,ssr:!1},e),t}var Wi=function(e){var t=e.sideCar,n=qi(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,Ke({},n))};Wi.isSideCarExport=!0;function yh(e,t){return e.useMedium(t),Wi}var zi=vh(),Gr=function(){},vr=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Gr,onWheelCapture:Gr,onTouchMoveCapture:Gr}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,d=e.removeScrollBar,f=e.enabled,u=e.shards,h=e.sideCar,m=e.noRelative,b=e.noIsolation,g=e.inert,y=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,w=e.gapMode,S=qi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=h,_=hh([n,t]),P=Ke(Ke({},S),o);return l.createElement(l.Fragment,null,f&&l.createElement(T,{sideCar:zi,removeScrollBar:d,shards:u,noRelative:m,noIsolation:b,inert:g,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:w}),i?l.cloneElement(l.Children.only(a),Ke(Ke({},P),{ref:_})):l.createElement(x,Ke({},P,{className:c,ref:_}),a))});vr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vr.classNames={fullWidth:Gn,zeroRight:zn};var bh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function xh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bh();return t&&e.setAttribute("nonce",t),e}function wh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Eh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Sh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=xh())&&(wh(t,n),Eh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ch=function(){var e=Sh();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Gi=function(){var e=Ch(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Th={left:0,top:0,right:0,gap:0},Kr=function(e){return parseInt(e||"",10)||0},Rh=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Kr(n),Kr(r),Kr(o)]},Ph=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Th;var t=Rh(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ah=Gi(),Vt="data-scroll-locked",Oh=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(uh,` {
3
- overflow: hidden `).concat(r,`;
4
- padding-right: `).concat(a,"px ").concat(r,`;
5
- }
6
- body[`).concat(Vt,`] {
7
- overflow: hidden `).concat(r,`;
8
- overscroll-behavior: contain;
9
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
10
- padding-left: `.concat(o,`px;
11
- padding-top: `).concat(s,`px;
12
- padding-right: `).concat(i,`px;
13
- margin-left:0;
14
- margin-top:0;
15
- margin-right: `).concat(a,"px ").concat(r,`;
16
- `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
17
- }
18
-
19
- .`).concat(zn,` {
20
- right: `).concat(a,"px ").concat(r,`;
21
- }
22
-
23
- .`).concat(Gn,` {
24
- margin-right: `).concat(a,"px ").concat(r,`;
25
- }
26
-
27
- .`).concat(zn," .").concat(zn,` {
28
- right: 0 `).concat(r,`;
29
- }
30
-
31
- .`).concat(Gn," .").concat(Gn,` {
32
- margin-right: 0 `).concat(r,`;
33
- }
34
-
35
- body[`).concat(Vt,`] {
36
- `).concat(dh,": ").concat(a,`px;
37
- }
38
- `)},xa=function(){var e=parseInt(document.body.getAttribute(Vt)||"0",10);return isFinite(e)?e:0},_h=function(){l.useEffect(function(){return document.body.setAttribute(Vt,(xa()+1).toString()),function(){var e=xa()-1;e<=0?document.body.removeAttribute(Vt):document.body.setAttribute(Vt,e.toString())}},[])},Nh=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;_h();var s=l.useMemo(function(){return Ph(o)},[o]);return l.createElement(Ah,{styles:Oh(s,!t,o,n?"":"!important")})},Co=!1;if(typeof window<"u")try{var Fn=Object.defineProperty({},"passive",{get:function(){return Co=!0,!0}});window.addEventListener("test",Fn,Fn),window.removeEventListener("test",Fn,Fn)}catch{Co=!1}var jt=Co?{passive:!1}:!1,Mh=function(e){return e.tagName==="TEXTAREA"},Ki=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Mh(e)&&n[t]==="visible")},Ih=function(e){return Ki(e,"overflowY")},Dh=function(e){return Ki(e,"overflowX")},wa=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Zi(e,r);if(o){var s=Yi(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},jh=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Lh=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Zi=function(e,t){return e==="v"?Ih(t):Dh(t)},Yi=function(e,t){return e==="v"?jh(t):Lh(t)},kh=function(e,t){return e==="h"&&t==="rtl"?-1:1},Fh=function(e,t,n,r,o){var s=kh(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),d=!1,f=i>0,u=0,h=0;do{if(!a)break;var m=Yi(e,a),b=m[0],g=m[1],y=m[2],v=g-y-s*b;(b||v)&&Zi(e,a)&&(u+=v,h+=b);var x=a.parentNode;a=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(f&&Math.abs(u)<1||!f&&Math.abs(h)<1)&&(d=!0),d},$n=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ea=function(e){return[e.deltaX,e.deltaY]},Sa=function(e){return e&&"current"in e?e.current:e},$h=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Bh=function(e){return`
39
- .block-interactivity-`.concat(e,` {pointer-events: none;}
40
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},Uh=0,Lt=[];function Hh(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(Uh++)[0],s=l.useState(Gi)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=lh([e.lockRef.current],(e.shards||[]).map(Sa),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=l.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var v=$n(g),x=n.current,w="deltaX"in g?g.deltaX:x[0]-v[0],S="deltaY"in g?g.deltaY:x[1]-v[1],T,_=g.target,P=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in g&&P==="h"&&_.type==="range")return!1;var M=window.getSelection(),$=M&&M.anchorNode,k=$?$===_||$.contains(_):!1;if(k)return!1;var j=wa(P,_);if(!j)return!0;if(j?T=P:(T=P==="v"?"h":"v",j=wa(P,_)),!j)return!1;if(!r.current&&"changedTouches"in g&&(w||S)&&(r.current=T),!T)return!0;var K=r.current||T;return Fh(K,y,g,K==="h"?w:S)},[]),c=l.useCallback(function(g){var y=g;if(!(!Lt.length||Lt[Lt.length-1]!==s)){var v="deltaY"in y?Ea(y):$n(y),x=t.current.filter(function(T){return T.name===y.type&&(T.target===y.target||y.target===T.shadowParent)&&$h(T.delta,v)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var w=(i.current.shards||[]).map(Sa).filter(Boolean).filter(function(T){return T.contains(y.target)}),S=w.length>0?a(y,w[0]):!i.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),d=l.useCallback(function(g,y,v,x){var w={name:g,delta:y,target:v,should:x,shadowParent:Vh(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),f=l.useCallback(function(g){n.current=$n(g),r.current=void 0},[]),u=l.useCallback(function(g){d(g.type,Ea(g),g.target,a(g,e.lockRef.current))},[]),h=l.useCallback(function(g){d(g.type,$n(g),g.target,a(g,e.lockRef.current))},[]);l.useEffect(function(){return Lt.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",c,jt),document.addEventListener("touchmove",c,jt),document.addEventListener("touchstart",f,jt),function(){Lt=Lt.filter(function(g){return g!==s}),document.removeEventListener("wheel",c,jt),document.removeEventListener("touchmove",c,jt),document.removeEventListener("touchstart",f,jt)}},[]);var m=e.removeScrollBar,b=e.inert;return l.createElement(l.Fragment,null,b?l.createElement(s,{styles:Bh(o)}):null,m?l.createElement(Nh,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Vh(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const qh=yh(zi,Hh);var yr=l.forwardRef(function(e,t){return l.createElement(vr,Ke({},e,{ref:t,sideCar:qh}))});yr.classNames=vr.classNames;var Wh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kt=new WeakMap,Bn=new WeakMap,Un={},Zr=0,Qi=function(e){return e&&(e.host||Qi(e.parentNode))},zh=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Qi(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})},Gh=function(e,t,n,r){var o=zh(t,Array.isArray(e)?e:[e]);Un[n]||(Un[n]=new WeakMap);var s=Un[n],i=[],a=new Set,c=new Set(o),d=function(u){!u||a.has(u)||(a.add(u),d(u.parentNode))};o.forEach(d);var f=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(h){if(a.has(h))f(h);else try{var m=h.getAttribute(r),b=m!==null&&m!=="false",g=(kt.get(h)||0)+1,y=(s.get(h)||0)+1;kt.set(h,g),s.set(h,y),i.push(h),g===1&&b&&Bn.set(h,!0),y===1&&h.setAttribute(n,"true"),b||h.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return f(t),a.clear(),Zr++,function(){i.forEach(function(u){var h=kt.get(u)-1,m=s.get(u)-1;kt.set(u,h),s.set(u,m),h||(Bn.has(u)||u.removeAttribute(r),Bn.delete(u)),m||u.removeAttribute(n)}),Zr--,Zr||(kt=new WeakMap,kt=new WeakMap,Bn=new WeakMap,Un={})}},os=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Wh(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Gh(r,o,n,"aria-hidden")):function(){return null}},br="Dialog",[Xi,Ji]=Xe(br),[Kh,We]=Xi(br),ec=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=l.useRef(null),c=l.useRef(null),[d,f]=nt({prop:r,defaultProp:o??!1,onChange:s,caller:br});return p.jsx(Kh,{scope:t,triggerRef:a,contentRef:c,contentId:Ze(),titleId:Ze(),descriptionId:Ze(),open:d,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(u=>!u),[f]),modal:i,children:n})};ec.displayName=br;var tc="DialogTrigger",nc=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=We(tc,n),s=se(t,o.triggerRef);return p.jsx(oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":is(o.open),...r,ref:s,onClick:W(e.onClick,o.onOpenToggle)})});nc.displayName=tc;var ss="DialogPortal",[Zh,rc]=Xi(ss,{forceMount:void 0}),oc=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=We(ss,t);return p.jsx(Zh,{scope:t,forceMount:n,children:l.Children.map(r,i=>p.jsx(Je,{present:n||s.open,children:p.jsx(Sn,{asChild:!0,container:o,children:i})}))})};oc.displayName=ss;var nr="DialogOverlay",sc=l.forwardRef((e,t)=>{const n=rc(nr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=We(nr,e.__scopeDialog);return s.modal?p.jsx(Je,{present:r||s.open,children:p.jsx(Qh,{...o,ref:t})}):null});sc.displayName=nr;var Yh=Kt("DialogOverlay.RemoveScroll"),Qh=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=We(nr,n);return p.jsx(yr,{as:Yh,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(oe.div,{"data-state":is(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),St="DialogContent",ac=l.forwardRef((e,t)=>{const n=rc(St,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=We(St,e.__scopeDialog);return p.jsx(Je,{present:r||s.open,children:s.modal?p.jsx(Xh,{...o,ref:t}):p.jsx(Jh,{...o,ref:t})})});ac.displayName=St;var Xh=l.forwardRef((e,t)=>{const n=We(St,e.__scopeDialog),r=l.useRef(null),o=se(t,n.contentRef,r);return l.useEffect(()=>{const s=r.current;if(s)return os(s)},[]),p.jsx(ic,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:W(e.onFocusOutside,s=>s.preventDefault())})}),Jh=l.forwardRef((e,t)=>{const n=We(St,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return p.jsx(ic,{...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 i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ic=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=We(St,n),c=l.useRef(null),d=se(t,c);return rs(),p.jsxs(p.Fragment,{children:[p.jsx(gr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(En,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":is(a.open),...i,ref:d,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(tm,{titleId:a.titleId}),p.jsx(rm,{contentRef:c,descriptionId:a.descriptionId})]})]})}),as="DialogTitle",cc=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=We(as,n);return p.jsx(oe.h2,{id:o.titleId,...r,ref:t})});cc.displayName=as;var lc="DialogDescription",uc=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=We(lc,n);return p.jsx(oe.p,{id:o.descriptionId,...r,ref:t})});uc.displayName=lc;var dc="DialogClose",fc=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=We(dc,n);return p.jsx(oe.button,{type:"button",...r,ref:t,onClick:W(e.onClick,()=>o.onOpenChange(!1))})});fc.displayName=dc;function is(e){return e?"open":"closed"}var pc="DialogTitleWarning",[em,hc]=Mp(pc,{contentName:St,titleName:as,docsSlug:"dialog"}),tm=({titleId:e})=>{const t=hc(pc),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
-
43
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
-
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},nm="DialogDescriptionWarning",rm=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${hc(nm).contentName}}.`;return l.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},mc=ec,om=nc,gc=oc,vc=sc,yc=ac,bc=cc,xc=uc,cs=fc,wc="AlertDialog",[sm]=Xe(wc,[Ji]),rt=Ji(),Ec=e=>{const{__scopeAlertDialog:t,...n}=e,r=rt(t);return p.jsx(mc,{...r,...n,modal:!0})};Ec.displayName=wc;var am="AlertDialogTrigger",im=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(om,{...o,...r,ref:t})});im.displayName=am;var cm="AlertDialogPortal",Sc=e=>{const{__scopeAlertDialog:t,...n}=e,r=rt(t);return p.jsx(gc,{...r,...n})};Sc.displayName=cm;var lm="AlertDialogOverlay",Cc=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(vc,{...o,...r,ref:t})});Cc.displayName=lm;var qt="AlertDialogContent",[um,dm]=sm(qt),fm=$i("AlertDialogContent"),Tc=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,s=rt(n),i=l.useRef(null),a=se(t,i),c=l.useRef(null);return p.jsx(em,{contentName:qt,titleName:Rc,docsSlug:"alert-dialog",children:p.jsx(um,{scope:n,cancelRef:c,children:p.jsxs(yc,{role:"alertdialog",...s,...o,ref:a,onOpenAutoFocus:W(o.onOpenAutoFocus,d=>{d.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[p.jsx(fm,{children:r}),p.jsx(hm,{contentRef:i})]})})})});Tc.displayName=qt;var Rc="AlertDialogTitle",Pc=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(bc,{...o,...r,ref:t})});Pc.displayName=Rc;var Ac="AlertDialogDescription",Oc=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(xc,{...o,...r,ref:t})});Oc.displayName=Ac;var pm="AlertDialogAction",_c=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=rt(n);return p.jsx(cs,{...o,...r,ref:t})});_c.displayName=pm;var Nc="AlertDialogCancel",Mc=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=dm(Nc,n),s=rt(n),i=se(t,o);return p.jsx(cs,{...s,...r,ref:i})});Mc.displayName=Nc;var hm=({contentRef:e})=>{const t=`\`${qt}\` requires a description for the component to be accessible for screen reader users.
46
-
47
- You can add a description to the \`${qt}\` by passing a \`${Ac}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
48
-
49
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${qt}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
50
-
51
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return l.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},mm=Ec,gm=Sc,vm=Cc,ym=Tc,bm=_c,xm=Mc,wm=Pc,Em=Oc,Ic=mm,Dc=gm,jc=vm,Lc=ym,Sm=xm,kc=bm,Fc=wm,$c=Em,Yr={exports:{}};var Ca;function Cm(){return Ca||(Ca=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(s=o(s,r(a)))}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 i="";for(var a in s)t.call(s,a)&&s[a]&&(i=o(i,a));return i}function o(s,i){return i?s?s+" "+i:s+i:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Yr)),Yr.exports}var Tm=Cm();const pe=Xt(Tm);var Rm=Symbol.for("react.lazy"),rr=fr[" use ".trim().toString()];function Pm(e){return typeof e=="object"&&e!==null&&"then"in e}function Bc(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Rm&&"_payload"in e&&Pm(e._payload)}function Am(e){const t=_m(e),n=l.forwardRef((r,o)=>{let{children:s,...i}=r;Bc(s)&&typeof rr=="function"&&(s=rr(s._payload));const a=l.Children.toArray(s),c=a.find(Mm);if(c){const d=c.props.children,f=a.map(u=>u===c?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:u);return p.jsx(t,{...i,ref:o,children:l.isValidElement(d)?l.cloneElement(d,void 0,f):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Om=Am("Slot");function _m(e){const t=l.forwardRef((n,r)=>{let{children:o,...s}=n;if(Bc(o)&&typeof rr=="function"&&(o=rr(o._payload)),l.isValidElement(o)){const i=Dm(o),a=Im(s,o.props);return o.type!==l.Fragment&&(a.ref=r?wn(r,i):i),l.cloneElement(o,a)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Nm=Symbol("radix.slottable");function Mm(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Nm}function Im(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]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Dm(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 jm=new Map([["bold",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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"}))]]),Lm=new Map([["bold",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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"}))]]),km=new Map([["bold",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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"}))]]),Fm=new Map([["bold",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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"}),l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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"}))]]),$m=new Map([["bold",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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"}))]]),Bm=new Map([["bold",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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"}),l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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",l.createElement(l.Fragment,null,l.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"}))]]),Um=l.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),At=l.forwardRef((e,t)=>{const{alt:n,color:r,size:o,weight:s,mirrored:i,children:a,weights:c,...d}=e,{color:f="currentColor",size:u,weight:h="regular",mirrored:m=!1,...b}=l.useContext(Um);return l.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:o??u,height:o??u,fill:r??f,viewBox:"0 0 256 256",transform:i||m?"scale(-1, 1)":void 0,...b,...d},!!n&&l.createElement("title",null,n),a,c.get(s??h))});At.displayName="IconBase";const Uc=l.forwardRef((e,t)=>l.createElement(At,{ref:t,...e,weights:jm}));Uc.displayName="CaretDownIcon";const Hm=Uc,Hc=l.forwardRef((e,t)=>l.createElement(At,{ref:t,...e,weights:Lm}));Hc.displayName="CaretLeftIcon";const Qr=Hc,Vc=l.forwardRef((e,t)=>l.createElement(At,{ref:t,...e,weights:km}));Vc.displayName="CaretRightIcon";const Xr=Vc,qc=l.forwardRef((e,t)=>l.createElement(At,{ref:t,...e,weights:Fm}));qc.displayName="CheckIcon";const Vm=qc,Wc=l.forwardRef((e,t)=>l.createElement(At,{ref:t,...e,weights:$m}));Wc.displayName="SpinnerIcon";const qm=Wc,zc=l.forwardRef((e,t)=>l.createElement(At,{ref:t,...e,weights:Bm}));zc.displayName="XIcon";const Wm=zc,Ta=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ra=Jd,Ae=(e,t)=>n=>{var r;if(t?.variants==null)return Ra(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(d=>{const f=n?.[d],u=s?.[d];if(f===null)return null;const h=Ta(f)||Ta(u);return o[d][h]}),a=n&&Object.entries(n).reduce((d,f)=>{let[u,h]=f;return h===void 0||(d[u]=h),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:u,className:h,...m}=f;return Object.entries(m).every(b=>{let[g,y]=b;return Array.isArray(y)?y.includes({...s,...a}[g]):{...s,...a}[g]===y})?[...d,u,h]:d},[]);return Ra(e,i,c,n?.class,n?.className)},zm=Ae(["inline-flex","items-center","justify-center","gap-2","whitespace-nowrap","select-none","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"}}),it=l.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isLoading:o,children:s,disabled:i,...a},c)=>{const d=r?Om:"button";return p.jsx(d,{ref:c,className:zm({variant:t,size:n,className:e}),disabled:i||o,"aria-busy":o||void 0,...a,children:o?p.jsxs(p.Fragment,{children:[p.jsx(qm,{className:"animate-spin h-4 w-4"}),s]}):s})});it.displayName="Button";const ls=Ae(["relative","pointer-events-auto","flex","min-h-0","w-full","flex-col","overflow-hidden","border","border-border-subtle","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-h-[calc(100dvh-0.75rem)] max-w-none rounded-t-[20px] rounded-b-none border-b-0 bg-elevated shadow-[0_24px_64px_-32px_rgba(15,18,24,0.36)] sm:max-h-[calc(100dvh-2rem)] sm:max-w-[640px] sm:rounded-[20px] sm:border-b",compact:"max-h-[calc(100dvh-0.75rem)] max-w-none rounded-t-[18px] rounded-b-none border-b-0 bg-surface shadow-[0_18px_44px_-28px_rgba(15,18,24,0.28)] sm:max-h-[calc(100dvh-2rem)] sm:max-w-[480px] sm:rounded-[18px] sm:border-b",form:"max-h-[calc(100dvh-0.75rem)] max-w-none rounded-t-[20px] rounded-b-none border-b-0 bg-elevated shadow-[0_22px_56px_-30px_rgba(15,18,24,0.32)] sm:max-h-[calc(100dvh-2rem)] sm:max-w-[560px] sm:rounded-[20px] sm:border-b",inspect:"max-h-[calc(100dvh-0.75rem)] max-w-none rounded-t-[20px] rounded-b-none border-b-0 bg-elevated shadow-[0_24px_64px_-30px_rgba(15,18,24,0.34)] sm:max-h-[calc(100dvh-2rem)] sm:max-w-[640px] sm:rounded-[20px] sm:border-b",confirm:"max-h-[calc(100dvh-0.75rem)] max-w-none rounded-t-[18px] rounded-b-none border-b-0 bg-surface shadow-[0_16px_36px_-24px_rgba(15,18,24,0.24)] sm:max-h-[calc(100dvh-2rem)] sm:max-w-[336px] sm:rounded-[18px] sm:border-b"}},defaultVariants:{variant:"default"}}),Gm=Ae(["flex","shrink-0","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"}}),us=Ae("min-h-0 flex-1 overflow-y-auto overscroll-contain",{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"}}),ds=Ae(["flex","shrink-0","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"}}),Km=Ae(["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"}}),fs=Ae("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"}}),ps=Ae("text-fg-secondary",{variants:{variant:{default:"text-meta",compact:"text-meta",form:"text-meta",inspect:"text-meta",confirm:"text-meta"}},defaultVariants:{variant:"default"}}),Zm=Ae("",{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 $e({as:e="span",className:t,variant:n,weight:r,tone:o,tracking:s,transform:i,truncate:a,children:c,...d}){const f=e;return p.jsx(f,{className:Zm({variant:n,weight:r,tone:o,tracking:s,transform:i,truncate:a,className:t}),...d,children:c})}const Gc=pe("fixed","inset-0","z-[1090]","bg-overlay","backdrop-blur-[2px]","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0"),Ym=({open:e,options:t,onClose:n})=>p.jsx(Ic,{open:e,onOpenChange:r=>{!r&&t.dismissible&&n()},children:p.jsxs(Dc,{children:[p.jsx(jc,{className:Gc}),p.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-end justify-center p-0 sm:items-center sm:p-4",children:p.jsxs(Lc,{className:ls({variant:"confirm"}),children:[p.jsxs("div",{className:us({variant:"confirm"}),children:[p.jsx(Fc,{className:fs({variant:"confirm"}),children:t.title}),t.description?p.jsx($c,{className:ps({variant:"confirm"}),children:t.description}):null]}),p.jsx("div",{className:ds({variant:"confirm"}),children:p.jsx(kc,{asChild:!0,children:p.jsx(it,{size:"sm",onClick:n,children:t.confirmLabel})})})]})})]})}),Qm=({open:e,options:t,onCancel:n,onConfirm:r})=>p.jsx(Ic,{open:e,onOpenChange:o=>{!o&&t.dismissible&&n()},children:p.jsxs(Dc,{children:[p.jsx(jc,{className:Gc}),p.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-end justify-center p-0 sm:items-center sm:p-4",children:p.jsxs(Lc,{className:ls({variant:"confirm"}),children:[p.jsxs("div",{className:us({variant:"confirm"}),children:[p.jsx(Fc,{className:fs({variant:"confirm"}),children:t.title}),t.description?p.jsx($c,{className:ps({variant:"confirm"}),children:p.jsx($e,{as:"span",variant:"meta",tone:"secondary",children:t.description})}):null]}),p.jsxs("div",{className:ds({variant:"confirm"}),children:[p.jsx(Sm,{asChild:!0,children:p.jsx(it,{variant:"ghost",size:"sm",onClick:n,children:t.cancelLabel})}),p.jsx(kc,{asChild:!0,children:p.jsx(it,{variant:t.tone==="danger"?"danger":"primary",size:"sm",onClick:r,children:t.confirmLabel})})]})]})})]})});function pE({children:e}){return p.jsx(Np,{components:{Alert:Ym,Confirm:Qm},children:e})}function Xm(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Jm=e=>{switch(e){case"success":return ng;case"info":return og;case"warning":return rg;case"error":return sg;default:return null}},eg=Array(12).fill(0),tg=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},eg.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),ng=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),rg=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),og=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),sg=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),ag=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ig=()=>{const[e,t]=R.useState(document.hidden);return R.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let To=1;class cg{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:To++,i=this.toasts.find(c=>c.id===s),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:a,title:r}):c):this.addToast({title:r,...o,dismissible:a,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,i;const a=o.then(async d=>{if(i=["resolve",d],R.isValidElement(d))s=!1,this.create({id:r,type:"default",message:d});else if(ug(d)&&!d.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,b=typeof u=="object"&&!R.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:h,...b})}else if(d instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(d):n.error,h=typeof n.description=="function"?await n.description(d):n.description,b=typeof u=="object"&&!R.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:h,...b})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(d):n.success,h=typeof n.description=="function"?await n.description(d):n.description,b=typeof u=="object"&&!R.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:h,...b})}}).catch(async d=>{if(i=["reject",d],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(d):n.error,u=typeof n.description=="function"?await n.description(d):n.description,m=typeof f=="object"&&!R.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:u,...m})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,f)=>a.then(()=>i[0]==="reject"?f(i[1]):d(i[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=n?.id||To++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Me=new cg,lg=(e,t)=>{const n=t?.id||To++;return Me.addToast({title:e,...t,id:n}),n},ug=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",dg=lg,fg=()=>Me.toasts,pg=()=>Me.getActiveToasts(),hg=Object.assign(dg,{success:Me.success,info:Me.info,warning:Me.warning,error:Me.error,custom:Me.custom,message:Me.message,promise:Me.promise,dismiss:Me.dismiss,loading:Me.loading},{getHistory:fg,getToasts:pg});Xm("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Hn(e){return e.label!==void 0}const mg=3,gg="24px",vg="16px",Pa=4e3,yg=356,bg=14,xg=45,wg=200;function Ge(...e){return e.filter(Boolean).join(" ")}function Eg(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Sg=e=>{var t,n,r,o,s,i,a,c,d;const{invert:f,toast:u,unstyled:h,interacting:m,setHeights:b,visibleToasts:g,heights:y,index:v,toasts:x,expanded:w,removeToast:S,defaultRichColors:T,closeButton:_,style:P,cancelButtonStyle:M,actionButtonStyle:$,className:k="",descriptionClassName:j="",duration:K,position:Z,gap:L,expandByDefault:N,classNames:C,icons:I,closeButtonAriaLabel:O="Close toast"}=e,[A,F]=R.useState(null),[U,X]=R.useState(null),[B,z]=R.useState(!1),[G,q]=R.useState(!1),[D,V]=R.useState(!1),[re,Y]=R.useState(!1),[ee,J]=R.useState(!1),[ce,ve]=R.useState(0),[xe,Q]=R.useState(0),ie=R.useRef(u.duration||K||Pa),ye=R.useRef(null),he=R.useRef(null),Le=v===0,rn=v+1<=g,me=u.type,et=u.dismissible!==!1,Dr=u.className||"",In=u.descriptionClassName||"",ae=R.useMemo(()=>y.findIndex(ne=>ne.toastId===u.id)||0,[y,u.id]),ge=R.useMemo(()=>{var ne;return(ne=u.closeButton)!=null?ne:_},[u.closeButton,_]),_e=R.useMemo(()=>u.duration||K||Pa,[u.duration,K]),Nt=R.useRef(0),Mt=R.useRef(0),Bs=R.useRef(0),It=R.useRef(null),[Gd,Kd]=Z.split("-"),Us=R.useMemo(()=>y.reduce((ne,be,Ce)=>Ce>=ae?ne:ne+be.height,0),[y,ae]),Hs=ig(),Zd=u.invert||f,jr=me==="loading";Mt.current=R.useMemo(()=>ae*L+Us,[ae,Us]),R.useEffect(()=>{ie.current=_e},[_e]),R.useEffect(()=>{z(!0)},[]),R.useEffect(()=>{const ne=he.current;if(ne){const be=ne.getBoundingClientRect().height;return Q(be),b(Ce=>[{toastId:u.id,height:be,position:u.position},...Ce]),()=>b(Ce=>Ce.filter(je=>je.toastId!==u.id))}},[b,u.id]),R.useLayoutEffect(()=>{if(!B)return;const ne=he.current,be=ne.style.height;ne.style.height="auto";const Ce=ne.getBoundingClientRect().height;ne.style.height=be,Q(Ce),b(je=>je.find(we=>we.toastId===u.id)?je.map(we=>we.toastId===u.id?{...we,height:Ce}:we):[{toastId:u.id,height:Ce,position:u.position},...je])},[B,u.title,u.description,b,u.id,u.jsx,u.action,u.cancel]);const ot=R.useCallback(()=>{q(!0),ve(Mt.current),b(ne=>ne.filter(be=>be.toastId!==u.id)),setTimeout(()=>{S(u)},wg)},[u,S,b,Mt]);R.useEffect(()=>{if(u.promise&&me==="loading"||u.duration===1/0||u.type==="loading")return;let ne;return w||m||Hs?(()=>{if(Bs.current<Nt.current){const je=new Date().getTime()-Nt.current;ie.current=ie.current-je}Bs.current=new Date().getTime()})():ie.current!==1/0&&(Nt.current=new Date().getTime(),ne=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),ot()},ie.current)),()=>clearTimeout(ne)},[w,m,u,me,Hs,ot]),R.useEffect(()=>{u.delete&&(ot(),u.onDismiss==null||u.onDismiss.call(u,u))},[ot,u.delete]);function Yd(){var ne;if(I?.loading){var be;return R.createElement("div",{className:Ge(C?.loader,u==null||(be=u.classNames)==null?void 0:be.loader,"sonner-loader"),"data-visible":me==="loading"},I.loading)}return R.createElement(tg,{className:Ge(C?.loader,u==null||(ne=u.classNames)==null?void 0:ne.loader),visible:me==="loading"})}const Qd=u.icon||I?.[me]||Jm(me);var Vs,qs;return R.createElement("li",{tabIndex:0,ref:he,className:Ge(k,Dr,C?.toast,u==null||(t=u.classNames)==null?void 0:t.toast,C?.default,C?.[me],u==null||(n=u.classNames)==null?void 0:n[me]),"data-sonner-toast":"","data-rich-colors":(Vs=u.richColors)!=null?Vs:T,"data-styled":!(u.jsx||u.unstyled||h),"data-mounted":B,"data-promise":!!u.promise,"data-swiped":ee,"data-removed":G,"data-visible":rn,"data-y-position":Gd,"data-x-position":Kd,"data-index":v,"data-front":Le,"data-swiping":D,"data-dismissible":et,"data-type":me,"data-invert":Zd,"data-swipe-out":re,"data-swipe-direction":U,"data-expanded":!!(w||N&&B),"data-testid":u.testId,style:{"--index":v,"--toasts-before":v,"--z-index":x.length-v,"--offset":`${G?ce:Mt.current}px`,"--initial-height":N?"auto":`${xe}px`,...P,...u.style},onDragEnd:()=>{V(!1),F(null),It.current=null},onPointerDown:ne=>{ne.button!==2&&(jr||!et||(ye.current=new Date,ve(Mt.current),ne.target.setPointerCapture(ne.pointerId),ne.target.tagName!=="BUTTON"&&(V(!0),It.current={x:ne.clientX,y:ne.clientY})))},onPointerUp:()=>{var ne,be,Ce;if(re||!et)return;It.current=null;const je=Number(((ne=he.current)==null?void 0:ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Dn=Number(((be=he.current)==null?void 0:be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),we=new Date().getTime()-((Ce=ye.current)==null?void 0:Ce.getTime()),ke=A==="x"?je:Dn,jn=Math.abs(ke)/we;if(Math.abs(ke)>=xg||jn>.11){ve(Mt.current),u.onDismiss==null||u.onDismiss.call(u,u),X(A==="x"?je>0?"right":"left":Dn>0?"down":"up"),ot(),Y(!0);return}else{var Ue,He;(Ue=he.current)==null||Ue.style.setProperty("--swipe-amount-x","0px"),(He=he.current)==null||He.style.setProperty("--swipe-amount-y","0px")}J(!1),V(!1),F(null)},onPointerMove:ne=>{var be,Ce,je;if(!It.current||!et||((be=window.getSelection())==null?void 0:be.toString().length)>0)return;const we=ne.clientY-It.current.y,ke=ne.clientX-It.current.x;var jn;const Ue=(jn=e.swipeDirections)!=null?jn:Eg(Z);!A&&(Math.abs(ke)>1||Math.abs(we)>1)&&F(Math.abs(ke)>Math.abs(we)?"x":"y");let He={x:0,y:0};const Ws=ft=>1/(1.5+Math.abs(ft)/20);if(A==="y"){if(Ue.includes("top")||Ue.includes("bottom"))if(Ue.includes("top")&&we<0||Ue.includes("bottom")&&we>0)He.y=we;else{const ft=we*Ws(we);He.y=Math.abs(ft)<Math.abs(we)?ft:we}}else if(A==="x"&&(Ue.includes("left")||Ue.includes("right")))if(Ue.includes("left")&&ke<0||Ue.includes("right")&&ke>0)He.x=ke;else{const ft=ke*Ws(ke);He.x=Math.abs(ft)<Math.abs(ke)?ft:ke}(Math.abs(He.x)>0||Math.abs(He.y)>0)&&J(!0),(Ce=he.current)==null||Ce.style.setProperty("--swipe-amount-x",`${He.x}px`),(je=he.current)==null||je.style.setProperty("--swipe-amount-y",`${He.y}px`)}},ge&&!u.jsx&&me!=="loading"?R.createElement("button",{"aria-label":O,"data-disabled":jr,"data-close-button":!0,onClick:jr||!et?()=>{}:()=>{ot(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Ge(C?.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(qs=I?.close)!=null?qs:ag):null,(me||u.icon||u.promise)&&u.icon!==null&&(I?.[me]!==null||u.icon)?R.createElement("div",{"data-icon":"",className:Ge(C?.icon,u==null||(o=u.classNames)==null?void 0:o.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||Yd():null,u.type!=="loading"?Qd:null):null,R.createElement("div",{"data-content":"",className:Ge(C?.content,u==null||(s=u.classNames)==null?void 0:s.content)},R.createElement("div",{"data-title":"",className:Ge(C?.title,u==null||(i=u.classNames)==null?void 0:i.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?R.createElement("div",{"data-description":"",className:Ge(j,In,C?.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),R.isValidElement(u.cancel)?u.cancel:u.cancel&&Hn(u.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||M,onClick:ne=>{Hn(u.cancel)&&et&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,ne),ot())},className:Ge(C?.cancelButton,u==null||(c=u.classNames)==null?void 0:c.cancelButton)},u.cancel.label):null,R.isValidElement(u.action)?u.action:u.action&&Hn(u.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||$,onClick:ne=>{Hn(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,ne),!ne.defaultPrevented&&ot())},className:Ge(C?.actionButton,u==null||(d=u.classNames)==null?void 0:d.actionButton)},u.action.label):null)};function Aa(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Cg(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",a=s?vg:gg;function c(d){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${i}-${d}`]=a:n[`${i}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(a)}),n}const Tg=R.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:c,className:d,offset:f,mobileOffset:u,theme:h="light",richColors:m,duration:b,style:g,visibleToasts:y=mg,toastOptions:v,dir:x=Aa(),gap:w=bg,icons:S,containerAriaLabel:T="Notifications"}=t,[_,P]=R.useState([]),M=R.useMemo(()=>r?_.filter(B=>B.toasterId===r):_.filter(B=>!B.toasterId),[_,r]),$=R.useMemo(()=>Array.from(new Set([s].concat(M.filter(B=>B.position).map(B=>B.position)))),[M,s]),[k,j]=R.useState([]),[K,Z]=R.useState(!1),[L,N]=R.useState(!1),[C,I]=R.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),O=R.useRef(null),A=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=R.useRef(null),U=R.useRef(!1),X=R.useCallback(B=>{P(z=>{var G;return(G=z.find(q=>q.id===B.id))!=null&&G.delete||Me.dismiss(B.id),z.filter(({id:q})=>q!==B.id)})},[]);return R.useEffect(()=>Me.subscribe(B=>{if(B.dismiss){requestAnimationFrame(()=>{P(z=>z.map(G=>G.id===B.id?{...G,delete:!0}:G))});return}setTimeout(()=>{pi.flushSync(()=>{P(z=>{const G=z.findIndex(q=>q.id===B.id);return G!==-1?[...z.slice(0,G),{...z[G],...B},...z.slice(G+1)]:[B,...z]})})})}),[_]),R.useEffect(()=>{if(h!=="system"){I(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?I("dark"):I("light")),typeof window>"u")return;const B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:z})=>{I(z?"dark":"light")})}catch{B.addListener(({matches:G})=>{try{I(G?"dark":"light")}catch(q){console.error(q)}})}},[h]),R.useEffect(()=>{_.length<=1&&Z(!1)},[_]),R.useEffect(()=>{const B=z=>{var G;if(i.every(V=>z[V]||z.code===V)){var D;Z(!0),(D=O.current)==null||D.focus()}z.code==="Escape"&&(document.activeElement===O.current||(G=O.current)!=null&&G.contains(document.activeElement))&&Z(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[i]),R.useEffect(()=>{if(O.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,U.current=!1)}},[O.current]),R.createElement("section",{ref:n,"aria-label":`${T} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},$.map((B,z)=>{var G;const[q,D]=B.split("-");return M.length?R.createElement("ol",{key:B,dir:x==="auto"?Aa():x,tabIndex:-1,ref:O,className:d,"data-sonner-toaster":!0,"data-sonner-theme":C,"data-y-position":q,"data-x-position":D,style:{"--front-toast-height":`${((G=k[0])==null?void 0:G.height)||0}px`,"--width":`${yg}px`,"--gap":`${w}px`,...g,...Cg(f,u)},onBlur:V=>{U.current&&!V.currentTarget.contains(V.relatedTarget)&&(U.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||U.current||(U.current=!0,F.current=V.relatedTarget)},onMouseEnter:()=>Z(!0),onMouseMove:()=>Z(!0),onMouseLeave:()=>{L||Z(!1)},onDragEnd:()=>Z(!1),onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||N(!0)},onPointerUp:()=>N(!1)},M.filter(V=>!V.position&&z===0||V.position===B).map((V,re)=>{var Y,ee;return R.createElement(Sg,{key:V.id,icons:S,index:re,toast:V,defaultRichColors:m,duration:(Y=v?.duration)!=null?Y:b,className:v?.className,descriptionClassName:v?.descriptionClassName,invert:o,visibleToasts:y,closeButton:(ee=v?.closeButton)!=null?ee:c,interacting:L,position:B,style:v?.style,unstyled:v?.unstyled,classNames:v?.classNames,cancelButtonStyle:v?.cancelButtonStyle,actionButtonStyle:v?.actionButtonStyle,closeButtonAriaLabel:v?.closeButtonAriaLabel,removeToast:X,toasts:M.filter(J=>J.position==V.position),heights:k.filter(J=>J.position==V.position),setHeights:j,expandByDefault:a,gap:w,expanded:K,swipeDirections:t.swipeDirections})})):null}))});var Ft=(e,t)=>({...e,...t}),Rg=(e,t)=>Object.assign((n,r)=>e(n,Ft(t,r)),{success:(n,r)=>e.success(n,Ft(t,r)),error:(n,r)=>e.error(n,Ft(t,r)),info:(n,r)=>e.info(n,Ft(t,r)),warning:(n,r)=>e.warning(n,Ft(t,r)),loading:(n,r)=>e.loading(n,Ft(t,r)),dismiss:n=>e.dismiss(n)}),Kc=(e={})=>Rg(hg,e);Kc();var Pg=e=>p.jsx(Tg,{...e});const Ag=Kc({duration:3e3});function hE({children:e}){return p.jsxs(p.Fragment,{children:[e,p.jsx(Pg,{position:"bottom-center",expand:!1,visibleToasts:3,toastOptions:{duration:3e3,classNames:{toast:"surface-floating max-w-[min(420px,calc(100vw-32px))] whitespace-normal break-words px-5 py-3 text-sm font-medium text-fg-secondary shadow-sm",title:"text-sm font-medium text-fg-secondary"}}})]})}function mE(){return Ag}const gE=new hp({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});function Zc(e,t){return function(){return e.apply(t,arguments)}}const{toString:Og}=Object.prototype,{getPrototypeOf:Zt}=Object,{iterator:Cn,toStringTag:Yc}=Symbol,or=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),mn=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),or(n,t))return!0;n=Zt(n)}return!1},_g=(e,t)=>e!=null&&mn(e,t)?e[t]:void 0,hs=(e=>t=>{const n=Og.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ze=e=>(e=e.toLowerCase(),t=>hs(t)===e),xr=e=>t=>typeof t===e,{isArray:Ct}=Array,Yt=xr("undefined");function Jt(e){return e!==null&&!Yt(e)&&e.constructor!==null&&!Yt(e.constructor)&&De(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Qc=ze("ArrayBuffer");function Ng(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Qc(e.buffer),t}const Mg=xr("string"),De=xr("function"),Xc=xr("number"),en=e=>e!==null&&typeof e=="object",Ig=e=>e===!0||e===!1,Kn=e=>{if(!en(e))return!1;const t=Zt(e);return(t===null||t===Object.prototype||Zt(t)===null)&&!mn(e,Yc)&&!mn(e,Cn)},Dg=e=>{if(!en(e)||Jt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},jg=ze("Date"),Lg=ze("File"),kg=e=>!!(e&&typeof e.uri<"u"),Fg=e=>e&&typeof e.getParts<"u",$g=ze("Blob"),Bg=ze("FileList"),Ug=e=>en(e)&&De(e.pipe);function Hg(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Oa=Hg(),_a=typeof Oa.FormData<"u"?Oa.FormData:void 0,Vg=e=>{if(!e)return!1;if(_a&&e instanceof _a)return!0;const t=Zt(e);if(!t||t===Object.prototype||!De(e.append))return!1;const n=hs(e);return n==="formdata"||n==="object"&&De(e.toString)&&e.toString()==="[object FormData]"},qg=ze("URLSearchParams"),[Wg,zg,Gg,Kg]=["ReadableStream","Request","Response","Headers"].map(ze),Zg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Tn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Ct(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Jt(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(r=0;r<i;r++)a=s[r],t.call(null,e[a],a,e)}}function Jc(e,t){if(Jt(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 vt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,el=e=>!Yt(e)&&e!==vt;function Ro(...e){const{caseless:t,skipUndefined:n}=el(this)&&this||{},r={},o=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=t&&typeof i=="string"&&Jc(r,i)||i,c=or(r,a)?r[a]:void 0;Kn(c)&&Kn(s)?r[a]=Ro(c,s):Kn(s)?r[a]=Ro({},s):Ct(s)?r[a]=s.slice():(!n||!Yt(s))&&(r[a]=s)};for(let s=0,i=e.length;s<i;s++){const a=e[s];if(!a||Jt(a)||(Tn(a,o),typeof a!="object"||Ct(a)))continue;const c=Object.getOwnPropertySymbols(a);for(let d=0;d<c.length;d++){const f=c[d];iv.call(a,f)&&o(a[f],f)}}return r}const Yg=(e,t,n,{allOwnKeys:r}={})=>(Tn(t,(o,s)=>{n&&De(o)?Object.defineProperty(e,s,{__proto__:null,value:Zc(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Qg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Xg=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Jg=(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&Zt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ev=(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},tv=e=>{if(!e)return null;if(Ct(e))return e;let t=e.length;if(!Xc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},nv=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zt(Uint8Array)),rv=(e,t)=>{const r=(e&&e[Cn]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},ov=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sv=ze("HTMLFormElement"),av=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:iv}=Object.prototype,cv=ze("RegExp"),tl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Tn(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},lv=e=>{tl(e,(t,n)=>{if(De(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(De(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+"'")})}})},uv=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Ct(e)?r(e):r(String(e).split(t)),n},dv=()=>{},fv=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function pv(e){return!!(e&&De(e.append)&&e[Yc]==="FormData"&&e[Cn])}const hv=e=>{const t=new WeakSet,n=r=>{if(en(r)){if(t.has(r))return;if(Jt(r))return r;if(!("toJSON"in r)){t.add(r);const o=Ct(r)?[]:{};return Tn(r,(s,i)=>{const a=n(s);!Yt(a)&&(o[i]=a)}),t.delete(r),o}}return r};return n(e)},mv=ze("AsyncFunction"),gv=e=>e&&(en(e)||De(e))&&De(e.then)&&De(e.catch),nl=((e,t)=>e?setImmediate:t?((n,r)=>(vt.addEventListener("message",({source:o,data:s})=>{o===vt&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),vt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",De(vt.postMessage)),vv=typeof queueMicrotask<"u"?queueMicrotask.bind(vt):typeof process<"u"&&process.nextTick||nl,rl=e=>e!=null&&De(e[Cn]),yv=e=>e!=null&&mn(e,Cn)&&rl(e),E={isArray:Ct,isArrayBuffer:Qc,isBuffer:Jt,isFormData:Vg,isArrayBufferView:Ng,isString:Mg,isNumber:Xc,isBoolean:Ig,isObject:en,isPlainObject:Kn,isEmptyObject:Dg,isReadableStream:Wg,isRequest:zg,isResponse:Gg,isHeaders:Kg,isUndefined:Yt,isDate:jg,isFile:Lg,isReactNativeBlob:kg,isReactNative:Fg,isBlob:$g,isRegExp:cv,isFunction:De,isStream:Ug,isURLSearchParams:qg,isTypedArray:nv,isFileList:Bg,forEach:Tn,merge:Ro,extend:Yg,trim:Zg,stripBOM:Qg,inherits:Xg,toFlatObject:Jg,kindOf:hs,kindOfTest:ze,endsWith:ev,toArray:tv,forEachEntry:rv,matchAll:ov,isHTMLForm:sv,hasOwnProperty:or,hasOwnProp:or,hasOwnInPrototypeChain:mn,getSafeProp:_g,reduceDescriptors:tl,freezeMethods:lv,toObjectSet:uv,toCamelCase:av,noop:dv,toFiniteNumber:fv,findKey:Jc,global:vt,isContextDefined:el,isSpecCompliantForm:pv,toJSONObject:hv,isAsyncFn:mv,isThenable:gv,setImmediate:nl,asap:vv,isIterable:rl,isSafeIterable:yv},bv=E.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"]),xv=e=>{const t={};let n,r,o;return e&&e.split(`
52
- `).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&bv[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function wv(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const Ev=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Sv=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ms(e,t){return E.isArray(e)?e.map(n=>ms(n,t)):wv(String(e).replace(t,""))}const Cv=e=>ms(e,Ev),Tv=e=>ms(e,Sv);function ol(e){const t=Object.create(null);return E.forEach(e.toJSON(),(n,r)=>{t[r]=Tv(n)}),t}const Na=Symbol("internals");function an(e){return e&&String(e).trim().toLowerCase()}function Zn(e){return e===!1||e==null?e:E.isArray(e)?e.map(Zn):Cv(String(e))}function Rv(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 Pv=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Jr(e,t,n,r,o){if(E.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!E.isString(t)){if(E.isString(r))return t.indexOf(r)!==-1;if(E.isRegExp(r))return r.test(t)}}function Av(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ov(e,t){const n=E.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}let Re=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(a,c,d){const f=an(c);if(!f)return;const u=E.findKey(o,f);(!u||o[u]===void 0||d===!0||d===void 0&&o[u]!==!1)&&(o[u||c]=Zn(a))}const i=(a,c)=>E.forEach(a,(d,f)=>s(d,f,c));if(E.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(E.isString(t)&&(t=t.trim())&&!Pv(t))i(xv(t),n);else if(E.isObject(t)&&E.isSafeIterable(t)){let a=Object.create(null),c,d;for(const f of t){if(!E.isArray(f))throw new TypeError("Object iterator must return a key-value pair");d=f[0],E.hasOwnProp(a,d)?(c=a[d],a[d]=E.isArray(c)?[...c,f[1]]:[c,f[1]]):a[d]=f[1]}i(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=an(t),t){const r=E.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Rv(o);if(E.isFunction(n))return n.call(this,o,r);if(E.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=an(t),t){const r=E.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Jr(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=an(i),i){const a=E.findKey(r,i);a&&(!n||Jr(r,r[a],a,n))&&(delete r[a],o=!0)}}return E.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||Jr(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return E.forEach(this,(o,s)=>{const i=E.findKey(r,s);if(i){n[i]=Zn(o),delete n[s];return}const a=t?Av(s):String(s).trim();a!==s&&delete n[s],n[a]=Zn(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return E.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&E.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(`
53
- `)}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[Na]=this[Na]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=an(i);r[a]||(Ov(o,i),r[a]=!0)}return E.isArray(t)?t.forEach(s):s(t),this}};Re.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);E.reduceDescriptors(Re.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});E.freezeMethods(Re);const _v="[REDACTED ****]";function Nv(e){if(E.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(E.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Mv(e,t){const n=new Set(t.map(s=>String(s).toLowerCase())),r=[],o=s=>{if(s===null||typeof s!="object"||E.isBuffer(s))return s;if(r.indexOf(s)!==-1)return;s instanceof Re&&(s=s.toJSON()),r.push(s);let i;if(E.isArray(s))i=[],s.forEach((a,c)=>{const d=o(a);E.isUndefined(d)||(i[c]=d)});else{if(!E.isPlainObject(s)&&Nv(s))return r.pop(),s;i=Object.create(null);for(const[a,c]of Object.entries(s)){const d=n.has(a.toLowerCase())?_v:o(c);E.isUndefined(d)||(i[a]=d)}}return r.pop(),i};return o(e)}let H=class sl extends Error{static from(t,n,r,o,s,i){const a=new sl(t.message,n||t.code,r,o,s);return a.cause=t,a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),i&&Object.assign(a,i),a}constructor(t,n,r,o,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,n=t&&E.hasOwnProp(t,"redact")?t.redact:void 0,r=E.isArray(n)&&n.length>0?Mv(t,n):E.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};H.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";H.ERR_BAD_OPTION="ERR_BAD_OPTION";H.ECONNABORTED="ECONNABORTED";H.ETIMEDOUT="ETIMEDOUT";H.ECONNREFUSED="ECONNREFUSED";H.ERR_NETWORK="ERR_NETWORK";H.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";H.ERR_DEPRECATED="ERR_DEPRECATED";H.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";H.ERR_BAD_REQUEST="ERR_BAD_REQUEST";H.ERR_CANCELED="ERR_CANCELED";H.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";H.ERR_INVALID_URL="ERR_INVALID_URL";H.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Iv=null,al=100;function Po(e){return E.isPlainObject(e)||E.isArray(e)}function il(e){return E.endsWith(e,"[]")?e.slice(0,-2):e}function eo(e,t,n){return e?e.concat(t).map(function(o,s){return o=il(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Dv(e){return E.isArray(e)&&!e.some(Po)}const jv=E.toFlatObject(E,{},null,function(t){return/^is[A-Z]/.test(t)});function wr(e,t,n){if(!E.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=E.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,w){return!E.isUndefined(w[x])});const r=n.metaTokens,o=n.visitor||b,s=n.dots,i=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?al:n.maxDepth,d=a&&E.isSpecCompliantForm(t),f=[];if(!E.isFunction(o))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(E.isDate(v))return v.toISOString();if(E.isBoolean(v))return v.toString();if(!d&&E.isBlob(v))throw new H("Blob is not supported. Use a Buffer instead.");return E.isArrayBuffer(v)||E.isTypedArray(v)?d&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function h(v){if(v>c)throw new H("Object is too deeply nested ("+v+" levels). Max depth: "+c,H.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(v,x){if(c===1/0)return JSON.stringify(v);const w=[];return JSON.stringify(v,function(T,_){if(!E.isObject(_))return _;for(;w.length&&w[w.length-1]!==this;)w.pop();return w.push(_),h(x+w.length-1),_})}function b(v,x,w){let S=v;if(E.isReactNative(t)&&E.isReactNativeBlob(v))return t.append(eo(w,x,s),u(v)),!1;if(v&&!w&&typeof v=="object"){if(E.endsWith(x,"{}"))x=r?x:x.slice(0,-2),v=m(v,1);else if(E.isArray(v)&&Dv(v)||(E.isFileList(v)||E.endsWith(x,"[]"))&&(S=E.toArray(v)))return x=il(x),S.forEach(function(_,P){!(E.isUndefined(_)||_===null)&&t.append(i===!0?eo([x],P,s):i===null?x:x+"[]",u(_))}),!1}return Po(v)?!0:(t.append(eo(w,x,s),u(v)),!1)}const g=Object.assign(jv,{defaultVisitor:b,convertValue:u,isVisitable:Po});function y(v,x,w=0){if(!E.isUndefined(v)){if(h(w),f.indexOf(v)!==-1)throw new Error("Circular reference detected in "+x.join("."));f.push(v),E.forEach(v,function(T,_){(!(E.isUndefined(T)||T===null)&&o.call(t,T,E.isString(_)?_.trim():_,x,g))===!0&&y(T,x?x.concat(_):[_],w+1)}),f.pop()}}if(!E.isObject(e))throw new TypeError("data must be an object");return y(e),t}function Ma(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function gs(e,t){this._pairs=[],e&&wr(e,this,t)}const cl=gs.prototype;cl.append=function(t,n){this._pairs.push([t,n])};cl.toString=function(t){const n=t?function(r){return t.call(this,r,Ma)}:Ma;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Lv(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ll(e,t,n){if(!t)return e;const r=E.isFunction(n)?{serialize:n}:n,o=E.getSafeProp(r,"encode")||Lv,s=E.getSafeProp(r,"serialize");let i;if(s?i=s(t,r):i=E.isURLSearchParams(t)?t.toString():new gs(t,r).toString(o),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ia{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){E.forEach(this.handlers,function(r){r!==null&&t(r)})}}const vs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},kv=typeof URLSearchParams<"u"?URLSearchParams:gs,Fv=typeof FormData<"u"?FormData:null,$v=typeof Blob<"u"?Blob:null,Bv={isBrowser:!0,classes:{URLSearchParams:kv,FormData:Fv,Blob:$v},protocols:["http","https","file","blob","url","data"]},ys=typeof window<"u"&&typeof document<"u",Ao=typeof navigator=="object"&&navigator||void 0,Uv=ys&&(!Ao||["ReactNative","NativeScript","NS"].indexOf(Ao.product)<0),Hv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Vv=ys&&window.location.href||"http://localhost",qv=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ys,hasStandardBrowserEnv:Uv,hasStandardBrowserWebWorkerEnv:Hv,navigator:Ao,origin:Vv},Symbol.toStringTag,{value:"Module"})),Se={...qv,...Bv};function Wv(e,t){return wr(e,new Se.classes.URLSearchParams,{visitor:function(n,r,o,s){return Se.isNode&&E.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const Da=al;function ul(e){if(e>Da)throw new H("FormData field is too deeply nested ("+e+" levels). Max depth: "+Da,H.ERR_FORM_DATA_DEPTH_EXCEEDED)}function zv(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)ul(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Gv(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 dl(e){function t(n,r,o,s){ul(s);let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=s>=n.length;return i=!i&&E.isArray(o)?o.length:i,c?(E.hasOwnProp(o,i)?o[i]=E.isArray(o[i])?o[i].concat(r):[o[i],r]:o[i]=r,!a):((!E.hasOwnProp(o,i)||!E.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&E.isArray(o[i])&&(o[i]=Gv(o[i])),!a)}if(E.isFormData(e)&&E.isFunction(e.entries)){const n={};return E.forEachEntry(e,(r,o)=>{t(zv(r),o,n,0)}),n}return null}const $t=(e,t)=>e!=null&&E.hasOwnProp(e,t)?e[t]:void 0;function Kv(e,t,n){if(E.isString(e))try{return(t||JSON.parse)(e),E.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Rn={transitional:vs,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=E.isObject(t);if(s&&E.isHTMLForm(t)&&(t=new FormData(t)),E.isFormData(t))return o?JSON.stringify(dl(t)):t;if(E.isArrayBuffer(t)||E.isBuffer(t)||E.isStream(t)||E.isFile(t)||E.isBlob(t)||E.isReadableStream(t))return t;if(E.isArrayBufferView(t))return t.buffer;if(E.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){const c=$t(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Wv(t,c).toString();if((a=E.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=$t(this,"env"),f=d&&d.FormData;return wr(a?{"files[]":t}:t,f&&new f,c)}}return s||o?(n.setContentType("application/json",!1),Kv(t)):t}],transformResponse:[function(t){const n=$t(this,"transitional")||Rn.transitional,r=n&&n.forcedJSONParsing,o=$t(this,"responseType"),s=o==="json";if(E.isResponse(t)||E.isReadableStream(t))return t;if(t&&E.isString(t)&&(r&&!o||s)){const a=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,$t(this,"parseReviver"))}catch(c){if(a)throw c.name==="SyntaxError"?H.from(c,H.ERR_BAD_RESPONSE,this,null,$t(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Se.classes.FormData,Blob:Se.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};E.forEach(["delete","get","head","post","put","patch","query"],e=>{Rn.headers[e]={}});function to(e,t){const n=this||Rn,r=t||n,o=Re.from(r.headers);let s=r.data;return E.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function fl(e){return!!(e&&e.__CANCEL__)}let Pn=class extends H{constructor(t,n,r){super(t??"canceled",H.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function pl(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new H("Request failed with status code "+n.status,n.status>=400&&n.status<500?H.ERR_BAD_REQUEST:H.ERR_BAD_RESPONSE,n.config,n.request,n))}function Zv(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Yv(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=r[s];i||(i=d),n[o]=c,r[o]=d;let u=s,h=0;for(;u!==o;)h+=n[u++],u=u%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),d-i<t)return;const m=f&&d-f;return m?Math.round(h*1e3/m):void 0}}function Qv(e,t){let n=0,r=1e3/t,o,s;const i=(d,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e(...d)};return[(...d)=>{const f=Date.now(),u=f-n;u>=r?i(d,f):(o=d,s||(s=setTimeout(()=>{s=null,i(o)},r-u)))},()=>o&&i(o)]}const sr=(e,t,n=3)=>{let r=0;const o=Yv(50,250);return Qv(s=>{if(!s||typeof s.loaded!="number")return;const i=s.loaded,a=s.lengthComputable?s.total:void 0,c=a!=null?Math.min(i,a):i,d=Math.max(0,c-r),f=o(d);r=Math.max(r,c);const u={loaded:c,total:a,progress:a?c/a:void 0,bytes:d,rate:f||void 0,estimated:f&&a?(a-c)/f:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(u)},n)},ja=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},La=e=>(...t)=>E.asap(()=>e(...t)),Xv=Se.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Se.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Se.origin),Se.navigator&&/(msie|trident)/i.test(Se.navigator.userAgent)):()=>!0,Jv=Se.hasStandardBrowserEnv?{write(e,t,n,r,o,s,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];E.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),E.isString(r)&&a.push(`path=${r}`),E.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),E.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function ey(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ty(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const ny=/^https?:(?!\/\/)/i,ry=/[\t\n\r]/g;function oy(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function sy(e){return oy(e).replace(ry,"")}function ka(e,t){if(typeof e=="string"&&ny.test(sy(e)))throw new H('Invalid URL: missing "//" after protocol',H.ERR_INVALID_URL,t)}function hl(e,t,n,r){ka(t,r);let o=!ey(t);return e&&(o||n===!1)?(ka(e,r),ty(e,t)):t}const Fa=e=>e instanceof Re?{...e}:e;function Tt(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,u,h,m){return E.isPlainObject(f)&&E.isPlainObject(u)?E.merge.call({caseless:m},f,u):E.isPlainObject(u)?E.merge({},u):E.isArray(u)?u.slice():u}function o(f,u,h,m){if(E.isUndefined(u)){if(!E.isUndefined(f))return r(void 0,f,h,m)}else return r(f,u,h,m)}function s(f,u){if(!E.isUndefined(u))return r(void 0,u)}function i(f,u){if(E.isUndefined(u)){if(!E.isUndefined(f))return r(void 0,f)}else return r(void 0,u)}function a(f){const u=E.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!E.isUndefined(u))if(E.isPlainObject(u)){if(E.hasOwnProp(u,f))return u[f]}else return;const h=E.hasOwnProp(e,"transitional")?e.transitional:void 0;if(E.isPlainObject(h)&&E.hasOwnProp(h,f))return h[f]}function c(f,u,h){if(E.hasOwnProp(t,h))return r(f,u);if(E.hasOwnProp(e,h))return r(void 0,f)}const d={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:c,headers:(f,u,h)=>o(Fa(f),Fa(u),h,!0)};return E.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const h=E.hasOwnProp(d,u)?d[u]:o,m=E.hasOwnProp(e,u)?e[u]:void 0,b=E.hasOwnProp(t,u)?t[u]:void 0,g=h(m,b,u);E.isUndefined(g)&&h!==c||(n[u]=g)}),E.hasOwnProp(t,"validateStatus")&&E.isUndefined(t.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(E.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const ay=["content-type","content-length"];function iy(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{ay.includes(r.toLowerCase())&&e.set(r,o)})}const cy=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function ml(e){const t=Tt({},e),n=h=>E.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const c=n("auth"),d=n("baseURL"),f=n("allowAbsoluteUrls"),u=n("url");if(t.headers=a=Re.from(a),t.url=ll(hl(d,u,f,t),n("params"),n("paramsSerializer")),c){const h=E.getSafeProp(c,"username")||"",m=E.getSafeProp(c,"password")||"";a.set("Authorization","Basic "+btoa(h+":"+(m?cy(m):"")))}if(E.isFormData(r)&&(Se.hasStandardBrowserEnv||Se.hasStandardBrowserWebWorkerEnv||E.isReactNative(r)?a.setContentType(void 0):E.isFunction(r.getHeaders)&&iy(a,r.getHeaders(),n("formDataHeaderPolicy"))),Se.hasStandardBrowserEnv&&(E.isFunction(o)&&(o=o(t)),o===!0||o==null&&Xv(t.url))){const m=s&&i&&Jv.read(i);m&&a.set(s,m)}return t}const ly=typeof XMLHttpRequest<"u",uy=ly&&function(e){return new Promise(function(n,r){const o=ml(e);let s=o.data;const i=Re.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:d}=o,f,u,h,m,b;function g(){m&&m(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function v(){if(!y)return;const w=Re.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:w,config:e,request:y};pl(function(P){n(P),g()},function(P){r(P),g()},T),y=null}"onloadend"in y?y.onloadend=v:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(v)},y.onabort=function(){y&&(r(new H("Request aborted",H.ECONNABORTED,e,y)),g(),y=null)},y.onerror=function(S){const T=S&&S.message?S.message:"Network Error",_=new H(T,H.ERR_NETWORK,e,y);_.event=S||null,r(_),g(),y=null},y.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||vs;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),r(new H(S,T.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,e,y)),g(),y=null},s===void 0&&i.setContentType(null),"setRequestHeader"in y&&E.forEach(ol(i),function(S,T){y.setRequestHeader(T,S)}),E.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),a&&a!=="json"&&(y.responseType=o.responseType),d&&([h,b]=sr(d,!0),y.addEventListener("progress",h)),c&&y.upload&&([u,m]=sr(c),y.upload.addEventListener("progress",u),y.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=w=>{y&&(r(!w||w.type?new Pn(null,e,y):w),y.abort(),g(),y=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const x=Zv(o.url);if(x&&!Se.protocols.includes(x)){r(new H("Unsupported protocol "+x+":",H.ERR_BAD_REQUEST,e));return}y.send(s||null)})},dy=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(c){if(!r){r=!0,i();const d=c instanceof Error?c:this.reason;n.abort(d instanceof H?d:new Pn(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{s=null,o(new H(`timeout of ${t}ms exceeded`,H.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:a}=n;return a.unsubscribe=()=>E.asap(i),a},fy=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},py=async function*(e,t){for await(const n of hy(e))yield*fy(n,t)},hy=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()}},$a=(e,t,n,r)=>{const o=py(e,t);let s=0,i,a=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:f}=await o.next();if(d){a(),c.close();return}let u=f.byteLength;if(n){let h=s+=u;n(h)}c.enqueue(new Uint8Array(f))}catch(d){throw a(d),d}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},ar=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,my=(e,t,n)=>t+2<n&&ar(e.charCodeAt(t+1))&&ar(e.charCodeAt(t+2));function gy(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let i=r.length;const a=r.length;for(let m=0;m<a;m++)if(r.charCodeAt(m)===37&&m+2<a){const b=r.charCodeAt(m+1),g=r.charCodeAt(m+2);ar(b)&&ar(g)&&(i-=2,m+=2)}let c=0,d=a-1;const f=m=>m>=2&&r.charCodeAt(m-2)===37&&r.charCodeAt(m-1)===51&&(r.charCodeAt(m)===68||r.charCodeAt(m)===100);d>=0&&(r.charCodeAt(d)===61?(c++,d--):f(d)&&(c++,d-=3)),c===1&&d>=0&&(r.charCodeAt(d)===61||f(d))&&c++;const h=Math.floor(i/4)*3-(c||0);return h>0?h:0}let s=0;for(let i=0,a=r.length;i<a;i++){const c=r.charCodeAt(i);if(c===37&&my(r,i,a))s+=1,i+=2;else if(c<128)s+=1;else if(c<2048)s+=2;else if(c>=55296&&c<=56319&&i+1<a){const d=r.charCodeAt(i+1);d>=56320&&d<=57343?(s+=4,i++):s+=3}else s+=3}return s}const bs="1.18.0",Ba=64*1024,{isFunction:Vn}=E,vy=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Ua=e=>{if(!E.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Ha=(e,...t)=>{try{return!!e(...t)}catch{return!1}},yy=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},by=e=>{const t=E.global!==void 0&&E.global!==null?E.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=E.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:s,Response:i}=e,a=o?Vn(o):typeof fetch=="function",c=Vn(s),d=Vn(i);if(!a)return!1;const f=a&&Vn(n),u=a&&(typeof r=="function"?(v=>x=>v.encode(x))(new r):async v=>new Uint8Array(await new s(v).arrayBuffer())),h=c&&f&&Ha(()=>{let v=!1;const x=new s(Se.origin,{body:new n,method:"POST",get duplex(){return v=!0,"half"}}),w=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),v&&!w}),m=d&&f&&Ha(()=>E.isReadableStream(new i("").body)),b={stream:m&&(v=>v.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!b[v]&&(b[v]=(x,w)=>{let S=x&&x[v];if(S)return S.call(x);throw new H(`Response type '${v}' is not supported`,H.ERR_NOT_SUPPORT,w)})});const g=async v=>{if(v==null)return 0;if(E.isBlob(v))return v.size;if(E.isSpecCompliantForm(v))return(await new s(Se.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(E.isArrayBufferView(v)||E.isArrayBuffer(v))return v.byteLength;if(E.isURLSearchParams(v)&&(v=v+""),E.isString(v))return(await u(v)).byteLength},y=async(v,x)=>{const w=E.toFiniteNumber(v.getContentLength());return w??g(x)};return async v=>{let{url:x,method:w,data:S,signal:T,cancelToken:_,timeout:P,onDownloadProgress:M,onUploadProgress:$,responseType:k,headers:j,withCredentials:K="same-origin",fetchOptions:Z,maxContentLength:L,maxBodyLength:N}=ml(v);const C=E.isNumber(L)&&L>-1,I=E.isNumber(N)&&N>-1,O=q=>E.hasOwnProp(v,q)?v[q]:void 0;let A=o||fetch;k=k?(k+"").toLowerCase():"text";let F=dy([T,_&&_.toAbortSignal()],P),U=null;const X=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let B,z=null;const G=()=>new H("Request body larger than maxBodyLength limit",H.ERR_BAD_REQUEST,v,U);try{let q;const D=O("auth");if(D){const Q=E.getSafeProp(D,"username")||"",ie=E.getSafeProp(D,"password")||"";q={username:Q,password:ie}}if(yy(x)){const Q=new URL(x,Se.origin);if(!q&&(Q.username||Q.password)){const ie=Ua(Q.username),ye=Ua(Q.password);q={username:ie,password:ye}}(Q.username||Q.password)&&(Q.username="",Q.password="",x=Q.href)}if(q&&(j.delete("authorization"),j.set("Authorization","Basic "+btoa(vy((q.username||"")+":"+(q.password||""))))),C&&typeof x=="string"&&x.startsWith("data:")&&gy(x)>L)throw new H("maxContentLength size of "+L+" exceeded",H.ERR_BAD_RESPONSE,v,U);if(I&&w!=="get"&&w!=="head"){const Q=await g(S);if(typeof Q=="number"&&isFinite(Q)&&(B=Q,Q>N))throw G()}const V=I&&(E.isReadableStream(S)||E.isStream(S)),re=(Q,ie,ye)=>$a(Q,Ba,he=>{if(I&&he>N)throw z=G();ie&&ie(he)},ye);if(h&&w!=="get"&&w!=="head"&&($||V)){if(B=B??await y(j,S),B!==0||V){let Q=new s(x,{method:"POST",body:S,duplex:"half"}),ie;if(E.isFormData(S)&&(ie=Q.headers.get("content-type"))&&j.setContentType(ie),Q.body){const[ye,he]=$&&ja(B,sr(La($)))||[];S=re(Q.body,ye,he)}}}else if(V&&!c&&f&&w!=="get"&&w!=="head")S=re(S);else if(V&&c&&!h&&w!=="get"&&w!=="head")throw new H("Stream request bodies are not supported by the current fetch implementation",H.ERR_NOT_SUPPORT,v,U);E.isString(K)||(K=K?"include":"omit");const Y=c&&"credentials"in s.prototype;if(E.isFormData(S)){const Q=j.getContentType();Q&&/^multipart\/form-data/i.test(Q)&&!/boundary=/i.test(Q)&&j.delete("content-type")}j.set("User-Agent","axios/"+bs,!1);const ee={...Z,signal:F,method:w.toUpperCase(),headers:ol(j.normalize()),body:S,duplex:"half",credentials:Y?K:void 0};U=c&&new s(x,ee);let J=await(c?A(U,Z):A(x,ee));const ce=Re.from(J.headers);if(C){const Q=E.toFiniteNumber(ce.getContentLength());if(Q!=null&&Q>L)throw new H("maxContentLength size of "+L+" exceeded",H.ERR_BAD_RESPONSE,v,U)}const ve=m&&(k==="stream"||k==="response");if(m&&J.body&&(M||C||ve&&X)){const Q={};["status","statusText","headers"].forEach(me=>{Q[me]=J[me]});const ie=E.toFiniteNumber(ce.getContentLength()),[ye,he]=M&&ja(ie,sr(La(M),!0))||[];let Le=0;const rn=me=>{if(C&&(Le=me,Le>L))throw new H("maxContentLength size of "+L+" exceeded",H.ERR_BAD_RESPONSE,v,U);ye&&ye(me)};J=new i($a(J.body,Ba,rn,()=>{he&&he(),X&&X()}),Q)}k=k||"text";let xe=await b[E.findKey(b,k)||"text"](J,v);if(C&&!m&&!ve){let Q;if(xe!=null&&(typeof xe.byteLength=="number"?Q=xe.byteLength:typeof xe.size=="number"?Q=xe.size:typeof xe=="string"&&(Q=typeof r=="function"?new r().encode(xe).byteLength:xe.length)),typeof Q=="number"&&Q>L)throw new H("maxContentLength size of "+L+" exceeded",H.ERR_BAD_RESPONSE,v,U)}return!ve&&X&&X(),await new Promise((Q,ie)=>{pl(Q,ie,{data:xe,headers:Re.from(J.headers),status:J.status,statusText:J.statusText,config:v,request:U})})}catch(q){if(X&&X(),F&&F.aborted&&F.reason instanceof H){const D=F.reason;throw D.config=v,U&&(D.request=U),q!==D&&(D.cause=q),D}throw z?(U&&!z.request&&(z.request=U),z):q instanceof H?(U&&!q.request&&(q.request=U),q):q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new H("Network Error",H.ERR_NETWORK,v,U,q&&q.response),{cause:q.cause||q}):H.from(q,q&&q.code,v,U,q&&q.response)}}},xy=new Map,gl=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let i=s.length,a=i,c,d,f=xy;for(;a--;)c=s[a],d=f.get(c),d===void 0&&f.set(c,d=a?new Map:by(t)),f=d;return d};gl();const xs={http:Iv,xhr:uy,fetch:{get:gl}};E.forEach(xs,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Va=e=>`- ${e}`,wy=e=>E.isFunction(e)||e===null||e===!1;function Ey(e,t){e=E.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i<n;i++){r=e[i];let a;if(o=r,!wy(r)&&(o=xs[(a=String(r)).toLowerCase()],o===void 0))throw new H(`Unknown adapter '${a}'`);if(o&&(E.isFunction(o)||(o=o.get(t))))break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
54
- `+i.map(Va).join(`
55
- `):" "+Va(i[0]):"as no adapter specified";throw new H("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const vl={getAdapter:Ey,adapters:xs};function no(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pn(null,e)}function qa(e){return no(e),e.headers=Re.from(e.headers),e.data=to.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),vl.getAdapter(e.adapter||Rn.adapter,e)(e).then(function(r){no(e),e.response=r;try{r.data=to.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Re.from(r.headers),r},function(r){if(!fl(r)&&(no(e),r&&r.response)){e.response=r.response;try{r.response.data=to.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Re.from(r.response.headers)}return Promise.reject(r)})}const Er={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Er[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Wa={};Er.transitional=function(t,n,r){function o(s,i){return"[Axios v"+bs+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new H(o(i," has been removed"+(n?" in "+n:"")),H.ERR_DEPRECATED);return n&&!Wa[i]&&(Wa[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,a):!0}};Er.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Sy(e,t,n){if(typeof e!="object")throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(i){const a=e[s],c=a===void 0||i(a,s,e);if(c!==!0)throw new H("option "+s+" must be "+c,H.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new H("Unknown option "+s,H.ERR_BAD_OPTION)}}const Yn={assertOptions:Sy,validators:Er},Te=Yn.validators;let yt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ia,response:new Ia}}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 i=o.stack.indexOf(`
56
- `);return i===-1?"":o.stack.slice(i+1)})();try{if(!r.stack)r.stack=s;else if(s){const i=s.indexOf(`
57
- `),a=i===-1?-1:s.indexOf(`
58
- `,i+1),c=a===-1?"":s.slice(a+1);String(r.stack).endsWith(c)||(r.stack+=`
59
- `+s)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Tt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Yn.assertOptions(r,{silentJSONParsing:Te.transitional(Te.boolean),forcedJSONParsing:Te.transitional(Te.boolean),clarifyTimeoutError:Te.transitional(Te.boolean),legacyInterceptorReqResOrdering:Te.transitional(Te.boolean),advertiseZstdAcceptEncoding:Te.transitional(Te.boolean),validateStatusUndefinedResolves:Te.transitional(Te.boolean)},!1),o!=null&&(E.isFunction(o)?n.paramsSerializer={serialize:o}:Yn.assertOptions(o,{encode:Te.function,serialize:Te.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Yn.assertOptions(n,{baseUrl:Te.spelling("baseURL"),withXsrfToken:Te.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&E.merge(s.common,s[n.method]);s&&E.forEach(["delete","get","head","post","put","patch","query","common"],b=>{delete s[b]}),n.headers=Re.concat(i,s);const a=[];let c=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;c=c&&g.synchronous;const y=n.transitional||vs;y&&y.legacyInterceptorReqResOrdering?a.unshift(g.fulfilled,g.rejected):a.push(g.fulfilled,g.rejected)});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let f,u=0,h;if(!c){const b=[qa.bind(this),void 0];for(b.unshift(...a),b.push(...d),h=b.length,f=Promise.resolve(n);u<h;)f=f.then(b[u++],b[u++]);return f}h=a.length;let m=n;for(;u<h;){const b=a[u++],g=a[u++];try{m=b(m)}catch(y){g.call(this,y);break}}try{f=qa.call(this,m)}catch(b){return Promise.reject(b)}for(u=0,h=d.length;u<h;)f=f.then(d[u++],d[u++]);return f}getUri(t){t=Tt(this.defaults,t);const n=hl(t.baseURL,t.url,t.allowAbsoluteUrls,t);return ll(n,t.params,t.paramsSerializer)}};E.forEach(["delete","get","head","options"],function(t){yt.prototype[t]=function(n,r){return this.request(Tt(r||{},{method:t,url:n,data:r&&E.hasOwnProp(r,"data")?r.data:void 0}))}});E.forEach(["post","put","patch","query"],function(t){function n(r){return function(s,i,a){return this.request(Tt(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}yt.prototype[t]=n(),t!=="query"&&(yt.prototype[t+"Form"]=n(!0))});let Cy=class yl{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 i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,a){r.reason||(r.reason=new Pn(s,i,a),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 yl(function(o){t=o}),cancel:t}}};function Ty(e){return function(n){return e.apply(null,n)}}function Ry(e){return E.isObject(e)&&e.isAxiosError===!0}const Oo={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(Oo).forEach(([e,t])=>{Oo[t]=e});function bl(e){const t=new yt(e),n=Zc(yt.prototype.request,t);return E.extend(n,yt.prototype,t,{allOwnKeys:!0}),E.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return bl(Tt(e,o))},n}const de=bl(Rn);de.Axios=yt;de.CanceledError=Pn;de.CancelToken=Cy;de.isCancel=fl;de.VERSION=bs;de.toFormData=wr;de.AxiosError=H;de.Cancel=de.CanceledError;de.all=function(t){return Promise.all(t)};de.spread=Ty;de.isAxiosError=Ry;de.mergeConfig=Tt;de.AxiosHeaders=Re;de.formToJSON=e=>dl(E.isHTMLForm(e)?new FormData(e):e);de.getAdapter=vl.getAdapter;de.HttpStatusCode=Oo;de.default=de;const{Axios:xE,AxiosError:wE,CanceledError:EE,isCancel:SE,CancelToken:CE,VERSION:TE,all:RE,Cancel:PE,isAxiosError:AE,spread:OE,toFormData:_E,AxiosHeaders:NE,HttpStatusCode:ME,formToJSON:IE,getAdapter:DE,mergeConfig:jE,create:LE}=de,Py=e=>!e||e.length===0?null:[...new Set(e)].sort(),Ay=e=>!e||e.length===0?[]:[...new Set(e.map(t=>t.trim()).filter(Boolean))].sort(),Oy=e=>!e||e.length===0?null:[...new Set(e)].sort(),kE={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:Py(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:Ay(e.tagNames)}],detail:e=>["notes","detail",{id:e}],snapshots:(e,t=10)=>["notes","snapshots",{id:e,limit:t}],snapshotDetail:e=>["notes","snapshot-detail",{id:e}],trashAll:()=>["notes","trash"],trash:(e={})=>["notes","trash",{limit:e.limit??25,offset:e.offset??0}],trashDetail:e=>["notes","trash","detail",{id:e}],pinned:()=>["notes","pinned"],backReferencesAll:()=>["notes","back-references"],backReferences:e=>["notes","back-references",{noteId:e}],graph:()=>["notes","graph"],propertyKeysAll:()=>["notes","property-keys"],propertyKeys:(e={})=>["notes","property-keys",{query:e.query??"",limit:e.limit??50,offset:e.offset??0}]},tags:{all:()=>["tags"],list:(e={})=>["tags","list",{limit:e.limit??50,offset:e.offset??0,query:e.query??"",sortBy:e.sortBy??"referenceCount",sortOrder:e.sortOrder??"desc"}]},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"],listAll:()=>["reminders","list"],list:({filter:e,limit:t=25,offset:n=0})=>["reminders","list",{filter:{status:e.status,priority:e.priority??null,start:e.start??null,end:e.end??null,sortBy:e.sortBy??"reminderDate",sortOrder:e.sortOrder??"asc"},limit:t,offset:n}],overview:({now:e,tomorrow:t,priority:n,limit:r=5})=>["reminders","overview",{now:e,tomorrow:t,priority:n??null,limit:r}],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:Oy(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,sortBy:t.sortBy??null,sortOrder:t.sortOrder??null}],sectionBoardsAll:()=>["views","section-board"],sectionBoardAll:e=>["views","section-board",e],sectionBoardColumnPages:(e,t,n,r)=>["views","section-board",e,{groupPropertyKey:t,optionValue:n,pageSize:r}]},search:{all:()=>["search"],resultsAll:()=>["search","results"],results:e=>["search","results",{query:e.query.trim(),limit:e.limit??25,offset:e.offset??0,mode:e.mode??"hybrid"}],relatedAll:()=>["search","related"],related:(e,t=5)=>["search","related",{noteId:e,limit:t}],adminStatus:()=>["search","admin-status"]},ui:{heroBanner:()=>["ui","hero-banner"]}},_y={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},za={sm:10,md:12,lg:14},Ny=l.forwardRef(({className:e,size:t="md",checked:n,disabled:r,...o},s)=>p.jsxs("label",{className:pe("relative inline-flex items-center justify-center cursor-pointer",r&&"cursor-not-allowed opacity-50",e),children:[p.jsx("input",{ref:s,type:"checkbox",checked:n,disabled:r,className:"sr-only peer",...o}),p.jsx("span",{className:pe(_y[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","peer-focus-visible:border-border-focus","peer-focus-visible:shadow-[0_0_0_4px_color-mix(in_srgb,var(--accent-soft-primary)_90%,transparent)]"),children:n&&p.jsx(Vm,{width:za[t],height:za[t],className:"text-fg-on-filled",weight:"bold"})})]}));Ny.displayName="Checkbox";var My=mc,Iy=gc,xl=vc,wl=yc,Dy=cs,El=bc,Sl=xc;const jy=My,Ly=Iy,ky=Dy,Cl=l.createContext("default"),An=()=>l.useContext(Cl),Tl=l.forwardRef(({className:e,...t},n)=>p.jsx(xl,{ref:n,className:pe("fixed","inset-0","z-[1090]","bg-overlay","backdrop-blur-[2px]","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0",e),...t}));Tl.displayName=xl.displayName;const Rl=l.forwardRef(({className:e,children:t,variant:n="default",...r},o)=>p.jsxs(Ly,{children:[p.jsx(Tl,{}),p.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-end justify-center p-0 sm:items-center sm:p-4",children:p.jsx(wl,{ref:o,"data-dialog-variant":n,className:ls({variant:n,className:e}),...r,children:p.jsx(Cl.Provider,{value:n,children:t})})})]}));Rl.displayName=wl.displayName;const Pl=({title:e,onClose:t,className:n})=>{const r=An();return p.jsxs("div",{className:Gm({variant:r,className:n}),children:[p.jsx(_l,{children:e}),t&&p.jsx(ky,{asChild:!0,children:p.jsx("button",{type:"button","aria-label":"Close dialog",className:Km({variant:r}),onClick:t,children:p.jsx(Wm,{className:r==="compact"||r==="form"||r==="confirm"?"h-[18px] w-[18px]":"h-5 w-5"})})})]})};Pl.displayName="DialogHeader";const Al=l.forwardRef(({className:e,...t},n)=>{const r=An();return p.jsx("div",{ref:n,className:us({variant:r,className:e}),...t})});Al.displayName="DialogBody";const Ol=l.forwardRef(({className:e,...t},n)=>{const r=An();return p.jsx("div",{ref:n,className:ds({variant:r,className:e}),...t})});Ol.displayName="DialogFooter";const _l=l.forwardRef(({className:e,...t},n)=>{const r=An();return p.jsx(El,{ref:n,className:pe(fs({variant:r}),e),...t})});_l.displayName=El.displayName;const Nl=l.forwardRef(({className:e,...t},n)=>{const r=An();return p.jsx(Sl,{ref:n,className:pe(ps({variant:r}),e),...t})});Nl.displayName=Sl.displayName;const Sr=({isOpen:e,onClose:t,children:n,className:r,variant:o="default"})=>p.jsx(jy,{open:e,onOpenChange:s=>!s&&t(),children:p.jsx(Rl,{variant:o,className:r,children:n})});Sr.Header=Pl;Sr.Body=Al;Sr.Footer=Ol;Sr.Description=Nl;function ws(e){const t=e+"CollectionProvider",[n,r]=Xe(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:y,children:v}=g,x=R.useRef(null),w=R.useRef(new Map).current;return p.jsx(o,{scope:y,itemMap:w,collectionRef:x,children:v})};i.displayName=t;const a=e+"CollectionSlot",c=Kt(a),d=R.forwardRef((g,y)=>{const{scope:v,children:x}=g,w=s(a,v),S=se(y,w.collectionRef);return p.jsx(c,{ref:S,children:x})});d.displayName=a;const f=e+"CollectionItemSlot",u="data-radix-collection-item",h=Kt(f),m=R.forwardRef((g,y)=>{const{scope:v,children:x,...w}=g,S=R.useRef(null),T=se(y,S),_=s(f,v);return R.useEffect(()=>(_.itemMap.set(S,{ref:S,...w}),()=>{_.itemMap.delete(S)})),p.jsx(h,{[u]:"",ref:T,children:x})});m.displayName=f;function b(g){const y=s(e+"CollectionConsumer",g);return R.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${u}]`));return Array.from(y.itemMap.values()).sort((_,P)=>w.indexOf(_.ref.current)-w.indexOf(P.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:d,ItemSlot:m},b,r]}var Fy=l.createContext(void 0);function Cr(e){const t=l.useContext(Fy);return e||t||"ltr"}var $y="Arrow",Ml=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(oe.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ml.displayName=$y;var By=Ml;function Uy(e){const[t,n]=l.useState(void 0);return Pe(()=>{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 i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,d=Array.isArray(c)?c[0]:c;i=d.inlineSize,a=d.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Es="Popper",[Il,tn]=Xe(Es),[Hy,Dl]=Il(Es),jl=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return p.jsx(Hy,{scope:t,anchor:r,onAnchorChange:o,children:n})};jl.displayName=Es;var Ll="PopperAnchor",kl=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Dl(Ll,n),i=l.useRef(null),a=se(t,i),c=l.useRef(null);return l.useEffect(()=>{const d=c.current;c.current=r?.current||i.current,d!==c.current&&s.onAnchorChange(c.current)}),r?null:p.jsx(oe.div,{...o,ref:a})});kl.displayName=Ll;var Ss="PopperContent",[Vy,qy]=Il(Ss),Fl=l.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:b,...g}=e,y=Dl(Ss,n),[v,x]=l.useState(null),w=se(t,D=>x(D)),[S,T]=l.useState(null),_=Uy(S),P=_?.width??0,M=_?.height??0,$=r+(s!=="center"?"-"+s:""),k=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},j=Array.isArray(d)?d:[d],K=j.length>0,Z={padding:k,boundary:j.filter(zy),altBoundary:K},{refs:L,floatingStyles:N,placement:C,isPositioned:I,middlewareData:O}=ef({strategy:"fixed",placement:$,whileElementsMounted:(...D)=>cf(...D,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[tf({mainAxis:o+M,alignmentAxis:i}),c&&nf({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?lf():void 0,...Z}),c&&rf({...Z}),of({...Z,apply:({elements:D,rects:V,availableWidth:re,availableHeight:Y})=>{const{width:ee,height:J}=V.reference,ce=D.floating.style;ce.setProperty("--radix-popper-available-width",`${re}px`),ce.setProperty("--radix-popper-available-height",`${Y}px`),ce.setProperty("--radix-popper-anchor-width",`${ee}px`),ce.setProperty("--radix-popper-anchor-height",`${J}px`)}}),S&&sf({element:S,padding:a}),Gy({arrowWidth:P,arrowHeight:M}),h&&af({strategy:"referenceHidden",...Z})]}),[A,F]=Ul(C),U=Qe(b);Pe(()=>{I&&U?.()},[I,U]);const X=O.arrow?.x,B=O.arrow?.y,z=O.arrow?.centerOffset!==0,[G,q]=l.useState();return Pe(()=>{v&&q(window.getComputedStyle(v).zIndex)},[v]),p.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:I?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[O.transformOrigin?.x,O.transformOrigin?.y].join(" "),...O.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Vy,{scope:n,placedSide:A,onArrowChange:T,arrowX:X,arrowY:B,shouldHideArrow:z,children:p.jsx(oe.div,{"data-side":A,"data-align":F,...g,ref:w,style:{...g.style,animation:I?void 0:"none"}})})})});Fl.displayName=Ss;var $l="PopperArrow",Wy={top:"bottom",right:"left",bottom:"top",left:"right"},Bl=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=qy($l,r),i=Wy[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]: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:p.jsx(By,{...o,ref:n,style:{...o.style,display:"block"}})})});Bl.displayName=$l;function zy(e){return e!==null}var Gy=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[d,f]=Ul(n),u={start:"0%",center:"50%",end:"100%"}[f],h=(o.arrow?.x??0)+a/2,m=(o.arrow?.y??0)+c/2;let b="",g="";return d==="bottom"?(b=i?u:`${h}px`,g=`${-c}px`):d==="top"?(b=i?u:`${h}px`,g=`${r.floating.height+c}px`):d==="right"?(b=`${-c}px`,g=i?u:`${m}px`):d==="left"&&(b=`${r.floating.width+c}px`,g=i?u:`${m}px`),{data:{x:b,y:g}}}});function Ul(e){const[t,n="center"]=e.split("-");return[t,n]}var Cs=jl,Ts=kl,Rs=Fl,Ps=Bl,ro="rovingFocusGroup.onEntryFocus",Ky={bubbles:!1,cancelable:!0},On="RovingFocusGroup",[_o,Hl,Zy]=ws(On),[Yy,Tr]=Xe(On,[Zy]),[Qy,Xy]=Yy(On),Vl=l.forwardRef((e,t)=>p.jsx(_o.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(_o.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Jy,{...e,ref:t})})}));Vl.displayName=On;var Jy=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...u}=e,h=l.useRef(null),m=se(t,h),b=Cr(s),[g,y]=nt({prop:i,defaultProp:a??null,onChange:c,caller:On}),[v,x]=l.useState(!1),w=Qe(d),S=Hl(n),T=l.useRef(!1),[_,P]=l.useState(0);return l.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(ro,w),()=>M.removeEventListener(ro,w)},[w]),p.jsx(Qy,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(M=>y(M),[y]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>P(M=>M+1),[]),onFocusableItemRemove:l.useCallback(()=>P(M=>M-1),[]),children:p.jsx(oe.div,{tabIndex:v||_===0?-1:0,"data-orientation":r,...u,ref:m,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{T.current=!0}),onFocus:W(e.onFocus,M=>{const $=!T.current;if(M.target===M.currentTarget&&$&&!v){const k=new CustomEvent(ro,Ky);if(M.currentTarget.dispatchEvent(k),!k.defaultPrevented){const j=S().filter(C=>C.focusable),K=j.find(C=>C.active),Z=j.find(C=>C.id===g),N=[K,Z,...j].filter(Boolean).map(C=>C.ref.current);zl(N,f)}}T.current=!1}),onBlur:W(e.onBlur,()=>x(!1))})})}),ql="RovingFocusGroupItem",Wl=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,c=Ze(),d=s||c,f=Xy(ql,n),u=f.currentTabStopId===d,h=Hl(n),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:g}=f;return l.useEffect(()=>{if(r)return m(),()=>b()},[r,m,b]),p.jsx(_o.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:p.jsx(oe.span,{tabIndex:u?0:-1,"data-orientation":f.orientation,...a,ref:t,onMouseDown:W(e.onMouseDown,y=>{r?f.onItemFocus(d):y.preventDefault()}),onFocus:W(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:W(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){f.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=n0(y,f.orientation,f.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let w=h().filter(S=>S.focusable).map(S=>S.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const S=w.indexOf(y.currentTarget);w=f.loop?r0(w,S+1):w.slice(S+1)}setTimeout(()=>zl(w))}}),children:typeof i=="function"?i({isCurrentTabStop:u,hasTabStop:g!=null}):i})})});Wl.displayName=ql;var e0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function t0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function n0(e,t,n){const r=t0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return e0[r]}function zl(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function r0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Gl=Vl,Kl=Wl,No=["Enter"," "],o0=["ArrowDown","PageUp","Home"],Zl=["ArrowUp","PageDown","End"],s0=[...o0,...Zl],a0={ltr:[...No,"ArrowRight"],rtl:[...No,"ArrowLeft"]},i0={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_n="Menu",[gn,c0,l0]=ws(_n),[Ot,Yl]=Xe(_n,[l0,tn,Tr]),Rr=tn(),Ql=Tr(),[u0,_t]=Ot(_n),[d0,Nn]=Ot(_n),Xl=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Rr(t),[c,d]=l.useState(null),f=l.useRef(!1),u=Qe(s),h=Cr(o);return l.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),p.jsx(Cs,{...a,children:p.jsx(u0,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:d,children:p.jsx(d0,{scope:t,onClose:l.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:f,dir:h,modal:i,children:r})})})};Xl.displayName=_n;var f0="MenuAnchor",As=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Rr(n);return p.jsx(Ts,{...o,...r,ref:t})});As.displayName=f0;var Os="MenuPortal",[p0,Jl]=Ot(Os,{forceMount:void 0}),eu=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=_t(Os,t);return p.jsx(p0,{scope:t,forceMount:n,children:p.jsx(Je,{present:n||s.open,children:p.jsx(Sn,{asChild:!0,container:o,children:r})})})};eu.displayName=Os;var Be="MenuContent",[h0,_s]=Ot(Be),tu=l.forwardRef((e,t)=>{const n=Jl(Be,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=_t(Be,e.__scopeMenu),i=Nn(Be,e.__scopeMenu);return p.jsx(gn.Provider,{scope:e.__scopeMenu,children:p.jsx(Je,{present:r||s.open,children:p.jsx(gn.Slot,{scope:e.__scopeMenu,children:i.modal?p.jsx(m0,{...o,ref:t}):p.jsx(g0,{...o,ref:t})})})})}),m0=l.forwardRef((e,t)=>{const n=_t(Be,e.__scopeMenu),r=l.useRef(null),o=se(t,r);return l.useEffect(()=>{const s=r.current;if(s)return os(s)},[]),p.jsx(Ns,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),g0=l.forwardRef((e,t)=>{const n=_t(Be,e.__scopeMenu);return p.jsx(Ns,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),v0=Kt("MenuContent.ScrollLock"),Ns=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:h,onDismiss:m,disableOutsideScroll:b,...g}=e,y=_t(Be,n),v=Nn(Be,n),x=Rr(n),w=Ql(n),S=c0(n),[T,_]=l.useState(null),P=l.useRef(null),M=se(t,P,y.onContentChange),$=l.useRef(0),k=l.useRef(""),j=l.useRef(0),K=l.useRef(null),Z=l.useRef("right"),L=l.useRef(0),N=b?yr:l.Fragment,C=b?{as:v0,allowPinchZoom:!0}:void 0,I=A=>{const F=k.current+A,U=S().filter(D=>!D.disabled),X=document.activeElement,B=U.find(D=>D.ref.current===X)?.textValue,z=U.map(D=>D.textValue),G=O0(z,F,B),q=U.find(D=>D.textValue===G)?.ref.current;(function D(V){k.current=V,window.clearTimeout($.current),V!==""&&($.current=window.setTimeout(()=>D(""),1e3))})(F),q&&setTimeout(()=>q.focus())};l.useEffect(()=>()=>window.clearTimeout($.current),[]),rs();const O=l.useCallback(A=>Z.current===K.current?.side&&N0(A,K.current?.area),[]);return p.jsx(h0,{scope:n,searchRef:k,onItemEnter:l.useCallback(A=>{O(A)&&A.preventDefault()},[O]),onItemLeave:l.useCallback(A=>{O(A)||(P.current?.focus(),_(null))},[O]),onTriggerLeave:l.useCallback(A=>{O(A)&&A.preventDefault()},[O]),pointerGraceTimerRef:j,onPointerGraceIntentChange:l.useCallback(A=>{K.current=A},[]),children:p.jsx(N,{...C,children:p.jsx(gr,{asChild:!0,trapped:o,onMountAutoFocus:W(s,A=>{A.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:p.jsx(En,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:h,onDismiss:m,children:p.jsx(Gl,{asChild:!0,...w,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:_,onEntryFocus:W(c,A=>{v.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Rs,{role:"menu","aria-orientation":"vertical","data-state":vu(y.open),"data-radix-menu-content":"",dir:v.dir,...x,...g,ref:M,style:{outline:"none",...g.style},onKeyDown:W(g.onKeyDown,A=>{const U=A.target.closest("[data-radix-menu-content]")===A.currentTarget,X=A.ctrlKey||A.altKey||A.metaKey,B=A.key.length===1;U&&(A.key==="Tab"&&A.preventDefault(),!X&&B&&I(A.key));const z=P.current;if(A.target!==z||!s0.includes(A.key))return;A.preventDefault();const q=S().filter(D=>!D.disabled).map(D=>D.ref.current);Zl.includes(A.key)&&q.reverse(),P0(q)}),onBlur:W(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout($.current),k.current="")}),onPointerMove:W(e.onPointerMove,vn(A=>{const F=A.target,U=L.current!==A.clientX;if(A.currentTarget.contains(F)&&U){const X=A.clientX>L.current?"right":"left";Z.current=X,L.current=A.clientX}}))})})})})})})});tu.displayName=Be;var y0="MenuGroup",Ms=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(oe.div,{role:"group",...r,ref:t})});Ms.displayName=y0;var b0="MenuLabel",nu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(oe.div,{...r,ref:t})});nu.displayName=b0;var ir="MenuItem",Ga="menu.itemSelect",Pr=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=l.useRef(null),i=Nn(ir,e.__scopeMenu),a=_s(ir,e.__scopeMenu),c=se(t,s),d=l.useRef(!1),f=()=>{const u=s.current;if(!n&&u){const h=new CustomEvent(Ga,{bubbles:!0,cancelable:!0});u.addEventListener(Ga,m=>r?.(m),{once:!0}),Bi(u,h),h.defaultPrevented?d.current=!1:i.onClose()}};return p.jsx(ru,{...o,ref:c,disabled:n,onClick:W(e.onClick,f),onPointerDown:u=>{e.onPointerDown?.(u),d.current=!0},onPointerUp:W(e.onPointerUp,u=>{d.current||u.currentTarget?.click()}),onKeyDown:W(e.onKeyDown,u=>{const h=a.searchRef.current!=="";n||h&&u.key===" "||No.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Pr.displayName=ir;var ru=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=_s(ir,n),a=Ql(n),c=l.useRef(null),d=se(t,c),[f,u]=l.useState(!1),[h,m]=l.useState("");return l.useEffect(()=>{const b=c.current;b&&m((b.textContent??"").trim())},[s.children]),p.jsx(gn.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:p.jsx(Kl,{asChild:!0,...a,focusable:!r,children:p.jsx(oe.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:d,onPointerMove:W(e.onPointerMove,vn(b=>{r?i.onItemLeave(b):(i.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,vn(b=>i.onItemLeave(b))),onFocus:W(e.onFocus,()=>u(!0)),onBlur:W(e.onBlur,()=>u(!1))})})})}),x0="MenuCheckboxItem",ou=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(lu,{scope:e.__scopeMenu,checked:n,children:p.jsx(Pr,{role:"menuitemcheckbox","aria-checked":cr(n)?"mixed":n,...o,ref:t,"data-state":Ds(n),onSelect:W(o.onSelect,()=>r?.(cr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ou.displayName=x0;var su="MenuRadioGroup",[w0,E0]=Ot(su,{value:void 0,onValueChange:()=>{}}),au=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Qe(r);return p.jsx(w0,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Ms,{...o,ref:t})})});au.displayName=su;var iu="MenuRadioItem",cu=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=E0(iu,e.__scopeMenu),s=n===o.value;return p.jsx(lu,{scope:e.__scopeMenu,checked:s,children:p.jsx(Pr,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Ds(s),onSelect:W(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});cu.displayName=iu;var Is="MenuItemIndicator",[lu,S0]=Ot(Is,{checked:!1}),uu=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=S0(Is,n);return p.jsx(Je,{present:r||cr(s.checked)||s.checked===!0,children:p.jsx(oe.span,{...o,ref:t,"data-state":Ds(s.checked)})})});uu.displayName=Is;var C0="MenuSeparator",du=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(oe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});du.displayName=C0;var T0="MenuArrow",fu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Rr(n);return p.jsx(Ps,{...o,...r,ref:t})});fu.displayName=T0;var R0="MenuSub",[FE,pu]=Ot(R0),un="MenuSubTrigger",hu=l.forwardRef((e,t)=>{const n=_t(un,e.__scopeMenu),r=Nn(un,e.__scopeMenu),o=pu(un,e.__scopeMenu),s=_s(un,e.__scopeMenu),i=l.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=s,d={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return l.useEffect(()=>f,[f]),l.useEffect(()=>{const u=a.current;return()=>{window.clearTimeout(u),c(null)}},[a,c]),p.jsx(As,{asChild:!0,...d,children:p.jsx(ru,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":vu(n.open),...e,ref:wn(t,o.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,vn(u=>{s.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:W(e.onPointerLeave,vn(u=>{f();const h=n.content?.getBoundingClientRect();if(h){const m=n.content?.dataset.side,b=m==="right",g=b?-5:5,y=h[b?"left":"right"],v=h[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+g,y:u.clientY},{x:y,y:h.top},{x:v,y:h.top},{x:v,y:h.bottom},{x:y,y:h.bottom}],side:m}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(u),u.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:W(e.onKeyDown,u=>{const h=s.searchRef.current!=="";e.disabled||h&&u.key===" "||a0[r.dir].includes(u.key)&&(n.onOpenChange(!0),n.content?.focus(),u.preventDefault())})})})});hu.displayName=un;var mu="MenuSubContent",gu=l.forwardRef((e,t)=>{const n=Jl(Be,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=_t(Be,e.__scopeMenu),i=Nn(Be,e.__scopeMenu),a=pu(mu,e.__scopeMenu),c=l.useRef(null),d=se(t,c);return p.jsx(gn.Provider,{scope:e.__scopeMenu,children:p.jsx(Je,{present:r||s.open,children:p.jsx(gn.Slot,{scope:e.__scopeMenu,children:p.jsx(Ns,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&c.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:W(e.onFocusOutside,f=>{f.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:W(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:W(e.onKeyDown,f=>{const u=f.currentTarget.contains(f.target),h=i0[i.dir].includes(f.key);u&&h&&(s.onOpenChange(!1),a.trigger?.focus(),f.preventDefault())})})})})})});gu.displayName=mu;function vu(e){return e?"open":"closed"}function cr(e){return e==="indeterminate"}function Ds(e){return cr(e)?"indeterminate":e?"checked":"unchecked"}function P0(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function A0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function O0(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=A0(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==n));const c=i.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function _0(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],c=t[i],d=a.x,f=a.y,u=c.x,h=c.y;f>r!=h>r&&n<(u-d)*(r-f)/(h-f)+d&&(o=!o)}return o}function N0(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return _0(n,t)}function vn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var M0=Xl,I0=As,D0=eu,j0=tu,L0=Ms,k0=nu,F0=Pr,$0=ou,B0=au,U0=cu,H0=uu,V0=du,q0=fu,W0=hu,z0=gu,Ar="DropdownMenu",[G0]=Xe(Ar,[Yl]),Oe=Yl(),[K0,yu]=G0(Ar),bu=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=Oe(t),d=l.useRef(null),[f,u]=nt({prop:o,defaultProp:s??!1,onChange:i,caller:Ar});return p.jsx(K0,{scope:t,triggerId:Ze(),triggerRef:d,contentId:Ze(),open:f,onOpenChange:u,onOpenToggle:l.useCallback(()=>u(h=>!h),[u]),modal:a,children:p.jsx(M0,{...c,open:f,onOpenChange:u,dir:r,modal:a,children:n})})};bu.displayName=Ar;var xu="DropdownMenuTrigger",wu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=yu(xu,n),i=Oe(n);return p.jsx(I0,{asChild:!0,...i,children:p.jsx(oe.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:wn(t,s.triggerRef),onPointerDown:W(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:W(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});wu.displayName=xu;var Z0="DropdownMenuPortal",Eu=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Oe(t);return p.jsx(D0,{...r,...n})};Eu.displayName=Z0;var Su="DropdownMenuContent",Cu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=yu(Su,n),s=Oe(n),i=l.useRef(!1);return p.jsx(j0,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:W(e.onCloseAutoFocus,a=>{i.current||o.triggerRef.current?.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:W(e.onInteractOutside,a=>{const c=a.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,f=c.button===2||d;(!o.modal||f)&&(i.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)"}})});Cu.displayName=Su;var Y0="DropdownMenuGroup",Q0=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(L0,{...o,...r,ref:t})});Q0.displayName=Y0;var X0="DropdownMenuLabel",Tu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(k0,{...o,...r,ref:t})});Tu.displayName=X0;var J0="DropdownMenuItem",Ru=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(F0,{...o,...r,ref:t})});Ru.displayName=J0;var eb="DropdownMenuCheckboxItem",Pu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx($0,{...o,...r,ref:t})});Pu.displayName=eb;var tb="DropdownMenuRadioGroup",nb=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(B0,{...o,...r,ref:t})});nb.displayName=tb;var rb="DropdownMenuRadioItem",Au=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(U0,{...o,...r,ref:t})});Au.displayName=rb;var ob="DropdownMenuItemIndicator",Ou=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(H0,{...o,...r,ref:t})});Ou.displayName=ob;var sb="DropdownMenuSeparator",_u=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(V0,{...o,...r,ref:t})});_u.displayName=sb;var ab="DropdownMenuArrow",ib=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(q0,{...o,...r,ref:t})});ib.displayName=ab;var cb="DropdownMenuSubTrigger",Nu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(W0,{...o,...r,ref:t})});Nu.displayName=cb;var lb="DropdownMenuSubContent",Mu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Oe(n);return p.jsx(z0,{...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)"}})});Mu.displayName=lb;var ub=bu,db=wu,fb=Eu,pb=Cu,hb=Tu,mb=Ru,gb=Pu,vb=Au,yb=Ou,bb=_u,xb=Nu,wb=Mu,Eb=ub,Sb=db,Cb=fb,Iu=pb,Du=mb,ju=gb,Lu=vb,ku=yb,Fu=hb,$u=bb,Bu=xb,Uu=wb;const Tb=Eb,Rb=Sb,Pb=l.forwardRef(({className:e,inset:t,children:n,...r},o)=>p.jsx(Bu,{ref:o,className:pe("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}));Pb.displayName=Bu.displayName;const Ab=l.forwardRef(({className:e,...t},n)=>p.jsx(Uu,{ref:n,className:pe("z-50","min-w-[8rem]","overflow-hidden","surface-floating","p-1",e),...t}));Ab.displayName=Uu.displayName;const Hu=l.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(Cb,{children:p.jsx(Iu,{ref:r,sideOffset:t,className:pe("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})}));Hu.displayName=Iu.displayName;const Vu=l.forwardRef(({className:e,inset:t,...n},r)=>p.jsx(Du,{ref:r,className:pe("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}));Vu.displayName=Du.displayName;const Ob=l.forwardRef(({className:e,children:t,checked:n,...r},o)=>p.jsxs(ju,{ref:o,className:pe("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:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(ku,{children:"✓"})}),t]}));Ob.displayName=ju.displayName;const _b=l.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Lu,{ref:r,className:pe("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:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(ku,{children:"●"})}),t]}));_b.displayName=Lu.displayName;const Nb=l.forwardRef(({className:e,inset:t,...n},r)=>p.jsx(Fu,{ref:r,className:pe("px-2","py-1.5","text-sm","font-semibold","text-fg-secondary",t&&"pl-8",e),...n}));Nb.displayName=Fu.displayName;const qu=l.forwardRef(({className:e,...t},n)=>p.jsx($u,{ref:n,className:pe("-mx-1","my-1","h-px","bg-divider",e),...t}));qu.displayName=$u.displayName;const $E=({button:e,items:t})=>p.jsxs(Tb,{children:[p.jsx(Rb,{asChild:!0,children:e}),p.jsx(Hu,{align:"end",children:t.map((n,r)=>n.type==="separator"?p.jsx(qu,{},n.key??`separator-${r}`):p.jsx(Vu,{onClick:n.onClick,children:n.name},n.name))})]}),Mb=l.forwardRef(({title:e,description:t,className:n="",...r},o)=>p.jsxs("div",{ref:o,className:pe("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&&p.jsx($e,{as:"h3",variant:"heading",weight:"bold",tone:"muted",className:"mb-2",children:e}),t&&p.jsx($e,{as:"p",variant:"meta",weight:"medium",tone:"tertiary",className:"max-w-[400px]",children:t})]}));Mb.displayName="Empty";const Ib=Ae(["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"}}),Db=l.forwardRef(({className:e,variant:t,size:n,type:r="text",...o},s)=>p.jsx("input",{ref:s,type:r,className:Ib({variant:t,size:n,className:e}),...o}));Db.displayName="Input";const jb=Ae(["font-bold","text-fg-muted","whitespace-nowrap"],{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"sm"}}),Lb=l.forwardRef(({className:e,size:t,...n},r)=>p.jsx("label",{ref:r,className:jb({size:t,className:e}),...n}));Lb.displayName="Label";const kb=l.forwardRef(({page:e,last:t,onChange:n,className:r="",...o},s)=>{const i=Number(e),a=Number(t),c=[];for(let u=1;u<a+1;u++)(i===u||i===1&&u<i+5||i===2&&u<i+4||u>i-3&&u<i+3||i===a-1&&u>i-4||i===a&&u>i-5)&&c.push(u);const d=i===1,f=i===a;return p.jsxs("nav",{ref:s,className:`mt-8 flex justify-center items-center gap-1 ${r}`,...o,children:[p.jsxs(Ht,{disabled:d,onClick:()=>!d&&n(1),"aria-label":"First page",isSkip:!0,children:[p.jsx(Qr,{width:16}),p.jsx(Qr,{width:16})]}),p.jsx(Ht,{disabled:d,onClick:()=>!d&&n(i-1),"aria-label":"Previous page",children:p.jsx(Qr,{width:20})}),c.map(u=>p.jsx(Ht,{active:i===u,onClick:()=>n(u),"aria-label":`Page ${u}`,"aria-current":i===u?"page":void 0,children:u},u)),p.jsx(Ht,{disabled:f,onClick:()=>!f&&n(i+1),"aria-label":"Next page",children:p.jsx(Xr,{width:20})}),p.jsxs(Ht,{disabled:f,onClick:()=>!f&&n(a),"aria-label":"Last page",isSkip:!0,children:[p.jsx(Xr,{width:16}),p.jsx(Xr,{width:16})]})]})});kb.displayName="Pagination";const Ht=l.forwardRef(({active:e,disabled:t,isSkip:n,children:r,className:o="",...s},i)=>{const a=`
60
- flex justify-center items-center
61
- leading-normal text-base font-medium
62
- w-9 h-9 md:w-10 md:h-10
63
- border border-transparent
64
- rounded-[10px]
65
- transition-all duration-200
66
- `,c=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",d=n?"relative [&>svg]:absolute [&>svg:first-child]:-translate-x-[3px] [&>svg:last-child]:translate-x-[3px]":"";return p.jsx("button",{ref:i,type:"button",disabled:t,className:`${a} ${c} ${d} ${o}`,...s,children:r})});Ht.displayName="PaginationItem";const Fb=Ae(["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"}}),$b=l.forwardRef(({value:e,max:t,color:n,className:r="",...o},s)=>{const i=Math.min(100,Math.max(0,e/t*100));return p.jsx("div",{ref:s,className:pe("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:p.jsx("div",{className:`progress-fill ${Fb({color:n})}`,style:{"--progress-width":`${i}%`}})})});$b.displayName="Progress";function Ka(e,[t,n]){return Math.min(n,Math.max(t,e))}function Bb(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Wu=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"}),Ub="VisuallyHidden",zu=l.forwardRef((e,t)=>p.jsx(oe.span,{...e,ref:t,style:{...Wu,...e.style}}));zu.displayName=Ub;var Hb=zu,Vb=[" ","Enter","ArrowUp","ArrowDown"],qb=[" ","Enter"],Rt="Select",[Or,_r,Wb]=ws(Rt),[nn]=Xe(Rt,[Wb,tn]),Nr=tn(),[zb,lt]=nn(Rt),[Gb,Kb]=nn(Rt),Gu=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:d,name:f,autoComplete:u,disabled:h,required:m,form:b}=e,g=Nr(t),[y,v]=l.useState(null),[x,w]=l.useState(null),[S,T]=l.useState(!1),_=Cr(d),[P,M]=nt({prop:r,defaultProp:o??!1,onChange:s,caller:Rt}),[$,k]=nt({prop:i,defaultProp:a,onChange:c,caller:Rt}),j=l.useRef(null),K=y?b||!!y.closest("form"):!0,[Z,L]=l.useState(new Set),N=Array.from(Z).map(C=>C.props.value).join(";");return p.jsx(Cs,{...g,children:p.jsxs(zb,{required:m,scope:t,trigger:y,onTriggerChange:v,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:T,contentId:Ze(),value:$,onValueChange:k,open:P,onOpenChange:M,dir:_,triggerPointerDownPosRef:j,disabled:h,children:[p.jsx(Or.Provider,{scope:t,children:p.jsx(Gb,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(C=>{L(I=>new Set(I).add(C))},[]),onNativeOptionRemove:l.useCallback(C=>{L(I=>{const O=new Set(I);return O.delete(C),O})},[]),children:n})}),K?p.jsxs(fd,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:u,value:$,onChange:C=>k(C.target.value),disabled:h,form:b,children:[$===void 0?p.jsx("option",{value:""}):null,Array.from(Z)]},N):null]})})};Gu.displayName=Rt;var Ku="SelectTrigger",Zu=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Nr(n),i=lt(Ku,n),a=i.disabled||r,c=se(t,i.onTriggerChange),d=_r(n),f=l.useRef("touch"),[u,h,m]=hd(g=>{const y=d().filter(w=>!w.disabled),v=y.find(w=>w.value===i.value),x=md(y,g,v);x!==void 0&&i.onValueChange(x.value)}),b=g=>{a||(i.onOpenChange(!0),m()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return p.jsx(Ts,{asChild:!0,...s,children:p.jsx(oe.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":pd(i.value)?"":void 0,...o,ref:c,onClick:W(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&b(g)}),onPointerDown:W(o.onPointerDown,g=>{f.current=g.pointerType;const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(b(g),g.preventDefault())}),onKeyDown:W(o.onKeyDown,g=>{const y=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(y&&g.key===" ")&&Vb.includes(g.key)&&(b(),g.preventDefault())})})})});Zu.displayName=Ku;var Yu="SelectValue",Qu=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=lt(Yu,n),{onValueNodeHasChildrenChange:d}=c,f=s!==void 0,u=se(t,c.onValueNodeChange);return Pe(()=>{d(f)},[d,f]),p.jsx(oe.span,{...a,ref:u,style:{pointerEvents:"none"},children:pd(c.value)?p.jsx(p.Fragment,{children:i}):s})});Qu.displayName=Yu;var Zb="SelectIcon",Xu=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(oe.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Xu.displayName=Zb;var Yb="SelectPortal",Ju=e=>p.jsx(Sn,{asChild:!0,...e});Ju.displayName=Yb;var Pt="SelectContent",ed=l.forwardRef((e,t)=>{const n=lt(Pt,e.__scopeSelect),[r,o]=l.useState();if(Pe(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?pr.createPortal(p.jsx(td,{scope:e.__scopeSelect,children:p.jsx(Or.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(nd,{...e,ref:t})});ed.displayName=Pt;var Ve=10,[td,ut]=nn(Pt),Qb="SelectContentImpl",Xb=Kt("SelectContent.RemoveScroll"),nd=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:d,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:y,...v}=e,x=lt(Pt,n),[w,S]=l.useState(null),[T,_]=l.useState(null),P=se(t,D=>S(D)),[M,$]=l.useState(null),[k,j]=l.useState(null),K=_r(n),[Z,L]=l.useState(!1),N=l.useRef(!1);l.useEffect(()=>{if(w)return os(w)},[w]),rs();const C=l.useCallback(D=>{const[V,...re]=K().map(J=>J.ref.current),[Y]=re.slice(-1),ee=document.activeElement;for(const J of D)if(J===ee||(J?.scrollIntoView({block:"nearest"}),J===V&&T&&(T.scrollTop=0),J===Y&&T&&(T.scrollTop=T.scrollHeight),J?.focus(),document.activeElement!==ee))return},[K,T]),I=l.useCallback(()=>C([M,w]),[C,M,w]);l.useEffect(()=>{Z&&I()},[Z,I]);const{onOpenChange:O,triggerPointerDownPosRef:A}=x;l.useEffect(()=>{if(w){let D={x:0,y:0};const V=Y=>{D={x:Math.abs(Math.round(Y.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(Y.pageY)-(A.current?.y??0))}},re=Y=>{D.x<=10&&D.y<=10?Y.preventDefault():w.contains(Y.target)||O(!1),document.removeEventListener("pointermove",V),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",re,{capture:!0})}}},[w,O,A]),l.useEffect(()=>{const D=()=>O(!1);return window.addEventListener("blur",D),window.addEventListener("resize",D),()=>{window.removeEventListener("blur",D),window.removeEventListener("resize",D)}},[O]);const[F,U]=hd(D=>{const V=K().filter(ee=>!ee.disabled),re=V.find(ee=>ee.ref.current===document.activeElement),Y=md(V,D,re);Y&&setTimeout(()=>Y.ref.current.focus())}),X=l.useCallback((D,V,re)=>{const Y=!N.current&&!re;(x.value!==void 0&&x.value===V||Y)&&($(D),Y&&(N.current=!0))},[x.value]),B=l.useCallback(()=>w?.focus(),[w]),z=l.useCallback((D,V,re)=>{const Y=!N.current&&!re;(x.value!==void 0&&x.value===V||Y)&&j(D)},[x.value]),G=r==="popper"?Mo:rd,q=G===Mo?{side:a,sideOffset:c,align:d,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:y}:{};return p.jsx(td,{scope:n,content:w,viewport:T,onViewportChange:_,itemRefCallback:X,selectedItem:M,onItemLeave:B,itemTextRefCallback:z,focusSelectedItem:I,selectedItemText:k,position:r,isPositioned:Z,searchRef:F,children:p.jsx(yr,{as:Xb,allowPinchZoom:!0,children:p.jsx(gr,{asChild:!0,trapped:x.open,onMountAutoFocus:D=>{D.preventDefault()},onUnmountAutoFocus:W(o,D=>{x.trigger?.focus({preventScroll:!0}),D.preventDefault()}),children:p.jsx(En,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:D=>D.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:p.jsx(G,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:D=>D.preventDefault(),...v,...q,onPlaced:()=>L(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:W(v.onKeyDown,D=>{const V=D.ctrlKey||D.altKey||D.metaKey;if(D.key==="Tab"&&D.preventDefault(),!V&&D.key.length===1&&U(D.key),["ArrowUp","ArrowDown","Home","End"].includes(D.key)){let Y=K().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(D.key)&&(Y=Y.slice().reverse()),["ArrowUp","ArrowDown"].includes(D.key)){const ee=D.target,J=Y.indexOf(ee);Y=Y.slice(J+1)}setTimeout(()=>C(Y)),D.preventDefault()}})})})})})})});nd.displayName=Qb;var Jb="SelectItemAlignedPosition",rd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=lt(Pt,n),i=ut(Pt,n),[a,c]=l.useState(null),[d,f]=l.useState(null),u=se(t,P=>f(P)),h=_r(n),m=l.useRef(!1),b=l.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:v,focusSelectedItem:x}=i,w=l.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&d&&g&&y&&v){const P=s.trigger.getBoundingClientRect(),M=d.getBoundingClientRect(),$=s.valueNode.getBoundingClientRect(),k=v.getBoundingClientRect();if(s.dir!=="rtl"){const ee=k.left-M.left,J=$.left-ee,ce=P.left-J,ve=P.width+ce,xe=Math.max(ve,M.width),Q=window.innerWidth-Ve,ie=Ka(J,[Ve,Math.max(Ve,Q-xe)]);a.style.minWidth=ve+"px",a.style.left=ie+"px"}else{const ee=M.right-k.right,J=window.innerWidth-$.right-ee,ce=window.innerWidth-P.right-J,ve=P.width+ce,xe=Math.max(ve,M.width),Q=window.innerWidth-Ve,ie=Ka(J,[Ve,Math.max(Ve,Q-xe)]);a.style.minWidth=ve+"px",a.style.right=ie+"px"}const j=h(),K=window.innerHeight-Ve*2,Z=g.scrollHeight,L=window.getComputedStyle(d),N=parseInt(L.borderTopWidth,10),C=parseInt(L.paddingTop,10),I=parseInt(L.borderBottomWidth,10),O=parseInt(L.paddingBottom,10),A=N+C+Z+O+I,F=Math.min(y.offsetHeight*5,A),U=window.getComputedStyle(g),X=parseInt(U.paddingTop,10),B=parseInt(U.paddingBottom,10),z=P.top+P.height/2-Ve,G=K-z,q=y.offsetHeight/2,D=y.offsetTop+q,V=N+C+D,re=A-V;if(V<=z){const ee=j.length>0&&y===j[j.length-1].ref.current;a.style.bottom="0px";const J=d.clientHeight-g.offsetTop-g.offsetHeight,ce=Math.max(G,q+(ee?B:0)+J+I),ve=V+ce;a.style.height=ve+"px"}else{const ee=j.length>0&&y===j[0].ref.current;a.style.top="0px";const ce=Math.max(z,N+g.offsetTop+(ee?X:0)+q)+re;a.style.height=ce+"px",g.scrollTop=V-z+g.offsetTop}a.style.margin=`${Ve}px 0`,a.style.minHeight=F+"px",a.style.maxHeight=K+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[h,s.trigger,s.valueNode,a,d,g,y,v,s.dir,r]);Pe(()=>w(),[w]);const[S,T]=l.useState();Pe(()=>{d&&T(window.getComputedStyle(d).zIndex)},[d]);const _=l.useCallback(P=>{P&&b.current===!0&&(w(),x?.(),b.current=!1)},[w,x]);return p.jsx(tx,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:_,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:p.jsx(oe.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});rd.displayName=Jb;var ex="SelectPopperPosition",Mo=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ve,...s}=e,i=Nr(n);return p.jsx(Rs,{...i,...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)"}})});Mo.displayName=ex;var[tx,js]=nn(Pt,{}),Io="SelectViewport",od=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=ut(Io,n),i=js(Io,n),a=se(t,s.onViewportChange),c=l.useRef(0);return p.jsxs(p.Fragment,{children:[p.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}),p.jsx(Or.Slot,{scope:n,children:p.jsx(oe.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:W(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:h}=i;if(h?.current&&u){const m=Math.abs(c.current-f.scrollTop);if(m>0){const b=window.innerHeight-Ve*2,g=parseFloat(u.style.minHeight),y=parseFloat(u.style.height),v=Math.max(g,y);if(v<b){const x=v+m,w=Math.min(b,x),S=x-w;u.style.height=w+"px",u.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,u.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});od.displayName=Io;var sd="SelectGroup",[nx,rx]=nn(sd),ox=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ze();return p.jsx(nx,{scope:n,id:o,children:p.jsx(oe.div,{role:"group","aria-labelledby":o,...r,ref:t})})});ox.displayName=sd;var ad="SelectLabel",sx=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=rx(ad,n);return p.jsx(oe.div,{id:o.id,...r,ref:t})});sx.displayName=ad;var lr="SelectItem",[ax,id]=nn(lr),cd=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=lt(lr,n),c=ut(lr,n),d=a.value===r,[f,u]=l.useState(s??""),[h,m]=l.useState(!1),b=se(t,x=>c.itemRefCallback?.(x,r,o)),g=Ze(),y=l.useRef("touch"),v=()=>{o||(a.onValueChange(r),a.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 p.jsx(ax,{scope:n,value:r,disabled:o,textId:g,isSelected:d,onItemTextChange:l.useCallback(x=>{u(w=>w||(x?.textContent??"").trim())},[]),children:p.jsx(Or.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:p.jsx(oe.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,onFocus:W(i.onFocus,()=>m(!0)),onBlur:W(i.onBlur,()=>m(!1)),onClick:W(i.onClick,()=>{y.current!=="mouse"&&v()}),onPointerUp:W(i.onPointerUp,()=>{y.current==="mouse"&&v()}),onPointerDown:W(i.onPointerDown,x=>{y.current=x.pointerType}),onPointerMove:W(i.onPointerMove,x=>{y.current=x.pointerType,o?c.onItemLeave?.():y.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:W(i.onPointerLeave,x=>{x.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:W(i.onKeyDown,x=>{c.searchRef?.current!==""&&x.key===" "||(qb.includes(x.key)&&v(),x.key===" "&&x.preventDefault())})})})})});cd.displayName=lr;var dn="SelectItemText",ld=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=lt(dn,n),a=ut(dn,n),c=id(dn,n),d=Kb(dn,n),[f,u]=l.useState(null),h=se(t,v=>u(v),c.onItemTextChange,v=>a.itemTextRefCallback?.(v,c.value,c.disabled)),m=f?.textContent,b=l.useMemo(()=>p.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=d;return Pe(()=>(g(b),()=>y(b)),[g,y,b]),p.jsxs(p.Fragment,{children:[p.jsx(oe.span,{id:c.textId,...s,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?pr.createPortal(s.children,i.valueNode):null]})});ld.displayName=dn;var ud="SelectItemIndicator",ix=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return id(ud,n).isSelected?p.jsx(oe.span,{"aria-hidden":!0,...r,ref:t}):null});ix.displayName=ud;var Do="SelectScrollUpButton",cx=l.forwardRef((e,t)=>{const n=ut(Do,e.__scopeSelect),r=js(Do,e.__scopeSelect),[o,s]=l.useState(!1),i=se(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const d=c.scrollTop>0;s(d)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(dd,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});cx.displayName=Do;var jo="SelectScrollDownButton",lx=l.forwardRef((e,t)=>{const n=ut(jo,e.__scopeSelect),r=js(jo,e.__scopeSelect),[o,s]=l.useState(!1),i=se(t,r.onScrollButtonChange);return Pe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const d=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<d;s(f)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(dd,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});lx.displayName=jo;var dd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=ut("SelectScrollButton",n),i=l.useRef(null),a=_r(n),c=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Pe(()=>{a().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),p.jsx(oe.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:W(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:W(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:W(o.onPointerLeave,()=>{c()})})}),ux="SelectSeparator",dx=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(oe.div,{"aria-hidden":!0,...r,ref:t})});dx.displayName=ux;var Lo="SelectArrow",fx=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Nr(n),s=lt(Lo,n),i=ut(Lo,n);return s.open&&i.position==="popper"?p.jsx(Ps,{...o,...r,ref:t}):null});fx.displayName=Lo;var px="SelectBubbleInput",fd=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),s=se(r,o),i=Bb(t);return l.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const u=new Event("change",{bubbles:!0});f.call(a,t),a.dispatchEvent(u)}},[i,t]),p.jsx(oe.select,{...n,style:{...Wu,...n.style},ref:s,defaultValue:t})});fd.displayName=px;function pd(e){return e===""||e===void 0}function hd(e){const t=Qe(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(i=>{const a=n.current+i;t(a),(function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(a)},[t]),s=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function md(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=hx(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==n));const c=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function hx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var mx=Gu,gx=Zu,vx=Qu,yx=Xu,bx=Ju,xx=ed,wx=od,Ex=cd,Sx=ld,Cx=mx,Tx=vx,Rx=gx,Px=yx,Ax=bx,Ox=xx,_x=wx,Nx=Ex,Mx=Sx;const Ix=Ae(["inline-flex","min-w-0","max-w-full","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"}}),Dx=({id:e,value:t,defaultValue:n,onValueChange:r,placeholder:o,ariaLabel:s,"aria-labelledby":i,"aria-describedby":a,variant:c,size:d,className:f,children:u,disabled:h})=>p.jsxs(Cx,{value:t,defaultValue:n,onValueChange:r,disabled:h,children:[p.jsxs(Rx,{id:e,"aria-label":s,"aria-labelledby":i,"aria-describedby":a,className:Ix({variant:c,size:d,className:f}),children:[p.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:p.jsx(Tx,{placeholder:o})}),p.jsx(Px,{className:"shrink-0",children:p.jsx(Hm,{className:"w-3.5 h-3.5 opacity-60"})})]}),p.jsx(Ax,{children:p.jsx(gd,{children:p.jsx(_x,{className:"p-1",children:u})})})]}),gd=l.forwardRef(({className:e,children:t,...n},r)=>p.jsx(Ox,{ref:r,position:"popper",sideOffset:4,className:pe("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}));gd.displayName="SelectContent";const jx=l.forwardRef(({className:e,children:t,...n},r)=>p.jsx(Nx,{ref:r,className:pe("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:p.jsx(Mx,{children:t})}));jx.displayName="SelectItem";Dx.displayName="Select";const Za=e=>typeof e=="number"?`${e}px`:e,Qn=l.forwardRef(({width:e,height:t=30,opacity:n,className:r="",style:o,...s},i)=>p.jsx("div",{ref:i,className:pe("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":Za(e),"--skeleton-height":Za(t),"--skeleton-opacity":n,...o},...s}));Qn.displayName="Skeleton";const Lx=l.forwardRef(({checked:e,onCheckedChange:t,onClick:n,className:r,disabled:o,...s},i)=>p.jsx("button",{ref:i,type:"button",role:"switch","aria-checked":e,disabled:o,className:pe("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:a=>{n?.(a),!(a.defaultPrevented||o)&&t?.(!e)},...s,children:p.jsx("span",{"aria-hidden":"true",className:pe("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")})}));Lx.displayName="Switch";const kx=Ae(["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"}}),Fx=l.forwardRef(({className:e,variant:t,size:n,...r},o)=>p.jsx("textarea",{ref:o,className:kx({variant:t,size:n,className:e}),...r}));Fx.displayName="Textarea";var vd="Toggle",yd=l.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...s}=e,[i,a]=nt({prop:n,onChange:o,defaultProp:r??!1,caller:vd});return p.jsx(oe.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:W(e.onClick,()=>{e.disabled||a(!i)})})});yd.displayName=vd;var dt="ToggleGroup",[bd]=Xe(dt,[Tr]),xd=Tr(),Ls=R.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return p.jsx($x,{...o,ref:t})}if(n==="multiple"){const o=r;return p.jsx(Bx,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${dt}\``)});Ls.displayName=dt;var[wd,Ed]=bd(dt),$x=R.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,a]=nt({prop:n,defaultProp:r??"",onChange:o,caller:dt});return p.jsx(wd,{scope:e.__scopeToggleGroup,type:"single",value:R.useMemo(()=>i?[i]:[],[i]),onItemActivate:a,onItemDeactivate:R.useCallback(()=>a(""),[a]),children:p.jsx(Sd,{...s,ref:t})})}),Bx=R.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,a]=nt({prop:n,defaultProp:r??[],onChange:o,caller:dt}),c=R.useCallback(f=>a((u=[])=>[...u,f]),[a]),d=R.useCallback(f=>a((u=[])=>u.filter(h=>h!==f)),[a]);return p.jsx(wd,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:d,children:p.jsx(Sd,{...s,ref:t})})});Ls.displayName=dt;var[Ux,Hx]=bd(dt),Sd=R.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:s,dir:i,loop:a=!0,...c}=e,d=xd(n),f=Cr(i),u={role:"group",dir:f,...c};return p.jsx(Ux,{scope:n,rovingFocus:o,disabled:r,children:o?p.jsx(Gl,{asChild:!0,...d,orientation:s,dir:f,loop:a,children:p.jsx(oe.div,{...u,ref:t})}):p.jsx(oe.div,{...u,ref:t})})}),ur="ToggleGroupItem",Cd=R.forwardRef((e,t)=>{const n=Ed(ur,e.__scopeToggleGroup),r=Hx(ur,e.__scopeToggleGroup),o=xd(e.__scopeToggleGroup),s=n.value.includes(e.value),i=r.disabled||e.disabled,a={...e,pressed:s,disabled:i},c=R.useRef(null);return r.rovingFocus?p.jsx(Kl,{asChild:!0,...o,focusable:!i,active:s,ref:c,children:p.jsx(Ya,{...a,ref:t})}):p.jsx(Ya,{...a,ref:t})});Cd.displayName=ur;var Ya=R.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,s=Ed(ur,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},a=s.type==="single"?i:void 0;return p.jsx(yd,{...a,...o,ref:t,onPressedChange:c=>{c?s.onItemActivate(r):s.onItemDeactivate(r)}})}),Vx=Ls,qx=Cd,Wx=Vx,zx=qx;const Gx=Ae(["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"}}),Kx=Ae(["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"}}),Td=l.createContext({}),Zx=l.forwardRef(({className:e,variant:t,size:n,children:r,...o},s)=>p.jsx(Td.Provider,{value:{variant:t??"default",size:n??"md"},children:p.jsx(Wx,{ref:s,className:Gx({variant:t,className:e}),...o,children:r})}));Zx.displayName="ToggleGroup";const Yx=l.forwardRef(({className:e,activeClassName:t,children:n,...r},o)=>{const s=l.useContext(Td);return p.jsx(zx,{ref:o,className:Kx({variant:s.variant,size:s.size,className:pe(e,t)}),...r,children:n})});Yx.displayName="ToggleGroupItem";var[Mr]=Xe("Tooltip",[tn]),Ir=tn(),Rd="TooltipProvider",Qx=700,ko="tooltip.open",[Xx,ks]=Mr(Rd),Pd=e=>{const{__scopeTooltip:t,delayDuration:n=Qx,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=l.useRef(!0),a=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),p.jsx(Xx,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:l.useCallback(d=>{a.current=d},[]),disableHoverableContent:o,children:s})};Pd.displayName=Rd;var yn="Tooltip",[Jx,Mn]=Mr(yn),Ad=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=ks(yn,e.__scopeTooltip),d=Ir(t),[f,u]=l.useState(null),h=Ze(),m=l.useRef(0),b=i??c.disableHoverableContent,g=a??c.delayDuration,y=l.useRef(!1),[v,x]=nt({prop:r,defaultProp:o??!1,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(ko))):c.onClose(),s?.(P)},caller:yn}),w=l.useMemo(()=>v?y.current?"delayed-open":"instant-open":"closed",[v]),S=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,x(!0)},[x]),T=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),_=l.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,x(!0),m.current=0},g)},[g,x]);return l.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),p.jsx(Cs,{...d,children:p.jsx(Jx,{scope:t,contentId:h,open:v,stateAttribute:w,trigger:f,onTriggerChange:u,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?_():S()},[c.isOpenDelayedRef,_,S]),onTriggerLeave:l.useCallback(()=>{b?T():(window.clearTimeout(m.current),m.current=0)},[T,b]),onOpen:S,onClose:T,disableHoverableContent:b,children:n})})};Ad.displayName=yn;var Fo="TooltipTrigger",Od=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Mn(Fo,n),s=ks(Fo,n),i=Ir(n),a=l.useRef(null),c=se(t,a,o.onTriggerChange),d=l.useRef(!1),f=l.useRef(!1),u=l.useCallback(()=>d.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),p.jsx(Ts,{asChild:!0,...i,children:p.jsx(oe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:W(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:W(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:W(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:W(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:W(e.onBlur,o.onClose),onClick:W(e.onClick,o.onClose)})})});Od.displayName=Fo;var Fs="TooltipPortal",[ew,tw]=Mr(Fs,{forceMount:void 0}),_d=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Mn(Fs,t);return p.jsx(ew,{scope:t,forceMount:n,children:p.jsx(Je,{present:n||s.open,children:p.jsx(Sn,{asChild:!0,container:o,children:r})})})};_d.displayName=Fs;var Qt="TooltipContent",Nd=l.forwardRef((e,t)=>{const n=tw(Qt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Mn(Qt,e.__scopeTooltip);return p.jsx(Je,{present:r||i.open,children:i.disableHoverableContent?p.jsx(Md,{side:o,...s,ref:t}):p.jsx(nw,{side:o,...s,ref:t})})}),nw=l.forwardRef((e,t)=>{const n=Mn(Qt,e.__scopeTooltip),r=ks(Qt,e.__scopeTooltip),o=l.useRef(null),s=se(t,o),[i,a]=l.useState(null),{trigger:c,onClose:d}=n,f=o.current,{onPointerInTransitChange:u}=r,h=l.useCallback(()=>{a(null),u(!1)},[u]),m=l.useCallback((b,g)=>{const y=b.currentTarget,v={x:b.clientX,y:b.clientY},x=iw(v,y.getBoundingClientRect()),w=cw(v,x),S=lw(g.getBoundingClientRect()),T=dw([...w,...S]);a(T),u(!0)},[u]);return l.useEffect(()=>()=>h(),[h]),l.useEffect(()=>{if(c&&f){const b=y=>m(y,f),g=y=>m(y,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",g)}}},[c,f,m,h]),l.useEffect(()=>{if(i){const b=g=>{const y=g.target,v={x:g.clientX,y:g.clientY},x=c?.contains(y)||f?.contains(y),w=!uw(v,i);x?h():w&&(h(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,i,d,h]),p.jsx(Md,{...e,ref:s})}),[rw,ow]=Mr(yn,{isInside:!1}),sw=$i("TooltipContent"),Md=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=Mn(Qt,n),d=Ir(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(ko,f),()=>document.removeEventListener(ko,f)),[f]),l.useEffect(()=>{if(c.trigger){const u=h=>{h.target?.contains(c.trigger)&&f()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[c.trigger,f]),p.jsx(En,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:u=>u.preventDefault(),onDismiss:f,children:p.jsxs(Rs,{"data-state":c.stateAttribute,...d,...a,ref:t,style:{...a.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:[p.jsx(sw,{children:r}),p.jsx(rw,{scope:n,isInside:!0,children:p.jsx(Hb,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Nd.displayName=Qt;var Id="TooltipArrow",aw=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ir(n);return ow(Id,n).isInside?null:p.jsx(Ps,{...o,...r,ref:t})});aw.displayName=Id;function iw(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 cw(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 lw(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 uw(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],c=t[i],d=a.x,f=a.y,u=c.x,h=c.y;f>r!=h>r&&n<(u-d)*(r-f)/(h-f)+d&&(o=!o)}return o}function dw(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),fw(t)}function fw(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],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.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 pw=Pd,hw=Ad,mw=Od,gw=_d,vw=Nd,yw=pw,bw=hw,xw=mw,ww=gw,Dd=vw;const Ew=yw,Sw=bw,Cw=xw,jd=l.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(Dd,{ref:r,sideOffset:t,className:pe("z-[1200]","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}));jd.displayName=Dd.displayName;const BE=({content:e,children:t,side:n="top",delayDuration:r=200})=>p.jsx(Ew,{children:p.jsxs(Sw,{delayDuration:r,children:[p.jsx(Cw,{asChild:!0,children:t}),p.jsx(ww,{children:p.jsx(jd,{side:n,children:e})})]})}),Ld=28,Tw=[Ld,50,100];function UE(e){return Tw.includes(e)}var oo={exports:{}},so,Qa;function Rw(){if(Qa)return so;Qa=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return so=e,so}var ao,Xa;function Pw(){if(Xa)return ao;Xa=1;var e=Rw();function t(){}function n(){}return n.resetWarningCache=t,ao=function(){function r(i,a,c,d,f,u){if(u!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},ao}var Ja;function Aw(){return Ja||(Ja=1,oo.exports=Pw()()),oo.exports}var Ow=Aw();const le=Xt(Ow);var io,ei;function _w(){if(ei)return io;ei=1;function e(a){return a&&typeof a=="object"&&"default"in a?a.default:a}var t=uf(),n=e(t);function r(a,c,d){return c in a?Object.defineProperty(a,c,{value:d,enumerable:!0,configurable:!0,writable:!0}):a[c]=d,a}function o(a,c){a.prototype=Object.create(c.prototype),a.prototype.constructor=a,a.__proto__=c}var s=!!(typeof window<"u"&&window.document&&window.document.createElement);function i(a,c,d){if(typeof a!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof c!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof d<"u"&&typeof d!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function f(u){return u.displayName||u.name||"Component"}return function(h){if(typeof h!="function")throw new Error("Expected WrappedComponent to be a React component.");var m=[],b;function g(){b=a(m.map(function(v){return v.props})),y.canUseDOM?c(b):d&&(b=d(b))}var y=(function(v){o(x,v);function x(){return v.apply(this,arguments)||this}x.peek=function(){return b},x.rewind=function(){if(x.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var T=b;return b=void 0,m=[],T};var w=x.prototype;return w.UNSAFE_componentWillMount=function(){m.push(this),g()},w.componentDidUpdate=function(){g()},w.componentWillUnmount=function(){var T=m.indexOf(this);m.splice(T,1),g()},w.render=function(){return n.createElement(h,this.props)},x})(t.PureComponent);return r(y,"displayName","SideEffect("+f(h)+")"),r(y,"canUseDOM",s),y}}return io=i,io}var Nw=_w();const Mw=Xt(Nw);var co,ti;function Iw(){if(ti)return co;ti=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(s,i){if(s===i)return!0;if(s&&i&&typeof s=="object"&&typeof i=="object"){if(s.constructor!==i.constructor)return!1;var a,c,d;if(Array.isArray(s)){if(a=s.length,a!=i.length)return!1;for(c=a;c--!==0;)if(!o(s[c],i[c]))return!1;return!0}var f;if(t&&s instanceof Map&&i instanceof Map){if(s.size!==i.size)return!1;for(f=s.entries();!(c=f.next()).done;)if(!i.has(c.value[0]))return!1;for(f=s.entries();!(c=f.next()).done;)if(!o(c.value[1],i.get(c.value[0])))return!1;return!0}if(n&&s instanceof Set&&i instanceof Set){if(s.size!==i.size)return!1;for(f=s.entries();!(c=f.next()).done;)if(!i.has(c.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(s)&&ArrayBuffer.isView(i)){if(a=s.length,a!=i.length)return!1;for(c=a;c--!==0;)if(s[c]!==i[c])return!1;return!0}if(s.constructor===RegExp)return s.source===i.source&&s.flags===i.flags;if(s.valueOf!==Object.prototype.valueOf&&typeof s.valueOf=="function"&&typeof i.valueOf=="function")return s.valueOf()===i.valueOf();if(s.toString!==Object.prototype.toString&&typeof s.toString=="function"&&typeof i.toString=="function")return s.toString()===i.toString();if(d=Object.keys(s),a=d.length,a!==Object.keys(i).length)return!1;for(c=a;c--!==0;)if(!Object.prototype.hasOwnProperty.call(i,d[c]))return!1;if(e&&s instanceof Element)return!1;for(c=a;c--!==0;)if(!((d[c]==="_owner"||d[c]==="__v"||d[c]==="__o")&&s.$$typeof)&&!o(s[d[c]],i[d[c]]))return!1;return!0}return s!==s&&i!==i}return co=function(i,a){try{return o(i,a)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},co}var Dw=Iw();const jw=Xt(Dw);var lo,ni;function Lw(){if(ni)return lo;ni=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 i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return lo=o()?Object.assign:function(s,i){for(var a,c=r(s),d,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var u in a)t.call(a,u)&&(c[u]=a[u]);if(e){d=e(a);for(var h=0;h<d.length;h++)n.call(a,d[h])&&(c[d[h]]=a[d[h]])}}return c},lo}var kw=Lw();const Fw=Xt(kw);var bt={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},te={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(te).map(function(e){return te[e]});var ue={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"},dr={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},bn={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},$w=Object.keys(dr).reduce(function(e,t){return e[dr[t]]=t,e},{}),Bw=[te.NOSCRIPT,te.SCRIPT,te.STYLE],qe="data-react-helmet",Uw=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},Hw=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Vw=(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}})(),Ne=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},qw=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)},ri=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},Ww=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},$o=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;")},zw=function(t){var n=Wt(t,te.TITLE),r=Wt(t,bn.TITLE_TEMPLATE);if(r&&n)return r.replace(/%s/g,function(){return Array.isArray(n)?n.join(""):n});var o=Wt(t,bn.DEFAULT_TITLE);return n||o||void 0},Gw=function(t){return Wt(t,bn.ON_CHANGE_CLIENT_STATE)||function(){}},uo=function(t,n){return n.filter(function(r){return typeof r[t]<"u"}).map(function(r){return r[t]}).reduce(function(r,o){return Ne({},r,o)},{})},Kw=function(t,n){return n.filter(function(r){return typeof r[te.BASE]<"u"}).map(function(r){return r[te.BASE]}).reverse().reduce(function(r,o){if(!r.length)for(var s=Object.keys(o),i=0;i<s.length;i++){var a=s[i],c=a.toLowerCase();if(t.indexOf(c)!==-1&&o[c])return r.concat(o)}return r},[])},cn=function(t,n,r){var o={};return r.filter(function(s){return Array.isArray(s[t])?!0:(typeof s[t]<"u"&&Xw("Helmet: "+t+' should be of type "Array". Instead found type "'+Uw(s[t])+'"'),!1)}).map(function(s){return s[t]}).reverse().reduce(function(s,i){var a={};i.filter(function(h){for(var m=void 0,b=Object.keys(h),g=0;g<b.length;g++){var y=b[g],v=y.toLowerCase();n.indexOf(v)!==-1&&!(m===ue.REL&&h[m].toLowerCase()==="canonical")&&!(v===ue.REL&&h[v].toLowerCase()==="stylesheet")&&(m=v),n.indexOf(y)!==-1&&(y===ue.INNER_HTML||y===ue.CSS_TEXT||y===ue.ITEM_PROP)&&(m=y)}if(!m||!h[m])return!1;var x=h[m].toLowerCase();return o[m]||(o[m]={}),a[m]||(a[m]={}),o[m][x]?!1:(a[m][x]=!0,!0)}).reverse().forEach(function(h){return s.push(h)});for(var c=Object.keys(a),d=0;d<c.length;d++){var f=c[d],u=Fw({},o[f],a[f]);o[f]=u}return s},[]).reverse()},Wt=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},Zw=function(t){return{baseTag:Kw([ue.HREF,ue.TARGET],t),bodyAttributes:uo(bt.BODY,t),defer:Wt(t,bn.DEFER),encode:Wt(t,bn.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:uo(bt.HTML,t),linkTags:cn(te.LINK,[ue.REL,ue.HREF],t),metaTags:cn(te.META,[ue.NAME,ue.CHARSET,ue.HTTPEQUIV,ue.PROPERTY,ue.ITEM_PROP],t),noscriptTags:cn(te.NOSCRIPT,[ue.INNER_HTML],t),onChangeClientState:Gw(t),scriptTags:cn(te.SCRIPT,[ue.SRC,ue.INNER_HTML],t),styleTags:cn(te.STYLE,[ue.CSS_TEXT],t),title:zw(t),titleAttributes:uo(bt.TITLE,t)}},Bo=(function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout(function(){Bo(t)},0)}})(),oi=function(t){return clearTimeout(t)},Yw=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Bo:global.requestAnimationFrame||Bo,Qw=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||oi:global.cancelAnimationFrame||oi,Xw=function(t){return console&&typeof console.warn=="function"&&console.warn(t)},ln=null,Jw=function(t){ln&&Qw(ln),t.defer?ln=Yw(function(){si(t,function(){ln=null})}):(si(t),ln=null)},si=function(t,n){var r=t.baseTag,o=t.bodyAttributes,s=t.htmlAttributes,i=t.linkTags,a=t.metaTags,c=t.noscriptTags,d=t.onChangeClientState,f=t.scriptTags,u=t.styleTags,h=t.title,m=t.titleAttributes;Uo(te.BODY,o),Uo(te.HTML,s),e1(h,m);var b={baseTag:Bt(te.BASE,r),linkTags:Bt(te.LINK,i),metaTags:Bt(te.META,a),noscriptTags:Bt(te.NOSCRIPT,c),scriptTags:Bt(te.SCRIPT,f),styleTags:Bt(te.STYLE,u)},g={},y={};Object.keys(b).forEach(function(v){var x=b[v],w=x.newTags,S=x.oldTags;w.length&&(g[v]=w),S.length&&(y[v]=b[v].oldTags)}),n&&n(),d(t,g,y)},kd=function(t){return Array.isArray(t)?t.join(""):t},e1=function(t,n){typeof t<"u"&&document.title!==t&&(document.title=kd(t)),Uo(te.TITLE,n)},Uo=function(t,n){var r=document.getElementsByTagName(t)[0];if(r){for(var o=r.getAttribute(qe),s=o?o.split(","):[],i=[].concat(s),a=Object.keys(n),c=0;c<a.length;c++){var d=a[c],f=n[d]||"";r.getAttribute(d)!==f&&r.setAttribute(d,f),s.indexOf(d)===-1&&s.push(d);var u=i.indexOf(d);u!==-1&&i.splice(u,1)}for(var h=i.length-1;h>=0;h--)r.removeAttribute(i[h]);s.length===i.length?r.removeAttribute(qe):r.getAttribute(qe)!==a.join(",")&&r.setAttribute(qe,a.join(","))}},Bt=function(t,n){var r=document.head||document.querySelector(te.HEAD),o=r.querySelectorAll(t+"["+qe+"]"),s=Array.prototype.slice.call(o),i=[],a=void 0;return n&&n.length&&n.forEach(function(c){var d=document.createElement(t);for(var f in c)if(c.hasOwnProperty(f))if(f===ue.INNER_HTML)d.innerHTML=c.innerHTML;else if(f===ue.CSS_TEXT)d.styleSheet?d.styleSheet.cssText=c.cssText:d.appendChild(document.createTextNode(c.cssText));else{var u=typeof c[f]>"u"?"":c[f];d.setAttribute(f,u)}d.setAttribute(qe,"true"),s.some(function(h,m){return a=m,d.isEqualNode(h)})?s.splice(a,1):i.push(d)}),s.forEach(function(c){return c.parentNode.removeChild(c)}),i.forEach(function(c){return r.appendChild(c)}),{oldTags:s,newTags:i}},Fd=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},"")},t1=function(t,n,r,o){var s=Fd(r),i=kd(n);return s?"<"+t+" "+qe+'="true" '+s+">"+$o(i,o)+"</"+t+">":"<"+t+" "+qe+'="true">'+$o(i,o)+"</"+t+">"},n1=function(t,n,r){return n.reduce(function(o,s){var i=Object.keys(s).filter(function(d){return!(d===ue.INNER_HTML||d===ue.CSS_TEXT)}).reduce(function(d,f){var u=typeof s[f]>"u"?f:f+'="'+$o(s[f],r)+'"';return d?d+" "+u:u},""),a=s.innerHTML||s.cssText||"",c=Bw.indexOf(t)===-1;return o+"<"+t+" "+qe+'="true" '+i+(c?"/>":">"+a+"</"+t+">")},"")},$d=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[dr[o]||o]=t[o],r},n)},r1=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[$w[o]||o]=t[o],r},n)},o1=function(t,n,r){var o,s=(o={key:n},o[qe]=!0,o),i=$d(r,s);return[R.createElement(te.TITLE,i,n)]},s1=function(t,n){return n.map(function(r,o){var s,i=(s={key:o},s[qe]=!0,s);return Object.keys(r).forEach(function(a){var c=dr[a]||a;if(c===ue.INNER_HTML||c===ue.CSS_TEXT){var d=r.innerHTML||r.cssText;i.dangerouslySetInnerHTML={__html:d}}else i[c]=r[a]}),R.createElement(t,i)})},tt=function(t,n,r){switch(t){case te.TITLE:return{toComponent:function(){return o1(t,n.title,n.titleAttributes)},toString:function(){return t1(t,n.title,n.titleAttributes,r)}};case bt.BODY:case bt.HTML:return{toComponent:function(){return $d(n)},toString:function(){return Fd(n)}};default:return{toComponent:function(){return s1(t,n)},toString:function(){return n1(t,n,r)}}}},Bd=function(t){var n=t.baseTag,r=t.bodyAttributes,o=t.encode,s=t.htmlAttributes,i=t.linkTags,a=t.metaTags,c=t.noscriptTags,d=t.scriptTags,f=t.styleTags,u=t.title,h=u===void 0?"":u,m=t.titleAttributes;return{base:tt(te.BASE,n,o),bodyAttributes:tt(bt.BODY,r,o),htmlAttributes:tt(bt.HTML,s,o),link:tt(te.LINK,i,o),meta:tt(te.META,a,o),noscript:tt(te.NOSCRIPT,c,o),script:tt(te.SCRIPT,d,o),style:tt(te.STYLE,f,o),title:tt(te.TITLE,{title:h,titleAttributes:m},o)}},a1=function(t){var n,r;return r=n=(function(o){qw(s,o);function s(){return Hw(this,s),Ww(this,o.apply(this,arguments))}return s.prototype.shouldComponentUpdate=function(a){return!jw(this.props,a)},s.prototype.mapNestedChildrenToProps=function(a,c){if(!c)return null;switch(a.type){case te.SCRIPT:case te.NOSCRIPT:return{innerHTML:c};case te.STYLE:return{cssText:c}}throw new Error("<"+a.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},s.prototype.flattenArrayTypeChildren=function(a){var c,d=a.child,f=a.arrayTypeChildren,u=a.newChildProps,h=a.nestedChildren;return Ne({},f,(c={},c[d.type]=[].concat(f[d.type]||[],[Ne({},u,this.mapNestedChildrenToProps(d,h))]),c))},s.prototype.mapObjectTypeChildren=function(a){var c,d,f=a.child,u=a.newProps,h=a.newChildProps,m=a.nestedChildren;switch(f.type){case te.TITLE:return Ne({},u,(c={},c[f.type]=m,c.titleAttributes=Ne({},h),c));case te.BODY:return Ne({},u,{bodyAttributes:Ne({},h)});case te.HTML:return Ne({},u,{htmlAttributes:Ne({},h)})}return Ne({},u,(d={},d[f.type]=Ne({},h),d))},s.prototype.mapArrayTypeChildrenToProps=function(a,c){var d=Ne({},c);return Object.keys(a).forEach(function(f){var u;d=Ne({},d,(u={},u[f]=a[f],u))}),d},s.prototype.warnOnInvalidChildren=function(a,c){return!0},s.prototype.mapChildrenToProps=function(a,c){var d=this,f={};return R.Children.forEach(a,function(u){if(!(!u||!u.props)){var h=u.props,m=h.children,b=ri(h,["children"]),g=r1(b);switch(d.warnOnInvalidChildren(u,m),u.type){case te.LINK:case te.META:case te.NOSCRIPT:case te.SCRIPT:case te.STYLE:f=d.flattenArrayTypeChildren({child:u,arrayTypeChildren:f,newChildProps:g,nestedChildren:m});break;default:c=d.mapObjectTypeChildren({child:u,newProps:c,newChildProps:g,nestedChildren:m});break}}}),c=this.mapArrayTypeChildrenToProps(f,c),c},s.prototype.render=function(){var a=this.props,c=a.children,d=ri(a,["children"]),f=Ne({},d);return c&&(f=this.mapChildrenToProps(c,f)),R.createElement(t,f)},Vw(s,null,[{key:"canUseDOM",set:function(a){t.canUseDOM=a}}]),s})(R.Component),n.propTypes={base:le.object,bodyAttributes:le.object,children:le.oneOfType([le.arrayOf(le.node),le.node]),defaultTitle:le.string,defer:le.bool,encodeSpecialCharacters:le.bool,htmlAttributes:le.object,link:le.arrayOf(le.object),meta:le.arrayOf(le.object),noscript:le.arrayOf(le.object),onChangeClientState:le.func,script:le.arrayOf(le.object),style:le.arrayOf(le.object),title:le.string,titleAttributes:le.object,titleTemplate:le.string},n.defaultProps={defer:!0,encodeSpecialCharacters:!0},n.peek=t.peek,n.rewind=function(){var o=t.rewind();return o||(o=Bd({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),o},r},i1=function(){return null},c1=Mw(Zw,Jw,Bd)(i1),Ho=a1(c1);Ho.renderStatic=Ho.rewind;function ai(e,t){return t==null?p.jsx($e,{as:"h1",variant:"heading",weight:"bold",tracking:"tighter",children:e}):typeof t=="string"||typeof t=="number"?p.jsx($e,{as:"h1",variant:"heading",weight:"bold",tracking:"tighter",children:t}):p.jsx("div",{role:"heading","aria-level":1,children:t})}function ii(e){return e==null?null:typeof e=="string"||typeof e=="number"?p.jsx($e,{as:"p",variant:"meta",weight:"medium",tone:"tertiary",className:"mt-1",children:e}):p.jsx("div",{className:"mt-1",children:e})}function $s({title:e,heading:t,variant:n="default",description:r,headerRight:o,children:s}){return p.jsxs(p.Fragment,{children:[p.jsx(Ho,{children:p.jsx("title",{children:e?`${e} | Ocean Brain`:"Ocean Brain"})}),n==="default"&&p.jsx("div",{className:"mb-5 border-b border-border-subtle/80 pb-4",children:p.jsxs("div",{className:o?"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between":void 0,children:[p.jsxs("div",{children:[ai(e,t),ii(r)]}),o]})}),n==="subtle"&&p.jsx("div",{className:"mb-6",children:p.jsxs("div",{className:o?"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between":void 0,children:[p.jsxs("div",{children:[ai(e,t),ii(r)]}),o]})}),s]})}const Vo="An unexpected routing error occurred.",Ud=e=>typeof e=="object"&&e!==null&&"errors"in e&&Array.isArray(e.errors),l1=e=>e instanceof Error?e.message:Ud(e)?e.errors?.[0]?.message??Vo:Vo,u1=e=>{if(Ud(e))return e.errors?.[0]?.code};function Hd({title:e,error:t,description:n,onRetry:r,showBackAction:o=!0,showHomeAction:s=!0}){const i=mr(),a=Gt(),[c,d]=l.useState("idle"),f=l1(t),u=u1(t),h=async()=>{try{const m=[u,f].filter(Boolean).join(" :: ");await navigator.clipboard.writeText(m||Vo),d("copied")}catch{d("failed")}};return p.jsxs("div",{className:"rounded-[18px] border-2 border-border bg-surface p-6",children:[p.jsx($e,{as:"p",variant:"heading",weight:"bold",tracking:"tighter",children:e}),n&&p.jsx($e,{as:"p",variant:"meta",tone:"tertiary",className:"mt-2",children:n}),p.jsxs($e,{as:"div",variant:"body",tone:"secondary",className:"mt-4 rounded-[14px] border border-border-subtle bg-subtle px-3 py-2",children:[f,u&&p.jsxs($e,{as:"span",variant:"body",weight:"bold",tone:"tertiary",className:"ml-2",children:["[",u,"]"]})]}),p.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[r&&p.jsx(it,{size:"sm",onClick:r,children:"Try again"}),o&&p.jsx(it,{size:"sm",variant:"ghost",onClick:()=>a.history.back(),children:"Go back"}),s&&p.jsx(it,{size:"sm",variant:"ghost",onClick:()=>i({to:df,search:{page:1,limit:Ld,sortBy:"updatedAt",sortOrder:"desc",pinnedFirst:!1}}),children:"Go home"}),p.jsx(it,{size:"sm",variant:"ghost",onClick:h,children:c==="copied"?"Copied details":c==="failed"?"Copy failed":"Copy details"})]})]})}function HE({title:e="Loading page",description:t="Preparing route resources."}){return p.jsx($s,{title:e,description:t,variant:"none",children:p.jsxs("div",{role:"status","aria-label":e,className:"flex flex-col gap-4",children:[p.jsx(Qn,{height:"56px"}),p.jsx(Qn,{height:"220px"}),p.jsx(Qn,{height:"160px"})]})})}function VE({error:e,reset:t}){return p.jsx($s,{title:"Something went wrong",variant:"none",children:p.jsx(Hd,{title:"Route failed to render",description:"Retry the route or navigate somewhere safe.",error:e,onRetry:t})})}function qE(){return p.jsx($s,{title:"Not found",variant:"none",children:p.jsxs("div",{className:"rounded-[18px] border-2 border-border bg-surface p-6",children:[p.jsx($e,{as:"p",variant:"heading",weight:"bold",tracking:"tighter",children:"This page does not exist."}),p.jsx($e,{as:"p",variant:"meta",tone:"tertiary",className:"mt-2",children:"Check the URL or navigate from the sidebar."})]})})}const d1=(e=[],t=[])=>e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]));class f1 extends l.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidUpdate(t){this.state.error!==null&&d1(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 WE({children:e,fallback:t,errorTitle:n,errorDescription:r,resetKeys:o,renderError:s}){return p.jsx(yp,{children:({reset:i})=>p.jsx(f1,{onReset:i,resetKeys:o,fallbackRender:({error:a,resetErrorBoundary:c})=>s?s({error:a,retry:c}):p.jsx(Hd,{title:n,description:r,error:a,onRetry:c}),children:p.jsx(l.Suspense,{fallback:t,children:e})})})}const ci=e=>{let t;const n=new Set,r=(d,f)=>{const u=typeof d=="function"?d(t):d;if(!Object.is(u,t)){const h=t;t=f??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(m=>m(t,h))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d))},c=t=e(r,o,a);return a},p1=(e=>e?ci(e):ci),h1=e=>e;function m1(e,t=h1){const n=R.useSyncExternalStore(e.subscribe,R.useCallback(()=>t(e.getState()),[e,t]),R.useCallback(()=>t(e.getInitialState()),[e,t]));return R.useDebugValue(n),n}const li=e=>{const t=p1(e),n=r=>m1(t,r);return Object.assign(n,t),n},g1=(e=>e?li(e):li),Vd="theme",ui="(prefers-color-scheme: dark)";function v1(e){return e==="light"||e==="dark"}function y1(){return typeof document>"u"?null:document.documentElement}function qd(){return typeof window>"u"?null:window.localStorage}function Wd(e){const t=y1();t&&(t.classList.remove("light","dark"),t.classList.add(e))}function zd(){const e=qd()?.getItem(Vd)??null;return v1(e)?e:null}function b1({storedTheme:e,systemPrefersDark:t}){return e||(t?"dark":"light")}function x1(e,t={}){Wd(e),t.persist!==!1&&qd()?.setItem(Vd,e)}function zE(e={}){const t=e.matchMedia?e.matchMedia(ui).matches:typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(ui).matches:!1,n=b1({storedTheme:zd(),systemPrefersDark:t});return Wd(n),n}const di=zd(),w1=g1(e=>({explicitTheme:di,theme:di??"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}})}}));w1.subscribe(e=>{x1(e.theme,{persist:e.explicitTheme===e.theme})});const E1=e=>({type:"error",category:"graphql",errors:e.map(t=>({code:t.extensions?.code??"GRAPHQL_ERROR",message:t.message??"GraphQL request failed",details:t}))}),S1=e=>{const t=de.isAxiosError(e)?e.response?.data?.message??e.message??"Network request failed":"Network request failed",n=de.isAxiosError(e)?e.code??(e.response?.status?`HTTP_${e.response.status}`:"NETWORK_ERROR"):"NETWORK_ERROR",r=de.isAxiosError(e)?e.response?.data:void 0;return{type:"error",category:"network",errors:[{code:n,message:t,details:r}]}},C1={async execute(e){try{const{data:t}=await de.post("/graphql",e);return t.errors&&t.errors.length>0?E1(t.errors):t.data?{type:"success",...t.data}:{type:"error",category:"graphql",errors:[{code:"EMPTY_RESPONSE",message:"GraphQL response data is empty",details:t}]}}catch(t){return S1(t)}}},T1={server:C1},R1=()=>T1.server;async function fe(e,t,n){const r=typeof e=="string"?{query:e,variables:t,operationName:n}:e;return R1().execute(r)}const P1=new Set(["content","order","layout","properties"]),A1=`query FetchNotes(
67
- $searchFilter: SearchFilterInput,
68
- $pagination: PaginationInput
69
- ) {
70
- allNotes(
71
- searchFilter: $searchFilter,
72
- pagination: $pagination
73
- ) {
74
- totalCount
75
- notes {
76
- __NOTE_ADDITIONAL_FIELDS__ id
77
- title
78
- pinned
79
- createdAt
80
- updatedAt
81
- tags {
82
- id
83
- name
84
- }
85
- }
86
- }
87
- }`,O1=e=>{if(!e||e.length===0)return"";const t=Array.from(new Set(e.filter(n=>P1.has(n))));return t.length===0?"":t.map(n=>n==="properties"?` properties {
88
- key
89
- name
90
- value
91
- valueType
92
- option { id label value color order }
93
- createdAt
94
- updatedAt
95
- }`:" "+n).join(`
96
- `)+`
97
- `};function GE({limit:e=25,offset:t=0,query:n="",sortBy:r,sortOrder:o,pinnedFirst:s,fields:i}={}){const a=O1(i),c=A1.replace("__NOTE_ADDITIONAL_FIELDS__",a);return fe(c,{searchFilter:{query:n,sortBy:r,sortOrder:o,pinnedFirst:s},pagination:{limit:e,offset:t}})}function KE({query:e="",limit:t=25,offset:n=0}={}){return fe(`query FetchTagNotes(
98
- $searchFilter: SearchFilterInput,
99
- $pagination: PaginationInput
100
- ) {
101
- tagNotes(
102
- searchFilter: $searchFilter,
103
- pagination: $pagination
104
- ) {
105
- totalCount
106
- notes {
107
- id
108
- title
109
- pinned
110
- tags {
111
- id
112
- name
113
- }
114
- createdAt
115
- updatedAt
116
- }
117
- }
118
- }`,{searchFilter:{query:e},pagination:{limit:t,offset:n}})}function ZE(e){return fe(`query FetchNote($id: ID!) {
119
- note(id: $id) {
120
- title
121
- pinned
122
- layout
123
- content
124
- createdAt
125
- updatedAt
126
- properties {
127
- key
128
- name
129
- value
130
- valueType
131
- option { id label value color order }
132
- createdAt
133
- updatedAt
134
- }
135
- }
136
- }`,{id:e})}function YE(e){return fe(`query FetchBackReferences($id: ID!) {
137
- backReferences(id: $id) {
138
- id
139
- title
140
- }
141
- }`,{id:e})}function QE(e){return fe(`query FetchImageNotes($src: String!) {
142
- imageNotes(src: $src) {
143
- id
144
- title
145
- createdAt
146
- updatedAt
147
- }
148
- }`,{src:e})}function XE({query:e="",limit:t=50,offset:n=0}={}){return fe(`query FetchNotePropertyKeys($query: String, $pagination: PaginationInput) {
149
- notePropertyKeys(query: $query, pagination: $pagination) {
150
- totalCount
151
- keys {
152
- key
153
- name
154
- valueType
155
- noteCount
156
- options { id label value color order }
157
- updatedAt
158
- }
159
- }
160
- }`,{...e?{query:e}:{},pagination:{limit:t,offset:n}})}function JE(e){return fe(`mutation CreateNotePropertyKey($input: NotePropertyDefinitionInput!) {
161
- createNotePropertyKey(input: $input) {
162
- key
163
- name
164
- valueType
165
- noteCount
166
- options { id label value color order }
167
- updatedAt
168
- }
169
- }`,{input:e})}function eS({key:e,...t}){return fe(`mutation UpdateNotePropertyKey($key: String!, $input: NotePropertyDefinitionUpdateInput!) {
170
- updateNotePropertyKey(key: $key, input: $input) {
171
- key
172
- name
173
- valueType
174
- noteCount
175
- options { id label value color order }
176
- updatedAt
177
- }
178
- }`,{key:e,input:t})}function tS({key:e,confirmImpact:t}){return fe(`mutation DeleteNotePropertyKey($key: String!, $confirmImpact: Boolean) {
179
- deleteNotePropertyKey(key: $key, confirmImpact: $confirmImpact) {
180
- key
181
- name
182
- valueType
183
- affectedNoteCount
184
- deleted
185
- }
186
- }`,{key:e,...t?{confirmImpact:!0}:{}})}function nS(e){return fe(`mutation CreateNote($note: NoteInput!) {
187
- createNote(note: $note) {
188
- id
189
- }
190
- }`,{note:e})}function rS({id:e,set:t=[],deleteKeys:n=[],editSessionId:r,expectedUpdatedAt:o,force:s}){return fe(`mutation UpdateNoteProperties(
191
- $id: ID!,
192
- $patch: NotePropertiesPatchInput!,
193
- $editSessionId: String,
194
- $expectedUpdatedAt: String!,
195
- $force: Boolean
196
- ) {
197
- updateNoteProperties(
198
- id: $id,
199
- patch: $patch,
200
- editSessionId: $editSessionId,
201
- expectedUpdatedAt: $expectedUpdatedAt,
202
- force: $force
203
- ) {
204
- id
205
- updatedAt
206
- properties {
207
- key
208
- name
209
- value
210
- valueType
211
- option { id label value color order }
212
- createdAt
213
- updatedAt
214
- }
215
- }
216
- }`,{id:e,patch:{...t.length>0?{set:t}:{},...n.length>0?{deleteKeys:n}:{}},...r?{editSessionId:r}:{},expectedUpdatedAt:o,...s?{force:!0}:{}})}const oS=({id:e,editSessionId:t,expectedUpdatedAt:n,force:r,...o})=>fe(`mutation UpdateNote($id: ID!, $note: NoteInput!, $editSessionId: String, $expectedUpdatedAt: String, $force: Boolean) {
217
- updateNote(id: $id, note: $note, editSessionId: $editSessionId, expectedUpdatedAt: $expectedUpdatedAt, force: $force) {
218
- id
219
- title
220
- updatedAt
221
- }
222
- }`,{id:e,note:o,...t?{editSessionId:t}:{},...n?{expectedUpdatedAt:n}:{},...r?{force:!0}:{}});function sS(e,t=10){return fe(`query FetchNoteSnapshots($id: ID!, $limit: Int) {
223
- noteSnapshots(id: $id, limit: $limit) {
224
- id
225
- title
226
- contentPreview
227
- createdAt
228
- meta {
229
- entrypoint
230
- label
231
- }
232
- }
233
- }`,{id:e,limit:t})}function aS(e){return fe(`query FetchNoteSnapshot($id: ID!) {
234
- noteSnapshot(id: $id) {
235
- id
236
- title
237
- contentPreview
238
- contentAsMarkdown
239
- createdAt
240
- meta {
241
- entrypoint
242
- label
243
- }
244
- }
245
- }`,{id:e})}function iS(e,t="current"){return fe(`query FetchNoteSnapshotDiff($id: ID!, $target: NoteSnapshotDiffTarget, $contextLines: Int) {
246
- noteSnapshotDiff(id: $id, target: $target, contextLines: $contextLines) {
247
- noteId
248
- mode
249
- before {
250
- kind
251
- id
252
- title
253
- createdAt
254
- updatedAt
255
- meta {
256
- entrypoint
257
- label
258
- }
259
- }
260
- after {
261
- kind
262
- id
263
- title
264
- createdAt
265
- updatedAt
266
- meta {
267
- entrypoint
268
- label
269
- }
270
- }
271
- diff {
272
- markdown
273
- changedLineCount
274
- changedCharCount
275
- beforeMarkdownSha256
276
- afterMarkdownSha256
277
- }
278
- }
279
- }`,{id:e,target:t.toUpperCase(),contextLines:3})}function cS(e,t){return fe(`mutation RestoreNoteSnapshot($id: ID!, $expectedUpdatedAt: String!) {
280
- restoreNoteSnapshot(id: $id, expectedUpdatedAt: $expectedUpdatedAt) {
281
- id
282
- title
283
- pinned
284
- layout
285
- content
286
- updatedAt
287
- }
288
- }`,{id:e,expectedUpdatedAt:t})}function lS({limit:e=25,offset:t=0}={}){return fe(`query FetchTrashedNotes($pagination: PaginationInput) {
289
- trashedNotes(pagination: $pagination) {
290
- totalCount
291
- notes {
292
- id
293
- title
294
- createdAt
295
- updatedAt
296
- deletedAt
297
- contentPreview
298
- pinned
299
- order
300
- layout
301
- tagNames
302
- }
303
- }
304
- }`,{pagination:{limit:e,offset:t}})}function uS(e){return fe(`query FetchTrashedNote($id: ID!) {
305
- trashedNote(id: $id) {
306
- id
307
- title
308
- createdAt
309
- updatedAt
310
- deletedAt
311
- contentPreview
312
- contentAsMarkdown
313
- pinned
314
- order
315
- layout
316
- tagNames
317
- }
318
- }`,{id:e})}function dS(e){return fe(`mutation RestoreTrashedNote($id: ID!) {
319
- restoreTrashedNote(id: $id) {
320
- id
321
- title
322
- pinned
323
- layout
324
- content
325
- updatedAt
326
- }
327
- }`,{id:e})}function fS(e){return fe(`mutation PurgeTrashedNote($id: ID!) {
328
- purgeTrashedNote(id: $id)
329
- }`,{id:e})}function pS(e,t){return fe(`mutation PinNote($id: ID!, $pinned: Boolean!) {
330
- pinNote(id: $id, pinned: $pinned) {
331
- id
332
- title
333
- pinned
334
- createdAt
335
- updatedAt
336
- }
337
- }`,{id:e,pinned:t})}function hS(e){return fe(`mutation DeleteNote($id: ID!) {
338
- deleteNote(id: $id)
339
- }`,{id:e})}function mS(e){return fe(`mutation ReorderNotes($notes: [NoteOrderInput!]!) {
340
- reorderNotes(notes: $notes) {
341
- id
342
- order
343
- }
344
- }`,{notes:e})}function gS(){return fe(`query FetchNoteGraph {
345
- noteGraph {
346
- nodes {
347
- id
348
- title
349
- connections
350
- updatedAt
351
- tags {
352
- id
353
- name
354
- }
355
- }
356
- links {
357
- source
358
- target
359
- }
360
- }
361
- }`)}var Xn={exports:{}},_1=Xn.exports,fi;function N1(){return fi||(fi=1,(function(e,t){(function(n,r){e.exports=r()})(_1,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",c="hour",d="day",f="week",u="month",h="quarter",m="year",b="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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 N=["th","st","nd","rd"],C=L%100;return"["+L+(N[(C-20)%10]||N[C]||N[0])+"]"}},w=function(L,N,C){var I=String(L);return!I||I.length>=N?L:""+Array(N+1-I.length).join(C)+L},S={s:w,z:function(L){var N=-L.utcOffset(),C=Math.abs(N),I=Math.floor(C/60),O=C%60;return(N<=0?"+":"-")+w(I,2,"0")+":"+w(O,2,"0")},m:function L(N,C){if(N.date()<C.date())return-L(C,N);var I=12*(C.year()-N.year())+(C.month()-N.month()),O=N.clone().add(I,u),A=C-O<0,F=N.clone().add(I+(A?-1:1),u);return+(-(I+(C-O)/(A?O-F:F-O))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:u,y:m,w:f,d,D:b,h:c,m:a,s:i,ms:s,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},T="en",_={};_[T]=x;var P="$isDayjsObject",M=function(L){return L instanceof K||!(!L||!L[P])},$=function L(N,C,I){var O;if(!N)return T;if(typeof N=="string"){var A=N.toLowerCase();_[A]&&(O=A),C&&(_[A]=C,O=A);var F=N.split("-");if(!O&&F.length>1)return L(F[0])}else{var U=N.name;_[U]=N,O=U}return!I&&O&&(T=O),O||!I&&T},k=function(L,N){if(M(L))return L.clone();var C=typeof N=="object"?N:{};return C.date=L,C.args=arguments,new K(C)},j=S;j.l=$,j.i=M,j.w=function(L,N){return k(L,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var K=(function(){function L(C){this.$L=$(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[P]=!0}var N=L.prototype;return N.parse=function(C){this.$d=(function(I){var O=I.date,A=I.utc;if(O===null)return new Date(NaN);if(j.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var F=O.match(y);if(F){var U=F[2]-1||0,X=(F[7]||"0").substring(0,3);return A?new Date(Date.UTC(F[1],U,F[3]||1,F[4]||0,F[5]||0,F[6]||0,X)):new Date(F[1],U,F[3]||1,F[4]||0,F[5]||0,F[6]||0,X)}}return new Date(O)})(C),this.init()},N.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},N.$utils=function(){return j},N.isValid=function(){return this.$d.toString()!==g},N.isSame=function(C,I){var O=k(C);return this.startOf(I)<=O&&O<=this.endOf(I)},N.isAfter=function(C,I){return k(C)<this.startOf(I)},N.isBefore=function(C,I){return this.endOf(I)<k(C)},N.$g=function(C,I,O){return j.u(C)?this[I]:this.set(O,C)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(C,I){var O=this,A=!!j.u(I)||I,F=j.p(C),U=function(re,Y){var ee=j.w(O.$u?Date.UTC(O.$y,Y,re):new Date(O.$y,Y,re),O);return A?ee:ee.endOf(d)},X=function(re,Y){return j.w(O.toDate()[re].apply(O.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(Y)),O)},B=this.$W,z=this.$M,G=this.$D,q="set"+(this.$u?"UTC":"");switch(F){case m:return A?U(1,0):U(31,11);case u:return A?U(1,z):U(0,z+1);case f:var D=this.$locale().weekStart||0,V=(B<D?B+7:B)-D;return U(A?G-V:G+(6-V),z);case d:case b:return X(q+"Hours",0);case c:return X(q+"Minutes",1);case a:return X(q+"Seconds",2);case i:return X(q+"Milliseconds",3);default:return this.clone()}},N.endOf=function(C){return this.startOf(C,!1)},N.$set=function(C,I){var O,A=j.p(C),F="set"+(this.$u?"UTC":""),U=(O={},O[d]=F+"Date",O[b]=F+"Date",O[u]=F+"Month",O[m]=F+"FullYear",O[c]=F+"Hours",O[a]=F+"Minutes",O[i]=F+"Seconds",O[s]=F+"Milliseconds",O)[A],X=A===d?this.$D+(I-this.$W):I;if(A===u||A===m){var B=this.clone().set(b,1);B.$d[U](X),B.init(),this.$d=B.set(b,Math.min(this.$D,B.daysInMonth())).$d}else U&&this.$d[U](X);return this.init(),this},N.set=function(C,I){return this.clone().$set(C,I)},N.get=function(C){return this[j.p(C)]()},N.add=function(C,I){var O,A=this;C=Number(C);var F=j.p(I),U=function(z){var G=k(A);return j.w(G.date(G.date()+Math.round(z*C)),A)};if(F===u)return this.set(u,this.$M+C);if(F===m)return this.set(m,this.$y+C);if(F===d)return U(1);if(F===f)return U(7);var X=(O={},O[a]=r,O[c]=o,O[i]=n,O)[F]||1,B=this.$d.getTime()+C*X;return j.w(B,this)},N.subtract=function(C,I){return this.add(-1*C,I)},N.format=function(C){var I=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var A=C||"YYYY-MM-DDTHH:mm:ssZ",F=j.z(this),U=this.$H,X=this.$m,B=this.$M,z=O.weekdays,G=O.months,q=O.meridiem,D=function(Y,ee,J,ce){return Y&&(Y[ee]||Y(I,A))||J[ee].slice(0,ce)},V=function(Y){return j.s(U%12||12,Y,"0")},re=q||function(Y,ee,J){var ce=Y<12?"AM":"PM";return J?ce.toLowerCase():ce};return A.replace(v,(function(Y,ee){return ee||(function(J){switch(J){case"YY":return String(I.$y).slice(-2);case"YYYY":return j.s(I.$y,4,"0");case"M":return B+1;case"MM":return j.s(B+1,2,"0");case"MMM":return D(O.monthsShort,B,G,3);case"MMMM":return D(G,B);case"D":return I.$D;case"DD":return j.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return D(O.weekdaysMin,I.$W,z,2);case"ddd":return D(O.weekdaysShort,I.$W,z,3);case"dddd":return z[I.$W];case"H":return String(U);case"HH":return j.s(U,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return re(U,X,!0);case"A":return re(U,X,!1);case"m":return String(X);case"mm":return j.s(X,2,"0");case"s":return String(I.$s);case"ss":return j.s(I.$s,2,"0");case"SSS":return j.s(I.$ms,3,"0");case"Z":return F}return null})(Y)||F.replace(":","")}))},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(C,I,O){var A,F=this,U=j.p(I),X=k(C),B=(X.utcOffset()-this.utcOffset())*r,z=this-X,G=function(){return j.m(F,X)};switch(U){case m:A=G()/12;break;case u:A=G();break;case h:A=G()/3;break;case f:A=(z-B)/6048e5;break;case d:A=(z-B)/864e5;break;case c:A=z/o;break;case a:A=z/r;break;case i:A=z/n;break;default:A=z}return O?A:j.a(A)},N.daysInMonth=function(){return this.endOf(u).$D},N.$locale=function(){return _[this.$L]},N.locale=function(C,I){if(!C)return this.$L;var O=this.clone(),A=$(C,I,!0);return A&&(O.$L=A),O},N.clone=function(){return j.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},L})(),Z=K.prototype;return k.prototype=Z,[["$ms",s],["$s",i],["$m",a],["$H",c],["$W",d],["$M",u],["$y",m],["$D",b]].forEach((function(L){Z[L[1]]=function(N){return this.$g(N,L[0],L[1])}})),k.extend=function(L,N){return L.$i||(L(N,K,k),L.$i=!0),k},k.locale=$,k.isDayjs=M,k.unix=function(L){return k(1e3*L)},k.en=_[T],k.Ls=_,k.p={},k}))})(Xn)),Xn.exports}var M1=N1();const vS=Xt(M1),qo=6e4,qn=6e4,Ut=(e,t)=>`${e} ${t}${e===1?"":"s"} ago`;function I1(e,t=Date.now()){const n=new Date(e),r=Math.max(0,Math.floor((t-n.getTime())/1e3));let o=Math.floor(r/31536e3);return o>=1?Ut(o,"year"):(o=Math.floor(r/2592e3),o>=1?Ut(o,"month"):(o=Math.floor(r/86400),o>=1?Ut(o,"day"):(o=Math.floor(r/3600),o>=1?Ut(o,"hour"):(o=Math.floor(r/60),o>=1?Ut(o,"minute"):Ut(Math.floor(r),"second")))))}function yS(e,t=Date.now()){return e===null||t-e<qo?"just now":I1(e,t)}function bS(e,t=Date.now()){if(e===null)return qn;const n=Math.max(0,t-e);if(n<qo)return qo-n;const r=n%qn;return r===0?qn:qn-r}export{qu as $,Ae as A,it as B,At as C,KE as D,Mb as E,Xo as F,Wm as G,$b as H,Db as I,Ny as J,$E as K,Lb as L,Sr as M,I1 as N,Ho as O,$s as P,WE as Q,Qr as R,Lx as S,$e as T,QE as U,BE as V,rS as W,Tb as X,Rb as Y,Hu as Z,Nb as _,Zx as a,Zo as a$,Vu as a0,w1 as a1,Xr as a2,ip as a3,ca as a4,lE as a5,cE as a6,Rp as a7,iE as a8,xn as a9,Wo as aA,k1 as aB,K1 as aC,$r as aD,Y1 as aE,po as aF,G1 as aG,V1 as aH,Z1 as aI,vi as aJ,bi as aK,Xs as aL,W1 as aM,Wn as aN,B1 as aO,Q1 as aP,hi as aQ,fo as aR,U1 as aS,q1 as aT,z1 as aU,pt as aV,H1 as aW,sE as aX,Ye as aY,Qo as aZ,Yo as a_,go as aa,pn as ab,dp as ac,Ee as ad,Ie as ae,Pi as af,fE as ag,mr as ah,pS as ai,nS as aj,hS as ak,Gt as al,bS as am,yS as an,sS as ao,iS as ap,aS as aq,GE as ar,oS as as,ZE as at,cS as au,Hd as av,zs as aw,$1 as ax,J1 as ay,X1 as az,Yx as b,Ko as b0,F1 as b1,eE as b2,ho as b3,nE as b4,tE as b5,Mf as b6,rE as b7,Nf as b8,uE as b9,gE as ba,pE as bb,hE as bc,Tw as bd,Ld as be,UE as bf,mS as bg,aE as bh,qE as bi,VE as bj,HE as bk,wi as bl,zd as bm,zE as bn,le as bo,gS as bp,pe as c,Fx as d,mE as e,de as f,fe as g,oE as h,dE as i,lS as j,kb as k,Qn as l,vS as m,YE as n,uS as o,fS as p,kE as q,dS as r,Hm as s,XE as t,mp as u,JE as v,eS as w,tS as x,Dx as y,jx as z};