ocean-brain 0.7.5 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/mcp.js +180 -736
- package/package.json +4 -1
- package/server/client/dist/assets/ArrowRight.es-C4zlc54Z.js +1 -0
- package/server/client/dist/assets/{Calendar-Bc2zJueR.js → Calendar-COrN6Hjv.js} +2 -2
- package/server/client/dist/assets/Callout-BK0K9E74.js +1 -0
- package/server/client/dist/assets/Copy.es-zm8f_XXX.js +1 -0
- package/server/client/dist/assets/Graph-BH1fzhue.js +1 -0
- package/server/client/dist/assets/{Image-DxWhlIDG.js → Image-KXuHOG4b.js} +1 -1
- package/server/client/dist/assets/Image.es-BKahRbIm.js +1 -0
- package/server/client/dist/assets/Note-C143cKKw.js +12 -0
- package/server/client/dist/assets/Plus.es-BqeC8T8h.js +1 -0
- package/server/client/dist/assets/Reminders-BYG5rz1M.js +1 -0
- package/server/client/dist/assets/Search-DBWsIMDP.js +1 -0
- package/server/client/dist/assets/{SurfaceCard-CkAVMLPs.js → SurfaceCard-CNSQfYfM.js} +1 -1
- package/server/client/dist/assets/Tag-5aCfSO8Y.js +1 -0
- package/server/client/dist/assets/TagNotes-BPZjN-6l.js +1 -0
- package/server/client/dist/assets/Trash.es-CRQkTnXZ.js +1 -0
- package/server/client/dist/assets/ViewNotes-DGLNF96x.js +1 -0
- package/server/client/dist/assets/ViewSectionDialog-CzskgmMF.js +102 -0
- package/server/client/dist/assets/Views-DR5jT23G.js +1 -0
- package/server/client/dist/assets/{graph-vendor-CUxe67Lr.js → graph-vendor-UTvF2NS_.js} +2 -2
- package/server/client/dist/assets/image.api-8dlMwzMd.js +17 -0
- package/server/client/dist/assets/{index-C5BGzDgt.css → index-BEUqDuAZ.css} +1 -1
- package/server/client/dist/assets/{index-D3BfroIT.js → index-DGIAh3ZY.js} +1 -1
- package/server/client/dist/assets/index-VHp17GQX.js +342 -0
- package/server/client/dist/assets/manage-image-RqtWKas2.js +1 -0
- package/server/client/dist/assets/{manage-image-detail-C8Q7K7I3.js → manage-image-detail-BTSIbLlQ.js} +1 -1
- package/server/client/dist/assets/mcp-EDurbggR.js +4 -0
- package/server/client/dist/assets/mcp-admin-adapter-DmGUo5G8.js +1 -0
- package/server/client/dist/assets/{note-core-Z6kqulGB.js → note-core-BklwyZHk.js} +1 -1
- package/server/client/dist/assets/{note-vendor-i1M2FSI2.js → note-vendor-DkYKUmLo.js} +1 -1
- package/server/client/dist/assets/{placeholder-Cr_nI8UI.js → placeholder-DeKgSBnC.js} +4 -4
- package/server/client/dist/assets/{properties-CvYWJWUM.js → properties-BjrZvOYn.js} +1 -1
- package/server/client/dist/assets/tag.api-Dl8DQd0m.js +21 -0
- package/server/client/dist/assets/trash-C5ntddLu.js +1 -0
- package/server/client/dist/assets/{useReminderMutate-CDmIEwsw.js → useReminderMutate-CoXXqJY2.js} +1 -1
- package/server/client/dist/index.html +5 -5
- package/server/dist/features/auth/http/login-page.js +1 -1
- package/server/dist/features/image/http/upload.js +34 -23
- package/server/dist/features/image/http/upload.js.map +1 -1
- package/server/dist/features/image/services/validation.js +111 -0
- package/server/dist/features/image/services/validation.js.map +1 -0
- package/server/dist/features/mcp-admin/http/handlers.js +11 -3
- package/server/dist/features/mcp-admin/http/handlers.js.map +1 -1
- package/server/dist/features/note/http/mcp.js +8 -43
- package/server/dist/features/note/http/mcp.js.map +1 -1
- package/server/dist/features/note/services/cleanup.js +2 -2
- package/server/dist/features/note/services/cleanup.js.map +1 -1
- package/server/dist/features/note/services/markdown-intent-write.js +11 -43
- package/server/dist/features/note/services/markdown-intent-write.js.map +1 -1
- package/server/dist/features/note/services/markdown-patch.js +4 -123
- package/server/dist/features/note/services/markdown-patch.js.map +1 -1
- package/server/dist/features/note/services/write.js +13 -13
- package/server/dist/features/note/services/write.js.map +1 -1
- package/server/dist/features/tag/graphql/tag.query.resolver.js +16 -1
- package/server/dist/features/tag/graphql/tag.query.resolver.js.map +1 -1
- package/server/dist/features/tag/graphql/tag.type-defs.js +2 -0
- package/server/dist/features/tag/graphql/tag.type-defs.js.map +1 -1
- package/server/dist/modules/app-version.js +105 -0
- package/server/dist/modules/app-version.js.map +1 -0
- package/server/dist/modules/mcp-auth.js +62 -1
- package/server/dist/modules/mcp-auth.js.map +1 -1
- package/server/dist/paths.js +1 -0
- package/server/dist/paths.js.map +1 -1
- package/server/dist/routes/api.js +2 -8
- package/server/dist/routes/api.js.map +1 -1
- package/server/dist/routes/client.js +51 -1
- package/server/dist/routes/client.js.map +1 -1
- package/server/client/dist/assets/Callout-B4kA_Cvr.js +0 -1
- package/server/client/dist/assets/Graph-uq5jfJgt.js +0 -1
- package/server/client/dist/assets/Image.es-BpAOJjJT.js +0 -1
- package/server/client/dist/assets/Note-Bo8ZYRP-.js +0 -22
- package/server/client/dist/assets/Plus.es-Dc_js8AC.js +0 -1
- package/server/client/dist/assets/Reminders-lj7Equld.js +0 -1
- package/server/client/dist/assets/Search-1wcRO5--.js +0 -1
- package/server/client/dist/assets/Tag-CeygwFfv.js +0 -1
- package/server/client/dist/assets/TagNotes-B8DqItxw.js +0 -1
- package/server/client/dist/assets/Trash.es-OuQVb_SX.js +0 -1
- package/server/client/dist/assets/ViewNotes-BH7PbdOD.js +0 -1
- package/server/client/dist/assets/ViewSectionTableRenderer-BJwhd5be.js +0 -102
- package/server/client/dist/assets/Views-eYFtsdFj.js +0 -1
- package/server/client/dist/assets/image.api-C0eYGCeH.js +0 -17
- package/server/client/dist/assets/index-jIfkRdY_.js +0 -361
- package/server/client/dist/assets/manage-image-C0YwkLIP.js +0 -1
- package/server/client/dist/assets/mcp-DHHhTLC8.js +0 -1
- package/server/client/dist/assets/trash-DA27aW7L.js +0 -1
- package/server/dist/features/image/services/remote-fetch.js +0 -176
- package/server/dist/features/image/services/remote-fetch.js.map +0 -1
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Calendar-COrN6Hjv.js","assets/note-vendor-DkYKUmLo.js","assets/graph-vendor-UTvF2NS_.js","assets/note-core-BklwyZHk.js","assets/Callout-BK0K9E74.js","assets/Views-DR5jT23G.js","assets/tag.api-Dl8DQd0m.js","assets/ViewSectionDialog-CzskgmMF.js","assets/SurfaceCard-CNSQfYfM.js","assets/ArrowRight.es-C4zlc54Z.js","assets/Plus.es-BqeC8T8h.js","assets/Reminders-BYG5rz1M.js","assets/useReminderMutate-CoXXqJY2.js","assets/Graph-BH1fzhue.js","assets/Search-DBWsIMDP.js","assets/Tag-5aCfSO8Y.js","assets/Note-C143cKKw.js","assets/image.api-8dlMwzMd.js","assets/Copy.es-zm8f_XXX.js","assets/TagNotes-BPZjN-6l.js","assets/ViewNotes-DGLNF96x.js","assets/index-DGIAh3ZY.js","assets/mcp-admin-adapter-DmGUo5G8.js","assets/Image.es-BKahRbIm.js","assets/Trash.es-CRQkTnXZ.js","assets/mcp-EDurbggR.js","assets/trash-C5ntddLu.js","assets/manage-image-RqtWKas2.js","assets/Image-KXuHOG4b.js","assets/manage-image-detail-BTSIbLlQ.js","assets/properties-BjrZvOYn.js","assets/placeholder-DeKgSBnC.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as g,w as u1,r as Zt,R as lu,a as ri,c as d1,u as f1,o as h1,s as p1,f as m1,b as g1,d as v1,h as y1,e as b1,l as w1,_ as Je,g as x1}from"./note-vendor-DkYKUmLo.js";import{a as u,R as ns,N as X,g as Xn,r as E1,P as De,c as ro}from"./graph-vendor-UTvF2NS_.js";import"./note-core-BklwyZHk.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();const oi={DARK:"(prefers-color-scheme: dark)",LIGHT:"(prefers-color-scheme: light)",RETINA:"(min-resolution: 2dppx)",RESPONSIVE:e=>`screen and (max-width: ${e})`},uu=e=>typeof window<"u"&&window.matchMedia?window.matchMedia(e):null,si=(e,t,n=!0)=>{const r=uu(e);n&&t(r?.matches||!1);const o=s=>{t?.(s.matches)};return r?.addEventListener("change",o),()=>{r?.removeEventListener("change",o)}},_1=(e,t=!0)=>si(oi.DARK,e,t),S1=(e,t,n=!0)=>si(oi.RESPONSIVE(e),t,n),C1={MEDIA_QUERY:oi,listenThemeChange:_1,listenResponsiveChange:S1,createMediaQuery:uu,listenMediaQueryChange:si};var je=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(je||{});function du({update:e,notify:t,unwatched:n}){return{link:r,unlink:o,propagate:s,checkDirty:i,shallowPropagate:a};function r(l,f,d){const p=f.depsTail;if(p!==void 0&&p.dep===l)return;const h=p!==void 0?p.nextDep:f.deps;if(h!==void 0&&h.dep===l){h.version=d,f.depsTail=h;return}const y=l.subsTail;if(y!==void 0&&y.version===d&&y.sub===f)return;const m=f.depsTail=l.subsTail={version:d,dep:l,sub:f,prevDep:p,nextDep:h,prevSub:y,nextSub:void 0};h!==void 0&&(h.prevDep=m),p!==void 0?p.nextDep=m:f.deps=m,y!==void 0?y.nextSub=m:l.subs=m}function o(l,f=l.sub){const d=l.dep,p=l.prevDep,h=l.nextDep,y=l.nextSub,m=l.prevSub;return h!==void 0?h.prevDep=p:f.depsTail=p,p!==void 0?p.nextDep=h:f.deps=h,y!==void 0?y.prevSub=m:d.subsTail=m,m!==void 0?m.nextSub=y:(d.subs=y)===void 0&&n(d),h}function s(l){let f=l.nextSub,d;e:do{const p=l.sub;let h=p.flags;if(h&60?h&12?h&4?!(h&48)&&c(l,p)?(p.flags=h|40,h&=1):h=0:p.flags=h&-9|32:h=0:p.flags=h|32,h&2&&t(p),h&1){const y=p.subs;if(y!==void 0){const m=(l=y).nextSub;m!==void 0&&(d={value:f,prev:d},f=m);continue}}if((l=f)!==void 0){f=l.nextSub;continue}for(;d!==void 0;)if(l=d.value,d=d.prev,l!==void 0){f=l.nextSub;continue e}break}while(!0)}function i(l,f){let d,p=0,h=!1;e:do{const y=l.dep,m=y.flags;if(f.flags&16)h=!0;else if((m&17)===17){if(e(y)){const v=y.subs;v.nextSub!==void 0&&a(v),h=!0}}else if((m&33)===33){(l.nextSub!==void 0||l.prevSub!==void 0)&&(d={value:l,prev:d}),l=y.deps,f=y,++p;continue}if(!h){const v=l.nextDep;if(v!==void 0){l=v;continue}}for(;p--;){const v=f.subs,b=v.nextSub!==void 0;if(b?(l=d.value,d=d.prev):l=v,h){if(e(f)){b&&a(v),f=l.sub;continue}h=!1}else f.flags&=-33;f=l.sub;const w=l.nextDep;if(w!==void 0){l=w;continue e}}return h}while(!0)}function a(l){do{const f=l.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&t(f))}while((l=l.nextSub)!==void 0)}function c(l,f){let d=f.depsTail;for(;d!==void 0;){if(d===l)return!0;d=d.prevDep}return!1}}let ai=0,fn=0,xr=0;const Ut=[],{link:nC,unlink:fu,propagate:rC,checkDirty:R1,shallowPropagate:oC}=du({update(e){return e.depsTail!==void 0?M1(e):N1(e)},notify(e){let t=xr,n=t;do if(Ut[t++]=e,e.flags&=-3,e=e.subs?.sub,e===void 0||!(e.flags&2))break;while(!0);for(xr=t;n<--t;){const r=Ut[n];Ut[n++]=Ut[t],Ut[t]=r}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,rs(e)):k1.call(e)}});function A1(){return ai}function T1(){++ai}function P1(){--ai||I1()}function M1(e){e.depsTail=void 0,e.flags=5;try{const t=e.value;return t!==(e.value=e.getter(t))}finally{e.flags&=-5,rs(e)}}function N1(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function O1(e){const t=e.flags;if(t&16||t&32&&R1(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,rs(e)}}else e.flags=2}function I1(){try{for(;fn<xr;){const e=Ut[fn];Ut[fn++]=void 0,O1(e)}}finally{for(;fn<xr;){const e=Ut[fn];Ut[fn++]=void 0,e.flags|=10}fn=0,xr=0}}function k1(){this.depsTail=void 0,this.flags=0,rs(this);const e=this.subs;e!==void 0&&fu(e)}function rs(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=fu(n,e)}function ii(e,t,n){const r=typeof e=="object",o=r?e:void 0;return{next:(r?e.next:e)?.bind(o),error:(r?e.error:t)?.bind(o),complete:(r?e.complete:n)?.bind(o)}}const ga=[];let xo=0;const{link:fc,unlink:D1,propagate:L1,checkDirty:hu,shallowPropagate:hc}=du({update(e){return e._update()},notify(e){ga[va++]=e,e.flags&=~je.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=je.Mutable|je.Dirty,Mo(e))}});let oo=0,va=0,kt;function Mo(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=D1(n,e)}function pu(){if(!(A1()>0)){for(;oo<va;){const e=ga[oo];ga[oo++]=void 0,e.notify()}oo=0,va=0}}function mu(e,t){const n=typeof e=="function",r=e,o={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?je.None:je.Mutable,get(){return kt!==void 0&&fc(o,kt,xo),o._snapshot},subscribe(s){const i=ii(s),a={current:!1},c=j1(()=>{o.get(),a.current?i.next?.(o._snapshot):a.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(s){const i=kt,a=Object.is;if(n)kt=o,++xo,o.depsTail=void 0;else if(s===void 0)return!1;n&&(o.flags=je.Mutable|je.RecursedCheck);try{const c=o._snapshot,l=typeof s=="function"?s(c):s===void 0&&n?r(c):s;return c===void 0||!a(c,l)?(o._snapshot=l,!0):!1}finally{kt=i,n&&(o.flags&=~je.RecursedCheck),Mo(o)}}};return n?(o.flags=je.Mutable|je.Dirty,o.get=function(){const s=o.flags;if(s&je.Dirty||s&je.Pending&&hu(o.deps,o)){if(o._update()){const i=o.subs;i!==void 0&&hc(i)}}else s&je.Pending&&(o.flags=s&~je.Pending);return kt!==void 0&&fc(o,kt,xo),o._snapshot}):o.set=function(s){if(o._update(s)){const i=o.subs;i!==void 0&&(L1(i),hc(i),pu())}},o}function j1(e){const t=()=>{const r=kt;kt=n,++xo,n.depsTail=void 0,n.flags=je.Watching|je.RecursedCheck;try{return e()}finally{kt=r,n.flags&=~je.RecursedCheck,Mo(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:je.Watching|je.RecursedCheck,notify(){const r=this.flags;r&je.Dirty||r&je.Pending&&hu(this.deps,this)?t():this.flags=je.Watching},stop(){this.flags=je.None,this.depsTail=void 0,Mo(this)}};return t(),n}class F1{constructor(t){this.atom=mu(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(ii(t))}}class B1{constructor(t){this.atom=mu(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(ii(t))}}function $1(e){return typeof e=="function"?new B1(e):new F1(e)}function H1(e){try{T1(),e()}finally{P1(),pu()}}const rn="__TSR_index",pc="popstate",mc="beforeunload";function z1(e){let t=e.getLocation();const n=new Set,r=i=>{t=e.getLocation(),n.forEach(a=>a({location:t,action:i}))},o=i=>{e.notifyOnIndexChange??!0?r(i):t=e.getLocation()},s=async({task:i,navigateOpts:a,...c})=>{if(a?.ignoreBlocker??!1){i();return}const f=e.getBlockers?.()??[],d=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&d)for(const p of f){const h=No(c.path,c.state);if(await p.blockerFn({currentLocation:t,nextLocation:h,action:c.type})){e.onBlocked?.();return}}i()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:i=>(n.add(i),()=>{n.delete(i)}),push:(i,a,c)=>{const l=t.state[rn];a=gc(l+1,a),s({task:()=>{e.pushState(i,a),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:i,state:a})},replace:(i,a,c)=>{const l=t.state[rn];a=gc(l,a),s({task:()=>{e.replaceState(i,a),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:i,state:a})},go:(i,a)=>{s({task:()=>{e.go(i),o({type:"GO",index:i})},navigateOpts:a,type:"GO"})},back:i=>{s({task:()=>{e.back(i?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{s({task:()=>{e.forward(i?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>t.state[rn]!==0,createHref:i=>e.createHref(i),block:i=>{if(!e.setBlockers)return()=>{};const a=e.getBlockers?.()??[];return e.setBlockers([...a,i]),()=>{const c=e.getBlockers?.()??[];e.setBlockers?.(c.filter(l=>l!==i))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function gc(e,t){t||(t={});const n=ci();return{...t,key:n,__TSR_key:n,[rn]:e}}function U1(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const s=()=>o,i=P=>o=P,a=(P=>P),c=(()=>No(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const P=ci();t.history.replaceState({[rn]:0,key:P,__TSR_key:P},"")}let l=c(),f,d=!1,p=!1,h=!1,y=!1;const m=()=>l;let v,b;const w=()=>{v&&(T._ignoreSubscribers=!0,(v.isPush?t.history.pushState:t.history.replaceState)(v.state,"",v.href),T._ignoreSubscribers=!1,v=void 0,b=void 0,f=void 0)},_=(P,N,F)=>{const z=a(N);b||(f=l),l=No(N,F),v={href:z,state:F,isPush:v?.isPush||P==="push"},b||(b=Promise.resolve().then(()=>w()))},S=P=>{l=c(),T.notify({type:P})},C=async()=>{if(p){p=!1;return}const P=c(),N=P.state[rn]-l.state[rn],F=N===1,z=N===-1,R=!F&&!z||d;d=!1;const H=R?"GO":z?"BACK":"FORWARD",x=R?{type:"GO",index:N}:{type:z?"BACK":"FORWARD"};if(h)h=!1;else{const I=s();if(typeof document<"u"&&I.length){for(const $ of I)if(await $.blockerFn({currentLocation:l,nextLocation:P,action:H})){p=!0,t.history.go(1),T.notify(x);return}}}l=c(),T.notify(x)},O=P=>{if(y){y=!1;return}let N=!1;const F=s();if(typeof document<"u"&&F.length)for(const z of F){const R=z.enableBeforeUnload??!0;if(R===!0){N=!0;break}if(typeof R=="function"&&R()===!0){N=!0;break}}if(N)return P.preventDefault(),P.returnValue=""},T=z1({getLocation:m,getLength:()=>t.history.length,pushState:(P,N)=>_("push",P,N),replaceState:(P,N)=>_("replace",P,N),back:P=>(P&&(h=!0),y=!0,t.history.back()),forward:P=>{P&&(h=!0),y=!0,t.history.forward()},go:P=>{d=!0,t.history.go(P)},createHref:P=>a(P),flush:w,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(mc,O,{capture:!0}),t.removeEventListener(pc,C)},onBlocked:()=>{f&&l!==f&&(l=f)},getBlockers:s,setBlockers:i,notifyOnIndexChange:!1});return t.addEventListener(mc,O,{capture:!0}),t.addEventListener(pc,C),t.history.pushState=function(...P){const N=n.apply(t.history,P);return T._ignoreSubscribers||S("PUSH"),N},t.history.replaceState=function(...P){const N=r.apply(t.history,P);return T._ignoreSubscribers||S("REPLACE"),N},T}function V1(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function No(e,t){const n=V1(e),r=n.indexOf("#"),o=n.indexOf("?"),s=ci();return{href:n,pathname:n.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:n.length),hash:r>-1?n.substring(r):"",search:o>-1?n.slice(o,r===-1?void 0:r):"",state:t||{[rn]:0,key:s,__TSR_key:s}}}function ci(){return(Math.random()+1).toString(36).substring(7)}const Z1=!1;function Er(e){let t;return H1(()=>{t=e()}),t}function Ar(e){return e[e.length-1]}function W1(e){return typeof e=="function"}function tn(e,t){return W1(e)?e(t):e}const q1=Object.prototype.hasOwnProperty,vc=Object.prototype.propertyIsEnumerable;function gt(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,o=wc(e)&&wc(r);if(!o&&!(Oo(e)&&Oo(r)))return r;const s=o?e:yc(e);if(!s)return r;const i=o?r:yc(r);if(!i)return r;const a=s.length,c=i.length,l=o?new Array(c):{};let f=0;for(let d=0;d<c;d++){const p=o?d:i[d],h=e[p],y=r[p];if(h===y){l[p]=h,(o?d<a:q1.call(e,p))&&f++;continue}if(h===null||y===null||typeof h!="object"||typeof y!="object"){l[p]=y;continue}const m=gt(h,y,n+1);l[p]=m,m===h&&f++}return a===c&&f===a?e:l}function yc(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!vc.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(!vc.call(e,o))return!1;r.push(o)}return r}function Oo(e){if(!bc(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!bc(n)||!n.hasOwnProperty("isPrototypeOf"))}function bc(e){return Object.prototype.toString.call(e)==="[object Object]"}function wc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vn(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(!vn(e[r],t[r],n))return!1;return!0}if(Oo(e)&&Oo(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const i in t)if((!r||t[i]!==void 0)&&!vn(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||!vn(e[i],t[i],n)))return!1;return o===s}return!1}function qn(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 K1(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 Tr(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function G1(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function xc(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 G1(t)}const Y1=["http:","https:","mailto:","tel:"];function Io(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function dr(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+=xc(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+xc(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function Q1(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var X1="Invariant failed";function an(e,t){if(!e)throw new Error(X1)}function ko(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 Kn=0,xn=1,En=2,Pr=3,hn=4,gu=5;function J1(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 li(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]=Kn,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]=En,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}if(s.charCodeAt(0)===36)return n[0]=xn,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const i=J1(s);if(i){const[a,c]=i,l=s.charCodeAt(a+1);if(l===45){if(a+2<s.length&&s.charCodeAt(a+2)===36){const f=a+3,d=c;if(f<d)return n[0]=Pr,n[1]=t+a,n[2]=t+f,n[3]=t+d,n[4]=t+c+1,n[5]=o,n}}else if(l===36){const f=a+1,d=a+2;return d===c?(n[0]=En,n[1]=t+a,n[2]=t+f,n[3]=t+d,n[4]=t+c+1,n[5]=e.length,n):(n[0]=xn,n[1]=t+a,n[2]=t+d,n[3]=t+c,n[4]=t+c+1,n[5]=o,n)}}return n[0]=Kn,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function os(e,t,n,r,o,s,i){i?.(n);let a=r;{const c=n.fullPath??n.from,l=c.length,f=n.options?.caseSensitive??e,d=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;a<l;){const h=li(c,a,t);let y;const m=a,v=h[5];switch(a=v+1,s++,h[0]){case Kn:{const w=c.substring(h[2],h[3]);if(f){const _=o.static?.get(w);if(_)y=_;else{o.static??=new Map;const S=pn(n.fullPath??n.from);S.parent=o,S.depth=s,y=S,o.static.set(w,S)}}else{const _=w.toLowerCase(),S=o.staticInsensitive?.get(_);if(S)y=S;else{o.staticInsensitive??=new Map;const C=pn(n.fullPath??n.from);C.parent=o,C.depth=s,y=C,o.staticInsensitive.set(_,C)}}break}case xn:{const w=c.substring(m,h[1]),_=c.substring(h[4],v),S=f&&!!(w||_),C=w?S?w:w.toLowerCase():void 0,O=_?S?_:_.toLowerCase():void 0,T=!d&&o.dynamic?.find(P=>!P.skipOnParamError&&P.caseSensitive===S&&P.prefix===C&&P.suffix===O);if(T)y=T;else{const P=$s(xn,n.fullPath??n.from,S,C,O);y=P,P.depth=s,P.parent=o,o.dynamic??=[],o.dynamic.push(P)}break}case Pr:{const w=c.substring(m,h[1]),_=c.substring(h[4],v),S=f&&!!(w||_),C=w?S?w:w.toLowerCase():void 0,O=_?S?_:_.toLowerCase():void 0,T=!d&&o.optional?.find(P=>!P.skipOnParamError&&P.caseSensitive===S&&P.prefix===C&&P.suffix===O);if(T)y=T;else{const P=$s(Pr,n.fullPath??n.from,S,C,O);y=P,P.parent=o,P.depth=s,o.optional??=[],o.optional.push(P)}break}case En:{const w=c.substring(m,h[1]),_=c.substring(h[4],v),S=f&&!!(w||_),C=w?S?w:w.toLowerCase():void 0,O=_?S?_:_.toLowerCase():void 0,T=$s(En,n.fullPath??n.from,S,C,O);y=T,T.parent=o,T.depth=s,o.wildcard??=[],o.wildcard.push(T)}}o=y}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const h=pn(n.fullPath??n.from);h.kind=gu,h.parent=o,s++,h.depth=s,o.pathless??=[],o.pathless.push(h),o=h}const p=(n.path||!n.children)&&!n.isRoot;if(p&&c.endsWith("/")){const h=pn(n.fullPath??n.from);h.kind=hn,h.parent=o,s++,h.depth=s,o.index=h,o=h}o.parse=n.options?.params?.parse??null,o.skipOnParamError=d,o.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,p&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const c of n.children)os(e,t,c,a,o,s,i)}function Bs(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 Jt(e){if(e.pathless)for(const t of e.pathless)Jt(t);if(e.static)for(const t of e.static.values())Jt(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Jt(t);if(e.dynamic?.length){e.dynamic.sort(Bs);for(const t of e.dynamic)Jt(t)}if(e.optional?.length){e.optional.sort(Bs);for(const t of e.optional)Jt(t)}if(e.wildcard?.length){e.wildcard.sort(Bs);for(const t of e.wildcard)Jt(t)}}function pn(e){return{kind:Kn,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 $s(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 em(e,t){const n=pn("/"),r=new Uint16Array(6);for(const o of e)os(!1,r,o,1,n,0);Jt(n),t.masksTree=n,t.flatCache=ko(1e3)}function tm(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=ui(e,t.masksTree);return t.flatCache.set(e,r),r}function nm(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let i=o.singleCache.get(s);if(!i){i=pn("/");const a=new Uint16Array(6);os(t,a,{from:e},1,i,0),o.singleCache.set(s,i)}return ui(r,i,n)}function rm(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=ui(e,t.segmentTree,n)}catch(i){if(i instanceof URIError)s=null;else throw i}return s&&(s.branch=am(s.route)),t.matchCache.set(r,s),s}function om(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function sm(e,t=!1,n){const r=pn(e.fullPath),o=new Uint16Array(6),s={},i={};let a=0;return os(t,o,e,1,r,0,l=>{if(n?.(l,a),an(!(l.id in s),`Duplicate routes found with id: ${String(l.id)}`),s[l.id]=l,a!==0&&l.path){const f=om(l.fullPath);(!i[f]||l.fullPath.endsWith("/"))&&(i[f]=l)}a++}),Jt(r),{processedTree:{segmentTree:r,singleCache:ko(1e3),matchCache:ko(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:i}}function ui(e,t,n=!1){const r=e.split("/"),o=cm(e,r,t,n);if(!o)return null;const[s]=vu(e,r,o);return{route:o.node.route,rawParams:s,parsedParams:o.parsedParams}}function vu(e,t,n){const r=im(n.node);let o=null;const s={};let i=n.extract?.part??0,a=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;a<r.length;i++,a++,c++,l++){const f=r[a];if(f.kind===hn)break;if(f.kind===gu){l--,i--,c--;continue}const d=t[i],p=c;if(d&&(c+=d.length),f.kind===xn){o??=n.node.fullPath.split("/");const h=o[l],y=f.prefix?.length??0;if(h.charCodeAt(y)===123){const v=f.suffix?.length??0,b=h.substring(y+2,h.length-v-1),w=d.substring(y,d.length-v);s[b]=decodeURIComponent(w)}else{const v=h.substring(1);s[v]=decodeURIComponent(d)}}else if(f.kind===Pr){if(n.skipped&1<<a){i--,c=p-1;continue}o??=n.node.fullPath.split("/");const h=o[l],y=f.prefix?.length??0,m=f.suffix?.length??0,v=h.substring(y+3,h.length-m-1),b=f.suffix||f.prefix?d.substring(y,d.length-m):d;b&&(s[v]=decodeURIComponent(b))}else if(f.kind===En){const h=f,y=e.substring(p+(h.prefix?.length??0),e.length-(h.suffix?.length??0)),m=decodeURIComponent(y);s["*"]=m,s._splat=m;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:i,node:a,path:c,segment:l}]}function am(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function im(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function cm(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!Ar(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,l=null,f=null;for(;a.length;){const d=a.pop(),{node:p,index:h,skipped:y,depth:m,statics:v,dynamics:b,optionals:w}=d;let{extract:_,rawParams:S,parsedParams:C}=d;if(p.skipOnParamError){if(!Hs(e,t,d))continue;S=d.rawParams,_=d.extract,C=d.parsedParams}r&&p.route&&p.kind!==hn&&fr(l,d)&&(l=d);const O=h===i;if(O&&(p.route&&!s&&fr(f,d)&&(f=d),!p.optional&&!p.wildcard&&!p.index&&!p.pathless))continue;const T=O?void 0:t[h];let P;if(O&&p.index){const N={node:p.index,index:h,skipped:y,depth:m+1,statics:v,dynamics:b,optionals:w,extract:_,rawParams:S,parsedParams:C};let F=!0;if(p.index.skipOnParamError&&(Hs(e,t,N)||(F=!1)),F){if(v===i&&!b&&!w&&!y)return N;fr(f,N)&&(f=N)}}if(p.wildcard&&fr(c,d))for(const N of p.wildcard){const{prefix:F,suffix:z}=N;if(F&&(O||!(N.caseSensitive?T:P??=T.toLowerCase()).startsWith(F)))continue;if(z){if(O)continue;const H=t.slice(h).join("/").slice(-z.length);if((N.caseSensitive?H:H.toLowerCase())!==z)continue}const R={node:N,index:i,skipped:y,depth:m,statics:v,dynamics:b,optionals:w,extract:_,rawParams:S,parsedParams:C};if(!(N.skipOnParamError&&!Hs(e,t,R))){c=R;break}}if(p.optional){const N=y|1<<m,F=m+1;for(let z=p.optional.length-1;z>=0;z--){const R=p.optional[z];a.push({node:R,index:h,skipped:N,depth:F,statics:v,dynamics:b,optionals:w,extract:_,rawParams:S,parsedParams:C})}if(!O)for(let z=p.optional.length-1;z>=0;z--){const R=p.optional[z],{prefix:H,suffix:x}=R;if(H||x){const I=R.caseSensitive?T:P??=T.toLowerCase();if(H&&!I.startsWith(H)||x&&!I.endsWith(x))continue}a.push({node:R,index:h+1,skipped:y,depth:F,statics:v,dynamics:b,optionals:w+1,extract:_,rawParams:S,parsedParams:C})}}if(!O&&p.dynamic&&T)for(let N=p.dynamic.length-1;N>=0;N--){const F=p.dynamic[N],{prefix:z,suffix:R}=F;if(z||R){const H=F.caseSensitive?T:P??=T.toLowerCase();if(z&&!H.startsWith(z)||R&&!H.endsWith(R))continue}a.push({node:F,index:h+1,skipped:y,depth:m+1,statics:v,dynamics:b+1,optionals:w,extract:_,rawParams:S,parsedParams:C})}if(!O&&p.staticInsensitive){const N=p.staticInsensitive.get(P??=T.toLowerCase());N&&a.push({node:N,index:h+1,skipped:y,depth:m+1,statics:v+1,dynamics:b,optionals:w,extract:_,rawParams:S,parsedParams:C})}if(!O&&p.static){const N=p.static.get(T);N&&a.push({node:N,index:h+1,skipped:y,depth:m+1,statics:v+1,dynamics:b,optionals:w,extract:_,rawParams:S,parsedParams:C})}if(p.pathless){const N=m+1;for(let F=p.pathless.length-1;F>=0;F--){const z=p.pathless[F];a.push({node:z,index:h,skipped:y,depth:N,statics:v,dynamics:b,optionals:w,extract:_,rawParams:S,parsedParams:C})}}}if(f&&c)return fr(c,f)?f:c;if(f)return f;if(c)return c;if(r&&l){let d=l.index;for(let h=0;h<l.index;h++)d+=t[h].length;const p=d===e.length?"/":e.slice(d);return l.rawParams??={},l.rawParams["**"]=decodeURIComponent(p),l}return null}function Hs(e,t,n){try{const[r,o]=vu(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 fr(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===hn)>(e.node.kind===hn)||t.node.kind===hn==(e.node.kind===hn)&&t.depth>e.depth))):!0}function Eo(e){return di(e.filter(t=>t!==void 0).join("/"))}function di(e){return e.replace(/\/{2,}/g,"/")}function yu(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function on(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function bu(e){return on(yu(e))}function Do(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function lm(e,t,n){return Do(e,n)===Do(t,n)}function um({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 d=r.get(i);if(d)return d}let a;if(s)a=e.split("/");else if(o)a=t.split("/");else{for(a=e.split("/");a.length>1&&Ar(a)==="";)a.pop();const d=t.split("/");for(let p=0,h=d.length;p<h;p++){const y=d[p];y===""?p?p===h-1&&a.push(y):a=[y]:y===".."?a.pop():y==="."||a.push(y)}}a.length>1&&(Ar(a)===""?n==="never"&&a.pop():n==="always"&&a.push(""));let c,l="";for(let d=0;d<a.length;d++){d>0&&(l+="/");const p=a[d];if(!p)continue;c=li(p,0,c);const h=c[0];if(h===Kn){l+=p;continue}const y=c[5],m=p.substring(0,c[1]),v=p.substring(c[4],y),b=p.substring(c[2],c[3]);h===xn?l+=m||v?`${m}{$${b}}${v}`:`$${b}`:h===En?l+=m||v?`${m}{$}${v}`:"$":l+=`${m}{-$${b}}${v}`}l=di(l);const f=l||"/";return i&&r&&r.set(i,f),f}function dm(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 zs(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=>_c(o,n)).join("/"):_c(r,n)}function Ec({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,l="";for(;a<i;){const d=a;c=li(e,d,c);const p=c[5];if(a=p+1,d===p)continue;const h=c[0];if(h===Kn){l+="/"+e.substring(d,p);continue}if(h===En){const y=t._splat;s._splat=y,s["*"]=y;const m=e.substring(d,c[1]),v=e.substring(c[4],p);if(!y){o=!0,(m||v)&&(l+="/"+m+v);continue}const b=zs("_splat",t,n);l+="/"+m+b+v;continue}if(h===xn){const y=e.substring(c[2],c[3]);!o&&!(y in t)&&(o=!0),s[y]=t[y];const m=e.substring(d,c[1]),v=e.substring(c[4],p),b=zs(y,t,n)??"undefined";l+="/"+m+b+v;continue}if(h===Pr){const y=e.substring(c[2],c[3]),m=t[y];if(m==null)continue;s[y]=m;const v=e.substring(d,c[1]),b=e.substring(c[4],p),w=zs(y,t,n)??"";l+="/"+v+w+b;continue}}return e.endsWith("/")&&(l+="/"),{usedParams:s,interpolatedPath:l||"/",isMissingParams:o}}function _c(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function wu(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function dt(e){return!!e?.isNotFound}function fm(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const ya="tsr-scroll-restoration-v1_3",hm=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function pm(){const e=fm();if(!e)return null;const t=e.getItem(ya);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=tn(r,n)||n;try{e.setItem(ya,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const so=pm(),mm=e=>e.state.__TSR_key||e.href;function gm(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Lo=!1;function vm({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:o,location:s}){let i;try{i=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(l){console.error(l);return}const a=t||window.history.state?.__TSR_key,c=i[a];Lo=!0;e:{if(r&&c&&Object.keys(c).length>0){for(const d in c){const p=c[d];if(d==="window")window.scrollTo({top:p.scrollY,left:p.scrollX,behavior:n});else if(d){const h=document.querySelector(d);h&&(h.scrollLeft=p.scrollX,h.scrollTop=p.scrollY)}}break e}const l=(s??window.location).hash.split("#",2)[1];if(l){const d=window.history.state?.__hashScrollIntoViewOptions??!0;if(d){const p=document.getElementById(l);p&&p.scrollIntoView(d)}break e}const f={top:0,left:0,behavior:n};if(window.scrollTo(f),o)for(const d of o){if(d==="window")continue;const p=typeof d=="function"?d():document.querySelector(d);p&&p.scrollTo(f)}}Lo=!1}function ym(e,t){if(!so||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!so))return;e.isScrollRestorationSetup=!0,Lo=!1;const r=e.options.getScrollRestorationKey||mm;window.history.scrollRestoration="manual";const o=s=>{if(Lo||!e.isScrollRestoring)return;let i="";if(s.target===document||s.target===window)i="window";else{const c=s.target.getAttribute("data-scroll-restoration-id");c?i=`[data-scroll-restoration-id="${c}"]`:i=gm(s.target)}const a=r(e.state.location);so.set(c=>{const l=c[a]||={},f=l[i]||={};if(i==="window")f.scrollX=window.scrollX||0,f.scrollY=window.scrollY||0;else if(i){const d=document.querySelector(i);d&&(f.scrollX=d.scrollLeft||0,f.scrollY=d.scrollTop||0)}return c})};typeof document<"u"&&document.addEventListener("scroll",hm(o,100),!0),e.subscribe("onRendered",s=>{const i=r(s.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(vm({storageKey:ya,key:i,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&so.set(a=>(a[i]||={},a)))})}function bm(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function wm(e,t=String){const n=new URLSearchParams;for(const r in e){const o=e[r];o!==void 0&&n.set(r,t(o))}return n.toString()}function Us(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function xm(e){const t=new URLSearchParams(e),n={};for(const[r,o]of t.entries()){const s=n[r];s==null?n[r]=Us(o):Array.isArray(s)?s.push(Us(o)):n[r]=[s,Us(o)]}return n}const Em=Sm(JSON.parse),_m=Cm(JSON.stringify,JSON.parse);function Sm(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=xm(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function Cm(e,t){const n=typeof t=="function";function r(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const s=wm(o,r);return s?`?${s}`:""}}const xt="__root__";function xu(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 vt(e){return e instanceof Response&&!!e.options}const ba=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},ss=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Un=(e,t,n=!0)=>{const r={...e.router.options.context??{}},o=n?t:t-1;for(let s=0;s<=o;s++){const i=e.matches[s];if(!i)continue;const a=e.router.getMatch(i.id);a&&Object.assign(r,a.__routeContext,a.__beforeLoadContext)}return r},Sc=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(i=>i.routeId===e.router.routeTree.id),o=r>=0?r:0;let s=n?e.matches.findIndex(i=>i.routeId===n):e.firstBadMatchIndex??e.matches.length-1;s<0&&(s=o);for(let i=s;i>=0;i--){const a=e.matches[i];if(e.router.looseRoutesById[a.routeId].options.notFoundComponent)return i}return n?s:o},nn=(e,t,n)=>{if(!(!vt(n)&&!dt(n)))throw vt(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:vt(n)?"redirected":r.status==="pending"?"success":r.status,context:Un(e,t.index),isFetching:!1,error:n})),dt(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),vt(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},Eu=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,hr=(e,t,n,r)=>{const{id:o,routeId:s}=e.matches[t],i=e.router.looseRoutesById[s];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,nn(e,e.router.getMatch(o),n);try{i.options.onError?.(n)}catch(a){n=a,nn(e,e.router.getMatch(o),n)}e.updateMatch(o,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!vt(n)&&!dt(n)&&(e.serialError??=n)},_u=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!ss(e,t)&&(n.options.loader||n.options.beforeLoad||Cu(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const i=setTimeout(()=>{ba(e)},o);r._nonReactive.pendingTimeout=i}},Rm=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;_u(e,t,n,r);const o=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&nn(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},Am=(e,t,n,r)=>{const o=e.router.getMatch(t),s=o._nonReactive.loadPromise;o._nonReactive.loadPromise=qn(()=>{s?.resolve()});const{paramsError:i,searchError:a}=o;i&&hr(e,n,i,"PARSE_PARAMS"),a&&hr(e,n,a,"VALIDATE_SEARCH"),_u(e,t,r,o);const c=new AbortController;let l=!1;const f=()=>{l||(l=!0,e.updateMatch(t,S=>({...S,isFetching:"beforeLoad",fetchCount:S.fetchCount+1,abortController:c})))},d=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,S=>({...S,isFetching:!1}))};if(!r.options.beforeLoad){Er(()=>{f(),d()});return}o._nonReactive.beforeLoadPromise=qn();const p={...Un(e,n,!1),...o.__routeContext},{search:h,params:y,cause:m}=o,v=ss(e,t),b={search:h,abortController:c,params:y,preload:v,context:p,location:e.location,navigate:S=>e.router.navigate({...S,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?"preload":m,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},w=S=>{if(S===void 0){Er(()=>{f(),d()});return}(vt(S)||dt(S))&&(f(),hr(e,n,S,"BEFORE_LOAD")),Er(()=>{f(),e.updateMatch(t,C=>({...C,__beforeLoadContext:S})),d()})};let _;try{if(_=r.options.beforeLoad(b),Tr(_))return f(),_.catch(S=>{hr(e,n,S,"BEFORE_LOAD")}).then(w)}catch(S){f(),hr(e,n,S,"BEFORE_LOAD")}w(_)},Tm=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],s=()=>a(),i=()=>Am(e,n,t,o),a=()=>{if(Eu(e,n))return;const c=Rm(e,n,o);return Tr(c)?c.then(i):i()};return s()},Pm=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([s,i,a])=>{const c=s?.meta,l=s?.links,f=s?.scripts,d=s?.styles;return{meta:c,links:l,headScripts:f,headers:a,scripts:i,styles:d}})},Su=(e,t,n,r,o)=>{const s=t[r-1],{params:i,loaderDeps:a,abortController:c,cause:l}=e.router.getMatch(n),f=Un(e,r),d=ss(e,n);return{params:i,deps:a,preload:!!d,parentMatchPromise:s,abortController:c,context:f,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:d?"preload":l,route:o,...e.router.options.additionalContext}},Cc=async(e,t,n,r,o)=>{try{const s=e.router.getMatch(n);try{(!(Z1??e.router.isServer)||s.ssr===!0)&&jo(o);const i=o.options.loader?.(Su(e,t,n,r,o)),a=o.options.loader&&Tr(i);if((a||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(n,f=>({...f,isFetching:"loader"})),o.options.loader){const f=a?await i:i;nn(e,e.router.getMatch(n),f),f!==void 0&&e.updateMatch(n,d=>({...d,loaderData:f}))}o._lazyPromise&&await o._lazyPromise;const l=s._nonReactive.minPendingPromise;l&&await l,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,f=>({...f,error:void 0,context:Un(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(i){let a=i;if(a?.name==="AbortError"){if(s.abortController.signal.aborted){s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,l=>({...l,status:l.status==="pending"?"success":l.status,isFetching:!1,context:Un(e,r)}));return}const c=s._nonReactive.minPendingPromise;c&&await c,dt(i)&&await o.options.notFoundComponent?.preload?.(),nn(e,e.router.getMatch(n),i);try{o.options.onError?.(i)}catch(l){a=l,nn(e,e.router.getMatch(n),l)}e.updateMatch(n,l=>({...l,error:a,context:Un(e,r),status:"error",isFetching:!1}))}}catch(s){const i=e.router.getMatch(n);i&&(i._nonReactive.loaderPromise=void 0),nn(e,i,s)}},Mm=async(e,t,n)=>{async function r(d,p,h,y){const m=Date.now()-p.updatedAt,v=d?y.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:y.options.staleTime??e.router.options.defaultStaleTime??0,b=y.options.shouldReload,w=typeof b=="function"?b(Su(e,t,o,n,y)):b,{status:_,invalid:S}=h;i=_==="success"&&(S||(w??m>v)),d&&y.options.preload===!1||(i&&!e.sync?(a=!0,(async()=>{try{await Cc(e,t,o,n,y);const C=e.router.getMatch(o);C._nonReactive.loaderPromise?.resolve(),C._nonReactive.loadPromise?.resolve(),C._nonReactive.loaderPromise=void 0}catch(C){vt(C)&&await e.router.navigate(C.options)}})()):(_!=="success"||i&&e.sync)&&await Cc(e,t,o,n,y))}const{id:o,routeId:s}=e.matches[n];let i=!1,a=!1;const c=e.router.looseRoutesById[s];if(!Eu(e,o)){const d=e.router.getMatch(o),p=ss(e,o);if(d._nonReactive.loaderPromise){if(d.status==="success"&&!e.sync&&!d.preload)return d;await d._nonReactive.loaderPromise;const h=e.router.getMatch(o),y=h._nonReactive.error||h.error;y&&nn(e,h,y),h.status==="pending"&&await r(p,d,h,c)}else{const h=p&&!e.router.state.matches.some(m=>m.id===o),y=e.router.getMatch(o);y._nonReactive.loaderPromise=qn(),h!==y.preload&&e.updateMatch(o,m=>({...m,preload:h})),await r(p,d,y,c)}}const l=e.router.getMatch(o);a||(l._nonReactive.loaderPromise?.resolve(),l._nonReactive.loadPromise?.resolve()),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,a||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0;const f=a?l.isFetching:!1;return f!==l.isFetching||l.invalid!==!1?(e.updateMatch(o,d=>({...d,isFetching:f,invalid:!1})),e.router.getMatch(o)):l};async function Rc(e){const t=e,n=[];t.router.state.matches.some(p=>p._forcePending)&&ba(t);let r;for(let p=0;p<t.matches.length;p++){try{const h=Tm(t,p);Tr(h)&&await h}catch(h){if(vt(h))throw h;if(dt(h))r=h;else if(!t.preload)throw h;break}if(t.serialError)break}const o=t.firstBadMatchIndex??t.matches.length,s=r&&!t.preload?Sc(t,r):void 0,i=r&&t.preload?0:s!==void 0?Math.min(s+1,o):o;let a,c;for(let p=0;p<i;p++)n.push(Mm(t,n,p));try{await Promise.all(n)}catch{const p=await Promise.allSettled(n);for(const h of p){if(h.status!=="rejected")continue;const y=h.reason;if(vt(y))throw y;dt(y)?a??=y:c??=y}if(c!==void 0)throw c}const l=a??(r&&!t.preload?r:void 0);let f=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!l&&r&&t.preload)return t.matches;if(l){const p=Sc(t,l);an(p!==void 0);const h=t.matches[p],y=t.router.looseRoutesById[h.routeId],m=t.router.options?.defaultNotFoundComponent;!y.options.notFoundComponent&&m&&(y.options.notFoundComponent=m),l.routeId=h.routeId;const v=h.routeId===t.router.routeTree.id;t.updateMatch(h.id,b=>({...b,...v?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:l},isFetching:!1})),f=p,await jo(y)}else if(!t.preload){const p=t.matches[0];p.globalNotFound||t.router.getMatch(p.id)?.globalNotFound&&t.updateMatch(p.id,y=>({...y,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const p=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await jo(p)}for(let p=0;p<=f;p++){const h=t.matches[p],{id:y,routeId:m}=h,v=t.router.looseRoutesById[m];try{const b=Pm(t,y,v);if(b){const w=await b;t.updateMatch(y,_=>({..._,...w}))}}catch(b){console.error(`Error executing head for route ${m}:`,b)}}const d=ba(t);if(Tr(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}async function jo(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of Ru){const o=e.options[r]?.preload;o&&n.push(o())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Cu(e){for(const t of Ru)if(e.options[t]?.preload)return!0;return!1}const Ru=["component","errorComponent","pendingComponent","notFoundComponent"];function Nm(e){return{input:({url:t})=>{for(const n of e)t=wa(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Au(e[n],t);return t}}}function Om(e){const t=bu(e.basepath),n=`/${t}`,r=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),s=e.caseSensitive?r:r.toLowerCase();return{input:({url:i})=>{const a=e.caseSensitive?i.pathname:i.pathname.toLowerCase();return a===o?i.pathname="/":a.startsWith(s)&&(i.pathname=i.pathname.slice(n.length)),i},output:({url:i})=>(i.pathname=Eo(["/",t,i.pathname]),i)}}function wa(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Au(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function yn(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,o=t?.href!==n.href,s=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:o,hashChanged:s}}function Im(e){const t=e.filter(n=>n.status!=="redirected");return t.length===e.length?e:t}class km{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{const r=this.options,o=this.basepath??r?.basepath??"/",s=this.basepath===void 0,i=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=dm(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=U1()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let p;this.resolvePathCache=ko(1e3),p=this.buildRouteTree(),this.setRoutes(p)}!this.__store&&this.latestLocation&&(this.__store=$1(Lm(this.latestLocation)),ym(this));let a=!1;const c=this.options.basepath??"/",l=this.options.rewrite;if(s||o!==c||i!==l){this.basepath=c;const p=[],h=bu(c);h&&h!=="/"&&p.push(Om({basepath:c})),l&&p.push(l),this.rewrite=p.length===0?void 0:p.length===1?p[0]:Nm(p),this.history&&this.updateLatestLocation(),a=!0}a&&this.__store&&this.__store.setState(p=>({...p,location:this.latestLocation})),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=sm(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&em(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const o={eventType:n,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const o=({pathname:c,search:l,hash:f,href:d,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const w=this.options.parseSearch(l),_=this.options.stringifySearch(w);return{href:c+_+f,publicHref:d,pathname:dr(c).path,external:!1,searchStr:_,search:gt(r?.search,w),hash:dr(f.slice(1)).path,state:gt(r?.state,p)}}const h=new URL(d,this.origin),y=wa(this.rewrite,h),m=this.options.parseSearch(y.search),v=this.options.stringifySearch(m);return y.search=v,{href:y.href.replace(y.origin,""),publicHref:d,pathname:dr(y.pathname).path,external:!!this.rewrite&&y.origin!==this.origin,searchStr:v,search:gt(r?.search,m),hash:dr(y.hash.slice(1)).path,state:gt(r?.state,p)}},s=o(n),{__tempLocation:i,__tempKey:a}=s.state;if(i&&(!a||a===this.tempLocationKey)){const c=o(i);return c.state.key=s.state.key,c.state.__TSR_key=s.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>um({base:n,to:di(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},o):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>jm({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(s=>s.status==="pending"),r=this.state.matches.filter(s=>s.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(s=>{this.cancelMatch(s.id)})},this.buildLocation=n=>{const r=(s={})=>{const i=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutesLightweight(i);s.from;const c=s.unsafeRelative==="path"?i.pathname:s.from??a.fullPath,l=this.resolvePathWithBase(c,"."),f=a.search,d={...a.params},p=s.to?this.resolvePathWithBase(l,`${s.to}`):this.resolvePathWithBase(l,"."),h=s.params===!1||s.params===null?{}:(s.params??!0)===!0?d:Object.assign(d,tn(s.params,d)),y=this.getMatchedRoutes(p);let m=y.matchedRoutes;if((!y.foundRoute||y.foundRoute.path!=="/"&&y.routeParams["**"])&&this.options.notFoundRoute&&(m=[...m,this.options.notFoundRoute]),Object.keys(h).length>0)for(const z of m){const R=z.options.params?.stringify??z.options.stringifyParams;if(R)try{Object.assign(h,R(h))}catch{}}const b=n.leaveParams?p:dr(Ec({path:p,params:h,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let w=f;if(n._includeValidateSearch&&this.options.search?.strict){const z={};m.forEach(R=>{if(R.options.validateSearch)try{Object.assign(z,_o(R.options.validateSearch,{...z,...w}))}catch{}}),w=z}w=Fm({search:w,dest:s,destRoutes:m,_includeValidateSearch:n._includeValidateSearch}),w=gt(f,w);const _=this.options.stringifySearch(w),S=s.hash===!0?i.hash:s.hash?tn(s.hash,i.hash):void 0,C=S?`#${S}`:"";let O=s.state===!0?i.state:s.state?tn(s.state,i.state):{};O=gt(i.state,O);const T=`${b}${_}${C}`;let P,N,F=!1;if(this.rewrite){const z=new URL(T,this.origin),R=Au(this.rewrite,z);P=z.href.replace(z.origin,""),R.origin!==this.origin?(N=R.href,F=!0):N=R.pathname+R.search+R.hash}else P=Q1(T),N=P;return{publicHref:N,href:P,pathname:b,search:w,searchStr:_,state:O,hash:S??"",external:F,unmaskOnReload:s.unmaskOnReload}},o=(s={},i)=>{const a=r(s);let c=i?r(i):void 0;if(!c){const l={};if(this.options.routeMasks){const f=tm(a.pathname,this.processedTree);if(f){Object.assign(l,f.rawParams);const{from:d,params:p,...h}=f.route,y=p===!1||p===null?{}:(p??!0)===!0?l:Object.assign(l,tn(p,l));i={from:n.from,...h,params:y},c=r(i)}}}return c&&(a.maskedLocation=c),a};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...o})=>{const s=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(f=>{o.state[f]=this.latestLocation.state[f]});const l=vn(o.state,this.latestLocation.state);return c.forEach(f=>{delete o.state[f]}),l},i=on(this.latestLocation.href)===on(o.href),a=this.commitLocationPromise;if(this.commitLocationPromise=qn(()=>{a?.resolve()}),i&&s())this.load();else{let{maskedLocation:c,hashScrollIntoView:l,...f}=o;c&&(f={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=l??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](f.publicHref,f.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:s,ignoreBlocker:i,href:a,...c}={})=>{if(a){const d=this.history.location.state.__TSR_index,p=No(a,{__TSR_index:n?d:d+1}),h=new URL(p.pathname,this.origin),y=wa(this.rewrite,h);c.to=y.pathname,c.search=this.options.parseSearch(p.search),c.hash=p.hash.slice(1)}const l=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=l;const f=this.commitLocation({...l,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===l&&(this.pendingBuiltLocation=void 0)}),f},this.navigate=async({to:n,reloadDocument:r,href:o,publicHref:s,...i})=>{let a=!1;if(o)try{new URL(`${o}`),a=!0}catch{}if(a&&!r&&(r=!0),r){if(n!==void 0||!o){const l=this.buildLocation({to:n,...i});o=o??l.publicHref,s=s??l.publicHref}const c=!a&&s?s:o;if(Io(c,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const d of f)if(d?.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...i,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(o=>!n.some(s=>s.id===o.id))}))},this.load=async n=>{let r,o,s;for(s=new Promise(a=>{this.startTransition(async()=>{try{this.beforeLoad();const c=this.latestLocation,l=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...yn({resolvedLocation:l,location:c})}),this.emit({type:"onBeforeLoad",...yn({resolvedLocation:l,location:c})}),await Rc({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let f=[],d=[],p=[],h=[];Er(()=>{this.__store.setState(y=>{const m=y.matches,v=y.pendingMatches||y.matches;return f=m.filter(b=>!v.some(w=>w.id===b.id)),d=m.filter(b=>!v.some(w=>w.routeId===b.routeId)),p=v.filter(b=>!m.some(w=>w.routeId===b.routeId)),h=v.filter(b=>m.some(w=>w.routeId===b.routeId)),{...y,isLoading:!1,loadedAt:Date.now(),matches:v,pendingMatches:void 0,cachedMatches:[...y.cachedMatches,...f.filter(b=>b.status!=="error"&&b.status!=="notFound"&&b.status!=="redirected")]}}),this.clearExpiredCache()}),[[d,"onLeave"],[p,"onEnter"],[h,"onStay"]].forEach(([y,m])=>{y.forEach(v=>{this.looseRoutesById[v.routeId].options[m]?.(v)})})})})}})}catch(c){vt(c)?(r=c,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):dt(c)&&(o=c),this.__store.setState(l=>({...l,statusCode:r?r.status:o?404:l.matches.some(f=>f.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===s&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),a()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let i;this.hasNotFoundMatch()?i=404:this.__store.state.matches.some(a=>a.status==="error")&&(i=500),i!==void 0&&this.__store.setState(a=>({...a,statusCode:i}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,i=this.state.resolvedLocation,a=typeof r.types=="function"?r.types(yn({resolvedLocation:i,location:s})):r.types;if(a===!1){n();return}o={update:n,types:a}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const o=this.state.pendingMatches?.some(s=>s.id===n)?"pendingMatches":this.state.matches.some(s=>s.id===n)?"matches":this.state.cachedMatches.some(s=>s.id===n)?"cachedMatches":"";o&&(o==="cachedMatches"?this.__store.setState(s=>({...s,cachedMatches:Im(s.cachedMatches.map(i=>i.id===n?r(i):i))})):this.__store.setState(s=>({...s,[o]:s[o]?.map(i=>i.id===n?r(i):i)})))})},this.getMatch=n=>{const r=o=>o.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.__store.setState(o=>({...o,matches:o.matches.map(r),cachedMatches:o.cachedMatches.map(r),pendingMatches:o.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),s=this.getParsedLocationHref(o);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const s=o.pathname+o.search+o.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&Io(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(s=>!r(s))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const o=this.looseRoutesById[r.routeId];if(!o.options.loader)return!0;const s=(r.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=s};this.clearCache({filter:n})},this.loadRouteChunk=jo,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(a=>a.id)),i=new Set([...s,...this.state.cachedMatches.map(a=>a.id)]);Er(()=>{o.forEach(a=>{i.has(a.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,a]}))})});try{return o=await Rc({router:this,matches:o,location:r,preload:!0,updateMatch:(a,c)=>{s.has(a)?o=o.map(l=>l.id===a?c(l):l):this.updateMatch(a,c)}}),o}catch(a){if(vt(a))return a.options.reloadDocument?void 0:await this.preloadRoute({...a.options,_fromLocation:r});dt(a)||console.error(a);return}},this.matchRoute=(n,r)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(o);if(r?.pending&&this.state.status!=="pending")return!1;const a=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,c=nm(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!c||n.params&&!vn(c.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?vn(a.search,s.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??_m,parseSearch:t.parseSearch??Em,protocolAllowlist:t.protocolAllowlist??Y1}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:r}){this.routesById=t,this.routesByPath=n,this.processedTree=r;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:o,routeParams:s,parsedParams:i}=r;let{matchedRoutes:a}=r,c=!1;(o?o.path!=="/"&&s["**"]:on(t.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:c=!0);const l=c?$m(this.options.notFoundMode,a):void 0,f=new Array(a.length),d=new Map(this.state.matches.map(p=>[p.routeId,p]));for(let p=0;p<a.length;p++){const h=a[p],y=f[p-1];let m,v,b;{const x=y?.search??t.search,I=y?._strictSearch??void 0;try{const $=_o(h.options.validateSearch,{...x})??void 0;m={...x,...$},v={...I,...$},b=void 0}catch($){let D=$;if($ instanceof Fo||(D=new Fo($.message,{cause:$})),n?.throwOnError)throw D;m=x,v={},b=D}}const w=h.options.loaderDeps?.({search:m})??"",_=w?JSON.stringify(w):"",{interpolatedPath:S,usedParams:C}=Ec({path:h.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),O=h.id+S+_,T=this.getMatch(O),P=d.get(h.id),N=T?._strictParams??C;let F;if(!T)try{Ac(h,C,i,N)}catch(x){if(dt(x)||vt(x)?F=x:F=new Dm(x.message,{cause:x}),n?.throwOnError)throw F}Object.assign(s,N);const z=P?"stay":"enter";let R;if(T)R={...T,cause:z,params:P?.params??s,_strictParams:N,search:gt(P?P.search:T.search,m),_strictSearch:v};else{const x=h.options.loader||h.options.beforeLoad||h.lazyFn||Cu(h)?"pending":"success";R={id:O,ssr:h.options.ssr,index:p,routeId:h.id,params:P?.params??s,_strictParams:N,pathname:S,updatedAt:Date.now(),search:P?gt(P.search,m):m,_strictSearch:v,searchError:void 0,status:x,isFetching:!1,error:void 0,paramsError:F,__routeContext:void 0,_nonReactive:{loadPromise:qn()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:z,loaderDeps:P?gt(P.loaderDeps,w):w,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},fullPath:h.fullPath}}n?.preload||(R.globalNotFound=l===h.id),R.searchError=b;const H=this.getParentContext(y);R.context={...H,...R.__routeContext,...R.__beforeLoadContext},f[p]=R}for(let p=0;p<f.length;p++){const h=f[p],y=this.looseRoutesById[h.routeId],m=this.getMatch(h.id),v=d.get(h.routeId);if(h.params=v?gt(v.params,s):s,!m){const b=f[p-1],w=this.getParentContext(b);if(y.options.context){const _={deps:h.loaderDeps,params:h.params,context:w??{},location:t,navigate:S=>this.navigate({...S,_fromLocation:t}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:f,routeId:y.id};h.__routeContext=y.options.context(_)??void 0}h.context={...w,...h.__routeContext,...h.__beforeLoadContext}}}return f}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:r,parsedParams:o}=this.getMatchedRoutes(t.pathname),s=Ar(n),i={...t.search};for(const f of n)try{Object.assign(i,_o(f.options.validateSearch,i))}catch{}const a=Ar(this.state.matches),c=a&&a.routeId===s.id&&t.pathname===this.state.location.pathname;let l;if(c)l=a.params;else{const f={...r};for(const d of n)try{Ac(d,r,o??{},f)}catch{}l=f}return{matchedRoutes:n,fullPath:s.fullPath,search:i,params:l}}}class Fo extends Error{}class Dm extends Error{}function Lm(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function _o(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Fo("Async validation not supported");if(n.issues)throw new Fo(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function jm({pathname:e,routesById:t,processedTree:n}){const r={},o=on(e);let s,i;const a=rm(o,n,!0);return a&&(s=a.route,Object.assign(r,a.rawParams),i=Object.assign({},a.parsedParams)),{matchedRoutes:a?.branch||[t[xt]],routeParams:r,foundRoute:s,parsedParams:i}}function Fm({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return Bm(n)(e,t,r??!1)}function Bm(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const s=({search:i,next:a})=>{let c=i;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(c=o.options.preSearchFilters.reduce((f,d)=>d(f),i));const l=a(c);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((f,d)=>d(f),l):l};t.middlewares.push(s)}if(o.options.validateSearch){const s=({search:i,next:a})=>{const c=a(i);if(!t._includeValidateSearch)return c;try{return{...c,..._o(o.options.validateSearch,c)??void 0}}catch{return c}};t.middlewares.push(s)}}const n=({search:o})=>{const s=t.dest;return s.search?s.search===!0?o:tn(s.search,o):{}};t.middlewares.push(n);const r=(o,s,i)=>{if(o>=i.length)return s;const a=i[o];return a({search:s,next:l=>r(o+1,l,i)})};return function(s,i,a){return t.dest=i,t._includeValidateSearch=a,r(0,s,t.middlewares)}}function $m(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return xt}function Ac(e,t,n,r){const o=e.options.params?.parse??e.options.parseParams;if(o)if(e.options.skipRouteOnParseError)for(const s in t)s in n&&(r[s]=n[s]);else{const s=o(r);Object.assign(r,s)}}const Hm="Error preloading route! ☝️";class Tu{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=xt:this.parentRoute||an(!1);let s=o?xt:r?.path;s&&s!=="/"&&(s=yu(s));const i=r?.id||s;let a=o?xt:Eo([this.parentRoute.id===xt?"":this.parentRoute.id,i]);s===xt&&(s="/"),a!==xt&&(a=Eo(["/",a]));const c=a===xt?"/":Eo([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=c,this._to=on(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=>xu({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 zm{constructor({id:t}){this.notFound=n=>wu({routeId:this.id,...n}),this.redirect=n=>xu({from:this.id,...n}),this.id=t}}class Um extends Tu{constructor(t){super(t)}}const Vm="use",Tc=ns[Vm],ao=typeof window<"u"?u.useLayoutEffect:u.useEffect;function Vs(e){const t=u.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Zm(e,t,n={},r={}){u.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 Wm(e){const t=u.useRef(null);return u.useImperativeHandle(e,()=>t.current,[]),t}function fi(e){const t=e.errorComponent??hi;return g.jsx(qm,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?u.createElement(t,{error:n,reset:r}):e.children})}class qm extends u.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function hi({error:e}){const[t,n]=u.useState(!1);return g.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[g.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),g.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),g.jsx("div",{style:{height:".25rem"}}),t?g.jsx("div",{children:g.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?g.jsx("code",{children:e.message}):null})}):null]})}function Km({children:e,fallback:t=null}){return Pu()?g.jsx(X.Fragment,{children:e}):g.jsx(X.Fragment,{children:t})}function Pu(){return X.useSyncExternalStore(Gm,()=>!0,()=>!1)}function Gm(){return()=>{}}function Ym(e,t){return e===t}function Qm(e,t,n=Ym){const r=u.useCallback(i=>{if(!e)return()=>{};const{unsubscribe:a}=e.subscribe(i);return a},[e]),o=u.useCallback(()=>e?.get(),[e]);return u1.useSyncExternalStoreWithSelector(r,o,o,t,n)}const Mu=u.createContext(null);function it(e){const t=u.useContext(Mu);return e?.warn,t}function yt(e){const t=it({warn:e?.router===void 0}),n=e?.router||t,r=u.useRef(void 0);return Qm(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=gt(r.current,e.select(o));return r.current=s,s}return e.select(o)}return o})}const as=u.createContext(void 0),Xm=u.createContext(void 0);function Ct(e){const t=u.useContext(e.from?Xm:as);return yt({select:r=>{const o=r.matches.find(s=>e.from?e.from===s.routeId:s.id===t);if(an(!((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 is(e){return Ct({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function cs(e){const{select:t,...n}=e;return Ct({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function ls(e){return Ct({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 us(e){return Ct({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Pn(e){const t=it();return u.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Jm(e,t){const n=it(),r=Wm(t),{activeProps:o,inactiveProps:s,activeOptions:i,to:a,preload:c,preloadDelay:l,hashScrollIntoView:f,replace:d,startTransition:p,resetScroll:h,viewTransition:y,children:m,target:v,disabled:b,style:w,className:_,onClick:S,onBlur:C,onFocus:O,onMouseEnter:T,onMouseLeave:P,onTouchStart:N,ignoreBlocker:F,params:z,search:R,hash:H,state:x,mask:I,reloadDocument:$,unsafeRelative:D,from:q,_fromLocation:k,...Y}=e,L=Pu(),j=yt({select:ae=>{const ge=ae.matches[ae.matches.length-1];return{search:ge?.search,hash:ae.location.hash,path:ge?.pathname}},structuralSharing:!0}),K=e.from,G=u.useMemo(()=>({...e,from:K}),[n,j,K,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Z=u.useMemo(()=>n.buildLocation({...G}),[n,G]),le=Z.maskedLocation?Z.maskedLocation.publicHref:Z.publicHref,te=Z.maskedLocation?Z.maskedLocation.external:Z.external,Q=u.useMemo(()=>sg(le,te,n.history,b),[b,te,le,n.history]),ie=u.useMemo(()=>{if(Q?.external)return Io(Q.href,n.protocolAllowlist)?void 0:Q.href;if(!ag(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),Io(a,n.protocolAllowlist)?void 0:a}catch{}},[a,Q,n.protocolAllowlist]),re=yt({select:ae=>{if(ie)return!1;if(i?.exact){if(!lm(ae.location.pathname,Z.pathname,n.basepath))return!1}else{const ge=Do(ae.location.pathname,n.basepath),pe=Do(Z.pathname,n.basepath);if(!(ge.startsWith(pe)&&(ge.length===pe.length||ge[pe.length]==="/")))return!1}return(i?.includeSearch??!0)&&!vn(ae.location.search,Z.search,{partial:!i?.exact,ignoreUndefined:!i?.explicitUndefined})?!1:i?.includeHash?L&&ae.location.hash===Z.hash:!0}}),ce=re?tn(o,{})??eg:Zs,fe=re?Zs:tn(s,{})??Zs,ve=[_,ce.className,fe.className].filter(Boolean).join(" "),E=(w||ce.style||fe.style)&&{...w,...ce.style,...fe.style},[J,W]=u.useState(!1),M=u.useRef(!1),A=e.reloadDocument||ie?!1:c??n.options.defaultPreload,B=l??n.options.defaultPreloadDelay??0,ee=u.useCallback(()=>{n.preloadRoute({...G,_builtLocation:Z}).catch(ae=>{console.warn(ae),console.warn(Hm)})},[n,G,Z]),ne=u.useCallback(ae=>{ae?.isIntersecting&&ee()},[ee]);Zm(r,ne,og,{disabled:!!b||A!=="viewport"}),u.useEffect(()=>{M.current||!b&&A==="render"&&(ee(),M.current=!0)},[b,ee,A]);const U=ae=>{const ge=ae.currentTarget.getAttribute("target"),pe=v!==void 0?v:ge;if(!b&&!ig(ae)&&!ae.defaultPrevented&&(!pe||pe==="_self")&&ae.button===0){ae.preventDefault(),Zt.flushSync(()=>{W(!0)});const Ne=n.subscribe("onResolved",()=>{Ne(),W(!1)});n.navigate({...G,replace:d,resetScroll:h,hashScrollIntoView:f,startTransition:p,viewTransition:y,ignoreBlocker:F})}};if(ie)return{...Y,ref:r,href:ie,...m&&{children:m},...v&&{target:v},...b&&{disabled:b},...w&&{style:w},..._&&{className:_},...S&&{onClick:S},...C&&{onBlur:C},...O&&{onFocus:O},...T&&{onMouseEnter:T},...P&&{onMouseLeave:P},...N&&{onTouchStart:N}};const oe=ae=>{if(b||A!=="intent")return;if(!B){ee();return}const ge=ae.currentTarget;if(pr.has(ge))return;const pe=setTimeout(()=>{pr.delete(ge),ee()},B);pr.set(ge,pe)},ue=ae=>{b||A!=="intent"||ee()},se=ae=>{if(b||!A||!B)return;const ge=ae.currentTarget,pe=pr.get(ge);pe&&(clearTimeout(pe),pr.delete(ge))};return{...Y,...ce,...fe,href:Q?.href,ref:r,onClick:kn([S,U]),onBlur:kn([C,se]),onFocus:kn([O,oe]),onMouseEnter:kn([T,oe]),onMouseLeave:kn([P,se]),onTouchStart:kn([N,ue]),disabled:!!b,target:v,...E&&{style:E},...ve&&{className:ve},...b&&tg,...re&&ng,...L&&J&&rg}}const Zs={},eg={className:"active"},tg={role:"link","aria-disabled":!0},ng={"data-status":"active","aria-current":"page"},rg={"data-transitioning":"transitioning"},pr=new WeakMap,og={rootMargin:"100px"},kn=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function sg(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function ag(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Wt=u.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=Jm(r,t),i=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:a,...c}=s;return u.createElement("a",c,i)}return u.createElement(n,s,i)});function ig(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function cg(e){return new lg({id:e})}class lg extends zm{constructor({id:t}){super({id:t}),this.useMatch=n=>Ct({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Ct({from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>us({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>ls({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>cs({...n,from:this.id,strict:!1}),this.useLoaderData=n=>is({...n,from:this.id,strict:!1}),this.useNavigate=()=>{const n=it();return Pn({from:n.routesById[this.id].fullPath})},this.notFound=n=>wu({routeId:this.id,...n}),this.Link=X.forwardRef((n,r)=>{const s=it().routesById[this.id].fullPath;return g.jsx(Wt,{ref:r,from:s,...n})})}}let ug=class extends Tu{constructor(t){super(t),this.useMatch=n=>Ct({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Ct({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>us({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>ls({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>cs({...n,from:this.id}),this.useLoaderData=n=>is({...n,from:this.id}),this.useNavigate=()=>Pn({from:this.fullPath}),this.Link=X.forwardRef((n,r)=>g.jsx(Wt,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function We(e){return new ug(e)}class dg extends Um{constructor(t){super(t),this.useMatch=n=>Ct({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Ct({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>us({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>ls({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>cs({...n,from:this.id}),this.useLoaderData=n=>is({...n,from:this.id}),this.useNavigate=()=>Pn({from:this.fullPath}),this.Link=X.forwardRef((n,r)=>g.jsx(Wt,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function fg(e){return new dg(e)}function Pc(e){return typeof e=="object"?new Mc(e,{silent:!0}).createRoute(e):new Mc(e,{silent:!0}).createRoute}class Mc{constructor(t,n){this.path=t,this.createRoute=r=>{const o=We(r);return o.isRoot=!1,o},this.silent=n?.silent}}class Nc{constructor(t){this.useMatch=n=>Ct({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Ct({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>us({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>ls({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>cs({...n,from:this.options.id}),this.useLoaderData=n=>is({...n,from:this.options.id}),this.useNavigate=()=>{const n=it();return Pn({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Oc(e){return typeof e=="object"?new Nc(e):t=>new Nc({id:e,...t})}function et(e,t){let n,r,o,s;const i=()=>(n||(n=e().then(c=>{n=void 0,r=c.default}).catch(c=>{if(o=c,K1(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const l=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(l)||(sessionStorage.setItem(l,"1"),s=!0)}})),n),a=function(l){if(s)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!r)if(Tc)Tc(i());else throw i();return u.createElement(r,l)};return a.preload=i,a}function hg(){const e=it(),t=u.useRef({router:e,mounted:!1}),[n,r]=u.useState(!1),{hasPendingMatches:o,isLoading:s}=yt({select:d=>({isLoading:d.isLoading,hasPendingMatches:d.matches.some(p=>p.status==="pending")}),structuralSharing:!0}),i=Vs(s),a=s||n||o,c=Vs(a),l=s||o,f=Vs(l);return e.startTransition=d=>{r(!0),u.startTransition(()=>{d(),r(!1)})},u.useEffect(()=>{const d=e.history.subscribe(e.load),p=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return on(e.latestLocation.publicHref)!==on(p.publicHref)&&e.commitLocation({...p,replace:!0}),()=>{d()}},[e,e.history]),ao(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(p){console.error(p)}})()},[e]),ao(()=>{i&&!s&&e.emit({type:"onLoad",...yn(e.state)})},[i,e,s]),ao(()=>{f&&!l&&e.emit({type:"onBeforeRouteMount",...yn(e.state)})},[l,f,e]),ao(()=>{if(c&&!a){const d=yn(e.state);e.emit({type:"onResolved",...d}),e.__store.setState(p=>({...p,status:"idle",resolvedLocation:p.location})),d.hrefChanged&&bm(e)}},[a,c,e]),null}function pg(e){const t=yt({select:n=>`not-found-${n.location.pathname}-${n.status}`});return g.jsx(fi,{getResetKey:()=>t,onCatch:(n,r)=>{if(dt(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(dt(n))return e.fallback?.(n);throw n},children:e.children})}function mg(){return g.jsx("p",{children:"Not Found"})}function $n(e){return g.jsx(g.Fragment,{children:e.children})}function Nu(e,t,n){return t.options.notFoundComponent?g.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?g.jsx(e.options.defaultNotFoundComponent,{...n}):g.jsx(mg,{})}function gg(){return it().isScrollRestoring,null}const Ou=u.memo(function({matchId:t}){const n=it(),r=yt({select:m=>{const v=m.matches.findIndex(w=>w.id===t),b=m.matches[v];return an(b),{routeId:b.routeId,ssr:b.ssr,_displayPending:b._displayPending,resetKey:m.loadedAt,parentRouteId:m.matches[v-1]?.routeId}},structuralSharing:!0}),o=n.routesById[r.routeId],s=o.options.pendingComponent??n.options.defaultPendingComponent,i=s?g.jsx(s,{}):null,a=o.options.errorComponent??n.options.defaultErrorComponent,c=o.options.onCatch??n.options.defaultOnCatch,l=o.isRoot?o.options.notFoundComponent??n.options.notFoundRoute?.options.component:o.options.notFoundComponent,f=r.ssr===!1||r.ssr==="data-only",d=(!o.isRoot||o.options.wrapInSuspense||f)&&(o.options.wrapInSuspense??s??(o.options.errorComponent?.preload||f))?u.Suspense:$n,p=a?fi:$n,h=l?pg:$n,y=o.isRoot?o.options.shellComponent??$n:$n;return g.jsxs(y,{children:[g.jsx(as.Provider,{value:t,children:g.jsx(d,{fallback:i,children:g.jsx(p,{getResetKey:()=>r.resetKey,errorComponent:a||hi,onCatch:(m,v)=>{if(dt(m))throw m;c?.(m,v)},children:g.jsx(h,{fallback:m=>{if(!l||m.routeId&&m.routeId!==r.routeId||!m.routeId&&!o.isRoot)throw m;return u.createElement(l,m)},children:f||r._displayPending?g.jsx(Km,{fallback:i,children:g.jsx(Ic,{matchId:t})}):g.jsx(Ic,{matchId:t})})})})}),r.parentRouteId===xt&&n.options.scrollRestoration?g.jsxs(g.Fragment,{children:[g.jsx(vg,{}),g.jsx(gg,{})]}):null]})});function vg(){const e=it(),t=u.useRef(void 0);return g.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...yn(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Ic=u.memo(function({matchId:t}){const n=it(),{match:r,key:o,routeId:s}=yt({select:c=>{const l=c.matches.find(y=>y.id===t),f=l.routeId,p=(n.routesById[f].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:f,loaderDeps:l.loaderDeps,params:l._strictParams,search:l._strictSearch});return{key:p?JSON.stringify(p):void 0,routeId:f,match:{id:l.id,status:l.status,error:l.error,invalid:l.invalid,_forcePending:l._forcePending,_displayPending:l._displayPending}}},structuralSharing:!0}),i=n.routesById[s],a=u.useMemo(()=>{const c=i.options.component??n.options.defaultComponent;return c?g.jsx(c,{},o):g.jsx(Iu,{})},[o,i.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const c=i.options.pendingMinMs??n.options.defaultPendingMinMs;if(c){const l=n.getMatch(r.id);if(l&&!l._nonReactive.minPendingPromise){const f=qn();l._nonReactive.minPendingPromise=f,setTimeout(()=>{f.resolve(),l._nonReactive.minPendingPromise=void 0},c)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return an(dt(r.error)),Nu(n,i,r.error);if(r.status==="redirected")throw an(vt(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error")throw r.error;return a}),Iu=u.memo(function(){const t=it(),n=u.useContext(as),r=yt({select:l=>l.matches.find(f=>f.id===n)?.routeId}),o=t.routesById[r],s=yt({select:l=>{const d=l.matches.find(p=>p.id===n);return an(d),d.globalNotFound}}),i=yt({select:l=>{const f=l.matches,d=f.findIndex(p=>p.id===n);return f[d+1]?.id}}),a=t.options.defaultPendingComponent?g.jsx(t.options.defaultPendingComponent,{}):null;if(s)return Nu(t,o,void 0);if(!i)return null;const c=g.jsx(Ou,{matchId:i});return r===xt?g.jsx(u.Suspense,{fallback:a,children:c}):c});function yg(){const e=it(),n=e.routesById[xt].options.pendingComponent??e.options.defaultPendingComponent,r=n?g.jsx(n,{}):null,o=typeof document<"u"&&e.ssr?$n:u.Suspense,s=g.jsxs(o,{fallback:r,children:[g.jsx(hg,{}),g.jsx(bg,{})]});return e.options.InnerWrap?g.jsx(e.options.InnerWrap,{children:s}):s}function bg(){const e=it(),t=yt({select:o=>o.matches[0]?.id}),n=yt({select:o=>o.loadedAt}),r=t?g.jsx(Ou,{matchId:t}):null;return g.jsx(as.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:g.jsx(fi,{getResetKey:()=>n,errorComponent:hi,onCatch:void 0,children:r})})}const wg=e=>new xg(e);class xg extends km{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Pc,globalThis.createLazyFileRoute=Oc):typeof window<"u"&&(window.createFileRoute=Pc,window.createLazyFileRoute=Oc);function Eg({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=g.jsx(Mu.Provider,{value:e,children:t});return e.options.Wrap?g.jsx(e.options.Wrap,{children:r}):r}function _g({router:e,...t}){return g.jsx(Eg,{router:e,...t,children:g.jsx(yg,{})})}function ds(e){return yt({select:t=>e?.select?e.select(t.location):t.location})}var Jn=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(){}},Sg={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Cg=class{#e=Sg;#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)}},mn=new Cg;function Rg(e){setTimeout(e,0)}var _n=typeof window>"u"||"Deno"in globalThis;function st(){}function Ag(e,t){return typeof e=="function"?e(t):e}function xa(e){return typeof e=="number"&&e>=0&&e!==1/0}function ku(e,t){return Math.max(e+(t||0)-Date.now(),0)}function sn(e,t){return typeof e=="function"?e(t):e}function Et(e,t){return typeof e=="function"?e(t):e}function kc(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==pi(i,t.options))return!1}else if(!Mr(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 Dc(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Sn(t.options.mutationKey)!==Sn(s))return!1}else if(!Mr(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function pi(e,t){return(t?.queryKeyHashFn||Sn)(e)}function Sn(e){return JSON.stringify(e,(t,n)=>Ea(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Mr(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Mr(e[n],t[n])):!1}var Tg=Object.prototype.hasOwnProperty;function Du(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Lc(e)&&Lc(t);if(!r&&!(Ea(e)&&Ea(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 l=0;for(let f=0;f<a;f++){const d=r?f:i[f],p=e[d],h=t[d];if(p===h){c[d]=p,(r?f<s:Tg.call(e,d))&&l++;continue}if(p===null||h===null||typeof p!="object"||typeof h!="object"){c[d]=h;continue}const y=Du(p,h,n+1);c[d]=y,y===p&&l++}return s===a&&l===s?e:c}function Bo(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 Lc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ea(e){if(!jc(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jc(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jc(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pg(e){return new Promise(t=>{mn.setTimeout(t,e)})}function _a(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Du(e,t):t}function Mg(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Ng(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var mi=Symbol();function Lu(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===mi?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gi(e,t){return typeof e=="function"?e(...t):!!e}function Og(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 Ig=class extends Jn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!_n&&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"}},vi=new Ig;function Sa(){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 kg=Rg;function Dg(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=kg;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 Ve=Dg(),Lg=class extends Jn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!_n&&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}},$o=new Lg;function jg(e){return Math.min(1e3*2**e,3e4)}function ju(e){return(e??"online")==="online"?$o.isOnline():!0}var Ca=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Fu(e){let t=!1,n=0,r;const o=Sa(),s=()=>o.status!=="pending",i=m=>{if(!s()){const v=new Ca(m);p(v),e.onCancel?.(v)}},a=()=>{t=!0},c=()=>{t=!1},l=()=>vi.isFocused()&&(e.networkMode==="always"||$o.isOnline())&&e.canRun(),f=()=>ju(e.networkMode)&&e.canRun(),d=m=>{s()||(r?.(),o.resolve(m))},p=m=>{s()||(r?.(),o.reject(m))},h=()=>new Promise(m=>{r=v=>{(s()||l())&&m(v)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),y=()=>{if(s())return;let m;const v=n===0?e.initialPromise:void 0;try{m=v??e.fn()}catch(b){m=Promise.reject(b)}Promise.resolve(m).then(d).catch(b=>{if(s())return;const w=e.retry??(_n?0:3),_=e.retryDelay??jg,S=typeof _=="function"?_(n,b):_,C=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,b);if(t||!C){p(b);return}n++,e.onFail?.(n,b),Pg(S).then(()=>l()?void 0:h()).then(()=>{t?p(b):y()})})};return{promise:o,status:()=>o.status,cancel:i,continue:()=>(r?.(),o),cancelRetry:a,continueRetry:c,canStart:f,start:()=>(f()?y():h().then(y),o)}}var Bu=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xa(this.gcTime)&&(this.#e=mn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_n?1/0:300*1e3))}clearGcTimeout(){this.#e&&(mn.clearTimeout(this.#e),this.#e=void 0)}},Fg=class extends Bu{#e;#t;#n;#o;#r;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Bc(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Bc(this.options);t.data!==void 0&&(this.setState(Fc(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=_a(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(st).catch(st):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Et(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mi||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>sn(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:!ku(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#i?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const 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.#i=!0,n.signal)})},o=()=>{const a=Lu(this.options,t),l=(()=>{const f={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(f),f})();return this.#i=!1,this.options.persister?this.options.persister(a,l,this):a(l)},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=Fu({initialPromise:t?.initialPromise,fn:i.fetchFn,onCancel:a=>{a instanceof Ca&&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 Ca){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,...$u(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Fc(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),Ve.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function $u(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ju(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Fc(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Bc(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 Hu=class extends Jn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#i=Sa(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#a;#i;#s;#m;#f;#h;#l;#u;#c;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),$c(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ra(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ra(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#x(),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 Et(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&&!Bo(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Hc(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||Et(this.options.enabled,this.#t)!==Et(t.enabled,this.#t)||sn(this.options.staleTime,this.#t)!==sn(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||Et(this.options.enabled,this.#t)!==Et(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 $g(this,n)&&(this.#o=n,this.#a=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(st)),t}#g(){this.#w();const e=sn(this.options.staleTime,this.#t);if(_n||this.#o.isStale||!xa(e))return;const n=ku(this.#o.dataUpdatedAt,e)+1;this.#l=mn.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.#x(),this.#c=e,!(_n||Et(this.options.enabled,this.#t)===!1||!xa(this.#c)||this.#c===0)&&(this.#u=mn.setInterval(()=>{(this.options.refetchIntervalInBackground||vi.isFocused())&&this.#d()},this.#c))}#b(){this.#g(),this.#y(this.#v())}#w(){this.#l&&(mn.clearTimeout(this.#l),this.#l=void 0)}#x(){this.#u&&(mn.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.#a,c=e!==n?e.state:this.#n,{state:l}=e;let f={...l},d=!1,p;if(t._optimisticResults){const P=this.hasListeners(),N=!P&&$c(e,t),F=P&&Hc(e,n,t,r);(N||F)&&(f={...f,...$u(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:h,errorUpdatedAt:y,status:m}=f;p=f.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&m==="pending"){let P;o?.isPlaceholderData&&t.placeholderData===i?.placeholderData?(P=o.data,v=!0):P=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,P!==void 0&&(m="success",p=_a(o?.data,P,t),d=!0)}if(t.select&&p!==void 0&&!v)if(o&&p===s?.data&&t.select===this.#m)p=this.#f;else try{this.#m=t.select,p=t.select(p),p=_a(o?.data,p,t),this.#f=p,this.#s=null}catch(P){this.#s=P}this.#s&&(h=this.#s,p=this.#f,y=Date.now(),m="error");const b=f.fetchStatus==="fetching",w=m==="pending",_=m==="error",S=w&&b,C=p!==void 0,T={status:m,fetchStatus:f.fetchStatus,isPending:w,isSuccess:m==="success",isError:_,isInitialLoading:S,isLoading:S,data:p,dataUpdatedAt:f.dataUpdatedAt,error:h,errorUpdatedAt:y,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:b,isRefetching:b&&!w,isLoadingError:_&&!C,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:_&&C,isStale:yi(e,t),refetch:this.refetch,promise:this.#i,isEnabled:Et(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const P=T.data!==void 0,N=T.status==="error"&&!P,F=H=>{N?H.reject(T.error):P&&H.resolve(T.data)},z=()=>{const H=this.#i=T.promise=Sa();F(H)},R=this.#i;switch(R.status){case"pending":e.queryHash===n.queryHash&&F(R);break;case"fulfilled":(N||T.data!==R.value)&&z();break;case"rejected":(!N||T.error!==R.reason)&&z();break}}return T}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Bo(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#p.size)return!0;const s=new Set(o??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#o).some(i=>{const a=i;return this.#o[a]!==e[a]&&s.has(a)})};this.#_({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()}#_(e){Ve.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Bg(e,t){return Et(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $c(e,t){return Bg(e,t)||e.state.data!==void 0&&Ra(e,t,t.refetchOnMount)}function Ra(e,t,n){if(Et(t.enabled,e)!==!1&&sn(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&yi(e,t)}return!1}function Hc(e,t,n,r){return(e!==t||Et(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&yi(e,n)}function yi(e,t){return Et(t.enabled,e)!==!1&&e.isStaleByTime(sn(t.staleTime,e))}function $g(e,t){return!Bo(e.getCurrentResult(),t)}function zc(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 l=async()=>{let f=!1;const d=y=>{Og(y,()=>t.signal,()=>f=!0)},p=Lu(t.options,t.fetchOptions),h=async(y,m,v)=>{if(f)return Promise.reject();if(m==null&&y.pages.length)return Promise.resolve(y);const w=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:m,direction:v?"backward":"forward",meta:t.options.meta};return d(O),O})(),_=await p(w),{maxPages:S}=t.options,C=v?Ng:Mg;return{pages:C(y.pages,_,S),pageParams:C(y.pageParams,m,S)}};if(o&&s.length){const y=o==="backward",m=y?Hg:Uc,v={pages:s,pageParams:i},b=m(r,v);a=await h(v,b,y)}else{const y=e??s.length;do{const m=c===0?i[0]??r.initialPageParam:Uc(r,a);if(c>0&&m==null)break;a=await h(a,m),c++}while(c<y)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Uc(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 Hg(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var zg=class extends Bu{#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||zu(),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=Fu({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),Ve.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function zu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ug=class extends Jn{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 zg({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=io(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=io(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=io(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=io(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ve.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=>Dc(t,n))}findAll(e={}){return this.getAll().filter(t=>Dc(e,t))}notify(e){Ve.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ve.batch(()=>Promise.all(e.map(t=>t.continue().catch(st))))}};function io(e){return e.options.scope?.id}var Vg=class extends Jn{#e;#t=void 0;#n;#o;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Bo(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Sn(n.mutationKey)!==Sn(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#a(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(t,n){return this.#o=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??zu();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){Ve.batch(()=>{if(this.#o&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,n,r,o)}catch(s){Promise.reject(s)}try{this.#o.onSettled?.(t.data,null,n,r,o)}catch(s){Promise.reject(s)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,n,r,o)}catch(s){Promise.reject(s)}try{this.#o.onSettled?.(void 0,t.error,n,r,o)}catch(s){Promise.reject(s)}}}this.listeners.forEach(n=>{n(this.#t)})})}},Zg=class extends Jn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??pi(r,t);let s=this.get(o);return s||(s=new Fg({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(){Ve.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=>kc(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>kc(e,n)):t}notify(e){Ve.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ve.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ve.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Wg=class{#e;#t;#n;#o;#r;#a;#i;#s;constructor(e={}){this.#e=e.queryCache||new Zg,this.#t=e.mutationCache||new Ug,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=vi.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=$o.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(sn(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=Ag(t,s);if(i!==void 0)return this.#e.build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Ve.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;Ve.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Ve.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ve.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(st).catch(st)}invalidateQueries(e,t={}){return Ve.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=Ve.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(st)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(st)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(sn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(st).catch(st)}fetchInfiniteQuery(e){return e.behavior=zc(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(st).catch(st)}ensureInfiniteQueryData(e){return e.behavior=zc(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return $o.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(Sn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{Mr(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Sn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Mr(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=pi(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===mi&&(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()}},Uu=u.createContext(void 0),er=e=>{const t=u.useContext(Uu);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},qg=({client:e,children:t})=>(u.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(Uu.Provider,{value:e,children:t})),Vu=u.createContext(!1),Kg=()=>u.useContext(Vu);Vu.Provider;function Zu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Wu=u.createContext(Zu()),Gg=()=>u.useContext(Wu),Yg=({children:e})=>{const[t]=u.useState(()=>Zu());return g.jsx(Wu.Provider,{value:t,children:typeof e=="function"?e(t):e})},Qg=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?gi(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Xg=e=>{u.useEffect(()=>{e.clearReset()},[e])},Jg=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||gi(n,[e.error,r])),e2=(e,t)=>t.state.data===void 0,t2=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))}},n2=(e,t)=>e.isLoading&&e.isFetching&&!t,r2=(e,t)=>e?.suspense&&t.isPending,Vc=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function qu(e,t,n){const r=Kg(),o=Gg(),s=er(),i=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(i);const a=s.getQueryCache().get(i.queryHash);i._optimisticResults=r?"isRestoring":"optimistic",t2(i),Qg(i,o,a),Xg(o);const c=!s.getQueryCache().get(i.queryHash),[l]=u.useState(()=>new t(s,i)),f=l.getOptimisticResult(i),d=!r&&e.subscribed!==!1;if(u.useSyncExternalStore(u.useCallback(p=>{const h=d?l.subscribe(Ve.batchCalls(p)):st;return l.updateResult(),h},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),u.useEffect(()=>{l.setOptions(i)},[i,l]),r2(i,f))throw Vc(i,l,o);if(Jg({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&&!_n&&n2(f,r)&&(c?Vc(i,l,o):a?.promise)?.catch(st).finally(()=>{l.updateResult()}),i.notifyOnChangeProps?f:l.trackResult(f)}function o2(e,t){return qu(e,Hu)}function Ku(e,t){return qu({...e,enabled:!0,suspense:!0,throwOnError:e2,placeholderData:void 0},Hu)}function s2(e,t){const n=er(),[r]=u.useState(()=>new Vg(n,e));u.useEffect(()=>{r.setOptions(e)},[r,e]);const o=u.useSyncExternalStore(u.useCallback(i=>r.subscribe(Ve.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=u.useCallback((i,a)=>{r.mutate(i,a).catch(st)},[r]);if(o.error&&gi(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}var Ws={confirmLabel:"OK",dismissible:!0},Zc={confirmLabel:"Continue",cancelLabel:"Cancel",tone:"default",dismissible:!0},a2=e=>typeof e=="string"?{title:e,...Ws}:{...Ws,...e,dismissible:e.dismissible??Ws.dismissible},i2=e=>typeof e=="string"?{title:e,...Zc}:{...Zc,...e,dismissible:e.dismissible??e.tone!=="danger"},c2=()=>{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 l=e.current;!l||l.kind!=="confirm"||(r({current:null}),l.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 l=a2(c);return a(),new Promise(f=>{r({current:{kind:"alert",options:l,resolver:f}})})},confirm:c=>{const l=i2(c);return a(),new Promise(f=>{r({current:{kind:"confirm",options:l,resolver:f}})})},resolveAlert:s,resolveConfirm:i,dismiss:a,reset:()=>{a()}}},Gu=u.createContext(null),l2=()=>{const e=u.useRef();return e.current||(e.current=c2()),e.current},u2=({children:e,components:t})=>{const n=l2(),r=u.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot);u.useEffect(()=>()=>{n.reset()},[n]);const o=n,s=r.current;return g.jsxs(Gu.Provider,{value:o,children:[e,s?.kind==="alert"&&g.jsx(t.Alert,{open:!0,options:s.options,onClose:n.resolveAlert}),s?.kind==="confirm"&&g.jsx(t.Confirm,{open:!0,options:s.options,onCancel:()=>n.resolveConfirm(!1),onConfirm:()=>n.resolveConfirm(!0)})]})},d2=()=>{const e=u.useContext(Gu);if(!e)throw new Error("useModal must be used within ModalProvider");return e};function f2(e,t){const n=u.createContext(t),r=s=>{const{children:i,...a}=s,c=u.useMemo(()=>a,Object.values(a));return g.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=u.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 Bt(e,t=[]){let n=[];function r(s,i){const a=u.createContext(i),c=n.length;n=[...n,i];const l=d=>{const{scope:p,children:h,...y}=d,m=p?.[e]?.[c]||a,v=u.useMemo(()=>y,Object.values(y));return g.jsx(m.Provider,{value:v,children:h})};l.displayName=s+"Provider";function f(d,p){const h=p?.[e]?.[c]||a,y=u.useContext(h);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,f]}const o=()=>{const s=n.map(i=>u.createContext(i));return function(a){const c=a?.[e]||s;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,h2(o,...t)]}function h2(...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:l})=>{const d=c(s)[`__scope${l}`];return{...a,...d}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Wc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $r(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Wc(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():Wc(e[o],null)}}}}function Ee(...e){return u.useCallback($r(...e),e)}function de(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Xe=globalThis?.document?u.useLayoutEffect:()=>{},p2=ns[" useId ".trim().toString()]||(()=>{}),m2=0;function Dt(e){const[t,n]=u.useState(p2());return Xe(()=>{n(r=>r??String(m2++))},[e]),t?`radix-${t}`:""}var g2=ns[" useInsertionEffect ".trim().toString()]||Xe;function qt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=v2({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const f=u.useRef(e!==void 0);u.useEffect(()=>{const d=f.current;d!==a&&console.warn(`${r} is changing from ${d?"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 l=u.useCallback(f=>{if(a){const d=y2(f)?f(e):f;d!==e&&i.current?.(d)}else s(f)},[a,e,s,i]);return[c,l]}function v2({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),o=u.useRef(n),s=u.useRef(t);return g2(()=>{s.current=t},[t]),u.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function y2(e){return typeof e=="function"}function Gn(e){const t=b2(e),n=u.forwardRef((r,o)=>{const{children:s,...i}=r,a=u.Children.toArray(s),c=a.find(w2);if(c){const l=c.props.children,f=a.map(d=>d===c?u.Children.count(l)>1?u.Children.only(null):u.isValidElement(l)?l.props.children:null:d);return g.jsx(t,{...i,ref:o,children:u.isValidElement(l)?u.cloneElement(l,void 0,f):null})}return g.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function b2(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const i=E2(o),a=x2(s,o.props);return o.type!==u.Fragment&&(a.ref=r?$r(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Yu=Symbol("radix.slottable");function Qu(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Yu,t}function w2(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Yu}function x2(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 E2(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 _2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],be=_2.reduce((e,t)=>{const n=Gn(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Xu(e,t){e&&Zt.flushSync(()=>e.dispatchEvent(t))}function jt(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>t.current?.(...n),[])}function S2(e,t=globalThis?.document){const n=jt(e);u.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 C2="DismissableLayer",Aa="dismissableLayer.update",R2="dismissableLayer.pointerDownOutside",A2="dismissableLayer.focusOutside",qc,Ju=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hr=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=u.useContext(Ju),[f,d]=u.useState(null),p=f?.ownerDocument??globalThis?.document,[,h]=u.useState({}),y=Ee(t,T=>d(T)),m=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),w=f?m.indexOf(f):-1,_=l.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,C=M2(T=>{const P=T.target,N=[...l.branches].some(F=>F.contains(P));!S||N||(o?.(T),i?.(T),T.defaultPrevented||a?.())},p),O=N2(T=>{const P=T.target;[...l.branches].some(F=>F.contains(P))||(s?.(T),i?.(T),T.defaultPrevented||a?.())},p);return S2(T=>{w===l.layers.size-1&&(r?.(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},p),u.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(qc=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),Kc(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=qc)}},[f,p,n,l]),u.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),Kc())},[f,l]),u.useEffect(()=>{const T=()=>h({});return document.addEventListener(Aa,T),()=>document.removeEventListener(Aa,T)},[]),g.jsx(be.div,{...c,ref:y,style:{pointerEvents:_?S?"auto":"none":void 0,...e.style},onFocusCapture:de(e.onFocusCapture,O.onFocusCapture),onBlurCapture:de(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:de(e.onPointerDownCapture,C.onPointerDownCapture)})});Hr.displayName=C2;var T2="DismissableLayerBranch",P2=u.forwardRef((e,t)=>{const n=u.useContext(Ju),r=u.useRef(null),o=Ee(t,r);return u.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),g.jsx(be.div,{...e,ref:o})});P2.displayName=T2;function M2(e,t=globalThis?.document){const n=jt(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){ed(R2,n,l,{discrete:!0})};const l={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 N2(e,t=globalThis?.document){const n=jt(e),r=u.useRef(!1);return u.useEffect(()=>{const o=s=>{s.target&&!r.current&&ed(A2,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 Kc(){const e=new CustomEvent(Aa);document.dispatchEvent(e)}function ed(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?Xu(o,s):o.dispatchEvent(s)}var qs="focusScope.autoFocusOnMount",Ks="focusScope.autoFocusOnUnmount",Gc={bubbles:!1,cancelable:!0},O2="FocusScope",fs=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=u.useState(null),l=jt(o),f=jt(s),d=u.useRef(null),p=Ee(t,m=>c(m)),h=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let m=function(_){if(h.paused||!a)return;const S=_.target;a.contains(S)?d.current=S:Xt(d.current,{select:!0})},v=function(_){if(h.paused||!a)return;const S=_.relatedTarget;S!==null&&(a.contains(S)||Xt(d.current,{select:!0}))},b=function(_){if(document.activeElement===document.body)for(const C of _)C.removedNodes.length>0&&Xt(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const w=new MutationObserver(b);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),w.disconnect()}}},[r,a,h.paused]),u.useEffect(()=>{if(a){Qc.add(h);const m=document.activeElement;if(!a.contains(m)){const b=new CustomEvent(qs,Gc);a.addEventListener(qs,l),a.dispatchEvent(b),b.defaultPrevented||(I2(F2(td(a)),{select:!0}),document.activeElement===m&&Xt(a))}return()=>{a.removeEventListener(qs,l),setTimeout(()=>{const b=new CustomEvent(Ks,Gc);a.addEventListener(Ks,f),a.dispatchEvent(b),b.defaultPrevented||Xt(m??document.body,{select:!0}),a.removeEventListener(Ks,f),Qc.remove(h)},0)}}},[a,l,f,h]);const y=u.useCallback(m=>{if(!n&&!r||h.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(v&&b){const w=m.currentTarget,[_,S]=k2(w);_&&S?!m.shiftKey&&b===S?(m.preventDefault(),n&&Xt(_,{select:!0})):m.shiftKey&&b===_&&(m.preventDefault(),n&&Xt(S,{select:!0})):b===w&&m.preventDefault()}},[n,r,h.paused]);return g.jsx(be.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});fs.displayName=O2;function I2(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Xt(r,{select:t}),document.activeElement!==n)return}function k2(e){const t=td(e),n=Yc(t,e),r=Yc(t.reverse(),e);return[n,r]}function td(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 Yc(e,t){for(const n of e)if(!D2(n,{upTo:t}))return n}function D2(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 L2(e){return e instanceof HTMLInputElement&&"select"in e}function Xt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&L2(e)&&t&&e.select()}}var Qc=j2();function j2(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Xc(e,t),e.unshift(t)},remove(t){e=Xc(e,t),e[0]?.resume()}}}function Xc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function F2(e){return e.filter(t=>t.tagName!=="A")}var B2="Portal",zr=u.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=u.useState(!1);Xe(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?lu.createPortal(g.jsx(be.div,{...r,ref:t}),i):null});zr.displayName=B2;function $2(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var $t=e=>{const{present:t,children:n}=e,r=H2(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),s=Ee(r.ref,z2(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:s}):null};$t.displayName="Presence";function H2(e){const[t,n]=u.useState(),r=u.useRef(null),o=u.useRef(e),s=u.useRef("none"),i=e?"mounted":"unmounted",[a,c]=$2(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const l=co(r.current);s.current=a==="mounted"?l:"none"},[a]),Xe(()=>{const l=r.current,f=o.current;if(f!==e){const p=s.current,h=co(l);e?c("MOUNT"):h==="none"||l?.display==="none"?c("UNMOUNT"):c(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Xe(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,d=h=>{const m=co(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(s.current=co(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:u.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function co(e){return e?.animationName||"none"}function z2(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 Gs=0;function bi(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Jc()),document.body.insertAdjacentElement("beforeend",e[1]??Jc()),Gs++,()=>{Gs===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Gs--}},[])}function Jc(){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 U2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Dn=new WeakMap,lo=new WeakMap,uo={},Ys=0,nd=function(e){return e&&(e.host||nd(e.parentNode))},V2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=nd(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})},Z2=function(e,t,n,r){var o=V2(t,Array.isArray(e)?e:[e]);uo[n]||(uo[n]=new WeakMap);var s=uo[n],i=[],a=new Set,c=new Set(o),l=function(d){!d||a.has(d)||(a.add(d),l(d.parentNode))};o.forEach(l);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))f(p);else try{var h=p.getAttribute(r),y=h!==null&&h!=="false",m=(Dn.get(p)||0)+1,v=(s.get(p)||0)+1;Dn.set(p,m),s.set(p,v),i.push(p),m===1&&y&&lo.set(p,!0),v===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return f(t),a.clear(),Ys++,function(){i.forEach(function(d){var p=Dn.get(d)-1,h=s.get(d)-1;Dn.set(d,p),s.set(d,h),p||(lo.has(d)||d.removeAttribute(r),lo.delete(d)),h||d.removeAttribute(n)}),Ys--,Ys||(Dn=new WeakMap,Dn=new WeakMap,lo=new WeakMap,uo={})}},wi=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=U2(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Z2(r,o,n,"aria-hidden")):function(){return null}},hs="Dialog",[rd,od]=Bt(hs),[W2,Mt]=rd(hs),sd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=u.useRef(null),c=u.useRef(null),[l,f]=qt({prop:r,defaultProp:o??!1,onChange:s,caller:hs});return g.jsx(W2,{scope:t,triggerRef:a,contentRef:c,contentId:Dt(),titleId:Dt(),descriptionId:Dt(),open:l,onOpenChange:f,onOpenToggle:u.useCallback(()=>f(d=>!d),[f]),modal:i,children:n})};sd.displayName=hs;var ad="DialogTrigger",id=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mt(ad,n),s=Ee(t,o.triggerRef);return g.jsx(be.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":_i(o.open),...r,ref:s,onClick:de(e.onClick,o.onOpenToggle)})});id.displayName=ad;var xi="DialogPortal",[q2,cd]=rd(xi,{forceMount:void 0}),ld=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Mt(xi,t);return g.jsx(q2,{scope:t,forceMount:n,children:u.Children.map(r,i=>g.jsx($t,{present:n||s.open,children:g.jsx(zr,{asChild:!0,container:o,children:i})}))})};ld.displayName=xi;var Ho="DialogOverlay",ud=u.forwardRef((e,t)=>{const n=cd(Ho,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Mt(Ho,e.__scopeDialog);return s.modal?g.jsx($t,{present:r||s.open,children:g.jsx(G2,{...o,ref:t})}):null});ud.displayName=Ho;var K2=Gn("DialogOverlay.RemoveScroll"),G2=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mt(Ho,n);return g.jsx(ri,{as:K2,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(be.div,{"data-state":_i(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Cn="DialogContent",dd=u.forwardRef((e,t)=>{const n=cd(Cn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Mt(Cn,e.__scopeDialog);return g.jsx($t,{present:r||s.open,children:s.modal?g.jsx(Y2,{...o,ref:t}):g.jsx(Q2,{...o,ref:t})})});dd.displayName=Cn;var Y2=u.forwardRef((e,t)=>{const n=Mt(Cn,e.__scopeDialog),r=u.useRef(null),o=Ee(t,n.contentRef,r);return u.useEffect(()=>{const s=r.current;if(s)return wi(s)},[]),g.jsx(fd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:de(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:de(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:de(e.onFocusOutside,s=>s.preventDefault())})}),Q2=u.forwardRef((e,t)=>{const n=Mt(Cn,e.__scopeDialog),r=u.useRef(!1),o=u.useRef(!1);return g.jsx(fd,{...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()}})}),fd=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=Mt(Cn,n),c=u.useRef(null),l=Ee(t,c);return bi(),g.jsxs(g.Fragment,{children:[g.jsx(fs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:g.jsx(Hr,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":_i(a.open),...i,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(J2,{titleId:a.titleId}),g.jsx(tv,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Ei="DialogTitle",hd=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mt(Ei,n);return g.jsx(be.h2,{id:o.titleId,...r,ref:t})});hd.displayName=Ei;var pd="DialogDescription",md=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mt(pd,n);return g.jsx(be.p,{id:o.descriptionId,...r,ref:t})});md.displayName=pd;var gd="DialogClose",vd=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Mt(gd,n);return g.jsx(be.button,{type:"button",...r,ref:t,onClick:de(e.onClick,()=>o.onOpenChange(!1))})});vd.displayName=gd;function _i(e){return e?"open":"closed"}var yd="DialogTitleWarning",[X2,bd]=f2(yd,{contentName:Cn,titleName:Ei,docsSlug:"dialog"}),J2=({titleId:e})=>{const t=bd(yd),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
3
|
+
|
|
4
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5
|
+
|
|
6
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ev="DialogDescriptionWarning",tv=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${bd(ev).contentName}}.`;return u.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},wd=sd,nv=id,xd=ld,Ed=ud,_d=dd,Sd=hd,Cd=md,Si=vd,Rd="AlertDialog",[rv]=Bt(Rd,[od]),Kt=od(),Ad=e=>{const{__scopeAlertDialog:t,...n}=e,r=Kt(t);return g.jsx(wd,{...r,...n,modal:!0})};Ad.displayName=Rd;var ov="AlertDialogTrigger",sv=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Kt(n);return g.jsx(nv,{...o,...r,ref:t})});sv.displayName=ov;var av="AlertDialogPortal",Td=e=>{const{__scopeAlertDialog:t,...n}=e,r=Kt(t);return g.jsx(xd,{...r,...n})};Td.displayName=av;var iv="AlertDialogOverlay",Pd=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Kt(n);return g.jsx(Ed,{...o,...r,ref:t})});Pd.displayName=iv;var Vn="AlertDialogContent",[cv,lv]=rv(Vn),uv=Qu("AlertDialogContent"),Md=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,s=Kt(n),i=u.useRef(null),a=Ee(t,i),c=u.useRef(null);return g.jsx(X2,{contentName:Vn,titleName:Nd,docsSlug:"alert-dialog",children:g.jsx(cv,{scope:n,cancelRef:c,children:g.jsxs(_d,{role:"alertdialog",...s,...o,ref:a,onOpenAutoFocus:de(o.onOpenAutoFocus,l=>{l.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[g.jsx(uv,{children:r}),g.jsx(fv,{contentRef:i})]})})})});Md.displayName=Vn;var Nd="AlertDialogTitle",Od=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Kt(n);return g.jsx(Sd,{...o,...r,ref:t})});Od.displayName=Nd;var Id="AlertDialogDescription",kd=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Kt(n);return g.jsx(Cd,{...o,...r,ref:t})});kd.displayName=Id;var dv="AlertDialogAction",Dd=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Kt(n);return g.jsx(Si,{...o,...r,ref:t})});Dd.displayName=dv;var Ld="AlertDialogCancel",jd=u.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=lv(Ld,n),s=Kt(n),i=Ee(t,o);return g.jsx(Si,{...s,...r,ref:i})});jd.displayName=Ld;var fv=({contentRef:e})=>{const t=`\`${Vn}\` requires a description for the component to be accessible for screen reader users.
|
|
7
|
+
|
|
8
|
+
You can add a description to the \`${Vn}\` by passing a \`${Id}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
9
|
+
|
|
10
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Vn}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
11
|
+
|
|
12
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return u.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},hv=Ad,pv=Td,mv=Pd,gv=Md,vv=Dd,yv=jd,bv=Od,wv=kd,Fd=hv,Bd=pv,$d=mv,Hd=gv,xv=yv,zd=vv,Ud=bv,Vd=wv,Qs={exports:{}};var el;function Ev(){return el||(el=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})()})(Qs)),Qs.exports}var _v=Ev();const xe=Xn(_v);var Sv=Symbol.for("react.lazy"),zo=ns[" use ".trim().toString()];function Cv(e){return typeof e=="object"&&e!==null&&"then"in e}function Zd(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Sv&&"_payload"in e&&Cv(e._payload)}function Rv(e){const t=Tv(e),n=u.forwardRef((r,o)=>{let{children:s,...i}=r;Zd(s)&&typeof zo=="function"&&(s=zo(s._payload));const a=u.Children.toArray(s),c=a.find(Mv);if(c){const l=c.props.children,f=a.map(d=>d===c?u.Children.count(l)>1?u.Children.only(null):u.isValidElement(l)?l.props.children:null:d);return g.jsx(t,{...i,ref:o,children:u.isValidElement(l)?u.cloneElement(l,void 0,f):null})}return g.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Av=Rv("Slot");function Tv(e){const t=u.forwardRef((n,r)=>{let{children:o,...s}=n;if(Zd(o)&&typeof zo=="function"&&(o=zo(o._payload)),u.isValidElement(o)){const i=Ov(o),a=Nv(s,o.props);return o.type!==u.Fragment&&(a.ref=r?$r(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pv=Symbol("radix.slottable");function Mv(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pv}function Nv(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 Ov(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 Iv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),u.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"}))]]),kv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,28H188V24a12,12,0,0,0-24,0v4H92V24a12,12,0,0,0-24,0v4H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28ZM68,52a12,12,0,0,0,24,0h72a12,12,0,0,0,24,0h16V76H52V52ZM52,204V100H204V204Zm60-80v56a12,12,0,0,1-24,0V143.32a12,12,0,0,1-9.37-22l16-8A12,12,0,0,1,112,124Zm61.49,33.88L163.9,168H168a12,12,0,0,1,0,24H136a12,12,0,0,1-8.71-20.25L155.45,142a4,4,0,0,0,.55-2,4,4,0,0,0-7.47-2,12,12,0,0,1-20.78-12A28,28,0,0,1,180,140a27.77,27.77,0,0,1-5.64,16.86A10.63,10.63,0,0,1,173.49,157.88Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M216,48V88H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),u.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-96-88v64a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm59.16,30.45L152,176h16a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136,23.76,23.76,0,0,1,171.16,150.45Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM112,184a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm56-8a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136a23.76,23.76,0,0,1-4.84,14.45L152,176ZM48,80V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,34H182V24a6,6,0,0,0-12,0V34H86V24a6,6,0,0,0-12,0V34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H74V56a6,6,0,0,0,12,0V46h84V56a6,6,0,0,0,12,0V46h26a2,2,0,0,1,2,2V82H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V94H210V208A2,2,0,0,1,208,210Zm-98-90v64a6,6,0,0,1-12,0V129.71l-7.32,3.66a6,6,0,1,1-5.36-10.74l16-8A6,6,0,0,1,110,120Zm59.57,29.25L148,178h20a6,6,0,0,1,0,12H136a6,6,0,0,1-4.8-9.6L160,142a10,10,0,1,0-16.65-11A6,6,0,1,1,133,125a22,22,0,1,1,36.62,24.26Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-96-88v64a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm59.16,30.45L152,176h16a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136,23.76,23.76,0,0,1,171.16,150.45Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,36H180V24a4,4,0,0,0-8,0V36H84V24a4,4,0,0,0-8,0V36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H76V56a4,4,0,0,0,8,0V44h88V56a4,4,0,0,0,8,0V44h28a4,4,0,0,1,4,4V84H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V92H212V208A4,4,0,0,1,208,212ZM108,120v64a4,4,0,0,1-8,0V126.47l-10.21,5.11a4,4,0,0,1-3.58-7.16l16-8A4,4,0,0,1,108,120Zm60,28-24,32h24a4,4,0,0,1,0,8H136a4,4,0,0,1-3.2-6.4l28.78-38.37A11.88,11.88,0,0,0,164,136a12,12,0,0,0-22.4-6,4,4,0,0,1-6.92-4A20,20,0,0,1,172,136,19.79,19.79,0,0,1,168,148Z"}))]]),Dv=new Map([["bold",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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"}))]]),Lv=new Map([["bold",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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"}))]]),jv=new Map([["bold",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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"}))]]),Fv=new Map([["bold",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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"}),u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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"}))]]),Bv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M108,60A16,16,0,1,1,92,44,16,16,0,0,1,108,60Zm56,16a16,16,0,1,0-16-16A16,16,0,0,0,164,76ZM92,112a16,16,0,1,0,16,16A16,16,0,0,0,92,112Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,112ZM92,180a16,16,0,1,0,16,16A16,16,0,0,0,92,180Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,180Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,32V224a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V32A16,16,0,0,1,64,16H192A16,16,0,0,1,208,32Z",opacity:"0.2"}),u.createElement("path",{d:"M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M192,16H64A16,16,0,0,0,48,32V224a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V32A16,16,0,0,0,192,16ZM100,200a12,12,0,1,1,12-12A12,12,0,0,1,100,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,80Zm56,120a12,12,0,1,1,12-12A12,12,0,0,1,156,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,80Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M102,60A10,10,0,1,1,92,50,10,10,0,0,1,102,60Zm62,10a10,10,0,1,0-10-10A10,10,0,0,0,164,70ZM92,118a10,10,0,1,0,10,10A10,10,0,0,0,92,118Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,118ZM92,186a10,10,0,1,0,10,10A10,10,0,0,0,92,186Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,186Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M100,60a8,8,0,1,1-8-8A8,8,0,0,1,100,60Zm64,8a8,8,0,1,0-8-8A8,8,0,0,0,164,68ZM92,120a8,8,0,1,0,8,8A8,8,0,0,0,92,120Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,120ZM92,188a8,8,0,1,0,8,8A8,8,0,0,0,92,188Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,188Z"}))]]),$v=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M112,60a16,16,0,1,1,16,16A16,16,0,0,1,112,60Zm16,52a16,16,0,1,0,16,16A16,16,0,0,0,128,112Zm0,68a16,16,0,1,0,16,16A16,16,0,0,0,128,180Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M176,32V224a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16V32A16,16,0,0,1,96,16h64A16,16,0,0,1,176,32Z",opacity:"0.2"}),u.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM128,72a12,12,0,1,0-12-12A12,12,0,0,0,128,72Zm0,112a12,12,0,1,0,12,12A12,12,0,0,0,128,184Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M160,16H96A16,16,0,0,0,80,32V224a16,16,0,0,0,16,16h64a16,16,0,0,0,16-16V32A16,16,0,0,0,160,16ZM128,208a12,12,0,1,1,12-12A12,12,0,0,1,128,208Zm0-68a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm0-68a12,12,0,1,1,12-12A12,12,0,0,1,128,72Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M118,60a10,10,0,1,1,10,10A10,10,0,0,1,118,60Zm10,58a10,10,0,1,0,10,10A10,10,0,0,0,128,118Zm0,68a10,10,0,1,0,10,10A10,10,0,0,0,128,186Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM128,72a12,12,0,1,0-12-12A12,12,0,0,0,128,72Zm0,112a12,12,0,1,0,12,12A12,12,0,0,0,128,184Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M120,60a8,8,0,1,1,8,8A8,8,0,0,1,120,60Zm8,60a8,8,0,1,0,8,8A8,8,0,0,0,128,120Zm0,68a8,8,0,1,0,8,8A8,8,0,0,0,128,188Z"}))]]),Hv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),u.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),zv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm112-80a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,132Zm0,40a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,172Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),u.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,176H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm-8-56V44l44,44Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-34-82a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,136Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,168Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-36-84a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,136Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,168Z"}))]]),Uv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),u.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z"}))]]),Vv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,80H140V60h56ZM116,60v56H60V60ZM60,140h56v56H60Zm80,56V140h56v56Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),u.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M216,56v60a4,4,0,0,1-4,4H136V44a4,4,0,0,1,4-4h60A16,16,0,0,1,216,56ZM116,40H56A16,16,0,0,0,40,56v60a4,4,0,0,0,4,4h76V44A4,4,0,0,0,116,40Zm96,96H136v76a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136ZM40,140v60a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V136H44A4,4,0,0,0,40,140Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,14v66H134V54h66A2,2,0,0,1,202,56ZM56,54h66v68H54V56A2,2,0,0,1,56,54ZM54,200V134h68v68H56A2,2,0,0,1,54,200Zm146,2H134V134h68v66A2,2,0,0,1,200,202Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,12v68H132V52h68A4,4,0,0,1,204,56ZM56,52h68v72H52V56A4,4,0,0,1,56,52ZM52,200V132h72v72H56A4,4,0,0,1,52,200Zm148,4H132V132h72v68A4,4,0,0,1,200,204Z"}))]]),Zv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M216,64V192H40V64Z",opacity:"0.2"}),u.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z"}))]]),Wv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),u.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),qv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),u.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),Kv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M238.15,78.54,177.46,17.86a20,20,0,0,0-28.3,0L97.2,70c-12.43-3.33-36.68-5.72-61.74,14.5a20,20,0,0,0-1.6,29.73l45.46,45.47-39.8,39.8a12,12,0,0,0,17,17l39.8-39.81,45.47,45.46A20,20,0,0,0,155.91,228c.46,0,.93,0,1.4-.05A20,20,0,0,0,171.87,220c4.69-6.23,11-16.13,14.44-28s3.45-22.88.16-33.4l51.7-51.87A20,20,0,0,0,238.15,78.54Zm-74.26,68.79a12,12,0,0,0-2.23,13.84c3.43,6.86,6.9,21-6.28,40.65L54.08,100.53c21.09-14.59,39.53-6.64,41-6a11.67,11.67,0,0,0,13.81-2.29l54.43-54.61,55,55Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M229.66,98.34,172.39,155.8c11.46,22.93-1.72,45.86-10.11,57a8,8,0,0,1-12,.83L42.34,105.76A8,8,0,0,1,43,93.85c29.65-23.92,57.4-10,57.4-10l57.27-57.46a8,8,0,0,1,11.31,0L229.66,87A8,8,0,0,1,229.66,98.34Z",opacity:"0.2"}),u.createElement("path",{d:"M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M235.33,104l-53.47,53.65c4.56,12.67,6.45,33.89-13.19,60A15.93,15.93,0,0,1,157,224c-.38,0-.75,0-1.13,0a16,16,0,0,1-11.32-4.69L96.29,171,53.66,213.66a8,8,0,0,1-11.32-11.32L85,159.71l-48.3-48.3A16,16,0,0,1,38,87.63c25.42-20.51,49.75-16.48,60.4-13.14L152,20.7a16,16,0,0,1,22.63,0l60.69,60.68A16,16,0,0,1,235.33,104Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M233.91,82.79,173.22,22.1a14,14,0,0,0-19.81,0L98.93,76.77c-9.52-3.25-34-8.34-59.71,12.41A14,14,0,0,0,38.1,110l49.71,49.71-44.05,44a6,6,0,1,0,8.48,8.48l44.05-44.05L146,217.89a14,14,0,0,0,9.9,4.11q.49,0,1,0a14,14,0,0,0,10.19-5.54c19.72-26.21,17.15-47.23,12.46-59.3l54.37-54.55A14,14,0,0,0,233.91,82.79ZM225.42,94.1h0l-57.27,57.46a6,6,0,0,0-1.11,6.92c9.94,19.88-1.71,40.32-9.54,50.72a2,2,0,0,1-3,.2L46.58,101.51a2,2,0,0,1,.18-3c12.5-10.09,24.5-12.76,33.7-12.76a42.13,42.13,0,0,1,17.25,3.41A6,6,0,0,0,104.64,88L161.9,30.59a2,2,0,0,1,2.83,0l60.69,60.68A2,2,0,0,1,225.42,94.1Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M232.49,84.2,171.8,23.51a12,12,0,0,0-17,0L99.45,79.07c-8.08-3-32.79-9.45-59,11.67a12,12,0,0,0-1,17.84l51.13,51.13L45.17,205.17a4,4,0,0,0,5.66,5.66l45.46-45.47,51.12,51.12A12,12,0,0,0,155.9,220c.28,0,.57,0,.85,0a12,12,0,0,0,8.73-4.74c19.83-26.36,16.51-47.18,11.71-58.57l55.3-55.49A12,12,0,0,0,232.49,84.2Zm-5.66,11.31h0L169.56,153a4,4,0,0,0-.75,4.61c10.43,20.85-1.62,42-9.73,52.83a4,4,0,0,1-6,.4L45.17,102.93a4,4,0,0,1,.33-6C58.44,86.53,70.86,83.74,80.44,83.74A43.9,43.9,0,0,1,98.6,87.38a4,4,0,0,0,4.62-.75l57.27-57.46a4,4,0,0,1,5.66,0l60.68,60.69A4,4,0,0,1,226.83,95.51Z"}))]]),Gv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,128a12,12,0,0,1-12,12H48a12,12,0,0,1,0-24h68A12,12,0,0,1,128,128ZM48,76H180a12,12,0,0,0,0-24H48a12,12,0,0,0,0,24Zm52,104H48a12,12,0,0,0,0,24h52a12,12,0,0,0,0-24Zm132.49-20.49a12,12,0,0,0-17,0L196,179V112a12,12,0,0,0-24,0v67l-19.51-19.52a12,12,0,0,0-17,17l40,40a12,12,0,0,0,17,0l40-40A12,12,0,0,0,232.49,159.51Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M224,80v88l-24,24H48V64H208A16,16,0,0,1,224,80Z",opacity:"0.2"}),u.createElement("path",{d:"M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,72h96a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm40,112H72a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Zm8-48H72a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm77.66,29.66-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L160,164.69V120a8,8,0,0,1,16,0v44.69l10.34-10.35a8,8,0,0,1,11.32,11.32Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M126,128a6,6,0,0,1-6,6H48a6,6,0,0,1,0-12h72A6,6,0,0,1,126,128ZM48,70H184a6,6,0,0,0,0-12H48a6,6,0,0,0,0,12Zm56,116H48a6,6,0,0,0,0,12h56a6,6,0,0,0,0-12Zm124.24-22.24a6,6,0,0,0-8.48,0L190,193.51V112a6,6,0,0,0-12,0v81.51l-29.76-29.75a6,6,0,0,0-8.48,8.48l40,40a6,6,0,0,0,8.48,0l40-40A6,6,0,0,0,228.24,163.76Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M124,128a4,4,0,0,1-4,4H48a4,4,0,0,1,0-8h72A4,4,0,0,1,124,128ZM48,68H184a4,4,0,0,0,0-8H48a4,4,0,0,0,0,8Zm56,120H48a4,4,0,0,0,0,8h56a4,4,0,0,0,0-8Zm122.83-22.83a4,4,0,0,0-5.66,0L188,198.34V112a4,4,0,0,0-8,0v86.34l-33.17-33.17a4,4,0,0,0-5.66,5.66l40,40a4,4,0,0,0,5.66,0l40-40A4,4,0,0,0,226.83,165.17Z"}))]]),Yv=new Map([["bold",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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"}))]]),Qv=new Map([["bold",u.createElement(u.Fragment,null,u.createElement("path",{d:"M246.15,133.18,146.83,33.86A19.85,19.85,0,0,0,132.69,28H40A12,12,0,0,0,28,40v92.69a19.85,19.85,0,0,0,5.86,14.14l99.32,99.32a20,20,0,0,0,28.28,0l84.69-84.69A20,20,0,0,0,246.15,133.18Zm-98.83,93.17L52,131V52h79l95.32,95.32ZM104,88A16,16,0,1,1,88,72,16,16,0,0,1,104,88Z"}))],["duotone",u.createElement(u.Fragment,null,u.createElement("path",{d:"M237.66,153,153,237.66a8,8,0,0,1-11.31,0L42.34,138.34A8,8,0,0,1,40,132.69V40h92.69a8,8,0,0,1,5.65,2.34l99.32,99.32A8,8,0,0,1,237.66,153Z",opacity:"0.2"}),u.createElement("path",{d:"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63Zm-96,96L48,132.69V48h84.69L232,147.31ZM96,84A12,12,0,1,1,84,72,12,12,0,0,1,96,84Z"}))],["fill",u.createElement(u.Fragment,null,u.createElement("path",{d:"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63ZM84,96A12,12,0,1,1,96,84,12,12,0,0,1,84,96Z"}))],["light",u.createElement(u.Fragment,null,u.createElement("path",{d:"M241.91,137.42,142.59,38.1a13.94,13.94,0,0,0-9.9-4.1H40a6,6,0,0,0-6,6v92.69a13.94,13.94,0,0,0,4.1,9.9l99.32,99.32a14,14,0,0,0,19.8,0l84.69-84.69A14,14,0,0,0,241.91,137.42Zm-8.49,11.31-84.69,84.69a2,2,0,0,1-2.83,0L46.59,134.1a2,2,0,0,1-.59-1.41V46h86.69a2,2,0,0,1,1.41.59l99.32,99.31A2,2,0,0,1,233.42,148.73ZM94,84A10,10,0,1,1,84,74,10,10,0,0,1,94,84Z"}))],["regular",u.createElement(u.Fragment,null,u.createElement("path",{d:"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63Zm-96,96L48,132.69V48h84.69L232,147.31ZM96,84A12,12,0,1,1,84,72,12,12,0,0,1,96,84Z"}))],["thin",u.createElement(u.Fragment,null,u.createElement("path",{d:"M240.49,138.83,141.17,39.51A11.93,11.93,0,0,0,132.69,36H40a4,4,0,0,0-4,4v92.69a11.93,11.93,0,0,0,3.51,8.48l99.32,99.32a12,12,0,0,0,17,0l84.69-84.69a12,12,0,0,0,0-17Zm-5.66,11.31-84.69,84.69a4,4,0,0,1-5.65,0L45.17,135.51A4,4,0,0,1,44,132.69V44h88.69a4,4,0,0,1,2.82,1.17l99.32,99.32A4,4,0,0,1,234.83,150.14ZM92,84a8,8,0,1,1-8-8A8,8,0,0,1,92,84Z"}))]]),Xv=new Map([["bold",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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"}),u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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",u.createElement(u.Fragment,null,u.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"}))]]),Jv=u.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),ze=u.forwardRef((e,t)=>{const{alt:n,color:r,size:o,weight:s,mirrored:i,children:a,weights:c,...l}=e,{color:f="currentColor",size:d,weight:p="regular",mirrored:h=!1,...y}=u.useContext(Jv);return u.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:o??d,height:o??d,fill:r??f,viewBox:"0 0 256 256",transform:i||h?"scale(-1, 1)":void 0,...y,...l},!!n&&u.createElement("title",null,n),a,c.get(s??p))});ze.displayName="IconBase";const Wd=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Iv}));Wd.displayName="BellIcon";const ey=Wd,qd=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:kv}));qd.displayName="CalendarIcon";const ty=qd,Kd=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Dv}));Kd.displayName="CaretDownIcon";const ny=Kd,Gd=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Lv}));Gd.displayName="CaretLeftIcon";const Xs=Gd,Yd=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:jv}));Yd.displayName="CaretRightIcon";const _r=Yd,Qd=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Fv}));Qd.displayName="CheckIcon";const ry=Qd,Xd=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Bv}));Xd.displayName="DotsSixVerticalIcon";const oy=Xd,Jd=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:$v}));Jd.displayName="DotsThreeVerticalIcon";const sy=Jd,ef=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Hv}));ef.displayName="EyeIcon";const ay=ef,tf=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:zv}));tf.displayName="FileTextIcon";const tl=tf,nf=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Uv}));nf.displayName="GearIcon";const iy=nf,rf=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Vv}));rf.displayName="GridFourIcon";const of=rf,sf=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Zv}));sf.displayName="ListIcon";const cy=sf,af=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Wv}));af.displayName="MagnifyingGlassIcon";const ly=af,cf=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:qv}));cf.displayName="PencilSimpleIcon";const uy=cf,lf=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Kv}));lf.displayName="PushPinIcon";const dy=lf,uf=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Gv}));uf.displayName="SortAscendingIcon";const fy=uf,df=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Yv}));df.displayName="SpinnerIcon";const hy=df,ff=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Qv}));ff.displayName="TagIcon";const py=ff,hf=u.forwardRef((e,t)=>u.createElement(ze,{ref:t,...e,weights:Xv}));hf.displayName="XIcon";const Ci=hf;function my(e){return g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[g.jsx("circle",{cx:"6",cy:"6",r:"3"}),g.jsx("circle",{cx:"18",cy:"6",r:"3"}),g.jsx("circle",{cx:"6",cy:"18",r:"3"}),g.jsx("circle",{cx:"18",cy:"18",r:"3"}),g.jsx("circle",{cx:"12",cy:"12",r:"3"}),g.jsx("line",{x1:"8.5",y1:"7.5",x2:"10",y2:"10"}),g.jsx("line",{x1:"15.5",y1:"7.5",x2:"14",y2:"10"}),g.jsx("line",{x1:"8.5",y1:"16.5",x2:"10",y2:"14"}),g.jsx("line",{x1:"15.5",y1:"16.5",x2:"14",y2:"14"})]})}const nl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rl=d1,Ke=(e,t)=>n=>{var r;if(t?.variants==null)return rl(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const f=n?.[l],d=s?.[l];if(f===null)return null;const p=nl(f)||nl(d);return o[l][p]}),a=n&&Object.entries(n).reduce((l,f)=>{let[d,p]=f;return p===void 0||(l[d]=p),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,f)=>{let{class:d,className:p,...h}=f;return Object.entries(h).every(y=>{let[m,v]=y;return Array.isArray(v)?v.includes({...s,...a}[m]):{...s,...a}[m]===v})?[...l,d,p]:l},[]);return rl(e,i,c,n?.class,n?.className)},gy=Ke(["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"}}),At=u.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isLoading:o,children:s,disabled:i,...a},c)=>{const l=r?Av:"button";return g.jsx(l,{ref:c,className:gy({variant:t,size:n,className:e}),disabled:i||o,...a,children:o?g.jsxs(g.Fragment,{children:[g.jsx(hy,{className:"animate-spin h-4 w-4"}),s]}):s})});At.displayName="Button";const Ri=Ke(["relative","pointer-events-auto","w-full","max-h-[calc(100dvh-2rem)]","overflow-y-auto","border","border-border-subtle","overscroll-contain","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95","data-[state=open]:zoom-in-95"],{variants:{variant:{default:"max-w-[640px] rounded-[20px] bg-elevated shadow-[0_24px_64px_-32px_rgba(15,18,24,0.36)]",compact:"max-w-[480px] rounded-[18px] bg-surface shadow-[0_18px_44px_-28px_rgba(15,18,24,0.28)]",form:"max-w-[560px] rounded-[20px] bg-elevated shadow-[0_22px_56px_-30px_rgba(15,18,24,0.32)]",inspect:"max-w-[640px] rounded-[20px] bg-elevated shadow-[0_24px_64px_-30px_rgba(15,18,24,0.34)]",confirm:"max-w-[336px] rounded-[18px] bg-surface shadow-[0_16px_36px_-24px_rgba(15,18,24,0.24)]"}},defaultVariants:{variant:"default"}}),vy=Ke(["flex","items-center","justify-between"],{variants:{variant:{default:"border-b border-border-subtle/70 px-4 py-3.5",compact:"border-b border-border-subtle/60 px-4 py-3",form:"border-b border-border-subtle/65 px-4 py-3 sm:px-5",inspect:"border-b border-border-subtle/70 px-4 py-3.5 sm:px-5",confirm:"px-4 pb-1 pt-4"}},defaultVariants:{variant:"default"}}),Ai=Ke("",{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"}}),Ti=Ke(["flex","items-center","justify-end"],{variants:{variant:{default:"border-t border-border-subtle/70 px-4 py-3.5",compact:"px-4 pb-4 pt-0",form:"border-t border-border-subtle/65 px-4 py-3 sm:px-5",inspect:"border-t border-border-subtle/70 px-4 py-3.5 sm:px-5",confirm:"justify-end gap-2 px-5 pb-5 pt-0"}},defaultVariants:{variant:"default"}}),yy=Ke(["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"}}),Pi=Ke("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"}}),Mi=Ke("text-fg-secondary",{variants:{variant:{default:"text-meta",compact:"text-meta",form:"text-meta",inspect:"text-meta",confirm:"text-meta"}},defaultVariants:{variant:"default"}}),by=Ke("",{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 Re({as:e="span",className:t,variant:n,weight:r,tone:o,tracking:s,transform:i,truncate:a,children:c,...l}){const f=e;return g.jsx(f,{className:by({variant:n,weight:r,tone:o,tracking:s,transform:i,truncate:a,className:t}),...l,children:c})}const pf=xe("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"),wy=({open:e,options:t,onClose:n})=>g.jsx(Fd,{open:e,onOpenChange:r=>{!r&&t.dismissible&&n()},children:g.jsxs(Bd,{children:[g.jsx($d,{className:pf}),g.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-center justify-center p-4",children:g.jsxs(Hd,{className:Ri({variant:"confirm"}),children:[g.jsxs("div",{className:Ai({variant:"confirm"}),children:[g.jsx(Ud,{className:Pi({variant:"confirm"}),children:t.title}),t.description?g.jsx(Vd,{className:Mi({variant:"confirm"}),children:t.description}):null]}),g.jsx("div",{className:Ti({variant:"confirm"}),children:g.jsx(zd,{asChild:!0,children:g.jsx(At,{size:"sm",onClick:n,children:t.confirmLabel})})})]})})]})}),xy=({open:e,options:t,onCancel:n,onConfirm:r})=>g.jsx(Fd,{open:e,onOpenChange:o=>{!o&&t.dismissible&&n()},children:g.jsxs(Bd,{children:[g.jsx($d,{className:pf}),g.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-center justify-center p-4",children:g.jsxs(Hd,{className:Ri({variant:"confirm"}),children:[g.jsxs("div",{className:Ai({variant:"confirm"}),children:[g.jsx(Ud,{className:Pi({variant:"confirm"}),children:t.title}),t.description?g.jsx(Vd,{className:Mi({variant:"confirm"}),children:g.jsx(Re,{as:"span",variant:"meta",tone:"secondary",children:t.description})}):null]}),g.jsxs("div",{className:Ti({variant:"confirm"}),children:[g.jsx(xv,{asChild:!0,children:g.jsx(At,{variant:"ghost",size:"sm",onClick:n,children:t.cancelLabel})}),g.jsx(zd,{asChild:!0,children:g.jsx(At,{variant:t.tone==="danger"?"danger":"primary",size:"sm",onClick:r,children:t.confirmLabel})})]})]})})]})});function Ey({children:e}){return g.jsx(u2,{components:{Alert:wy,Confirm:xy},children:e})}function mf(){const{confirm:e}=d2();return u.useCallback(t=>e({title:"Confirm",description:t,confirmLabel:"OK",cancelLabel:"Cancel",tone:"danger"}),[e])}function _y(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 Sy=e=>{switch(e){case"success":return Ay;case"info":return Py;case"warning":return Ty;case"error":return My;default:return null}},Cy=Array(12).fill(0),Ry=({visible:e,className:t})=>X.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},X.createElement("div",{className:"sonner-spinner"},Cy.map((n,r)=>X.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Ay=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.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"})),Ty=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},X.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"})),Py=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.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"})),My=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.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"})),Ny=X.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"},X.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),X.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Oy=()=>{const[e,t]=X.useState(document.hidden);return X.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ta=1;class Iy{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:Ta++,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 l=>{if(i=["resolve",l],X.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(Dy(l)&&!l.ok){s=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${l.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${l.status}`):n.description,y=typeof d=="object"&&!X.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...y})}else if(l instanceof Error){s=!1;const d=typeof n.error=="function"?await n.error(l):n.error,p=typeof n.description=="function"?await n.description(l):n.description,y=typeof d=="object"&&!X.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...y})}else if(n.success!==void 0){s=!1;const d=typeof n.success=="function"?await n.success(l):n.success,p=typeof n.description=="function"?await n.description(l):n.description,y=typeof d=="object"&&!X.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:p,...y})}}).catch(async l=>{if(i=["reject",l],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(l):n.error,d=typeof n.description=="function"?await n.description(l):n.description,h=typeof f=="object"&&!X.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...h})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((l,f)=>a.then(()=>i[0]==="reject"?f(i[1]):l(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||Ta++;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 ut=new Iy,ky=(e,t)=>{const n=t?.id||Ta++;return ut.addToast({title:e,...t,id:n}),n},Dy=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Ly=ky,jy=()=>ut.toasts,Fy=()=>ut.getActiveToasts(),By=Object.assign(Ly,{success:ut.success,info:ut.info,warning:ut.warning,error:ut.error,custom:ut.custom,message:ut.message,promise:ut.promise,dismiss:ut.dismiss,loading:ut.loading},{getHistory:jy,getToasts:Fy});_y("[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 fo(e){return e.label!==void 0}const $y=3,Hy="24px",zy="16px",ol=4e3,Uy=356,Vy=14,Zy=45,Wy=200;function It(...e){return e.filter(Boolean).join(" ")}function qy(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Ky=e=>{var t,n,r,o,s,i,a,c,l;const{invert:f,toast:d,unstyled:p,interacting:h,setHeights:y,visibleToasts:m,heights:v,index:b,toasts:w,expanded:_,removeToast:S,defaultRichColors:C,closeButton:O,style:T,cancelButtonStyle:P,actionButtonStyle:N,className:F="",descriptionClassName:z="",duration:R,position:H,gap:x,expandByDefault:I,classNames:$,icons:D,closeButtonAriaLabel:q="Close toast"}=e,[k,Y]=X.useState(null),[L,j]=X.useState(null),[K,G]=X.useState(!1),[Z,le]=X.useState(!1),[te,Q]=X.useState(!1),[ie,re]=X.useState(!1),[ce,fe]=X.useState(!1),[ve,E]=X.useState(0),[J,W]=X.useState(0),M=X.useRef(d.duration||R||ol),A=X.useRef(null),B=X.useRef(null),ee=b===0,ne=b+1<=m,U=d.type,oe=d.dismissible!==!1,ue=d.className||"",se=d.descriptionClassName||"",ae=X.useMemo(()=>v.findIndex(me=>me.toastId===d.id)||0,[v,d.id]),ge=X.useMemo(()=>{var me;return(me=d.closeButton)!=null?me:O},[d.closeButton,O]),pe=X.useMemo(()=>d.duration||R||ol,[d.duration,R]),Ne=X.useRef(0),tt=X.useRef(0),Fe=X.useRef(0),nt=X.useRef(null),[Oe,Gt]=H.split("-"),Ot=X.useMemo(()=>v.reduce((me,Ae,Ce)=>Ce>=ae?me:me+Ae.height,0),[v,ae]),rt=Oy(),On=d.invert||f,Yt=U==="loading";tt.current=X.useMemo(()=>ae*x+Ot,[ae,Ot]),X.useEffect(()=>{M.current=pe},[pe]),X.useEffect(()=>{G(!0)},[]),X.useEffect(()=>{const me=B.current;if(me){const Ae=me.getBoundingClientRect().height;return W(Ae),y(Ce=>[{toastId:d.id,height:Ae,position:d.position},...Ce]),()=>y(Ce=>Ce.filter(Te=>Te.toastId!==d.id))}},[y,d.id]),X.useLayoutEffect(()=>{if(!K)return;const me=B.current,Ae=me.style.height;me.style.height="auto";const Ce=me.getBoundingClientRect().height;me.style.height=Ae,W(Ce),y(Te=>Te.find(ke=>ke.toastId===d.id)?Te.map(ke=>ke.toastId===d.id?{...ke,height:Ce}:ke):[{toastId:d.id,height:Ce,position:d.position},...Te])},[K,d.title,d.description,y,d.id,d.jsx,d.action,d.cancel]);const bt=X.useCallback(()=>{le(!0),E(tt.current),y(me=>me.filter(Ae=>Ae.toastId!==d.id)),setTimeout(()=>{S(d)},Wy)},[d,S,y,tt]);X.useEffect(()=>{if(d.promise&&U==="loading"||d.duration===1/0||d.type==="loading")return;let me;return _||h||rt?(()=>{if(Fe.current<Ne.current){const Te=new Date().getTime()-Ne.current;M.current=M.current-Te}Fe.current=new Date().getTime()})():M.current!==1/0&&(Ne.current=new Date().getTime(),me=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),bt()},M.current)),()=>clearTimeout(me)},[_,h,d,U,rt,bt]),X.useEffect(()=>{d.delete&&(bt(),d.onDismiss==null||d.onDismiss.call(d,d))},[bt,d.delete]);function lr(){var me;if(D?.loading){var Ae;return X.createElement("div",{className:It($?.loader,d==null||(Ae=d.classNames)==null?void 0:Ae.loader,"sonner-loader"),"data-visible":U==="loading"},D.loading)}return X.createElement(Ry,{className:It($?.loader,d==null||(me=d.classNames)==null?void 0:me.loader),visible:U==="loading"})}const In=d.icon||D?.[U]||Sy(U);var Ie,$e;return X.createElement("li",{tabIndex:0,ref:B,className:It(F,ue,$?.toast,d==null||(t=d.classNames)==null?void 0:t.toast,$?.default,$?.[U],d==null||(n=d.classNames)==null?void 0:n[U]),"data-sonner-toast":"","data-rich-colors":(Ie=d.richColors)!=null?Ie:C,"data-styled":!(d.jsx||d.unstyled||p),"data-mounted":K,"data-promise":!!d.promise,"data-swiped":ce,"data-removed":Z,"data-visible":ne,"data-y-position":Oe,"data-x-position":Gt,"data-index":b,"data-front":ee,"data-swiping":te,"data-dismissible":oe,"data-type":U,"data-invert":On,"data-swipe-out":ie,"data-swipe-direction":L,"data-expanded":!!(_||I&&K),"data-testid":d.testId,style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${Z?ve:tt.current}px`,"--initial-height":I?"auto":`${J}px`,...T,...d.style},onDragEnd:()=>{Q(!1),Y(null),nt.current=null},onPointerDown:me=>{me.button!==2&&(Yt||!oe||(A.current=new Date,E(tt.current),me.target.setPointerCapture(me.pointerId),me.target.tagName!=="BUTTON"&&(Q(!0),nt.current={x:me.clientX,y:me.clientY})))},onPointerUp:()=>{var me,Ae,Ce;if(ie||!oe)return;nt.current=null;const Te=Number(((me=B.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ot=Number(((Ae=B.current)==null?void 0:Ae.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ke=new Date().getTime()-((Ce=A.current)==null?void 0:Ce.getTime()),_e=k==="x"?Te:ot,pt=Math.abs(_e)/ke;if(Math.abs(_e)>=Zy||pt>.11){E(tt.current),d.onDismiss==null||d.onDismiss.call(d,d),j(k==="x"?Te>0?"right":"left":ot>0?"down":"up"),bt(),re(!0);return}else{var Be,He;(Be=B.current)==null||Be.style.setProperty("--swipe-amount-x","0px"),(He=B.current)==null||He.style.setProperty("--swipe-amount-y","0px")}fe(!1),Q(!1),Y(null)},onPointerMove:me=>{var Ae,Ce,Te;if(!nt.current||!oe||((Ae=window.getSelection())==null?void 0:Ae.toString().length)>0)return;const ke=me.clientY-nt.current.y,_e=me.clientX-nt.current.x;var pt;const Be=(pt=e.swipeDirections)!=null?pt:qy(H);!k&&(Math.abs(_e)>1||Math.abs(ke)>1)&&Y(Math.abs(_e)>Math.abs(ke)?"x":"y");let He={x:0,y:0};const Qt=mt=>1/(1.5+Math.abs(mt)/20);if(k==="y"){if(Be.includes("top")||Be.includes("bottom"))if(Be.includes("top")&&ke<0||Be.includes("bottom")&&ke>0)He.y=ke;else{const mt=ke*Qt(ke);He.y=Math.abs(mt)<Math.abs(ke)?mt:ke}}else if(k==="x"&&(Be.includes("left")||Be.includes("right")))if(Be.includes("left")&&_e<0||Be.includes("right")&&_e>0)He.x=_e;else{const mt=_e*Qt(_e);He.x=Math.abs(mt)<Math.abs(_e)?mt:_e}(Math.abs(He.x)>0||Math.abs(He.y)>0)&&fe(!0),(Ce=B.current)==null||Ce.style.setProperty("--swipe-amount-x",`${He.x}px`),(Te=B.current)==null||Te.style.setProperty("--swipe-amount-y",`${He.y}px`)}},ge&&!d.jsx&&U!=="loading"?X.createElement("button",{"aria-label":q,"data-disabled":Yt,"data-close-button":!0,onClick:Yt||!oe?()=>{}:()=>{bt(),d.onDismiss==null||d.onDismiss.call(d,d)},className:It($?.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},($e=D?.close)!=null?$e:Ny):null,(U||d.icon||d.promise)&&d.icon!==null&&(D?.[U]!==null||d.icon)?X.createElement("div",{"data-icon":"",className:It($?.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||lr():null,d.type!=="loading"?In:null):null,X.createElement("div",{"data-content":"",className:It($?.content,d==null||(s=d.classNames)==null?void 0:s.content)},X.createElement("div",{"data-title":"",className:It($?.title,d==null||(i=d.classNames)==null?void 0:i.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?X.createElement("div",{"data-description":"",className:It(z,se,$?.description,d==null||(a=d.classNames)==null?void 0:a.description)},typeof d.description=="function"?d.description():d.description):null),X.isValidElement(d.cancel)?d.cancel:d.cancel&&fo(d.cancel)?X.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||P,onClick:me=>{fo(d.cancel)&&oe&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,me),bt())},className:It($?.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,X.isValidElement(d.action)?d.action:d.action&&fo(d.action)?X.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||N,onClick:me=>{fo(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,me),!me.defaultPrevented&&bt())},className:It($?.actionButton,d==null||(l=d.classNames)==null?void 0:l.actionButton)},d.action.label):null)};function sl(){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 Gy(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",a=s?zy:Hy;function c(l){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof l=="number"?`${l}px`:l})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(l=>{r[l]===void 0?n[`${i}-${l}`]=a:n[`${i}-${l}`]=typeof r[l]=="number"?`${r[l]}px`:r[l]}):c(a)}),n}const Yy=X.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:c,className:l,offset:f,mobileOffset:d,theme:p="light",richColors:h,duration:y,style:m,visibleToasts:v=$y,toastOptions:b,dir:w=sl(),gap:_=Vy,icons:S,containerAriaLabel:C="Notifications"}=t,[O,T]=X.useState([]),P=X.useMemo(()=>r?O.filter(K=>K.toasterId===r):O.filter(K=>!K.toasterId),[O,r]),N=X.useMemo(()=>Array.from(new Set([s].concat(P.filter(K=>K.position).map(K=>K.position)))),[P,s]),[F,z]=X.useState([]),[R,H]=X.useState(!1),[x,I]=X.useState(!1),[$,D]=X.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=X.useRef(null),k=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),Y=X.useRef(null),L=X.useRef(!1),j=X.useCallback(K=>{T(G=>{var Z;return(Z=G.find(le=>le.id===K.id))!=null&&Z.delete||ut.dismiss(K.id),G.filter(({id:le})=>le!==K.id)})},[]);return X.useEffect(()=>ut.subscribe(K=>{if(K.dismiss){requestAnimationFrame(()=>{T(G=>G.map(Z=>Z.id===K.id?{...Z,delete:!0}:Z))});return}setTimeout(()=>{lu.flushSync(()=>{T(G=>{const Z=G.findIndex(le=>le.id===K.id);return Z!==-1?[...G.slice(0,Z),{...G[Z],...K},...G.slice(Z+1)]:[K,...G]})})})}),[O]),X.useEffect(()=>{if(p!=="system"){D(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;const K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:G})=>{D(G?"dark":"light")})}catch{K.addListener(({matches:Z})=>{try{D(Z?"dark":"light")}catch(le){console.error(le)}})}},[p]),X.useEffect(()=>{O.length<=1&&H(!1)},[O]),X.useEffect(()=>{const K=G=>{var Z;if(i.every(Q=>G[Q]||G.code===Q)){var te;H(!0),(te=q.current)==null||te.focus()}G.code==="Escape"&&(document.activeElement===q.current||(Z=q.current)!=null&&Z.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[i]),X.useEffect(()=>{if(q.current)return()=>{Y.current&&(Y.current.focus({preventScroll:!0}),Y.current=null,L.current=!1)}},[q.current]),X.createElement("section",{ref:n,"aria-label":`${C} ${k}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((K,G)=>{var Z;const[le,te]=K.split("-");return P.length?X.createElement("ol",{key:K,dir:w==="auto"?sl():w,tabIndex:-1,ref:q,className:l,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":le,"data-x-position":te,style:{"--front-toast-height":`${((Z=F[0])==null?void 0:Z.height)||0}px`,"--width":`${Uy}px`,"--gap":`${_}px`,...m,...Gy(f,d)},onBlur:Q=>{L.current&&!Q.currentTarget.contains(Q.relatedTarget)&&(L.current=!1,Y.current&&(Y.current.focus({preventScroll:!0}),Y.current=null))},onFocus:Q=>{Q.target instanceof HTMLElement&&Q.target.dataset.dismissible==="false"||L.current||(L.current=!0,Y.current=Q.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{x||H(!1)},onDragEnd:()=>H(!1),onPointerDown:Q=>{Q.target instanceof HTMLElement&&Q.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},P.filter(Q=>!Q.position&&G===0||Q.position===K).map((Q,ie)=>{var re,ce;return X.createElement(Ky,{key:Q.id,icons:S,index:ie,toast:Q,defaultRichColors:h,duration:(re=b?.duration)!=null?re:y,className:b?.className,descriptionClassName:b?.descriptionClassName,invert:o,visibleToasts:v,closeButton:(ce=b?.closeButton)!=null?ce:c,interacting:x,position:K,style:b?.style,unstyled:b?.unstyled,classNames:b?.classNames,cancelButtonStyle:b?.cancelButtonStyle,actionButtonStyle:b?.actionButtonStyle,closeButtonAriaLabel:b?.closeButtonAriaLabel,removeToast:j,toasts:P.filter(fe=>fe.position==Q.position),heights:F.filter(fe=>fe.position==Q.position),setHeights:z,expandByDefault:a,gap:_,expanded:R,swipeDirections:t.swipeDirections})})):null}))});var Ln=(e,t)=>({...e,...t}),Qy=(e,t)=>Object.assign((n,r)=>e(n,Ln(t,r)),{success:(n,r)=>e.success(n,Ln(t,r)),error:(n,r)=>e.error(n,Ln(t,r)),info:(n,r)=>e.info(n,Ln(t,r)),warning:(n,r)=>e.warning(n,Ln(t,r)),loading:(n,r)=>e.loading(n,Ln(t,r)),dismiss:n=>e.dismiss(n)}),gf=(e={})=>Qy(By,e);gf();var Xy=e=>g.jsx(Yy,{...e});const Jy=gf({duration:3e3});function eb({children:e}){return g.jsxs(g.Fragment,{children:[e,g.jsx(Xy,{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 vf(){return Jy}const tb=new Wg({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});function yf(e,t){return function(){return e.apply(t,arguments)}}const{toString:nb}=Object.prototype,{getPrototypeOf:ps}=Object,{iterator:ms,toStringTag:bf}=Symbol,gs=(e=>t=>{const n=nb.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Nt=e=>(e=e.toLowerCase(),t=>gs(t)===e),vs=e=>t=>typeof t===e,{isArray:tr}=Array,Yn=vs("undefined");function Ur(e){return e!==null&&!Yn(e)&&e.constructor!==null&&!Yn(e.constructor)&&ft(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const wf=Nt("ArrayBuffer");function rb(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&wf(e.buffer),t}const ob=vs("string"),ft=vs("function"),xf=vs("number"),Vr=e=>e!==null&&typeof e=="object",sb=e=>e===!0||e===!1,So=e=>{if(gs(e)!=="object")return!1;const t=ps(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(bf in e)&&!(ms in e)},ab=e=>{if(!Vr(e)||Ur(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ib=Nt("Date"),cb=Nt("File"),lb=e=>!!(e&&typeof e.uri<"u"),ub=e=>e&&typeof e.getParts<"u",db=Nt("Blob"),fb=Nt("FileList"),hb=e=>Vr(e)&&ft(e.pipe);function pb(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const al=pb(),il=typeof al.FormData<"u"?al.FormData:void 0,mb=e=>{if(!e)return!1;if(il&&e instanceof il)return!0;const t=ps(e);if(!t||t===Object.prototype||!ft(e.append))return!1;const n=gs(e);return n==="formdata"||n==="object"&&ft(e.toString)&&e.toString()==="[object FormData]"},gb=Nt("URLSearchParams"),[vb,yb,bb,wb]=["ReadableStream","Request","Response","Headers"].map(Nt),xb=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),tr(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Ur(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 Ef(e,t){if(Ur(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 gn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_f=e=>!Yn(e)&&e!==gn;function Pa(...e){const{caseless:t,skipUndefined:n}=_f(this)&&this||{},r={},o=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=t&&Ef(r,i)||i,c=Ma(r,a)?r[a]:void 0;So(c)&&So(s)?r[a]=Pa(c,s):So(s)?r[a]=Pa({},s):tr(s)?r[a]=s.slice():(!n||!Yn(s))&&(r[a]=s)};for(let s=0,i=e.length;s<i;s++)e[s]&&Zr(e[s],o);return r}const Eb=(e,t,n,{allOwnKeys:r}={})=>(Zr(t,(o,s)=>{n&&ft(o)?Object.defineProperty(e,s,{__proto__:null,value:yf(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),_b=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Sb=(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)},Cb=(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&&ps(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rb=(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},Ab=e=>{if(!e)return null;if(tr(e))return e;let t=e.length;if(!xf(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Tb=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ps(Uint8Array)),Pb=(e,t)=>{const r=(e&&e[ms]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Mb=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Nb=Nt("HTMLFormElement"),Ob=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ma=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ib=Nt("RegExp"),Sf=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Zr(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},kb=e=>{Sf(e,(t,n)=>{if(ft(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(ft(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+"'")})}})},Db=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return tr(e)?r(e):r(String(e).split(t)),n},Lb=()=>{},jb=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Fb(e){return!!(e&&ft(e.append)&&e[bf]==="FormData"&&e[ms])}const Bb=e=>{const t=new Array(10),n=(r,o)=>{if(Vr(r)){if(t.indexOf(r)>=0)return;if(Ur(r))return r;if(!("toJSON"in r)){t[o]=r;const s=tr(r)?[]:{};return Zr(r,(i,a)=>{const c=n(i,o+1);!Yn(c)&&(s[a]=c)}),t[o]=void 0,s}}return r};return n(e,0)},$b=Nt("AsyncFunction"),Hb=e=>e&&(Vr(e)||ft(e))&&ft(e.then)&&ft(e.catch),Cf=((e,t)=>e?setImmediate:t?((n,r)=>(gn.addEventListener("message",({source:o,data:s})=>{o===gn&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),gn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ft(gn.postMessage)),zb=typeof queueMicrotask<"u"?queueMicrotask.bind(gn):typeof process<"u"&&process.nextTick||Cf,Ub=e=>e!=null&&ft(e[ms]),V={isArray:tr,isArrayBuffer:wf,isBuffer:Ur,isFormData:mb,isArrayBufferView:rb,isString:ob,isNumber:xf,isBoolean:sb,isObject:Vr,isPlainObject:So,isEmptyObject:ab,isReadableStream:vb,isRequest:yb,isResponse:bb,isHeaders:wb,isUndefined:Yn,isDate:ib,isFile:cb,isReactNativeBlob:lb,isReactNative:ub,isBlob:db,isRegExp:Ib,isFunction:ft,isStream:hb,isURLSearchParams:gb,isTypedArray:Tb,isFileList:fb,forEach:Zr,merge:Pa,extend:Eb,trim:xb,stripBOM:_b,inherits:Sb,toFlatObject:Cb,kindOf:gs,kindOfTest:Nt,endsWith:Rb,toArray:Ab,forEachEntry:Pb,matchAll:Mb,isHTMLForm:Nb,hasOwnProperty:Ma,hasOwnProp:Ma,reduceDescriptors:Sf,freezeMethods:kb,toObjectSet:Db,toCamelCase:Ob,noop:Lb,toFiniteNumber:jb,findKey:Ef,global:gn,isContextDefined:_f,isSpecCompliantForm:Fb,toJSONObject:Bb,isAsyncFn:$b,isThenable:Hb,setImmediate:Cf,asap:zb,isIterable:Ub},Vb=V.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"]),Zb=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
13
|
+
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&Vb[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},cl=Symbol("internals"),Wb=/[^\x09\x20-\x7E\x80-\xFF]/g;function qb(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function mr(e){return e&&String(e).trim().toLowerCase()}function Kb(e){return qb(e.replace(Wb,""))}function Co(e){return e===!1||e==null?e:V.isArray(e)?e.map(Co):Kb(String(e))}function Gb(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 Yb=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Js(e,t,n,r,o){if(V.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function Qb(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Xb(e,t){const n=V.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 at=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(a,c,l){const f=mr(c);if(!f)throw new Error("header name must be a non-empty string");const d=V.findKey(o,f);(!d||o[d]===void 0||l===!0||l===void 0&&o[d]!==!1)&&(o[d||c]=Co(a))}const i=(a,c)=>V.forEach(a,(l,f)=>s(l,f,c));if(V.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(V.isString(t)&&(t=t.trim())&&!Yb(t))i(Zb(t),n);else if(V.isObject(t)&&V.isIterable(t)){let a={},c,l;for(const f of t){if(!V.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[l=f[0]]=(c=a[l])?V.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}i(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=mr(t),t){const r=V.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Gb(o);if(V.isFunction(n))return n.call(this,o,r);if(V.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=mr(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Js(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=mr(i),i){const a=V.findKey(r,i);a&&(!n||Js(r,r[a],a,n))&&(delete r[a],o=!0)}}return V.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||Js(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return V.forEach(this,(o,s)=>{const i=V.findKey(r,s);if(i){n[i]=Co(o),delete n[s];return}const a=t?Qb(s):String(s).trim();a!==s&&delete n[s],n[a]=Co(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return V.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
14
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[cl]=this[cl]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=mr(i);r[a]||(Xb(o,i),r[a]=!0)}return V.isArray(t)?t.forEach(s):s(t),this}};at.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(at.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});V.freezeMethods(at);const Jb="[REDACTED ****]";function e6(e){if(V.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(V.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function t6(e,t){const n=new Set(t.map(s=>String(s).toLowerCase())),r=[],o=s=>{if(s===null||typeof s!="object"||V.isBuffer(s))return s;if(r.indexOf(s)!==-1)return;s instanceof at&&(s=s.toJSON()),r.push(s);let i;if(V.isArray(s))i=[],s.forEach((a,c)=>{const l=o(a);V.isUndefined(l)||(i[c]=l)});else{if(!V.isPlainObject(s)&&e6(s))return r.pop(),s;i=Object.create(null);for(const[a,c]of Object.entries(s)){const l=n.has(a.toLowerCase())?Jb:o(c);V.isUndefined(l)||(i[a]=l)}}return r.pop(),i};return o(e)}let he=class Rf extends Error{static from(t,n,r,o,s,i){const a=new Rf(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&&V.hasOwnProp(t,"redact")?t.redact:void 0,r=V.isArray(n)&&n.length>0?t6(t,n):V.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}}};he.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";he.ERR_BAD_OPTION="ERR_BAD_OPTION";he.ECONNABORTED="ECONNABORTED";he.ETIMEDOUT="ETIMEDOUT";he.ECONNREFUSED="ECONNREFUSED";he.ERR_NETWORK="ERR_NETWORK";he.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";he.ERR_DEPRECATED="ERR_DEPRECATED";he.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";he.ERR_BAD_REQUEST="ERR_BAD_REQUEST";he.ERR_CANCELED="ERR_CANCELED";he.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";he.ERR_INVALID_URL="ERR_INVALID_URL";he.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const n6=null;function Na(e){return V.isPlainObject(e)||V.isArray(e)}function Af(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function ea(e,t,n){return e?e.concat(t).map(function(o,s){return o=Af(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function r6(e){return V.isArray(e)&&!e.some(Na)}const o6=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function ys(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!V.isUndefined(b[v])});const r=n.metaTokens,o=n.visitor||d,s=n.dots,i=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=a&&V.isSpecCompliantForm(t);if(!V.isFunction(o))throw new TypeError("visitor must be a function");function f(m){if(m===null)return"";if(V.isDate(m))return m.toISOString();if(V.isBoolean(m))return m.toString();if(!l&&V.isBlob(m))throw new he("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(m)||V.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,v,b){let w=m;if(V.isReactNative(t)&&V.isReactNativeBlob(m))return t.append(ea(b,v,s),f(m)),!1;if(m&&!b&&typeof m=="object"){if(V.endsWith(v,"{}"))v=r?v:v.slice(0,-2),m=JSON.stringify(m);else if(V.isArray(m)&&r6(m)||(V.isFileList(m)||V.endsWith(v,"[]"))&&(w=V.toArray(m)))return v=Af(v),w.forEach(function(S,C){!(V.isUndefined(S)||S===null)&&t.append(i===!0?ea([v],C,s):i===null?v:v+"[]",f(S))}),!1}return Na(m)?!0:(t.append(ea(b,v,s),f(m)),!1)}const p=[],h=Object.assign(o6,{defaultVisitor:d,convertValue:f,isVisitable:Na});function y(m,v,b=0){if(!V.isUndefined(m)){if(b>c)throw new he("Object is too deeply nested ("+b+" levels). Max depth: "+c,he.ERR_FORM_DATA_DEPTH_EXCEEDED);if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(m),V.forEach(m,function(_,S){(!(V.isUndefined(_)||_===null)&&o.call(t,_,V.isString(S)?S.trim():S,v,h))===!0&&y(_,v?v.concat(S):[S],b+1)}),p.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return y(e),t}function ll(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Ni(e,t){this._pairs=[],e&&ys(e,this,t)}const Tf=Ni.prototype;Tf.append=function(t,n){this._pairs.push([t,n])};Tf.toString=function(t){const n=t?function(r){return t.call(this,r,ll)}:ll;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function s6(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pf(e,t,n){if(!t)return e;const r=n&&n.encode||s6,o=V.isFunction(n)?{serialize:n}:n,s=o&&o.serialize;let i;if(s?i=s(t,o):i=V.isURLSearchParams(t)?t.toString():new Ni(t,o).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ul{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){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Oi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},a6=typeof URLSearchParams<"u"?URLSearchParams:Ni,i6=typeof FormData<"u"?FormData:null,c6=typeof Blob<"u"?Blob:null,l6={isBrowser:!0,classes:{URLSearchParams:a6,FormData:i6,Blob:c6},protocols:["http","https","file","blob","url","data"]},Ii=typeof window<"u"&&typeof document<"u",Oa=typeof navigator=="object"&&navigator||void 0,u6=Ii&&(!Oa||["ReactNative","NativeScript","NS"].indexOf(Oa.product)<0),d6=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",f6=Ii&&window.location.href||"http://localhost",h6=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ii,hasStandardBrowserEnv:u6,hasStandardBrowserWebWorkerEnv:d6,navigator:Oa,origin:f6},Symbol.toStringTag,{value:"Module"})),Qe={...h6,...l6};function p6(e,t){return ys(e,new Qe.classes.URLSearchParams,{visitor:function(n,r,o,s){return Qe.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function m6(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function g6(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 Mf(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=s>=n.length;return i=!i&&V.isArray(o)?o.length:i,c?(V.hasOwnProp(o,i)?o[i]=V.isArray(o[i])?o[i].concat(r):[o[i],r]:o[i]=r,!a):((!o[i]||!V.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&V.isArray(o[i])&&(o[i]=g6(o[i])),!a)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,o)=>{t(m6(r),o,n,0)}),n}return null}const jn=(e,t)=>e!=null&&V.hasOwnProp(e,t)?e[t]:void 0;function v6(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Wr={transitional:Oi,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=V.isObject(t);if(s&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return o?JSON.stringify(Mf(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){const c=jn(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return p6(t,c).toString();if((a=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=jn(this,"env"),f=l&&l.FormData;return ys(a?{"files[]":t}:t,f&&new f,c)}}return s||o?(n.setContentType("application/json",!1),v6(t)):t}],transformResponse:[function(t){const n=jn(this,"transitional")||Wr.transitional,r=n&&n.forcedJSONParsing,o=jn(this,"responseType"),s=o==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!o||s)){const a=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,jn(this,"parseReviver"))}catch(c){if(a)throw c.name==="SyntaxError"?he.from(c,he.ERR_BAD_RESPONSE,this,null,jn(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qe.classes.FormData,Blob:Qe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],e=>{Wr.headers[e]={}});function ta(e,t){const n=this||Wr,r=t||n,o=at.from(r.headers);let s=r.data;return V.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Nf(e){return!!(e&&e.__CANCEL__)}let qr=class extends he{constructor(t,n,r){super(t??"canceled",he.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Of(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new he("Request failed with status code "+n.status,n.status>=400&&n.status<500?he.ERR_BAD_REQUEST:he.ERR_BAD_RESPONSE,n.config,n.request,n))}function y6(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function b6(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 l=Date.now(),f=r[s];i||(i=l),n[o]=c,r[o]=l;let d=s,p=0;for(;d!==o;)p+=n[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const h=f&&l-f;return h?Math.round(p*1e3/h):void 0}}function w6(e,t){let n=0,r=1e3/t,o,s;const i=(l,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e(...l)};return[(...l)=>{const f=Date.now(),d=f-n;d>=r?i(l,f):(o=l,s||(s=setTimeout(()=>{s=null,i(o)},r-d)))},()=>o&&i(o)]}const Uo=(e,t,n=3)=>{let r=0;const o=b6(50,250);return w6(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,c=a!=null?Math.min(i,a):i,l=Math.max(0,c-r),f=o(l);r=Math.max(r,c);const d={loaded:c,total:a,progress:a?c/a:void 0,bytes:l,rate:f||void 0,estimated:f&&a?(a-c)/f:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},dl=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},fl=e=>(...t)=>V.asap(()=>e(...t)),x6=Qe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Qe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Qe.origin),Qe.navigator&&/(msie|trident)/i.test(Qe.navigator.userAgent)):()=>!0,E6=Qe.hasStandardBrowserEnv?{write(e,t,n,r,o,s,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&a.push(`path=${r}`),V.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),V.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 _6(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function S6(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function If(e,t,n){let r=!_6(t);return e&&(r||n===!1)?S6(e,t):t}const hl=e=>e instanceof at?{...e}:e;function Rn(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(l,f,d,p){return V.isPlainObject(l)&&V.isPlainObject(f)?V.merge.call({caseless:p},l,f):V.isPlainObject(f)?V.merge({},f):V.isArray(f)?f.slice():f}function o(l,f,d,p){if(V.isUndefined(f)){if(!V.isUndefined(l))return r(void 0,l,d,p)}else return r(l,f,d,p)}function s(l,f){if(!V.isUndefined(f))return r(void 0,f)}function i(l,f){if(V.isUndefined(f)){if(!V.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function a(l,f,d){if(V.hasOwnProp(t,d))return r(l,f);if(V.hasOwnProp(e,d))return r(void 0,l)}const c={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:a,headers:(l,f,d)=>o(hl(l),hl(f),d,!0)};return V.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const d=V.hasOwnProp(c,f)?c[f]:o,p=V.hasOwnProp(e,f)?e[f]:void 0,h=V.hasOwnProp(t,f)?t[f]:void 0,y=d(p,h,f);V.isUndefined(y)&&d!==a||(n[f]=y)}),n}const C6=["content-type","content-length"];function R6(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,o])=>{C6.includes(r.toLowerCase())&&e.set(r,o)})}const A6=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),kf=e=>{const t=Rn({},e),n=p=>V.hasOwnProp(t,p)?t[p]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const c=n("auth"),l=n("baseURL"),f=n("allowAbsoluteUrls"),d=n("url");if(t.headers=a=at.from(a),t.url=Pf(If(l,d,f),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?A6(c.password):""))),V.isFormData(r)&&(Qe.hasStandardBrowserEnv||Qe.hasStandardBrowserWebWorkerEnv?a.setContentType(void 0):V.isFunction(r.getHeaders)&&R6(a,r.getHeaders(),n("formDataHeaderPolicy"))),Qe.hasStandardBrowserEnv&&(V.isFunction(o)&&(o=o(t)),o===!0||o==null&&x6(t.url))){const h=s&&i&&E6.read(i);h&&a.set(s,h)}return t},T6=typeof XMLHttpRequest<"u",P6=T6&&function(e){return new Promise(function(n,r){const o=kf(e);let s=o.data;const i=at.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=o,f,d,p,h,y;function m(){h&&h(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function b(){if(!v)return;const _=at.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:e,request:v};Of(function(T){n(T),m()},function(T){r(T),m()},C),v=null}"onloadend"in v?v.onloadend=b:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(b)},v.onabort=function(){v&&(r(new he("Request aborted",he.ECONNABORTED,e,v)),m(),v=null)},v.onerror=function(S){const C=S&&S.message?S.message:"Network Error",O=new he(C,he.ERR_NETWORK,e,v);O.event=S||null,r(O),m(),v=null},v.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const C=o.transitional||Oi;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),r(new he(S,C.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,e,v)),m(),v=null},s===void 0&&i.setContentType(null),"setRequestHeader"in v&&V.forEach(i.toJSON(),function(S,C){v.setRequestHeader(C,S)}),V.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),a&&a!=="json"&&(v.responseType=o.responseType),l&&([p,y]=Uo(l,!0),v.addEventListener("progress",p)),c&&v.upload&&([d,h]=Uo(c),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(f=_=>{v&&(r(!_||_.type?new qr(null,e,v):_),v.abort(),m(),v=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const w=y6(o.url);if(w&&!Qe.protocols.includes(w)){r(new he("Unsupported protocol "+w+":",he.ERR_BAD_REQUEST,e));return}v.send(s||null)})},M6=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,a();const f=l instanceof Error?l:this.reason;r.abort(f instanceof he?f:new qr(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,s(new he(`timeout of ${t}ms exceeded`,he.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>V.asap(a),c}},N6=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},O6=async function*(e,t){for await(const n of I6(e))yield*N6(n,t)},I6=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()}},pl=(e,t,n,r)=>{const o=O6(e,t);let s=0,i,a=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:f}=await o.next();if(l){a(),c.close();return}let d=f.byteLength;if(n){let p=s+=d;n(p)}c.enqueue(new Uint8Array(f))}catch(l){throw a(l),l}},cancel(c){return a(c),o.return()}},{highWaterMark:2})};function k6(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 h=0;h<a;h++)if(r.charCodeAt(h)===37&&h+2<a){const y=r.charCodeAt(h+1),m=r.charCodeAt(h+2);(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102)&&(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(i-=2,h+=2)}let c=0,l=a-1;const f=h=>h>=2&&r.charCodeAt(h-2)===37&&r.charCodeAt(h-1)===51&&(r.charCodeAt(h)===68||r.charCodeAt(h)===100);l>=0&&(r.charCodeAt(l)===61?(c++,l--):f(l)&&(c++,l-=3)),c===1&&l>=0&&(r.charCodeAt(l)===61||f(l))&&c++;const p=Math.floor(i/4)*3-(c||0);return p>0?p:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let s=0;for(let i=0,a=r.length;i<a;i++){const c=r.charCodeAt(i);if(c<128)s+=1;else if(c<2048)s+=2;else if(c>=55296&&c<=56319&&i+1<a){const l=r.charCodeAt(i+1);l>=56320&&l<=57343?(s+=4,i++):s+=3}else s+=3}return s}const ki="1.16.0",ml=64*1024,{isFunction:ho}=V,gl=(e,...t)=>{try{return!!e(...t)}catch{return!1}},D6=e=>{const t=V.global??globalThis,{ReadableStream:n,TextEncoder:r}=t;e=V.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:s,Response:i}=e,a=o?ho(o):typeof fetch=="function",c=ho(s),l=ho(i);if(!a)return!1;const f=a&&ho(n),d=a&&(typeof r=="function"?(b=>w=>b.encode(w))(new r):async b=>new Uint8Array(await new s(b).arrayBuffer())),p=c&&f&&gl(()=>{let b=!1;const w=new s(Qe.origin,{body:new n,method:"POST",get duplex(){return b=!0,"half"}}),_=w.headers.has("Content-Type");return w.body!=null&&w.body.cancel(),b&&!_}),h=l&&f&&gl(()=>V.isReadableStream(new i("").body)),y={stream:h&&(b=>b.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!y[b]&&(y[b]=(w,_)=>{let S=w&&w[b];if(S)return S.call(w);throw new he(`Response type '${b}' is not supported`,he.ERR_NOT_SUPPORT,_)})});const m=async b=>{if(b==null)return 0;if(V.isBlob(b))return b.size;if(V.isSpecCompliantForm(b))return(await new s(Qe.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(V.isArrayBufferView(b)||V.isArrayBuffer(b))return b.byteLength;if(V.isURLSearchParams(b)&&(b=b+""),V.isString(b))return(await d(b)).byteLength},v=async(b,w)=>{const _=V.toFiniteNumber(b.getContentLength());return _??m(w)};return async b=>{let{url:w,method:_,data:S,signal:C,cancelToken:O,timeout:T,onDownloadProgress:P,onUploadProgress:N,responseType:F,headers:z,withCredentials:R="same-origin",fetchOptions:H,maxContentLength:x,maxBodyLength:I}=kf(b);const $=V.isNumber(x)&&x>-1,D=V.isNumber(I)&&I>-1;let q=o||fetch;F=F?(F+"").toLowerCase():"text";let k=M6([C,O&&O.toAbortSignal()],T),Y=null;const L=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let j;try{if($&&typeof w=="string"&&w.startsWith("data:")&&k6(w)>x)throw new he("maxContentLength size of "+x+" exceeded",he.ERR_BAD_RESPONSE,b,Y);if(D&&_!=="get"&&_!=="head"){const Q=await v(z,S);if(typeof Q=="number"&&isFinite(Q)&&Q>I)throw new he("Request body larger than maxBodyLength limit",he.ERR_BAD_REQUEST,b,Y)}if(N&&p&&_!=="get"&&_!=="head"&&(j=await v(z,S))!==0){let Q=new s(w,{method:"POST",body:S,duplex:"half"}),ie;if(V.isFormData(S)&&(ie=Q.headers.get("content-type"))&&z.setContentType(ie),Q.body){const[re,ce]=dl(j,Uo(fl(N)));S=pl(Q.body,ml,re,ce)}}V.isString(R)||(R=R?"include":"omit");const K=c&&"credentials"in s.prototype;if(V.isFormData(S)){const Q=z.getContentType();Q&&/^multipart\/form-data/i.test(Q)&&!/boundary=/i.test(Q)&&z.delete("content-type")}z.set("User-Agent","axios/"+ki,!1);const G={...H,signal:k,method:_.toUpperCase(),headers:z.normalize().toJSON(),body:S,duplex:"half",credentials:K?R:void 0};Y=c&&new s(w,G);let Z=await(c?q(Y,H):q(w,G));if($){const Q=V.toFiniteNumber(Z.headers.get("content-length"));if(Q!=null&&Q>x)throw new he("maxContentLength size of "+x+" exceeded",he.ERR_BAD_RESPONSE,b,Y)}const le=h&&(F==="stream"||F==="response");if(h&&Z.body&&(P||$||le&&L)){const Q={};["status","statusText","headers"].forEach(E=>{Q[E]=Z[E]});const ie=V.toFiniteNumber(Z.headers.get("content-length")),[re,ce]=P&&dl(ie,Uo(fl(P),!0))||[];let fe=0;const ve=E=>{if($&&(fe=E,fe>x))throw new he("maxContentLength size of "+x+" exceeded",he.ERR_BAD_RESPONSE,b,Y);re&&re(E)};Z=new i(pl(Z.body,ml,ve,()=>{ce&&ce(),L&&L()}),Q)}F=F||"text";let te=await y[V.findKey(y,F)||"text"](Z,b);if($&&!h&&!le){let Q;if(te!=null&&(typeof te.byteLength=="number"?Q=te.byteLength:typeof te.size=="number"?Q=te.size:typeof te=="string"&&(Q=typeof r=="function"?new r().encode(te).byteLength:te.length)),typeof Q=="number"&&Q>x)throw new he("maxContentLength size of "+x+" exceeded",he.ERR_BAD_RESPONSE,b,Y)}return!le&&L&&L(),await new Promise((Q,ie)=>{Of(Q,ie,{data:te,headers:at.from(Z.headers),status:Z.status,statusText:Z.statusText,config:b,request:Y})})}catch(K){if(L&&L(),k&&k.aborted&&k.reason instanceof he){const G=k.reason;throw G.config=b,Y&&(G.request=Y),K!==G&&(G.cause=K),G}throw K&&K.name==="TypeError"&&/Load failed|fetch/i.test(K.message)?Object.assign(new he("Network Error",he.ERR_NETWORK,b,Y,K&&K.response),{cause:K.cause||K}):he.from(K,K&&K.code,b,Y,K&&K.response)}}},L6=new Map,Df=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,l,f=L6;for(;a--;)c=s[a],l=f.get(c),l===void 0&&f.set(c,l=a?new Map:D6(t)),f=l;return l};Df();const Di={http:n6,xhr:P6,fetch:{get:Df}};V.forEach(Di,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const vl=e=>`- ${e}`,j6=e=>V.isFunction(e)||e===null||e===!1;function F6(e,t){e=V.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,!j6(r)&&(o=Di[(a=String(r)).toLowerCase()],o===void 0))throw new he(`Unknown adapter '${a}'`);if(o&&(V.isFunction(o)||(o=o.get(t))))break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
15
|
+
`+i.map(vl).join(`
|
|
16
|
+
`):" "+vl(i[0]):"as no adapter specified";throw new he("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const Lf={getAdapter:F6,adapters:Di};function na(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qr(null,e)}function yl(e){return na(e),e.headers=at.from(e.headers),e.data=ta.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Lf.getAdapter(e.adapter||Wr.adapter,e)(e).then(function(r){na(e),e.response=r;try{r.data=ta.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=at.from(r.headers),r},function(r){if(!Nf(r)&&(na(e),r&&r.response)){e.response=r.response;try{r.response.data=ta.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=at.from(r.response.headers)}return Promise.reject(r)})}const bs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{bs[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const bl={};bs.transitional=function(t,n,r){function o(s,i){return"[Axios v"+ki+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new he(o(i," has been removed"+(n?" in "+n:"")),he.ERR_DEPRECATED);return n&&!bl[i]&&(bl[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}};bs.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function B6(e,t,n){if(typeof e!="object")throw new he("options must be an object",he.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 he("option "+s+" must be "+c,he.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new he("Unknown option "+s,he.ERR_BAD_OPTION)}}const Ro={assertOptions:B6,validators:bs},wt=Ro.validators;let bn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ul,response:new ul}}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(`
|
|
17
|
+
`);return i===-1?"":o.stack.slice(i+1)})();try{if(!r.stack)r.stack=s;else if(s){const i=s.indexOf(`
|
|
18
|
+
`),a=i===-1?-1:s.indexOf(`
|
|
19
|
+
`,i+1),c=a===-1?"":s.slice(a+1);String(r.stack).endsWith(c)||(r.stack+=`
|
|
20
|
+
`+s)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Rn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Ro.assertOptions(r,{silentJSONParsing:wt.transitional(wt.boolean),forcedJSONParsing:wt.transitional(wt.boolean),clarifyTimeoutError:wt.transitional(wt.boolean),legacyInterceptorReqResOrdering:wt.transitional(wt.boolean)},!1),o!=null&&(V.isFunction(o)?n.paramsSerializer={serialize:o}:Ro.assertOptions(o,{encode:wt.function,serialize:wt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ro.assertOptions(n,{baseUrl:wt.spelling("baseURL"),withXsrfToken:wt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&V.merge(s.common,s[n.method]);s&&V.forEach(["delete","get","head","post","put","patch","query","common"],y=>{delete s[y]}),n.headers=at.concat(i,s);const a=[];let c=!0;this.interceptors.request.forEach(function(m){if(typeof m.runWhen=="function"&&m.runWhen(n)===!1)return;c=c&&m.synchronous;const v=n.transitional||Oi;v&&v.legacyInterceptorReqResOrdering?a.unshift(m.fulfilled,m.rejected):a.push(m.fulfilled,m.rejected)});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let f,d=0,p;if(!c){const y=[yl.bind(this),void 0];for(y.unshift(...a),y.push(...l),p=y.length,f=Promise.resolve(n);d<p;)f=f.then(y[d++],y[d++]);return f}p=a.length;let h=n;for(;d<p;){const y=a[d++],m=a[d++];try{h=y(h)}catch(v){m.call(this,v);break}}try{f=yl.call(this,h)}catch(y){return Promise.reject(y)}for(d=0,p=l.length;d<p;)f=f.then(l[d++],l[d++]);return f}getUri(t){t=Rn(this.defaults,t);const n=If(t.baseURL,t.url,t.allowAbsoluteUrls);return Pf(n,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){bn.prototype[t]=function(n,r){return this.request(Rn(r||{},{method:t,url:n,data:(r||{}).data}))}});V.forEach(["post","put","patch","query"],function(t){function n(r){return function(s,i,a){return this.request(Rn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}bn.prototype[t]=n(),t!=="query"&&(bn.prototype[t+"Form"]=n(!0))});let $6=class jf{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 qr(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 jf(function(o){t=o}),cancel:t}}};function H6(e){return function(n){return e.apply(null,n)}}function z6(e){return V.isObject(e)&&e.isAxiosError===!0}const Ia={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(Ia).forEach(([e,t])=>{Ia[t]=e});function Ff(e){const t=new bn(e),n=yf(bn.prototype.request,t);return V.extend(n,bn.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ff(Rn(e,o))},n}const Se=Ff(Wr);Se.Axios=bn;Se.CanceledError=qr;Se.CancelToken=$6;Se.isCancel=Nf;Se.VERSION=ki;Se.toFormData=ys;Se.AxiosError=he;Se.Cancel=Se.CanceledError;Se.all=function(t){return Promise.all(t)};Se.spread=H6;Se.isAxiosError=z6;Se.mergeConfig=Rn;Se.AxiosHeaders=at;Se.formToJSON=e=>Mf(V.isHTMLForm(e)?new FormData(e):e);Se.getAdapter=Lf.getAdapter;Se.HttpStatusCode=Ia;Se.default=Se;const{Axios:uC,AxiosError:dC,CanceledError:fC,isCancel:hC,CancelToken:pC,VERSION:mC,all:gC,Cancel:vC,isAxiosError:yC,spread:bC,toFormData:wC,AxiosHeaders:xC,HttpStatusCode:EC,formToJSON:_C,getAdapter:SC,mergeConfig:CC,create:RC}=Se,Li="/login",U6="/api/auth/";let wl=!1;const V6=e=>{const t=`${e.pathname||"/"}${e.search}${e.hash}`;return`${Li}?next=${encodeURIComponent(t)}`},Z6=e=>{if(!Se.isAxiosError(e)||e.response?.status!==401)return!1;const t=e.config?.url??"";return!t.startsWith(U6)&&t!==Li},Bf=(e=window.location)=>{wl||e.pathname===Li||(wl=!0,e.assign(V6(e)))},W6="X-Ocean-Brain-Session-Generation";let xl=!1,po;const q6=e=>!!(e.authRequired&&!e.authenticated),K6=e=>{const t=e.headers.get(W6);return t?po?po===t?!1:(po=t,!0):(po=t,!1):!1},G6=(e=window.location)=>{xl||(xl=!0,e.reload())},Vo=async(e=fetch)=>{const t=await e("/api/auth/session").catch(()=>{});if(!t?.ok)return"unavailable";const n=K6(t),r=await t.json();return q6(r)?(Bf(),"expired"):n?(G6(),"reloading"):"active"},Y6=e=>!e||e.length===0?null:[...new Set(e)].sort(),Q6=e=>!e||e.length===0?[]:[...new Set(e.map(t=>t.trim()).filter(Boolean))].sort(),X6=e=>!e||e.length===0?null:[...new Set(e)].sort(),Me={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:Y6(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:Q6(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"],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:X6(e.fields)}]},calendar:{all:()=>["calendar"],notesInDateRange:(e,t)=>["calendar","notes-in-date-range",{year:e,month:t}]},views:{all:()=>["views"],workspace:()=>["views","workspace"],section:e=>["views","section",{id:e}],sectionNotesAll:()=>["views","section-notes"],sectionNotes:(e,t={})=>["views","section-notes",{id:e,limit:t.limit??25,offset:t.offset??0}]},ui:{heroBanner:()=>["ui","hero-banner"]}},ka=[{queryKey:Me.notes.listAll(),exact:!1},{queryKey:Me.notes.tagListAll(),exact:!1},{queryKey:Me.notes.tagNameListAll(),exact:!1},{queryKey:Me.notes.pinned(),exact:!0},{queryKey:Me.notes.backReferencesAll(),exact:!1},{queryKey:Me.notes.graph(),exact:!0},{queryKey:Me.views.sectionNotesAll(),exact:!1},{queryKey:Me.tags.all(),exact:!1}],$f={queryKey:Me.notes.propertyKeysAll(),exact:!1},J6=[...ka,$f,{queryKey:Me.notes.trashAll(),exact:!1},{queryKey:Me.reminders.all(),exact:!1},{queryKey:Me.images.all(),exact:!1},{queryKey:Me.calendar.all(),exact:!1}],ra=async(e,t)=>{await Promise.all(t.map(n=>e.invalidateQueries(n)))},e8=async(e,t)=>{switch(t.type){case"mcp.note.created":case"web.note.updated":await ra(e,ka);return;case"mcp.note.updated":await ra(e,[...ka,$f]);return;case"mcp.note.deleted":await ra(e,J6);return}},t8=["mcp.note.created","mcp.note.updated","mcp.note.deleted"],n8=["web.note.updated"],r8=[...t8,...n8],Da=new Set,o8="ocean-brain:web-note-events",Hf="ocean-brain:web-note-event",gr=new Set;let El=!1,La=null;const zf=e=>typeof e=="object"&&e!==null,s8=e=>!zf(e)||e.source!=="mcp"||typeof e.noteId!="string"||typeof e.type!="string"?!1:e.type==="mcp.note.deleted"||(e.type==="mcp.note.created"||e.type==="mcp.note.updated")&&typeof e.updatedAt=="string",a8=e=>!(!zf(e)||e.source!=="web"||e.type!=="web.note.updated"||typeof e.noteId!="string"||typeof e.updatedAt!="string"||e.editSessionId!==void 0&&typeof e.editSessionId!="string"||e.eventId!==void 0&&typeof e.eventId!="string"),i8=e=>s8(e)||a8(e),Uf=e=>i8(e)?e:null,Vf=e=>{try{const t=JSON.parse(e);return Uf(t)}catch{return null}},c8=e=>e.source!=="web"||!e.eventId?!1:gr.has(e.eventId)?!0:(gr.add(e.eventId),gr.size>200&&(gr.clear(),gr.add(e.eventId)),!1),ji=e=>{c8(e)||Da.forEach(t=>{t(e)})},l8=e=>{const t=Uf(e);!t||t.source!=="web"||ji(t)},Zf=()=>{El||typeof window>"u"||(El=!0,typeof BroadcastChannel<"u"&&(La=new BroadcastChannel(o8),La.onmessage=e=>{l8(e.data)}),window.addEventListener("storage",e=>{if(e.key!==Hf||!e.newValue)return;const t=Vf(e.newValue);t?.source==="web"&&ji(t)}))},AC=({noteId:e,updatedAt:t,editSessionId:n})=>{if(typeof window>"u")return;Zf();const r={type:"web.note.updated",source:"web",noteId:e,updatedAt:t,...n?{editSessionId:n}:{},eventId:`${Date.now()}:${Math.random().toString(36).slice(2)}`};La?.postMessage(r);try{window.localStorage.setItem(Hf,JSON.stringify(r))}catch{}},u8=e=>(Zf(),Da.add(e),()=>{Da.delete(e)}),d8=e=>t=>{if(!(t instanceof MessageEvent)||typeof t.data!="string")return;const n=Vf(t.data);!n||n.type!==e||ji(n)},f8=()=>{const e=er();return u.useEffect(()=>u8(t=>{e8(e,t)}),[e]),u.useEffect(()=>{if(typeof EventSource>"u")return;const t=new EventSource("/api/events");let n=!1;const r=()=>{n=!0,Vo()},o=()=>{n&&(n=!1,Vo())},s=r8.map(i=>{const a=d8(i);return t.addEventListener(i,a),()=>{t.removeEventListener(i,a)}});return t.addEventListener("error",r),t.addEventListener("open",o),()=>{s.forEach(i=>{i()}),t.removeEventListener("error",r),t.removeEventListener("open",o),t.close()}},[]),null},h8=({children:e})=>g.jsx(qg,{client:tb,children:g.jsx(Ey,{children:g.jsxs(eb,{children:[g.jsx(f8,{}),e]})})}),p8={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},_l={sm:10,md:12,lg:14},Wf=u.forwardRef(({className:e,size:t="md",checked:n,disabled:r,...o},s)=>g.jsxs("label",{className:xe("relative inline-flex items-center justify-center cursor-pointer",r&&"cursor-not-allowed opacity-50",e),children:[g.jsx("input",{ref:s,type:"checkbox",checked:n,disabled:r,className:"sr-only peer",...o}),g.jsx("span",{className:xe(p8[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&&g.jsx(ry,{width:_l[t],height:_l[t],className:"text-fg-on-filled",weight:"bold"})})]}));Wf.displayName="Checkbox";var m8=wd,g8=xd,qf=Ed,Kf=_d,v8=Si,Gf=Sd,Yf=Cd;const y8=m8,b8=g8,w8=v8,Qf=u.createContext("default"),Kr=()=>u.useContext(Qf),Xf=u.forwardRef(({className:e,...t},n)=>g.jsx(qf,{ref:n,className:xe("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}));Xf.displayName=qf.displayName;const Jf=u.forwardRef(({className:e,children:t,variant:n="default",...r},o)=>g.jsxs(b8,{children:[g.jsx(Xf,{}),g.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-center justify-center p-4",children:g.jsx(Kf,{ref:o,"data-dialog-variant":n,className:Ri({variant:n,className:e}),...r,children:g.jsx(Qf.Provider,{value:n,children:t})})})]}));Jf.displayName=Kf.displayName;const eh=({title:e,onClose:t,className:n})=>{const r=Kr();return g.jsxs("div",{className:vy({variant:r,className:n}),children:[g.jsx(rh,{children:e}),t&&g.jsx(w8,{asChild:!0,children:g.jsx("button",{type:"button","aria-label":"Close dialog",className:yy({variant:r}),onClick:t,children:g.jsx(Ci,{className:r==="compact"||r==="form"||r==="confirm"?"h-[18px] w-[18px]":"h-5 w-5"})})})]})};eh.displayName="DialogHeader";const th=u.forwardRef(({className:e,...t},n)=>{const r=Kr();return g.jsx("div",{ref:n,className:Ai({variant:r,className:e}),...t})});th.displayName="DialogBody";const nh=u.forwardRef(({className:e,...t},n)=>{const r=Kr();return g.jsx("div",{ref:n,className:Ti({variant:r,className:e}),...t})});nh.displayName="DialogFooter";const rh=u.forwardRef(({className:e,...t},n)=>{const r=Kr();return g.jsx(Gf,{ref:n,className:xe(Pi({variant:r}),e),...t})});rh.displayName=Gf.displayName;const oh=u.forwardRef(({className:e,...t},n)=>{const r=Kr();return g.jsx(Yf,{ref:n,className:xe(Mi({variant:r}),e),...t})});oh.displayName=Yf.displayName;const Vt=({isOpen:e,onClose:t,children:n,className:r,variant:o="default"})=>g.jsx(y8,{open:e,onOpenChange:s=>!s&&t(),children:g.jsx(Jf,{variant:o,className:r,children:n})});Vt.Header=eh;Vt.Body=th;Vt.Footer=nh;Vt.Description=oh;function Fi(e){const t=e+"CollectionProvider",[n,r]=Bt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:v,children:b}=m,w=X.useRef(null),_=X.useRef(new Map).current;return g.jsx(o,{scope:v,itemMap:_,collectionRef:w,children:b})};i.displayName=t;const a=e+"CollectionSlot",c=Gn(a),l=X.forwardRef((m,v)=>{const{scope:b,children:w}=m,_=s(a,b),S=Ee(v,_.collectionRef);return g.jsx(c,{ref:S,children:w})});l.displayName=a;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=Gn(f),h=X.forwardRef((m,v)=>{const{scope:b,children:w,..._}=m,S=X.useRef(null),C=Ee(v,S),O=s(f,b);return X.useEffect(()=>(O.itemMap.set(S,{ref:S,..._}),()=>{O.itemMap.delete(S)})),g.jsx(p,{[d]:"",ref:C,children:w})});h.displayName=f;function y(m){const v=s(e+"CollectionConsumer",m);return X.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const _=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((O,T)=>_.indexOf(O.ref.current)-_.indexOf(T.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:l,ItemSlot:h},y,r]}var x8=u.createContext(void 0);function ws(e){const t=u.useContext(x8);return e||t||"ltr"}var E8="Arrow",sh=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return g.jsx(be.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});sh.displayName=E8;var _8=sh;function S8(e){const[t,n]=u.useState(void 0);return Xe(()=>{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,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Bi="Popper",[ah,nr]=Bt(Bi),[C8,ih]=ah(Bi),ch=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return g.jsx(C8,{scope:t,anchor:r,onAnchorChange:o,children:n})};ch.displayName=Bi;var lh="PopperAnchor",uh=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=ih(lh,n),i=u.useRef(null),a=Ee(t,i),c=u.useRef(null);return u.useEffect(()=>{const l=c.current;c.current=r?.current||i.current,l!==c.current&&s.onAnchorChange(c.current)}),r?null:g.jsx(be.div,{...o,ref:a})});uh.displayName=lh;var $i="PopperContent",[R8,A8]=ah($i),dh=u.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:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...m}=e,v=ih($i,n),[b,w]=u.useState(null),_=Ee(t,te=>w(te)),[S,C]=u.useState(null),O=S8(S),T=O?.width??0,P=O?.height??0,N=r+(s!=="center"?"-"+s:""),F=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(l)?l:[l],R=z.length>0,H={padding:F,boundary:z.filter(P8),altBoundary:R},{refs:x,floatingStyles:I,placement:$,isPositioned:D,middlewareData:q}=f1({strategy:"fixed",placement:N,whileElementsMounted:(...te)=>b1(...te,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[h1({mainAxis:o+P,alignmentAxis:i}),c&&p1({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?w1():void 0,...H}),c&&m1({...H}),g1({...H,apply:({elements:te,rects:Q,availableWidth:ie,availableHeight:re})=>{const{width:ce,height:fe}=Q.reference,ve=te.floating.style;ve.setProperty("--radix-popper-available-width",`${ie}px`),ve.setProperty("--radix-popper-available-height",`${re}px`),ve.setProperty("--radix-popper-anchor-width",`${ce}px`),ve.setProperty("--radix-popper-anchor-height",`${fe}px`)}}),S&&v1({element:S,padding:a}),M8({arrowWidth:T,arrowHeight:P}),p&&y1({strategy:"referenceHidden",...H})]}),[k,Y]=ph($),L=jt(y);Xe(()=>{D&&L?.()},[D,L]);const j=q.arrow?.x,K=q.arrow?.y,G=q.arrow?.centerOffset!==0,[Z,le]=u.useState();return Xe(()=>{b&&le(window.getComputedStyle(b).zIndex)},[b]),g.jsx("div",{ref:x.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:D?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[q.transformOrigin?.x,q.transformOrigin?.y].join(" "),...q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(R8,{scope:n,placedSide:k,onArrowChange:C,arrowX:j,arrowY:K,shouldHideArrow:G,children:g.jsx(be.div,{"data-side":k,"data-align":Y,...m,ref:_,style:{...m.style,animation:D?void 0:"none"}})})})});dh.displayName=$i;var fh="PopperArrow",T8={top:"bottom",right:"left",bottom:"top",left:"right"},hh=u.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=A8(fh,r),i=T8[s.placedSide];return g.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:g.jsx(_8,{...o,ref:n,style:{...o.style,display:"block"}})})});hh.displayName=fh;function P8(e){return e!==null}var M8=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,[l,f]=ph(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+c/2;let y="",m="";return l==="bottom"?(y=i?d:`${p}px`,m=`${-c}px`):l==="top"?(y=i?d:`${p}px`,m=`${r.floating.height+c}px`):l==="right"?(y=`${-c}px`,m=i?d:`${h}px`):l==="left"&&(y=`${r.floating.width+c}px`,m=i?d:`${h}px`),{data:{x:y,y:m}}}});function ph(e){const[t,n="center"]=e.split("-");return[t,n]}var Hi=ch,zi=uh,Ui=dh,Vi=hh,oa="rovingFocusGroup.onEntryFocus",N8={bubbles:!1,cancelable:!0},Gr="RovingFocusGroup",[ja,mh,O8]=Fi(Gr),[I8,xs]=Bt(Gr,[O8]),[k8,D8]=I8(Gr),gh=u.forwardRef((e,t)=>g.jsx(ja.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(ja.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(L8,{...e,ref:t})})}));gh.displayName=Gr;var L8=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:f=!1,...d}=e,p=u.useRef(null),h=Ee(t,p),y=ws(s),[m,v]=qt({prop:i,defaultProp:a??null,onChange:c,caller:Gr}),[b,w]=u.useState(!1),_=jt(l),S=mh(n),C=u.useRef(!1),[O,T]=u.useState(0);return u.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(oa,_),()=>P.removeEventListener(oa,_)},[_]),g.jsx(k8,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:m,onItemFocus:u.useCallback(P=>v(P),[v]),onItemShiftTab:u.useCallback(()=>w(!0),[]),onFocusableItemAdd:u.useCallback(()=>T(P=>P+1),[]),onFocusableItemRemove:u.useCallback(()=>T(P=>P-1),[]),children:g.jsx(be.div,{tabIndex:b||O===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:de(e.onMouseDown,()=>{C.current=!0}),onFocus:de(e.onFocus,P=>{const N=!C.current;if(P.target===P.currentTarget&&N&&!b){const F=new CustomEvent(oa,N8);if(P.currentTarget.dispatchEvent(F),!F.defaultPrevented){const z=S().filter($=>$.focusable),R=z.find($=>$.active),H=z.find($=>$.id===m),I=[R,H,...z].filter(Boolean).map($=>$.ref.current);bh(I,f)}}C.current=!1}),onBlur:de(e.onBlur,()=>w(!1))})})}),vh="RovingFocusGroupItem",yh=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,c=Dt(),l=s||c,f=D8(vh,n),d=f.currentTabStopId===l,p=mh(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:m}=f;return u.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),g.jsx(ja.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:g.jsx(be.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...a,ref:t,onMouseDown:de(e.onMouseDown,v=>{r?f.onItemFocus(l):v.preventDefault()}),onFocus:de(e.onFocus,()=>f.onItemFocus(l)),onKeyDown:de(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=B8(v,f.orientation,f.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let _=p().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")_.reverse();else if(b==="prev"||b==="next"){b==="prev"&&_.reverse();const S=_.indexOf(v.currentTarget);_=f.loop?$8(_,S+1):_.slice(S+1)}setTimeout(()=>bh(_))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});yh.displayName=vh;var j8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function F8(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function B8(e,t,n){const r=F8(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return j8[r]}function bh(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function $8(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wh=gh,xh=yh,Fa=["Enter"," "],H8=["ArrowDown","PageUp","Home"],Eh=["ArrowUp","PageDown","End"],z8=[...H8,...Eh],U8={ltr:[...Fa,"ArrowRight"],rtl:[...Fa,"ArrowLeft"]},V8={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Yr="Menu",[Nr,Z8,W8]=Fi(Yr),[Mn,_h]=Bt(Yr,[W8,nr,xs]),Es=nr(),Sh=xs(),[q8,Nn]=Mn(Yr),[K8,Qr]=Mn(Yr),Ch=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Es(t),[c,l]=u.useState(null),f=u.useRef(!1),d=jt(s),p=ws(o);return u.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),g.jsx(Hi,{...a,children:g.jsx(q8,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:g.jsx(K8,{scope:t,onClose:u.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:i,children:r})})})};Ch.displayName=Yr;var G8="MenuAnchor",Zi=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Es(n);return g.jsx(zi,{...o,...r,ref:t})});Zi.displayName=G8;var Wi="MenuPortal",[Y8,Rh]=Mn(Wi,{forceMount:void 0}),Ah=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Nn(Wi,t);return g.jsx(Y8,{scope:t,forceMount:n,children:g.jsx($t,{present:n||s.open,children:g.jsx(zr,{asChild:!0,container:o,children:r})})})};Ah.displayName=Wi;var St="MenuContent",[Q8,qi]=Mn(St),Th=u.forwardRef((e,t)=>{const n=Rh(St,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Nn(St,e.__scopeMenu),i=Qr(St,e.__scopeMenu);return g.jsx(Nr.Provider,{scope:e.__scopeMenu,children:g.jsx($t,{present:r||s.open,children:g.jsx(Nr.Slot,{scope:e.__scopeMenu,children:i.modal?g.jsx(X8,{...o,ref:t}):g.jsx(J8,{...o,ref:t})})})})}),X8=u.forwardRef((e,t)=>{const n=Nn(St,e.__scopeMenu),r=u.useRef(null),o=Ee(t,r);return u.useEffect(()=>{const s=r.current;if(s)return wi(s)},[]),g.jsx(Ki,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:de(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),J8=u.forwardRef((e,t)=>{const n=Nn(St,e.__scopeMenu);return g.jsx(Ki,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),e4=Gn("MenuContent.ScrollLock"),Ki=u.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...m}=e,v=Nn(St,n),b=Qr(St,n),w=Es(n),_=Sh(n),S=Z8(n),[C,O]=u.useState(null),T=u.useRef(null),P=Ee(t,T,v.onContentChange),N=u.useRef(0),F=u.useRef(""),z=u.useRef(0),R=u.useRef(null),H=u.useRef("right"),x=u.useRef(0),I=y?ri:u.Fragment,$=y?{as:e4,allowPinchZoom:!0}:void 0,D=k=>{const Y=F.current+k,L=S().filter(te=>!te.disabled),j=document.activeElement,K=L.find(te=>te.ref.current===j)?.textValue,G=L.map(te=>te.textValue),Z=f4(G,Y,K),le=L.find(te=>te.textValue===Z)?.ref.current;(function te(Q){F.current=Q,window.clearTimeout(N.current),Q!==""&&(N.current=window.setTimeout(()=>te(""),1e3))})(Y),le&&setTimeout(()=>le.focus())};u.useEffect(()=>()=>window.clearTimeout(N.current),[]),bi();const q=u.useCallback(k=>H.current===R.current?.side&&p4(k,R.current?.area),[]);return g.jsx(Q8,{scope:n,searchRef:F,onItemEnter:u.useCallback(k=>{q(k)&&k.preventDefault()},[q]),onItemLeave:u.useCallback(k=>{q(k)||(T.current?.focus(),O(null))},[q]),onTriggerLeave:u.useCallback(k=>{q(k)&&k.preventDefault()},[q]),pointerGraceTimerRef:z,onPointerGraceIntentChange:u.useCallback(k=>{R.current=k},[]),children:g.jsx(I,{...$,children:g.jsx(fs,{asChild:!0,trapped:o,onMountAutoFocus:de(s,k=>{k.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:g.jsx(Hr,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h,children:g.jsx(wh,{asChild:!0,..._,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:O,onEntryFocus:de(c,k=>{b.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(Ui,{role:"menu","aria-orientation":"vertical","data-state":Vh(v.open),"data-radix-menu-content":"",dir:b.dir,...w,...m,ref:P,style:{outline:"none",...m.style},onKeyDown:de(m.onKeyDown,k=>{const L=k.target.closest("[data-radix-menu-content]")===k.currentTarget,j=k.ctrlKey||k.altKey||k.metaKey,K=k.key.length===1;L&&(k.key==="Tab"&&k.preventDefault(),!j&&K&&D(k.key));const G=T.current;if(k.target!==G||!z8.includes(k.key))return;k.preventDefault();const le=S().filter(te=>!te.disabled).map(te=>te.ref.current);Eh.includes(k.key)&&le.reverse(),u4(le)}),onBlur:de(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(N.current),F.current="")}),onPointerMove:de(e.onPointerMove,Or(k=>{const Y=k.target,L=x.current!==k.clientX;if(k.currentTarget.contains(Y)&&L){const j=k.clientX>x.current?"right":"left";H.current=j,x.current=k.clientX}}))})})})})})})});Th.displayName=St;var t4="MenuGroup",Gi=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(be.div,{role:"group",...r,ref:t})});Gi.displayName=t4;var n4="MenuLabel",Ph=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(be.div,{...r,ref:t})});Ph.displayName=n4;var Zo="MenuItem",Sl="menu.itemSelect",_s=u.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=u.useRef(null),i=Qr(Zo,e.__scopeMenu),a=qi(Zo,e.__scopeMenu),c=Ee(t,s),l=u.useRef(!1),f=()=>{const d=s.current;if(!n&&d){const p=new CustomEvent(Sl,{bubbles:!0,cancelable:!0});d.addEventListener(Sl,h=>r?.(h),{once:!0}),Xu(d,p),p.defaultPrevented?l.current=!1:i.onClose()}};return g.jsx(Mh,{...o,ref:c,disabled:n,onClick:de(e.onClick,f),onPointerDown:d=>{e.onPointerDown?.(d),l.current=!0},onPointerUp:de(e.onPointerUp,d=>{l.current||d.currentTarget?.click()}),onKeyDown:de(e.onKeyDown,d=>{const p=a.searchRef.current!=="";n||p&&d.key===" "||Fa.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});_s.displayName=Zo;var Mh=u.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=qi(Zo,n),a=Sh(n),c=u.useRef(null),l=Ee(t,c),[f,d]=u.useState(!1),[p,h]=u.useState("");return u.useEffect(()=>{const y=c.current;y&&h((y.textContent??"").trim())},[s.children]),g.jsx(Nr.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:g.jsx(xh,{asChild:!0,...a,focusable:!r,children:g.jsx(be.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:l,onPointerMove:de(e.onPointerMove,Or(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:de(e.onPointerLeave,Or(y=>i.onItemLeave(y))),onFocus:de(e.onFocus,()=>d(!0)),onBlur:de(e.onBlur,()=>d(!1))})})})}),r4="MenuCheckboxItem",Nh=u.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return g.jsx(Lh,{scope:e.__scopeMenu,checked:n,children:g.jsx(_s,{role:"menuitemcheckbox","aria-checked":Wo(n)?"mixed":n,...o,ref:t,"data-state":Qi(n),onSelect:de(o.onSelect,()=>r?.(Wo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Nh.displayName=r4;var Oh="MenuRadioGroup",[o4,s4]=Mn(Oh,{value:void 0,onValueChange:()=>{}}),Ih=u.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=jt(r);return g.jsx(o4,{scope:e.__scopeMenu,value:n,onValueChange:s,children:g.jsx(Gi,{...o,ref:t})})});Ih.displayName=Oh;var kh="MenuRadioItem",Dh=u.forwardRef((e,t)=>{const{value:n,...r}=e,o=s4(kh,e.__scopeMenu),s=n===o.value;return g.jsx(Lh,{scope:e.__scopeMenu,checked:s,children:g.jsx(_s,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Qi(s),onSelect:de(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Dh.displayName=kh;var Yi="MenuItemIndicator",[Lh,a4]=Mn(Yi,{checked:!1}),jh=u.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=a4(Yi,n);return g.jsx($t,{present:r||Wo(s.checked)||s.checked===!0,children:g.jsx(be.span,{...o,ref:t,"data-state":Qi(s.checked)})})});jh.displayName=Yi;var i4="MenuSeparator",Fh=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(be.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Fh.displayName=i4;var c4="MenuArrow",Bh=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Es(n);return g.jsx(Vi,{...o,...r,ref:t})});Bh.displayName=c4;var l4="MenuSub",[TC,$h]=Mn(l4),br="MenuSubTrigger",Hh=u.forwardRef((e,t)=>{const n=Nn(br,e.__scopeMenu),r=Qr(br,e.__scopeMenu),o=$h(br,e.__scopeMenu),s=qi(br,e.__scopeMenu),i=u.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=s,l={__scopeMenu:e.__scopeMenu},f=u.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return u.useEffect(()=>f,[f]),u.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),c(null)}},[a,c]),g.jsx(Zi,{asChild:!0,...l,children:g.jsx(Mh,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Vh(n.open),...e,ref:$r(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:de(e.onPointerMove,Or(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:de(e.onPointerLeave,Or(d=>{f();const p=n.content?.getBoundingClientRect();if(p){const h=n.content?.dataset.side,y=h==="right",m=y?-5:5,v=p[y?"left":"right"],b=p[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x:v,y:p.top},{x:b,y:p.top},{x:b,y:p.bottom},{x:v,y:p.bottom}],side:h}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:de(e.onKeyDown,d=>{const p=s.searchRef.current!=="";e.disabled||p&&d.key===" "||U8[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});Hh.displayName=br;var zh="MenuSubContent",Uh=u.forwardRef((e,t)=>{const n=Rh(St,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Nn(St,e.__scopeMenu),i=Qr(St,e.__scopeMenu),a=$h(zh,e.__scopeMenu),c=u.useRef(null),l=Ee(t,c);return g.jsx(Nr.Provider,{scope:e.__scopeMenu,children:g.jsx($t,{present:r||s.open,children:g.jsx(Nr.Slot,{scope:e.__scopeMenu,children:g.jsx(Ki,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:l,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:de(e.onFocusOutside,f=>{f.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:de(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:de(e.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),p=V8[i.dir].includes(f.key);d&&p&&(s.onOpenChange(!1),a.trigger?.focus(),f.preventDefault())})})})})})});Uh.displayName=zh;function Vh(e){return e?"open":"closed"}function Wo(e){return e==="indeterminate"}function Qi(e){return Wo(e)?"indeterminate":e?"checked":"unchecked"}function u4(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function d4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function f4(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=d4(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function h4(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],l=a.x,f=a.y,d=c.x,p=c.y;f>r!=p>r&&n<(d-l)*(r-f)/(p-f)+l&&(o=!o)}return o}function p4(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return h4(n,t)}function Or(e){return t=>t.pointerType==="mouse"?e(t):void 0}var m4=Ch,g4=Zi,v4=Ah,y4=Th,b4=Gi,w4=Ph,x4=_s,E4=Nh,_4=Ih,S4=Dh,C4=jh,R4=Fh,A4=Bh,T4=Hh,P4=Uh,Ss="DropdownMenu",[M4]=Bt(Ss,[_h]),ct=_h(),[N4,Zh]=M4(Ss),Wh=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=ct(t),l=u.useRef(null),[f,d]=qt({prop:o,defaultProp:s??!1,onChange:i,caller:Ss});return g.jsx(N4,{scope:t,triggerId:Dt(),triggerRef:l,contentId:Dt(),open:f,onOpenChange:d,onOpenToggle:u.useCallback(()=>d(p=>!p),[d]),modal:a,children:g.jsx(m4,{...c,open:f,onOpenChange:d,dir:r,modal:a,children:n})})};Wh.displayName=Ss;var qh="DropdownMenuTrigger",Kh=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Zh(qh,n),i=ct(n);return g.jsx(g4,{asChild:!0,...i,children:g.jsx(be.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:$r(t,s.triggerRef),onPointerDown:de(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:de(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Kh.displayName=qh;var O4="DropdownMenuPortal",Gh=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ct(t);return g.jsx(v4,{...r,...n})};Gh.displayName=O4;var Yh="DropdownMenuContent",Qh=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Zh(Yh,n),s=ct(n),i=u.useRef(!1);return g.jsx(y4,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:de(e.onCloseAutoFocus,a=>{i.current||o.triggerRef.current?.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:de(e.onInteractOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,f=c.button===2||l;(!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)"}})});Qh.displayName=Yh;var I4="DropdownMenuGroup",k4=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ct(n);return g.jsx(b4,{...o,...r,ref:t})});k4.displayName=I4;var D4="DropdownMenuLabel",Xh=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ct(n);return g.jsx(w4,{...o,...r,ref:t})});Xh.displayName=D4;var L4="DropdownMenuItem",Jh=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ct(n);return g.jsx(x4,{...o,...r,ref:t})});Jh.displayName=L4;var j4="DropdownMenuCheckboxItem",e0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ct(n);return g.jsx(E4,{...o,...r,ref:t})});e0.displayName=j4;var F4="DropdownMenuRadioGroup",B4=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ct(n);return g.jsx(_4,{...o,...r,ref:t})});B4.displayName=F4;var $4="DropdownMenuRadioItem",t0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ct(n);return g.jsx(S4,{...o,...r,ref:t})});t0.displayName=$4;var H4="DropdownMenuItemIndicator",n0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ct(n);return g.jsx(C4,{...o,...r,ref:t})});n0.displayName=H4;var z4="DropdownMenuSeparator",r0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ct(n);return g.jsx(R4,{...o,...r,ref:t})});r0.displayName=z4;var U4="DropdownMenuArrow",V4=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ct(n);return g.jsx(A4,{...o,...r,ref:t})});V4.displayName=U4;var Z4="DropdownMenuSubTrigger",o0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ct(n);return g.jsx(T4,{...o,...r,ref:t})});o0.displayName=Z4;var W4="DropdownMenuSubContent",s0=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ct(n);return g.jsx(P4,{...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)"}})});s0.displayName=W4;var q4=Wh,K4=Kh,G4=Gh,Y4=Qh,Q4=Xh,X4=Jh,J4=e0,ew=t0,tw=n0,nw=r0,rw=o0,ow=s0,sw=q4,aw=K4,iw=G4,a0=Y4,i0=X4,c0=J4,l0=ew,u0=tw,d0=Q4,f0=nw,h0=rw,p0=ow;const cw=sw,lw=aw,uw=u.forwardRef(({className:e,inset:t,children:n,...r},o)=>g.jsx(h0,{ref:o,className:xe("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}));uw.displayName=h0.displayName;const dw=u.forwardRef(({className:e,...t},n)=>g.jsx(p0,{ref:n,className:xe("z-50","min-w-[8rem]","overflow-hidden","surface-floating","p-1",e),...t}));dw.displayName=p0.displayName;const m0=u.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(iw,{children:g.jsx(a0,{ref:r,sideOffset:t,className:xe("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})}));m0.displayName=a0.displayName;const g0=u.forwardRef(({className:e,inset:t,...n},r)=>g.jsx(i0,{ref:r,className:xe("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}));g0.displayName=i0.displayName;const fw=u.forwardRef(({className:e,children:t,checked:n,...r},o)=>g.jsxs(c0,{ref:o,className:xe("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:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(u0,{children:"✓"})}),t]}));fw.displayName=c0.displayName;const hw=u.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(l0,{ref:r,className:xe("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:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(u0,{children:"●"})}),t]}));hw.displayName=l0.displayName;const pw=u.forwardRef(({className:e,inset:t,...n},r)=>g.jsx(d0,{ref:r,className:xe("px-2","py-1.5","text-sm","font-semibold","text-fg-secondary",t&&"pl-8",e),...n}));pw.displayName=d0.displayName;const v0=u.forwardRef(({className:e,...t},n)=>g.jsx(f0,{ref:n,className:xe("-mx-1","my-1","h-px","bg-divider",e),...t}));v0.displayName=f0.displayName;const mw=({button:e,items:t})=>g.jsxs(cw,{children:[g.jsx(lw,{asChild:!0,children:e}),g.jsx(m0,{align:"end",children:t.map((n,r)=>n.type==="separator"?g.jsx(v0,{},n.key??`separator-${r}`):g.jsx(g0,{onClick:n.onClick,children:n.name},n.name))})]}),y0=u.forwardRef(({title:e,description:t,className:n="",...r},o)=>g.jsxs("div",{ref:o,className:xe("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&&g.jsx(Re,{as:"h3",variant:"heading",weight:"bold",tone:"muted",className:"mb-2",children:e}),t&&g.jsx(Re,{as:"p",variant:"meta",weight:"medium",tone:"tertiary",className:"max-w-[400px]",children:t})]}));y0.displayName="Empty";const gw=Ke(["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"}}),vw=u.forwardRef(({className:e,variant:t,size:n,type:r="text",...o},s)=>g.jsx("input",{ref:s,type:r,className:gw({variant:t,size:n,className:e}),...o}));vw.displayName="Input";const yw=Ke(["font-bold","text-fg-muted","whitespace-nowrap"],{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"sm"}}),b0=u.forwardRef(({className:e,size:t,...n},r)=>g.jsx("label",{ref:r,className:yw({size:t,className:e}),...n}));b0.displayName="Label";const bw=Ke(["focus-ring-soft","inline-flex","shrink-0","select-none","items-center","justify-center","bg-transparent","text-fg-default/70","outline-none","transition-colors","hover:bg-hover-subtle","hover:text-fg-default"],{variants:{size:{sm:"h-7 w-7 rounded-[8px]",md:"h-8 w-8 rounded-[10px]",lg:"h-9 w-9 rounded-[12px]"}},defaultVariants:{size:"md"}}),ww={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"};function xw({label:e,size:t="md",iconClassName:n,className:r,type:o="button",...s}){return g.jsx("button",{type:o,"aria-label":e,className:bw({size:t,className:r}),...s,children:g.jsx(sy,{className:n??ww[t]})})}const w0=u.forwardRef(({page:e,last:t,onChange:n,className:r="",...o},s)=>{const i=Number(e),a=Number(t),c=[];for(let d=1;d<a+1;d++)(i===d||i===1&&d<i+5||i===2&&d<i+4||d>i-3&&d<i+3||i===a-1&&d>i-4||i===a&&d>i-5)&&c.push(d);const l=i===1,f=i===a;return g.jsxs("nav",{ref:s,className:`mt-8 flex justify-center items-center gap-1 ${r}`,...o,children:[g.jsxs(Hn,{disabled:l,onClick:()=>!l&&n(1),"aria-label":"First page",isSkip:!0,children:[g.jsx(Xs,{width:16}),g.jsx(Xs,{width:16})]}),g.jsx(Hn,{disabled:l,onClick:()=>!l&&n(i-1),"aria-label":"Previous page",children:g.jsx(Xs,{width:20})}),c.map(d=>g.jsx(Hn,{active:i===d,onClick:()=>n(d),"aria-label":`Page ${d}`,"aria-current":i===d?"page":void 0,children:d},d)),g.jsx(Hn,{disabled:f,onClick:()=>!f&&n(i+1),"aria-label":"Next page",children:g.jsx(_r,{width:20})}),g.jsxs(Hn,{disabled:f,onClick:()=>!f&&n(a),"aria-label":"Last page",isSkip:!0,children:[g.jsx(_r,{width:16}),g.jsx(_r,{width:16})]})]})});w0.displayName="Pagination";const Hn=u.forwardRef(({active:e,disabled:t,isSkip:n,children:r,className:o="",...s},i)=>{const a=`
|
|
21
|
+
flex justify-center items-center
|
|
22
|
+
leading-normal text-base font-medium
|
|
23
|
+
w-9 h-9 md:w-10 md:h-10
|
|
24
|
+
border border-transparent
|
|
25
|
+
rounded-[10px]
|
|
26
|
+
transition-all duration-200
|
|
27
|
+
`,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",l=n?"relative [&>svg]:absolute [&>svg:first-child]:-translate-x-[3px] [&>svg:last-child]:translate-x-[3px]":"";return g.jsx("button",{ref:i,type:"button",disabled:t,className:`${a} ${c} ${l} ${o}`,...s,children:r})});Hn.displayName="PaginationItem";const Ew=Ke(["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"}}),_w=u.forwardRef(({value:e,max:t,color:n,className:r="",...o},s)=>{const i=Math.min(100,Math.max(0,e/t*100));return g.jsx("div",{ref:s,className:xe("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:g.jsx("div",{className:`progress-fill ${Ew({color:n})}`,style:{"--progress-width":`${i}%`}})})});_w.displayName="Progress";function Cl(e,[t,n]){return Math.min(n,Math.max(t,e))}function Sw(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var x0=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"}),Cw="VisuallyHidden",E0=u.forwardRef((e,t)=>g.jsx(be.span,{...e,ref:t,style:{...x0,...e.style}}));E0.displayName=Cw;var Rw=E0,Aw=[" ","Enter","ArrowUp","ArrowDown"],Tw=[" ","Enter"],An="Select",[Cs,Rs,Pw]=Fi(An),[rr]=Bt(An,[Pw,nr]),As=nr(),[Mw,ln]=rr(An),[Nw,Ow]=rr(An),_0=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:l,name:f,autoComplete:d,disabled:p,required:h,form:y}=e,m=As(t),[v,b]=u.useState(null),[w,_]=u.useState(null),[S,C]=u.useState(!1),O=ws(l),[T,P]=qt({prop:r,defaultProp:o??!1,onChange:s,caller:An}),[N,F]=qt({prop:i,defaultProp:a,onChange:c,caller:An}),z=u.useRef(null),R=v?y||!!v.closest("form"):!0,[H,x]=u.useState(new Set),I=Array.from(H).map($=>$.props.value).join(";");return g.jsx(Hi,{...m,children:g.jsxs(Mw,{required:h,scope:t,trigger:v,onTriggerChange:b,valueNode:w,onValueNodeChange:_,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:Dt(),value:N,onValueChange:F,open:T,onOpenChange:P,dir:O,triggerPointerDownPosRef:z,disabled:p,children:[g.jsx(Cs.Provider,{scope:t,children:g.jsx(Nw,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback($=>{x(D=>new Set(D).add($))},[]),onNativeOptionRemove:u.useCallback($=>{x(D=>{const q=new Set(D);return q.delete($),q})},[]),children:n})}),R?g.jsxs(z0,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:d,value:N,onChange:$=>F($.target.value),disabled:p,form:y,children:[N===void 0?g.jsx("option",{value:""}):null,Array.from(H)]},I):null]})})};_0.displayName=An;var S0="SelectTrigger",C0=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=As(n),i=ln(S0,n),a=i.disabled||r,c=Ee(t,i.onTriggerChange),l=Rs(n),f=u.useRef("touch"),[d,p,h]=V0(m=>{const v=l().filter(_=>!_.disabled),b=v.find(_=>_.value===i.value),w=Z0(v,m,b);w!==void 0&&i.onValueChange(w.value)}),y=m=>{a||(i.onOpenChange(!0),h()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return g.jsx(zi,{asChild:!0,...s,children:g.jsx(be.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":U0(i.value)?"":void 0,...o,ref:c,onClick:de(o.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&y(m)}),onPointerDown:de(o.onPointerDown,m=>{f.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(y(m),m.preventDefault())}),onKeyDown:de(o.onKeyDown,m=>{const v=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&p(m.key),!(v&&m.key===" ")&&Aw.includes(m.key)&&(y(),m.preventDefault())})})})});C0.displayName=S0;var R0="SelectValue",A0=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=ln(R0,n),{onValueNodeHasChildrenChange:l}=c,f=s!==void 0,d=Ee(t,c.onValueNodeChange);return Xe(()=>{l(f)},[l,f]),g.jsx(be.span,{...a,ref:d,style:{pointerEvents:"none"},children:U0(c.value)?g.jsx(g.Fragment,{children:i}):s})});A0.displayName=R0;var Iw="SelectIcon",T0=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return g.jsx(be.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});T0.displayName=Iw;var kw="SelectPortal",P0=e=>g.jsx(zr,{asChild:!0,...e});P0.displayName=kw;var Tn="SelectContent",M0=u.forwardRef((e,t)=>{const n=ln(Tn,e.__scopeSelect),[r,o]=u.useState();if(Xe(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Zt.createPortal(g.jsx(N0,{scope:e.__scopeSelect,children:g.jsx(Cs.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),s):null}return g.jsx(O0,{...e,ref:t})});M0.displayName=Tn;var Rt=10,[N0,un]=rr(Tn),Dw="SelectContentImpl",Lw=Gn("SelectContent.RemoveScroll"),O0=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:m,avoidCollisions:v,...b}=e,w=ln(Tn,n),[_,S]=u.useState(null),[C,O]=u.useState(null),T=Ee(t,te=>S(te)),[P,N]=u.useState(null),[F,z]=u.useState(null),R=Rs(n),[H,x]=u.useState(!1),I=u.useRef(!1);u.useEffect(()=>{if(_)return wi(_)},[_]),bi();const $=u.useCallback(te=>{const[Q,...ie]=R().map(fe=>fe.ref.current),[re]=ie.slice(-1),ce=document.activeElement;for(const fe of te)if(fe===ce||(fe?.scrollIntoView({block:"nearest"}),fe===Q&&C&&(C.scrollTop=0),fe===re&&C&&(C.scrollTop=C.scrollHeight),fe?.focus(),document.activeElement!==ce))return},[R,C]),D=u.useCallback(()=>$([P,_]),[$,P,_]);u.useEffect(()=>{H&&D()},[H,D]);const{onOpenChange:q,triggerPointerDownPosRef:k}=w;u.useEffect(()=>{if(_){let te={x:0,y:0};const Q=re=>{te={x:Math.abs(Math.round(re.pageX)-(k.current?.x??0)),y:Math.abs(Math.round(re.pageY)-(k.current?.y??0))}},ie=re=>{te.x<=10&&te.y<=10?re.preventDefault():_.contains(re.target)||q(!1),document.removeEventListener("pointermove",Q),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",ie,{capture:!0})}}},[_,q,k]),u.useEffect(()=>{const te=()=>q(!1);return window.addEventListener("blur",te),window.addEventListener("resize",te),()=>{window.removeEventListener("blur",te),window.removeEventListener("resize",te)}},[q]);const[Y,L]=V0(te=>{const Q=R().filter(ce=>!ce.disabled),ie=Q.find(ce=>ce.ref.current===document.activeElement),re=Z0(Q,te,ie);re&&setTimeout(()=>re.ref.current.focus())}),j=u.useCallback((te,Q,ie)=>{const re=!I.current&&!ie;(w.value!==void 0&&w.value===Q||re)&&(N(te),re&&(I.current=!0))},[w.value]),K=u.useCallback(()=>_?.focus(),[_]),G=u.useCallback((te,Q,ie)=>{const re=!I.current&&!ie;(w.value!==void 0&&w.value===Q||re)&&z(te)},[w.value]),Z=r==="popper"?Ba:I0,le=Z===Ba?{side:a,sideOffset:c,align:l,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:m,avoidCollisions:v}:{};return g.jsx(N0,{scope:n,content:_,viewport:C,onViewportChange:O,itemRefCallback:j,selectedItem:P,onItemLeave:K,itemTextRefCallback:G,focusSelectedItem:D,selectedItemText:F,position:r,isPositioned:H,searchRef:Y,children:g.jsx(ri,{as:Lw,allowPinchZoom:!0,children:g.jsx(fs,{asChild:!0,trapped:w.open,onMountAutoFocus:te=>{te.preventDefault()},onUnmountAutoFocus:de(o,te=>{w.trigger?.focus({preventScroll:!0}),te.preventDefault()}),children:g.jsx(Hr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:te=>te.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:g.jsx(Z,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:te=>te.preventDefault(),...b,...le,onPlaced:()=>x(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:de(b.onKeyDown,te=>{const Q=te.ctrlKey||te.altKey||te.metaKey;if(te.key==="Tab"&&te.preventDefault(),!Q&&te.key.length===1&&L(te.key),["ArrowUp","ArrowDown","Home","End"].includes(te.key)){let re=R().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(te.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(te.key)){const ce=te.target,fe=re.indexOf(ce);re=re.slice(fe+1)}setTimeout(()=>$(re)),te.preventDefault()}})})})})})})});O0.displayName=Dw;var jw="SelectItemAlignedPosition",I0=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=ln(Tn,n),i=un(Tn,n),[a,c]=u.useState(null),[l,f]=u.useState(null),d=Ee(t,T=>f(T)),p=Rs(n),h=u.useRef(!1),y=u.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:b,focusSelectedItem:w}=i,_=u.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&m&&v&&b){const T=s.trigger.getBoundingClientRect(),P=l.getBoundingClientRect(),N=s.valueNode.getBoundingClientRect(),F=b.getBoundingClientRect();if(s.dir!=="rtl"){const ce=F.left-P.left,fe=N.left-ce,ve=T.left-fe,E=T.width+ve,J=Math.max(E,P.width),W=window.innerWidth-Rt,M=Cl(fe,[Rt,Math.max(Rt,W-J)]);a.style.minWidth=E+"px",a.style.left=M+"px"}else{const ce=P.right-F.right,fe=window.innerWidth-N.right-ce,ve=window.innerWidth-T.right-fe,E=T.width+ve,J=Math.max(E,P.width),W=window.innerWidth-Rt,M=Cl(fe,[Rt,Math.max(Rt,W-J)]);a.style.minWidth=E+"px",a.style.right=M+"px"}const z=p(),R=window.innerHeight-Rt*2,H=m.scrollHeight,x=window.getComputedStyle(l),I=parseInt(x.borderTopWidth,10),$=parseInt(x.paddingTop,10),D=parseInt(x.borderBottomWidth,10),q=parseInt(x.paddingBottom,10),k=I+$+H+q+D,Y=Math.min(v.offsetHeight*5,k),L=window.getComputedStyle(m),j=parseInt(L.paddingTop,10),K=parseInt(L.paddingBottom,10),G=T.top+T.height/2-Rt,Z=R-G,le=v.offsetHeight/2,te=v.offsetTop+le,Q=I+$+te,ie=k-Q;if(Q<=G){const ce=z.length>0&&v===z[z.length-1].ref.current;a.style.bottom="0px";const fe=l.clientHeight-m.offsetTop-m.offsetHeight,ve=Math.max(Z,le+(ce?K:0)+fe+D),E=Q+ve;a.style.height=E+"px"}else{const ce=z.length>0&&v===z[0].ref.current;a.style.top="0px";const ve=Math.max(G,I+m.offsetTop+(ce?j:0)+le)+ie;a.style.height=ve+"px",m.scrollTop=Q-G+m.offsetTop}a.style.margin=`${Rt}px 0`,a.style.minHeight=Y+"px",a.style.maxHeight=R+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[p,s.trigger,s.valueNode,a,l,m,v,b,s.dir,r]);Xe(()=>_(),[_]);const[S,C]=u.useState();Xe(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]);const O=u.useCallback(T=>{T&&y.current===!0&&(_(),w?.(),y.current=!1)},[_,w]);return g.jsx(Bw,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:O,children:g.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:g.jsx(be.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});I0.displayName=jw;var Fw="SelectPopperPosition",Ba=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Rt,...s}=e,i=As(n);return g.jsx(Ui,{...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)"}})});Ba.displayName=Fw;var[Bw,Xi]=rr(Tn,{}),$a="SelectViewport",k0=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=un($a,n),i=Xi($a,n),a=Ee(t,s.onViewportChange),c=u.useRef(0);return g.jsxs(g.Fragment,{children:[g.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}),g.jsx(Cs.Slot,{scope:n,children:g.jsx(be.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:de(o.onScroll,l=>{const f=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=i;if(p?.current&&d){const h=Math.abs(c.current-f.scrollTop);if(h>0){const y=window.innerHeight-Rt*2,m=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),b=Math.max(m,v);if(b<y){const w=b+h,_=Math.min(y,w),S=w-_;d.style.height=_+"px",d.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});k0.displayName=$a;var D0="SelectGroup",[$w,Hw]=rr(D0),zw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Dt();return g.jsx($w,{scope:n,id:o,children:g.jsx(be.div,{role:"group","aria-labelledby":o,...r,ref:t})})});zw.displayName=D0;var L0="SelectLabel",Uw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hw(L0,n);return g.jsx(be.div,{id:o.id,...r,ref:t})});Uw.displayName=L0;var qo="SelectItem",[Vw,j0]=rr(qo),F0=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=ln(qo,n),c=un(qo,n),l=a.value===r,[f,d]=u.useState(s??""),[p,h]=u.useState(!1),y=Ee(t,w=>c.itemRefCallback?.(w,r,o)),m=Dt(),v=u.useRef("touch"),b=()=>{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 g.jsx(Vw,{scope:n,value:r,disabled:o,textId:m,isSelected:l,onItemTextChange:u.useCallback(w=>{d(_=>_||(w?.textContent??"").trim())},[]),children:g.jsx(Cs.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:g.jsx(be.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":l&&p,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:y,onFocus:de(i.onFocus,()=>h(!0)),onBlur:de(i.onBlur,()=>h(!1)),onClick:de(i.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:de(i.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:de(i.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:de(i.onPointerMove,w=>{v.current=w.pointerType,o?c.onItemLeave?.():v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:de(i.onPointerLeave,w=>{w.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:de(i.onKeyDown,w=>{c.searchRef?.current!==""&&w.key===" "||(Tw.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});F0.displayName=qo;var wr="SelectItemText",B0=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=ln(wr,n),a=un(wr,n),c=j0(wr,n),l=Ow(wr,n),[f,d]=u.useState(null),p=Ee(t,b=>d(b),c.onItemTextChange,b=>a.itemTextRefCallback?.(b,c.value,c.disabled)),h=f?.textContent,y=u.useMemo(()=>g.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=l;return Xe(()=>(m(y),()=>v(y)),[m,v,y]),g.jsxs(g.Fragment,{children:[g.jsx(be.span,{id:c.textId,...s,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Zt.createPortal(s.children,i.valueNode):null]})});B0.displayName=wr;var $0="SelectItemIndicator",Zw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return j0($0,n).isSelected?g.jsx(be.span,{"aria-hidden":!0,...r,ref:t}):null});Zw.displayName=$0;var Ha="SelectScrollUpButton",Ww=u.forwardRef((e,t)=>{const n=un(Ha,e.__scopeSelect),r=Xi(Ha,e.__scopeSelect),[o,s]=u.useState(!1),i=Ee(t,r.onScrollButtonChange);return Xe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?g.jsx(H0,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Ww.displayName=Ha;var za="SelectScrollDownButton",qw=u.forwardRef((e,t)=>{const n=un(za,e.__scopeSelect),r=Xi(za,e.__scopeSelect),[o,s]=u.useState(!1),i=Ee(t,r.onScrollButtonChange);return Xe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<l;s(f)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?g.jsx(H0,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});qw.displayName=za;var H0=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=un("SelectScrollButton",n),i=u.useRef(null),a=Rs(n),c=u.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return u.useEffect(()=>()=>c(),[c]),Xe(()=>{a().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),g.jsx(be.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:de(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:de(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:de(o.onPointerLeave,()=>{c()})})}),Kw="SelectSeparator",Gw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(be.div,{"aria-hidden":!0,...r,ref:t})});Gw.displayName=Kw;var Ua="SelectArrow",Yw=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=As(n),s=ln(Ua,n),i=un(Ua,n);return s.open&&i.position==="popper"?g.jsx(Vi,{...o,...r,ref:t}):null});Yw.displayName=Ua;var Qw="SelectBubbleInput",z0=u.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=u.useRef(null),s=Ee(r,o),i=Sw(t);return u.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const d=new Event("change",{bubbles:!0});f.call(a,t),a.dispatchEvent(d)}},[i,t]),g.jsx(be.select,{...n,style:{...x0,...n.style},ref:s,defaultValue:t})});z0.displayName=Qw;function U0(e){return e===""||e===void 0}function V0(e){const t=jt(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(i=>{const a=n.current+i;t(a),(function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(a)},[t]),s=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Z0(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Xw(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Xw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Jw=_0,ex=C0,tx=A0,nx=T0,rx=P0,ox=M0,sx=k0,ax=F0,ix=B0,cx=Jw,lx=tx,ux=ex,dx=nx,fx=rx,hx=ox,px=sx,mx=ax,gx=ix;const vx=Ke(["inline-flex","items-center","justify-between","gap-2","border","border-border-subtle","bg-elevated","text-fg-default","font-medium","transition-colors","outline-none","focus-ring-soft","disabled:cursor-not-allowed","disabled:opacity-50","cursor-pointer","whitespace-nowrap"],{variants:{variant:{default:["border-border-subtle"],ghost:["border-transparent","bg-subtle","hover:bg-hover-subtle"]},size:{sm:"h-8 px-3 text-sm rounded-[12px]",md:"h-9 px-3 text-sm rounded-[14px]",lg:"h-11 px-4 text-base rounded-[16px]"}},defaultVariants:{variant:"default",size:"md"}}),Ao=({id:e,value:t,defaultValue:n,onValueChange:r,placeholder:o,ariaLabel:s,"aria-labelledby":i,"aria-describedby":a,variant:c,size:l,className:f,children:d,disabled:p})=>g.jsxs(cx,{value:t,defaultValue:n,onValueChange:r,disabled:p,children:[g.jsxs(ux,{id:e,"aria-label":s,"aria-labelledby":i,"aria-describedby":a,className:vx({variant:c,size:l,className:f}),children:[g.jsx(lx,{className:"min-w-0 truncate",placeholder:o}),g.jsx(dx,{children:g.jsx(ny,{className:"w-3.5 h-3.5 opacity-60"})})]}),g.jsx(fx,{children:g.jsx(W0,{children:g.jsx(px,{className:"p-1",children:d})})})]}),W0=u.forwardRef(({className:e,children:t,...n},r)=>g.jsx(hx,{ref:r,position:"popper",sideOffset:4,className:xe("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}));W0.displayName="SelectContent";const zn=u.forwardRef(({className:e,children:t,...n},r)=>g.jsx(mx,{ref:r,className:xe("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:g.jsx(gx,{children:t})}));zn.displayName="SelectItem";Ao.displayName="Select";const Rl=e=>typeof e=="number"?`${e}px`:e,Lt=u.forwardRef(({width:e,height:t=30,opacity:n,className:r="",style:o,...s},i)=>g.jsx("div",{ref:i,className:xe("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":Rl(e),"--skeleton-height":Rl(t),"--skeleton-opacity":n,...o},...s}));Lt.displayName="Skeleton";const yx=u.forwardRef(({checked:e,onCheckedChange:t,onClick:n,className:r,disabled:o,...s},i)=>g.jsx("button",{ref:i,type:"button",role:"switch","aria-checked":e,disabled:o,className:xe("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:g.jsx("span",{"aria-hidden":"true",className:xe("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")})}));yx.displayName="Switch";const bx=Ke(["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"}}),wx=u.forwardRef(({className:e,variant:t,size:n,...r},o)=>g.jsx("textarea",{ref:o,className:bx({variant:t,size:n,className:e}),...r}));wx.displayName="Textarea";var q0="Toggle",K0=u.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...s}=e,[i,a]=qt({prop:n,onChange:o,defaultProp:r??!1,caller:q0});return g.jsx(be.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:de(e.onClick,()=>{e.disabled||a(!i)})})});K0.displayName=q0;var dn="ToggleGroup",[G0]=Bt(dn,[xs]),Y0=xs(),Ji=X.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return g.jsx(xx,{...o,ref:t})}if(n==="multiple"){const o=r;return g.jsx(Ex,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${dn}\``)});Ji.displayName=dn;var[Q0,X0]=G0(dn),xx=X.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,a]=qt({prop:n,defaultProp:r??"",onChange:o,caller:dn});return g.jsx(Q0,{scope:e.__scopeToggleGroup,type:"single",value:X.useMemo(()=>i?[i]:[],[i]),onItemActivate:a,onItemDeactivate:X.useCallback(()=>a(""),[a]),children:g.jsx(J0,{...s,ref:t})})}),Ex=X.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,a]=qt({prop:n,defaultProp:r??[],onChange:o,caller:dn}),c=X.useCallback(f=>a((d=[])=>[...d,f]),[a]),l=X.useCallback(f=>a((d=[])=>d.filter(p=>p!==f)),[a]);return g.jsx(Q0,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:l,children:g.jsx(J0,{...s,ref:t})})});Ji.displayName=dn;var[_x,Sx]=G0(dn),J0=X.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:s,dir:i,loop:a=!0,...c}=e,l=Y0(n),f=ws(i),d={role:"group",dir:f,...c};return g.jsx(_x,{scope:n,rovingFocus:o,disabled:r,children:o?g.jsx(wh,{asChild:!0,...l,orientation:s,dir:f,loop:a,children:g.jsx(be.div,{...d,ref:t})}):g.jsx(be.div,{...d,ref:t})})}),Ko="ToggleGroupItem",ep=X.forwardRef((e,t)=>{const n=X0(Ko,e.__scopeToggleGroup),r=Sx(Ko,e.__scopeToggleGroup),o=Y0(e.__scopeToggleGroup),s=n.value.includes(e.value),i=r.disabled||e.disabled,a={...e,pressed:s,disabled:i},c=X.useRef(null);return r.rovingFocus?g.jsx(xh,{asChild:!0,...o,focusable:!i,active:s,ref:c,children:g.jsx(Al,{...a,ref:t})}):g.jsx(Al,{...a,ref:t})});ep.displayName=Ko;var Al=X.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,s=X0(Ko,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},a=s.type==="single"?i:void 0;return g.jsx(K0,{...a,...o,ref:t,onPressedChange:c=>{c?s.onItemActivate(r):s.onItemDeactivate(r)}})}),Cx=Ji,Rx=ep,Ax=Cx,Tx=Rx;const Px=Ke(["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"}}),Mx=Ke(["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"}}),tp=u.createContext({}),Nx=u.forwardRef(({className:e,variant:t,size:n,children:r,...o},s)=>g.jsx(tp.Provider,{value:{variant:t??"default",size:n??"md"},children:g.jsx(Ax,{ref:s,className:Px({variant:t,className:e}),...o,children:r})}));Nx.displayName="ToggleGroup";const Ox=u.forwardRef(({className:e,activeClassName:t,children:n,...r},o)=>{const s=u.useContext(tp);return g.jsx(Tx,{ref:o,className:Mx({variant:s.variant,size:s.size,className:xe(e,t)}),...r,children:n})});Ox.displayName="ToggleGroupItem";var[Ts]=Bt("Tooltip",[nr]),Ps=nr(),np="TooltipProvider",Ix=700,Va="tooltip.open",[kx,ec]=Ts(np),rp=e=>{const{__scopeTooltip:t,delayDuration:n=Ix,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=u.useRef(!0),a=u.useRef(!1),c=u.useRef(0);return u.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),g.jsx(kx,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:u.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:u.useCallback(l=>{a.current=l},[]),disableHoverableContent:o,children:s})};rp.displayName=np;var Ir="Tooltip",[Dx,Xr]=Ts(Ir),op=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=ec(Ir,e.__scopeTooltip),l=Ps(t),[f,d]=u.useState(null),p=Dt(),h=u.useRef(0),y=i??c.disableHoverableContent,m=a??c.delayDuration,v=u.useRef(!1),[b,w]=qt({prop:r,defaultProp:o??!1,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(Va))):c.onClose(),s?.(T)},caller:Ir}),_=u.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),S=u.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,w(!0)},[w]),C=u.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),O=u.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,w(!0),h.current=0},m)},[m,w]);return u.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),g.jsx(Hi,{...l,children:g.jsx(Dx,{scope:t,contentId:p,open:b,stateAttribute:_,trigger:f,onTriggerChange:d,onTriggerEnter:u.useCallback(()=>{c.isOpenDelayedRef.current?O():S()},[c.isOpenDelayedRef,O,S]),onTriggerLeave:u.useCallback(()=>{y?C():(window.clearTimeout(h.current),h.current=0)},[C,y]),onOpen:S,onClose:C,disableHoverableContent:y,children:n})})};op.displayName=Ir;var Za="TooltipTrigger",sp=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Xr(Za,n),s=ec(Za,n),i=Ps(n),a=u.useRef(null),c=Ee(t,a,o.onTriggerChange),l=u.useRef(!1),f=u.useRef(!1),d=u.useCallback(()=>l.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),g.jsx(zi,{asChild:!0,...i,children:g.jsx(be.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:de(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:de(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:de(e.onPointerDown,()=>{o.open&&o.onClose(),l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:de(e.onFocus,()=>{l.current||o.onOpen()}),onBlur:de(e.onBlur,o.onClose),onClick:de(e.onClick,o.onClose)})})});sp.displayName=Za;var tc="TooltipPortal",[Lx,jx]=Ts(tc,{forceMount:void 0}),ap=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Xr(tc,t);return g.jsx(Lx,{scope:t,forceMount:n,children:g.jsx($t,{present:n||s.open,children:g.jsx(zr,{asChild:!0,container:o,children:r})})})};ap.displayName=tc;var Qn="TooltipContent",ip=u.forwardRef((e,t)=>{const n=jx(Qn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Xr(Qn,e.__scopeTooltip);return g.jsx($t,{present:r||i.open,children:i.disableHoverableContent?g.jsx(cp,{side:o,...s,ref:t}):g.jsx(Fx,{side:o,...s,ref:t})})}),Fx=u.forwardRef((e,t)=>{const n=Xr(Qn,e.__scopeTooltip),r=ec(Qn,e.__scopeTooltip),o=u.useRef(null),s=Ee(t,o),[i,a]=u.useState(null),{trigger:c,onClose:l}=n,f=o.current,{onPointerInTransitChange:d}=r,p=u.useCallback(()=>{a(null),d(!1)},[d]),h=u.useCallback((y,m)=>{const v=y.currentTarget,b={x:y.clientX,y:y.clientY},w=Ux(b,v.getBoundingClientRect()),_=Vx(b,w),S=Zx(m.getBoundingClientRect()),C=qx([..._,...S]);a(C),d(!0)},[d]);return u.useEffect(()=>()=>p(),[p]),u.useEffect(()=>{if(c&&f){const y=v=>h(v,f),m=v=>h(v,c);return c.addEventListener("pointerleave",y),f.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",m)}}},[c,f,h,p]),u.useEffect(()=>{if(i){const y=m=>{const v=m.target,b={x:m.clientX,y:m.clientY},w=c?.contains(v)||f?.contains(v),_=!Wx(b,i);w?p():_&&(p(),l())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,f,i,l,p]),g.jsx(cp,{...e,ref:s})}),[Bx,$x]=Ts(Ir,{isInside:!1}),Hx=Qu("TooltipContent"),cp=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,c=Xr(Qn,n),l=Ps(n),{onClose:f}=c;return u.useEffect(()=>(document.addEventListener(Va,f),()=>document.removeEventListener(Va,f)),[f]),u.useEffect(()=>{if(c.trigger){const d=p=>{p.target?.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),g.jsx(Hr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:g.jsxs(Ui,{"data-state":c.stateAttribute,...l,...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:[g.jsx(Hx,{children:r}),g.jsx(Bx,{scope:n,isInside:!0,children:g.jsx(Rw,{id:c.contentId,role:"tooltip",children:o||r})})]})})});ip.displayName=Qn;var lp="TooltipArrow",zx=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ps(n);return $x(lp,n).isInside?null:g.jsx(Vi,{...o,...r,ref:t})});zx.displayName=lp;function Ux(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 Vx(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 Zx(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 Wx(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],l=a.x,f=a.y,d=c.x,p=c.y;f>r!=p>r&&n<(d-l)*(r-f)/(p-f)+l&&(o=!o)}return o}function qx(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),Kx(t)}function Kx(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 Gx=rp,Yx=op,Qx=sp,Xx=ap,Jx=ip,e3=Gx,t3=Yx,n3=Qx,r3=Xx,up=Jx;const o3=e3,s3=t3,a3=n3,dp=u.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(up,{ref:r,sideOffset:t,className:xe("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}));dp.displayName=up.displayName;const PC=({content:e,children:t,side:n="top",delayDuration:r=200})=>g.jsx(o3,{children:g.jsxs(s3,{delayDuration:r,children:[g.jsx(a3,{asChild:!0,children:t}),g.jsx(r3,{children:g.jsx(dp,{side:n,children:e})})]})}),Tl=({children:e,fallback:t})=>e||t;function i3({children:e}){return g.jsx("div",{className:"flex w-full flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:e})}const Ms=28,nc=[Ms,50,100];function c3(e){return nc.includes(e)}function l3({itemsPerPage:e,onItemsPerPageChange:t,sortBy:n,onSortByChange:r,sortOrder:o,onSortOrderChange:s,pinnedFirst:i,onPinnedFirstChange:a}){return g.jsx("div",{className:"flex justify-end",children:g.jsxs("div",{className:"surface-base inline-flex flex-wrap items-center gap-3 rounded-[16px] px-3.5 py-2.5",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(of,{className:"h-4 w-4 shrink-0 text-fg-tertiary"}),g.jsx(Re,{id:"note-filters-items-label",as:"span",variant:"label",weight:"medium",tone:"tertiary",children:"Items"}),g.jsx(Ao,{value:String(e),"aria-labelledby":"note-filters-items-label",onValueChange:c=>{const l=Number(c);c3(l)&&t(l)},variant:"ghost",size:"sm",children:nc.map(c=>g.jsx(zn,{value:String(c),children:c===Ms?`Default (${c})`:c},c))})]}),g.jsx("div",{className:"h-5 w-px bg-divider"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(fy,{className:"h-4 w-4 shrink-0 text-fg-tertiary"}),g.jsx(Re,{as:"span",variant:"label",weight:"medium",tone:"tertiary",children:"Sort"}),g.jsxs(Ao,{value:n,ariaLabel:"Sort field",onValueChange:c=>r(c),variant:"ghost",size:"sm",children:[g.jsx(zn,{value:"updatedAt",children:"Updated"}),g.jsx(zn,{value:"createdAt",children:"Created"})]}),g.jsxs(Ao,{value:o,ariaLabel:"Sort order",onValueChange:c=>s(c),variant:"ghost",size:"sm",children:[g.jsx(zn,{value:"desc",children:"Newest"}),g.jsx(zn,{value:"asc",children:"Oldest"})]})]}),g.jsx("div",{className:"h-5 w-px bg-divider"}),g.jsxs(b0,{htmlFor:"pinnedFirst",size:"sm",className:"flex cursor-pointer items-center gap-1.5",children:[g.jsx(Wf,{id:"pinnedFirst",size:"sm",checked:i,onChange:c=>a(c.target.checked)}),g.jsx(Re,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:"Pinned First"})]})]})})}var sa,Pl;function u3(){if(Pl)return sa;Pl=1;function e(a){return a&&typeof a=="object"&&"default"in a?a.default:a}var t=E1(),n=e(t);function r(a,c,l){return c in a?Object.defineProperty(a,c,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[c]=l,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,l){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 l<"u"&&typeof l!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function f(d){return d.displayName||d.name||"Component"}return function(p){if(typeof p!="function")throw new Error("Expected WrappedComponent to be a React component.");var h=[],y;function m(){y=a(h.map(function(b){return b.props})),v.canUseDOM?c(y):l&&(y=l(y))}var v=(function(b){o(w,b);function w(){return b.apply(this,arguments)||this}w.peek=function(){return y},w.rewind=function(){if(w.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var C=y;return y=void 0,h=[],C};var _=w.prototype;return _.UNSAFE_componentWillMount=function(){h.push(this),m()},_.componentDidUpdate=function(){m()},_.componentWillUnmount=function(){var C=h.indexOf(this);h.splice(C,1),m()},_.render=function(){return n.createElement(p,this.props)},w})(t.PureComponent);return r(v,"displayName","SideEffect("+f(p)+")"),r(v,"canUseDOM",s),v}}return sa=i,sa}var d3=u3();const f3=Xn(d3);var aa,Ml;function h3(){if(Ml)return aa;Ml=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,l;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(l=Object.keys(s),a=l.length,a!==Object.keys(i).length)return!1;for(c=a;c--!==0;)if(!Object.prototype.hasOwnProperty.call(i,l[c]))return!1;if(e&&s instanceof Element)return!1;for(c=a;c--!==0;)if(!((l[c]==="_owner"||l[c]==="__v"||l[c]==="__o")&&s.$$typeof)&&!o(s[l[c]],i[l[c]]))return!1;return!0}return s!==s&&i!==i}return aa=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}},aa}var p3=h3();const m3=Xn(p3);var ia,Nl;function g3(){if(Nl)return ia;Nl=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 l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ia=o()?Object.assign:function(s,i){for(var a,c=r(s),l,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var d in a)t.call(a,d)&&(c[d]=a[d]);if(e){l=e(a);for(var p=0;p<l.length;p++)n.call(a,l[p])&&(c[l[p]]=a[l[p]])}}return c},ia}var v3=g3();const y3=Xn(v3);var wn={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},ye={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(ye).map(function(e){return ye[e]});var Le={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"},Go={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},kr={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},b3=Object.keys(Go).reduce(function(e,t){return e[Go[t]]=t,e},{}),w3=[ye.NOSCRIPT,ye.SCRIPT,ye.STYLE],Tt="data-react-helmet",x3=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},E3=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},_3=(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}})(),lt=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},S3=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)},Ol=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},C3=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},Wa=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n===!1?String(t):String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},R3=function(t){var n=Zn(t,ye.TITLE),r=Zn(t,kr.TITLE_TEMPLATE);if(r&&n)return r.replace(/%s/g,function(){return Array.isArray(n)?n.join(""):n});var o=Zn(t,kr.DEFAULT_TITLE);return n||o||void 0},A3=function(t){return Zn(t,kr.ON_CHANGE_CLIENT_STATE)||function(){}},ca=function(t,n){return n.filter(function(r){return typeof r[t]<"u"}).map(function(r){return r[t]}).reduce(function(r,o){return lt({},r,o)},{})},T3=function(t,n){return n.filter(function(r){return typeof r[ye.BASE]<"u"}).map(function(r){return r[ye.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},[])},vr=function(t,n,r){var o={};return r.filter(function(s){return Array.isArray(s[t])?!0:(typeof s[t]<"u"&&O3("Helmet: "+t+' should be of type "Array". Instead found type "'+x3(s[t])+'"'),!1)}).map(function(s){return s[t]}).reverse().reduce(function(s,i){var a={};i.filter(function(p){for(var h=void 0,y=Object.keys(p),m=0;m<y.length;m++){var v=y[m],b=v.toLowerCase();n.indexOf(b)!==-1&&!(h===Le.REL&&p[h].toLowerCase()==="canonical")&&!(b===Le.REL&&p[b].toLowerCase()==="stylesheet")&&(h=b),n.indexOf(v)!==-1&&(v===Le.INNER_HTML||v===Le.CSS_TEXT||v===Le.ITEM_PROP)&&(h=v)}if(!h||!p[h])return!1;var w=p[h].toLowerCase();return o[h]||(o[h]={}),a[h]||(a[h]={}),o[h][w]?!1:(a[h][w]=!0,!0)}).reverse().forEach(function(p){return s.push(p)});for(var c=Object.keys(a),l=0;l<c.length;l++){var f=c[l],d=y3({},o[f],a[f]);o[f]=d}return s},[]).reverse()},Zn=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},P3=function(t){return{baseTag:T3([Le.HREF,Le.TARGET],t),bodyAttributes:ca(wn.BODY,t),defer:Zn(t,kr.DEFER),encode:Zn(t,kr.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:ca(wn.HTML,t),linkTags:vr(ye.LINK,[Le.REL,Le.HREF],t),metaTags:vr(ye.META,[Le.NAME,Le.CHARSET,Le.HTTPEQUIV,Le.PROPERTY,Le.ITEM_PROP],t),noscriptTags:vr(ye.NOSCRIPT,[Le.INNER_HTML],t),onChangeClientState:A3(t),scriptTags:vr(ye.SCRIPT,[Le.SRC,Le.INNER_HTML],t),styleTags:vr(ye.STYLE,[Le.CSS_TEXT],t),title:R3(t),titleAttributes:ca(wn.TITLE,t)}},qa=(function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout(function(){qa(t)},0)}})(),Il=function(t){return clearTimeout(t)},M3=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||qa:global.requestAnimationFrame||qa,N3=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||Il:global.cancelAnimationFrame||Il,O3=function(t){return console&&typeof console.warn=="function"&&console.warn(t)},yr=null,I3=function(t){yr&&N3(yr),t.defer?yr=M3(function(){kl(t,function(){yr=null})}):(kl(t),yr=null)},kl=function(t,n){var r=t.baseTag,o=t.bodyAttributes,s=t.htmlAttributes,i=t.linkTags,a=t.metaTags,c=t.noscriptTags,l=t.onChangeClientState,f=t.scriptTags,d=t.styleTags,p=t.title,h=t.titleAttributes;Ka(ye.BODY,o),Ka(ye.HTML,s),k3(p,h);var y={baseTag:Fn(ye.BASE,r),linkTags:Fn(ye.LINK,i),metaTags:Fn(ye.META,a),noscriptTags:Fn(ye.NOSCRIPT,c),scriptTags:Fn(ye.SCRIPT,f),styleTags:Fn(ye.STYLE,d)},m={},v={};Object.keys(y).forEach(function(b){var w=y[b],_=w.newTags,S=w.oldTags;_.length&&(m[b]=_),S.length&&(v[b]=y[b].oldTags)}),n&&n(),l(t,m,v)},fp=function(t){return Array.isArray(t)?t.join(""):t},k3=function(t,n){typeof t<"u"&&document.title!==t&&(document.title=fp(t)),Ka(ye.TITLE,n)},Ka=function(t,n){var r=document.getElementsByTagName(t)[0];if(r){for(var o=r.getAttribute(Tt),s=o?o.split(","):[],i=[].concat(s),a=Object.keys(n),c=0;c<a.length;c++){var l=a[c],f=n[l]||"";r.getAttribute(l)!==f&&r.setAttribute(l,f),s.indexOf(l)===-1&&s.push(l);var d=i.indexOf(l);d!==-1&&i.splice(d,1)}for(var p=i.length-1;p>=0;p--)r.removeAttribute(i[p]);s.length===i.length?r.removeAttribute(Tt):r.getAttribute(Tt)!==a.join(",")&&r.setAttribute(Tt,a.join(","))}},Fn=function(t,n){var r=document.head||document.querySelector(ye.HEAD),o=r.querySelectorAll(t+"["+Tt+"]"),s=Array.prototype.slice.call(o),i=[],a=void 0;return n&&n.length&&n.forEach(function(c){var l=document.createElement(t);for(var f in c)if(c.hasOwnProperty(f))if(f===Le.INNER_HTML)l.innerHTML=c.innerHTML;else if(f===Le.CSS_TEXT)l.styleSheet?l.styleSheet.cssText=c.cssText:l.appendChild(document.createTextNode(c.cssText));else{var d=typeof c[f]>"u"?"":c[f];l.setAttribute(f,d)}l.setAttribute(Tt,"true"),s.some(function(p,h){return a=h,l.isEqualNode(p)})?s.splice(a,1):i.push(l)}),s.forEach(function(c){return c.parentNode.removeChild(c)}),i.forEach(function(c){return r.appendChild(c)}),{oldTags:s,newTags:i}},hp=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},"")},D3=function(t,n,r,o){var s=hp(r),i=fp(n);return s?"<"+t+" "+Tt+'="true" '+s+">"+Wa(i,o)+"</"+t+">":"<"+t+" "+Tt+'="true">'+Wa(i,o)+"</"+t+">"},L3=function(t,n,r){return n.reduce(function(o,s){var i=Object.keys(s).filter(function(l){return!(l===Le.INNER_HTML||l===Le.CSS_TEXT)}).reduce(function(l,f){var d=typeof s[f]>"u"?f:f+'="'+Wa(s[f],r)+'"';return l?l+" "+d:d},""),a=s.innerHTML||s.cssText||"",c=w3.indexOf(t)===-1;return o+"<"+t+" "+Tt+'="true" '+i+(c?"/>":">"+a+"</"+t+">")},"")},pp=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[Go[o]||o]=t[o],r},n)},j3=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[b3[o]||o]=t[o],r},n)},F3=function(t,n,r){var o,s=(o={key:n},o[Tt]=!0,o),i=pp(r,s);return[X.createElement(ye.TITLE,i,n)]},B3=function(t,n){return n.map(function(r,o){var s,i=(s={key:o},s[Tt]=!0,s);return Object.keys(r).forEach(function(a){var c=Go[a]||a;if(c===Le.INNER_HTML||c===Le.CSS_TEXT){var l=r.innerHTML||r.cssText;i.dangerouslySetInnerHTML={__html:l}}else i[c]=r[a]}),X.createElement(t,i)})},zt=function(t,n,r){switch(t){case ye.TITLE:return{toComponent:function(){return F3(t,n.title,n.titleAttributes)},toString:function(){return D3(t,n.title,n.titleAttributes,r)}};case wn.BODY:case wn.HTML:return{toComponent:function(){return pp(n)},toString:function(){return hp(n)}};default:return{toComponent:function(){return B3(t,n)},toString:function(){return L3(t,n,r)}}}},mp=function(t){var n=t.baseTag,r=t.bodyAttributes,o=t.encode,s=t.htmlAttributes,i=t.linkTags,a=t.metaTags,c=t.noscriptTags,l=t.scriptTags,f=t.styleTags,d=t.title,p=d===void 0?"":d,h=t.titleAttributes;return{base:zt(ye.BASE,n,o),bodyAttributes:zt(wn.BODY,r,o),htmlAttributes:zt(wn.HTML,s,o),link:zt(ye.LINK,i,o),meta:zt(ye.META,a,o),noscript:zt(ye.NOSCRIPT,c,o),script:zt(ye.SCRIPT,l,o),style:zt(ye.STYLE,f,o),title:zt(ye.TITLE,{title:p,titleAttributes:h},o)}},$3=function(t){var n,r;return r=n=(function(o){S3(s,o);function s(){return E3(this,s),C3(this,o.apply(this,arguments))}return s.prototype.shouldComponentUpdate=function(a){return!m3(this.props,a)},s.prototype.mapNestedChildrenToProps=function(a,c){if(!c)return null;switch(a.type){case ye.SCRIPT:case ye.NOSCRIPT:return{innerHTML:c};case ye.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,l=a.child,f=a.arrayTypeChildren,d=a.newChildProps,p=a.nestedChildren;return lt({},f,(c={},c[l.type]=[].concat(f[l.type]||[],[lt({},d,this.mapNestedChildrenToProps(l,p))]),c))},s.prototype.mapObjectTypeChildren=function(a){var c,l,f=a.child,d=a.newProps,p=a.newChildProps,h=a.nestedChildren;switch(f.type){case ye.TITLE:return lt({},d,(c={},c[f.type]=h,c.titleAttributes=lt({},p),c));case ye.BODY:return lt({},d,{bodyAttributes:lt({},p)});case ye.HTML:return lt({},d,{htmlAttributes:lt({},p)})}return lt({},d,(l={},l[f.type]=lt({},p),l))},s.prototype.mapArrayTypeChildrenToProps=function(a,c){var l=lt({},c);return Object.keys(a).forEach(function(f){var d;l=lt({},l,(d={},d[f]=a[f],d))}),l},s.prototype.warnOnInvalidChildren=function(a,c){return!0},s.prototype.mapChildrenToProps=function(a,c){var l=this,f={};return X.Children.forEach(a,function(d){if(!(!d||!d.props)){var p=d.props,h=p.children,y=Ol(p,["children"]),m=j3(y);switch(l.warnOnInvalidChildren(d,h),d.type){case ye.LINK:case ye.META:case ye.NOSCRIPT:case ye.SCRIPT:case ye.STYLE:f=l.flattenArrayTypeChildren({child:d,arrayTypeChildren:f,newChildProps:m,nestedChildren:h});break;default:c=l.mapObjectTypeChildren({child:d,newProps:c,newChildProps:m,nestedChildren:h});break}}}),c=this.mapArrayTypeChildrenToProps(f,c),c},s.prototype.render=function(){var a=this.props,c=a.children,l=Ol(a,["children"]),f=lt({},l);return c&&(f=this.mapChildrenToProps(c,f)),X.createElement(t,f)},_3(s,null,[{key:"canUseDOM",set:function(a){t.canUseDOM=a}}]),s})(X.Component),n.propTypes={base:De.object,bodyAttributes:De.object,children:De.oneOfType([De.arrayOf(De.node),De.node]),defaultTitle:De.string,defer:De.bool,encodeSpecialCharacters:De.bool,htmlAttributes:De.object,link:De.arrayOf(De.object),meta:De.arrayOf(De.object),noscript:De.arrayOf(De.object),onChangeClientState:De.func,script:De.arrayOf(De.object),style:De.arrayOf(De.object),title:De.string,titleAttributes:De.object,titleTemplate:De.string},n.defaultProps={defer:!0,encodeSpecialCharacters:!0},n.peek=t.peek,n.rewind=function(){var o=t.rewind();return o||(o=mp({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),o},r},H3=function(){return null},z3=f3(P3,I3,mp)(H3),Ga=$3(z3);Ga.renderStatic=Ga.rewind;function Dl(e,t){return t==null?g.jsx(Re,{as:"h1",variant:"heading",weight:"bold",tracking:"tighter",children:e}):typeof t=="string"||typeof t=="number"?g.jsx(Re,{as:"h1",variant:"heading",weight:"bold",tracking:"tighter",children:t}):g.jsx("div",{role:"heading","aria-level":1,children:t})}function Ll(e){return e==null?null:typeof e=="string"||typeof e=="number"?g.jsx(Re,{as:"p",variant:"meta",weight:"medium",tone:"tertiary",className:"mt-1",children:e}):g.jsx("div",{className:"mt-1",children:e})}function Ns({title:e,heading:t,variant:n="default",description:r,headerRight:o,children:s}){return g.jsxs(g.Fragment,{children:[g.jsx(Ga,{children:g.jsx("title",{children:e?`${e} | Ocean Brain`:"Ocean Brain"})}),n==="default"&&g.jsx("div",{className:"mb-5 border-b border-border-subtle/80 pb-4",children:g.jsxs("div",{className:o?"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between":void 0,children:[g.jsxs("div",{children:[Dl(e,t),Ll(r)]}),o]})}),n==="subtle"&&g.jsx("div",{className:"mb-6",children:g.jsxs("div",{className:o?"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between":void 0,children:[g.jsxs("div",{children:[Dl(e,t),Ll(r)]}),o]})}),s]})}const U3=e=>{let t=!1;return()=>{t||(window.requestAnimationFrame(()=>{e(),t=!1}),t=!0)}},la=new Map;function V3(){const e=ds({select:n=>n.pathname}),t=u.useRef(null);return u.useEffect(()=>{if(t.current?.parentElement){const{parentElement:n}=t.current,r=i=>{if(i!==0){la.set(e,i);return}la.delete(e)},o=U3(()=>{if(t.current){const{scrollTop:i}=n;r(i)}}),s=la.get(e);return s&&(n.scrollTop=s),n.addEventListener("scroll",o),()=>{n.removeEventListener("scroll",o)}}},[e]),g.jsx("div",{ref:t,className:"hidden"})}const Jr="/",gp="/views",Z3="/views/notes",vp="/calendar",yp="/reminders",bp="/graph",wp="/search",xp="/tag",or="/$id",Ep="/tag/$id",_p="/setting",W3="/setting/mcp",q3="/setting/trash",K3="/setting/manage-image",G3="/setting/manage-image/$id",Y3="/setting/placeholder",Q3="/setting/properties",Ya="An unexpected routing error occurred.",Sp=e=>typeof e=="object"&&e!==null&&"errors"in e&&Array.isArray(e.errors),X3=e=>e instanceof Error?e.message:Sp(e)?e.errors?.[0]?.message??Ya:Ya,J3=e=>{if(Sp(e))return e.errors?.[0]?.code};function rc({title:e,error:t,description:n,onRetry:r,showBackAction:o=!0,showHomeAction:s=!0}){const i=Pn(),a=it(),[c,l]=u.useState("idle"),f=X3(t),d=J3(t),p=async()=>{try{const h=[d,f].filter(Boolean).join(" :: ");await navigator.clipboard.writeText(h||Ya),l("copied")}catch{l("failed")}};return g.jsxs("div",{className:"rounded-[18px] border-2 border-border bg-surface p-6",children:[g.jsx(Re,{as:"p",variant:"heading",weight:"bold",tracking:"tighter",children:e}),n&&g.jsx(Re,{as:"p",variant:"meta",tone:"tertiary",className:"mt-2",children:n}),g.jsxs(Re,{as:"div",variant:"body",tone:"secondary",className:"mt-4 rounded-[14px] border border-border-subtle bg-subtle px-3 py-2",children:[f,d&&g.jsxs(Re,{as:"span",variant:"body",weight:"bold",tone:"tertiary",className:"ml-2",children:["[",d,"]"]})]}),g.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[r&&g.jsx(At,{size:"sm",onClick:r,children:"Try again"}),o&&g.jsx(At,{size:"sm",variant:"ghost",onClick:()=>a.history.back(),children:"Go back"}),s&&g.jsx(At,{size:"sm",variant:"ghost",onClick:()=>i({to:Jr,search:{page:1,limit:Ms,sortBy:"updatedAt",sortOrder:"desc",pinnedFirst:!1}}),children:"Go home"}),g.jsx(At,{size:"sm",variant:"ghost",onClick:p,children:c==="copied"?"Copied details":c==="failed"?"Copy failed":"Copy details"})]})]})}function Ge({title:e="Loading page",description:t="Preparing route resources."}){return g.jsx(Ns,{title:e,description:t,variant:"none",children:g.jsxs("div",{role:"status","aria-label":e,className:"flex flex-col gap-4",children:[g.jsx(Lt,{height:"56px"}),g.jsx(Lt,{height:"220px"}),g.jsx(Lt,{height:"160px"})]})})}function eE({error:e,reset:t}){return g.jsx(Ns,{title:"Something went wrong",variant:"none",children:g.jsx(rc,{title:"Route failed to render",description:"Retry the route or navigate somewhere safe.",error:e,onRetry:t})})}function tE(){return g.jsx(Ns,{title:"Not found",variant:"none",children:g.jsxs("div",{className:"rounded-[18px] border-2 border-border bg-surface p-6",children:[g.jsx(Re,{as:"p",variant:"heading",weight:"bold",tracking:"tighter",children:"This page does not exist."}),g.jsx(Re,{as:"p",variant:"meta",tone:"tertiary",className:"mt-2",children:"Check the URL or navigate from the sidebar."})]})})}const nE=(e=[],t=[])=>e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]));class rE extends u.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidUpdate(t){this.state.error!==null&&nE(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 Cp({children:e,fallback:t,errorTitle:n,errorDescription:r,resetKeys:o,renderError:s}){return g.jsx(Yg,{children:({reset:i})=>g.jsx(rE,{onReset:i,resetKeys:o,fallbackRender:({error:a,resetErrorBoundary:c})=>s?s({error:a,retry:c}):g.jsx(rc,{title:n,description:r,error:a,onRetry:c}),children:g.jsx(u.Suspense,{fallback:t,children:e})})})}const jl=e=>{let t;const n=new Set,r=(l,f)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(h=>h(t,p))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>c,subscribe:l=>(n.add(l),()=>n.delete(l))},c=t=e(r,o,a);return a},oE=(e=>e?jl(e):jl),sE=e=>e;function aE(e,t=sE){const n=X.useSyncExternalStore(e.subscribe,X.useCallback(()=>t(e.getState()),[e,t]),X.useCallback(()=>t(e.getInitialState()),[e,t]));return X.useDebugValue(n),n}const Fl=e=>{const t=oE(e),n=r=>aE(t,r);return Object.assign(n,t),n},iE=(e=>e?Fl(e):Fl),Rp="theme",Bl="(prefers-color-scheme: dark)";function cE(e){return e==="light"||e==="dark"}function lE(){return typeof document>"u"?null:document.documentElement}function Ap(){return typeof window>"u"?null:window.localStorage}function Tp(e){const t=lE();t&&(t.classList.remove("light","dark"),t.classList.add(e))}function Yo(){const e=Ap()?.getItem(Rp)??null;return cE(e)?e:null}function uE({storedTheme:e,systemPrefersDark:t}){return e||(t?"dark":"light")}function dE(e,t={}){Tp(e),t.persist!==!1&&Ap()?.setItem(Rp,e)}function fE(e={}){const t=e.matchMedia?e.matchMedia(Bl).matches:typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Bl).matches:!1,n=uE({storedTheme:Yo(),systemPrefersDark:t});return Tp(n),n}const $l=Yo(),Qo=iE(e=>({explicitTheme:$l,theme:$l??"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}})}}));Qo.subscribe(e=>{dE(e.theme,{persist:e.explicitTheme===e.theme})});const hE=()=>null,pE="flex h-dvh min-h-0 w-full flex-row overflow-hidden",mE=xe("fixed","bottom-4","left-4","z-[1003]","flex","h-12","w-12","items-center","justify-center","rounded-[14px]","border","border-border-subtle","bg-surface","text-fg-secondary","shadow-[0_12px_24px_-18px_rgba(0,0,0,0.35)]","transition-all","hover:bg-hover-subtle","hover:text-fg-default","active:translate-y-px","aria-expanded:bg-hover-subtle","aria-expanded:text-fg-default"),gE=xe("fixed","z-[1002]","h-full","w-full","flex-[0_0_300px]","overflow-y-auto","border-r-0","border-border-subtle","bg-[var(--page-bg)]","pb-20","md:static","md:w-auto","md:translate-x-0","md:border-r","md:pb-0","md:pointer-events-auto"),vE="pointer-events-none -translate-x-full",yE="pointer-events-auto translate-x-0",bE=xe("flex","h-full","min-h-0","min-w-0","flex-1","flex-col","overflow-x-hidden","overflow-y-auto","overscroll-contain","[scrollbar-gutter:stable]"),wE=xe("sticky","top-0","z-[1001]","border-b","border-border-subtle","bg-[var(--page-bg)]","max-md:after:content-['']","max-md:after:pointer-events-none","max-md:after:absolute","max-md:after:inset-y-0","max-md:after:right-0","max-md:after:w-12","max-md:after:bg-[linear-gradient(to_right,transparent,var(--page-bg))]"),xE=xe("flex","items-center","overflow-x-auto","whitespace-nowrap","[scrollbar-width:none]","[&::-webkit-scrollbar]:hidden"),EE=xe("min-h-0","min-w-0","max-w-full","flex-1","overflow-x-clip","px-4","pt-4","after:block","after:h-4","after:content-['']","max-md:after:h-24"),_E=({sidebar:e,topNavigation:t,children:n})=>{const r=ds({select:a=>a.pathname}),[o,s]=u.useState(!1),i="site-layout-sidebar";return u.useEffect(()=>{s(!1)},[r]),g.jsxs("div",{className:pE,children:[g.jsx("div",{className:"md:hidden",children:g.jsx("button",{type:"button",className:mE,"aria-label":"Toggle sidebar","aria-controls":i,"aria-expanded":o,onClick:()=>s(a=>!a),children:g.jsx(cy,{className:"h-6 w-6"})})}),g.jsx("aside",{id:i,className:xe(gE,o?yE:vE),children:e}),g.jsxs("main",{className:bE,children:[g.jsx("div",{className:wE,children:g.jsx("div",{className:xE,children:t})}),g.jsx("div",{className:EE,children:n}),g.jsx(V3,{})]})]})},SE=e=>({type:"error",category:"graphql",errors:e.map(t=>({code:t.extensions?.code??"GRAPHQL_ERROR",message:t.message??"GraphQL request failed",details:t}))}),CE=e=>{const t=Se.isAxiosError(e)?e.response?.data?.message??e.message??"Network request failed":"Network request failed",n=Se.isAxiosError(e)?e.code??(e.response?.status?`HTTP_${e.response.status}`:"NETWORK_ERROR"):"NETWORK_ERROR",r=Se.isAxiosError(e)?e.response?.data:void 0;return{type:"error",category:"network",errors:[{code:n,message:t,details:r}]}},RE={async execute(e){try{const{data:t}=await Se.post("/graphql",e);return t.errors&&t.errors.length>0?SE(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 CE(t)}}},AE={server:RE},TE=()=>AE.server;async function Pe(e,t,n){const r=typeof e=="string"?{query:e,variables:t,operationName:n}:e;return TE().execute(r)}const Pp=e=>typeof e=="object"&&e!==null&&"value"in e&&typeof e.value=="string",Mp=(e,t)=>({type:"error",category:"graphql",errors:[{code:"INVALID_RESPONSE_SHAPE",message:`GraphQL response field "${e}" is missing or invalid`,details:t}]}),PE=async e=>{try{const t=await Pe(`
|
|
28
|
+
query GetServerCache($key: String!) {
|
|
29
|
+
cache(key: $key) {
|
|
30
|
+
value
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`,{key:e});if(t.type==="error")throw t;if(!Pp(t.cache))throw Mp("cache",t);return t.cache.value}catch{return""}},ME=async(e,t)=>{const n=await Pe(`
|
|
34
|
+
mutation SetServerCache($key: String!, $value: String!) {
|
|
35
|
+
setCache(key: $key, value: $value) {
|
|
36
|
+
value
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`,{key:e,value:encodeURIComponent(t)});return n.type==="error"?n:Pp(n.setCache)?{...n,setCache:n.setCache}:Mp("setCache",n)},NE=()=>{const e=mf(),t=vf(),n=er(),{data:r}=o2({queryKey:Me.ui.heroBanner(),async queryFn(){return PE("heroBanner")}});return r?g.jsx("div",{className:"p-3 pb-0",children:g.jsxs("div",{className:"surface-base group relative overflow-hidden",children:[g.jsx("img",{alt:"Studio atmosphere banner",className:"w-full object-cover transition duration-500 group-hover:scale-[1.01] group-hover:opacity-90 dark:brightness-[0.85] dark:saturate-[0.9]",src:r}),g.jsx("button",{type:"button","aria-label":"Remove sidebar banner",title:"Remove banner",className:"focus-ring-soft absolute right-2 top-2 inline-flex h-8 w-8 items-center justify-center rounded-[10px] border border-white/14 bg-black/24 text-white/85 opacity-0 outline-none backdrop-blur-sm transition-opacity hover:bg-black/34 hover:text-white focus-visible:opacity-100 group-hover:opacity-100",onClick:async()=>{if(await e("Remove this hero banner from the sidebar?")){const o=await ME("heroBanner","");if(o.type==="error"){t(o.errors[0]?.message??"Failed to remove hero banner");return}await n.invalidateQueries({queryKey:Me.ui.heroBanner(),exact:!0})}},children:g.jsx(Ci,{className:"h-4 w-4",weight:"bold"})})]})}):null};function OE(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Os=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function sr(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function oc(e){return"nodeType"in e}function ht(e){var t,n;return e?sr(e)?e:oc(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function sc(e){const{Document:t}=ht(e);return e instanceof t}function eo(e){return sr(e)?!1:e instanceof ht(e).HTMLElement}function Np(e){return e instanceof ht(e).SVGElement}function ar(e){return e?sr(e)?e.document:oc(e)?sc(e)?e:eo(e)||Np(e)?e.ownerDocument:document:document:document}const Ft=Os?u.useLayoutEffect:u.useEffect;function ac(e){const t=u.useRef(e);return Ft(()=>{t.current=e}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function IE(){const e=u.useRef(null),t=u.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=u.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Dr(e,t){t===void 0&&(t=[e]);const n=u.useRef(e);return Ft(()=>{n.current!==e&&(n.current=e)},t),n}function to(e,t){const n=u.useRef();return u.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Xo(e){const t=ac(e),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function Qa(e){const t=u.useRef();return u.useEffect(()=>{t.current=e},[e]),t.current}let ua={};function no(e,t){return u.useMemo(()=>{if(t)return t;const n=ua[e]==null?0:ua[e]+1;return ua[e]=n,e+"-"+n},[e,t])}function Op(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>{const a=Object.entries(i);for(const[c,l]of a){const f=s[c];f!=null&&(s[c]=f+e*l)}return s},{...t})}}const Wn=Op(1),Lr=Op(-1);function kE(e){return"clientX"in e&&"clientY"in e}function ic(e){if(!e)return!1;const{KeyboardEvent:t}=ht(e.target);return t&&e instanceof t}function DE(e){if(!e)return!1;const{TouchEvent:t}=ht(e.target);return t&&e instanceof t}function Xa(e){if(DE(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return kE(e)?{x:e.clientX,y:e.clientY}:null}const jr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[jr.Translate.toString(e),jr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Hl="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function LE(e){return e.matches(Hl)?e:e.querySelector(Hl)}const jE={display:"none"};function FE(e){let{id:t,value:n}=e;return X.createElement("div",{id:t,style:jE},n)}function BE(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return X.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function $E(){const[e,t]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ip=u.createContext(null);function HE(e){const t=u.useContext(Ip);u.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function zE(){const[e]=u.useState(()=>new Set),t=u.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[u.useCallback(r=>{let{type:o,event:s}=r;e.forEach(i=>{var a;return(a=i[o])==null?void 0:a.call(i,s)})},[e]),t]}const UE={draggable:`
|
|
40
|
+
To pick up a draggable item, press the space bar.
|
|
41
|
+
While dragging, use the arrow keys to move the item.
|
|
42
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
43
|
+
`},VE={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function ZE(e){let{announcements:t=VE,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=UE}=e;const{announce:s,announcement:i}=$E(),a=no("DndLiveRegion"),[c,l]=u.useState(!1);if(u.useEffect(()=>{l(!0)},[]),HE(u.useMemo(()=>({onDragStart(d){let{active:p}=d;s(t.onDragStart({active:p}))},onDragMove(d){let{active:p,over:h}=d;t.onDragMove&&s(t.onDragMove({active:p,over:h}))},onDragOver(d){let{active:p,over:h}=d;s(t.onDragOver({active:p,over:h}))},onDragEnd(d){let{active:p,over:h}=d;s(t.onDragEnd({active:p,over:h}))},onDragCancel(d){let{active:p,over:h}=d;s(t.onDragCancel({active:p,over:h}))}}),[s,t])),!c)return null;const f=X.createElement(X.Fragment,null,X.createElement(FE,{id:r,value:o.draggable}),X.createElement(BE,{id:a,announcement:i}));return n?Zt.createPortal(f,n):f}var Ue;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Ue||(Ue={}));function Jo(){}function zl(e,t){return u.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function WE(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Pt=Object.freeze({x:0,y:0});function kp(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Dp(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function qE(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Ul(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function Lp(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Vl(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const KE=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Vl(t,t.left,t.top),s=[];for(const i of r){const{id:a}=i,c=n.get(a);if(c){const l=kp(Vl(c),o);s.push({id:a,data:{droppableContainer:i,value:l}})}}return s.sort(Dp)},GE=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Ul(t),s=[];for(const i of r){const{id:a}=i,c=n.get(a);if(c){const l=Ul(c),f=o.reduce((p,h,y)=>p+kp(l[y],h),0),d=Number((f/4).toFixed(4));s.push({id:a,data:{droppableContainer:i,value:d}})}}return s.sort(Dp)};function YE(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),i=o-r,a=s-n;if(r<o&&n<s){const c=t.width*t.height,l=e.width*e.height,f=i*a,d=f/(c+l-f);return Number(d.toFixed(4))}return 0}const QE=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:i}=s,a=n.get(i);if(a){const c=YE(a,t);c>0&&o.push({id:i,data:{droppableContainer:s,value:c}})}}return o.sort(qE)};function XE(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function jp(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Pt}function JE(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const e_=JE(1);function t_(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function n_(e,t,n){const r=t_(t);if(!r)return e;const{scaleX:o,scaleY:s,x:i,y:a}=r,c=e.left-i-(1-o)*parseFloat(n),l=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,d=s?e.height/s:e.height;return{width:f,height:d,top:l,right:c+f,bottom:l+d,left:c}}const r_={ignoreTransform:!1};function ir(e,t){t===void 0&&(t=r_);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:f}=ht(e).getComputedStyle(e);l&&(n=n_(n,l,f))}const{top:r,left:o,width:s,height:i,bottom:a,right:c}=n;return{top:r,left:o,width:s,height:i,bottom:a,right:c}}function Zl(e){return ir(e,{ignoreTransform:!0})}function o_(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function s_(e,t){return t===void 0&&(t=ht(e).getComputedStyle(e)),t.position==="fixed"}function a_(e,t){t===void 0&&(t=ht(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function Is(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(sc(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!eo(o)||Np(o)||n.includes(o))return n;const s=ht(e).getComputedStyle(o);return o!==e&&a_(o,s)&&n.push(o),s_(o,s)?n:r(o.parentNode)}return e?r(e):n}function Fp(e){const[t]=Is(e,1);return t??null}function da(e){return!Os||!e?null:sr(e)?e:oc(e)?sc(e)||e===ar(e).scrollingElement?window:eo(e)?e:null:null}function Bp(e){return sr(e)?e.scrollX:e.scrollLeft}function $p(e){return sr(e)?e.scrollY:e.scrollTop}function Ja(e){return{x:Bp(e),y:$p(e)}}var Ze;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ze||(Ze={}));function Hp(e){return!Os||!e?!1:e===document.scrollingElement}function zp(e){const t={x:0,y:0},n=Hp(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:i,isRight:a,maxScroll:r,minScroll:t}}const i_={x:.2,y:.2};function c_(e,t,n,r,o){let{top:s,left:i,right:a,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=i_);const{isTop:l,isBottom:f,isLeft:d,isRight:p}=zp(e),h={x:0,y:0},y={x:0,y:0},m={height:t.height*o.y,width:t.width*o.x};return!l&&s<=t.top+m.height?(h.y=Ze.Backward,y.y=r*Math.abs((t.top+m.height-s)/m.height)):!f&&c>=t.bottom-m.height&&(h.y=Ze.Forward,y.y=r*Math.abs((t.bottom-m.height-c)/m.height)),!p&&a>=t.right-m.width?(h.x=Ze.Forward,y.x=r*Math.abs((t.right-m.width-a)/m.width)):!d&&i<=t.left+m.width&&(h.x=Ze.Backward,y.x=r*Math.abs((t.left+m.width-i)/m.width)),{direction:h,speed:y}}function l_(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Up(e){return e.reduce((t,n)=>Wn(t,Ja(n)),Pt)}function u_(e){return e.reduce((t,n)=>t+Bp(n),0)}function d_(e){return e.reduce((t,n)=>t+$p(n),0)}function f_(e,t){if(t===void 0&&(t=ir),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);Fp(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const h_=[["x",["left","right"],u_],["y",["top","bottom"],d_]];class cc{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Is(n),o=Up(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,a]of h_)for(const c of i)Object.defineProperty(this,c,{get:()=>{const l=a(r),f=o[s]-l;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Sr{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function p_(e){const{EventTarget:t}=ht(e);return e instanceof t?e:ar(e)}function fa(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var _t;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(_t||(_t={}));function Wl(e){e.preventDefault()}function m_(e){e.stopPropagation()}var we;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(we||(we={}));const Vp={start:[we.Space,we.Enter],cancel:[we.Esc],end:[we.Space,we.Enter,we.Tab]},g_=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case we.Right:return{...n,x:n.x+25};case we.Left:return{...n,x:n.x-25};case we.Down:return{...n,y:n.y+25};case we.Up:return{...n,y:n.y-25}}};class lc{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Sr(ar(n)),this.windowListeners=new Sr(ht(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(_t.Resize,this.handleCancel),this.windowListeners.add(_t.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(_t.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&f_(r),n(Pt)}handleKeyDown(t){if(ic(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=Vp,coordinateGetter:i=g_,scrollBehavior:a="smooth"}=o,{code:c}=t;if(s.end.includes(c)){this.handleEnd(t);return}if(s.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:l}=r.current,f=l?{x:l.left,y:l.top}:Pt;this.referenceCoordinates||(this.referenceCoordinates=f);const d=i(t,{active:n,context:r.current,currentCoordinates:f});if(d){const p=Lr(d,f),h={x:0,y:0},{scrollableAncestors:y}=r.current;for(const m of y){const v=t.code,{isTop:b,isRight:w,isLeft:_,isBottom:S,maxScroll:C,minScroll:O}=zp(m),T=l_(m),P={x:Math.min(v===we.Right?T.right-T.width/2:T.right,Math.max(v===we.Right?T.left:T.left+T.width/2,d.x)),y:Math.min(v===we.Down?T.bottom-T.height/2:T.bottom,Math.max(v===we.Down?T.top:T.top+T.height/2,d.y))},N=v===we.Right&&!w||v===we.Left&&!_,F=v===we.Down&&!S||v===we.Up&&!b;if(N&&P.x!==d.x){const z=m.scrollLeft+p.x,R=v===we.Right&&z<=C.x||v===we.Left&&z>=O.x;if(R&&!p.y){m.scrollTo({left:z,behavior:a});return}R?h.x=m.scrollLeft-z:h.x=v===we.Right?m.scrollLeft-C.x:m.scrollLeft-O.x,h.x&&m.scrollBy({left:-h.x,behavior:a});break}else if(F&&P.y!==d.y){const z=m.scrollTop+p.y,R=v===we.Down&&z<=C.y||v===we.Up&&z>=O.y;if(R&&!p.x){m.scrollTo({top:z,behavior:a});return}R?h.y=m.scrollTop-z:h.y=v===we.Down?m.scrollTop-C.y:m.scrollTop-O.y,h.y&&m.scrollBy({top:-h.y,behavior:a});break}}this.handleMove(t,Wn(Lr(d,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}lc.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Vp,onActivation:o}=t,{active:s}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const a=s.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function ql(e){return!!(e&&"distance"in e)}function Kl(e){return!!(e&&"delay"in e)}class uc{constructor(t,n,r){var o;r===void 0&&(r=p_(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:i}=s;this.props=t,this.events=n,this.document=ar(i),this.documentListeners=new Sr(this.document),this.listeners=new Sr(r),this.windowListeners=new Sr(ht(i)),this.initialCoordinates=(o=Xa(s))!=null?o:Pt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(_t.Resize,this.handleCancel),this.windowListeners.add(_t.DragStart,Wl),this.windowListeners.add(_t.VisibilityChange,this.handleCancel),this.windowListeners.add(_t.ContextMenu,Wl),this.documentListeners.add(_t.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Kl(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(ql(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(_t.Click,m_,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(_t.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:i,options:{activationConstraint:a}}=s;if(!o)return;const c=(n=Xa(t))!=null?n:Pt,l=Lr(o,c);if(!r&&a){if(ql(a)){if(a.tolerance!=null&&fa(l,a.tolerance))return this.handleCancel();if(fa(l,a.distance))return this.handleStart()}if(Kl(a)&&fa(l,a.tolerance))return this.handleCancel();this.handlePending(a,l);return}t.cancelable&&t.preventDefault(),i(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===we.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const v_={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class dc extends uc{constructor(t){const{event:n}=t,r=ar(n.target);super(t,v_,r)}}dc.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const y_={move:{name:"mousemove"},end:{name:"mouseup"}};var ei;(function(e){e[e.RightClick=2]="RightClick"})(ei||(ei={}));class b_ extends uc{constructor(t){super(t,y_,ar(t.event.target))}}b_.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ei.RightClick?!1:(r?.({event:n}),!0)}}];const ha={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class w_ extends uc{constructor(t){super(t,ha)}static setup(){return window.addEventListener(ha.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(ha.move.name,t)};function t(){}}}w_.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var Cr;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Cr||(Cr={}));var es;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(es||(es={}));function x_(e){let{acceleration:t,activator:n=Cr.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:i=5,order:a=es.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:f,delta:d,threshold:p}=e;const h=__({delta:d,disabled:!s}),[y,m]=IE(),v=u.useRef({x:0,y:0}),b=u.useRef({x:0,y:0}),w=u.useMemo(()=>{switch(n){case Cr.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Cr.DraggableRect:return o}},[n,o,c]),_=u.useRef(null),S=u.useCallback(()=>{const O=_.current;if(!O)return;const T=v.current.x*b.current.x,P=v.current.y*b.current.y;O.scrollBy(T,P)},[]),C=u.useMemo(()=>a===es.TreeOrder?[...l].reverse():l,[a,l]);u.useEffect(()=>{if(!s||!l.length||!w){m();return}for(const O of C){if(r?.(O)===!1)continue;const T=l.indexOf(O),P=f[T];if(!P)continue;const{direction:N,speed:F}=c_(O,P,w,t,p);for(const z of["x","y"])h[z][N[z]]||(F[z]=0,N[z]=0);if(F.x>0||F.y>0){m(),_.current=O,y(S,i),v.current=F,b.current=N;return}}v.current={x:0,y:0},b.current={x:0,y:0},m()},[t,S,r,m,s,i,JSON.stringify(w),JSON.stringify(h),y,l,C,f,JSON.stringify(p)])}const E_={x:{[Ze.Backward]:!1,[Ze.Forward]:!1},y:{[Ze.Backward]:!1,[Ze.Forward]:!1}};function __(e){let{delta:t,disabled:n}=e;const r=Qa(t);return to(o=>{if(n||!r||!o)return E_;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Ze.Backward]:o.x[Ze.Backward]||s.x===-1,[Ze.Forward]:o.x[Ze.Forward]||s.x===1},y:{[Ze.Backward]:o.y[Ze.Backward]||s.y===-1,[Ze.Forward]:o.y[Ze.Forward]||s.y===1}}},[n,t,r])}function S_(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return to(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function C_(e,t){return u.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...s]},[]),[e,t])}var Fr;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Fr||(Fr={}));var ti;(function(e){e.Optimized="optimized"})(ti||(ti={}));const Gl=new Map;function R_(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,i]=u.useState(null),{frequency:a,measure:c,strategy:l}=o,f=u.useRef(e),d=v(),p=Dr(d),h=u.useCallback(function(b){b===void 0&&(b=[]),!p.current&&i(w=>w===null?b:w.concat(b.filter(_=>!w.includes(_))))},[p]),y=u.useRef(null),m=to(b=>{if(d&&!n)return Gl;if(!b||b===Gl||f.current!==e||s!=null){const w=new Map;for(let _ of e){if(!_)continue;if(s&&s.length>0&&!s.includes(_.id)&&_.rect.current){w.set(_.id,_.rect.current);continue}const S=_.node.current,C=S?new cc(c(S),S):null;_.rect.current=C,C&&w.set(_.id,C)}return w}return b},[e,s,n,d,c]);return u.useEffect(()=>{f.current=e},[e]),u.useEffect(()=>{d||h()},[n,d]),u.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),u.useEffect(()=>{d||typeof a!="number"||y.current!==null||(y.current=setTimeout(()=>{h(),y.current=null},a))},[a,d,h,...r]),{droppableRects:m,measureDroppableContainers:h,measuringScheduled:s!=null};function v(){switch(l){case Fr.Always:return!1;case Fr.BeforeDragging:return n;default:return!n}}}function Zp(e,t){return to(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function A_(e,t){return Zp(e,t)}function T_(e){let{callback:t,disabled:n}=e;const r=ac(t),o=u.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return u.useEffect(()=>()=>o?.disconnect(),[o]),o}function ks(e){let{callback:t,disabled:n}=e;const r=ac(t),o=u.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return u.useEffect(()=>()=>o?.disconnect(),[o]),o}function P_(e){return new cc(ir(e),e)}function Yl(e,t,n){t===void 0&&(t=P_);const[r,o]=u.useState(null);function s(){o(c=>{if(!e)return null;if(e.isConnected===!1){var l;return(l=c??n)!=null?l:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const i=T_({callback(c){if(e)for(const l of c){const{type:f,target:d}=l;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){s();break}}}}),a=ks({callback:s});return Ft(()=>{s(),e?(a?.observe(e),i?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),i?.disconnect())},[e]),r}function M_(e){const t=Zp(e);return jp(e,t)}const Ql=[];function N_(e){const t=u.useRef(e),n=to(r=>e?r&&r!==Ql&&e&&t.current&&e.parentNode===t.current.parentNode?r:Is(e):Ql,[e]);return u.useEffect(()=>{t.current=e},[e]),n}function O_(e){const[t,n]=u.useState(null),r=u.useRef(e),o=u.useCallback(s=>{const i=da(s.target);i&&n(a=>a?(a.set(i,Ja(i)),new Map(a)):null)},[]);return u.useEffect(()=>{const s=r.current;if(e!==s){i(s);const a=e.map(c=>{const l=da(c);return l?(l.addEventListener("scroll",o,{passive:!0}),[l,Ja(l)]):null}).filter(c=>c!=null);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(s)};function i(a){a.forEach(c=>{const l=da(c);l?.removeEventListener("scroll",o)})}},[o,e]),u.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>Wn(s,i),Pt):Up(e):Pt,[e,t])}function Xl(e,t){t===void 0&&(t=[]);const n=u.useRef(null);return u.useEffect(()=>{n.current=null},t),u.useEffect(()=>{const r=e!==Pt;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Lr(e,n.current):Pt}function I_(e){u.useEffect(()=>{if(!Os)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function k_(e,t){return u.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=i=>{s(i,t)},n},{}),[e,t])}function Wp(e){return u.useMemo(()=>e?o_(e):null,[e])}const Jl=[];function D_(e,t){t===void 0&&(t=ir);const[n]=e,r=Wp(n?ht(n):null),[o,s]=u.useState(Jl);function i(){s(()=>e.length?e.map(c=>Hp(c)?r:new cc(t(c),c)):Jl)}const a=ks({callback:i});return Ft(()=>{a?.disconnect(),i(),e.forEach(c=>a?.observe(c))},[e]),o}function L_(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return eo(t)?t:e}function j_(e){let{measure:t}=e;const[n,r]=u.useState(null),o=u.useCallback(l=>{for(const{target:f}of l)if(eo(f)){r(d=>{const p=t(f);return d?{...d,width:p.width,height:p.height}:p});break}},[t]),s=ks({callback:o}),i=u.useCallback(l=>{const f=L_(l);s?.disconnect(),f&&s?.observe(f),r(f?t(f):null)},[t,s]),[a,c]=Xo(i);return u.useMemo(()=>({nodeRef:a,rect:n,setRef:c}),[n,a,c])}const F_=[{sensor:dc,options:{}},{sensor:lc,options:{}}],B_={current:{}},To={draggable:{measure:Zl},droppable:{measure:Zl,strategy:Fr.WhileDragging,frequency:ti.Optimized},dragOverlay:{measure:ir}};class Rr extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const $_={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Rr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Jo},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:To,measureDroppableContainers:Jo,windowRect:null,measuringScheduled:!1},H_={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Jo,draggableNodes:new Map,over:null,measureDroppableContainers:Jo},Ds=u.createContext(H_),qp=u.createContext($_);function z_(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Rr}}}function U_(e,t){switch(t.type){case Ue.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ue.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Ue.DragEnd:case Ue.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ue.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Rr(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Ue.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const i=new Rr(e.droppable.containers);return i.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case Ue.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new Rr(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function V_(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=u.useContext(Ds),s=Qa(r),i=Qa(n?.id);return u.useEffect(()=>{if(!t&&!r&&s&&i!=null){if(!ic(s)||document.activeElement===s.target)return;const a=o.get(i);if(!a)return;const{activatorNode:c,node:l}=a;if(!c.current&&!l.current)return;requestAnimationFrame(()=>{for(const f of[c.current,l.current]){if(!f)continue;const d=LE(f);if(d){d.focus();break}}})}},[r,t,o,i,s]),null}function Z_(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function W_(e){return u.useMemo(()=>({draggable:{...To.draggable,...e?.draggable},droppable:{...To.droppable,...e?.droppable},dragOverlay:{...To.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function q_(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const s=u.useRef(!1),{x:i,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Ft(()=>{if(!i&&!a||!t){s.current=!1;return}if(s.current||!r)return;const l=t?.node.current;if(!l||l.isConnected===!1)return;const f=n(l),d=jp(f,r);if(i||(d.x=0),a||(d.y=0),s.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=Fp(l);p&&p.scrollBy({top:d.y,left:d.x})}},[t,i,a,r,n])}const Kp=u.createContext({...Pt,scaleX:1,scaleY:1});var en;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(en||(en={}));const K_=u.memo(function(t){var n,r,o,s;let{id:i,accessibility:a,autoScroll:c=!0,children:l,sensors:f=F_,collisionDetection:d=QE,measuring:p,modifiers:h,...y}=t;const m=u.useReducer(U_,void 0,z_),[v,b]=m,[w,_]=zE(),[S,C]=u.useState(en.Uninitialized),O=S===en.Initialized,{draggable:{active:T,nodes:P,translate:N},droppable:{containers:F}}=v,z=T!=null?P.get(T):null,R=u.useRef({initial:null,translated:null}),H=u.useMemo(()=>{var Ie;return T!=null?{id:T,data:(Ie=z?.data)!=null?Ie:B_,rect:R}:null},[T,z]),x=u.useRef(null),[I,$]=u.useState(null),[D,q]=u.useState(null),k=Dr(y,Object.values(y)),Y=no("DndDescribedBy",i),L=u.useMemo(()=>F.getEnabled(),[F]),j=W_(p),{droppableRects:K,measureDroppableContainers:G,measuringScheduled:Z}=R_(L,{dragging:O,dependencies:[N.x,N.y],config:j.droppable}),le=S_(P,T),te=u.useMemo(()=>D?Xa(D):null,[D]),Q=In(),ie=A_(le,j.draggable.measure);q_({activeNode:T!=null?P.get(T):null,config:Q.layoutShiftCompensation,initialRect:ie,measure:j.draggable.measure});const re=Yl(le,j.draggable.measure,ie),ce=Yl(le?le.parentElement:null),fe=u.useRef({activatorEvent:null,active:null,activeNode:le,collisionRect:null,collisions:null,droppableRects:K,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ve=F.getNodeFor((n=fe.current.over)==null?void 0:n.id),E=j_({measure:j.dragOverlay.measure}),J=(r=E.nodeRef.current)!=null?r:le,W=O?(o=E.rect)!=null?o:re:null,M=!!(E.nodeRef.current&&E.rect),A=M_(M?null:re),B=Wp(J?ht(J):null),ee=N_(O?ve??le:null),ne=D_(ee),U=Z_(h,{transform:{x:N.x-A.x,y:N.y-A.y,scaleX:1,scaleY:1},activatorEvent:D,active:H,activeNodeRect:re,containerNodeRect:ce,draggingNodeRect:W,over:fe.current.over,overlayNodeRect:E.rect,scrollableAncestors:ee,scrollableAncestorRects:ne,windowRect:B}),oe=te?Wn(te,N):null,ue=O_(ee),se=Xl(ue),ae=Xl(ue,[re]),ge=Wn(U,se),pe=W?e_(W,U):null,Ne=H&&pe?d({active:H,collisionRect:pe,droppableRects:K,droppableContainers:L,pointerCoordinates:oe}):null,tt=Lp(Ne,"id"),[Fe,nt]=u.useState(null),Oe=M?U:Wn(U,ae),Gt=XE(Oe,(s=Fe?.rect)!=null?s:null,re),Ot=u.useRef(null),rt=u.useCallback((Ie,$e)=>{let{sensor:me,options:Ae}=$e;if(x.current==null)return;const Ce=P.get(x.current);if(!Ce)return;const Te=Ie.nativeEvent,ot=new me({active:x.current,activeNode:Ce,event:Te,options:Ae,context:fe,onAbort(_e){if(!P.get(_e))return;const{onDragAbort:Be}=k.current,He={id:_e};Be?.(He),w({type:"onDragAbort",event:He})},onPending(_e,pt,Be,He){if(!P.get(_e))return;const{onDragPending:mt}=k.current,Ht={id:_e,constraint:pt,initialCoordinates:Be,offset:He};mt?.(Ht),w({type:"onDragPending",event:Ht})},onStart(_e){const pt=x.current;if(pt==null)return;const Be=P.get(pt);if(!Be)return;const{onDragStart:He}=k.current,Qt={activatorEvent:Te,active:{id:pt,data:Be.data,rect:R}};Zt.unstable_batchedUpdates(()=>{He?.(Qt),C(en.Initializing),b({type:Ue.DragStart,initialCoordinates:_e,active:pt}),w({type:"onDragStart",event:Qt}),$(Ot.current),q(Te)})},onMove(_e){b({type:Ue.DragMove,coordinates:_e})},onEnd:ke(Ue.DragEnd),onCancel:ke(Ue.DragCancel)});Ot.current=ot;function ke(_e){return async function(){const{active:Be,collisions:He,over:Qt,scrollAdjustedTranslate:mt}=fe.current;let Ht=null;if(Be&&mt){const{cancelDrop:ur}=k.current;Ht={activatorEvent:Te,active:Be,collisions:He,delta:mt,over:Qt},_e===Ue.DragEnd&&typeof ur=="function"&&await Promise.resolve(ur(Ht))&&(_e=Ue.DragCancel)}x.current=null,Zt.unstable_batchedUpdates(()=>{b({type:_e}),C(en.Uninitialized),nt(null),$(null),q(null),Ot.current=null;const ur=_e===Ue.DragEnd?"onDragEnd":"onDragCancel";if(Ht){const Fs=k.current[ur];Fs?.(Ht),w({type:ur,event:Ht})}})}}},[P]),On=u.useCallback((Ie,$e)=>(me,Ae)=>{const Ce=me.nativeEvent,Te=P.get(Ae);if(x.current!==null||!Te||Ce.dndKit||Ce.defaultPrevented)return;const ot={active:Te};Ie(me,$e.options,ot)===!0&&(Ce.dndKit={capturedBy:$e.sensor},x.current=Ae,rt(me,$e))},[P,rt]),Yt=C_(f,On);I_(f),Ft(()=>{re&&S===en.Initializing&&C(en.Initialized)},[re,S]),u.useEffect(()=>{const{onDragMove:Ie}=k.current,{active:$e,activatorEvent:me,collisions:Ae,over:Ce}=fe.current;if(!$e||!me)return;const Te={active:$e,activatorEvent:me,collisions:Ae,delta:{x:ge.x,y:ge.y},over:Ce};Zt.unstable_batchedUpdates(()=>{Ie?.(Te),w({type:"onDragMove",event:Te})})},[ge.x,ge.y]),u.useEffect(()=>{const{active:Ie,activatorEvent:$e,collisions:me,droppableContainers:Ae,scrollAdjustedTranslate:Ce}=fe.current;if(!Ie||x.current==null||!$e||!Ce)return;const{onDragOver:Te}=k.current,ot=Ae.get(tt),ke=ot&&ot.rect.current?{id:ot.id,rect:ot.rect.current,data:ot.data,disabled:ot.disabled}:null,_e={active:Ie,activatorEvent:$e,collisions:me,delta:{x:Ce.x,y:Ce.y},over:ke};Zt.unstable_batchedUpdates(()=>{nt(ke),Te?.(_e),w({type:"onDragOver",event:_e})})},[tt]),Ft(()=>{fe.current={activatorEvent:D,active:H,activeNode:le,collisionRect:pe,collisions:Ne,droppableRects:K,draggableNodes:P,draggingNode:J,draggingNodeRect:W,droppableContainers:F,over:Fe,scrollableAncestors:ee,scrollAdjustedTranslate:ge},R.current={initial:W,translated:pe}},[H,le,Ne,pe,P,J,W,K,F,Fe,ee,ge]),x_({...Q,delta:N,draggingRect:pe,pointerCoordinates:oe,scrollableAncestors:ee,scrollableAncestorRects:ne});const bt=u.useMemo(()=>({active:H,activeNode:le,activeNodeRect:re,activatorEvent:D,collisions:Ne,containerNodeRect:ce,dragOverlay:E,draggableNodes:P,droppableContainers:F,droppableRects:K,over:Fe,measureDroppableContainers:G,scrollableAncestors:ee,scrollableAncestorRects:ne,measuringConfiguration:j,measuringScheduled:Z,windowRect:B}),[H,le,re,D,Ne,ce,E,P,F,K,Fe,G,ee,ne,j,Z,B]),lr=u.useMemo(()=>({activatorEvent:D,activators:Yt,active:H,activeNodeRect:re,ariaDescribedById:{draggable:Y},dispatch:b,draggableNodes:P,over:Fe,measureDroppableContainers:G}),[D,Yt,H,re,b,Y,P,Fe,G]);return X.createElement(Ip.Provider,{value:_},X.createElement(Ds.Provider,{value:lr},X.createElement(qp.Provider,{value:bt},X.createElement(Kp.Provider,{value:Gt},l)),X.createElement(V_,{disabled:a?.restoreFocus===!1})),X.createElement(ZE,{...a,hiddenTextDescribedById:Y}));function In(){const Ie=I?.autoScrollEnabled===!1,$e=typeof c=="object"?c.enabled===!1:c===!1,me=O&&!Ie&&!$e;return typeof c=="object"?{...c,enabled:me}:{enabled:me}}}),G_=u.createContext(null),eu="button",Y_="Draggable";function Q_(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=no(Y_),{activators:i,activatorEvent:a,active:c,activeNodeRect:l,ariaDescribedById:f,draggableNodes:d,over:p}=u.useContext(Ds),{role:h=eu,roleDescription:y="draggable",tabIndex:m=0}=o??{},v=c?.id===t,b=u.useContext(v?Kp:G_),[w,_]=Xo(),[S,C]=Xo(),O=k_(i,t),T=Dr(n);Ft(()=>(d.set(t,{id:t,key:s,node:w,activatorNode:S,data:T}),()=>{const N=d.get(t);N&&N.key===s&&d.delete(t)}),[d,t]);const P=u.useMemo(()=>({role:h,tabIndex:m,"aria-disabled":r,"aria-pressed":v&&h===eu?!0:void 0,"aria-roledescription":y,"aria-describedby":f.draggable}),[r,h,m,v,y,f.draggable]);return{active:c,activatorEvent:a,activeNodeRect:l,attributes:P,isDragging:v,listeners:r?void 0:O,node:w,over:p,setNodeRef:_,setActivatorNodeRef:C,transform:b}}function X_(){return u.useContext(qp)}const J_="Droppable",eS={timeout:25};function tS(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=no(J_),{active:i,dispatch:a,over:c,measureDroppableContainers:l}=u.useContext(Ds),f=u.useRef({disabled:n}),d=u.useRef(!1),p=u.useRef(null),h=u.useRef(null),{disabled:y,updateMeasurementsFor:m,timeout:v}={...eS,...o},b=Dr(m??r),w=u.useCallback(()=>{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{l(Array.isArray(b.current)?b.current:[b.current]),h.current=null},v)},[v]),_=ks({callback:w,disabled:y||!i}),S=u.useCallback((P,N)=>{_&&(N&&(_.unobserve(N),d.current=!1),P&&_.observe(P))},[_]),[C,O]=Xo(S),T=Dr(t);return u.useEffect(()=>{!_||!C.current||(_.disconnect(),d.current=!1,_.observe(C.current))},[C,_]),u.useEffect(()=>(a({type:Ue.RegisterDroppable,element:{id:r,key:s,disabled:n,node:C,rect:p,data:T}}),()=>a({type:Ue.UnregisterDroppable,key:s,id:r})),[r]),u.useEffect(()=>{n!==f.current.disabled&&(a({type:Ue.SetDroppableDisabled,id:r,key:s,disabled:n}),f.current.disabled=n)},[r,s,n,a]),{active:i,rect:p,isOver:c?.id===r,node:C,over:c,setNodeRef:O}}const MC=e=>{let{transform:t}=e;return{...t,y:0}},nS=e=>{let{transform:t}=e;return{...t,x:0}};function Gp(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function rS(e,t){return e.reduce((n,r,o)=>{const s=t.get(r);return s&&(n[o]=s),n},Array(e.length))}function mo(e){return e!==null&&e>=0}function oS(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function sS(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const go={scaleX:1,scaleY:1},NC=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:s,index:i}=e;const a=(t=n[o])!=null?t:r;if(!a)return null;const c=aS(n,i,o);if(i===o){const l=n[s];return l?{x:o<s?l.left+l.width-(a.left+a.width):l.left-a.left,y:0,...go}:null}return i>o&&i<=s?{x:-a.width-c,y:0,...go}:i<o&&i>=s?{x:a.width+c,y:0,...go}:{x:0,y:0,...go}};function aS(e,t,n){const r=e[t],o=e[t-1],s=e[t+1];return!r||!o&&!s?0:n<t?o?r.left-(o.left+o.width):s.left-(r.left+r.width):s?s.left-(r.left+r.width):r.left-(o.left+o.width)}const Yp=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const s=Gp(t,r,n),i=t[o],a=s[o];return!a||!i?null:{x:a.left-i.left,y:a.top-i.top,scaleX:a.width/i.width,scaleY:a.height/i.height}},vo={scaleX:1,scaleY:1},iS=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:s,overIndex:i}=e;const a=(t=s[n])!=null?t:r;if(!a)return null;if(o===n){const l=s[i];return l?{x:0,y:n<i?l.top+l.height-(a.top+a.height):l.top-a.top,...vo}:null}const c=cS(s,o,n);return o>n&&o<=i?{x:0,y:-a.height-c,...vo}:o<n&&o>=i?{x:0,y:a.height+c,...vo}:{x:0,y:0,...vo}};function cS(e,t,n){const r=e[t],o=e[t-1],s=e[t+1];return r?n<t?o?r.top-(o.top+o.height):s?s.top-(r.top+r.height):0:s?s.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}const Qp="Sortable",Xp=X.createContext({activeIndex:-1,containerId:Qp,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Yp,disabled:{draggable:!1,droppable:!1}});function lS(e){let{children:t,id:n,items:r,strategy:o=Yp,disabled:s=!1}=e;const{active:i,dragOverlay:a,droppableRects:c,over:l,measureDroppableContainers:f}=X_(),d=no(Qp,n),p=a.rect!==null,h=u.useMemo(()=>r.map(O=>typeof O=="object"&&"id"in O?O.id:O),[r]),y=i!=null,m=i?h.indexOf(i.id):-1,v=l?h.indexOf(l.id):-1,b=u.useRef(h),w=!oS(h,b.current),_=v!==-1&&m===-1||w,S=sS(s);Ft(()=>{w&&y&&f(h)},[w,h,y,f]),u.useEffect(()=>{b.current=h},[h]);const C=u.useMemo(()=>({activeIndex:m,containerId:d,disabled:S,disableTransforms:_,items:h,overIndex:v,useDragOverlay:p,sortedRects:rS(h,c),strategy:o}),[m,d,S.draggable,S.droppable,_,h,v,c,p,o]);return X.createElement(Xp.Provider,{value:C},t)}const uS=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Gp(n,r,o).indexOf(t)},dS=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:s,newIndex:i,previousItems:a,previousContainerId:c,transition:l}=e;return!l||!r||a!==s&&o===i?!1:n?!0:i!==o&&t===c},fS={duration:200,easing:"ease"},Jp="transform",hS=jr.Transition.toString({property:Jp,duration:0,easing:"linear"}),pS={roleDescription:"sortable"};function mS(e){let{disabled:t,index:n,node:r,rect:o}=e;const[s,i]=u.useState(null),a=u.useRef(n);return Ft(()=>{if(!t&&n!==a.current&&r.current){const c=o.current;if(c){const l=ir(r.current,{ignoreTransform:!0}),f={x:c.left-l.left,y:c.top-l.top,scaleX:c.width/l.width,scaleY:c.height/l.height};(f.x||f.y)&&i(f)}}n!==a.current&&(a.current=n)},[t,n,r,o]),u.useEffect(()=>{s&&i(null)},[s]),s}function gS(e){let{animateLayoutChanges:t=dS,attributes:n,disabled:r,data:o,getNewIndex:s=uS,id:i,strategy:a,resizeObserverConfig:c,transition:l=fS}=e;const{items:f,containerId:d,activeIndex:p,disabled:h,disableTransforms:y,sortedRects:m,overIndex:v,useDragOverlay:b,strategy:w}=u.useContext(Xp),_=vS(r,h),S=f.indexOf(i),C=u.useMemo(()=>({sortable:{containerId:d,index:S,items:f},...o}),[d,o,S,f]),O=u.useMemo(()=>f.slice(f.indexOf(i)),[f,i]),{rect:T,node:P,isOver:N,setNodeRef:F}=tS({id:i,data:C,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...c}}),{active:z,activatorEvent:R,activeNodeRect:H,attributes:x,setNodeRef:I,listeners:$,isDragging:D,over:q,setActivatorNodeRef:k,transform:Y}=Q_({id:i,data:C,attributes:{...pS,...n},disabled:_.draggable}),L=OE(F,I),j=!!z,K=j&&!y&&mo(p)&&mo(v),G=!b&&D,Z=G&&K?Y:null,te=K?Z??(a??w)({rects:m,activeNodeRect:H,activeIndex:p,overIndex:v,index:S}):null,Q=mo(p)&&mo(v)?s({id:i,items:f,activeIndex:p,overIndex:v}):S,ie=z?.id,re=u.useRef({activeId:ie,items:f,newIndex:Q,containerId:d}),ce=f!==re.current.items,fe=t({active:z,containerId:d,isDragging:D,isSorting:j,id:i,index:S,items:f,newIndex:re.current.newIndex,previousItems:re.current.items,previousContainerId:re.current.containerId,transition:l,wasDragging:re.current.activeId!=null}),ve=mS({disabled:!fe,index:S,node:P,rect:T});return u.useEffect(()=>{j&&re.current.newIndex!==Q&&(re.current.newIndex=Q),d!==re.current.containerId&&(re.current.containerId=d),f!==re.current.items&&(re.current.items=f)},[j,Q,d,f]),u.useEffect(()=>{if(ie===re.current.activeId)return;if(ie!=null&&re.current.activeId==null){re.current.activeId=ie;return}const J=setTimeout(()=>{re.current.activeId=ie},50);return()=>clearTimeout(J)},[ie]),{active:z,activeIndex:p,attributes:x,data:C,rect:T,index:S,newIndex:Q,items:f,isOver:N,isSorting:j,isDragging:D,listeners:$,node:P,overIndex:v,over:q,setNodeRef:L,setActivatorNodeRef:k,setDroppableNodeRef:F,setDraggableNodeRef:I,transform:ve??te,transition:E()};function E(){if(ve||ce&&re.current.newIndex===S)return hS;if(!(G&&!ic(R)||!l)&&(j||fe))return jr.Transition.toString({...l,property:Jp})}}function vS(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function ts(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const yS=[we.Down,we.Right,we.Up,we.Left],bS=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:s,over:i,scrollableAncestors:a}}=t;if(yS.includes(e.code)){if(e.preventDefault(),!n||!r)return;const c=[];s.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=o.get(d.id);if(p)switch(e.code){case we.Down:r.top<p.top&&c.push(d);break;case we.Up:r.top>p.top&&c.push(d);break;case we.Left:r.left>p.left&&c.push(d);break;case we.Right:r.left<p.left&&c.push(d);break}});const l=GE({collisionRect:r,droppableRects:o,droppableContainers:c});let f=Lp(l,"id");if(f===i?.id&&l.length>1&&(f=l[1].id),f!=null){const d=s.get(n.id),p=s.get(f),h=p?o.get(p.id):null,y=p?.node.current;if(y&&h&&d&&p){const v=Is(y).some((O,T)=>a[T]!==O),b=e1(d,p),w=wS(d,p),_=v||!b?{x:0,y:0}:{x:w?r.width-h.width:0,y:w?r.height-h.height:0},S={x:h.left,y:h.top};return _.x&&_.y?S:Lr(S,_)}}}};function e1(e,t){return!ts(e)||!ts(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function wS(e,t){return!ts(e)||!ts(t)||!e1(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const xS=new Set(["content","order","layout","properties"]),ES=`query FetchNotes(
|
|
44
|
+
$searchFilter: SearchFilterInput,
|
|
45
|
+
$pagination: PaginationInput
|
|
46
|
+
) {
|
|
47
|
+
allNotes(
|
|
48
|
+
searchFilter: $searchFilter,
|
|
49
|
+
pagination: $pagination
|
|
50
|
+
) {
|
|
51
|
+
totalCount
|
|
52
|
+
notes {
|
|
53
|
+
__NOTE_ADDITIONAL_FIELDS__ id
|
|
54
|
+
title
|
|
55
|
+
pinned
|
|
56
|
+
createdAt
|
|
57
|
+
updatedAt
|
|
58
|
+
tags {
|
|
59
|
+
id
|
|
60
|
+
name
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}`,_S=e=>{if(!e||e.length===0)return"";const t=Array.from(new Set(e.filter(n=>xS.has(n))));return t.length===0?"":t.map(n=>n==="properties"?` properties {
|
|
65
|
+
key
|
|
66
|
+
name
|
|
67
|
+
value
|
|
68
|
+
valueType
|
|
69
|
+
option { id label value color order }
|
|
70
|
+
createdAt
|
|
71
|
+
updatedAt
|
|
72
|
+
}`:" "+n).join(`
|
|
73
|
+
`)+`
|
|
74
|
+
`};function t1({limit:e=25,offset:t=0,query:n="",sortBy:r,sortOrder:o,pinnedFirst:s,fields:i}={}){const a=_S(i),c=ES.replace("__NOTE_ADDITIONAL_FIELDS__",a);return Pe(c,{searchFilter:{query:n,sortBy:r,sortOrder:o,pinnedFirst:s},pagination:{limit:e,offset:t}})}function OC({query:e="",limit:t=25,offset:n=0}={}){return Pe(`query FetchTagNotes(
|
|
75
|
+
$searchFilter: SearchFilterInput,
|
|
76
|
+
$pagination: PaginationInput
|
|
77
|
+
) {
|
|
78
|
+
tagNotes(
|
|
79
|
+
searchFilter: $searchFilter,
|
|
80
|
+
pagination: $pagination
|
|
81
|
+
) {
|
|
82
|
+
totalCount
|
|
83
|
+
notes {
|
|
84
|
+
id
|
|
85
|
+
title
|
|
86
|
+
pinned
|
|
87
|
+
tags {
|
|
88
|
+
id
|
|
89
|
+
name
|
|
90
|
+
}
|
|
91
|
+
createdAt
|
|
92
|
+
updatedAt
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}`,{searchFilter:{query:e},pagination:{limit:t,offset:n}})}function IC(e){return Pe(`query FetchNote($id: ID!) {
|
|
96
|
+
note(id: $id) {
|
|
97
|
+
title
|
|
98
|
+
pinned
|
|
99
|
+
layout
|
|
100
|
+
content
|
|
101
|
+
createdAt
|
|
102
|
+
updatedAt
|
|
103
|
+
properties {
|
|
104
|
+
key
|
|
105
|
+
name
|
|
106
|
+
value
|
|
107
|
+
valueType
|
|
108
|
+
option { id label value color order }
|
|
109
|
+
createdAt
|
|
110
|
+
updatedAt
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}`,{id:e})}function SS(e){return Pe(`query FetchBackReferences($id: ID!) {
|
|
114
|
+
backReferences(id: $id) {
|
|
115
|
+
id
|
|
116
|
+
title
|
|
117
|
+
}
|
|
118
|
+
}`,{id:e})}function kC(e){return Pe(`query FetchImageNotes($src: String!) {
|
|
119
|
+
imageNotes(src: $src) {
|
|
120
|
+
id
|
|
121
|
+
title
|
|
122
|
+
createdAt
|
|
123
|
+
updatedAt
|
|
124
|
+
}
|
|
125
|
+
}`,{src:e})}function DC({query:e="",limit:t=50,offset:n=0}={}){return Pe(`query FetchNotePropertyKeys($query: String, $pagination: PaginationInput) {
|
|
126
|
+
notePropertyKeys(query: $query, pagination: $pagination) {
|
|
127
|
+
totalCount
|
|
128
|
+
keys {
|
|
129
|
+
key
|
|
130
|
+
name
|
|
131
|
+
valueType
|
|
132
|
+
noteCount
|
|
133
|
+
options { id label value color order }
|
|
134
|
+
updatedAt
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}`,{...e?{query:e}:{},pagination:{limit:t,offset:n}})}function LC(e){return Pe(`mutation CreateNotePropertyKey($input: NotePropertyDefinitionInput!) {
|
|
138
|
+
createNotePropertyKey(input: $input) {
|
|
139
|
+
key
|
|
140
|
+
name
|
|
141
|
+
valueType
|
|
142
|
+
noteCount
|
|
143
|
+
options { id label value color order }
|
|
144
|
+
updatedAt
|
|
145
|
+
}
|
|
146
|
+
}`,{input:e})}function jC({key:e,...t}){return Pe(`mutation UpdateNotePropertyKey($key: String!, $input: NotePropertyDefinitionUpdateInput!) {
|
|
147
|
+
updateNotePropertyKey(key: $key, input: $input) {
|
|
148
|
+
key
|
|
149
|
+
name
|
|
150
|
+
valueType
|
|
151
|
+
noteCount
|
|
152
|
+
options { id label value color order }
|
|
153
|
+
updatedAt
|
|
154
|
+
}
|
|
155
|
+
}`,{key:e,input:t})}function FC({key:e,confirmImpact:t}){return Pe(`mutation DeleteNotePropertyKey($key: String!, $confirmImpact: Boolean) {
|
|
156
|
+
deleteNotePropertyKey(key: $key, confirmImpact: $confirmImpact) {
|
|
157
|
+
key
|
|
158
|
+
name
|
|
159
|
+
valueType
|
|
160
|
+
affectedNoteCount
|
|
161
|
+
deleted
|
|
162
|
+
}
|
|
163
|
+
}`,{key:e,...t?{confirmImpact:!0}:{}})}function CS(e){return Pe(`mutation CreateNote($note: NoteInput!) {
|
|
164
|
+
createNote(note: $note) {
|
|
165
|
+
id
|
|
166
|
+
}
|
|
167
|
+
}`,{note:e})}function BC({id:e,set:t=[],deleteKeys:n=[],editSessionId:r,expectedUpdatedAt:o,force:s}){return Pe(`mutation UpdateNoteProperties(
|
|
168
|
+
$id: ID!,
|
|
169
|
+
$patch: NotePropertiesPatchInput!,
|
|
170
|
+
$editSessionId: String,
|
|
171
|
+
$expectedUpdatedAt: String!,
|
|
172
|
+
$force: Boolean
|
|
173
|
+
) {
|
|
174
|
+
updateNoteProperties(
|
|
175
|
+
id: $id,
|
|
176
|
+
patch: $patch,
|
|
177
|
+
editSessionId: $editSessionId,
|
|
178
|
+
expectedUpdatedAt: $expectedUpdatedAt,
|
|
179
|
+
force: $force
|
|
180
|
+
) {
|
|
181
|
+
id
|
|
182
|
+
updatedAt
|
|
183
|
+
properties {
|
|
184
|
+
key
|
|
185
|
+
name
|
|
186
|
+
value
|
|
187
|
+
valueType
|
|
188
|
+
option { id label value color order }
|
|
189
|
+
createdAt
|
|
190
|
+
updatedAt
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}`,{id:e,patch:{...t.length>0?{set:t}:{},...n.length>0?{deleteKeys:n}:{}},...r?{editSessionId:r}:{},expectedUpdatedAt:o,...s?{force:!0}:{}})}const $C=({id:e,editSessionId:t,expectedUpdatedAt:n,force:r,...o})=>Pe(`mutation UpdateNote($id: ID!, $note: NoteInput!, $editSessionId: String, $expectedUpdatedAt: String, $force: Boolean) {
|
|
194
|
+
updateNote(id: $id, note: $note, editSessionId: $editSessionId, expectedUpdatedAt: $expectedUpdatedAt, force: $force) {
|
|
195
|
+
id
|
|
196
|
+
title
|
|
197
|
+
updatedAt
|
|
198
|
+
}
|
|
199
|
+
}`,{id:e,note:o,...t?{editSessionId:t}:{},...n?{expectedUpdatedAt:n}:{},...r?{force:!0}:{}});function HC(e,t=10){return Pe(`query FetchNoteSnapshots($id: ID!, $limit: Int) {
|
|
200
|
+
noteSnapshots(id: $id, limit: $limit) {
|
|
201
|
+
id
|
|
202
|
+
title
|
|
203
|
+
contentPreview
|
|
204
|
+
createdAt
|
|
205
|
+
meta {
|
|
206
|
+
entrypoint
|
|
207
|
+
label
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}`,{id:e,limit:t})}function zC(e){return Pe(`query FetchNoteSnapshot($id: ID!) {
|
|
211
|
+
noteSnapshot(id: $id) {
|
|
212
|
+
id
|
|
213
|
+
title
|
|
214
|
+
contentPreview
|
|
215
|
+
contentAsMarkdown
|
|
216
|
+
createdAt
|
|
217
|
+
meta {
|
|
218
|
+
entrypoint
|
|
219
|
+
label
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}`,{id:e})}function UC(e,t="current"){return Pe(`query FetchNoteSnapshotDiff($id: ID!, $target: NoteSnapshotDiffTarget, $contextLines: Int) {
|
|
223
|
+
noteSnapshotDiff(id: $id, target: $target, contextLines: $contextLines) {
|
|
224
|
+
noteId
|
|
225
|
+
mode
|
|
226
|
+
before {
|
|
227
|
+
kind
|
|
228
|
+
id
|
|
229
|
+
title
|
|
230
|
+
createdAt
|
|
231
|
+
updatedAt
|
|
232
|
+
meta {
|
|
233
|
+
entrypoint
|
|
234
|
+
label
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
after {
|
|
238
|
+
kind
|
|
239
|
+
id
|
|
240
|
+
title
|
|
241
|
+
createdAt
|
|
242
|
+
updatedAt
|
|
243
|
+
meta {
|
|
244
|
+
entrypoint
|
|
245
|
+
label
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
diff {
|
|
249
|
+
markdown
|
|
250
|
+
changedLineCount
|
|
251
|
+
changedCharCount
|
|
252
|
+
beforeMarkdownSha256
|
|
253
|
+
afterMarkdownSha256
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}`,{id:e,target:t.toUpperCase(),contextLines:3})}function VC(e){return Pe(`mutation RestoreNoteSnapshot($id: ID!) {
|
|
257
|
+
restoreNoteSnapshot(id: $id) {
|
|
258
|
+
id
|
|
259
|
+
title
|
|
260
|
+
pinned
|
|
261
|
+
layout
|
|
262
|
+
content
|
|
263
|
+
updatedAt
|
|
264
|
+
}
|
|
265
|
+
}`,{id:e})}function ZC({limit:e=25,offset:t=0}={}){return Pe(`query FetchTrashedNotes($pagination: PaginationInput) {
|
|
266
|
+
trashedNotes(pagination: $pagination) {
|
|
267
|
+
totalCount
|
|
268
|
+
notes {
|
|
269
|
+
id
|
|
270
|
+
title
|
|
271
|
+
createdAt
|
|
272
|
+
updatedAt
|
|
273
|
+
deletedAt
|
|
274
|
+
contentPreview
|
|
275
|
+
pinned
|
|
276
|
+
order
|
|
277
|
+
layout
|
|
278
|
+
tagNames
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}`,{pagination:{limit:e,offset:t}})}function WC(e){return Pe(`query FetchTrashedNote($id: ID!) {
|
|
282
|
+
trashedNote(id: $id) {
|
|
283
|
+
id
|
|
284
|
+
title
|
|
285
|
+
createdAt
|
|
286
|
+
updatedAt
|
|
287
|
+
deletedAt
|
|
288
|
+
contentPreview
|
|
289
|
+
contentAsMarkdown
|
|
290
|
+
pinned
|
|
291
|
+
order
|
|
292
|
+
layout
|
|
293
|
+
tagNames
|
|
294
|
+
}
|
|
295
|
+
}`,{id:e})}function qC(e){return Pe(`mutation RestoreTrashedNote($id: ID!) {
|
|
296
|
+
restoreTrashedNote(id: $id) {
|
|
297
|
+
id
|
|
298
|
+
title
|
|
299
|
+
pinned
|
|
300
|
+
layout
|
|
301
|
+
content
|
|
302
|
+
updatedAt
|
|
303
|
+
}
|
|
304
|
+
}`,{id:e})}function KC(e){return Pe(`mutation PurgeTrashedNote($id: ID!) {
|
|
305
|
+
purgeTrashedNote(id: $id)
|
|
306
|
+
}`,{id:e})}function RS(e,t){return Pe(`mutation PinNote($id: ID!, $pinned: Boolean!) {
|
|
307
|
+
pinNote(id: $id, pinned: $pinned) {
|
|
308
|
+
id
|
|
309
|
+
title
|
|
310
|
+
pinned
|
|
311
|
+
createdAt
|
|
312
|
+
updatedAt
|
|
313
|
+
}
|
|
314
|
+
}`,{id:e,pinned:t})}function AS(e){return Pe(`mutation DeleteNote($id: ID!) {
|
|
315
|
+
deleteNote(id: $id)
|
|
316
|
+
}`,{id:e})}function TS(e){return Pe(`mutation ReorderNotes($notes: [NoteOrderInput!]!) {
|
|
317
|
+
reorderNotes(notes: $notes) {
|
|
318
|
+
id
|
|
319
|
+
order
|
|
320
|
+
}
|
|
321
|
+
}`,{notes:e})}function GC(){return Pe(`query FetchNoteGraph {
|
|
322
|
+
noteGraph {
|
|
323
|
+
nodes {
|
|
324
|
+
id
|
|
325
|
+
title
|
|
326
|
+
connections
|
|
327
|
+
}
|
|
328
|
+
links {
|
|
329
|
+
source
|
|
330
|
+
target
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}`)}const PS=e=>{const{data:t}=Ku({queryKey:Me.notes.list(e.searchParams),async queryFn(){const n=await t1(e.searchParams);if(n.type==="error")throw n;return n.allNotes}});return e.render(t)},MS=e=>{const{data:t}=Ku({queryKey:Me.notes.pinned(),async queryFn(){const n=await Pe(`
|
|
334
|
+
query FetchPinnedNotes {
|
|
335
|
+
pinnedNotes {
|
|
336
|
+
id
|
|
337
|
+
title
|
|
338
|
+
order
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
`);if(n.type==="error")throw n;return n.pinnedNotes}});return g.jsx(g.Fragment,{children:e.render(t)})},NS="focus-ring-soft flex h-8 w-8 items-center justify-center rounded-[10px] text-fg-tertiary opacity-70 outline-none transition-colors hover:bg-hover-subtle hover:text-fg-default hover:opacity-100 focus-visible:opacity-100 active:cursor-grabbing touch-none",OS="focus-ring-soft block truncate rounded-[10px] px-1.5 py-1 outline-none transition-colors",IS=(e,t,n)=>{if(t===n)return null;const r=e.findIndex(a=>a.id===t),o=e.findIndex(a=>a.id===n);if(r<0||o<0)return null;const s=[...e],[i]=s.splice(r,1);return i?(s.splice(o,0,i),{nextItems:s,orders:s.map((a,c)=>({id:a.id,order:c}))}):null};function kS({id:e,title:t,isActive:n=!1,children:r}){const{attributes:o,listeners:s,setNodeRef:i,setActivatorNodeRef:a,transform:c,transition:l,isDragging:f}=gS({id:e}),d={transform:jr.Transform.toString(c),transition:l,opacity:f?.5:1};return g.jsxs("div",{ref:i,style:d,className:xe("group flex min-h-[38px] items-center gap-1.5 rounded-[12px] px-1.5 py-1 transition-colors",n?"bg-hover-subtle":"hover:bg-hover-subtle/70"),children:[g.jsx("button",{type:"button",ref:a,"aria-label":`Reorder note ${t??"Untitled"}`,title:"Drag to reorder",...o,...s,className:xe(NS,f?"cursor-grabbing":"cursor-grab"),children:g.jsx(oy,{className:"size-4"})}),g.jsx(Re,{as:"div",truncate:!0,variant:"meta",weight:"medium",className:"min-w-0 flex-1",children:r})]})}function DS({notes:e,pathname:t,pinnedItems:n,setPinnedItems:r,handleDragEnd:o,sensors:s}){u.useEffect(()=>{r(e)},[e,r]);const i=n.length>0?n:e;return i.length===0?null:g.jsx(K_,{sensors:s,collisionDetection:KE,onDragEnd:o,modifiers:[nS],children:g.jsx(lS,{items:i.map(a=>a.id),strategy:iS,children:i.map(a=>g.jsx(kS,{id:a.id,title:a.title||"Untitled",isActive:t===`/${a.id}`,children:g.jsx(Wt,{"aria-current":t===`/${a.id}`?"page":void 0,className:xe(OS,t===`/${a.id}`?"text-fg-default":"text-fg-secondary hover:text-fg-default"),to:or,params:{id:a.id},children:a.title||"Untitled"})},a.id))})})}const LS=()=>{const e=ds({select:a=>a.pathname}),t=er(),[n,r]=u.useState([]),o=s2({mutationFn:TS,onSuccess:()=>{t.invalidateQueries({queryKey:Me.notes.pinned(),exact:!0})}}),s=WE(zl(dc,{activationConstraint:{distance:8}}),zl(lc,{coordinateGetter:bS})),i=a=>{const{active:c,over:l}=a;l&&c.id!==l.id&&r(f=>{const d=IS(f,String(c.id),String(l.id));return d?(o.mutate(d.orders),d.nextItems):f})};return g.jsx("div",{className:"border-l border-border-subtle/70 pl-1.5",children:g.jsx(Cp,{fallback:g.jsxs("div",{className:"space-y-1",children:[g.jsx(Lt,{height:"40px",opacity:.4}),g.jsx(Lt,{height:"40px",opacity:.4})]}),errorTitle:"Failed to load pinned notes",errorDescription:"Retry loading the pinned note list.",renderError:({error:a,retry:c})=>g.jsx(rc,{title:"Failed to load pinned notes",description:"Retry loading the pinned note list.",error:a,onRetry:c,showBackAction:!1,showHomeAction:!1}),children:g.jsx(MS,{render:a=>a.length>0?g.jsx(DS,{notes:a,pathname:e,pinnedItems:n,setPinnedItems:r,handleDragEnd:i,sensors:s}):g.jsx(Re,{as:"div",variant:"meta",tone:"secondary",className:"px-2 py-2.5 leading-6",children:"Pin a note from the note toolbar to keep it here."})})})})},jS=()=>g.jsx("section",{className:"p-3 pt-0","aria-label":"Pinned notes",children:g.jsx(LS,{})});function yo(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pa={exports:{}};var tu;function FS(){return tu||(tu=1,(function(e,t){(function(n){e.exports=n()})(function(){return(function n(r,o,s){function i(l,f){if(!o[l]){if(!r[l]){var d=typeof yo=="function"&&yo;if(!f&&d)return d(l,!0);if(a)return a(l,!0);var p=new Error("Cannot find module '"+l+"'");throw p.code="MODULE_NOT_FOUND",p}var h=o[l]={exports:{}};r[l][0].call(h.exports,function(y){var m=r[l][1][y];return i(m||y)},h,h.exports,n,r,o,s)}return o[l].exports}for(var a=typeof yo=="function"&&yo,c=0;c<s.length;c++)i(s[c]);return i})({1:[function(n,r,o){var s=n("./utils"),i=n("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.encode=function(c){for(var l,f,d,p,h,y,m,v=[],b=0,w=c.length,_=w,S=s.getTypeOf(c)!=="string";b<c.length;)_=w-b,d=S?(l=c[b++],f=b<w?c[b++]:0,b<w?c[b++]:0):(l=c.charCodeAt(b++),f=b<w?c.charCodeAt(b++):0,b<w?c.charCodeAt(b++):0),p=l>>2,h=(3&l)<<4|f>>4,y=1<_?(15&f)<<2|d>>6:64,m=2<_?63&d:64,v.push(a.charAt(p)+a.charAt(h)+a.charAt(y)+a.charAt(m));return v.join("")},o.decode=function(c){var l,f,d,p,h,y,m=0,v=0,b="data:";if(c.substr(0,b.length)===b)throw new Error("Invalid base64 input, it looks like a data url.");var w,_=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===a.charAt(64)&&_--,c.charAt(c.length-2)===a.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(w=i.uint8array?new Uint8Array(0|_):new Array(0|_);m<c.length;)l=a.indexOf(c.charAt(m++))<<2|(p=a.indexOf(c.charAt(m++)))>>4,f=(15&p)<<4|(h=a.indexOf(c.charAt(m++)))>>2,d=(3&h)<<6|(y=a.indexOf(c.charAt(m++))),w[v++]=l,h!==64&&(w[v++]=f),y!==64&&(w[v++]=d);return w}},{"./support":30,"./utils":32}],2:[function(n,r,o){var s=n("./external"),i=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function l(f,d,p,h,y){this.compressedSize=f,this.uncompressedSize=d,this.crc32=p,this.compression=h,this.compressedContent=y}l.prototype={getContentWorker:function(){var f=new i(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),d=this;return f.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),f},getCompressedWorker:function(){return new i(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(f,d,p){return f.pipe(new a).pipe(new c("uncompressedSize")).pipe(d.compressWorker(p)).pipe(new c("compressedSize")).withStreamInfo("compression",d)},r.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,o){var s=n("./stream/GenericWorker");o.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},o.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,o){var s=n("./utils"),i=(function(){for(var a,c=[],l=0;l<256;l++){a=l;for(var f=0;f<8;f++)a=1&a?3988292384^a>>>1:a>>>1;c[l]=a}return c})();r.exports=function(a,c){return a!==void 0&&a.length?s.getTypeOf(a)!=="string"?(function(l,f,d,p){var h=i,y=p+d;l^=-1;for(var m=p;m<y;m++)l=l>>>8^h[255&(l^f[m])];return-1^l})(0|c,a,a.length,0):(function(l,f,d,p){var h=i,y=p+d;l^=-1;for(var m=p;m<y;m++)l=l>>>8^h[255&(l^f.charCodeAt(m))];return-1^l})(0|c,a,a.length,0):0}},{"./utils":32}],5:[function(n,r,o){o.base64=!1,o.binary=!1,o.dir=!1,o.createFolders=!0,o.date=null,o.compression=null,o.compressionOptions=null,o.comment=null,o.unixPermissions=null,o.dosPermissions=null},{}],6:[function(n,r,o){var s=null;s=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:s}},{lie:37}],7:[function(n,r,o){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=n("pako"),a=n("./utils"),c=n("./stream/GenericWorker"),l=s?"uint8array":"array";function f(d,p){c.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=p,this.meta={}}o.magic="\b\0",a.inherits(f,c),f.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(l,d.data),!1)},f.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},f.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},f.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(p){d.push({data:p,meta:d.meta})}},o.compressWorker=function(d){return new f("Deflate",d)},o.uncompressWorker=function(){return new f("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,o){function s(h,y){var m,v="";for(m=0;m<y;m++)v+=String.fromCharCode(255&h),h>>>=8;return v}function i(h,y,m,v,b,w){var _,S,C=h.file,O=h.compression,T=w!==l.utf8encode,P=a.transformTo("string",w(C.name)),N=a.transformTo("string",l.utf8encode(C.name)),F=C.comment,z=a.transformTo("string",w(F)),R=a.transformTo("string",l.utf8encode(F)),H=N.length!==C.name.length,x=R.length!==F.length,I="",$="",D="",q=C.dir,k=C.date,Y={crc32:0,compressedSize:0,uncompressedSize:0};y&&!m||(Y.crc32=h.crc32,Y.compressedSize=h.compressedSize,Y.uncompressedSize=h.uncompressedSize);var L=0;y&&(L|=8),T||!H&&!x||(L|=2048);var j=0,K=0;q&&(j|=16),b==="UNIX"?(K=798,j|=(function(Z,le){var te=Z;return Z||(te=le?16893:33204),(65535&te)<<16})(C.unixPermissions,q)):(K=20,j|=(function(Z){return 63&(Z||0)})(C.dosPermissions)),_=k.getUTCHours(),_<<=6,_|=k.getUTCMinutes(),_<<=5,_|=k.getUTCSeconds()/2,S=k.getUTCFullYear()-1980,S<<=4,S|=k.getUTCMonth()+1,S<<=5,S|=k.getUTCDate(),H&&($=s(1,1)+s(f(P),4)+N,I+="up"+s($.length,2)+$),x&&(D=s(1,1)+s(f(z),4)+R,I+="uc"+s(D.length,2)+D);var G="";return G+=`
|
|
342
|
+
\0`,G+=s(L,2),G+=O.magic,G+=s(_,2),G+=s(S,2),G+=s(Y.crc32,4),G+=s(Y.compressedSize,4),G+=s(Y.uncompressedSize,4),G+=s(P.length,2),G+=s(I.length,2),{fileRecord:d.LOCAL_FILE_HEADER+G+P+I,dirRecord:d.CENTRAL_FILE_HEADER+s(K,2)+G+s(z.length,2)+"\0\0\0\0"+s(j,4)+s(v,4)+P+I+z}}var a=n("../utils"),c=n("../stream/GenericWorker"),l=n("../utf8"),f=n("../crc32"),d=n("../signature");function p(h,y,m,v){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=m,this.encodeFileName=v,this.streamFiles=h,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(p,c),p.prototype.push=function(h){var y=h.meta.percent||0,m=this.entriesCount,v=this._sources.length;this.accumulate?this.contentBuffer.push(h):(this.bytesWritten+=h.data.length,c.prototype.push.call(this,{data:h.data,meta:{currentFile:this.currentFile,percent:m?(y+100*(m-v-1))/m:100}}))},p.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var y=this.streamFiles&&!h.file.dir;if(y){var m=i(h,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(h){this.accumulate=!1;var y=this.streamFiles&&!h.file.dir,m=i(h,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),y)this.push({data:(function(v){return d.DATA_DESCRIPTOR+s(v.crc32,4)+s(v.compressedSize,4)+s(v.uncompressedSize,4)})(h),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},p.prototype.flush=function(){for(var h=this.bytesWritten,y=0;y<this.dirRecords.length;y++)this.push({data:this.dirRecords[y],meta:{percent:100}});var m=this.bytesWritten-h,v=(function(b,w,_,S,C){var O=a.transformTo("string",C(S));return d.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(b,2)+s(b,2)+s(w,4)+s(_,4)+s(O.length,2)+O})(this.dirRecords.length,m,h,this.zipComment,this.encodeFileName);this.push({data:v,meta:{percent:100}})},p.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},p.prototype.registerPrevious=function(h){this._sources.push(h);var y=this;return h.on("data",function(m){y.processChunk(m)}),h.on("end",function(){y.closedSource(y.previous.streamInfo),y._sources.length?y.prepareNextSource():y.end()}),h.on("error",function(m){y.error(m)}),this},p.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},p.prototype.error=function(h){var y=this._sources;if(!c.prototype.error.call(this,h))return!1;for(var m=0;m<y.length;m++)try{y[m].error(h)}catch{}return!0},p.prototype.lock=function(){c.prototype.lock.call(this);for(var h=this._sources,y=0;y<h.length;y++)h[y].lock()},r.exports=p},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,o){var s=n("../compressions"),i=n("./ZipFileWorker");o.generateWorker=function(a,c,l){var f=new i(c.streamFiles,l,c.platform,c.encodeFileName),d=0;try{a.forEach(function(p,h){d++;var y=(function(w,_){var S=w||_,C=s[S];if(!C)throw new Error(S+" is not a valid compression method !");return C})(h.options.compression,c.compression),m=h.options.compressionOptions||c.compressionOptions||{},v=h.dir,b=h.date;h._compressWorker(y,m).withStreamInfo("file",{name:p,dir:v,date:b,comment:h.comment||"",unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions}).pipe(f)}),f.entriesCount=d}catch(p){f.error(p)}return f}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,o){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new s;for(var a in this)typeof this[a]!="function"&&(i[a]=this[a]);return i}}(s.prototype=n("./object")).loadAsync=n("./load"),s.support=n("./support"),s.defaults=n("./defaults"),s.version="3.10.1",s.loadAsync=function(i,a){return new s().loadAsync(i,a)},s.external=n("./external"),r.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,o){var s=n("./utils"),i=n("./external"),a=n("./utf8"),c=n("./zipEntries"),l=n("./stream/Crc32Probe"),f=n("./nodejsUtils");function d(p){return new i.Promise(function(h,y){var m=p.decompressed.getContentWorker().pipe(new l);m.on("error",function(v){y(v)}).on("end",function(){m.streamInfo.crc32!==p.decompressed.crc32?y(new Error("Corrupted zip : CRC32 mismatch")):h()}).resume()})}r.exports=function(p,h){var y=this;return h=s.extend(h||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),f.isNode&&f.isStream(p)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",p,!0,h.optimizedBinaryString,h.base64).then(function(m){var v=new c(h);return v.load(m),v}).then(function(m){var v=[i.Promise.resolve(m)],b=m.files;if(h.checkCRC32)for(var w=0;w<b.length;w++)v.push(d(b[w]));return i.Promise.all(v)}).then(function(m){for(var v=m.shift(),b=v.files,w=0;w<b.length;w++){var _=b[w],S=_.fileNameStr,C=s.resolve(_.fileNameStr);y.file(C,_.decompressed,{binary:!0,optimizedBinaryString:!0,date:_.date,dir:_.dir,comment:_.fileCommentStr.length?_.fileCommentStr:null,unixPermissions:_.unixPermissions,dosPermissions:_.dosPermissions,createFolders:h.createFolders}),_.dir||(y.file(C).unsafeOriginalName=S)}return v.zipComment.length&&(y.comment=v.zipComment),y})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,o){var s=n("../utils"),i=n("../stream/GenericWorker");function a(c,l){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(l)}s.inherits(a,i),a.prototype._bindStream=function(c){var l=this;(this._stream=c).pause(),c.on("data",function(f){l.push({data:f,meta:{percent:0}})}).on("error",function(f){l.isPaused?this.generatedError=f:l.error(f)}).on("end",function(){l.isPaused?l._upstreamEnded=!0:l.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,o){var s=n("readable-stream").Readable;function i(a,c,l){s.call(this,c),this._helper=a;var f=this;a.on("data",function(d,p){f.push(d)||f._helper.pause(),l&&l(p)}).on("error",function(d){f.emit("error",d)}).on("end",function(){f.push(null)})}n("../utils").inherits(i,s),i.prototype._read=function(){this._helper.resume()},r.exports=i},{"../utils":32,"readable-stream":16}],14:[function(n,r,o){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,i);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,i)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var i=new Buffer(s);return i.fill(0),i},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(n,r,o){function s(C,O,T){var P,N=a.getTypeOf(O),F=a.extend(T||{},f);F.date=F.date||new Date,F.compression!==null&&(F.compression=F.compression.toUpperCase()),typeof F.unixPermissions=="string"&&(F.unixPermissions=parseInt(F.unixPermissions,8)),F.unixPermissions&&16384&F.unixPermissions&&(F.dir=!0),F.dosPermissions&&16&F.dosPermissions&&(F.dir=!0),F.dir&&(C=b(C)),F.createFolders&&(P=v(C))&&w.call(this,P,!0);var z=N==="string"&&F.binary===!1&&F.base64===!1;T&&T.binary!==void 0||(F.binary=!z),(O instanceof d&&O.uncompressedSize===0||F.dir||!O||O.length===0)&&(F.base64=!1,F.binary=!0,O="",F.compression="STORE",N="string");var R=null;R=O instanceof d||O instanceof c?O:y.isNode&&y.isStream(O)?new m(C,O):a.prepareContent(C,O,F.binary,F.optimizedBinaryString,F.base64);var H=new p(C,R,F);this.files[C]=H}var i=n("./utf8"),a=n("./utils"),c=n("./stream/GenericWorker"),l=n("./stream/StreamHelper"),f=n("./defaults"),d=n("./compressedObject"),p=n("./zipObject"),h=n("./generate"),y=n("./nodejsUtils"),m=n("./nodejs/NodejsStreamInputAdapter"),v=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var O=C.lastIndexOf("/");return 0<O?C.substring(0,O):""},b=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},w=function(C,O){return O=O!==void 0?O:f.createFolders,C=b(C),this.files[C]||s.call(this,C,null,{dir:!0,createFolders:O}),this.files[C]};function _(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var O,T,P;for(O in this.files)P=this.files[O],(T=O.slice(this.root.length,O.length))&&O.slice(0,this.root.length)===this.root&&C(T,P)},filter:function(C){var O=[];return this.forEach(function(T,P){C(T,P)&&O.push(P)}),O},file:function(C,O,T){if(arguments.length!==1)return C=this.root+C,s.call(this,C,O,T),this;if(_(C)){var P=C;return this.filter(function(F,z){return!z.dir&&P.test(F)})}var N=this.files[this.root+C];return N&&!N.dir?N:null},folder:function(C){if(!C)return this;if(_(C))return this.filter(function(N,F){return F.dir&&C.test(N)});var O=this.root+C,T=w.call(this,O),P=this.clone();return P.root=T.name,P},remove:function(C){C=this.root+C;var O=this.files[C];if(O||(C.slice(-1)!=="/"&&(C+="/"),O=this.files[C]),O&&!O.dir)delete this.files[C];else for(var T=this.filter(function(N,F){return F.name.slice(0,C.length)===C}),P=0;P<T.length;P++)delete this.files[T[P].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var O,T={};try{if((T=a.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=T.type.toLowerCase(),T.compression=T.compression.toUpperCase(),T.type==="binarystring"&&(T.type="string"),!T.type)throw new Error("No output type specified.");a.checkSupport(T.type),T.platform!=="darwin"&&T.platform!=="freebsd"&&T.platform!=="linux"&&T.platform!=="sunos"||(T.platform="UNIX"),T.platform==="win32"&&(T.platform="DOS");var P=T.comment||this.comment||"";O=h.generateWorker(this,T,P)}catch(N){(O=new c("error")).error(N)}return new l(O,T.type||"string",T.mimeType)},generateAsync:function(C,O){return this.generateInternalStream(C).accumulate(O)},generateNodeStream:function(C,O){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(O)}};r.exports=S},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,o){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,o){var s=n("./DataReader");function i(a){s.call(this,a);for(var c=0;c<this.data.length;c++)a[c]=255&a[c]}n("../utils").inherits(i,s),i.prototype.byteAt=function(a){return this.data[this.zero+a]},i.prototype.lastIndexOfSignature=function(a){for(var c=a.charCodeAt(0),l=a.charCodeAt(1),f=a.charCodeAt(2),d=a.charCodeAt(3),p=this.length-4;0<=p;--p)if(this.data[p]===c&&this.data[p+1]===l&&this.data[p+2]===f&&this.data[p+3]===d)return p-this.zero;return-1},i.prototype.readAndCheckSignature=function(a){var c=a.charCodeAt(0),l=a.charCodeAt(1),f=a.charCodeAt(2),d=a.charCodeAt(3),p=this.readData(4);return c===p[0]&&l===p[1]&&f===p[2]&&d===p[3]},i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(n,r,o){var s=n("../utils");function i(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var c,l=0;for(this.checkOffset(a),c=this.index+a-1;c>=this.index;c--)l=(l<<8)+this.byteAt(c);return this.index+=a,l},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=i},{"../utils":32}],19:[function(n,r,o){var s=n("./Uint8ArrayReader");function i(a){s.call(this,a)}n("../utils").inherits(i,s),i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,o){var s=n("./DataReader");function i(a){s.call(this,a)}n("../utils").inherits(i,s),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(n,r,o){var s=n("./ArrayReader");function i(a){s.call(this,a)}n("../utils").inherits(i,s),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,o){var s=n("../utils"),i=n("../support"),a=n("./ArrayReader"),c=n("./StringReader"),l=n("./NodeBufferReader"),f=n("./Uint8ArrayReader");r.exports=function(d){var p=s.getTypeOf(d);return s.checkSupport(p),p!=="string"||i.uint8array?p==="nodebuffer"?new l(d):i.uint8array?new f(s.transformTo("uint8array",d)):new a(s.transformTo("array",d)):new c(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,o){o.LOCAL_FILE_HEADER="PK",o.CENTRAL_FILE_HEADER="PK",o.CENTRAL_DIRECTORY_END="PK",o.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",o.ZIP64_CENTRAL_DIRECTORY_END="PK",o.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,o){var s=n("./GenericWorker"),i=n("../utils");function a(c){s.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(a,s),a.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,o){var s=n("./GenericWorker"),i=n("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,s),a.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,o){var s=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}s.inherits(a,i),a.prototype.processChunk=function(c){if(c){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+c.data.length}i.prototype.processChunk.call(this,c)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,o){var s=n("../utils"),i=n("./GenericWorker");function a(c){i.call(this,"DataWorker");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(f){l.dataIsReady=!0,l.data=f,l.max=f&&f.length||0,l.type=s.getTypeOf(f),l.isPaused||l._tickAndRepeat()},function(f){l.error(f)})}s.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,l=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,l);break;case"uint8array":c=this.data.subarray(this.index,l);break;case"array":case"nodebuffer":c=this.data.slice(this.index,l)}return this.index=l,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,o){function s(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var c=0;c<this._listeners[i].length;c++)this._listeners[i][c].call(this,a)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var a=this;return i.on("data",function(c){a.processChunk(c)}),i.on("end",function(){a.end()}),i.on("error",function(c){a.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,a){return this.extraStreamInfo[i]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},r.exports=s},{}],29:[function(n,r,o){var s=n("../utils"),i=n("./ConvertWorker"),a=n("./GenericWorker"),c=n("../base64"),l=n("../support"),f=n("../external"),d=null;if(l.nodestream)try{d=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function p(y,m){return new f.Promise(function(v,b){var w=[],_=y._internalType,S=y._outputType,C=y._mimeType;y.on("data",function(O,T){w.push(O),m&&m(T)}).on("error",function(O){w=[],b(O)}).on("end",function(){try{var O=(function(T,P,N){switch(T){case"blob":return s.newBlob(s.transformTo("arraybuffer",P),N);case"base64":return c.encode(P);default:return s.transformTo(T,P)}})(S,(function(T,P){var N,F=0,z=null,R=0;for(N=0;N<P.length;N++)R+=P[N].length;switch(T){case"string":return P.join("");case"array":return Array.prototype.concat.apply([],P);case"uint8array":for(z=new Uint8Array(R),N=0;N<P.length;N++)z.set(P[N],F),F+=P[N].length;return z;case"nodebuffer":return Buffer.concat(P);default:throw new Error("concat : unsupported type '"+T+"'")}})(_,w),C);v(O)}catch(T){b(T)}w=[]}).resume()})}function h(y,m,v){var b=m;switch(m){case"blob":case"arraybuffer":b="uint8array";break;case"base64":b="string"}try{this._internalType=b,this._outputType=m,this._mimeType=v,s.checkSupport(b),this._worker=y.pipe(new i(b)),y.lock()}catch(w){this._worker=new a("error"),this._worker.error(w)}}h.prototype={accumulate:function(y){return p(this,y)},on:function(y,m){var v=this;return y==="data"?this._worker.on(y,function(b){m.call(v,b.data,b.meta)}):this._worker.on(y,function(){s.delay(m,arguments,v)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(y){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new d(this,{objectMode:this._outputType!=="nodebuffer"},y)}},r.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,o){if(o.base64=!0,o.array=!0,o.string=!0,o.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",o.nodebuffer=typeof Buffer<"u",o.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")o.blob=!1;else{var s=new ArrayBuffer(0);try{o.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(s),o.blob=i.getBlob("application/zip").size===0}catch{o.blob=!1}}}try{o.nodestream=!!n("readable-stream").Readable}catch{o.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,o){for(var s=n("./utils"),i=n("./support"),a=n("./nodejsUtils"),c=n("./stream/GenericWorker"),l=new Array(256),f=0;f<256;f++)l[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;l[254]=l[254]=1;function d(){c.call(this,"utf-8 decode"),this.leftOver=null}function p(){c.call(this,"utf-8 encode")}o.utf8encode=function(h){return i.nodebuffer?a.newBufferFrom(h,"utf-8"):(function(y){var m,v,b,w,_,S=y.length,C=0;for(w=0;w<S;w++)(64512&(v=y.charCodeAt(w)))==55296&&w+1<S&&(64512&(b=y.charCodeAt(w+1)))==56320&&(v=65536+(v-55296<<10)+(b-56320),w++),C+=v<128?1:v<2048?2:v<65536?3:4;for(m=i.uint8array?new Uint8Array(C):new Array(C),w=_=0;_<C;w++)(64512&(v=y.charCodeAt(w)))==55296&&w+1<S&&(64512&(b=y.charCodeAt(w+1)))==56320&&(v=65536+(v-55296<<10)+(b-56320),w++),v<128?m[_++]=v:(v<2048?m[_++]=192|v>>>6:(v<65536?m[_++]=224|v>>>12:(m[_++]=240|v>>>18,m[_++]=128|v>>>12&63),m[_++]=128|v>>>6&63),m[_++]=128|63&v);return m})(h)},o.utf8decode=function(h){return i.nodebuffer?s.transformTo("nodebuffer",h).toString("utf-8"):(function(y){var m,v,b,w,_=y.length,S=new Array(2*_);for(m=v=0;m<_;)if((b=y[m++])<128)S[v++]=b;else if(4<(w=l[b]))S[v++]=65533,m+=w-1;else{for(b&=w===2?31:w===3?15:7;1<w&&m<_;)b=b<<6|63&y[m++],w--;1<w?S[v++]=65533:b<65536?S[v++]=b:(b-=65536,S[v++]=55296|b>>10&1023,S[v++]=56320|1023&b)}return S.length!==v&&(S.subarray?S=S.subarray(0,v):S.length=v),s.applyFromCharCode(S)})(h=s.transformTo(i.uint8array?"uint8array":"array",h))},s.inherits(d,c),d.prototype.processChunk=function(h){var y=s.transformTo(i.uint8array?"uint8array":"array",h.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var m=y;(y=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),y.set(m,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var v=(function(w,_){var S;for((_=_||w.length)>w.length&&(_=w.length),S=_-1;0<=S&&(192&w[S])==128;)S--;return S<0||S===0?_:S+l[w[S]]>_?S:_})(y),b=y;v!==y.length&&(i.uint8array?(b=y.subarray(0,v),this.leftOver=y.subarray(v,y.length)):(b=y.slice(0,v),this.leftOver=y.slice(v,y.length))),this.push({data:o.utf8decode(b),meta:h.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:o.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},o.Utf8DecodeWorker=d,s.inherits(p,c),p.prototype.processChunk=function(h){this.push({data:o.utf8encode(h.data),meta:h.meta})},o.Utf8EncodeWorker=p},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,o){var s=n("./support"),i=n("./base64"),a=n("./nodejsUtils"),c=n("./external");function l(m){return m}function f(m,v){for(var b=0;b<m.length;++b)v[b]=255&m.charCodeAt(b);return v}n("setimmediate"),o.newBlob=function(m,v){o.checkSupport("blob");try{return new Blob([m],{type:v})}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return b.append(m),b.getBlob(v)}catch{throw new Error("Bug : can't construct the Blob.")}}};var d={stringifyByChunk:function(m,v,b){var w=[],_=0,S=m.length;if(S<=b)return String.fromCharCode.apply(null,m);for(;_<S;)v==="array"||v==="nodebuffer"?w.push(String.fromCharCode.apply(null,m.slice(_,Math.min(_+b,S)))):w.push(String.fromCharCode.apply(null,m.subarray(_,Math.min(_+b,S)))),_+=b;return w.join("")},stringifyByChar:function(m){for(var v="",b=0;b<m.length;b++)v+=String.fromCharCode(m[b]);return v},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function p(m){var v=65536,b=o.getTypeOf(m),w=!0;if(b==="uint8array"?w=d.applyCanBeUsed.uint8array:b==="nodebuffer"&&(w=d.applyCanBeUsed.nodebuffer),w)for(;1<v;)try{return d.stringifyByChunk(m,b,v)}catch{v=Math.floor(v/2)}return d.stringifyByChar(m)}function h(m,v){for(var b=0;b<m.length;b++)v[b]=m[b];return v}o.applyFromCharCode=p;var y={};y.string={string:l,array:function(m){return f(m,new Array(m.length))},arraybuffer:function(m){return y.string.uint8array(m).buffer},uint8array:function(m){return f(m,new Uint8Array(m.length))},nodebuffer:function(m){return f(m,a.allocBuffer(m.length))}},y.array={string:p,array:l,arraybuffer:function(m){return new Uint8Array(m).buffer},uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return a.newBufferFrom(m)}},y.arraybuffer={string:function(m){return p(new Uint8Array(m))},array:function(m){return h(new Uint8Array(m),new Array(m.byteLength))},arraybuffer:l,uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return a.newBufferFrom(new Uint8Array(m))}},y.uint8array={string:p,array:function(m){return h(m,new Array(m.length))},arraybuffer:function(m){return m.buffer},uint8array:l,nodebuffer:function(m){return a.newBufferFrom(m)}},y.nodebuffer={string:p,array:function(m){return h(m,new Array(m.length))},arraybuffer:function(m){return y.nodebuffer.uint8array(m).buffer},uint8array:function(m){return h(m,new Uint8Array(m.length))},nodebuffer:l},o.transformTo=function(m,v){if(v=v||"",!m)return v;o.checkSupport(m);var b=o.getTypeOf(v);return y[b][m](v)},o.resolve=function(m){for(var v=m.split("/"),b=[],w=0;w<v.length;w++){var _=v[w];_==="."||_===""&&w!==0&&w!==v.length-1||(_===".."?b.pop():b.push(_))}return b.join("/")},o.getTypeOf=function(m){return typeof m=="string"?"string":Object.prototype.toString.call(m)==="[object Array]"?"array":s.nodebuffer&&a.isBuffer(m)?"nodebuffer":s.uint8array&&m instanceof Uint8Array?"uint8array":s.arraybuffer&&m instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(m){if(!s[m.toLowerCase()])throw new Error(m+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(m){var v,b,w="";for(b=0;b<(m||"").length;b++)w+="\\x"+((v=m.charCodeAt(b))<16?"0":"")+v.toString(16).toUpperCase();return w},o.delay=function(m,v,b){setImmediate(function(){m.apply(b||null,v||[])})},o.inherits=function(m,v){function b(){}b.prototype=v.prototype,m.prototype=new b},o.extend=function(){var m,v,b={};for(m=0;m<arguments.length;m++)for(v in arguments[m])Object.prototype.hasOwnProperty.call(arguments[m],v)&&b[v]===void 0&&(b[v]=arguments[m][v]);return b},o.prepareContent=function(m,v,b,w,_){return c.Promise.resolve(v).then(function(S){return s.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new c.Promise(function(C,O){var T=new FileReader;T.onload=function(P){C(P.target.result)},T.onerror=function(P){O(P.target.error)},T.readAsArrayBuffer(S)}):S}).then(function(S){var C=o.getTypeOf(S);return C?(C==="arraybuffer"?S=o.transformTo("uint8array",S):C==="string"&&(_?S=i.decode(S):b&&w!==!0&&(S=(function(O){return f(O,s.uint8array?new Uint8Array(O.length):new Array(O.length))})(S))),S):c.Promise.reject(new Error("Can't read the data of '"+m+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,o){var s=n("./reader/readerFor"),i=n("./utils"),a=n("./signature"),c=n("./zipEntry"),l=n("./support");function f(d){this.files=[],this.loadOptions=d}f.prototype={checkSignature:function(d){if(!this.reader.readAndCheckSignature(d)){this.reader.index-=4;var p=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(p)+", expected "+i.pretty(d)+")")}},isSignature:function(d,p){var h=this.reader.index;this.reader.setIndex(d);var y=this.reader.readString(4)===p;return this.reader.setIndex(h),y},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var d=this.reader.readData(this.zipCommentLength),p=l.uint8array?"uint8array":"array",h=i.transformTo(p,d);this.zipComment=this.loadOptions.decodeFileName(h)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var d,p,h,y=this.zip64EndOfCentralSize-44;0<y;)d=this.reader.readInt(2),p=this.reader.readInt(4),h=this.reader.readData(p),this.zip64ExtensibleData[d]={id:d,length:p,value:h}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var d,p;for(d=0;d<this.files.length;d++)p=this.files[d],this.reader.setIndex(p.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),p.readLocalPart(this.reader),p.handleUTF8(),p.processAttributes()},readCentralDir:function(){var d;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(d=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(d);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var d=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(d<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(d);var p=d;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(d=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(d),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var h=this.centralDirOffset+this.centralDirSize;this.zip64&&(h+=20,h+=12+this.zip64EndOfCentralSize);var y=p-h;if(0<y)this.isSignature(p,a.CENTRAL_FILE_HEADER)||(this.reader.zero=y);else if(y<0)throw new Error("Corrupted zip: missing "+Math.abs(y)+" bytes.")},prepareReader:function(d){this.reader=s(d)},load:function(d){this.prepareReader(d),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=f},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,o){var s=n("./reader/readerFor"),i=n("./utils"),a=n("./compressedObject"),c=n("./crc32"),l=n("./utf8"),f=n("./compressions"),d=n("./support");function p(h,y){this.options=h,this.loadOptions=y}p.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(h){var y,m;if(h.skip(22),this.fileNameLength=h.readInt(2),m=h.readInt(2),this.fileName=h.readData(this.fileNameLength),h.skip(m),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((y=(function(v){for(var b in f)if(Object.prototype.hasOwnProperty.call(f,b)&&f[b].magic===v)return f[b];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,y,h.readData(this.compressedSize))},readCentralPart:function(h){this.versionMadeBy=h.readInt(2),h.skip(2),this.bitFlag=h.readInt(2),this.compressionMethod=h.readString(2),this.date=h.readDate(),this.crc32=h.readInt(4),this.compressedSize=h.readInt(4),this.uncompressedSize=h.readInt(4);var y=h.readInt(2);if(this.extraFieldsLength=h.readInt(2),this.fileCommentLength=h.readInt(2),this.diskNumberStart=h.readInt(2),this.internalFileAttributes=h.readInt(2),this.externalFileAttributes=h.readInt(4),this.localHeaderOffset=h.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");h.skip(y),this.readExtraFields(h),this.parseZIP64ExtraField(h),this.fileComment=h.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var h=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),h==0&&(this.dosPermissions=63&this.externalFileAttributes),h==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var h=s(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=h.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=h.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=h.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=h.readInt(4))}},readExtraFields:function(h){var y,m,v,b=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4<b;)y=h.readInt(2),m=h.readInt(2),v=h.readData(m),this.extraFields[y]={id:y,length:m,value:v};h.setIndex(b)},handleUTF8:function(){var h=d.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=l.utf8decode(this.fileName),this.fileCommentStr=l.utf8decode(this.fileComment);else{var y=this.findExtraFieldUnicodePath();if(y!==null)this.fileNameStr=y;else{var m=i.transformTo(h,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(m)}var v=this.findExtraFieldUnicodeComment();if(v!==null)this.fileCommentStr=v;else{var b=i.transformTo(h,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(b)}}},findExtraFieldUnicodePath:function(){var h=this.extraFields[28789];if(h){var y=s(h.value);return y.readInt(1)!==1||c(this.fileName)!==y.readInt(4)?null:l.utf8decode(y.readData(h.length-5))}return null},findExtraFieldUnicodeComment:function(){var h=this.extraFields[25461];if(h){var y=s(h.value);return y.readInt(1)!==1||c(this.fileComment)!==y.readInt(4)?null:l.utf8decode(y.readData(h.length-5))}return null}},r.exports=p},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,o){function s(y,m,v){this.name=y,this.dir=v.dir,this.date=v.date,this.comment=v.comment,this.unixPermissions=v.unixPermissions,this.dosPermissions=v.dosPermissions,this._data=m,this._dataBinary=v.binary,this.options={compression:v.compression,compressionOptions:v.compressionOptions}}var i=n("./stream/StreamHelper"),a=n("./stream/DataWorker"),c=n("./utf8"),l=n("./compressedObject"),f=n("./stream/GenericWorker");s.prototype={internalStream:function(y){var m=null,v="string";try{if(!y)throw new Error("No output type specified.");var b=(v=y.toLowerCase())==="string"||v==="text";v!=="binarystring"&&v!=="text"||(v="string"),m=this._decompressWorker();var w=!this._dataBinary;w&&!b&&(m=m.pipe(new c.Utf8EncodeWorker)),!w&&b&&(m=m.pipe(new c.Utf8DecodeWorker))}catch(_){(m=new f("error")).error(_)}return new i(m,v,"")},async:function(y,m){return this.internalStream(y).accumulate(m)},nodeStream:function(y,m){return this.internalStream(y||"nodebuffer").toNodejsStream(m)},_compressWorker:function(y,m){if(this._data instanceof l&&this._data.compression.magic===y.magic)return this._data.getCompressedWorker();var v=this._decompressWorker();return this._dataBinary||(v=v.pipe(new c.Utf8EncodeWorker)),l.createWorkerFrom(v,y,m)},_decompressWorker:function(){return this._data instanceof l?this._data.getContentWorker():this._data instanceof f?this._data:new a(this._data)}};for(var d=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],p=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<d.length;h++)s.prototype[d[h]]=p;r.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,o){(function(s){var i,a,c=s.MutationObserver||s.WebKitMutationObserver;if(c){var l=0,f=new c(y),d=s.document.createTextNode("");f.observe(d,{characterData:!0}),i=function(){d.data=l=++l%2}}else if(s.setImmediate||s.MessageChannel===void 0)i="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var m=s.document.createElement("script");m.onreadystatechange=function(){y(),m.onreadystatechange=null,m.parentNode.removeChild(m),m=null},s.document.documentElement.appendChild(m)}:function(){setTimeout(y,0)};else{var p=new s.MessageChannel;p.port1.onmessage=y,i=function(){p.port2.postMessage(0)}}var h=[];function y(){var m,v;a=!0;for(var b=h.length;b;){for(v=h,h=[],m=-1;++m<b;)v[m]();b=h.length}a=!1}r.exports=function(m){h.push(m)!==1||a||i()}}).call(this,typeof ro<"u"?ro:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,o){var s=n("immediate");function i(){}var a={},c=["REJECTED"],l=["FULFILLED"],f=["PENDING"];function d(b){if(typeof b!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,b!==i&&m(this,b)}function p(b,w,_){this.promise=b,typeof w=="function"&&(this.onFulfilled=w,this.callFulfilled=this.otherCallFulfilled),typeof _=="function"&&(this.onRejected=_,this.callRejected=this.otherCallRejected)}function h(b,w,_){s(function(){var S;try{S=w(_)}catch(C){return a.reject(b,C)}S===b?a.reject(b,new TypeError("Cannot resolve promise with itself")):a.resolve(b,S)})}function y(b){var w=b&&b.then;if(b&&(typeof b=="object"||typeof b=="function")&&typeof w=="function")return function(){w.apply(b,arguments)}}function m(b,w){var _=!1;function S(T){_||(_=!0,a.reject(b,T))}function C(T){_||(_=!0,a.resolve(b,T))}var O=v(function(){w(C,S)});O.status==="error"&&S(O.value)}function v(b,w){var _={};try{_.value=b(w),_.status="success"}catch(S){_.status="error",_.value=S}return _}(r.exports=d).prototype.finally=function(b){if(typeof b!="function")return this;var w=this.constructor;return this.then(function(_){return w.resolve(b()).then(function(){return _})},function(_){return w.resolve(b()).then(function(){throw _})})},d.prototype.catch=function(b){return this.then(null,b)},d.prototype.then=function(b,w){if(typeof b!="function"&&this.state===l||typeof w!="function"&&this.state===c)return this;var _=new this.constructor(i);return this.state!==f?h(_,this.state===l?b:w,this.outcome):this.queue.push(new p(_,b,w)),_},p.prototype.callFulfilled=function(b){a.resolve(this.promise,b)},p.prototype.otherCallFulfilled=function(b){h(this.promise,this.onFulfilled,b)},p.prototype.callRejected=function(b){a.reject(this.promise,b)},p.prototype.otherCallRejected=function(b){h(this.promise,this.onRejected,b)},a.resolve=function(b,w){var _=v(y,w);if(_.status==="error")return a.reject(b,_.value);var S=_.value;if(S)m(b,S);else{b.state=l,b.outcome=w;for(var C=-1,O=b.queue.length;++C<O;)b.queue[C].callFulfilled(w)}return b},a.reject=function(b,w){b.state=c,b.outcome=w;for(var _=-1,S=b.queue.length;++_<S;)b.queue[_].callRejected(w);return b},d.resolve=function(b){return b instanceof this?b:a.resolve(new this(i),b)},d.reject=function(b){var w=new this(i);return a.reject(w,b)},d.all=function(b){var w=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _=b.length,S=!1;if(!_)return this.resolve([]);for(var C=new Array(_),O=0,T=-1,P=new this(i);++T<_;)N(b[T],T);return P;function N(F,z){w.resolve(F).then(function(R){C[z]=R,++O!==_||S||(S=!0,a.resolve(P,C))},function(R){S||(S=!0,a.reject(P,R))})}},d.race=function(b){var w=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var _=b.length,S=!1;if(!_)return this.resolve([]);for(var C=-1,O=new this(i);++C<_;)T=b[C],w.resolve(T).then(function(P){S||(S=!0,a.resolve(O,P))},function(P){S||(S=!0,a.reject(O,P))});var T;return O}},{immediate:36}],38:[function(n,r,o){var s={};(0,n("./lib/utils/common").assign)(s,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,o){var s=n("./zlib/deflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/messages"),l=n("./zlib/zstream"),f=Object.prototype.toString,d=0,p=-1,h=0,y=8;function m(b){if(!(this instanceof m))return new m(b);this.options=i.assign({level:p,method:y,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},b||{});var w=this.options;w.raw&&0<w.windowBits?w.windowBits=-w.windowBits:w.gzip&&0<w.windowBits&&w.windowBits<16&&(w.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var _=s.deflateInit2(this.strm,w.level,w.method,w.windowBits,w.memLevel,w.strategy);if(_!==d)throw new Error(c[_]);if(w.header&&s.deflateSetHeader(this.strm,w.header),w.dictionary){var S;if(S=typeof w.dictionary=="string"?a.string2buf(w.dictionary):f.call(w.dictionary)==="[object ArrayBuffer]"?new Uint8Array(w.dictionary):w.dictionary,(_=s.deflateSetDictionary(this.strm,S))!==d)throw new Error(c[_]);this._dict_set=!0}}function v(b,w){var _=new m(w);if(_.push(b,!0),_.err)throw _.msg||c[_.err];return _.result}m.prototype.push=function(b,w){var _,S,C=this.strm,O=this.options.chunkSize;if(this.ended)return!1;S=w===~~w?w:w===!0?4:0,typeof b=="string"?C.input=a.string2buf(b):f.call(b)==="[object ArrayBuffer]"?C.input=new Uint8Array(b):C.input=b,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new i.Buf8(O),C.next_out=0,C.avail_out=O),(_=s.deflate(C,S))!==1&&_!==d)return this.onEnd(_),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(i.shrinkBuf(C.output,C.next_out))):this.onData(i.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&_!==1);return S===4?(_=s.deflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===d):S!==2||(this.onEnd(d),!(C.avail_out=0))},m.prototype.onData=function(b){this.chunks.push(b)},m.prototype.onEnd=function(b){b===d&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg},o.Deflate=m,o.deflate=v,o.deflateRaw=function(b,w){return(w=w||{}).raw=!0,v(b,w)},o.gzip=function(b,w){return(w=w||{}).gzip=!0,v(b,w)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,o){var s=n("./zlib/inflate"),i=n("./utils/common"),a=n("./utils/strings"),c=n("./zlib/constants"),l=n("./zlib/messages"),f=n("./zlib/zstream"),d=n("./zlib/gzheader"),p=Object.prototype.toString;function h(m){if(!(this instanceof h))return new h(m);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},m||{});var v=this.options;v.raw&&0<=v.windowBits&&v.windowBits<16&&(v.windowBits=-v.windowBits,v.windowBits===0&&(v.windowBits=-15)),!(0<=v.windowBits&&v.windowBits<16)||m&&m.windowBits||(v.windowBits+=32),15<v.windowBits&&v.windowBits<48&&(15&v.windowBits)==0&&(v.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var b=s.inflateInit2(this.strm,v.windowBits);if(b!==c.Z_OK)throw new Error(l[b]);this.header=new d,s.inflateGetHeader(this.strm,this.header)}function y(m,v){var b=new h(v);if(b.push(m,!0),b.err)throw b.msg||l[b.err];return b.result}h.prototype.push=function(m,v){var b,w,_,S,C,O,T=this.strm,P=this.options.chunkSize,N=this.options.dictionary,F=!1;if(this.ended)return!1;w=v===~~v?v:v===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof m=="string"?T.input=a.binstring2buf(m):p.call(m)==="[object ArrayBuffer]"?T.input=new Uint8Array(m):T.input=m,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new i.Buf8(P),T.next_out=0,T.avail_out=P),(b=s.inflate(T,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&N&&(O=typeof N=="string"?a.string2buf(N):p.call(N)==="[object ArrayBuffer]"?new Uint8Array(N):N,b=s.inflateSetDictionary(this.strm,O)),b===c.Z_BUF_ERROR&&F===!0&&(b=c.Z_OK,F=!1),b!==c.Z_STREAM_END&&b!==c.Z_OK)return this.onEnd(b),!(this.ended=!0);T.next_out&&(T.avail_out!==0&&b!==c.Z_STREAM_END&&(T.avail_in!==0||w!==c.Z_FINISH&&w!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(_=a.utf8border(T.output,T.next_out),S=T.next_out-_,C=a.buf2string(T.output,_),T.next_out=S,T.avail_out=P-S,S&&i.arraySet(T.output,T.output,_,S,0),this.onData(C)):this.onData(i.shrinkBuf(T.output,T.next_out)))),T.avail_in===0&&T.avail_out===0&&(F=!0)}while((0<T.avail_in||T.avail_out===0)&&b!==c.Z_STREAM_END);return b===c.Z_STREAM_END&&(w=c.Z_FINISH),w===c.Z_FINISH?(b=s.inflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===c.Z_OK):w!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(T.avail_out=0))},h.prototype.onData=function(m){this.chunks.push(m)},h.prototype.onEnd=function(m){m===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},o.Inflate=h,o.inflate=y,o.inflateRaw=function(m,v){return(v=v||{}).raw=!0,y(m,v)},o.ungzip=y},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,o){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";o.assign=function(c){for(var l=Array.prototype.slice.call(arguments,1);l.length;){var f=l.shift();if(f){if(typeof f!="object")throw new TypeError(f+"must be non-object");for(var d in f)f.hasOwnProperty(d)&&(c[d]=f[d])}}return c},o.shrinkBuf=function(c,l){return c.length===l?c:c.subarray?c.subarray(0,l):(c.length=l,c)};var i={arraySet:function(c,l,f,d,p){if(l.subarray&&c.subarray)c.set(l.subarray(f,f+d),p);else for(var h=0;h<d;h++)c[p+h]=l[f+h]},flattenChunks:function(c){var l,f,d,p,h,y;for(l=d=0,f=c.length;l<f;l++)d+=c[l].length;for(y=new Uint8Array(d),l=p=0,f=c.length;l<f;l++)h=c[l],y.set(h,p),p+=h.length;return y}},a={arraySet:function(c,l,f,d,p){for(var h=0;h<d;h++)c[p+h]=l[f+h]},flattenChunks:function(c){return[].concat.apply([],c)}};o.setTyped=function(c){c?(o.Buf8=Uint8Array,o.Buf16=Uint16Array,o.Buf32=Int32Array,o.assign(o,i)):(o.Buf8=Array,o.Buf16=Array,o.Buf32=Array,o.assign(o,a))},o.setTyped(s)},{}],42:[function(n,r,o){var s=n("./common"),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var c=new s.Buf8(256),l=0;l<256;l++)c[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function f(d,p){if(p<65537&&(d.subarray&&a||!d.subarray&&i))return String.fromCharCode.apply(null,s.shrinkBuf(d,p));for(var h="",y=0;y<p;y++)h+=String.fromCharCode(d[y]);return h}c[254]=c[254]=1,o.string2buf=function(d){var p,h,y,m,v,b=d.length,w=0;for(m=0;m<b;m++)(64512&(h=d.charCodeAt(m)))==55296&&m+1<b&&(64512&(y=d.charCodeAt(m+1)))==56320&&(h=65536+(h-55296<<10)+(y-56320),m++),w+=h<128?1:h<2048?2:h<65536?3:4;for(p=new s.Buf8(w),m=v=0;v<w;m++)(64512&(h=d.charCodeAt(m)))==55296&&m+1<b&&(64512&(y=d.charCodeAt(m+1)))==56320&&(h=65536+(h-55296<<10)+(y-56320),m++),h<128?p[v++]=h:(h<2048?p[v++]=192|h>>>6:(h<65536?p[v++]=224|h>>>12:(p[v++]=240|h>>>18,p[v++]=128|h>>>12&63),p[v++]=128|h>>>6&63),p[v++]=128|63&h);return p},o.buf2binstring=function(d){return f(d,d.length)},o.binstring2buf=function(d){for(var p=new s.Buf8(d.length),h=0,y=p.length;h<y;h++)p[h]=d.charCodeAt(h);return p},o.buf2string=function(d,p){var h,y,m,v,b=p||d.length,w=new Array(2*b);for(h=y=0;h<b;)if((m=d[h++])<128)w[y++]=m;else if(4<(v=c[m]))w[y++]=65533,h+=v-1;else{for(m&=v===2?31:v===3?15:7;1<v&&h<b;)m=m<<6|63&d[h++],v--;1<v?w[y++]=65533:m<65536?w[y++]=m:(m-=65536,w[y++]=55296|m>>10&1023,w[y++]=56320|1023&m)}return f(w,y)},o.utf8border=function(d,p){var h;for((p=p||d.length)>d.length&&(p=d.length),h=p-1;0<=h&&(192&d[h])==128;)h--;return h<0||h===0?p:h+c[d[h]]>p?h:p}},{"./common":41}],43:[function(n,r,o){r.exports=function(s,i,a,c){for(var l=65535&s|0,f=s>>>16&65535|0,d=0;a!==0;){for(a-=d=2e3<a?2e3:a;f=f+(l=l+i[c++]|0)|0,--d;);l%=65521,f%=65521}return l|f<<16|0}},{}],44:[function(n,r,o){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,o){var s=(function(){for(var i,a=[],c=0;c<256;c++){i=c;for(var l=0;l<8;l++)i=1&i?3988292384^i>>>1:i>>>1;a[c]=i}return a})();r.exports=function(i,a,c,l){var f=s,d=l+c;i^=-1;for(var p=l;p<d;p++)i=i>>>8^f[255&(i^a[p])];return-1^i}},{}],46:[function(n,r,o){var s,i=n("../utils/common"),a=n("./trees"),c=n("./adler32"),l=n("./crc32"),f=n("./messages"),d=0,p=4,h=0,y=-2,m=-1,v=4,b=2,w=8,_=9,S=286,C=30,O=19,T=2*S+1,P=15,N=3,F=258,z=F+N+1,R=42,H=113,x=1,I=2,$=3,D=4;function q(E,J){return E.msg=f[J],J}function k(E){return(E<<1)-(4<E?9:0)}function Y(E){for(var J=E.length;0<=--J;)E[J]=0}function L(E){var J=E.state,W=J.pending;W>E.avail_out&&(W=E.avail_out),W!==0&&(i.arraySet(E.output,J.pending_buf,J.pending_out,W,E.next_out),E.next_out+=W,J.pending_out+=W,E.total_out+=W,E.avail_out-=W,J.pending-=W,J.pending===0&&(J.pending_out=0))}function j(E,J){a._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,J),E.block_start=E.strstart,L(E.strm)}function K(E,J){E.pending_buf[E.pending++]=J}function G(E,J){E.pending_buf[E.pending++]=J>>>8&255,E.pending_buf[E.pending++]=255&J}function Z(E,J){var W,M,A=E.max_chain_length,B=E.strstart,ee=E.prev_length,ne=E.nice_match,U=E.strstart>E.w_size-z?E.strstart-(E.w_size-z):0,oe=E.window,ue=E.w_mask,se=E.prev,ae=E.strstart+F,ge=oe[B+ee-1],pe=oe[B+ee];E.prev_length>=E.good_match&&(A>>=2),ne>E.lookahead&&(ne=E.lookahead);do if(oe[(W=J)+ee]===pe&&oe[W+ee-1]===ge&&oe[W]===oe[B]&&oe[++W]===oe[B+1]){B+=2,W++;do;while(oe[++B]===oe[++W]&&oe[++B]===oe[++W]&&oe[++B]===oe[++W]&&oe[++B]===oe[++W]&&oe[++B]===oe[++W]&&oe[++B]===oe[++W]&&oe[++B]===oe[++W]&&oe[++B]===oe[++W]&&B<ae);if(M=F-(ae-B),B=ae-F,ee<M){if(E.match_start=J,ne<=(ee=M))break;ge=oe[B+ee-1],pe=oe[B+ee]}}while((J=se[J&ue])>U&&--A!=0);return ee<=E.lookahead?ee:E.lookahead}function le(E){var J,W,M,A,B,ee,ne,U,oe,ue,se=E.w_size;do{if(A=E.window_size-E.lookahead-E.strstart,E.strstart>=se+(se-z)){for(i.arraySet(E.window,E.window,se,se,0),E.match_start-=se,E.strstart-=se,E.block_start-=se,J=W=E.hash_size;M=E.head[--J],E.head[J]=se<=M?M-se:0,--W;);for(J=W=se;M=E.prev[--J],E.prev[J]=se<=M?M-se:0,--W;);A+=se}if(E.strm.avail_in===0)break;if(ee=E.strm,ne=E.window,U=E.strstart+E.lookahead,oe=A,ue=void 0,ue=ee.avail_in,oe<ue&&(ue=oe),W=ue===0?0:(ee.avail_in-=ue,i.arraySet(ne,ee.input,ee.next_in,ue,U),ee.state.wrap===1?ee.adler=c(ee.adler,ne,ue,U):ee.state.wrap===2&&(ee.adler=l(ee.adler,ne,ue,U)),ee.next_in+=ue,ee.total_in+=ue,ue),E.lookahead+=W,E.lookahead+E.insert>=N)for(B=E.strstart-E.insert,E.ins_h=E.window[B],E.ins_h=(E.ins_h<<E.hash_shift^E.window[B+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[B+N-1])&E.hash_mask,E.prev[B&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=B,B++,E.insert--,!(E.lookahead+E.insert<N)););}while(E.lookahead<z&&E.strm.avail_in!==0)}function te(E,J){for(var W,M;;){if(E.lookahead<z){if(le(E),E.lookahead<z&&J===d)return x;if(E.lookahead===0)break}if(W=0,E.lookahead>=N&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+N-1])&E.hash_mask,W=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),W!==0&&E.strstart-W<=E.w_size-z&&(E.match_length=Z(E,W)),E.match_length>=N)if(M=a._tr_tally(E,E.strstart-E.match_start,E.match_length-N),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=N){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+N-1])&E.hash_mask,W=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart,--E.match_length!=0;);E.strstart++}else E.strstart+=E.match_length,E.match_length=0,E.ins_h=E.window[E.strstart],E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+1])&E.hash_mask;else M=a._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(M&&(j(E,!1),E.strm.avail_out===0))return x}return E.insert=E.strstart<N-1?E.strstart:N-1,J===p?(j(E,!0),E.strm.avail_out===0?$:D):E.last_lit&&(j(E,!1),E.strm.avail_out===0)?x:I}function Q(E,J){for(var W,M,A;;){if(E.lookahead<z){if(le(E),E.lookahead<z&&J===d)return x;if(E.lookahead===0)break}if(W=0,E.lookahead>=N&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+N-1])&E.hash_mask,W=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),E.prev_length=E.match_length,E.prev_match=E.match_start,E.match_length=N-1,W!==0&&E.prev_length<E.max_lazy_match&&E.strstart-W<=E.w_size-z&&(E.match_length=Z(E,W),E.match_length<=5&&(E.strategy===1||E.match_length===N&&4096<E.strstart-E.match_start)&&(E.match_length=N-1)),E.prev_length>=N&&E.match_length<=E.prev_length){for(A=E.strstart+E.lookahead-N,M=a._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-N),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+N-1])&E.hash_mask,W=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),--E.prev_length!=0;);if(E.match_available=0,E.match_length=N-1,E.strstart++,M&&(j(E,!1),E.strm.avail_out===0))return x}else if(E.match_available){if((M=a._tr_tally(E,0,E.window[E.strstart-1]))&&j(E,!1),E.strstart++,E.lookahead--,E.strm.avail_out===0)return x}else E.match_available=1,E.strstart++,E.lookahead--}return E.match_available&&(M=a._tr_tally(E,0,E.window[E.strstart-1]),E.match_available=0),E.insert=E.strstart<N-1?E.strstart:N-1,J===p?(j(E,!0),E.strm.avail_out===0?$:D):E.last_lit&&(j(E,!1),E.strm.avail_out===0)?x:I}function ie(E,J,W,M,A){this.good_length=E,this.max_lazy=J,this.nice_length=W,this.max_chain=M,this.func=A}function re(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=w,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*T),this.dyn_dtree=new i.Buf16(2*(2*C+1)),this.bl_tree=new i.Buf16(2*(2*O+1)),Y(this.dyn_ltree),Y(this.dyn_dtree),Y(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(P+1),this.heap=new i.Buf16(2*S+1),Y(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*S+1),Y(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ce(E){var J;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=b,(J=E.state).pending=0,J.pending_out=0,J.wrap<0&&(J.wrap=-J.wrap),J.status=J.wrap?R:H,E.adler=J.wrap===2?0:1,J.last_flush=d,a._tr_init(J),h):q(E,y)}function fe(E){var J=ce(E);return J===h&&(function(W){W.window_size=2*W.w_size,Y(W.head),W.max_lazy_match=s[W.level].max_lazy,W.good_match=s[W.level].good_length,W.nice_match=s[W.level].nice_length,W.max_chain_length=s[W.level].max_chain,W.strstart=0,W.block_start=0,W.lookahead=0,W.insert=0,W.match_length=W.prev_length=N-1,W.match_available=0,W.ins_h=0})(E.state),J}function ve(E,J,W,M,A,B){if(!E)return y;var ee=1;if(J===m&&(J=6),M<0?(ee=0,M=-M):15<M&&(ee=2,M-=16),A<1||_<A||W!==w||M<8||15<M||J<0||9<J||B<0||v<B)return q(E,y);M===8&&(M=9);var ne=new re;return(E.state=ne).strm=E,ne.wrap=ee,ne.gzhead=null,ne.w_bits=M,ne.w_size=1<<ne.w_bits,ne.w_mask=ne.w_size-1,ne.hash_bits=A+7,ne.hash_size=1<<ne.hash_bits,ne.hash_mask=ne.hash_size-1,ne.hash_shift=~~((ne.hash_bits+N-1)/N),ne.window=new i.Buf8(2*ne.w_size),ne.head=new i.Buf16(ne.hash_size),ne.prev=new i.Buf16(ne.w_size),ne.lit_bufsize=1<<A+6,ne.pending_buf_size=4*ne.lit_bufsize,ne.pending_buf=new i.Buf8(ne.pending_buf_size),ne.d_buf=1*ne.lit_bufsize,ne.l_buf=3*ne.lit_bufsize,ne.level=J,ne.strategy=B,ne.method=W,fe(E)}s=[new ie(0,0,0,0,function(E,J){var W=65535;for(W>E.pending_buf_size-5&&(W=E.pending_buf_size-5);;){if(E.lookahead<=1){if(le(E),E.lookahead===0&&J===d)return x;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var M=E.block_start+W;if((E.strstart===0||E.strstart>=M)&&(E.lookahead=E.strstart-M,E.strstart=M,j(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-z&&(j(E,!1),E.strm.avail_out===0))return x}return E.insert=0,J===p?(j(E,!0),E.strm.avail_out===0?$:D):(E.strstart>E.block_start&&(j(E,!1),E.strm.avail_out),x)}),new ie(4,4,8,4,te),new ie(4,5,16,8,te),new ie(4,6,32,32,te),new ie(4,4,16,16,Q),new ie(8,16,32,32,Q),new ie(8,16,128,128,Q),new ie(8,32,128,256,Q),new ie(32,128,258,1024,Q),new ie(32,258,258,4096,Q)],o.deflateInit=function(E,J){return ve(E,J,w,15,8,0)},o.deflateInit2=ve,o.deflateReset=fe,o.deflateResetKeep=ce,o.deflateSetHeader=function(E,J){return E&&E.state?E.state.wrap!==2?y:(E.state.gzhead=J,h):y},o.deflate=function(E,J){var W,M,A,B;if(!E||!E.state||5<J||J<0)return E?q(E,y):y;if(M=E.state,!E.output||!E.input&&E.avail_in!==0||M.status===666&&J!==p)return q(E,E.avail_out===0?-5:y);if(M.strm=E,W=M.last_flush,M.last_flush=J,M.status===R)if(M.wrap===2)E.adler=0,K(M,31),K(M,139),K(M,8),M.gzhead?(K(M,(M.gzhead.text?1:0)+(M.gzhead.hcrc?2:0)+(M.gzhead.extra?4:0)+(M.gzhead.name?8:0)+(M.gzhead.comment?16:0)),K(M,255&M.gzhead.time),K(M,M.gzhead.time>>8&255),K(M,M.gzhead.time>>16&255),K(M,M.gzhead.time>>24&255),K(M,M.level===9?2:2<=M.strategy||M.level<2?4:0),K(M,255&M.gzhead.os),M.gzhead.extra&&M.gzhead.extra.length&&(K(M,255&M.gzhead.extra.length),K(M,M.gzhead.extra.length>>8&255)),M.gzhead.hcrc&&(E.adler=l(E.adler,M.pending_buf,M.pending,0)),M.gzindex=0,M.status=69):(K(M,0),K(M,0),K(M,0),K(M,0),K(M,0),K(M,M.level===9?2:2<=M.strategy||M.level<2?4:0),K(M,3),M.status=H);else{var ee=w+(M.w_bits-8<<4)<<8;ee|=(2<=M.strategy||M.level<2?0:M.level<6?1:M.level===6?2:3)<<6,M.strstart!==0&&(ee|=32),ee+=31-ee%31,M.status=H,G(M,ee),M.strstart!==0&&(G(M,E.adler>>>16),G(M,65535&E.adler)),E.adler=1}if(M.status===69)if(M.gzhead.extra){for(A=M.pending;M.gzindex<(65535&M.gzhead.extra.length)&&(M.pending!==M.pending_buf_size||(M.gzhead.hcrc&&M.pending>A&&(E.adler=l(E.adler,M.pending_buf,M.pending-A,A)),L(E),A=M.pending,M.pending!==M.pending_buf_size));)K(M,255&M.gzhead.extra[M.gzindex]),M.gzindex++;M.gzhead.hcrc&&M.pending>A&&(E.adler=l(E.adler,M.pending_buf,M.pending-A,A)),M.gzindex===M.gzhead.extra.length&&(M.gzindex=0,M.status=73)}else M.status=73;if(M.status===73)if(M.gzhead.name){A=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>A&&(E.adler=l(E.adler,M.pending_buf,M.pending-A,A)),L(E),A=M.pending,M.pending===M.pending_buf_size)){B=1;break}B=M.gzindex<M.gzhead.name.length?255&M.gzhead.name.charCodeAt(M.gzindex++):0,K(M,B)}while(B!==0);M.gzhead.hcrc&&M.pending>A&&(E.adler=l(E.adler,M.pending_buf,M.pending-A,A)),B===0&&(M.gzindex=0,M.status=91)}else M.status=91;if(M.status===91)if(M.gzhead.comment){A=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>A&&(E.adler=l(E.adler,M.pending_buf,M.pending-A,A)),L(E),A=M.pending,M.pending===M.pending_buf_size)){B=1;break}B=M.gzindex<M.gzhead.comment.length?255&M.gzhead.comment.charCodeAt(M.gzindex++):0,K(M,B)}while(B!==0);M.gzhead.hcrc&&M.pending>A&&(E.adler=l(E.adler,M.pending_buf,M.pending-A,A)),B===0&&(M.status=103)}else M.status=103;if(M.status===103&&(M.gzhead.hcrc?(M.pending+2>M.pending_buf_size&&L(E),M.pending+2<=M.pending_buf_size&&(K(M,255&E.adler),K(M,E.adler>>8&255),E.adler=0,M.status=H)):M.status=H),M.pending!==0){if(L(E),E.avail_out===0)return M.last_flush=-1,h}else if(E.avail_in===0&&k(J)<=k(W)&&J!==p)return q(E,-5);if(M.status===666&&E.avail_in!==0)return q(E,-5);if(E.avail_in!==0||M.lookahead!==0||J!==d&&M.status!==666){var ne=M.strategy===2?(function(U,oe){for(var ue;;){if(U.lookahead===0&&(le(U),U.lookahead===0)){if(oe===d)return x;break}if(U.match_length=0,ue=a._tr_tally(U,0,U.window[U.strstart]),U.lookahead--,U.strstart++,ue&&(j(U,!1),U.strm.avail_out===0))return x}return U.insert=0,oe===p?(j(U,!0),U.strm.avail_out===0?$:D):U.last_lit&&(j(U,!1),U.strm.avail_out===0)?x:I})(M,J):M.strategy===3?(function(U,oe){for(var ue,se,ae,ge,pe=U.window;;){if(U.lookahead<=F){if(le(U),U.lookahead<=F&&oe===d)return x;if(U.lookahead===0)break}if(U.match_length=0,U.lookahead>=N&&0<U.strstart&&(se=pe[ae=U.strstart-1])===pe[++ae]&&se===pe[++ae]&&se===pe[++ae]){ge=U.strstart+F;do;while(se===pe[++ae]&&se===pe[++ae]&&se===pe[++ae]&&se===pe[++ae]&&se===pe[++ae]&&se===pe[++ae]&&se===pe[++ae]&&se===pe[++ae]&&ae<ge);U.match_length=F-(ge-ae),U.match_length>U.lookahead&&(U.match_length=U.lookahead)}if(U.match_length>=N?(ue=a._tr_tally(U,1,U.match_length-N),U.lookahead-=U.match_length,U.strstart+=U.match_length,U.match_length=0):(ue=a._tr_tally(U,0,U.window[U.strstart]),U.lookahead--,U.strstart++),ue&&(j(U,!1),U.strm.avail_out===0))return x}return U.insert=0,oe===p?(j(U,!0),U.strm.avail_out===0?$:D):U.last_lit&&(j(U,!1),U.strm.avail_out===0)?x:I})(M,J):s[M.level].func(M,J);if(ne!==$&&ne!==D||(M.status=666),ne===x||ne===$)return E.avail_out===0&&(M.last_flush=-1),h;if(ne===I&&(J===1?a._tr_align(M):J!==5&&(a._tr_stored_block(M,0,0,!1),J===3&&(Y(M.head),M.lookahead===0&&(M.strstart=0,M.block_start=0,M.insert=0))),L(E),E.avail_out===0))return M.last_flush=-1,h}return J!==p?h:M.wrap<=0?1:(M.wrap===2?(K(M,255&E.adler),K(M,E.adler>>8&255),K(M,E.adler>>16&255),K(M,E.adler>>24&255),K(M,255&E.total_in),K(M,E.total_in>>8&255),K(M,E.total_in>>16&255),K(M,E.total_in>>24&255)):(G(M,E.adler>>>16),G(M,65535&E.adler)),L(E),0<M.wrap&&(M.wrap=-M.wrap),M.pending!==0?h:1)},o.deflateEnd=function(E){var J;return E&&E.state?(J=E.state.status)!==R&&J!==69&&J!==73&&J!==91&&J!==103&&J!==H&&J!==666?q(E,y):(E.state=null,J===H?q(E,-3):h):y},o.deflateSetDictionary=function(E,J){var W,M,A,B,ee,ne,U,oe,ue=J.length;if(!E||!E.state||(B=(W=E.state).wrap)===2||B===1&&W.status!==R||W.lookahead)return y;for(B===1&&(E.adler=c(E.adler,J,ue,0)),W.wrap=0,ue>=W.w_size&&(B===0&&(Y(W.head),W.strstart=0,W.block_start=0,W.insert=0),oe=new i.Buf8(W.w_size),i.arraySet(oe,J,ue-W.w_size,W.w_size,0),J=oe,ue=W.w_size),ee=E.avail_in,ne=E.next_in,U=E.input,E.avail_in=ue,E.next_in=0,E.input=J,le(W);W.lookahead>=N;){for(M=W.strstart,A=W.lookahead-(N-1);W.ins_h=(W.ins_h<<W.hash_shift^W.window[M+N-1])&W.hash_mask,W.prev[M&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=M,M++,--A;);W.strstart=M,W.lookahead=N-1,le(W)}return W.strstart+=W.lookahead,W.block_start=W.strstart,W.insert=W.lookahead,W.lookahead=0,W.match_length=W.prev_length=N-1,W.match_available=0,E.next_in=ne,E.input=U,E.avail_in=ee,W.wrap=B,h},o.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,o){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,o){r.exports=function(s,i){var a,c,l,f,d,p,h,y,m,v,b,w,_,S,C,O,T,P,N,F,z,R,H,x,I;a=s.state,c=s.next_in,x=s.input,l=c+(s.avail_in-5),f=s.next_out,I=s.output,d=f-(i-s.avail_out),p=f+(s.avail_out-257),h=a.dmax,y=a.wsize,m=a.whave,v=a.wnext,b=a.window,w=a.hold,_=a.bits,S=a.lencode,C=a.distcode,O=(1<<a.lenbits)-1,T=(1<<a.distbits)-1;e:do{_<15&&(w+=x[c++]<<_,_+=8,w+=x[c++]<<_,_+=8),P=S[w&O];t:for(;;){if(w>>>=N=P>>>24,_-=N,(N=P>>>16&255)===0)I[f++]=65535&P;else{if(!(16&N)){if((64&N)==0){P=S[(65535&P)+(w&(1<<N)-1)];continue t}if(32&N){a.mode=12;break e}s.msg="invalid literal/length code",a.mode=30;break e}F=65535&P,(N&=15)&&(_<N&&(w+=x[c++]<<_,_+=8),F+=w&(1<<N)-1,w>>>=N,_-=N),_<15&&(w+=x[c++]<<_,_+=8,w+=x[c++]<<_,_+=8),P=C[w&T];n:for(;;){if(w>>>=N=P>>>24,_-=N,!(16&(N=P>>>16&255))){if((64&N)==0){P=C[(65535&P)+(w&(1<<N)-1)];continue n}s.msg="invalid distance code",a.mode=30;break e}if(z=65535&P,_<(N&=15)&&(w+=x[c++]<<_,(_+=8)<N&&(w+=x[c++]<<_,_+=8)),h<(z+=w&(1<<N)-1)){s.msg="invalid distance too far back",a.mode=30;break e}if(w>>>=N,_-=N,(N=f-d)<z){if(m<(N=z-N)&&a.sane){s.msg="invalid distance too far back",a.mode=30;break e}if(H=b,(R=0)===v){if(R+=y-N,N<F){for(F-=N;I[f++]=b[R++],--N;);R=f-z,H=I}}else if(v<N){if(R+=y+v-N,(N-=v)<F){for(F-=N;I[f++]=b[R++],--N;);if(R=0,v<F){for(F-=N=v;I[f++]=b[R++],--N;);R=f-z,H=I}}}else if(R+=v-N,N<F){for(F-=N;I[f++]=b[R++],--N;);R=f-z,H=I}for(;2<F;)I[f++]=H[R++],I[f++]=H[R++],I[f++]=H[R++],F-=3;F&&(I[f++]=H[R++],1<F&&(I[f++]=H[R++]))}else{for(R=f-z;I[f++]=I[R++],I[f++]=I[R++],I[f++]=I[R++],2<(F-=3););F&&(I[f++]=I[R++],1<F&&(I[f++]=I[R++]))}break}}break}}while(c<l&&f<p);c-=F=_>>3,w&=(1<<(_-=F<<3))-1,s.next_in=c,s.next_out=f,s.avail_in=c<l?l-c+5:5-(c-l),s.avail_out=f<p?p-f+257:257-(f-p),a.hold=w,a.bits=_}},{}],49:[function(n,r,o){var s=n("../utils/common"),i=n("./adler32"),a=n("./crc32"),c=n("./inffast"),l=n("./inftrees"),f=1,d=2,p=0,h=-2,y=1,m=852,v=592;function b(R){return(R>>>24&255)+(R>>>8&65280)+((65280&R)<<8)+((255&R)<<24)}function w(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(R){var H;return R&&R.state?(H=R.state,R.total_in=R.total_out=H.total=0,R.msg="",H.wrap&&(R.adler=1&H.wrap),H.mode=y,H.last=0,H.havedict=0,H.dmax=32768,H.head=null,H.hold=0,H.bits=0,H.lencode=H.lendyn=new s.Buf32(m),H.distcode=H.distdyn=new s.Buf32(v),H.sane=1,H.back=-1,p):h}function S(R){var H;return R&&R.state?((H=R.state).wsize=0,H.whave=0,H.wnext=0,_(R)):h}function C(R,H){var x,I;return R&&R.state?(I=R.state,H<0?(x=0,H=-H):(x=1+(H>>4),H<48&&(H&=15)),H&&(H<8||15<H)?h:(I.window!==null&&I.wbits!==H&&(I.window=null),I.wrap=x,I.wbits=H,S(R))):h}function O(R,H){var x,I;return R?(I=new w,(R.state=I).window=null,(x=C(R,H))!==p&&(R.state=null),x):h}var T,P,N=!0;function F(R){if(N){var H;for(T=new s.Buf32(512),P=new s.Buf32(32),H=0;H<144;)R.lens[H++]=8;for(;H<256;)R.lens[H++]=9;for(;H<280;)R.lens[H++]=7;for(;H<288;)R.lens[H++]=8;for(l(f,R.lens,0,288,T,0,R.work,{bits:9}),H=0;H<32;)R.lens[H++]=5;l(d,R.lens,0,32,P,0,R.work,{bits:5}),N=!1}R.lencode=T,R.lenbits=9,R.distcode=P,R.distbits=5}function z(R,H,x,I){var $,D=R.state;return D.window===null&&(D.wsize=1<<D.wbits,D.wnext=0,D.whave=0,D.window=new s.Buf8(D.wsize)),I>=D.wsize?(s.arraySet(D.window,H,x-D.wsize,D.wsize,0),D.wnext=0,D.whave=D.wsize):(I<($=D.wsize-D.wnext)&&($=I),s.arraySet(D.window,H,x-I,$,D.wnext),(I-=$)?(s.arraySet(D.window,H,x-I,I,0),D.wnext=I,D.whave=D.wsize):(D.wnext+=$,D.wnext===D.wsize&&(D.wnext=0),D.whave<D.wsize&&(D.whave+=$))),0}o.inflateReset=S,o.inflateReset2=C,o.inflateResetKeep=_,o.inflateInit=function(R){return O(R,15)},o.inflateInit2=O,o.inflate=function(R,H){var x,I,$,D,q,k,Y,L,j,K,G,Z,le,te,Q,ie,re,ce,fe,ve,E,J,W,M,A=0,B=new s.Buf8(4),ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!R||!R.state||!R.output||!R.input&&R.avail_in!==0)return h;(x=R.state).mode===12&&(x.mode=13),q=R.next_out,$=R.output,Y=R.avail_out,D=R.next_in,I=R.input,k=R.avail_in,L=x.hold,j=x.bits,K=k,G=Y,J=p;e:for(;;)switch(x.mode){case y:if(x.wrap===0){x.mode=13;break}for(;j<16;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}if(2&x.wrap&&L===35615){B[x.check=0]=255&L,B[1]=L>>>8&255,x.check=a(x.check,B,2,0),j=L=0,x.mode=2;break}if(x.flags=0,x.head&&(x.head.done=!1),!(1&x.wrap)||(((255&L)<<8)+(L>>8))%31){R.msg="incorrect header check",x.mode=30;break}if((15&L)!=8){R.msg="unknown compression method",x.mode=30;break}if(j-=4,E=8+(15&(L>>>=4)),x.wbits===0)x.wbits=E;else if(E>x.wbits){R.msg="invalid window size",x.mode=30;break}x.dmax=1<<E,R.adler=x.check=1,x.mode=512&L?10:12,j=L=0;break;case 2:for(;j<16;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}if(x.flags=L,(255&x.flags)!=8){R.msg="unknown compression method",x.mode=30;break}if(57344&x.flags){R.msg="unknown header flags set",x.mode=30;break}x.head&&(x.head.text=L>>8&1),512&x.flags&&(B[0]=255&L,B[1]=L>>>8&255,x.check=a(x.check,B,2,0)),j=L=0,x.mode=3;case 3:for(;j<32;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}x.head&&(x.head.time=L),512&x.flags&&(B[0]=255&L,B[1]=L>>>8&255,B[2]=L>>>16&255,B[3]=L>>>24&255,x.check=a(x.check,B,4,0)),j=L=0,x.mode=4;case 4:for(;j<16;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}x.head&&(x.head.xflags=255&L,x.head.os=L>>8),512&x.flags&&(B[0]=255&L,B[1]=L>>>8&255,x.check=a(x.check,B,2,0)),j=L=0,x.mode=5;case 5:if(1024&x.flags){for(;j<16;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}x.length=L,x.head&&(x.head.extra_len=L),512&x.flags&&(B[0]=255&L,B[1]=L>>>8&255,x.check=a(x.check,B,2,0)),j=L=0}else x.head&&(x.head.extra=null);x.mode=6;case 6:if(1024&x.flags&&(k<(Z=x.length)&&(Z=k),Z&&(x.head&&(E=x.head.extra_len-x.length,x.head.extra||(x.head.extra=new Array(x.head.extra_len)),s.arraySet(x.head.extra,I,D,Z,E)),512&x.flags&&(x.check=a(x.check,I,Z,D)),k-=Z,D+=Z,x.length-=Z),x.length))break e;x.length=0,x.mode=7;case 7:if(2048&x.flags){if(k===0)break e;for(Z=0;E=I[D+Z++],x.head&&E&&x.length<65536&&(x.head.name+=String.fromCharCode(E)),E&&Z<k;);if(512&x.flags&&(x.check=a(x.check,I,Z,D)),k-=Z,D+=Z,E)break e}else x.head&&(x.head.name=null);x.length=0,x.mode=8;case 8:if(4096&x.flags){if(k===0)break e;for(Z=0;E=I[D+Z++],x.head&&E&&x.length<65536&&(x.head.comment+=String.fromCharCode(E)),E&&Z<k;);if(512&x.flags&&(x.check=a(x.check,I,Z,D)),k-=Z,D+=Z,E)break e}else x.head&&(x.head.comment=null);x.mode=9;case 9:if(512&x.flags){for(;j<16;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}if(L!==(65535&x.check)){R.msg="header crc mismatch",x.mode=30;break}j=L=0}x.head&&(x.head.hcrc=x.flags>>9&1,x.head.done=!0),R.adler=x.check=0,x.mode=12;break;case 10:for(;j<32;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}R.adler=x.check=b(L),j=L=0,x.mode=11;case 11:if(x.havedict===0)return R.next_out=q,R.avail_out=Y,R.next_in=D,R.avail_in=k,x.hold=L,x.bits=j,2;R.adler=x.check=1,x.mode=12;case 12:if(H===5||H===6)break e;case 13:if(x.last){L>>>=7&j,j-=7&j,x.mode=27;break}for(;j<3;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}switch(x.last=1&L,j-=1,3&(L>>>=1)){case 0:x.mode=14;break;case 1:if(F(x),x.mode=20,H!==6)break;L>>>=2,j-=2;break e;case 2:x.mode=17;break;case 3:R.msg="invalid block type",x.mode=30}L>>>=2,j-=2;break;case 14:for(L>>>=7&j,j-=7&j;j<32;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}if((65535&L)!=(L>>>16^65535)){R.msg="invalid stored block lengths",x.mode=30;break}if(x.length=65535&L,j=L=0,x.mode=15,H===6)break e;case 15:x.mode=16;case 16:if(Z=x.length){if(k<Z&&(Z=k),Y<Z&&(Z=Y),Z===0)break e;s.arraySet($,I,D,Z,q),k-=Z,D+=Z,Y-=Z,q+=Z,x.length-=Z;break}x.mode=12;break;case 17:for(;j<14;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}if(x.nlen=257+(31&L),L>>>=5,j-=5,x.ndist=1+(31&L),L>>>=5,j-=5,x.ncode=4+(15&L),L>>>=4,j-=4,286<x.nlen||30<x.ndist){R.msg="too many length or distance symbols",x.mode=30;break}x.have=0,x.mode=18;case 18:for(;x.have<x.ncode;){for(;j<3;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}x.lens[ee[x.have++]]=7&L,L>>>=3,j-=3}for(;x.have<19;)x.lens[ee[x.have++]]=0;if(x.lencode=x.lendyn,x.lenbits=7,W={bits:x.lenbits},J=l(0,x.lens,0,19,x.lencode,0,x.work,W),x.lenbits=W.bits,J){R.msg="invalid code lengths set",x.mode=30;break}x.have=0,x.mode=19;case 19:for(;x.have<x.nlen+x.ndist;){for(;ie=(A=x.lencode[L&(1<<x.lenbits)-1])>>>16&255,re=65535&A,!((Q=A>>>24)<=j);){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}if(re<16)L>>>=Q,j-=Q,x.lens[x.have++]=re;else{if(re===16){for(M=Q+2;j<M;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}if(L>>>=Q,j-=Q,x.have===0){R.msg="invalid bit length repeat",x.mode=30;break}E=x.lens[x.have-1],Z=3+(3&L),L>>>=2,j-=2}else if(re===17){for(M=Q+3;j<M;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}j-=Q,E=0,Z=3+(7&(L>>>=Q)),L>>>=3,j-=3}else{for(M=Q+7;j<M;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}j-=Q,E=0,Z=11+(127&(L>>>=Q)),L>>>=7,j-=7}if(x.have+Z>x.nlen+x.ndist){R.msg="invalid bit length repeat",x.mode=30;break}for(;Z--;)x.lens[x.have++]=E}}if(x.mode===30)break;if(x.lens[256]===0){R.msg="invalid code -- missing end-of-block",x.mode=30;break}if(x.lenbits=9,W={bits:x.lenbits},J=l(f,x.lens,0,x.nlen,x.lencode,0,x.work,W),x.lenbits=W.bits,J){R.msg="invalid literal/lengths set",x.mode=30;break}if(x.distbits=6,x.distcode=x.distdyn,W={bits:x.distbits},J=l(d,x.lens,x.nlen,x.ndist,x.distcode,0,x.work,W),x.distbits=W.bits,J){R.msg="invalid distances set",x.mode=30;break}if(x.mode=20,H===6)break e;case 20:x.mode=21;case 21:if(6<=k&&258<=Y){R.next_out=q,R.avail_out=Y,R.next_in=D,R.avail_in=k,x.hold=L,x.bits=j,c(R,G),q=R.next_out,$=R.output,Y=R.avail_out,D=R.next_in,I=R.input,k=R.avail_in,L=x.hold,j=x.bits,x.mode===12&&(x.back=-1);break}for(x.back=0;ie=(A=x.lencode[L&(1<<x.lenbits)-1])>>>16&255,re=65535&A,!((Q=A>>>24)<=j);){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}if(ie&&(240&ie)==0){for(ce=Q,fe=ie,ve=re;ie=(A=x.lencode[ve+((L&(1<<ce+fe)-1)>>ce)])>>>16&255,re=65535&A,!(ce+(Q=A>>>24)<=j);){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}L>>>=ce,j-=ce,x.back+=ce}if(L>>>=Q,j-=Q,x.back+=Q,x.length=re,ie===0){x.mode=26;break}if(32&ie){x.back=-1,x.mode=12;break}if(64&ie){R.msg="invalid literal/length code",x.mode=30;break}x.extra=15&ie,x.mode=22;case 22:if(x.extra){for(M=x.extra;j<M;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}x.length+=L&(1<<x.extra)-1,L>>>=x.extra,j-=x.extra,x.back+=x.extra}x.was=x.length,x.mode=23;case 23:for(;ie=(A=x.distcode[L&(1<<x.distbits)-1])>>>16&255,re=65535&A,!((Q=A>>>24)<=j);){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}if((240&ie)==0){for(ce=Q,fe=ie,ve=re;ie=(A=x.distcode[ve+((L&(1<<ce+fe)-1)>>ce)])>>>16&255,re=65535&A,!(ce+(Q=A>>>24)<=j);){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}L>>>=ce,j-=ce,x.back+=ce}if(L>>>=Q,j-=Q,x.back+=Q,64&ie){R.msg="invalid distance code",x.mode=30;break}x.offset=re,x.extra=15&ie,x.mode=24;case 24:if(x.extra){for(M=x.extra;j<M;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}x.offset+=L&(1<<x.extra)-1,L>>>=x.extra,j-=x.extra,x.back+=x.extra}if(x.offset>x.dmax){R.msg="invalid distance too far back",x.mode=30;break}x.mode=25;case 25:if(Y===0)break e;if(Z=G-Y,x.offset>Z){if((Z=x.offset-Z)>x.whave&&x.sane){R.msg="invalid distance too far back",x.mode=30;break}le=Z>x.wnext?(Z-=x.wnext,x.wsize-Z):x.wnext-Z,Z>x.length&&(Z=x.length),te=x.window}else te=$,le=q-x.offset,Z=x.length;for(Y<Z&&(Z=Y),Y-=Z,x.length-=Z;$[q++]=te[le++],--Z;);x.length===0&&(x.mode=21);break;case 26:if(Y===0)break e;$[q++]=x.length,Y--,x.mode=21;break;case 27:if(x.wrap){for(;j<32;){if(k===0)break e;k--,L|=I[D++]<<j,j+=8}if(G-=Y,R.total_out+=G,x.total+=G,G&&(R.adler=x.check=x.flags?a(x.check,$,G,q-G):i(x.check,$,G,q-G)),G=Y,(x.flags?L:b(L))!==x.check){R.msg="incorrect data check",x.mode=30;break}j=L=0}x.mode=28;case 28:if(x.wrap&&x.flags){for(;j<32;){if(k===0)break e;k--,L+=I[D++]<<j,j+=8}if(L!==(4294967295&x.total)){R.msg="incorrect length check",x.mode=30;break}j=L=0}x.mode=29;case 29:J=1;break e;case 30:J=-3;break e;case 31:return-4;default:return h}return R.next_out=q,R.avail_out=Y,R.next_in=D,R.avail_in=k,x.hold=L,x.bits=j,(x.wsize||G!==R.avail_out&&x.mode<30&&(x.mode<27||H!==4))&&z(R,R.output,R.next_out,G-R.avail_out)?(x.mode=31,-4):(K-=R.avail_in,G-=R.avail_out,R.total_in+=K,R.total_out+=G,x.total+=G,x.wrap&&G&&(R.adler=x.check=x.flags?a(x.check,$,G,R.next_out-G):i(x.check,$,G,R.next_out-G)),R.data_type=x.bits+(x.last?64:0)+(x.mode===12?128:0)+(x.mode===20||x.mode===15?256:0),(K==0&&G===0||H===4)&&J===p&&(J=-5),J)},o.inflateEnd=function(R){if(!R||!R.state)return h;var H=R.state;return H.window&&(H.window=null),R.state=null,p},o.inflateGetHeader=function(R,H){var x;return R&&R.state?(2&(x=R.state).wrap)==0?h:((x.head=H).done=!1,p):h},o.inflateSetDictionary=function(R,H){var x,I=H.length;return R&&R.state?(x=R.state).wrap!==0&&x.mode!==11?h:x.mode===11&&i(1,H,I,0)!==x.check?-3:z(R,H,I,I)?(x.mode=31,-4):(x.havedict=1,p):h},o.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,o){var s=n("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(f,d,p,h,y,m,v,b){var w,_,S,C,O,T,P,N,F,z=b.bits,R=0,H=0,x=0,I=0,$=0,D=0,q=0,k=0,Y=0,L=0,j=null,K=0,G=new s.Buf16(16),Z=new s.Buf16(16),le=null,te=0;for(R=0;R<=15;R++)G[R]=0;for(H=0;H<h;H++)G[d[p+H]]++;for($=z,I=15;1<=I&&G[I]===0;I--);if(I<$&&($=I),I===0)return y[m++]=20971520,y[m++]=20971520,b.bits=1,0;for(x=1;x<I&&G[x]===0;x++);for($<x&&($=x),R=k=1;R<=15;R++)if(k<<=1,(k-=G[R])<0)return-1;if(0<k&&(f===0||I!==1))return-1;for(Z[1]=0,R=1;R<15;R++)Z[R+1]=Z[R]+G[R];for(H=0;H<h;H++)d[p+H]!==0&&(v[Z[d[p+H]]++]=H);if(T=f===0?(j=le=v,19):f===1?(j=i,K-=257,le=a,te-=257,256):(j=c,le=l,-1),R=x,O=m,q=H=L=0,S=-1,C=(Y=1<<(D=$))-1,f===1&&852<Y||f===2&&592<Y)return 1;for(;;){for(P=R-q,F=v[H]<T?(N=0,v[H]):v[H]>T?(N=le[te+v[H]],j[K+v[H]]):(N=96,0),w=1<<R-q,x=_=1<<D;y[O+(L>>q)+(_-=w)]=P<<24|N<<16|F|0,_!==0;);for(w=1<<R-1;L&w;)w>>=1;if(w!==0?(L&=w-1,L+=w):L=0,H++,--G[R]==0){if(R===I)break;R=d[p+v[H]]}if($<R&&(L&C)!==S){for(q===0&&(q=$),O+=x,k=1<<(D=R-q);D+q<I&&!((k-=G[D+q])<=0);)D++,k<<=1;if(Y+=1<<D,f===1&&852<Y||f===2&&592<Y)return 1;y[S=L&C]=$<<24|D<<16|O-m|0}}return L!==0&&(y[O+L]=R-q<<24|64<<16|0),b.bits=$,0}},{"../utils/common":41}],51:[function(n,r,o){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,o){var s=n("../utils/common"),i=0,a=1;function c(A){for(var B=A.length;0<=--B;)A[B]=0}var l=0,f=29,d=256,p=d+1+f,h=30,y=19,m=2*p+1,v=15,b=16,w=7,_=256,S=16,C=17,O=18,T=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],P=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],z=new Array(2*(p+2));c(z);var R=new Array(2*h);c(R);var H=new Array(512);c(H);var x=new Array(256);c(x);var I=new Array(f);c(I);var $,D,q,k=new Array(h);function Y(A,B,ee,ne,U){this.static_tree=A,this.extra_bits=B,this.extra_base=ee,this.elems=ne,this.max_length=U,this.has_stree=A&&A.length}function L(A,B){this.dyn_tree=A,this.max_code=0,this.stat_desc=B}function j(A){return A<256?H[A]:H[256+(A>>>7)]}function K(A,B){A.pending_buf[A.pending++]=255&B,A.pending_buf[A.pending++]=B>>>8&255}function G(A,B,ee){A.bi_valid>b-ee?(A.bi_buf|=B<<A.bi_valid&65535,K(A,A.bi_buf),A.bi_buf=B>>b-A.bi_valid,A.bi_valid+=ee-b):(A.bi_buf|=B<<A.bi_valid&65535,A.bi_valid+=ee)}function Z(A,B,ee){G(A,ee[2*B],ee[2*B+1])}function le(A,B){for(var ee=0;ee|=1&A,A>>>=1,ee<<=1,0<--B;);return ee>>>1}function te(A,B,ee){var ne,U,oe=new Array(v+1),ue=0;for(ne=1;ne<=v;ne++)oe[ne]=ue=ue+ee[ne-1]<<1;for(U=0;U<=B;U++){var se=A[2*U+1];se!==0&&(A[2*U]=le(oe[se]++,se))}}function Q(A){var B;for(B=0;B<p;B++)A.dyn_ltree[2*B]=0;for(B=0;B<h;B++)A.dyn_dtree[2*B]=0;for(B=0;B<y;B++)A.bl_tree[2*B]=0;A.dyn_ltree[2*_]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0}function ie(A){8<A.bi_valid?K(A,A.bi_buf):0<A.bi_valid&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0}function re(A,B,ee,ne){var U=2*B,oe=2*ee;return A[U]<A[oe]||A[U]===A[oe]&&ne[B]<=ne[ee]}function ce(A,B,ee){for(var ne=A.heap[ee],U=ee<<1;U<=A.heap_len&&(U<A.heap_len&&re(B,A.heap[U+1],A.heap[U],A.depth)&&U++,!re(B,ne,A.heap[U],A.depth));)A.heap[ee]=A.heap[U],ee=U,U<<=1;A.heap[ee]=ne}function fe(A,B,ee){var ne,U,oe,ue,se=0;if(A.last_lit!==0)for(;ne=A.pending_buf[A.d_buf+2*se]<<8|A.pending_buf[A.d_buf+2*se+1],U=A.pending_buf[A.l_buf+se],se++,ne===0?Z(A,U,B):(Z(A,(oe=x[U])+d+1,B),(ue=T[oe])!==0&&G(A,U-=I[oe],ue),Z(A,oe=j(--ne),ee),(ue=P[oe])!==0&&G(A,ne-=k[oe],ue)),se<A.last_lit;);Z(A,_,B)}function ve(A,B){var ee,ne,U,oe=B.dyn_tree,ue=B.stat_desc.static_tree,se=B.stat_desc.has_stree,ae=B.stat_desc.elems,ge=-1;for(A.heap_len=0,A.heap_max=m,ee=0;ee<ae;ee++)oe[2*ee]!==0?(A.heap[++A.heap_len]=ge=ee,A.depth[ee]=0):oe[2*ee+1]=0;for(;A.heap_len<2;)oe[2*(U=A.heap[++A.heap_len]=ge<2?++ge:0)]=1,A.depth[U]=0,A.opt_len--,se&&(A.static_len-=ue[2*U+1]);for(B.max_code=ge,ee=A.heap_len>>1;1<=ee;ee--)ce(A,oe,ee);for(U=ae;ee=A.heap[1],A.heap[1]=A.heap[A.heap_len--],ce(A,oe,1),ne=A.heap[1],A.heap[--A.heap_max]=ee,A.heap[--A.heap_max]=ne,oe[2*U]=oe[2*ee]+oe[2*ne],A.depth[U]=(A.depth[ee]>=A.depth[ne]?A.depth[ee]:A.depth[ne])+1,oe[2*ee+1]=oe[2*ne+1]=U,A.heap[1]=U++,ce(A,oe,1),2<=A.heap_len;);A.heap[--A.heap_max]=A.heap[1],(function(pe,Ne){var tt,Fe,nt,Oe,Gt,Ot,rt=Ne.dyn_tree,On=Ne.max_code,Yt=Ne.stat_desc.static_tree,bt=Ne.stat_desc.has_stree,lr=Ne.stat_desc.extra_bits,In=Ne.stat_desc.extra_base,Ie=Ne.stat_desc.max_length,$e=0;for(Oe=0;Oe<=v;Oe++)pe.bl_count[Oe]=0;for(rt[2*pe.heap[pe.heap_max]+1]=0,tt=pe.heap_max+1;tt<m;tt++)Ie<(Oe=rt[2*rt[2*(Fe=pe.heap[tt])+1]+1]+1)&&(Oe=Ie,$e++),rt[2*Fe+1]=Oe,On<Fe||(pe.bl_count[Oe]++,Gt=0,In<=Fe&&(Gt=lr[Fe-In]),Ot=rt[2*Fe],pe.opt_len+=Ot*(Oe+Gt),bt&&(pe.static_len+=Ot*(Yt[2*Fe+1]+Gt)));if($e!==0){do{for(Oe=Ie-1;pe.bl_count[Oe]===0;)Oe--;pe.bl_count[Oe]--,pe.bl_count[Oe+1]+=2,pe.bl_count[Ie]--,$e-=2}while(0<$e);for(Oe=Ie;Oe!==0;Oe--)for(Fe=pe.bl_count[Oe];Fe!==0;)On<(nt=pe.heap[--tt])||(rt[2*nt+1]!==Oe&&(pe.opt_len+=(Oe-rt[2*nt+1])*rt[2*nt],rt[2*nt+1]=Oe),Fe--)}})(A,B),te(oe,ge,A.bl_count)}function E(A,B,ee){var ne,U,oe=-1,ue=B[1],se=0,ae=7,ge=4;for(ue===0&&(ae=138,ge=3),B[2*(ee+1)+1]=65535,ne=0;ne<=ee;ne++)U=ue,ue=B[2*(ne+1)+1],++se<ae&&U===ue||(se<ge?A.bl_tree[2*U]+=se:U!==0?(U!==oe&&A.bl_tree[2*U]++,A.bl_tree[2*S]++):se<=10?A.bl_tree[2*C]++:A.bl_tree[2*O]++,oe=U,ge=(se=0)===ue?(ae=138,3):U===ue?(ae=6,3):(ae=7,4))}function J(A,B,ee){var ne,U,oe=-1,ue=B[1],se=0,ae=7,ge=4;for(ue===0&&(ae=138,ge=3),ne=0;ne<=ee;ne++)if(U=ue,ue=B[2*(ne+1)+1],!(++se<ae&&U===ue)){if(se<ge)for(;Z(A,U,A.bl_tree),--se!=0;);else U!==0?(U!==oe&&(Z(A,U,A.bl_tree),se--),Z(A,S,A.bl_tree),G(A,se-3,2)):se<=10?(Z(A,C,A.bl_tree),G(A,se-3,3)):(Z(A,O,A.bl_tree),G(A,se-11,7));oe=U,ge=(se=0)===ue?(ae=138,3):U===ue?(ae=6,3):(ae=7,4)}}c(k);var W=!1;function M(A,B,ee,ne){G(A,(l<<1)+(ne?1:0),3),(function(U,oe,ue,se){ie(U),K(U,ue),K(U,~ue),s.arraySet(U.pending_buf,U.window,oe,ue,U.pending),U.pending+=ue})(A,B,ee)}o._tr_init=function(A){W||((function(){var B,ee,ne,U,oe,ue=new Array(v+1);for(U=ne=0;U<f-1;U++)for(I[U]=ne,B=0;B<1<<T[U];B++)x[ne++]=U;for(x[ne-1]=U,U=oe=0;U<16;U++)for(k[U]=oe,B=0;B<1<<P[U];B++)H[oe++]=U;for(oe>>=7;U<h;U++)for(k[U]=oe<<7,B=0;B<1<<P[U]-7;B++)H[256+oe++]=U;for(ee=0;ee<=v;ee++)ue[ee]=0;for(B=0;B<=143;)z[2*B+1]=8,B++,ue[8]++;for(;B<=255;)z[2*B+1]=9,B++,ue[9]++;for(;B<=279;)z[2*B+1]=7,B++,ue[7]++;for(;B<=287;)z[2*B+1]=8,B++,ue[8]++;for(te(z,p+1,ue),B=0;B<h;B++)R[2*B+1]=5,R[2*B]=le(B,5);$=new Y(z,T,d+1,p,v),D=new Y(R,P,0,h,v),q=new Y(new Array(0),N,0,y,w)})(),W=!0),A.l_desc=new L(A.dyn_ltree,$),A.d_desc=new L(A.dyn_dtree,D),A.bl_desc=new L(A.bl_tree,q),A.bi_buf=0,A.bi_valid=0,Q(A)},o._tr_stored_block=M,o._tr_flush_block=function(A,B,ee,ne){var U,oe,ue=0;0<A.level?(A.strm.data_type===2&&(A.strm.data_type=(function(se){var ae,ge=4093624447;for(ae=0;ae<=31;ae++,ge>>>=1)if(1&ge&&se.dyn_ltree[2*ae]!==0)return i;if(se.dyn_ltree[18]!==0||se.dyn_ltree[20]!==0||se.dyn_ltree[26]!==0)return a;for(ae=32;ae<d;ae++)if(se.dyn_ltree[2*ae]!==0)return a;return i})(A)),ve(A,A.l_desc),ve(A,A.d_desc),ue=(function(se){var ae;for(E(se,se.dyn_ltree,se.l_desc.max_code),E(se,se.dyn_dtree,se.d_desc.max_code),ve(se,se.bl_desc),ae=y-1;3<=ae&&se.bl_tree[2*F[ae]+1]===0;ae--);return se.opt_len+=3*(ae+1)+5+5+4,ae})(A),U=A.opt_len+3+7>>>3,(oe=A.static_len+3+7>>>3)<=U&&(U=oe)):U=oe=ee+5,ee+4<=U&&B!==-1?M(A,B,ee,ne):A.strategy===4||oe===U?(G(A,2+(ne?1:0),3),fe(A,z,R)):(G(A,4+(ne?1:0),3),(function(se,ae,ge,pe){var Ne;for(G(se,ae-257,5),G(se,ge-1,5),G(se,pe-4,4),Ne=0;Ne<pe;Ne++)G(se,se.bl_tree[2*F[Ne]+1],3);J(se,se.dyn_ltree,ae-1),J(se,se.dyn_dtree,ge-1)})(A,A.l_desc.max_code+1,A.d_desc.max_code+1,ue+1),fe(A,A.dyn_ltree,A.dyn_dtree)),Q(A),ne&&ie(A)},o._tr_tally=function(A,B,ee){return A.pending_buf[A.d_buf+2*A.last_lit]=B>>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&B,A.pending_buf[A.l_buf+A.last_lit]=255&ee,A.last_lit++,B===0?A.dyn_ltree[2*ee]++:(A.matches++,B--,A.dyn_ltree[2*(x[ee]+d+1)]++,A.dyn_dtree[2*j(B)]++),A.last_lit===A.lit_bufsize-1},o._tr_align=function(A){G(A,2,3),Z(A,_,z),(function(B){B.bi_valid===16?(K(B,B.bi_buf),B.bi_buf=0,B.bi_valid=0):8<=B.bi_valid&&(B.pending_buf[B.pending++]=255&B.bi_buf,B.bi_buf>>=8,B.bi_valid-=8)})(A)}},{"../utils/common":41}],53:[function(n,r,o){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,o){(function(s){(function(i,a){if(!i.setImmediate){var c,l,f,d,p=1,h={},y=!1,m=i.document,v=Object.getPrototypeOf&&Object.getPrototypeOf(i);v=v&&v.setTimeout?v:i,c={}.toString.call(i.process)==="[object process]"?function(S){process.nextTick(function(){w(S)})}:(function(){if(i.postMessage&&!i.importScripts){var S=!0,C=i.onmessage;return i.onmessage=function(){S=!1},i.postMessage("","*"),i.onmessage=C,S}})()?(d="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",_,!1):i.attachEvent("onmessage",_),function(S){i.postMessage(d+S,"*")}):i.MessageChannel?((f=new MessageChannel).port1.onmessage=function(S){w(S.data)},function(S){f.port2.postMessage(S)}):m&&"onreadystatechange"in m.createElement("script")?(l=m.documentElement,function(S){var C=m.createElement("script");C.onreadystatechange=function(){w(S),C.onreadystatechange=null,l.removeChild(C),C=null},l.appendChild(C)}):function(S){setTimeout(w,0,S)},v.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var C=new Array(arguments.length-1),O=0;O<C.length;O++)C[O]=arguments[O+1];var T={callback:S,args:C};return h[p]=T,c(p),p++},v.clearImmediate=b}function b(S){delete h[S]}function w(S){if(y)setTimeout(w,0,S);else{var C=h[S];if(C){y=!0;try{(function(O){var T=O.callback,P=O.args;switch(P.length){case 0:T();break;case 1:T(P[0]);break;case 2:T(P[0],P[1]);break;case 3:T(P[0],P[1],P[2]);break;default:T.apply(a,P)}})(C)}finally{b(S),y=!1}}}}function _(S){S.source===i&&typeof S.data=="string"&&S.data.indexOf(d)===0&&w(+S.data.slice(d.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof ro<"u"?ro:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(pa)),pa.exports}var BS=FS();const YC=Xn(BS),ni=6e4,bo=6e4,Bn=(e,t)=>`${e} ${t}${e===1?"":"s"} ago`;function n1(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?Bn(o,"year"):(o=Math.floor(r/2592e3),o>=1?Bn(o,"month"):(o=Math.floor(r/86400),o>=1?Bn(o,"day"):(o=Math.floor(r/3600),o>=1?Bn(o,"hour"):(o=Math.floor(r/60),o>=1?Bn(o,"minute"):Bn(Math.floor(r),"second")))))}function QC(e,t=Date.now()){return e===null||t-e<ni?"just now":n1(e,t)}function XC(e,t=Date.now()){if(e===null)return bo;const n=Math.max(0,t-e);if(n<ni)return ni-n;const r=n%bo;return r===0?bo:bo-r}function $S({id:e,title:t,tags:n,pinned:r,updatedAt:o,onPinned:s,onDelete:i}){const a=n1(Number(o));return g.jsxs("div",{className:xe("surface-base group relative flex h-full flex-col px-4 py-3.5 transition-colors"),children:[r&&g.jsx("div",{className:"absolute left-1/2 top-0 z-[1] -translate-x-1/2 -translate-y-[38%]",children:g.jsxs("div",{className:"inline-flex h-7 w-7 items-center justify-center rounded-full border border-border-secondary/70 bg-elevated text-fg-tertiary shadow-[0_8px_18px_-14px_rgba(23,29,38,0.32)]",children:[g.jsx(dy,{className:"h-3.5 w-3.5",weight:"fill"}),g.jsx("span",{className:"sr-only",children:"Pinned note"})]})}),g.jsxs("div",{className:"flex h-full flex-col gap-2.5",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2.5",children:[g.jsx("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2.5 gap-y-1",children:g.jsxs(Re,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:["Updated ",a]})}),g.jsx(mw,{button:g.jsx(xw,{label:"Note actions",size:"sm"}),items:[{name:r?"Unpin":"Pin",onClick:()=>s?.()},{name:"Delete",onClick:()=>i?.()}]})]}),g.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-2.5",children:[g.jsx(Re,{as:"div",variant:"body",weight:"semibold",tracking:"tight",className:"leading-[1.45]",children:g.jsx(Wt,{className:"line-clamp-2 transition-colors hover:text-fg-default/85",to:or,params:{id:e},children:t||"Untitled"})}),n.length>0&&g.jsx("div",{className:"flex flex-wrap gap-1.5 pt-0.5",children:n.map(c=>g.jsx(Wt,{to:Ep,params:{id:c.id},search:{page:1},children:g.jsx(Re,{as:"span",variant:"label",weight:"medium",tone:"secondary",className:"inline-flex items-center rounded-full border border-border-subtle bg-transparent px-2 py-0.5 transition-colors hover:bg-hover-subtle hover:text-fg-default",children:c.name})},c.id))})]})]})]},e)}function HS({isOpen:e,title:t,description:n,references:r,confirmLabel:o,onClose:s,onConfirm:i,confirmVariant:a="primary",isConfirming:c=!1}){return g.jsxs(Vt,{isOpen:e,onClose:s,variant:"inspect",children:[g.jsx(Vt.Header,{title:t,onClose:s}),g.jsx(Vt.Body,{children:g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx(Vt.Description,{className:"text-meta font-normal text-fg-secondary",children:n}),g.jsxs("div",{className:"overflow-hidden rounded-[16px] border border-border-subtle bg-hover-subtle/40",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border-subtle px-4 py-3",children:[g.jsx(Re,{as:"p",variant:"micro",weight:"semibold",tracking:"wider",transform:"uppercase",tone:"tertiary",children:"Referenced notes"}),g.jsxs(Re,{as:"p",variant:"label",tone:"tertiary",children:[r.length," ",r.length===1?"note":"notes"]})]}),g.jsx("ul",{className:"flex flex-col",children:r.map((l,f)=>g.jsx("li",{className:f>0?"border-t border-border-subtle":void 0,children:g.jsxs("div",{className:"flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[g.jsx(Re,{as:"p",variant:"body",weight:"medium",className:"min-w-0 flex-1 break-words",children:l.title||"Untitled note"}),g.jsx(At,{asChild:!0,variant:"ghost",size:"sm",className:"self-start sm:self-auto",children:g.jsx(Wt,{to:or,params:{id:l.id},children:"Open note"})})]})},l.id))})]})]})}),g.jsx(Vt.Footer,{children:g.jsxs(i3,{children:[g.jsx(At,{variant:"ghost",size:"sm",onClick:s,disabled:c,children:"Cancel"}),g.jsx(At,{variant:a,size:"sm",onClick:i,isLoading:c,children:o})]})})]})}var Po={exports:{}},zS=Po.exports,nu;function US(){return nu||(nu=1,(function(e,t){(function(n,r){e.exports=r()})(zS,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",c="hour",l="day",f="week",d="month",p="quarter",h="year",y="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={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(x){var I=["th","st","nd","rd"],$=x%100;return"["+x+(I[($-20)%10]||I[$]||I[0])+"]"}},_=function(x,I,$){var D=String(x);return!D||D.length>=I?x:""+Array(I+1-D.length).join($)+x},S={s:_,z:function(x){var I=-x.utcOffset(),$=Math.abs(I),D=Math.floor($/60),q=$%60;return(I<=0?"+":"-")+_(D,2,"0")+":"+_(q,2,"0")},m:function x(I,$){if(I.date()<$.date())return-x($,I);var D=12*($.year()-I.year())+($.month()-I.month()),q=I.clone().add(D,d),k=$-q<0,Y=I.clone().add(D+(k?-1:1),d);return+(-(D+($-q)/(k?q-Y:Y-q))||0)},a:function(x){return x<0?Math.ceil(x)||0:Math.floor(x)},p:function(x){return{M:d,y:h,w:f,d:l,D:y,h:c,m:a,s:i,ms:s,Q:p}[x]||String(x||"").toLowerCase().replace(/s$/,"")},u:function(x){return x===void 0}},C="en",O={};O[C]=w;var T="$isDayjsObject",P=function(x){return x instanceof R||!(!x||!x[T])},N=function x(I,$,D){var q;if(!I)return C;if(typeof I=="string"){var k=I.toLowerCase();O[k]&&(q=k),$&&(O[k]=$,q=k);var Y=I.split("-");if(!q&&Y.length>1)return x(Y[0])}else{var L=I.name;O[L]=I,q=L}return!D&&q&&(C=q),q||!D&&C},F=function(x,I){if(P(x))return x.clone();var $=typeof I=="object"?I:{};return $.date=x,$.args=arguments,new R($)},z=S;z.l=N,z.i=P,z.w=function(x,I){return F(x,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var R=(function(){function x($){this.$L=N($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[T]=!0}var I=x.prototype;return I.parse=function($){this.$d=(function(D){var q=D.date,k=D.utc;if(q===null)return new Date(NaN);if(z.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var Y=q.match(v);if(Y){var L=Y[2]-1||0,j=(Y[7]||"0").substring(0,3);return k?new Date(Date.UTC(Y[1],L,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,j)):new Date(Y[1],L,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,j)}}return new Date(q)})($),this.init()},I.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},I.$utils=function(){return z},I.isValid=function(){return this.$d.toString()!==m},I.isSame=function($,D){var q=F($);return this.startOf(D)<=q&&q<=this.endOf(D)},I.isAfter=function($,D){return F($)<this.startOf(D)},I.isBefore=function($,D){return this.endOf(D)<F($)},I.$g=function($,D,q){return z.u($)?this[D]:this.set(q,$)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function($,D){var q=this,k=!!z.u(D)||D,Y=z.p($),L=function(ie,re){var ce=z.w(q.$u?Date.UTC(q.$y,re,ie):new Date(q.$y,re,ie),q);return k?ce:ce.endOf(l)},j=function(ie,re){return z.w(q.toDate()[ie].apply(q.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(re)),q)},K=this.$W,G=this.$M,Z=this.$D,le="set"+(this.$u?"UTC":"");switch(Y){case h:return k?L(1,0):L(31,11);case d:return k?L(1,G):L(0,G+1);case f:var te=this.$locale().weekStart||0,Q=(K<te?K+7:K)-te;return L(k?Z-Q:Z+(6-Q),G);case l:case y:return j(le+"Hours",0);case c:return j(le+"Minutes",1);case a:return j(le+"Seconds",2);case i:return j(le+"Milliseconds",3);default:return this.clone()}},I.endOf=function($){return this.startOf($,!1)},I.$set=function($,D){var q,k=z.p($),Y="set"+(this.$u?"UTC":""),L=(q={},q[l]=Y+"Date",q[y]=Y+"Date",q[d]=Y+"Month",q[h]=Y+"FullYear",q[c]=Y+"Hours",q[a]=Y+"Minutes",q[i]=Y+"Seconds",q[s]=Y+"Milliseconds",q)[k],j=k===l?this.$D+(D-this.$W):D;if(k===d||k===h){var K=this.clone().set(y,1);K.$d[L](j),K.init(),this.$d=K.set(y,Math.min(this.$D,K.daysInMonth())).$d}else L&&this.$d[L](j);return this.init(),this},I.set=function($,D){return this.clone().$set($,D)},I.get=function($){return this[z.p($)]()},I.add=function($,D){var q,k=this;$=Number($);var Y=z.p(D),L=function(G){var Z=F(k);return z.w(Z.date(Z.date()+Math.round(G*$)),k)};if(Y===d)return this.set(d,this.$M+$);if(Y===h)return this.set(h,this.$y+$);if(Y===l)return L(1);if(Y===f)return L(7);var j=(q={},q[a]=r,q[c]=o,q[i]=n,q)[Y]||1,K=this.$d.getTime()+$*j;return z.w(K,this)},I.subtract=function($,D){return this.add(-1*$,D)},I.format=function($){var D=this,q=this.$locale();if(!this.isValid())return q.invalidDate||m;var k=$||"YYYY-MM-DDTHH:mm:ssZ",Y=z.z(this),L=this.$H,j=this.$m,K=this.$M,G=q.weekdays,Z=q.months,le=q.meridiem,te=function(re,ce,fe,ve){return re&&(re[ce]||re(D,k))||fe[ce].slice(0,ve)},Q=function(re){return z.s(L%12||12,re,"0")},ie=le||function(re,ce,fe){var ve=re<12?"AM":"PM";return fe?ve.toLowerCase():ve};return k.replace(b,(function(re,ce){return ce||(function(fe){switch(fe){case"YY":return String(D.$y).slice(-2);case"YYYY":return z.s(D.$y,4,"0");case"M":return K+1;case"MM":return z.s(K+1,2,"0");case"MMM":return te(q.monthsShort,K,Z,3);case"MMMM":return te(Z,K);case"D":return D.$D;case"DD":return z.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return te(q.weekdaysMin,D.$W,G,2);case"ddd":return te(q.weekdaysShort,D.$W,G,3);case"dddd":return G[D.$W];case"H":return String(L);case"HH":return z.s(L,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return ie(L,j,!0);case"A":return ie(L,j,!1);case"m":return String(j);case"mm":return z.s(j,2,"0");case"s":return String(D.$s);case"ss":return z.s(D.$s,2,"0");case"SSS":return z.s(D.$ms,3,"0");case"Z":return Y}return null})(re)||Y.replace(":","")}))},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function($,D,q){var k,Y=this,L=z.p(D),j=F($),K=(j.utcOffset()-this.utcOffset())*r,G=this-j,Z=function(){return z.m(Y,j)};switch(L){case h:k=Z()/12;break;case d:k=Z();break;case p:k=Z()/3;break;case f:k=(G-K)/6048e5;break;case l:k=(G-K)/864e5;break;case c:k=G/o;break;case a:k=G/r;break;case i:k=G/n;break;default:k=G}return q?k:z.a(k)},I.daysInMonth=function(){return this.endOf(d).$D},I.$locale=function(){return O[this.$L]},I.locale=function($,D){if(!$)return this.$L;var q=this.clone(),k=N($,D,!0);return k&&(q.$L=k),q},I.clone=function(){return z.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},x})(),H=R.prototype;return F.prototype=H,[["$ms",s],["$s",i],["$m",a],["$H",c],["$W",l],["$M",d],["$y",h],["$D",y]].forEach((function(x){H[x[1]]=function(I){return this.$g(I,x[0],x[1])}})),F.extend=function(x,I){return x.$i||(x(I,R,F),x.$i=!0),F},F.locale=N,F.isDayjs=P,F.unix=function(x){return F(1e3*x)},F.en=O[C],F.Ls=O,F.p={},F}))})(Po)),Po.exports}var VS=US();const Ye=Xn(VS),ZS=()=>{const e=new Date,t=e.getDate(),n=e.getMonth(),r=e.getFullYear(),s=new Date(r,n,1).getDay();return Math.ceil((t+s)/7)},WS=()=>[{name:"Year",template:"year",replacement:Ye().format("YYYY")},{name:"Month",template:"month",replacement:Ye().format("MM")},{name:"Short Month",template:"mon",replacement:Ye().format("M")},{name:"Day",template:"day",replacement:Ye().format("DD")},{name:"Short Day",template:"d",replacement:Ye().format("D")},{name:"Week of Month",template:"week_of_month",replacement:ZS().toString()},{name:"Hour 24",template:"hour",replacement:Ye().format("HH")},{name:"Hour 12",template:"hour_12",replacement:Ye().format("hh")},{name:"Short Hour 24",template:"h",replacement:Ye().format("H")},{name:"Short Hour 12",template:"h_12",replacement:Ye().format("h")},{name:"AM/PM",template:"ampm",replacement:Ye().format("A")},{name:"Minute",template:"minute",replacement:Ye().format("mm")},{name:"Short Minute",template:"m",replacement:Ye().format("m")},{name:"Second",template:"second",replacement:Ye().format("ss")},{name:"Short Second",template:"s",replacement:Ye().format("s")}],qS="{%",KS="%}",ru=e=>e.replace(new RegExp(`${qS}([^}]+)${KS}`,"g"),(t,n)=>WS().find(o=>o.template===n)?.replacement||t),wo={title:"Move note to Trash?",description:"This note is referenced by the notes below. Those links may stop opening while this note stays in Trash. If you restore this note later, the links will work again.",confirmLabel:"Move to Trash",confirmVariant:"soft-danger"},r1=()=>{const e=mf(),t=vf(),n=er(),r=Pn(),[o,s]=u.useState(null),i=async(d="",p="",h)=>{const y=ru(d),m=ru(p),v=await CS({title:y,content:m,...h&&{layout:h}});return v.type==="error"?(t(v.errors[0].message),null):(r({to:or,params:{id:v.createNote.id}}),v.createNote.id)},a=async(d,p,h)=>{try{const y=await RS(d,!p);if(y.type==="error"){t(y.errors[0].message);return}await Promise.all([n.invalidateQueries({queryKey:Me.notes.listAll(),exact:!1}),n.invalidateQueries({queryKey:Me.notes.tagListAll(),exact:!1}),n.invalidateQueries({queryKey:Me.notes.pinned(),exact:!0})]),h?.()}catch{t("Failed to update note pin status")}},c=async(d,p)=>{const h=await AS(d);if(h.type==="error"){t(h.errors[0].message);return}await Promise.all([n.invalidateQueries({queryKey:Me.notes.all(),exact:!1}),n.invalidateQueries({queryKey:Me.tags.all(),exact:!1}),n.invalidateQueries({queryKey:Me.reminders.all(),exact:!1}),n.invalidateQueries({queryKey:Me.images.all(),exact:!1}),n.invalidateQueries({queryKey:["calendar"],exact:!1})]),t("The note has been moved to trash."),p?.()},l=async()=>{if(!o)return;const{id:d,callback:p}=o;s(null),await c(d,p)};return{onCreate:i,onPinned:a,onDelete:async(d,p)=>{const h=await SS(d);if(h.type==="error"){t("Failed to check linked notes before moving this note to Trash.");return}if(n.setQueryData(Me.notes.backReferences(d),h.backReferences),h.backReferences.length>0){s({id:d,callback:p,backReferences:h.backReferences});return}await e("Move this note to trash?")&&await c(d,p)},deleteWarningDialog:g.jsx(HS,{isOpen:!!o,title:wo.title,description:wo.description,references:o?.backReferences??[],confirmLabel:wo.confirmLabel,confirmVariant:wo.confirmVariant,onClose:()=>s(null),onConfirm:()=>{l()}})}},GS="p-3 pb-0",YS="focus-ring-soft surface-base group flex w-full items-center justify-between gap-2.5 px-3 py-2.5 text-left text-fg-default outline-none transition-colors hover:bg-hover-subtle",QS="flex items-center gap-2.5",XS="inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-[13px] bg-cta text-fg-on-filled",JS="flex flex-col",e5="h-4 w-4 text-fg-tertiary transition-colors group-hover:text-fg-default",t5=()=>{const{onCreate:e}=r1();return g.jsx("div",{className:GS,children:g.jsxs("button",{type:"button",className:YS,onClick:()=>e(),children:[g.jsxs("span",{className:QS,children:[g.jsx("span",{className:XS,children:g.jsx(uy,{className:"h-4.5 w-4.5",weight:"bold"})}),g.jsxs("span",{className:JS,children:[g.jsx(Re,{variant:"meta",weight:"semibold",tracking:"tight",children:"Capture"}),g.jsx(Re,{variant:"label",tone:"secondary",children:"Open a new note"})]})]}),g.jsx(_r,{className:e5,weight:"bold"})]})})},n5=e=>{const[t,n]=u.useState(!1),r=u.useRef(null),o=u.useRef(!0),s=u.useRef(0),i=u.useCallback(()=>{r.current!==null&&(clearTimeout(r.current),r.current=null)},[]);u.useEffect(()=>(o.current=!0,()=>{o.current=!1,i()}),[i]);const a=u.useCallback(c=>{s.current+=1;const l=s.current;i(),o.current&&n(!0),r.current=setTimeout(()=>{r.current=null,Promise.resolve().then(c).catch(()=>{}).finally(()=>{o.current&&s.current===l&&n(!1)})},e)},[i,e]);return[t,a]},r5="flex flex-col gap-2.5",o5="overflow-hidden rounded-[14px] border border-border-subtle bg-elevated transition-colors focus-within:border-border-focus focus-within:shadow-[0_0_0_4px_color-mix(in_srgb,var(--accent-soft-primary)_90%,transparent)]",s5="grid-search-bar grid items-center border-b border-transparent px-2.5 py-1.5 transition-colors",a5="border-border-subtle/70",i5="",ou="flex h-10 items-center justify-center text-fg-tertiary transition-colors hover:text-fg-default sm:h-8",c5="h-10 w-full bg-transparent py-2 text-meta text-fg-default outline-none placeholder:text-fg-placeholder sm:h-8 sm:py-1.5",l5="max-h-[min(48vh,320px)] overflow-y-auto px-1 py-1.5",su="focus-ring-soft flex min-h-10 items-center gap-2 rounded-[10px] px-2.5 py-2 outline-none transition-colors hover:bg-hover-subtle sm:min-h-0 sm:px-2 sm:py-1.5",u5="min-w-0 flex-1",d5="mt-1 border-t border-border-subtle/50 px-2 pb-0.5 pt-1.5",f5="focus-ring-soft flex min-h-9 items-center gap-1.5 rounded-[10px] text-fg-secondary outline-none transition-colors hover:text-fg-default",h5=()=>{const e=Pn(),[t,n]=u.useState(""),[r,o]=u.useState([]),[s,i]=u.useState(!1),a=u.useRef(0),[,c]=n5(500);u.useEffect(()=>{const m=t.trim();if(m.length<=0){a.current+=1,c(()=>{}),o([]),i(!1);return}const v=a.current+1;a.current=v,o([]),i(!0),c(()=>{t1({query:m,limit:5}).then(b=>{a.current===v&&(o(b.type==="success"?b.allNotes.notes:[]),i(!1))},()=>{a.current===v&&(o([]),i(!1))})})},[t,c]);const l=m=>{m?.preventDefault();const v=t.trim();v.length<=0||e({to:wp,search:{query:v,page:1}})},f=()=>{n("")},d=t.trim().length>0,p=r.length>0,h=d,y=d&&!s&&!p;return g.jsx("div",{className:"p-3",children:g.jsx("form",{className:r5,onSubmit:l,children:g.jsxs("div",{className:o5,children:[g.jsxs("div",{className:`${s5} ${p?a5:i5}`,children:[g.jsx("button",{type:"submit","aria-label":"Search notes",className:ou,children:g.jsx(ly,{className:"h-4.5 w-4.5",weight:"bold"})}),g.jsx("input",{type:"text",placeholder:"Search notes",value:t,onChange:m=>n(m.target.value),className:c5}),t&&g.jsx("button",{type:"button","aria-label":"Clear search",className:ou,onClick:f,children:g.jsx(Ci,{className:"h-4 w-4",weight:"bold"})})]}),(h||y)&&g.jsxs("div",{className:l5,children:[s&&g.jsx("div",{children:[.34,.3,.26,.22,.18].map(m=>g.jsxs("div",{className:su,"aria-hidden":"true",children:[g.jsx(tl,{className:"h-3.5 w-3.5 shrink-0 text-fg-tertiary opacity-50"}),g.jsx(Lt,{height:"21px",opacity:m,className:"min-w-0 flex-1"})]},m))}),y&&g.jsx(Re,{as:"div",variant:"meta",tone:"secondary",className:"px-2 py-2",children:"No quick matches."}),r.length>0&&g.jsx("div",{children:r.map(({id:m,title:v})=>g.jsxs(Wt,{to:or,params:{id:m},className:su,children:[g.jsx(tl,{className:"h-3.5 w-3.5 shrink-0 text-fg-tertiary"}),g.jsx(Re,{as:"span",truncate:!0,variant:"meta",weight:"medium",className:u5,children:v||"Untitled"})]},m))}),g.jsx("div",{className:d5,children:g.jsxs("button",{type:"submit",className:f5,children:[g.jsx(Re,{as:"span",variant:"meta",weight:"medium",className:"text-current",children:"View all results"}),g.jsx(_r,{className:"h-3.5 w-3.5",weight:"bold"})]})})]})]})})})},p5=[{name:"Notes",path:Jr,icon:of},{name:"Views",path:gp,icon:ay},{name:"Graph",path:bp,icon:my},{name:"Calendar",path:vp,icon:ty},{name:"Reminders",path:yp,icon:ey},{name:"Tags",path:xp,icon:py},{name:"Setting",path:_p,icon:iy}],m5=()=>{const e=ds({select:t=>t.pathname});return g.jsx("nav",{"aria-label":"Primary navigation",className:"flex items-center gap-1 px-4 py-2.5",children:p5.map((t,n)=>{const r=e===t.path||t.path!==Jr&&e.startsWith(`${t.path}/`);return g.jsxs(u.Fragment,{children:[n>0&&g.jsx("span",{className:"h-3.5 w-px shrink-0 bg-border-subtle"}),g.jsx(Wt,{to:t.path,children:g.jsxs("div",{className:`flex min-w-26 items-center justify-center gap-2 border-b px-2 py-2 transition-colors ${r?"border-fg-muted text-fg-default":"border-transparent text-fg-secondary hover:border-border-subtle hover:text-fg-default"}`,children:[g.jsx(t.icon,{className:"size-5",weight:r?"fill":"regular"}),g.jsx(Re,{as:"span",variant:"meta",weight:"medium",className:"text-current",children:t.name})]})})]},t.path)})})},g5=({children:e})=>g.jsx(_E,{sidebar:g.jsxs(g.Fragment,{children:[g.jsx(NE,{}),g.jsx(t5,{}),g.jsx(h5,{}),g.jsx(jS,{}),g.jsx(hE,{})]}),topNavigation:g.jsx(m5,{}),children:e}),o1=100,s1=[50,o1,200];function JC(e){return s1.includes(e)}const v5=["updatedAt","createdAt"],y5=["referenceCount","name"],a1=["asc","desc"],b5=["create","update"],Ls=e=>Array.isArray(e)?e[0]:e,cn=(e,t,{min:n=1,max:r=Number.MAX_SAFE_INTEGER}={})=>{const o=Ls(e),s=typeof o=="number"?o:typeof o=="string"?Number(o):Number.NaN;return!Number.isInteger(s)||s<n||s>r?t:s},i1=(e,t,n)=>{const r=cn(e,Number.NaN);return t.includes(r)?r:n},w5=(e,t=!1)=>{const n=Ls(e);return n===!0||n==="true"?!0:n===!1||n==="false"?!1:t},js=(e,t="")=>{const n=Ls(e);return typeof n=="string"?n:t},Br=(e,t,n)=>{const r=Ls(e);return typeof r!="string"?n:t.includes(r)?r:n},x5=e=>({page:cn(e.page,1),limit:i1(e.limit,nc,Ms),sortBy:Br(e.sortBy,v5,"updatedAt"),sortOrder:Br(e.sortOrder,a1,"desc"),pinnedFirst:w5(e.pinnedFirst,!1)}),cr=e=>({page:cn(e.page,1)}),E5=e=>({page:cn(e.page,1),query:js(e.query,"")}),_5=e=>({page:cn(e.page,1),query:js(e.query,""),limit:i1(e.limit,s1,o1),sortBy:Br(e.sortBy,y5,"referenceCount"),sortOrder:Br(e.sortOrder,a1,"desc")}),S5=e=>({year:cn(e.year,Ye().year(),{min:1970,max:9999}),month:cn(e.month,Ye().month()+1,{min:1,max:12}),type:Br(e.type,b5,"create")}),C5=e=>{const t=js(e.selected,"").trim();return t?{selected:t}:{}},R5=e=>({page:cn(e.page,1),sectionId:js(e.sectionId,"")}),au=cg(Jr);function A5(){const e=au.useNavigate(),{limit:t,page:n,sortBy:r,sortOrder:o,pinnedFirst:s}=au.useSearch(),{onDelete:i,onPinned:a,deleteWarningDialog:c}=r1(),l=f=>{e({search:d=>({...d,...f})})};return g.jsxs(Ns,{title:"",variant:"none",children:[g.jsxs("div",{className:"flex flex-col gap-5",children:[g.jsx(l3,{itemsPerPage:t,onItemsPerPageChange:f=>l({limit:f,page:1}),sortBy:r,onSortByChange:f=>l({sortBy:f,page:1}),sortOrder:o,onSortOrderChange:f=>l({sortOrder:f,page:1}),pinnedFirst:s,onPinnedFirstChange:f=>l({pinnedFirst:f,page:1})}),g.jsx(Cp,{fallback:g.jsxs("div",{className:"grid-auto-cards grid gap-5",children:[g.jsx(Lt,{height:"112px"}),g.jsx(Lt,{height:"112px"}),g.jsx(Lt,{height:"112px"})]}),errorTitle:"Failed to load notes",errorDescription:"Retry loading the current note list.",resetKeys:[n,t,r,o,s],children:g.jsx(PS,{searchParams:{offset:(n-1)*t,limit:t,sortBy:r,sortOrder:o,pinnedFirst:s},render:({notes:f,totalCount:d})=>g.jsx(Tl,{fallback:g.jsx(y0,{title:"Ocean is calm",description:"Capture anything and make waves in the ocean!"}),children:f.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"grid-auto-cards grid gap-5",children:f.map(p=>g.jsx($S,{...p,onPinned:()=>a(p.id,p.pinned),onDelete:()=>i(p.id)},p.id))}),g.jsx(Tl,{fallback:null,children:d&&t<d&&g.jsx(w0,{page:n,last:Math.ceil(d/t),onChange:p=>{l({page:p})}})})]})})})})]}),c]})}const qe=fg({component:()=>g.jsx(g5,{children:g.jsx(Iu,{})}),errorComponent:eE,notFoundComponent:tE}),T5=We({getParentRoute:()=>qe,path:Jr,component:A5,validateSearch:x5}),P5=We({getParentRoute:()=>qe,path:vp,component:et(()=>Je(()=>import("./Calendar-COrN6Hjv.js"),__vite__mapDeps([0,1,2,3,4]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading calendar",description:"Preparing note and reminder snapshots."}),validateSearch:S5}),M5=We({getParentRoute:()=>qe,path:gp,component:et(()=>Je(()=>import("./Views-DR5jT23G.js"),__vite__mapDeps([5,1,2,3,6,7,8,9,10]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading views",description:"Preparing your saved dashboards."})}),N5=We({getParentRoute:()=>qe,path:yp,component:et(()=>Je(()=>import("./Reminders-BYG5rz1M.js"),__vite__mapDeps([11,1,2,3,12]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading reminders",description:"Collecting upcoming reminder cards."}),validateSearch:cr}),O5=We({getParentRoute:()=>qe,path:bp,component:et(()=>Je(()=>import("./Graph-BH1fzhue.js"),__vite__mapDeps([13,1,2,3,9]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading graph",description:"Preparing the linked note constellation."}),validateSearch:C5}),I5=We({getParentRoute:()=>qe,path:wp,component:et(()=>Je(()=>import("./Search-DBWsIMDP.js"),__vite__mapDeps([14,1,2,3]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading search",description:"Preparing indexed note results."}),validateSearch:E5}),k5=We({getParentRoute:()=>qe,path:xp,component:et(()=>Je(()=>import("./Tag-5aCfSO8Y.js"),__vite__mapDeps([15,1,2,3,6]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading tags",description:"Preparing the tag catalog."}),validateSearch:_5}),D5=We({getParentRoute:()=>qe,path:or,component:et(()=>Je(()=>import("./Note-C143cKKw.js"),__vite__mapDeps([16,1,2,3,4,8,12,10,17,18,6]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading note",description:"Preparing the editor and note content."})}),L5=We({getParentRoute:()=>qe,path:Ep,component:et(()=>Je(()=>import("./TagNotes-BPZjN-6l.js"),__vite__mapDeps([19,1,2,3]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading tagged notes",description:"Preparing notes for the selected tag."}),validateSearch:cr}),j5=We({getParentRoute:()=>qe,path:Z3,component:et(()=>Je(()=>import("./ViewNotes-DGLNF96x.js"),__vite__mapDeps([20,1,2,3,6,7]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading view notes",description:"Preparing notes for this saved view section."}),validateSearch:R5}),F5=We({getParentRoute:()=>qe,path:_p,component:et(()=>Je(()=>import("./index-DGIAh3ZY.js"),__vite__mapDeps([21,1,2,3,22,23,24]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading settings",description:"Preparing workspace preferences."})}),B5=We({getParentRoute:()=>qe,path:W3,component:et(()=>Je(()=>import("./mcp-EDurbggR.js"),__vite__mapDeps([25,1,2,3,22,18]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading MCP settings",description:"Preparing MCP access controls."})}),$5=We({getParentRoute:()=>qe,path:q3,component:et(()=>Je(()=>import("./trash-C5ntddLu.js"),__vite__mapDeps([26,1,2,3,8]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading trash",description:"Preparing deleted notes for restore."}),validateSearch:cr}),H5=We({getParentRoute:()=>qe,path:K3,component:et(()=>Je(()=>import("./manage-image-RqtWKas2.js"),__vite__mapDeps([27,1,2,3,17,28,8,24]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading image manager",description:"Preparing uploaded image metadata."}),validateSearch:cr}),z5=We({getParentRoute:()=>qe,path:G3,component:et(()=>Je(()=>import("./manage-image-detail-BTSIbLlQ.js"),__vite__mapDeps([29,1,2,3,17,28,8,24,23]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading image detail",description:"Preparing references for the selected image."})}),U5=We({getParentRoute:()=>qe,path:Q3,component:et(()=>Je(()=>import("./properties-BjrZvOYn.js"),__vite__mapDeps([30,1,2,3]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading properties",description:"Preparing shared property definitions."}),validateSearch:cr}),V5=We({getParentRoute:()=>qe,path:Y3,component:et(()=>Je(()=>import("./placeholder-DeKgSBnC.js"),__vite__mapDeps([31,1,2,3,8,10]))),pendingComponent:()=>g.jsx(Ge,{title:"Loading placeholders",description:"Preparing template replacement rules."}),validateSearch:cr}),Z5=qe.addChildren([T5,M5,P5,N5,O5,I5,k5,D5,L5,j5,F5,B5,$5,H5,z5,V5,U5]),W5=wg({routeTree:Z5,defaultPendingComponent:()=>g.jsx(Ge,{title:"Loading page",description:"Preparing the next route."})});function q5(){const e=Qo(n=>n.setSystemTheme),t=Qo(n=>n.setTheme);return u.useEffect(()=>{const n=Yo();return n&&t(n),C1.listenThemeChange(r=>{Yo()||e(r?"dark":"light")},n==null)},[e,t]),g.jsx(h8,{children:g.jsx(_g,{router:W5})})}const c1="__oceanBrainCsrfRetry";let ma;const K5=e=>!Se.isAxiosError(e)||e.response?.status!==403?!1:e.response.data?.code==="CSRF_TOKEN_INVALID",l1=e=>{if(!K5(e)||!Se.isAxiosError(e))return!1;const t=e.config;return!!(t&&!t[c1])},G5=()=>(ma??=Vo().finally(()=>{ma=void 0}),ma),iu=(e,t)=>{if(!e)return;const n=e;if(typeof n.delete=="function"){n.delete(t);return}delete e[t]},Y5=e=>{iu(e.headers,"X-XSRF-TOKEN"),iu(e.headers,"x-xsrf-token")},Q5=async e=>{if(!l1(e)||!Se.isAxiosError(e))return Promise.reject(e);const t=e.config;return t[c1]=!0,await G5()!=="active"?Promise.reject(e):(Y5(t),Se.request(t))};let cu;const X5=()=>{cu===void 0&&(cu=Se.interceptors.response.use(e=>e,e=>{if(Z6(e))Bf();else if(l1(e))return Q5(e);return Promise.reject(e)}))};Qo.setState({theme:fE()});X5();Vo();x1.createRoot(document.getElementById("root")).render(g.jsx(X.StrictMode,{children:g.jsx(q5,{})}));export{Qo as $,jr as A,At as B,vp as C,mw as D,b0 as E,i3 as F,mf as G,bS as H,vw as I,dc as J,lc as K,Wt as L,Vt as M,or as N,DC as O,Ns as P,y0 as Q,nS as R,Ao as S,Re as T,iS as U,Z3 as V,oy as W,Wf as X,Cp as Y,w0 as Z,yp as _,ey as a,yx as a$,my as a0,ly as a1,Ci as a2,bp as a3,rc as a4,Ku as a5,GC as a6,ze as a7,PS as a8,wp as a9,AC as aA,IC as aB,XC as aC,u8 as aD,r1 as aE,q3 as aF,dy as aG,QC as aH,CS as aI,ru as aJ,BC as aK,cw as aL,lw as aM,m0 as aN,pw as aO,v0 as aP,g0 as aQ,Q3 as aR,iy as aS,py as aT,OC as aU,$S as aV,gp as aW,Y3 as aX,uy as aY,K3 as aZ,W3 as a_,n5 as aa,of as ab,s1 as ac,o1 as ad,JC as ae,fy as af,Tl as ag,Ep as ah,xp as ai,it as aj,SS as ak,YC as al,PC as am,HC as an,s2 as ao,VC as ap,UC as aq,zC as ar,wx as as,Nx as at,Ox as au,ny as av,cy as aw,t1 as ax,Pn as ay,$C as az,ty as b,Se as b0,ZC as b1,qC as b2,KC as b3,HS as b4,WC as b5,G3 as b6,Ga as b7,kC as b8,ME as b9,LC as ba,jC as bb,FC as bc,WS as bd,qS as be,KS as bf,Ke as bg,xe as c,Ye as d,zn as e,Xs as f,_r as g,Pe as h,Lt as i,cg as j,er as k,xw as l,vf as m,WE as n,zl as o,b_ as p,Me as q,K_ as r,tl as s,n1 as t,o2 as u,MC as v,KE as w,lS as x,NC as y,gS as z};
|