ocean-brain 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ocean-brain might be problematic. Click here for more details.

Files changed (66) hide show
  1. package/dist/index.js +41 -0
  2. package/package.json +32 -0
  3. package/server/client/dist/assets/index-BBmw_0Bo.css +1 -0
  4. package/server/client/dist/assets/index-TKn2sngc.js +393 -0
  5. package/server/client/dist/assets/module-RjUF93sV.js +716 -0
  6. package/server/client/dist/assets/native-48B9X9Wg.js +1 -0
  7. package/server/client/dist/assets/note-core-DTIu0anW.js +178 -0
  8. package/server/client/dist/assets/note-vendor-DhbUD4OO.js +54 -0
  9. package/server/client/dist/fonts/Pretendard-Bold.woff +0 -0
  10. package/server/client/dist/fonts/Pretendard-Bold.woff2 +0 -0
  11. package/server/client/dist/fonts/Pretendard-Regular.woff +0 -0
  12. package/server/client/dist/fonts/Pretendard-Regular.woff2 +0 -0
  13. package/server/client/dist/icon.png +0 -0
  14. package/server/client/dist/index.html +19 -0
  15. package/server/dist/app.js +18 -0
  16. package/server/dist/app.js.map +1 -0
  17. package/server/dist/main.js +5 -0
  18. package/server/dist/main.js.map +1 -0
  19. package/server/dist/models.js +8 -0
  20. package/server/dist/models.js.map +1 -0
  21. package/server/dist/modules/auth.js +16 -0
  22. package/server/dist/modules/auth.js.map +1 -0
  23. package/server/dist/modules/graphql.js +7 -0
  24. package/server/dist/modules/graphql.js.map +1 -0
  25. package/server/dist/modules/logger.js +72 -0
  26. package/server/dist/modules/logger.js.map +1 -0
  27. package/server/dist/modules/use-async.js +13 -0
  28. package/server/dist/modules/use-async.js.map +1 -0
  29. package/server/dist/paths.js +14 -0
  30. package/server/dist/paths.js.map +1 -0
  31. package/server/dist/schema/cache/index.js +58 -0
  32. package/server/dist/schema/cache/index.js.map +1 -0
  33. package/server/dist/schema/image/index.js +88 -0
  34. package/server/dist/schema/image/index.js.map +1 -0
  35. package/server/dist/schema/index.js +30 -0
  36. package/server/dist/schema/index.js.map +1 -0
  37. package/server/dist/schema/note/index.js +400 -0
  38. package/server/dist/schema/note/index.js.map +1 -0
  39. package/server/dist/schema/placeholder/index.js +105 -0
  40. package/server/dist/schema/placeholder/index.js.map +1 -0
  41. package/server/dist/schema/reminder/index.js +161 -0
  42. package/server/dist/schema/reminder/index.js.map +1 -0
  43. package/server/dist/schema/tag/index.js +81 -0
  44. package/server/dist/schema/tag/index.js.map +1 -0
  45. package/server/dist/types/index.js +2 -0
  46. package/server/dist/types/index.js.map +1 -0
  47. package/server/dist/types/input.js +1 -0
  48. package/server/dist/types/input.js.map +1 -0
  49. package/server/dist/urls.js +8 -0
  50. package/server/dist/urls.js.map +1 -0
  51. package/server/dist/views/image.js +101 -0
  52. package/server/dist/views/image.js.map +1 -0
  53. package/server/dist/views/index.js +2 -0
  54. package/server/dist/views/index.js.map +1 -0
  55. package/server/prisma/migrations/20230521193126_0000/migration.sql +24 -0
  56. package/server/prisma/migrations/20240317022222_0001/migration.sql +8 -0
  57. package/server/prisma/migrations/20240317094153_0002/migration.sql +8 -0
  58. package/server/prisma/migrations/20240318110450_0003/migration.sql +21 -0
  59. package/server/prisma/migrations/20240414044922_0004/migration.sql +15 -0
  60. package/server/prisma/migrations/20241115130540_0005/migration.sql +25 -0
  61. package/server/prisma/migrations/20250416124833_0006/migration.sql +29 -0
  62. package/server/prisma/migrations/20250711131318_0007/migration.sql +12 -0
  63. package/server/prisma/migrations/20251024192500_0008/migration.sql +2 -0
  64. package/server/prisma/migrations/20251026050237_0009/migration.sql +18 -0
  65. package/server/prisma/migrations/migration_lock.toml +3 -0
  66. package/server/prisma/schema.prisma +78 -0
@@ -0,0 +1,393 @@
1
+ import{r as d,R as ts,a as Mn,j as p,c as Iy,b as Ly,d as Cc,e as pe,u as Fy,o as $y,s as Hy,f as zy,g as Uy,h as Vy,i as Zy,k as By,l as qy,m as Wy,U as fh,y as Gy,v as Ky,n as Sc,p as Yy,X as Qy,F as Xy,q as Jy}from"./note-vendor-DhbUD4OO.js";import{g as na,Y as ev,a3 as tv,a4 as nv,A as rv}from"./note-core-DTIu0anW.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();const Ac={DARK:"(prefers-color-scheme: dark)",LIGHT:"(prefers-color-scheme: light)",RETINA:"(min-resolution: 2dppx)",RESPONSIVE:e=>`screen and (max-width: ${e})`},hh=e=>typeof window<"u"&&window.matchMedia?window.matchMedia(e):null,Rc=(e,n,r=!0)=>{const a=hh(e);r&&n(a?.matches||!1);const o=i=>{n?.(i.matches)};return a?.addEventListener("change",o),()=>{a?.removeEventListener("change",o)}},av=(e,n=!0)=>Rc(Ac.DARK,e,n),ov=(e,n,r=!0)=>Rc(Ac.RESPONSIVE(e),n,r),iv={MEDIA_QUERY:Ac,listenThemeChange:av,listenResponsiveChange:ov,createMediaQuery:hh,listenMediaQueryChange:Rc};var ph=e=>{throw TypeError(e)},sv=(e,n,r)=>n.has(e)||ph("Cannot "+r),Is=(e,n,r)=>(sv(e,n,"read from private field"),r?r.call(e):n.get(e)),lv=(e,n,r)=>n.has(e)?ph("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,r),ld="popstate";function cv(e={}){function n(a,o){let{pathname:i,search:s,hash:l}=a.location;return Ga("",{pathname:i,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(a,o){return typeof o=="string"?o:fn(o)}return dv(n,r,null,e)}function xe(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Ue(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function uv(){return Math.random().toString(36).substring(2,10)}function cd(e,n){return{usr:e.state,key:e.key,idx:n}}function Ga(e,n,r=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?Kn(n):n,state:r,key:n&&n.key||a||uv()}}function fn({pathname:e="/",search:n="",hash:r=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Kn(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(n.search=e.substring(a),e=e.substring(0,a)),e&&(n.pathname=e)}return n}function dv(e,n,r,a={}){let{window:o=document.defaultView,v5Compat:i=!1}=a,s=o.history,l="POP",c=null,u=h();u==null&&(u=0,s.replaceState({...s.state,idx:u},""));function h(){return(s.state||{idx:null}).idx}function f(){l="POP";let b=h(),x=b==null?null:b-u;u=b,c&&c({action:l,location:v.location,delta:x})}function m(b,x){l="PUSH";let w=Ga(v.location,b,x);u=h()+1;let E=cd(w,u),C=v.createHref(w);try{s.pushState(E,"",C)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;o.location.assign(C)}i&&c&&c({action:l,location:v.location,delta:1})}function g(b,x){l="REPLACE";let w=Ga(v.location,b,x);u=h();let E=cd(w,u),C=v.createHref(w);s.replaceState(E,"",C),i&&c&&c({action:l,location:v.location,delta:0})}function y(b){return mh(b)}let v={get action(){return l},get location(){return e(o,s)},listen(b){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(ld,f),c=b,()=>{o.removeEventListener(ld,f),c=null}},createHref(b){return n(o,b)},createURL:y,encodeLocation(b){let x=y(b);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:g,go(b){return s.go(b)}};return v}function mh(e,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),xe(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:fn(e);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}var Pa,ud=class{constructor(e){if(lv(this,Pa,new Map),e)for(let[n,r]of e)this.set(n,r)}get(e){if(Is(this,Pa).has(e))return Is(this,Pa).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,n){Is(this,Pa).set(e,n)}};Pa=new WeakMap;var fv=new Set(["lazy","caseSensitive","path","id","index","children"]);function hv(e){return fv.has(e)}var pv=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function mv(e){return pv.has(e)}function gv(e){return e.index===!0}function Ka(e,n,r=[],a={},o=!1){return e.map((i,s)=>{let l=[...r,String(s)],c=typeof i.id=="string"?i.id:l.join("-");if(xe(i.index!==!0||!i.children,"Cannot specify children on an index route"),xe(o||!a[c],`Found a route id collision on id "${c}". Route id's must be globally unique within Data Router usages`),gv(i)){let u={...i,id:c};return a[c]=dd(u,n(u)),u}else{let u={...i,id:c,children:void 0};return a[c]=dd(u,n(u)),i.children&&(u.children=Ka(i.children,n,l,a,o)),u}})}function dd(e,n){return Object.assign(e,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...e.lazy,...n.lazy}}:{}})}function Zn(e,n,r="/"){return Na(e,n,r,!1)}function Na(e,n,r,a){let o=typeof n=="string"?Kn(n):n,i=Ft(o.pathname||"/",r);if(i==null)return null;let s=gh(e);vv(s);let l=null;for(let c=0;l==null&&c<s.length;++c){let u=Tv(i);l=Rv(s[c],u,a)}return l}function yv(e,n){let{route:r,pathname:a,params:o}=e;return{id:r.id,pathname:a,params:o,data:n[r.id],loaderData:n[r.id],handle:r.handle}}function gh(e,n=[],r=[],a="",o=!1){let i=(s,l,c=o,u)=>{let h={relativePath:u===void 0?s.path||"":u,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(a)&&c)return;xe(h.relativePath.startsWith(a),`Absolute route path "${h.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length)}let f=cn([a,h.relativePath]),m=r.concat(h);s.children&&s.children.length>0&&(xe(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),gh(s.children,n,m,f,c)),!(s.path==null&&!s.index)&&n.push({path:f,score:Sv(f,s.index),routesMeta:m})};return e.forEach((s,l)=>{if(s.path===""||!s.path?.includes("?"))i(s,l);else for(let c of yh(s.path))i(s,l,!0,c)}),n}function yh(e){let n=e.split("/");if(n.length===0)return[];let[r,...a]=n,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(a.length===0)return o?[i,""]:[i];let s=yh(a.join("/")),l=[];return l.push(...s.map(c=>c===""?i:[i,c].join("/"))),o&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function vv(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:Av(n.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var xv=/^:[\w-]+$/,bv=3,wv=2,_v=1,Ev=10,Cv=-2,fd=e=>e==="*";function Sv(e,n){let r=e.split("/"),a=r.length;return r.some(fd)&&(a+=Cv),n&&(a+=wv),r.filter(o=>!fd(o)).reduce((o,i)=>o+(xv.test(i)?bv:i===""?_v:Ev),a)}function Av(e,n){return e.length===n.length&&e.slice(0,-1).every((a,o)=>a===n[o])?e[e.length-1]-n[n.length-1]:0}function Rv(e,n,r=!1){let{routesMeta:a}=e,o={},i="/",s=[];for(let l=0;l<a.length;++l){let c=a[l],u=l===a.length-1,h=i==="/"?n:n.slice(i.length)||"/",f=Ai({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},h),m=c.route;if(!f&&u&&r&&!a[a.length-1].route.index&&(f=Ai({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!f)return null;Object.assign(o,f.params),s.push({params:o,pathname:cn([i,f.pathname]),pathnameBase:Ov(cn([i,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(i=cn([i,f.pathnameBase]))}return s}function Ai(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Mv(e.path,e.caseSensitive,e.end),o=n.match(r);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:a.reduce((u,{paramName:h,isOptional:f},m)=>{if(h==="*"){let y=l[m]||"";s=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const g=l[m];return f&&!g?u[h]=void 0:u[h]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function Mv(e,n=!1,r=!0){Ue(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,c)=>(a.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),a]}function Tv(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Ue(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function Ft(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Pv({basename:e,pathname:n}){return n==="/"?e:cn([e,n])}var vh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mc=e=>vh.test(e);function Nv(e,n="/"){let{pathname:r,search:a="",hash:o=""}=typeof e=="string"?Kn(e):e,i;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?i=hd(r.substring(1),"/"):i=hd(r,n)):i=n,{pathname:i,search:jv(a),hash:Dv(o)}}function hd(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Ls(e,n,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function xh(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function Tc(e){let n=xh(e);return n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase)}function Pc(e,n,r,a=!1){let o;typeof e=="string"?o=Kn(e):(o={...e},xe(!o.pathname||!o.pathname.includes("?"),Ls("?","pathname","search",o)),xe(!o.pathname||!o.pathname.includes("#"),Ls("#","pathname","hash",o)),xe(!o.search||!o.search.includes("#"),Ls("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,l;if(s==null)l=r;else{let f=n.length-1;if(!a&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),f-=1;o.pathname=m.join("/")}l=f>=0?n[f]:"/"}let c=Nv(o,l),u=s&&s!=="/"&&s.endsWith("/"),h=(i||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||h)&&(c.pathname+="/"),c}var cn=e=>e.join("/").replace(/\/\/+/g,"/"),Ov=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),jv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Dv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,mo=class{constructor(e,n,r,a=!1){this.status=e,this.statusText=n||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Ya(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function go(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var bh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wh(e,n){let r=e;if(typeof r!="string"||!vh.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,o=!1;if(bh)try{let i=new URL(window.location.href),s=r.startsWith("//")?new URL(i.protocol+r):new URL(r),l=Ft(s.pathname,n);s.origin===i.origin&&l!=null?r=l+s.search+s.hash:o=!0}catch{Ue(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:o,to:r}}var qn=Symbol("Uninstrumented");function kv(e,n){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(o=>o({id:n.id,index:n.index,path:n.path,instrument(i){let s=Object.keys(r);for(let l of s)i[l]&&r[l].push(i[l])}}));let a={};if(typeof n.lazy=="function"&&r.lazy.length>0){let o=Ur(r.lazy,n.lazy,()=>{});o&&(a.lazy=o)}if(typeof n.lazy=="object"){let o=n.lazy;["middleware","loader","action"].forEach(i=>{let s=o[i],l=r[`lazy.${i}`];if(typeof s=="function"&&l.length>0){let c=Ur(l,s,()=>{});c&&(a.lazy=Object.assign(a.lazy||{},{[i]:c}))}})}return["loader","action"].forEach(o=>{let i=n[o];if(typeof i=="function"&&r[o].length>0){let s=i[qn]??i,l=Ur(r[o],s,(...c)=>pd(c[0]));l&&(o==="loader"&&s.hydrate===!0&&(l.hydrate=!0),l[qn]=s,a[o]=l)}}),n.middleware&&n.middleware.length>0&&r.middleware.length>0&&(a.middleware=n.middleware.map(o=>{let i=o[qn]??o,s=Ur(r.middleware,i,(...l)=>pd(l[0]));return s?(s[qn]=i,s):o})),a}function Iv(e,n){let r={navigate:[],fetch:[]};if(n.forEach(a=>a({instrument(o){let i=Object.keys(o);for(let s of i)o[s]&&r[s].push(o[s])}})),r.navigate.length>0){let a=e.navigate[qn]??e.navigate,o=Ur(r.navigate,a,(...i)=>{let[s,l]=i;return{to:typeof s=="number"||typeof s=="string"?s:s?fn(s):".",...md(e,l??{})}});o&&(o[qn]=a,e.navigate=o)}if(r.fetch.length>0){let a=e.fetch[qn]??e.fetch,o=Ur(r.fetch,a,(...i)=>{let[s,,l,c]=i;return{href:l??".",fetcherKey:s,...md(e,c??{})}});o&&(o[qn]=a,e.fetch=o)}return e}function Ur(e,n,r){return e.length===0?null:async(...a)=>{let o=await _h(e,r(...a),()=>n(...a),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function _h(e,n,r,a){let o=e[a],i;if(o){let s,l=async()=>(s?console.error("You cannot call instrumented handlers more than once"):s=_h(e,n,r,a-1),i=await s,xe(i,"Expected a result"),i.type==="error"&&i.value instanceof Error?{status:"error",error:i.value}:{status:"success",error:void 0});try{await o(l,n)}catch(c){console.error("An instrumentation function threw an error:",c)}s||await l(),await s}else try{i={type:"success",value:await r()}}catch(s){i={type:"error",value:s}}return i||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function pd(e){let{request:n,context:r,params:a,unstable_pattern:o}=e;return{request:Lv(n),params:{...a},unstable_pattern:o,context:Fv(r)}}function md(e,n){return{currentUrl:fn(e.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function Lv(e){return{method:e.method,url:e.url,headers:{get:(...n)=>e.headers.get(...n)}}}function Fv(e){if(Hv(e)){let n={...e};return Object.freeze(n),n}else return{get:n=>e.get(n)}}var $v=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Hv(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===$v}var Eh=["POST","PUT","PATCH","DELETE"],zv=new Set(Eh),Uv=["GET",...Eh],Vv=new Set(Uv),Ch=new Set([301,302,303,307,308]),Zv=new Set([307,308]),Fs={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Bv={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ga={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},qv=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Sh="remix-router-transitions",Ah=Symbol("ResetLoaderData");function Wv(e){const n=e.window?e.window:typeof window<"u"?window:void 0,r=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";xe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],o=e.mapRouteProperties||qv,i=o;if(e.unstable_instrumentations){let N=e.unstable_instrumentations;i=L=>({...o(L),...kv(N.map(z=>z.route).filter(Boolean),L)})}let s={},l=Ka(e.routes,i,void 0,s),c,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let h=e.dataStrategy||Xv,f={...e.future},m=null,g=new Set,y=null,v=null,b=null,x=e.hydrationData!=null,w=Zn(l,e.history.location,u),E=!1,C=null,S;if(w==null&&!e.patchRoutesOnNavigation){let N=Ot(404,{pathname:e.history.location.pathname}),{matches:L,route:z}=Ko(l);S=!0,w=L,C={[z.id]:N}}else if(w&&!e.hydrationData&&Ke(w,l,e.history.location.pathname).active&&(w=null),w)if(w.some(N=>N.route.lazy))S=!1;else if(!w.some(N=>Nc(N.route)))S=!0;else{let N=e.hydrationData?e.hydrationData.loaderData:null,L=e.hydrationData?e.hydrationData.errors:null;if(L){let z=w.findIndex(W=>L[W.route.id]!==void 0);S=w.slice(0,z+1).every(W=>!wl(W.route,N,L))}else S=w.every(z=>!wl(z.route,N,L))}else{S=!1,w=[];let N=Ke(null,l,e.history.location.pathname);N.active&&N.matches&&(E=!0,w=N.matches)}let M,_={historyAction:e.history.action,location:e.history.location,matches:w,initialized:S,navigation:Fs,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},A="POP",j=null,P=!1,O,H=!1,Z=new Map,R=null,k=!1,T=!1,F=new Set,I=new Map,$=0,V=-1,B=new Map,q=new Set,X=new Map,Q=new Map,re=new Set,de=new Map,G,ie=null;function ye(){if(m=e.history.listen(({action:N,location:L,delta:z})=>{if(G){G(),G=void 0;return}Ue(de.size===0||z!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let W=Bo({currentLocation:_.location,nextLocation:L,historyAction:N});if(W&&z!=null){let K=new Promise(ne=>{G=ne});e.history.go(z*-1),Dr(W,{state:"blocked",location:L,proceed(){Dr(W,{state:"proceeding",proceed:void 0,reset:void 0,location:L}),K.then(()=>e.history.go(z))},reset(){let ne=new Map(_.blockers);ne.set(W,ga),ce({blockers:ne})}}),j?.resolve(),j=null;return}return Ge(N,L)}),r){gx(n,Z);let N=()=>yx(n,Z);n.addEventListener("pagehide",N),R=()=>n.removeEventListener("pagehide",N)}return _.initialized||Ge("POP",_.location,{initialHydration:!0}),M}function J(){m&&m(),R&&R(),g.clear(),O&&O.abort(),_.fetchers.forEach((N,L)=>Or(L)),_.blockers.forEach((N,L)=>Zo(L))}function ge(N){return g.add(N),()=>g.delete(N)}function ce(N,L={}){N.matches&&(N.matches=N.matches.map(K=>{let ne=s[K.route.id],ee=K.route;return ee.element!==ne.element||ee.errorElement!==ne.errorElement||ee.hydrateFallbackElement!==ne.hydrateFallbackElement?{...K,route:ne}:K})),_={..._,...N};let z=[],W=[];_.fetchers.forEach((K,ne)=>{K.state==="idle"&&(re.has(ne)?z.push(ne):W.push(ne))}),re.forEach(K=>{!_.fetchers.has(K)&&!I.has(K)&&z.push(K)}),[...g].forEach(K=>K(_,{deletedFetchers:z,newErrors:N.errors??null,viewTransitionOpts:L.viewTransitionOpts,flushSync:L.flushSync===!0})),z.forEach(K=>Or(K)),W.forEach(K=>_.fetchers.delete(K))}function Se(N,L,{flushSync:z}={}){let W=_.actionData!=null&&_.navigation.formMethod!=null&&at(_.navigation.formMethod)&&_.navigation.state==="loading"&&N.state?._isRedirect!==!0,K;L.actionData?Object.keys(L.actionData).length>0?K=L.actionData:K=null:W?K=_.actionData:K=null;let ne=L.loaderData?Sd(_.loaderData,L.loaderData,L.matches||[],L.errors):_.loaderData,ee=_.blockers;ee.size>0&&(ee=new Map(ee),ee.forEach((fe,le)=>ee.set(le,ga)));let ae=k?!1:ct(N,L.matches||_.matches),se=P===!0||_.navigation.formMethod!=null&&at(_.navigation.formMethod)&&N.state?._isRedirect!==!0;c&&(l=c,c=void 0),k||A==="POP"||(A==="PUSH"?e.history.push(N,N.state):A==="REPLACE"&&e.history.replace(N,N.state));let ue;if(A==="POP"){let fe=Z.get(_.location.pathname);fe&&fe.has(N.pathname)?ue={currentLocation:_.location,nextLocation:N}:Z.has(N.pathname)&&(ue={currentLocation:N,nextLocation:_.location})}else if(H){let fe=Z.get(_.location.pathname);fe?fe.add(N.pathname):(fe=new Set([N.pathname]),Z.set(_.location.pathname,fe)),ue={currentLocation:_.location,nextLocation:N}}ce({...L,actionData:K,loaderData:ne,historyAction:A,location:N,initialized:!0,navigation:Fs,revalidation:"idle",restoreScrollPosition:ae,preventScrollReset:se,blockers:ee},{viewTransitionOpts:ue,flushSync:z===!0}),A="POP",P=!1,H=!1,k=!1,T=!1,j?.resolve(),j=null,ie?.resolve(),ie=null}async function Ve(N,L){if(j?.resolve(),j=null,typeof N=="number"){j||(j=Td());let Ce=j.promise;return e.history.go(N),Ce}let z=bl(_.location,_.matches,u,N,L?.fromRouteId,L?.relative),{path:W,submission:K,error:ne}=gd(!1,z,L),ee=_.location,ae=Ga(_.location,W,L&&L.state);ae={...ae,...e.history.encodeLocation(ae)};let se=L&&L.replace!=null?L.replace:void 0,ue="PUSH";se===!0?ue="REPLACE":se===!1||K!=null&&at(K.formMethod)&&K.formAction===_.location.pathname+_.location.search&&(ue="REPLACE");let fe=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,le=(L&&L.flushSync)===!0,Ee=Bo({currentLocation:ee,nextLocation:ae,historyAction:ue});if(Ee){Dr(Ee,{state:"blocked",location:ae,proceed(){Dr(Ee,{state:"proceeding",proceed:void 0,reset:void 0,location:ae}),Ve(N,L)},reset(){let Ce=new Map(_.blockers);Ce.set(Ee,ga),ce({blockers:Ce})}});return}await Ge(ue,ae,{submission:K,pendingError:ne,preventScrollReset:fe,replace:L&&L.replace,enableViewTransition:L&&L.viewTransition,flushSync:le,callSiteDefaultShouldRevalidate:L&&L.unstable_defaultShouldRevalidate})}function Rt(){ie||(ie=Td()),Jt(),ce({revalidation:"loading"});let N=ie.promise;return _.navigation.state==="submitting"?N:_.navigation.state==="idle"?(Ge(_.historyAction,_.location,{startUninterruptedRevalidation:!0}),N):(Ge(A||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation,enableViewTransition:H===!0}),N)}async function Ge(N,L,z){O&&O.abort(),O=null,A=N,k=(z&&z.startUninterruptedRevalidation)===!0,tn(_.location,_.matches),P=(z&&z.preventScrollReset)===!0,H=(z&&z.enableViewTransition)===!0;let W=c||l,K=z&&z.overrideNavigation,ne=z?.initialHydration&&_.matches&&_.matches.length>0&&!E?_.matches:Zn(W,L,u),ee=(z&&z.flushSync)===!0;if(ne&&_.initialized&&!T&&ix(_.location,L)&&!(z&&z.submission&&at(z.submission.formMethod))){Se(L,{matches:ne},{flushSync:ee});return}let ae=Ke(ne,W,L.pathname);if(ae.active&&ae.matches&&(ne=ae.matches),!ne){let{error:Ye,notFoundMatches:dt,route:Me}=Ze(L.pathname);Se(L,{matches:dt,loaderData:{},errors:{[Me.id]:Ye}},{flushSync:ee});return}O=new AbortController;let se=Hr(e.history,L,O.signal,z&&z.submission),ue=e.getContext?await e.getContext():new ud,fe;if(z&&z.pendingError)fe=[Bn(ne).route.id,{type:"error",error:z.pendingError}];else if(z&&z.submission&&at(z.submission.formMethod)){let Ye=await Ln(se,L,z.submission,ne,ue,ae.active,z&&z.initialHydration===!0,{replace:z.replace,flushSync:ee});if(Ye.shortCircuited)return;if(Ye.pendingActionResult){let[dt,Me]=Ye.pendingActionResult;if(Ct(Me)&&Ya(Me.error)&&Me.error.status===404){O=null,Se(L,{matches:Ye.matches,loaderData:{},errors:{[dt]:Me.error}});return}}ne=Ye.matches||ne,fe=Ye.pendingActionResult,K=$s(L,z.submission),ee=!1,ae.active=!1,se=Hr(e.history,se.url,se.signal)}let{shortCircuited:le,matches:Ee,loaderData:Ce,errors:Xe}=await $o(se,L,ne,ue,ae.active,K,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,z&&z.initialHydration===!0,ee,fe,z&&z.callSiteDefaultShouldRevalidate);le||(O=null,Se(L,{matches:Ee||ne,...Ad(fe),loaderData:Ce,errors:Xe}))}async function Ln(N,L,z,W,K,ne,ee,ae={}){Jt();let se=px(L,z);if(ce({navigation:se},{flushSync:ae.flushSync===!0}),ne){let le=await ut(W,L.pathname,N.signal);if(le.type==="aborted")return{shortCircuited:!0};if(le.type==="error"){if(le.partialMatches.length===0){let{matches:Ce,route:Xe}=Ko(l);return{matches:Ce,pendingActionResult:[Xe.id,{type:"error",error:le.error}]}}let Ee=Bn(le.partialMatches).route.id;return{matches:le.partialMatches,pendingActionResult:[Ee,{type:"error",error:le.error}]}}else if(le.matches)W=le.matches;else{let{notFoundMatches:Ee,error:Ce,route:Xe}=Ze(L.pathname);return{matches:Ee,pendingActionResult:[Xe.id,{type:"error",error:Ce}]}}}let ue,fe=fi(W,L);if(!fe.route.action&&!fe.route.lazy)ue={type:"error",error:Ot(405,{method:N.method,pathname:L.pathname,routeId:fe.route.id})};else{let le=Vr(i,s,N,W,fe,ee?[]:a,K),Ee=await ar(N,le,K,null);if(ue=Ee[fe.route.id],!ue){for(let Ce of W)if(Ee[Ce.route.id]){ue=Ee[Ce.route.id];break}}if(N.signal.aborted)return{shortCircuited:!0}}if(ur(ue)){let le;return ae&&ae.replace!=null?le=ae.replace:le=_d(ue.response.headers.get("Location"),new URL(N.url),u,e.history)===_.location.pathname+_.location.search,await Xt(N,ue,!0,{submission:z,replace:le}),{shortCircuited:!0}}if(Ct(ue)){let le=Bn(W,fe.route.id);return(ae&&ae.replace)!==!0&&(A="PUSH"),{matches:W,pendingActionResult:[le.route.id,ue,fe.route.id]}}return{matches:W,pendingActionResult:[fe.route.id,ue]}}async function $o(N,L,z,W,K,ne,ee,ae,se,ue,fe,le,Ee){let Ce=ne||$s(L,ee),Xe=ee||ae||Md(Ce),Ye=!k&&!ue;if(K){if(Ye){let nt=Tr(le);ce({navigation:Ce,...nt!==void 0?{actionData:nt}:{}},{flushSync:fe})}let _e=await ut(z,L.pathname,N.signal);if(_e.type==="aborted")return{shortCircuited:!0};if(_e.type==="error"){if(_e.partialMatches.length===0){let{matches:kr,route:sr}=Ko(l);return{matches:kr,loaderData:{},errors:{[sr.id]:_e.error}}}let nt=Bn(_e.partialMatches).route.id;return{matches:_e.partialMatches,loaderData:{},errors:{[nt]:_e.error}}}else if(_e.matches)z=_e.matches;else{let{error:nt,notFoundMatches:kr,route:sr}=Ze(L.pathname);return{matches:kr,loaderData:{},errors:{[sr.id]:nt}}}}let dt=c||l,{dsMatches:Me,revalidatingFetchers:Mt}=yd(N,W,i,s,e.history,_,z,Xe,L,ue?[]:a,ue===!0,T,F,re,X,q,dt,u,e.patchRoutesOnNavigation!=null,le,Ee);if(V=++$,!e.dataStrategy&&!Me.some(_e=>_e.shouldLoad)&&!Me.some(_e=>_e.route.middleware&&_e.route.middleware.length>0)&&Mt.length===0){let _e=ha();return Se(L,{matches:z,loaderData:{},errors:le&&Ct(le[1])?{[le[0]]:le[1].error}:null,...Ad(le),..._e?{fetchers:new Map(_.fetchers)}:{}},{flushSync:fe}),{shortCircuited:!0}}if(Ye){let _e={};if(!K){_e.navigation=Ce;let nt=Tr(le);nt!==void 0&&(_e.actionData=nt)}Mt.length>0&&(_e.fetchers=Qt(Mt)),ce(_e,{flushSync:fe})}Mt.forEach(_e=>{Ht(_e.key),_e.controller&&I.set(_e.key,_e.controller)});let or=()=>Mt.forEach(_e=>Ht(_e.key));O&&O.signal.addEventListener("abort",or);let{loaderResults:pa,fetcherResults:Fn}=await zo(Me,Mt,N,W);if(N.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",or),Mt.forEach(_e=>I.delete(_e.key));let rn=Yo(pa);if(rn)return await Xt(N,rn.result,!0,{replace:se}),{shortCircuited:!0};if(rn=Yo(Fn),rn)return q.add(rn.key),await Xt(N,rn.result,!0,{replace:se}),{shortCircuited:!0};let{loaderData:ks,errors:ma}=Cd(_,z,pa,le,Mt,Fn);ue&&_.errors&&(ma={..._.errors,...ma});let ir=ha(),qo=Uo(V),Wo=ir||qo||Mt.length>0;return{matches:z,loaderData:ks,errors:ma,...Wo?{fetchers:new Map(_.fetchers)}:{}}}function Tr(N){if(N&&!Ct(N[1]))return{[N[0]]:N[1].data};if(_.actionData)return Object.keys(_.actionData).length===0?null:_.actionData}function Qt(N){return N.forEach(L=>{let z=_.fetchers.get(L.key),W=ya(void 0,z?z.data:void 0);_.fetchers.set(L.key,W)}),new Map(_.fetchers)}async function Pr(N,L,z,W){Ht(N);let K=(W&&W.flushSync)===!0,ne=c||l,ee=bl(_.location,_.matches,u,z,L,W?.relative),ae=Zn(ne,ee,u),se=Ke(ae,ne,ee);if(se.active&&se.matches&&(ae=se.matches),!ae){st(N,L,Ot(404,{pathname:ee}),{flushSync:K});return}let{path:ue,submission:fe,error:le}=gd(!0,ee,W);if(le){st(N,L,le,{flushSync:K});return}let Ee=e.getContext?await e.getContext():new ud,Ce=(W&&W.preventScrollReset)===!0;if(fe&&at(fe.formMethod)){await Nr(N,L,ue,ae,Ee,se.active,K,Ce,fe,W&&W.unstable_defaultShouldRevalidate);return}X.set(N,{routeId:L,path:ue}),await Ho(N,L,ue,ae,Ee,se.active,K,Ce,fe)}async function Nr(N,L,z,W,K,ne,ee,ae,se,ue){Jt(),X.delete(N);let fe=_.fetchers.get(N);et(N,mx(se,fe),{flushSync:ee});let le=new AbortController,Ee=Hr(e.history,z,le.signal,se);if(ne){let Fe=await ut(W,new URL(Ee.url).pathname,Ee.signal,N);if(Fe.type==="aborted")return;if(Fe.type==="error"){st(N,L,Fe.error,{flushSync:ee});return}else if(Fe.matches)W=Fe.matches;else{st(N,L,Ot(404,{pathname:z}),{flushSync:ee});return}}let Ce=fi(W,z);if(!Ce.route.action&&!Ce.route.lazy){let Fe=Ot(405,{method:se.formMethod,pathname:z,routeId:L});st(N,L,Fe,{flushSync:ee});return}I.set(N,le);let Xe=$,Ye=Vr(i,s,Ee,W,Ce,a,K),dt=await ar(Ee,Ye,K,N),Me=dt[Ce.route.id];if(!Me){for(let Fe of Ye)if(dt[Fe.route.id]){Me=dt[Fe.route.id];break}}if(Ee.signal.aborted){I.get(N)===le&&I.delete(N);return}if(re.has(N)){if(ur(Me)||Ct(Me)){et(N,Sn(void 0));return}}else{if(ur(Me))if(I.delete(N),V>Xe){et(N,Sn(void 0));return}else return q.add(N),et(N,ya(se)),Xt(Ee,Me,!1,{fetcherSubmission:se,preventScrollReset:ae});if(Ct(Me)){st(N,L,Me.error);return}}let Mt=_.navigation.location||_.location,or=Hr(e.history,Mt,le.signal),pa=c||l,Fn=_.navigation.state!=="idle"?Zn(pa,_.navigation.location,u):_.matches;xe(Fn,"Didn't find any matches after fetcher action");let rn=++$;B.set(N,rn);let ks=ya(se,Me.data);_.fetchers.set(N,ks);let{dsMatches:ma,revalidatingFetchers:ir}=yd(or,K,i,s,e.history,_,Fn,se,Mt,a,!1,T,F,re,X,q,pa,u,e.patchRoutesOnNavigation!=null,[Ce.route.id,Me],ue);ir.filter(Fe=>Fe.key!==N).forEach(Fe=>{let Go=Fe.key,sd=_.fetchers.get(Go),ky=ya(void 0,sd?sd.data:void 0);_.fetchers.set(Go,ky),Ht(Go),Fe.controller&&I.set(Go,Fe.controller)}),ce({fetchers:new Map(_.fetchers)});let qo=()=>ir.forEach(Fe=>Ht(Fe.key));le.signal.addEventListener("abort",qo);let{loaderResults:Wo,fetcherResults:_e}=await zo(ma,ir,or,K);if(le.signal.aborted)return;if(le.signal.removeEventListener("abort",qo),B.delete(N),I.delete(N),ir.forEach(Fe=>I.delete(Fe.key)),_.fetchers.has(N)){let Fe=Sn(Me.data);_.fetchers.set(N,Fe)}let nt=Yo(Wo);if(nt)return Xt(or,nt.result,!1,{preventScrollReset:ae});if(nt=Yo(_e),nt)return q.add(nt.key),Xt(or,nt.result,!1,{preventScrollReset:ae});let{loaderData:kr,errors:sr}=Cd(_,Fn,Wo,void 0,ir,_e);Uo(rn),_.navigation.state==="loading"&&rn>V?(xe(A,"Expected pending action"),O&&O.abort(),Se(_.navigation.location,{matches:Fn,loaderData:kr,errors:sr,fetchers:new Map(_.fetchers)})):(ce({errors:sr,loaderData:Sd(_.loaderData,kr,Fn,sr),fetchers:new Map(_.fetchers)}),T=!1)}async function Ho(N,L,z,W,K,ne,ee,ae,se){let ue=_.fetchers.get(N);et(N,ya(se,ue?ue.data:void 0),{flushSync:ee});let fe=new AbortController,le=Hr(e.history,z,fe.signal);if(ne){let Me=await ut(W,new URL(le.url).pathname,le.signal,N);if(Me.type==="aborted")return;if(Me.type==="error"){st(N,L,Me.error,{flushSync:ee});return}else if(Me.matches)W=Me.matches;else{st(N,L,Ot(404,{pathname:z}),{flushSync:ee});return}}let Ee=fi(W,z);I.set(N,fe);let Ce=$,Xe=Vr(i,s,le,W,Ee,a,K),dt=(await ar(le,Xe,K,N))[Ee.route.id];if(I.get(N)===fe&&I.delete(N),!le.signal.aborted){if(re.has(N)){et(N,Sn(void 0));return}if(ur(dt))if(V>Ce){et(N,Sn(void 0));return}else{q.add(N),await Xt(le,dt,!1,{preventScrollReset:ae});return}if(Ct(dt)){st(N,L,dt.error);return}et(N,Sn(dt.data))}}async function Xt(N,L,z,{submission:W,fetcherSubmission:K,preventScrollReset:ne,replace:ee}={}){z||(j?.resolve(),j=null),L.response.headers.has("X-Remix-Revalidate")&&(T=!0);let ae=L.response.headers.get("Location");xe(ae,"Expected a Location header on the redirect Response"),ae=_d(ae,new URL(N.url),u,e.history);let se=Ga(_.location,ae,{_isRedirect:!0});if(r){let Xe=!1;if(L.response.headers.has("X-Remix-Reload-Document"))Xe=!0;else if(Mc(ae)){const Ye=mh(ae,!0);Xe=Ye.origin!==n.location.origin||Ft(Ye.pathname,u)==null}if(Xe){ee?n.location.replace(ae):n.location.assign(ae);return}}O=null;let ue=ee===!0||L.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:fe,formAction:le,formEncType:Ee}=_.navigation;!W&&!K&&fe&&le&&Ee&&(W=Md(_.navigation));let Ce=W||K;if(Zv.has(L.response.status)&&Ce&&at(Ce.formMethod))await Ge(ue,se,{submission:{...Ce,formAction:ae},preventScrollReset:ne||P,enableViewTransition:z?H:void 0});else{let Xe=$s(se,W);await Ge(ue,se,{overrideNavigation:Xe,fetcherSubmission:K,preventScrollReset:ne||P,enableViewTransition:z?H:void 0})}}async function ar(N,L,z,W){let K,ne={};try{K=await ex(h,N,L,W,z,!1)}catch(ee){return L.filter(ae=>ae.shouldLoad).forEach(ae=>{ne[ae.route.id]={type:"error",error:ee}}),ne}if(N.signal.aborted)return ne;if(!at(N.method))for(let ee of L){if(K[ee.route.id]?.type==="error")break;!K.hasOwnProperty(ee.route.id)&&!_.loaderData.hasOwnProperty(ee.route.id)&&(!_.errors||!_.errors.hasOwnProperty(ee.route.id))&&ee.shouldCallHandler()&&(K[ee.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ee.route.id}`)})}for(let[ee,ae]of Object.entries(K))if(ux(ae)){let se=ae.result;ne[ee]={type:"redirect",response:ax(se,N,ee,L,u)}}else ne[ee]=await rx(ae);return ne}async function zo(N,L,z,W){let K=ar(z,N,W,null),ne=Promise.all(L.map(async se=>{if(se.matches&&se.match&&se.request&&se.controller){let fe=(await ar(se.request,se.matches,W,se.key))[se.match.route.id];return{[se.key]:fe}}else return Promise.resolve({[se.key]:{type:"error",error:Ot(404,{pathname:se.path})}})})),ee=await K,ae=(await ne).reduce((se,ue)=>Object.assign(se,ue),{});return{loaderResults:ee,fetcherResults:ae}}function Jt(){T=!0,X.forEach((N,L)=>{I.has(L)&&F.add(L),Ht(L)})}function et(N,L,z={}){_.fetchers.set(N,L),ce({fetchers:new Map(_.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function st(N,L,z,W={}){let K=Bn(_.matches,L);Or(N),ce({errors:{[K.route.id]:z},fetchers:new Map(_.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function fa(N){return Q.set(N,(Q.get(N)||0)+1),re.has(N)&&re.delete(N),_.fetchers.get(N)||Bv}function en(N,L){Ht(N,L?.reason),et(N,Sn(null))}function Or(N){let L=_.fetchers.get(N);I.has(N)&&!(L&&L.state==="loading"&&B.has(N))&&Ht(N),X.delete(N),B.delete(N),q.delete(N),re.delete(N),F.delete(N),_.fetchers.delete(N)}function Ds(N){let L=(Q.get(N)||0)-1;L<=0?(Q.delete(N),re.add(N)):Q.set(N,L),ce({fetchers:new Map(_.fetchers)})}function Ht(N,L){let z=I.get(N);z&&(z.abort(L),I.delete(N))}function jr(N){for(let L of N){let z=fa(L),W=Sn(z.data);_.fetchers.set(L,W)}}function ha(){let N=[],L=!1;for(let z of q){let W=_.fetchers.get(z);xe(W,`Expected fetcher: ${z}`),W.state==="loading"&&(q.delete(z),N.push(z),L=!0)}return jr(N),L}function Uo(N){let L=[];for(let[z,W]of B)if(W<N){let K=_.fetchers.get(z);xe(K,`Expected fetcher: ${z}`),K.state==="loading"&&(Ht(z),B.delete(z),L.push(z))}return jr(L),L.length>0}function Vo(N,L){let z=_.blockers.get(N)||ga;return de.get(N)!==L&&de.set(N,L),z}function Zo(N){_.blockers.delete(N),de.delete(N)}function Dr(N,L){let z=_.blockers.get(N)||ga;xe(z.state==="unblocked"&&L.state==="blocked"||z.state==="blocked"&&L.state==="blocked"||z.state==="blocked"&&L.state==="proceeding"||z.state==="blocked"&&L.state==="unblocked"||z.state==="proceeding"&&L.state==="unblocked",`Invalid blocker state transition: ${z.state} -> ${L.state}`);let W=new Map(_.blockers);W.set(N,L),ce({blockers:W})}function Bo({currentLocation:N,nextLocation:L,historyAction:z}){if(de.size===0)return;de.size>1&&Ue(!1,"A router only supports one blocker at a time");let W=Array.from(de.entries()),[K,ne]=W[W.length-1],ee=_.blockers.get(K);if(!(ee&&ee.state==="proceeding")&&ne({currentLocation:N,nextLocation:L,historyAction:z}))return K}function Ze(N){let L=Ot(404,{pathname:N}),z=c||l,{matches:W,route:K}=Ko(z);return{notFoundMatches:W,route:K,error:L}}function lt(N,L,z){if(y=N,b=L,v=z||null,!x&&_.navigation===Fs){x=!0;let W=ct(_.location,_.matches);W!=null&&ce({restoreScrollPosition:W})}return()=>{y=null,b=null,v=null}}function tt(N,L){return v&&v(N,L.map(W=>yv(W,_.loaderData)))||N.key}function tn(N,L){if(y&&b){let z=tt(N,L);y[z]=b()}}function ct(N,L){if(y){let z=tt(N,L),W=y[z];if(typeof W=="number")return W}return null}function Ke(N,L,z){if(e.patchRoutesOnNavigation)if(N){if(Object.keys(N[0].params).length>0)return{active:!0,matches:Na(L,z,u,!0)}}else return{active:!0,matches:Na(L,z,u,!0)||[]};return{active:!1,matches:null}}async function ut(N,L,z,W){if(!e.patchRoutesOnNavigation)return{type:"success",matches:N};let K=N;for(;;){let ne=c==null,ee=c||l,ae=s;try{await e.patchRoutesOnNavigation({signal:z,path:L,matches:K,fetcherKey:W,patch:(fe,le)=>{z.aborted||vd(fe,le,ee,ae,i,!1)}})}catch(fe){return{type:"error",error:fe,partialMatches:K}}finally{ne&&!z.aborted&&(l=[...l])}if(z.aborted)return{type:"aborted"};let se=Zn(ee,L,u),ue=null;if(se){if(Object.keys(se[0].params).length===0)return{type:"success",matches:se};if(ue=Na(ee,L,u,!0),!(ue&&K.length<ue.length&&xn(K,ue.slice(0,K.length))))return{type:"success",matches:se}}if(ue||(ue=Na(ee,L,u,!0)),!ue||xn(K,ue))return{type:"success",matches:null};K=ue}}function xn(N,L){return N.length===L.length&&N.every((z,W)=>z.route.id===L[W].route.id)}function Be(N){s={},c=Ka(N,i,void 0,s)}function nn(N,L,z=!1){let W=c==null;vd(N,L,c||l,s,i,z),W&&(l=[...l],ce({}))}return M={get basename(){return u},get future(){return f},get state(){return _},get routes(){return l},get window(){return n},initialize:ye,subscribe:ge,enableScrollRestoration:lt,navigate:Ve,fetch:Pr,revalidate:Rt,createHref:N=>e.history.createHref(N),encodeLocation:N=>e.history.encodeLocation(N),getFetcher:fa,resetFetcher:en,deleteFetcher:Ds,dispose:J,getBlocker:Vo,deleteBlocker:Zo,patchRoutes:nn,_internalFetchControllers:I,_internalSetRoutes:Be,_internalSetStateDoNotUseOrYouWillBreakYourApp(N){ce(N)}},e.unstable_instrumentations&&(M=Iv(M,e.unstable_instrumentations.map(N=>N.router).filter(Boolean))),M}function Gv(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function bl(e,n,r,a,o,i){let s,l;if(o){s=[];for(let u of n)if(s.push(u),u.route.id===o){l=u;break}}else s=n,l=n[n.length-1];let c=Pc(a||".",Tc(s),Ft(e.pathname,r)||e.pathname,i==="path");if(a==null&&(c.search=e.search,c.hash=e.hash),(a==null||a===""||a===".")&&l){let u=jc(c.search);if(l.route.index&&!u)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&u){let h=new URLSearchParams(c.search),f=h.getAll("index");h.delete("index"),f.filter(g=>g).forEach(g=>h.append("index",g));let m=h.toString();c.search=m?`?${m}`:""}}return r!=="/"&&(c.pathname=Pv({basename:r,pathname:c.pathname})),fn(c)}function gd(e,n,r){if(!r||!Gv(r))return{path:n};if(r.formMethod&&!hx(r.formMethod))return{path:n,error:Ot(405,{method:r.formMethod})};let a=()=>({path:n,error:Ot(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),s=Oh(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!at(i))return a();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,[g,y])=>`${m}${g}=${y}
2
+ `,""):String(r.body);return{path:n,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!at(i))return a();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return a()}}}xe(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=El(r.formData),c=r.formData;else if(r.body instanceof FormData)l=El(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=Ed(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=Ed(l)}catch{return a()}let u={formMethod:i,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(at(u.formMethod))return{path:n,submission:u};let h=Kn(n);return e&&h.search&&jc(h.search)&&l.append("index",""),h.search=`?${l}`,{path:fn(h),submission:u}}function yd(e,n,r,a,o,i,s,l,c,u,h,f,m,g,y,v,b,x,w,E,C){let S=E?Ct(E[1])?E[1].error:E[1].data:void 0,M=o.createURL(i.location),_=o.createURL(c),A;if(h&&i.errors){let k=Object.keys(i.errors)[0];A=s.findIndex(T=>T.route.id===k)}else if(E&&Ct(E[1])){let k=E[0];A=s.findIndex(T=>T.route.id===k)-1}let j=E?E[1].statusCode:void 0,P=j&&j>=400,O={currentUrl:M,currentParams:i.matches[0]?.params||{},nextUrl:_,nextParams:s[0].params,...l,actionResult:S,actionStatus:j},H=go(s),Z=s.map((k,T)=>{let{route:F}=k,I=null;if(A!=null&&T>A?I=!1:F.lazy?I=!0:Nc(F)?h?I=wl(F,i.loaderData,i.errors):Kv(i.loaderData,i.matches[T],k)&&(I=!0):I=!1,I!==null)return _l(r,a,e,H,k,u,n,I);let $=!1;typeof C=="boolean"?$=C:P?$=!1:(f||M.pathname+M.search===_.pathname+_.search||M.search!==_.search||Yv(i.matches[T],k))&&($=!0);let V={...O,defaultShouldRevalidate:$},B=Fa(k,V);return _l(r,a,e,H,k,u,n,B,V,C)}),R=[];return y.forEach((k,T)=>{if(h||!s.some(Q=>Q.route.id===k.routeId)||g.has(T))return;let F=i.fetchers.get(T),I=F&&F.state!=="idle"&&F.data===void 0,$=Zn(b,k.path,x);if(!$){if(w&&I)return;R.push({key:T,routeId:k.routeId,path:k.path,matches:null,match:null,request:null,controller:null});return}if(v.has(T))return;let V=fi($,k.path),B=new AbortController,q=Hr(o,k.path,B.signal),X=null;if(m.has(T))m.delete(T),X=Vr(r,a,q,$,V,u,n);else if(I)f&&(X=Vr(r,a,q,$,V,u,n));else{let Q;typeof C=="boolean"?Q=C:P?Q=!1:Q=f;let re={...O,defaultShouldRevalidate:Q};Fa(V,re)&&(X=Vr(r,a,q,$,V,u,n,re))}X&&R.push({key:T,routeId:k.routeId,path:k.path,matches:X,match:V,request:q,controller:B})}),{dsMatches:Z,revalidatingFetchers:R}}function Nc(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function wl(e,n,r){if(e.lazy)return!0;if(!Nc(e))return!1;let a=n!=null&&e.id in n,o=r!=null&&r[e.id]!==void 0;return!a&&o?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!a&&!o}function Kv(e,n,r){let a=!n||r.route.id!==n.route.id,o=!e.hasOwnProperty(r.route.id);return a||o}function Yv(e,n){let r=e.route.path;return e.pathname!==n.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==n.params["*"]}function Fa(e,n){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(n);if(typeof r=="boolean")return r}return n.defaultShouldRevalidate}function vd(e,n,r,a,o,i){let s;if(e){let u=a[e];xe(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),s=u.children}else s=r;let l=[],c=[];if(n.forEach(u=>{let h=s.find(f=>Rh(u,f));h?c.push({existingRoute:h,newRoute:u}):l.push(u)}),l.length>0){let u=Ka(l,o,[e||"_","patch",String(s?.length||"0")],a);s.push(...u)}if(i&&c.length>0)for(let u=0;u<c.length;u++){let{existingRoute:h,newRoute:f}=c[u],m=h,[g]=Ka([f],o,[],{},!0);Object.assign(m,{element:g.element?g.element:m.element,errorElement:g.errorElement?g.errorElement:m.errorElement,hydrateFallbackElement:g.hydrateFallbackElement?g.hydrateFallbackElement:m.hydrateFallbackElement})}}function Rh(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children.every((r,a)=>n.children?.some(o=>Rh(r,o))):!1}var xd=new WeakMap,Mh=({key:e,route:n,manifest:r,mapRouteProperties:a})=>{let o=r[n.id];if(xe(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let i=o.lazy[e];if(!i)return;let s=xd.get(o);s||(s={},xd.set(o,s));let l=s[e];if(l)return l;let c=(async()=>{let u=hv(e),f=o[e]!==void 0&&e!=="hasErrorBoundary";if(u)Ue(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),s[e]=Promise.resolve();else if(f)Ue(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let m=await i();m!=null&&(Object.assign(o,{[e]:m}),Object.assign(o,a(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(m=>m===void 0)&&(o.lazy=void 0))})();return s[e]=c,c},bd=new WeakMap;function Qv(e,n,r,a,o){let i=r[e.id];if(xe(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let h=bd.get(i);if(h)return{lazyRoutePromise:h,lazyHandlerPromise:h};let f=(async()=>{xe(typeof e.lazy=="function","No lazy route function found");let m=await e.lazy(),g={};for(let y in m){let v=m[y];if(v===void 0)continue;let b=mv(y),w=i[y]!==void 0&&y!=="hasErrorBoundary";b?Ue(!b,"Route property "+y+" is not a supported property to be returned from a lazy route function. This property will be ignored."):w?Ue(!w,`Route "${i.id}" has a static property "${y}" defined but its lazy function is also returning a value for this property. The lazy route property "${y}" will be ignored.`):g[y]=v}Object.assign(i,g),Object.assign(i,{...a(i),lazy:void 0})})();return bd.set(i,f),f.catch(()=>{}),{lazyRoutePromise:f,lazyHandlerPromise:f}}let s=Object.keys(e.lazy),l=[],c;for(let h of s){if(o&&o.includes(h))continue;let f=Mh({key:h,route:e,manifest:r,mapRouteProperties:a});f&&(l.push(f),h===n&&(c=f))}let u=l.length>0?Promise.all(l).then(()=>{}):void 0;return u?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:c}}async function wd(e){let n=e.matches.filter(o=>o.shouldLoad),r={};return(await Promise.all(n.map(o=>o.resolve()))).forEach((o,i)=>{r[n[i].route.id]=o}),r}async function Xv(e){return e.matches.some(n=>n.route.middleware)?Th(e,()=>wd(e)):wd(e)}function Th(e,n){return Jv(e,n,a=>{if(fx(a))throw a;return a},lx,r);function r(a,o,i){if(i)return Promise.resolve(Object.assign(i.value,{[o]:{type:"error",result:a}}));{let{matches:s}=e,l=Math.min(Math.max(s.findIndex(u=>u.route.id===o),0),Math.max(s.findIndex(u=>u.shouldCallHandler()),0)),c=Bn(s,s[l].route.id).route.id;return Promise.resolve({[c]:{type:"error",result:a}})}}}async function Jv(e,n,r,a,o){let{matches:i,request:s,params:l,context:c,unstable_pattern:u}=e,h=i.flatMap(m=>m.route.middleware?m.route.middleware.map(g=>[m.route.id,g]):[]);return await Ph({request:s,params:l,context:c,unstable_pattern:u},h,n,r,a,o)}async function Ph(e,n,r,a,o,i,s=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let c=n[s];if(!c)return await r();let[u,h]=c,f,m=async()=>{if(f)throw new Error("You may only call `next()` once per middleware");try{return f={value:await Ph(e,n,r,a,o,i,s+1)},f.value}catch(g){return f={value:await i(g,u,f)},f.value}};try{let g=await h(e,m),y=g!=null?a(g):void 0;return o(y)?y:f?y??f.value:(f={value:await m()},f.value)}catch(g){return await i(g,u,f)}}function Nh(e,n,r,a,o){let i=Mh({key:"middleware",route:a.route,manifest:n,mapRouteProperties:e}),s=Qv(a.route,at(r.method)?"action":"loader",n,e,o);return{middleware:i,route:s.lazyRoutePromise,handler:s.lazyHandlerPromise}}function _l(e,n,r,a,o,i,s,l,c=null,u){let h=!1,f=Nh(e,n,r,o,i);return{...o,_lazyPromises:f,shouldLoad:l,shouldRevalidateArgs:c,shouldCallHandler(m){return h=!0,c?typeof u=="boolean"?Fa(o,{...c,defaultShouldRevalidate:u}):typeof m=="boolean"?Fa(o,{...c,defaultShouldRevalidate:m}):Fa(o,c):l},resolve(m){let{lazy:g,loader:y,middleware:v}=o.route,b=h||l||m&&!at(r.method)&&(g||y),x=v&&v.length>0&&!y&&!g;return b&&(at(r.method)||!x)?tx({request:r,unstable_pattern:a,match:o,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:m,scopedContext:s}):Promise.resolve({type:"data",result:void 0})}}}function Vr(e,n,r,a,o,i,s,l=null){return a.map(c=>c.route.id!==o.route.id?{...c,shouldLoad:!1,shouldRevalidateArgs:l,shouldCallHandler:()=>!1,_lazyPromises:Nh(e,n,r,c,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:_l(e,n,r,go(a),c,i,s,!0,l))}async function ex(e,n,r,a,o,i){r.some(u=>u._lazyPromises?.middleware)&&await Promise.all(r.map(u=>u._lazyPromises?.middleware));let s={request:n,unstable_pattern:go(r),params:r[0].params,context:o,matches:r},c=await e({...s,fetcherKey:a,runClientMiddleware:u=>{let h=s;return Th(h,()=>u({...h,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(u=>[u._lazyPromises?.handler,u._lazyPromises?.route]))}catch{}return c}async function tx({request:e,unstable_pattern:n,match:r,lazyHandlerPromise:a,lazyRoutePromise:o,handlerOverride:i,scopedContext:s}){let l,c,u=at(e.method),h=u?"action":"loader",f=m=>{let g,y=new Promise((x,w)=>g=w);c=()=>g(),e.signal.addEventListener("abort",c);let v=x=>typeof m!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${r.route.id}]`)):m({request:e,unstable_pattern:n,params:r.params,context:s},...x!==void 0?[x]:[]),b=(async()=>{try{return{type:"data",result:await(i?i(w=>v(w)):v())}}catch(x){return{type:"error",result:x}}})();return Promise.race([b,y])};try{let m=u?r.route.action:r.route.loader;if(a||o)if(m){let g,[y]=await Promise.all([f(m).catch(v=>{g=v}),a,o]);if(g!==void 0)throw g;l=y}else{await a;let g=u?r.route.action:r.route.loader;if(g)[l]=await Promise.all([f(g),o]);else if(h==="action"){let y=new URL(e.url),v=y.pathname+y.search;throw Ot(405,{method:e.method,pathname:v,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(m)l=await f(m);else{let g=new URL(e.url),y=g.pathname+g.search;throw Ot(404,{pathname:y})}}catch(m){return{type:"error",result:m}}finally{c&&e.signal.removeEventListener("abort",c)}return l}async function nx(e){let n=e.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?e.body==null?null:e.json():e.text()}async function rx(e){let{result:n,type:r}=e;if(Oc(n)){let a;try{a=await nx(n)}catch(o){return{type:"error",error:o}}return r==="error"?{type:"error",error:new mo(n.status,n.statusText,a),statusCode:n.status,headers:n.headers}:{type:"data",data:a,statusCode:n.status,headers:n.headers}}return r==="error"?Rd(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:sx(n),statusCode:Ya(n)?n.status:void 0,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:Ya(n)?n.status:void 0}:Rd(n)?{type:"data",data:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function ax(e,n,r,a,o){let i=e.headers.get("Location");if(xe(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Mc(i)){let s=a.slice(0,a.findIndex(l=>l.route.id===r)+1);i=bl(new URL(n.url),s,o,i),e.headers.set("Location",i)}return e}function _d(e,n,r,a){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Mc(e)){let i=e,s=i.startsWith("//")?new URL(n.protocol+i):new URL(i);if(o.includes(s.protocol))throw new Error("Invalid redirect location");let l=Ft(s.pathname,r)!=null;if(s.origin===n.origin&&l)return s.pathname+s.search+s.hash}try{let i=a.createURL(e);if(o.includes(i.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Hr(e,n,r,a){let o=e.createURL(Oh(n)).toString(),i={signal:r};if(a&&at(a.formMethod)){let{formMethod:s,formEncType:l}=a;i.method=s.toUpperCase(),l==="application/json"?(i.headers=new Headers({"Content-Type":l}),i.body=JSON.stringify(a.json)):l==="text/plain"?i.body=a.text:l==="application/x-www-form-urlencoded"&&a.formData?i.body=El(a.formData):i.body=a.formData}return new Request(o,i)}function El(e){let n=new URLSearchParams;for(let[r,a]of e.entries())n.append(r,typeof a=="string"?a:a.name);return n}function Ed(e){let n=new FormData;for(let[r,a]of e.entries())n.append(r,a);return n}function ox(e,n,r,a=!1,o=!1){let i={},s=null,l,c=!1,u={},h=r&&Ct(r[1])?r[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in n))return;let m=f.route.id,g=n[m];if(xe(!ur(g),"Cannot handle redirect results in processLoaderData"),Ct(g)){let y=g.error;if(h!==void 0&&(y=h,h=void 0),s=s||{},o)s[m]=y;else{let v=Bn(e,m);s[v.route.id]==null&&(s[v.route.id]=y)}a||(i[m]=Ah),c||(c=!0,l=Ya(g.error)?g.error.status:500),g.headers&&(u[m]=g.headers)}else i[m]=g.data,g.statusCode&&g.statusCode!==200&&!c&&(l=g.statusCode),g.headers&&(u[m]=g.headers)}),h!==void 0&&r&&(s={[r[0]]:h},r[2]&&(i[r[2]]=void 0)),{loaderData:i,errors:s,statusCode:l||200,loaderHeaders:u}}function Cd(e,n,r,a,o,i){let{loaderData:s,errors:l}=ox(n,r,a);return o.filter(c=>!c.matches||c.matches.some(u=>u.shouldLoad)).forEach(c=>{let{key:u,match:h,controller:f}=c;if(f&&f.signal.aborted)return;let m=i[u];if(xe(m,"Did not find corresponding fetcher result"),Ct(m)){let g=Bn(e.matches,h?.route.id);l&&l[g.route.id]||(l={...l,[g.route.id]:m.error}),e.fetchers.delete(u)}else if(ur(m))xe(!1,"Unhandled fetcher revalidation redirect");else{let g=Sn(m.data);e.fetchers.set(u,g)}}),{loaderData:s,errors:l}}function Sd(e,n,r,a){let o=Object.entries(n).filter(([,i])=>i!==Ah).reduce((i,[s,l])=>(i[s]=l,i),{});for(let i of r){let s=i.route.id;if(!n.hasOwnProperty(s)&&e.hasOwnProperty(s)&&i.route.loader&&(o[s]=e[s]),a&&a.hasOwnProperty(s))break}return o}function Ad(e){return e?Ct(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Bn(e,n){return(n?e.slice(0,e.findIndex(a=>a.route.id===n)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Ko(e){let n=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function Ot(e,{pathname:n,routeId:r,method:a,type:o,message:i}={}){let s="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(s="Bad Request",a&&n&&r?l=`You made a ${a} request to "${n}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(s="Forbidden",l=`Route "${r}" does not match URL "${n}"`):e===404?(s="Not Found",l=`No route matches URL "${n}"`):e===405&&(s="Method Not Allowed",a&&n&&r?l=`You made a ${a.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(l=`Invalid request method "${a.toUpperCase()}"`)),new mo(e||500,s,new Error(l),!0)}function Yo(e){let n=Object.entries(e);for(let r=n.length-1;r>=0;r--){let[a,o]=n[r];if(ur(o))return{key:a,result:o}}}function Oh(e){let n=typeof e=="string"?Kn(e):e;return fn({...n,hash:""})}function ix(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function sx(e){return new mo(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function lx(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([n,r])=>typeof n=="string"&&cx(r))}function cx(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function ux(e){return Oc(e.result)&&Ch.has(e.result.status)}function Ct(e){return e.type==="error"}function ur(e){return(e&&e.type)==="redirect"}function Rd(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Oc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function dx(e){return Ch.has(e)}function fx(e){return Oc(e)&&dx(e.status)&&e.headers.has("Location")}function hx(e){return Vv.has(e.toUpperCase())}function at(e){return zv.has(e.toUpperCase())}function jc(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function fi(e,n){let r=typeof n=="string"?Kn(n).search:n.search;if(e[e.length-1].route.index&&jc(r||""))return e[e.length-1];let a=xh(e);return a[a.length-1]}function Md(e){let{formMethod:n,formAction:r,formEncType:a,text:o,formData:i,json:s}=e;if(!(!n||!r||!a)){if(o!=null)return{formMethod:n,formAction:r,formEncType:a,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:n,formAction:r,formEncType:a,formData:i,json:void 0,text:void 0};if(s!==void 0)return{formMethod:n,formAction:r,formEncType:a,formData:void 0,json:s,text:void 0}}}function $s(e,n){return n?{state:"loading",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function px(e,n){return{state:"submitting",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function ya(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function mx(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function Sn(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function gx(e,n){try{let r=e.sessionStorage.getItem(Sh);if(r){let a=JSON.parse(r);for(let[o,i]of Object.entries(a||{}))i&&Array.isArray(i)&&n.set(o,new Set(i||[]))}}catch{}}function yx(e,n){if(n.size>0){let r={};for(let[a,o]of n)r[a]=[...o];try{e.sessionStorage.setItem(Sh,JSON.stringify(r))}catch(a){Ue(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function Td(){let e,n,r=new Promise((a,o)=>{e=async i=>{a(i);try{await r}catch{}},n=async i=>{o(i);try{await r}catch{}}});return{promise:r,resolve:e,reject:n}}var Sr=d.createContext(null);Sr.displayName="DataRouter";var yo=d.createContext(null);yo.displayName="DataRouterState";var jh=d.createContext(!1);function vx(){return d.useContext(jh)}var Dc=d.createContext({isTransitioning:!1});Dc.displayName="ViewTransition";var Dh=d.createContext(new Map);Dh.displayName="Fetchers";var xx=d.createContext(null);xx.displayName="Await";var $t=d.createContext(null);$t.displayName="Navigation";var ns=d.createContext(null);ns.displayName="Location";var Wt=d.createContext({outlet:null,matches:[],isDataRoute:!1});Wt.displayName="Route";var kc=d.createContext(null);kc.displayName="RouteError";var kh="REACT_ROUTER_ERROR",bx="REDIRECT",wx="ROUTE_ERROR_RESPONSE";function _x(e){if(e.startsWith(`${kh}:${bx}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function Ex(e){if(e.startsWith(`${kh}:${wx}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new mo(n.status,n.statusText,n.data)}catch{}}function Cx(e,{relative:n}={}){xe(vo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=d.useContext($t),{hash:o,pathname:i,search:s}=xo(e,{relative:n}),l=i;return r!=="/"&&(l=i==="/"?r:cn([r,i])),a.createHref({pathname:l,search:s,hash:o})}function vo(){return d.useContext(ns)!=null}function gn(){return xe(vo(),"useLocation() may be used only in the context of a <Router> component."),d.useContext(ns).location}var Ih="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Lh(e){d.useContext($t).static||d.useLayoutEffect(e)}function Ar(){let{isDataRoute:e}=d.useContext(Wt);return e?$x():Sx()}function Sx(){xe(vo(),"useNavigate() may be used only in the context of a <Router> component.");let e=d.useContext(Sr),{basename:n,navigator:r}=d.useContext($t),{matches:a}=d.useContext(Wt),{pathname:o}=gn(),i=JSON.stringify(Tc(a)),s=d.useRef(!1);return Lh(()=>{s.current=!0}),d.useCallback((c,u={})=>{if(Ue(s.current,Ih),!s.current)return;if(typeof c=="number"){r.go(c);return}let h=Pc(c,JSON.parse(i),o,u.relative==="path");e==null&&n!=="/"&&(h.pathname=h.pathname==="/"?n:cn([n,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[n,r,i,o,e])}var Ax=d.createContext(null);function Rx(e){let n=d.useContext(Wt).outlet;return d.useMemo(()=>n&&d.createElement(Ax.Provider,{value:e},n),[n,e])}function Ic(){let{matches:e}=d.useContext(Wt),n=e[e.length-1];return n?n.params:{}}function xo(e,{relative:n}={}){let{matches:r}=d.useContext(Wt),{pathname:a}=gn(),o=JSON.stringify(Tc(r));return d.useMemo(()=>Pc(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function Mx(e,n,r,a,o){xe(vo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=d.useContext($t),{matches:s}=d.useContext(Wt),l=s[s.length-1],c=l?l.params:{},u=l?l.pathname:"/",h=l?l.pathnameBase:"/",f=l&&l.route;{let w=f&&f.path||"";$h(u,!f||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
3
+
4
+ Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let m=gn(),g;g=m;let y=g.pathname||"/",v=y;if(h!=="/"){let w=h.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(w.length).join("/")}let b=Zn(e,{pathname:v});return Ue(f||b!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Ue(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),jx(b&&b.map(w=>Object.assign({},w,{params:Object.assign({},c,w.params),pathname:cn([h,i.encodeLocation?i.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?h:cn([h,i.encodeLocation?i.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),s,r,a,o)}function Tx(){let e=Fx(),n=Ya(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a},i={padding:"2px 4px",backgroundColor:a},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=d.createElement(d.Fragment,null,d.createElement("p",null,"๐Ÿ’ฟ Hey developer ๐Ÿ‘‹"),d.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",d.createElement("code",{style:i},"ErrorBoundary")," or"," ",d.createElement("code",{style:i},"errorElement")," prop on your route.")),d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},n),r?d.createElement("pre",{style:o},r):null,s)}var Px=d.createElement(Tx,null),Fh=class extends d.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=Ex(e.digest);r&&(e=r)}let n=e!==void 0?d.createElement(Wt.Provider,{value:this.props.routeContext},d.createElement(kc.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?d.createElement(Nx,{error:e},n):n}};Fh.contextType=jh;var Hs=new WeakMap;function Nx({children:e,error:n}){let{basename:r}=d.useContext($t);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let a=_x(n.digest);if(a){let o=Hs.get(n);if(o)throw o;let i=wh(a.location,r);if(bh&&!Hs.get(n))if(i.isExternal||a.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:a.replace}));throw Hs.set(n,s),s}return d.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Ox({routeContext:e,match:n,children:r}){let a=d.useContext(Sr);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),d.createElement(Wt.Provider,{value:e},r)}function jx(e,n=[],r=null,a=null,o=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(n.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,s=r?.errors;if(s!=null){let h=i.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);xe(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,h+1))}let l=!1,c=-1;if(r)for(let h=0;h<i.length;h++){let f=i[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=h),f.route.id){let{loaderData:m,errors:g}=r,y=f.route.loader&&!m.hasOwnProperty(f.route.id)&&(!g||g[f.route.id]===void 0);if(f.route.lazy||y){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}let u=r&&a?(h,f)=>{a(h,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:go(r.matches),errorInfo:f})}:void 0;return i.reduceRight((h,f,m)=>{let g,y=!1,v=null,b=null;r&&(g=s&&f.route.id?s[f.route.id]:void 0,v=f.route.errorElement||Px,l&&(c<0&&m===0?($h("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,b=null):c===m&&(y=!0,b=f.route.hydrateFallbackElement||null)));let x=n.concat(i.slice(0,m+1)),w=()=>{let E;return g?E=v:y?E=b:f.route.Component?E=d.createElement(f.route.Component,null):f.route.element?E=f.route.element:E=h,d.createElement(Ox,{match:f,routeContext:{outlet:h,matches:x,isDataRoute:r!=null},children:E})};return r&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?d.createElement(Fh,{location:r.location,revalidation:r.revalidation,component:v,error:g,children:w(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:u}):w()},null)}function Lc(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dx(e){let n=d.useContext(Sr);return xe(n,Lc(e)),n}function kx(e){let n=d.useContext(yo);return xe(n,Lc(e)),n}function Ix(e){let n=d.useContext(Wt);return xe(n,Lc(e)),n}function Fc(e){let n=Ix(e),r=n.matches[n.matches.length-1];return xe(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Lx(){return Fc("useRouteId")}function Fx(){let e=d.useContext(kc),n=kx("useRouteError"),r=Fc("useRouteError");return e!==void 0?e:n.errors?.[r]}function $x(){let{router:e}=Dx("useNavigate"),n=Fc("useNavigate"),r=d.useRef(!1);return Lh(()=>{r.current=!0}),d.useCallback(async(o,i={})=>{Ue(r.current,Ih),r.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:n,...i}))},[e,n])}var Pd={};function $h(e,n,r){!n&&!Pd[e]&&(Pd[e]=!0,Ue(!1,r))}var Nd={};function Od(e,n){!e&&!Nd[n]&&(Nd[n]=!0,console.warn(n))}var Hx="useOptimistic",jd=ts[Hx],zx=()=>{};function Ux(e){return jd?jd(e):[e,zx]}function Vx(e){let n={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Ue(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(n,{element:d.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Ue(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(n,{hydrateFallbackElement:d.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Ue(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(n,{errorElement:d.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),n}var Zx=["HydrateFallback","hydrateFallbackElement"],Bx=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}};function qx({router:e,flushSync:n,onError:r,unstable_useTransitions:a}){a=vx()||a;let[i,s]=d.useState(e.state),[l,c]=Ux(i),[u,h]=d.useState(),[f,m]=d.useState({isTransitioning:!1}),[g,y]=d.useState(),[v,b]=d.useState(),[x,w]=d.useState(),E=d.useRef(new Map),C=d.useCallback((A,{deletedFetchers:j,newErrors:P,flushSync:O,viewTransitionOpts:H})=>{P&&r&&Object.values(P).forEach(R=>r(R,{location:A.location,params:A.matches[0]?.params??{},unstable_pattern:go(A.matches)})),A.fetchers.forEach((R,k)=>{R.data!==void 0&&E.current.set(k,R.data)}),j.forEach(R=>E.current.delete(R)),Od(O===!1||n!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Z=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Od(H==null||Z,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!H||!Z){n&&O?n(()=>s(A)):a===!1?s(A):d.startTransition(()=>{a===!0&&c(R=>Dd(R,A)),s(A)});return}if(n&&O){n(()=>{v&&(g?.resolve(),v.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:H.currentLocation,nextLocation:H.nextLocation})});let R=e.window.document.startViewTransition(()=>{n(()=>s(A))});R.finished.finally(()=>{n(()=>{y(void 0),b(void 0),h(void 0),m({isTransitioning:!1})})}),n(()=>b(R));return}v?(g?.resolve(),v.skipTransition(),w({state:A,currentLocation:H.currentLocation,nextLocation:H.nextLocation})):(h(A),m({isTransitioning:!0,flushSync:!1,currentLocation:H.currentLocation,nextLocation:H.nextLocation}))},[e.window,n,v,g,a,c,r]);d.useLayoutEffect(()=>e.subscribe(C),[e,C]),d.useEffect(()=>{f.isTransitioning&&!f.flushSync&&y(new Bx)},[f]),d.useEffect(()=>{if(g&&u&&e.window){let A=u,j=g.promise,P=e.window.document.startViewTransition(async()=>{a===!1?s(A):d.startTransition(()=>{a===!0&&c(O=>Dd(O,A)),s(A)}),await j});P.finished.finally(()=>{y(void 0),b(void 0),h(void 0),m({isTransitioning:!1})}),b(P)}},[u,g,e.window,a,c]),d.useEffect(()=>{g&&u&&l.location.key===u.location.key&&g.resolve()},[g,v,l.location,u]),d.useEffect(()=>{!f.isTransitioning&&x&&(h(x.state),m({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),w(void 0))},[f.isTransitioning,x]);let S=d.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:A=>e.navigate(A),push:(A,j,P)=>e.navigate(A,{state:j,preventScrollReset:P?.preventScrollReset}),replace:(A,j,P)=>e.navigate(A,{replace:!0,state:j,preventScrollReset:P?.preventScrollReset})}),[e]),M=e.basename||"/",_=d.useMemo(()=>({router:e,navigator:S,static:!1,basename:M,onError:r}),[e,S,M,r]);return d.createElement(d.Fragment,null,d.createElement(Sr.Provider,{value:_},d.createElement(yo.Provider,{value:l},d.createElement(Dh.Provider,{value:E.current},d.createElement(Dc.Provider,{value:f},d.createElement(Yx,{basename:M,location:l.location,navigationType:l.historyAction,navigator:S,unstable_useTransitions:a},d.createElement(Wx,{routes:e.routes,future:e.future,state:l,onError:r})))))),null)}function Dd(e,n){return{...e,navigation:n.navigation.state!=="idle"?n.navigation:e.navigation,revalidation:n.revalidation!=="idle"?n.revalidation:e.revalidation,actionData:n.navigation.state!=="submitting"?n.actionData:e.actionData,fetchers:n.fetchers}}var Wx=d.memo(Gx);function Gx({routes:e,future:n,state:r,onError:a}){return Mx(e,void 0,r,a,n)}function Kx(e){return Rx(e.context)}function Yx({basename:e="/",children:n=null,location:r,navigationType:a="POP",navigator:o,static:i=!1,unstable_useTransitions:s}){xe(!vo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=d.useMemo(()=>({basename:l,navigator:o,static:i,unstable_useTransitions:s,future:{}}),[l,o,i,s]);typeof r=="string"&&(r=Kn(r));let{pathname:u="/",search:h="",hash:f="",state:m=null,key:g="default"}=r,y=d.useMemo(()=>{let v=Ft(u,l);return v==null?null:{location:{pathname:v,search:h,hash:f,state:m,key:g},navigationType:a}},[l,u,h,f,m,g,a]);return Ue(y!=null,`<Router basename="${l}"> is not able to match the URL "${u}${h}${f}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:d.createElement($t.Provider,{value:c},d.createElement(ns.Provider,{children:n,value:y}))}var hi="get",pi="application/x-www-form-urlencoded";function rs(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Qx(e){return rs(e)&&e.tagName.toLowerCase()==="button"}function Xx(e){return rs(e)&&e.tagName.toLowerCase()==="form"}function Jx(e){return rs(e)&&e.tagName.toLowerCase()==="input"}function e8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function t8(e,n){return e.button===0&&(!n||n==="_self")&&!e8(e)}function Cl(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,r)=>{let a=e[r];return n.concat(Array.isArray(a)?a.map(o=>[r,o]):[[r,a]])},[]))}function n8(e,n){let r=Cl(e);return n&&n.forEach((a,o)=>{r.has(o)||n.getAll(o).forEach(i=>{r.append(o,i)})}),r}var Qo=null;function r8(){if(Qo===null)try{new FormData(document.createElement("form"),0),Qo=!1}catch{Qo=!0}return Qo}var a8=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zs(e){return e!=null&&!a8.has(e)?(Ue(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${pi}"`),null):e}function o8(e,n){let r,a,o,i,s;if(Xx(e)){let l=e.getAttribute("action");a=l?Ft(l,n):null,r=e.getAttribute("method")||hi,o=zs(e.getAttribute("enctype"))||pi,i=new FormData(e)}else if(Qx(e)||Jx(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(a=c?Ft(c,n):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||hi,o=zs(e.getAttribute("formenctype"))||zs(l.getAttribute("enctype"))||pi,i=new FormData(l,e),!r8()){let{name:u,type:h,value:f}=e;if(h==="image"){let m=u?`${u}.`:"";i.append(`${m}x`,"0"),i.append(`${m}y`,"0")}else u&&i.append(u,f)}}else{if(rs(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=hi,a=null,o=pi,s=e}return i&&o==="text/plain"&&(s=i,i=void 0),{action:a,method:r.toLowerCase(),encType:o,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function $c(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function i8(e,n,r,a){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${a}`:o.pathname=`${o.pathname}.${a}`:o.pathname==="/"?o.pathname=`_root.${a}`:n&&Ft(o.pathname,n)==="/"?o.pathname=`${n.replace(/\/$/,"")}/_root.${a}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${a}`,o}async function s8(e,n){if(e.id in n)return n[e.id];try{let r=await import(e.module);return n[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function l8(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function c8(e,n,r){let a=await Promise.all(e.map(async o=>{let i=n.routes[o.route.id];if(i){let s=await s8(i,r);return s.links?s.links():[]}return[]}));return h8(a.flat(1).filter(l8).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function kd(e,n,r,a,o,i){let s=(c,u)=>r[u]?c.route.id!==r[u].route.id:!0,l=(c,u)=>r[u].pathname!==c.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==c.params["*"];return i==="assets"?n.filter((c,u)=>s(c,u)||l(c,u)):i==="data"?n.filter((c,u)=>{let h=a.routes[c.route.id];if(!h||!h.hasLoader)return!1;if(s(c,u)||l(c,u))return!0;if(c.route.shouldRevalidate){let f=c.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function u8(e,n,{includeHydrateFallback:r}={}){return d8(e.map(a=>{let o=n.routes[a.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function d8(e){return[...new Set(e)]}function f8(e){let n={},r=Object.keys(e).sort();for(let a of r)n[a]=e[a];return n}function h8(e,n){let r=new Set;return new Set(n),e.reduce((a,o)=>{let i=JSON.stringify(f8(o));return r.has(i)||(r.add(i),a.push({key:i,link:o})),a},[])}function Hh(){let e=d.useContext(Sr);return $c(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function p8(){let e=d.useContext(yo);return $c(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Hc=d.createContext(void 0);Hc.displayName="FrameworkContext";function zh(){let e=d.useContext(Hc);return $c(e,"You must render this element inside a <HydratedRouter> element"),e}function m8(e,n){let r=d.useContext(Hc),[a,o]=d.useState(!1),[i,s]=d.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:h,onTouchStart:f}=n,m=d.useRef(null);d.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let v=x=>{x.forEach(w=>{s(w.isIntersecting)})},b=new IntersectionObserver(v,{threshold:.5});return m.current&&b.observe(m.current),()=>{b.disconnect()}}},[e]),d.useEffect(()=>{if(a){let v=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(v)}}},[a]);let g=()=>{o(!0)},y=()=>{o(!1),s(!1)};return r?e!=="intent"?[i,m,{}]:[i,m,{onFocus:va(l,g),onBlur:va(c,y),onMouseEnter:va(u,g),onMouseLeave:va(h,y),onTouchStart:va(f,g)}]:[!1,m,{}]}function va(e,n){return r=>{e&&e(r),r.defaultPrevented||n(r)}}function g8({page:e,...n}){let{router:r}=Hh(),a=d.useMemo(()=>Zn(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?d.createElement(v8,{page:e,matches:a,...n}):null}function y8(e){let{manifest:n,routeModules:r}=zh(),[a,o]=d.useState([]);return d.useEffect(()=>{let i=!1;return c8(e,n,r).then(s=>{i||o(s)}),()=>{i=!0}},[e,n,r]),a}function v8({page:e,matches:n,...r}){let a=gn(),{future:o,manifest:i,routeModules:s}=zh(),{basename:l}=Hh(),{loaderData:c,matches:u}=p8(),h=d.useMemo(()=>kd(e,n,u,i,a,"data"),[e,n,u,i,a]),f=d.useMemo(()=>kd(e,n,u,i,a,"assets"),[e,n,u,i,a]),m=d.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let v=new Set,b=!1;if(n.forEach(w=>{let E=i.routes[w.route.id];!E||!E.hasLoader||(!h.some(C=>C.route.id===w.route.id)&&w.route.id in c&&s[w.route.id]?.shouldRevalidate||E.hasClientLoader?b=!0:v.add(w.route.id))}),v.size===0)return[];let x=i8(e,l,o.unstable_trailingSlashAwareDataRequests,"data");return b&&v.size>0&&x.searchParams.set("_routes",n.filter(w=>v.has(w.route.id)).map(w=>w.route.id).join(",")),[x.pathname+x.search]},[l,o.unstable_trailingSlashAwareDataRequests,c,a,i,h,n,e,s]),g=d.useMemo(()=>u8(f,i),[f,i]),y=y8(f);return d.createElement(d.Fragment,null,m.map(v=>d.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...r})),g.map(v=>d.createElement("link",{key:v,rel:"modulepreload",href:v,...r})),y.map(({key:v,link:b})=>d.createElement("link",{key:v,nonce:r.nonce,...b,crossOrigin:b.crossOrigin??r.crossOrigin})))}function x8(...e){return n=>{e.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var b8=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{b8&&(window.__reactRouterVersion="7.13.0")}catch{}function w8(e,n){return Wv({basename:n?.basename,getContext:n?.getContext,future:n?.future,history:cv({window:n?.window}),hydrationData:_8(),routes:e,mapRouteProperties:Vx,hydrationRouteProperties:Zx,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window,unstable_instrumentations:n?.unstable_instrumentations}).initialize()}function _8(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:E8(e.errors)}),e}function E8(e){if(!e)return null;let n=Object.entries(e),r={};for(let[a,o]of n)if(o&&o.__type==="RouteErrorResponse")r[a]=new mo(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let s=new i(o.message);s.stack="",r[a]=s}catch{}}if(r[a]==null){let i=new Error(o.message);i.stack="",r[a]=i}}else r[a]=o;return r}var Uh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,He=d.forwardRef(function({onClick:n,discover:r="render",prefetch:a="none",relative:o,reloadDocument:i,replace:s,state:l,target:c,to:u,preventScrollReset:h,viewTransition:f,unstable_defaultShouldRevalidate:m,...g},y){let{basename:v,unstable_useTransitions:b}=d.useContext($t),x=typeof u=="string"&&Uh.test(u),w=wh(u,v);u=w.to;let E=Cx(u,{relative:o}),[C,S,M]=m8(a,g),_=R8(u,{replace:s,state:l,target:c,preventScrollReset:h,relative:o,viewTransition:f,unstable_defaultShouldRevalidate:m,unstable_useTransitions:b});function A(P){n&&n(P),P.defaultPrevented||_(P)}let j=d.createElement("a",{...g,...M,href:w.absoluteURL||E,onClick:w.isExternal||i?n:A,ref:x8(y,S),target:c,"data-discover":!x&&r==="render"?"true":void 0});return C&&!x?d.createElement(d.Fragment,null,j,d.createElement(g8,{page:E})):j});He.displayName="Link";var C8=d.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:a="",end:o=!1,style:i,to:s,viewTransition:l,children:c,...u},h){let f=xo(s,{relative:u.relative}),m=gn(),g=d.useContext(yo),{navigator:y,basename:v}=d.useContext($t),b=g!=null&&O8(f)&&l===!0,x=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,w=m.pathname,E=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(w=w.toLowerCase(),E=E?E.toLowerCase():null,x=x.toLowerCase()),E&&v&&(E=Ft(E,v)||E);const C=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let S=w===x||!o&&w.startsWith(x)&&w.charAt(C)==="/",M=E!=null&&(E===x||!o&&E.startsWith(x)&&E.charAt(x.length)==="/"),_={isActive:S,isPending:M,isTransitioning:b},A=S?n:void 0,j;typeof a=="function"?j=a(_):j=[a,S?"active":null,M?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let P=typeof i=="function"?i(_):i;return d.createElement(He,{...u,"aria-current":A,className:j,ref:h,style:P,to:s,viewTransition:l},typeof c=="function"?c(_):c)});C8.displayName="NavLink";var S8=d.forwardRef(({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:a,replace:o,state:i,method:s=hi,action:l,onSubmit:c,relative:u,preventScrollReset:h,viewTransition:f,unstable_defaultShouldRevalidate:m,...g},y)=>{let{unstable_useTransitions:v}=d.useContext($t),b=P8(),x=N8(l,{relative:u}),w=s.toLowerCase()==="get"?"get":"post",E=typeof l=="string"&&Uh.test(l),C=S=>{if(c&&c(S),S.defaultPrevented)return;S.preventDefault();let M=S.nativeEvent.submitter,_=M?.getAttribute("formmethod")||s,A=()=>b(M||S.currentTarget,{fetcherKey:n,method:_,navigate:r,replace:o,state:i,relative:u,preventScrollReset:h,viewTransition:f,unstable_defaultShouldRevalidate:m});v&&r!==!1?d.startTransition(()=>A()):A()};return d.createElement("form",{ref:y,method:w,action:x,onSubmit:a?c:C,...g,"data-discover":!E&&e==="render"?"true":void 0})});S8.displayName="Form";function A8(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vh(e){let n=d.useContext(Sr);return xe(n,A8(e)),n}function R8(e,{target:n,replace:r,state:a,preventScrollReset:o,relative:i,viewTransition:s,unstable_defaultShouldRevalidate:l,unstable_useTransitions:c}={}){let u=Ar(),h=gn(),f=xo(e,{relative:i});return d.useCallback(m=>{if(t8(m,n)){m.preventDefault();let g=r!==void 0?r:fn(h)===fn(f),y=()=>u(e,{replace:g,state:a,preventScrollReset:o,relative:i,viewTransition:s,unstable_defaultShouldRevalidate:l});c?d.startTransition(()=>y()):y()}},[h,u,f,r,a,n,e,o,i,s,l,c])}function Yn(e){Ue(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=d.useRef(Cl(e)),r=d.useRef(!1),a=gn(),o=d.useMemo(()=>n8(a.search,r.current?null:n.current),[a.search]),i=Ar(),s=d.useCallback((l,c)=>{const u=Cl(typeof l=="function"?l(new URLSearchParams(o)):l);r.current=!0,i("?"+u,c)},[i,o]);return[o,s]}var M8=0,T8=()=>`__${String(++M8)}__`;function P8(){let{router:e}=Vh("useSubmit"),{basename:n}=d.useContext($t),r=Lx(),a=e.fetch,o=e.navigate;return d.useCallback(async(i,s={})=>{let{action:l,method:c,encType:u,formData:h,body:f}=o8(i,n);if(s.navigate===!1){let m=s.fetcherKey||T8();await a(m,r,s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:f,formMethod:s.method||c,formEncType:s.encType||u,flushSync:s.flushSync})}else await o(s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:f,formMethod:s.method||c,formEncType:s.encType||u,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[a,o,n,r])}function N8(e,{relative:n}={}){let{basename:r}=d.useContext($t),a=d.useContext(Wt);xe(a,"useFormAction must be used inside a RouteContext");let[o]=a.matches.slice(-1),i={...xo(e||".",{relative:n})},s=gn();if(e==null){i.search=s.search;let l=new URLSearchParams(i.search),c=l.getAll("index");if(c.some(h=>h==="")){l.delete("index"),c.filter(f=>f).forEach(f=>l.append("index",f));let h=l.toString();i.search=h?`?${h}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:cn([r,i.pathname])),fn(i)}function O8(e,{relative:n}={}){let r=d.useContext(Dc);xe(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Vh("useViewTransitionState"),o=xo(e,{relative:n});if(!r.isTransitioning)return!1;let i=Ft(r.currentLocation.pathname,a)||r.currentLocation.pathname,s=Ft(r.nextLocation.pathname,a)||r.nextLocation.pathname;return Ai(o.pathname,s)!=null||Ai(o.pathname,i)!=null}function j8(e){return d.createElement(qx,{flushSync:Mn.flushSync,...e})}var ra=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(){}},D8={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},k8=class{#e=D8;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}},dr=new k8;function I8(e){setTimeout(e,0)}var vr=typeof window>"u"||"Deno"in globalThis;function ft(){}function L8(e,n){return typeof e=="function"?e(n):e}function Sl(e){return typeof e=="number"&&e>=0&&e!==1/0}function Zh(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Wn(e,n){return typeof e=="function"?e(n):e}function jt(e,n){return typeof e=="function"?e(n):e}function Id(e,n){const{type:r="all",exact:a,fetchStatus:o,predicate:i,queryKey:s,stale:l}=e;if(s){if(a){if(n.queryHash!==zc(s,n.options))return!1}else if(!Qa(n.queryKey,s))return!1}if(r!=="all"){const c=n.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&n.isStale()!==l||o&&o!==n.state.fetchStatus||i&&!i(n))}function Ld(e,n){const{exact:r,status:a,predicate:o,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(r){if(xr(n.options.mutationKey)!==xr(i))return!1}else if(!Qa(n.options.mutationKey,i))return!1}return!(a&&n.state.status!==a||o&&!o(n))}function zc(e,n){return(n?.queryKeyHashFn||xr)(e)}function xr(e){return JSON.stringify(e,(n,r)=>Al(r)?Object.keys(r).sort().reduce((a,o)=>(a[o]=r[o],a),{}):r)}function Qa(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(r=>Qa(e[r],n[r])):!1}var F8=Object.prototype.hasOwnProperty;function Bh(e,n,r=0){if(e===n)return e;if(r>500)return n;const a=Fd(e)&&Fd(n);if(!a&&!(Al(e)&&Al(n)))return n;const i=(a?e:Object.keys(e)).length,s=a?n:Object.keys(n),l=s.length,c=a?new Array(l):{};let u=0;for(let h=0;h<l;h++){const f=a?h:s[h],m=e[f],g=n[f];if(m===g){c[f]=m,(a?h<i:F8.call(e,f))&&u++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){c[f]=g;continue}const y=Bh(m,g,r+1);c[f]=y,y===m&&u++}return i===l&&u===i?e:c}function Ri(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const r in e)if(e[r]!==n[r])return!1;return!0}function Fd(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Al(e){if(!$d(e))return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!$d(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function $d(e){return Object.prototype.toString.call(e)==="[object Object]"}function $8(e){return new Promise(n=>{dr.setTimeout(n,e)})}function Rl(e,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,n):r.structuralSharing!==!1?Bh(e,n):n}function H8(e,n,r=0){const a=[...e,n];return r&&a.length>r?a.slice(1):a}function z8(e,n,r=0){const a=[n,...e];return r&&a.length>r?a.slice(0,-1):a}var Uc=Symbol();function qh(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===Uc?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Vc(e,n){return typeof e=="function"?e(...n):!!e}function U8(e,n,r){let a=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=n(),a||(a=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var V8=class extends ra{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!vr&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",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(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Zc=new V8;function Ml(){let e,n;const r=new Promise((o,i)=>{e=o,n=i});r.status="pending",r.catch(()=>{});function a(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},r.reject=o=>{a({status:"rejected",reason:o}),n(o)},r}var Z8=I8;function B8(){let e=[],n=0,r=l=>{l()},a=l=>{l()},o=Z8;const i=l=>{n?e.push(l):o(()=>{r(l)})},s=()=>{const l=e;e=[],l.length&&o(()=>{a(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;n++;try{c=l()}finally{n--,n||s()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{a=l},setScheduler:l=>{o=l}}}var We=B8(),q8=class extends ra{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!vr&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}}}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(r=>{r(e)}))}isOnline(){return this.#e}},Mi=new q8;function W8(e){return Math.min(1e3*2**e,3e4)}function Wh(e){return(e??"online")==="online"?Mi.isOnline():!0}var Tl=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Gh(e){let n=!1,r=0,a;const o=Ml(),i=()=>o.status!=="pending",s=v=>{if(!i()){const b=new Tl(v);m(b),e.onCancel?.(b)}},l=()=>{n=!0},c=()=>{n=!1},u=()=>Zc.isFocused()&&(e.networkMode==="always"||Mi.isOnline())&&e.canRun(),h=()=>Wh(e.networkMode)&&e.canRun(),f=v=>{i()||(a?.(),o.resolve(v))},m=v=>{i()||(a?.(),o.reject(v))},g=()=>new Promise(v=>{a=b=>{(i()||u())&&v(b)},e.onPause?.()}).then(()=>{a=void 0,i()||e.onContinue?.()}),y=()=>{if(i())return;let v;const b=r===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(x){v=Promise.reject(x)}Promise.resolve(v).then(f).catch(x=>{if(i())return;const w=e.retry??(vr?0:3),E=e.retryDelay??W8,C=typeof E=="function"?E(r,x):E,S=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,x);if(n||!S){m(x);return}r++,e.onFail?.(r,x),$8(C).then(()=>u()?void 0:g()).then(()=>{n?m(x):y()})})};return{promise:o,status:()=>o.status,cancel:s,continue:()=>(a?.(),o),cancelRetry:l,continueRetry:c,canStart:h,start:()=>(h()?y():g().then(y),o)}}var Kh=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sl(this.gcTime)&&(this.#e=dr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vr?1/0:300*1e3))}clearGcTimeout(){this.#e&&(dr.clearTimeout(this.#e),this.#e=void 0)}},G8=class extends Kh{#e;#t;#n;#a;#r;#i;#s;constructor(e){super(),this.#s=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=zd(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=zd(this.options);n.data!==void 0&&(this.setState(Hd(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const r=Rl(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(e,n){this.#o({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#r?.promise;return this.#r?.cancel(e),n?n.then(ft).catch(ft):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>jt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Uc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Wn(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:!Zh(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.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(n=>n!==e),this.observers.length||(this.#r&&(this.#s?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.#o({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.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 l=this.observers.find(c=>c.options.queryFn);l&&this.setOptions(l.options)}const r=new AbortController,a=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#s=!0,r.signal)})},o=()=>{const l=qh(this.options,n),u=(()=>{const h={client:this.#a,queryKey:this.queryKey,meta:this.meta};return a(h),h})();return this.#s=!1,this.options.persister?this.options.persister(l,u,this):l(u)},s=(()=>{const l={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return a(l),l})();this.options.behavior?.onFetch(s,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#o({type:"fetch",meta:s.fetchOptions?.meta}),this.#r=Gh({initialPromise:n?.initialPromise,fn:s.fetchFn,onCancel:l=>{l instanceof Tl&&l.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(l,c)=>{this.#o({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const l=await this.#r.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#n.config.onSuccess?.(l,this),this.#n.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof Tl){if(l.silent)return this.#r.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#o({type:"error",error:l}),this.#n.config.onError?.(l,this),this.#n.config.onSettled?.(this.state.data,l,this),l}finally{this.scheduleGc()}}#o(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Yh(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...Hd(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const o=e.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),We.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Yh(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Wh(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Hd(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function zd(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,r=n!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Qh=class extends ra{constructor(e,n){super(),this.options=n,this.#e=e,this.#o=null,this.#s=Ml(),this.bindMethods(),this.setOptions(n)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#i;#s;#o;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ud(this.#t,this.options)?this.#d():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pl(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pl(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const n=this.options,r=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 jt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!Ri(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&Vd(this.#t,r,this.options,n)&&this.#d(),this.updateResult(),a&&(this.#t!==r||jt(this.options.enabled,this.#t)!==jt(n.enabled,this.#t)||Wn(this.options.staleTime,this.#t)!==Wn(n.staleTime,this.#t))&&this.#g();const o=this.#y();a&&(this.#t!==r||jt(this.options.enabled,this.#t)!==jt(n.enabled,this.#t)||o!==this.#l)&&this.#v(o)}getOptimisticResult(e){const n=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(n,e);return Y8(this,r)&&(this.#a=r,this.#i=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#a}trackResult(e,n){return new Proxy(e,{get:(r,a)=>(this.trackProp(a),n?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#d(e){this.#_();let n=this.#t.fetch(this.options,e);return e?.throwOnError||(n=n.catch(ft)),n}#g(){this.#b();const e=Wn(this.options.staleTime,this.#t);if(vr||this.#a.isStale||!Sl(e))return;const r=Zh(this.#a.dataUpdatedAt,e)+1;this.#c=dr.setTimeout(()=>{this.#a.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#l=e,!(vr||jt(this.options.enabled,this.#t)===!1||!Sl(this.#l)||this.#l===0)&&(this.#u=dr.setInterval(()=>{(this.options.refetchIntervalInBackground||Zc.isFocused())&&this.#d()},this.#l))}#x(){this.#g(),this.#v(this.#y())}#b(){this.#c&&(dr.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(dr.clearInterval(this.#u),this.#u=void 0)}createResult(e,n){const r=this.#t,a=this.options,o=this.#a,i=this.#r,s=this.#i,c=e!==r?e.state:this.#n,{state:u}=e;let h={...u},f=!1,m;if(n._optimisticResults){const A=this.hasListeners(),j=!A&&Ud(e,n),P=A&&Vd(e,r,n,a);(j||P)&&(h={...h,...Yh(u.data,e.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:g,errorUpdatedAt:y,status:v}=h;m=h.data;let b=!1;if(n.placeholderData!==void 0&&m===void 0&&v==="pending"){let A;o?.isPlaceholderData&&n.placeholderData===s?.placeholderData?(A=o.data,b=!0):A=typeof n.placeholderData=="function"?n.placeholderData(this.#h?.state.data,this.#h):n.placeholderData,A!==void 0&&(v="success",m=Rl(o?.data,A,n),f=!0)}if(n.select&&m!==void 0&&!b)if(o&&m===i?.data&&n.select===this.#m)m=this.#f;else try{this.#m=n.select,m=n.select(m),m=Rl(o?.data,m,n),this.#f=m,this.#o=null}catch(A){this.#o=A}this.#o&&(g=this.#o,m=this.#f,y=Date.now(),v="error");const x=h.fetchStatus==="fetching",w=v==="pending",E=v==="error",C=w&&x,S=m!==void 0,_={status:v,fetchStatus:h.fetchStatus,isPending:w,isSuccess:v==="success",isError:E,isInitialLoading:C,isLoading:C,data:m,dataUpdatedAt:h.dataUpdatedAt,error:g,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:x,isRefetching:x&&!w,isLoadingError:E&&!S,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:E&&S,isStale:Bc(e,n),refetch:this.refetch,promise:this.#s,isEnabled:jt(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const A=_.data!==void 0,j=_.status==="error"&&!A,P=Z=>{j?Z.reject(_.error):A&&Z.resolve(_.data)},O=()=>{const Z=this.#s=_.promise=Ml();P(Z)},H=this.#s;switch(H.status){case"pending":e.queryHash===r.queryHash&&P(H);break;case"fulfilled":(j||_.data!==H.value)&&O();break;case"rejected":(!j||_.error!==H.reason)&&O();break}}return _}updateResult(){const e=this.#a,n=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Ri(n,e))return;this.#a=n;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.#p.size)return!0;const i=new Set(o??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#a).some(s=>{const l=s;return this.#a[l]!==e[l]&&i.has(l)})};this.#E({listeners:r()})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const n=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#E(e){We.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function K8(e,n){return jt(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function Ud(e,n){return K8(e,n)||e.state.data!==void 0&&Pl(e,n,n.refetchOnMount)}function Pl(e,n,r){if(jt(n.enabled,e)!==!1&&Wn(n.staleTime,e)!=="static"){const a=typeof r=="function"?r(e):r;return a==="always"||a!==!1&&Bc(e,n)}return!1}function Vd(e,n,r,a){return(e!==n||jt(a.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Bc(e,r)}function Bc(e,n){return jt(n.enabled,e)!==!1&&e.isStaleByTime(Wn(n.staleTime,e))}function Y8(e,n){return!Ri(e.getCurrentResult(),n)}function Zd(e){return{onFetch:(n,r)=>{const a=n.options,o=n.fetchOptions?.meta?.fetchMore?.direction,i=n.state.data?.pages||[],s=n.state.data?.pageParams||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const f=y=>{U8(y,()=>n.signal,()=>h=!0)},m=qh(n.options,n.fetchOptions),g=async(y,v,b)=>{if(h)return Promise.reject();if(v==null&&y.pages.length)return Promise.resolve(y);const w=(()=>{const M={client:n.client,queryKey:n.queryKey,pageParam:v,direction:b?"backward":"forward",meta:n.options.meta};return f(M),M})(),E=await m(w),{maxPages:C}=n.options,S=b?z8:H8;return{pages:S(y.pages,E,C),pageParams:S(y.pageParams,v,C)}};if(o&&i.length){const y=o==="backward",v=y?Q8:Bd,b={pages:i,pageParams:s},x=v(a,b);l=await g(b,x,y)}else{const y=e??i.length;do{const v=c===0?s[0]??a.initialPageParam:Bd(a,l);if(c>0&&v==null)break;l=await g(l,v),c++}while(c<y)}return l};n.options.persister?n.fetchFn=()=>n.options.persister?.(u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=u}}}function Bd(e,{pages:n,pageParams:r}){const a=n.length-1;return n.length>0?e.getNextPageParam(n[a],n,r[a],r):void 0}function Q8(e,{pages:n,pageParams:r}){return n.length>0?e.getPreviousPageParam?.(n[0],n,r[0],r):void 0}var X8=class extends Kh{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Xh(),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(n=>n!==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.#a?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=Gh({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(i,s)=>{this.#r({type:"failed",failureCount:i,error:s})},onPause:()=>{this.#r({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",o=!this.#a.canStart();try{if(a)n();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const s=await this.options.onMutate?.(e,r);s!==this.state.context&&this.#r({type:"pending",context:s,variables:e,isPaused:o})}const i=await this.#a.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,r),await this.options.onSuccess?.(i,e,this.state.context,r),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(i,null,e,this.state.context,r),this.#r({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,e,this.state.context,this,r)}catch(s){Promise.reject(s)}try{await this.options.onError?.(i,e,this.state.context,r)}catch(s){Promise.reject(s)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,r)}catch(s){Promise.reject(s)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,r)}catch(s){Promise.reject(s)}throw this.#r({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#r(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),We.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Xh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var J8=class extends ra{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,r){const a=new X8({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(a),a}add(e){this.#e.add(e);const n=Xo(e);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=Xo(e);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Xo(e);if(typeof n=="string"){const a=this.#t.get(n)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const n=Xo(e);return typeof n=="string"?this.#t.get(n)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){We.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 n={exact:!0,...e};return this.getAll().find(r=>Ld(n,r))}findAll(e={}){return this.getAll().filter(n=>Ld(e,n))}notify(e){We.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return We.batch(()=>Promise.all(e.map(n=>n.continue().catch(ft))))}};function Xo(e){return e.options.scope?.id}var e6=class extends ra{#e;#t=void 0;#n;#a;constructor(n,r){super(),this.#e=n,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const r=this.options;this.options=this.#e.defaultMutationOptions(n),Ri(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&xr(r.mutationKey)!==xr(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#r(),this.#i(n)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(n,r){return this.#a=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(n)}#r(){const n=this.#n?.state??Xh();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#i(n){We.batch(()=>{if(this.#a&&this.hasListeners()){const r=this.#t.variables,a=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(n?.type==="success"){try{this.#a.onSuccess?.(n.data,r,a,o)}catch(i){Promise.reject(i)}try{this.#a.onSettled?.(n.data,null,r,a,o)}catch(i){Promise.reject(i)}}else if(n?.type==="error"){try{this.#a.onError?.(n.error,r,a,o)}catch(i){Promise.reject(i)}try{this.#a.onSettled?.(void 0,n.error,r,a,o)}catch(i){Promise.reject(i)}}}this.listeners.forEach(r=>{r(this.#t)})})}},t6=class extends ra{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,r){const a=n.queryKey,o=n.queryHash??zc(a,n);let i=this.get(o);return i||(i=new G8({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){We.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Id(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>Id(e,r)):n}notify(e){We.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){We.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){We.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},n6=class{#e;#t;#n;#a;#r;#i;#s;#o;constructor(e={}){this.#e=e.queryCache||new t6,this.#t=e.mutationCache||new J8,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=Zc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Mi.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#e.build(this,n),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Wn(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:r})=>{const a=r.data;return[n,a]})}setQueryData(e,n,r){const a=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(a.queryHash)?.state.data,s=L8(n,i);if(s!==void 0)return this.#e.build(this,a).setData(s,{...r,manual:!0})}setQueriesData(e,n,r){return We.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;We.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#e;return We.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},a=We.batch(()=>this.#e.findAll(e).map(o=>o.cancel(r)));return Promise.all(a).then(ft).catch(ft)}invalidateQueries(e,n={}){return We.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},a=We.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(ft)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(a).then(ft)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(Wn(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ft).catch(ft)}fetchInfiniteQuery(e){return e.behavior=Zd(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ft).catch(ft)}ensureInfiniteQueryData(e){return e.behavior=Zd(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Mi.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,n){this.#a.set(xr(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#a.values()],r={};return n.forEach(a=>{Qa(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,n){this.#r.set(xr(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(a=>{Qa(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=zc(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Uc&&(n.enabled=!1),n}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()}},Jh=d.createContext(void 0),Qn=e=>{const n=d.useContext(Jh);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},r6=({client:e,children:n})=>(d.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(Jh.Provider,{value:e,children:n})),e1=d.createContext(!1),a6=()=>d.useContext(e1);e1.Provider;function o6(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var i6=d.createContext(o6()),s6=()=>d.useContext(i6),l6=(e,n,r)=>{const a=r?.state.error&&typeof e.throwOnError=="function"?Vc(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(n.isReset()||(e.retryOnMount=!1))},c6=e=>{d.useEffect(()=>{e.clearReset()},[e])},u6=({result:e,errorResetBoundary:n,throwOnError:r,query:a,suspense:o})=>e.isError&&!n.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||Vc(r,[e.error,a])),d6=(e,n)=>n.state.data===void 0,f6=e=>{if(e.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>r(a(...o)):r(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},h6=(e,n)=>e.isLoading&&e.isFetching&&!n,p6=(e,n)=>e?.suspense&&n.isPending,qd=(e,n,r)=>n.fetchOptimistic(e).catch(()=>{r.clearReset()});function t1(e,n,r){const a=a6(),o=s6(),i=Qn(),s=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(s);const l=i.getQueryCache().get(s.queryHash);s._optimisticResults=a?"isRestoring":"optimistic",f6(s),l6(s,o,l),c6(o);const c=!i.getQueryCache().get(s.queryHash),[u]=d.useState(()=>new n(i,s)),h=u.getOptimisticResult(s),f=!a&&e.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(m=>{const g=f?u.subscribe(We.batchCalls(m)):ft;return u.updateResult(),g},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),d.useEffect(()=>{u.setOptions(s)},[s,u]),p6(s,h))throw qd(s,u,o);if(u6({result:h,errorResetBoundary:o,throwOnError:s.throwOnError,query:l,suspense:s.suspense}))throw h.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(s,h),s.experimental_prefetchInRender&&!vr&&h6(h,a)&&(c?qd(s,u,o):l?.promise)?.catch(ft).finally(()=>{u.updateResult()}),s.notifyOnChangeProps?h:u.trackResult(h)}function On(e,n){return t1(e,Qh)}function aa(e,n){return t1({...e,enabled:!0,suspense:!0,throwOnError:d6,placeholderData:void 0},Qh)}function Ti(e,n){const r=Qn(),[a]=d.useState(()=>new e6(r,e));d.useEffect(()=>{a.setOptions(e)},[a,e]);const o=d.useSyncExternalStore(d.useCallback(s=>a.subscribe(We.batchCalls(s)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),i=d.useCallback((s,l)=>{a.mutate(s,l).catch(ft)},[a]);if(o.error&&Vc(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function Wd(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function bo(...e){return n=>{let r=!1;const a=e.map(o=>{const i=Wd(o,n);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<a.length;o++){const i=a[o];typeof i=="function"?i():Wd(e[o],null)}}}}function Re(...e){return d.useCallback(bo(...e),e)}var m6=Symbol.for("react.lazy"),Pi=ts[" use ".trim().toString()];function g6(e){return typeof e=="object"&&e!==null&&"then"in e}function n1(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===m6&&"_payload"in e&&g6(e._payload)}function y6(e){const n=x6(e),r=d.forwardRef((a,o)=>{let{children:i,...s}=a;n1(i)&&typeof Pi=="function"&&(i=Pi(i._payload));const l=d.Children.toArray(i),c=l.find(w6);if(c){const u=c.props.children,h=l.map(f=>f===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:f);return p.jsx(n,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,h):null})}return p.jsx(n,{...s,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var v6=y6("Slot");function x6(e){const n=d.forwardRef((r,a)=>{let{children:o,...i}=r;if(n1(o)&&typeof Pi=="function"&&(o=Pi(o._payload)),d.isValidElement(o)){const s=E6(o),l=_6(i,o.props);return o.type!==d.Fragment&&(l.ref=a?bo(a,s):s),d.cloneElement(o,l)}return d.Children.count(o)>1?d.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var b6=Symbol("radix.slottable");function w6(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===b6}function _6(e,n){const r={...n};for(const a in n){const o=e[a],i=n[a];/^on[A-Z]/.test(a)?o&&i?r[a]=(...l)=>{const c=i(...l);return o(...l),c}:o&&(r[a]=o):a==="style"?r[a]={...o,...i}:a==="className"&&(r[a]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function E6(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const C6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),S6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48V88H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),A6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),R6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),M6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),T6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),P6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),N6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),O6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),j6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),D6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178,36c-20.09,0-37.92,7.93-50,21.56C115.92,43.93,98.09,36,78,36a66.08,66.08,0,0,0-66,66c0,72.34,105.81,130.14,110.31,132.57a12,12,0,0,0,11.38,0C138.19,232.14,244,174.34,244,102A66.08,66.08,0,0,0,178,36Zm-5.49,142.36A328.69,328.69,0,0,1,128,210.16a328.69,328.69,0,0,1-44.51-31.8C61.82,159.77,36,131.42,36,102A42,42,0,0,1,78,60c17.8,0,32.7,9.4,38.89,24.54a12,12,0,0,0,22.22,0C145.3,69.4,160.2,60,178,60a42,42,0,0,1,42,42C220,131.42,194.18,159.77,172.51,178.36Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,102c0,66-104,122-104,122S24,168,24,102A54,54,0,0,1,78,48c22.59,0,41.94,12.31,50,32,8.06-19.69,27.41-32,50-32A54,54,0,0,1,232,102Z",opacity:"0.2"}),d.createElement("path",{d:"M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,102c0,70-103.79,126.66-108.21,129a8,8,0,0,1-7.58,0C119.79,228.66,16,172,16,102A62.07,62.07,0,0,1,78,40c20.65,0,38.73,8.88,50,23.89C139.27,48.88,157.35,40,178,40A62.07,62.07,0,0,1,240,102Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178,42c-21,0-39.26,9.47-50,25.34C117.26,51.47,99,42,78,42a60.07,60.07,0,0,0-60,60c0,29.2,18.2,59.59,54.1,90.31a334.68,334.68,0,0,0,53.06,37,6,6,0,0,0,5.68,0,334.68,334.68,0,0,0,53.06-37C219.8,161.59,238,131.2,238,102A60.07,60.07,0,0,0,178,42ZM128,217.11C111.59,207.64,30,157.72,30,102A48.05,48.05,0,0,1,78,54c20.28,0,37.31,10.83,44.45,28.27a6,6,0,0,0,11.1,0C140.69,64.83,157.72,54,178,54a48.05,48.05,0,0,1,48,48C226,157.72,144.41,207.64,128,217.11Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178,44c-21.44,0-39.92,10.19-50,27.07C117.92,54.19,99.44,44,78,44a58.07,58.07,0,0,0-58,58c0,28.59,18,58.47,53.4,88.79a333.81,333.81,0,0,0,52.7,36.73,4,4,0,0,0,3.8,0,333.81,333.81,0,0,0,52.7-36.73C218,160.47,236,130.59,236,102A58.07,58.07,0,0,0,178,44ZM128,219.42c-14-8-100-59.35-100-117.42A50.06,50.06,0,0,1,78,52c21.11,0,38.85,11.31,46.3,29.51a4,4,0,0,0,7.4,0C139.15,63.31,156.89,52,178,52a50.06,50.06,0,0,1,50,50C228,160,142,211.46,128,219.42Z"}))]]),k6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M144,96a16,16,0,1,1,16,16A16,16,0,0,1,144,96Zm92-40V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56ZM44,60v79.72l33.86-33.86a20,20,0,0,1,28.28,0L147.31,147l17.18-17.17a20,20,0,0,1,28.28,0L212,149.09V60Zm0,136H162.34L92,125.66l-48,48Zm168,0V183l-33.37-33.37L164.28,164l32,32Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,56V178.06l-39.72-39.72a8,8,0,0,0-11.31,0L147.31,164,97.66,114.34a8,8,0,0,0-11.32,0L32,168.69V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),d.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,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["fill",d.createElement(d.Fragment,null,d.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,40ZM156,88a12,12,0,1,1-12,12A12,12,0,0,1,156,88Zm60,112H40V160.69l46.34-46.35a8,8,0,0,1,11.32,0h0L165,181.66a8,8,0,0,0,11.32-11.32l-17.66-17.65L173,138.34a8,8,0,0,1,11.31,0L216,170.07V200Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V163.57L188.53,134.1a14,14,0,0,0-19.8,0l-21.42,21.42L101.9,110.1a14,14,0,0,0-19.8,0L38,154.2V56A2,2,0,0,1,40,54ZM38,200V171.17l52.58-52.58a2,2,0,0,1,2.84,0L176.83,202H40A2,2,0,0,1,38,200Zm178,2H193.8l-38-38,21.41-21.42a2,2,0,0,1,2.83,0l38,38V200A2,2,0,0,1,216,202ZM146,100a10,10,0,1,1,10,10A10,10,0,0,1,146,100Z"}))],["regular",d.createElement(d.Fragment,null,d.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,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4V168.4l-32.89-32.89a12,12,0,0,0-17,0l-22.83,22.83-46.82-46.83a12,12,0,0,0-17,0L36,159V56A4,4,0,0,1,40,52ZM36,200V170.34l53.17-53.17a4,4,0,0,1,5.66,0L181.66,204H40A4,4,0,0,1,36,200Zm180,4H193l-40-40,22.83-22.83a4,4,0,0,1,5.66,0L220,179.71V200A4,4,0,0,1,216,204ZM148,100a8,8,0,1,1,8,8A8,8,0,0,1,148,100Z"}))]]),I6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),L6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M117.18,188.74a12,12,0,0,1,0,17l-5.12,5.12A58.26,58.26,0,0,1,70.6,228h0A58.62,58.62,0,0,1,29.14,127.92L63.89,93.17a58.64,58.64,0,0,1,98.56,28.11,12,12,0,1,1-23.37,5.44,34.65,34.65,0,0,0-58.22-16.58L46.11,144.89A34.62,34.62,0,0,0,70.57,204h0a34.41,34.41,0,0,0,24.49-10.14l5.11-5.12A12,12,0,0,1,117.18,188.74ZM226.83,45.17a58.65,58.65,0,0,0-82.93,0l-5.11,5.11a12,12,0,0,0,17,17l5.12-5.12a34.63,34.63,0,1,1,49,49L175.1,145.86A34.39,34.39,0,0,1,150.61,156h0a34.63,34.63,0,0,1-33.69-26.72,12,12,0,0,0-23.38,5.44A58.64,58.64,0,0,0,150.56,180h.05a58.28,58.28,0,0,0,41.47-17.17l34.75-34.75a58.62,58.62,0,0,0,0-82.91Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M218.34,119.6,183.6,154.34a46.58,46.58,0,0,1-44.31,12.26c-.31.34-.62.67-.95,1L103.6,202.34A46.63,46.63,0,1,1,37.66,136.4L72.4,101.66A46.6,46.6,0,0,1,116.71,89.4c.31-.34.62-.67,1-1L152.4,53.66a46.63,46.63,0,0,1,65.94,65.94Z",opacity:"0.2"}),d.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,7.78,8.22H152a8,8,0,0,0,8-7.78A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["fill",d.createElement(d.Fragment,null,d.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,32ZM115.7,192.49a43.31,43.31,0,0,1-55-66.43l25.37-25.37a43.35,43.35,0,0,1,61.25,0,42.9,42.9,0,0,1,9.95,15.43,8,8,0,1,1-15,5.6A27.33,27.33,0,0,0,97.37,112L72,137.37a27.32,27.32,0,0,0,34.68,41.91,8,8,0,1,1,9,13.21Zm79.61-62.55-25.37,25.37A43,43,0,0,1,139.32,168h0a43.35,43.35,0,0,1-40.53-28.12,8,8,0,1,1,15-5.6A27.35,27.35,0,0,0,139.28,152h0a27.14,27.14,0,0,0,19.32-8L184,118.63a27.32,27.32,0,0,0-34.68-41.91,8,8,0,1,1-9-13.21,43.32,43.32,0,0,1,55,66.43Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M238,88.18a52.42,52.42,0,0,1-15.4,35.66l-34.75,34.75A52.28,52.28,0,0,1,150.62,174h-.05A52.63,52.63,0,0,1,98,119.9a6,6,0,0,1,6-5.84h.17a6,6,0,0,1,5.83,6.16A40.62,40.62,0,0,0,150.58,162h0a40.4,40.4,0,0,0,28.73-11.9l34.75-34.74A40.63,40.63,0,0,0,156.63,57.9l-11,11a6,6,0,0,1-8.49-8.49l11-11a52.62,52.62,0,0,1,74.43,0A52.83,52.83,0,0,1,238,88.18Zm-127.62,98.9-11,11A40.36,40.36,0,0,1,70.6,210h0a40.63,40.63,0,0,1-28.7-69.36L76.62,105.9A40.63,40.63,0,0,1,146,135.77a6,6,0,0,0,5.83,6.16H152a6,6,0,0,0,6-5.84A52.63,52.63,0,0,0,68.14,97.42L33.38,132.16A52.63,52.63,0,0,0,70.56,222h0a52.26,52.26,0,0,0,37.22-15.42l11-11a6,6,0,1,0-8.49-8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,16,.45A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236,88.12a50.44,50.44,0,0,1-14.81,34.31l-34.75,34.74A50.33,50.33,0,0,1,150.62,172h-.05A50.63,50.63,0,0,1,100,120a4,4,0,0,1,4-3.89h.11a4,4,0,0,1,3.89,4.11A42.64,42.64,0,0,0,150.58,164h0a42.32,42.32,0,0,0,30.14-12.49l34.75-34.74a42.63,42.63,0,1,0-60.29-60.28l-11,11a4,4,0,0,1-5.66-5.65l11-11A50.64,50.64,0,0,1,236,88.12ZM111.78,188.49l-11,11A42.33,42.33,0,0,1,70.6,212h0a42.63,42.63,0,0,1-30.11-72.77l34.75-34.74A42.63,42.63,0,0,1,148,135.82a4,4,0,0,0,8,.23A50.64,50.64,0,0,0,69.55,98.83L34.8,133.57A50.63,50.63,0,0,0,70.56,220h0a50.33,50.33,0,0,0,35.81-14.83l11-11a4,4,0,1,0-5.65-5.66Z"}))]]),F6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,64V192H40V64Z",opacity:"0.2"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),$6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),H6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z",opacity:"0.2"}),d.createElement("path",{d:"M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z"}))]]),z6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),U6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.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"}),d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",d.createElement(d.Fragment,null,d.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,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),V6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),Z6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,80v88l-24,24H48V64H208A16,16,0,0,1,224,80Z",opacity:"0.2"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),B6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),q6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z",opacity:"0.2"}),d.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z"}))]]),W6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),G6=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),K6=new Map([["bold",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}),d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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",d.createElement(d.Fragment,null,d.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"}))]]),Y6=d.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Oe=d.forwardRef((e,n)=>{const{alt:r,color:a,size:o,weight:i,mirrored:s,children:l,weights:c,...u}=e,{color:h="currentColor",size:f,weight:m="regular",mirrored:g=!1,...y}=d.useContext(Y6);return d.createElement("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:o??f,height:o??f,fill:a??h,viewBox:"0 0 256 256",transform:s||g?"scale(-1, 1)":void 0,...y,...u},!!r&&d.createElement("title",null,r),l,c.get(i??m))});Oe.displayName="IconBase";const r1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:C6}));r1.displayName="BellIcon";const a1=r1,o1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:S6}));o1.displayName="CalendarIcon";const Q6=o1,i1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:A6}));i1.displayName="CaretDownIcon";const qc=i1,s1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:R6}));s1.displayName="CaretLeftIcon";const Zr=s1,l1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:M6}));l1.displayName="CaretRightIcon";const $a=l1,c1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:T6}));c1.displayName="CaretUpIcon";const X6=c1,u1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:P6}));u1.displayName="CheckIcon";const J6=u1,d1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:N6}));d1.displayName="DotsThreeVerticalIcon";const Wc=d1,f1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:O6}));f1.displayName="GearIcon";const e4=f1,Gc=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:j6}));Gc.displayName="GridFourIcon";const t4=Gc,h1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:D6}));h1.displayName="HeartIcon";const n4=h1,p1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:k6}));p1.displayName="ImageIcon";const m1=p1,g1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:I6}));g1.displayName="InfoIcon";const r4=g1,y1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:L6}));y1.displayName="LinkIcon";const a4=y1,v1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:F6}));v1.displayName="ListIcon";const Xa=v1,x1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:$6}));x1.displayName="MagnifyingGlassIcon";const o4=x1,b1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:H6}));b1.displayName="MoonIcon";const i4=b1,w1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:z6}));w1.displayName="PencilSimpleIcon";const _1=w1,E1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:U6}));E1.displayName="PlusIcon";const C1=E1,Kc=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:V6}));Kc.displayName="PushPinIcon";const s4=Kc,S1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:Z6}));S1.displayName="SortAscendingIcon";const A1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:B6}));A1.displayName="SpinnerIcon";const l4=A1,R1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:q6}));R1.displayName="SunIcon";const c4=R1,M1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:W6}));M1.displayName="TagIcon";const u4=M1,T1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:G6}));T1.displayName="TrashIcon";const P1=T1,N1=d.forwardRef((e,n)=>d.createElement(Oe,{ref:n,...e,weights:K6}));N1.displayName="XIcon";const Yc=N1;function d4(e){return p.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:[p.jsx("circle",{cx:"6",cy:"6",r:"3"}),p.jsx("circle",{cx:"18",cy:"6",r:"3"}),p.jsx("circle",{cx:"6",cy:"18",r:"3"}),p.jsx("circle",{cx:"18",cy:"18",r:"3"}),p.jsx("circle",{cx:"12",cy:"12",r:"3"}),p.jsx("line",{x1:"8.5",y1:"7.5",x2:"10",y2:"10"}),p.jsx("line",{x1:"15.5",y1:"7.5",x2:"14",y2:"10"}),p.jsx("line",{x1:"8.5",y1:"16.5",x2:"10",y2:"14"}),p.jsx("line",{x1:"15.5",y1:"16.5",x2:"14",y2:"14"})]})}const Gd=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kd=Iy,Xn=(e,n)=>r=>{var a;if(n?.variants==null)return Kd(e,r?.class,r?.className);const{variants:o,defaultVariants:i}=n,s=Object.keys(o).map(u=>{const h=r?.[u],f=i?.[u];if(h===null)return null;const m=Gd(h)||Gd(f);return o[u][m]}),l=r&&Object.entries(r).reduce((u,h)=>{let[f,m]=h;return m===void 0||(u[f]=m),u},{}),c=n==null||(a=n.compoundVariants)===null||a===void 0?void 0:a.reduce((u,h)=>{let{class:f,className:m,...g}=h;return Object.entries(g).every(y=>{let[v,b]=y;return Array.isArray(b)?b.includes({...i,...l}[v]):{...i,...l}[v]===b})?[...u,f,m]:u},[]);return Kd(e,s,c,r?.class,r?.className)},f4=Xn(["inline-flex","items-center","justify-center","gap-2","font-bold","transition-all","duration-200","border-2","border-border","disabled:pointer-events-none","disabled:opacity-50","hover:shadow-sketchy","active:translate-x-0.5","active:translate-y-0.5","active:shadow-none"],{variants:{variant:{primary:["bg-cta","text-fg-default","hover:bg-cta-hover"],ghost:["border-transparent","hover:border-border","hover:bg-ghost"],danger:["bg-accent-danger","text-fg-default","hover:bg-accent-danger-hover"],"soft-success":["bg-accent-soft-success","text-fg-default","hover:bg-accent-soft-success-hover"],"soft-danger":["bg-accent-soft-danger","text-fg-default","hover:bg-accent-soft-danger-hover"]},size:{sm:"h-8 px-3 text-sm rounded-[12px_4px_13px_3px/4px_10px_4px_12px]",md:"h-10 px-4 text-sm rounded-[15px_4px_16px_4px/4px_12px_5px_14px]",lg:"h-12 px-6 text-base rounded-[18px_5px_19px_5px/5px_14px_6px_16px]",icon:"h-10 w-10 rounded-[12px_4px_13px_3px/4px_10px_4px_12px]","icon-sm":"h-8 w-8 rounded-[10px_3px_11px_3px/3px_8px_3px_10px]"}},defaultVariants:{variant:"primary",size:"md"}}),ze=d.forwardRef(({className:e,variant:n,size:r,asChild:a=!1,isLoading:o,children:i,disabled:s,...l},c)=>{const u=a?v6:"button";return p.jsx(u,{ref:c,className:f4({variant:n,size:r,className:e}),disabled:s||o,...l,children:o?p.jsxs(p.Fragment,{children:[p.jsx(l4,{className:"animate-spin h-4 w-4"}),i]}):i})});ze.displayName="Button";function te(e,n,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return n?.(o)}}function h4(e,n){const r=d.createContext(n),a=i=>{const{children:s,...l}=i,c=d.useMemo(()=>l,Object.values(l));return p.jsx(r.Provider,{value:c,children:s})};a.displayName=e+"Provider";function o(i){const s=d.useContext(r);if(s)return s;if(n!==void 0)return n;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[a,o]}function In(e,n=[]){let r=[];function a(i,s){const l=d.createContext(s),c=r.length;r=[...r,s];const u=f=>{const{scope:m,children:g,...y}=f,v=m?.[e]?.[c]||l,b=d.useMemo(()=>y,Object.values(y));return p.jsx(v.Provider,{value:b,children:g})};u.displayName=i+"Provider";function h(f,m){const g=m?.[e]?.[c]||l,y=d.useContext(g);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,h]}const o=()=>{const i=r.map(s=>d.createContext(s));return function(l){const c=l?.[e]||i;return d.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[a,p4(o,...n)]}function p4(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const a=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=a.reduce((l,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...l,...f}},{});return d.useMemo(()=>({[`__scope${n.scopeName}`]:s}),[s])}};return r.scopeName=n.scopeName,r}var it=globalThis?.document?d.useLayoutEffect:()=>{},m4=ts[" useId ".trim().toString()]||(()=>{}),g4=0;function un(e){const[n,r]=d.useState(m4());return it(()=>{r(a=>a??String(g4++))},[e]),n?`radix-${n}`:""}var y4=ts[" useInsertionEffect ".trim().toString()]||it;function jn({prop:e,defaultProp:n,onChange:r=()=>{},caller:a}){const[o,i,s]=v4({defaultProp:n,onChange:r}),l=e!==void 0,c=l?e:o;{const h=d.useRef(e!==void 0);d.useEffect(()=>{const f=h.current;f!==l&&console.warn(`${a} is changing from ${f?"controlled":"uncontrolled"} to ${l?"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.`),h.current=l},[l,a])}const u=d.useCallback(h=>{if(l){const f=x4(h)?h(e):h;f!==e&&s.current?.(f)}else i(h)},[l,e,i,s]);return[c,u]}function v4({defaultProp:e,onChange:n}){const[r,a]=d.useState(e),o=d.useRef(r),i=d.useRef(n);return y4(()=>{i.current=n},[n]),d.useEffect(()=>{o.current!==r&&(i.current?.(r),o.current=r)},[r,o]),[r,a,i]}function x4(e){return typeof e=="function"}function Yr(e){const n=b4(e),r=d.forwardRef((a,o)=>{const{children:i,...s}=a,l=d.Children.toArray(i),c=l.find(_4);if(c){const u=c.props.children,h=l.map(f=>f===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:f);return p.jsx(n,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,h):null})}return p.jsx(n,{...s,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function b4(e){const n=d.forwardRef((r,a)=>{const{children:o,...i}=r;if(d.isValidElement(o)){const s=C4(o),l=E4(i,o.props);return o.type!==d.Fragment&&(l.ref=a?bo(a,s):s),d.cloneElement(o,l)}return d.Children.count(o)>1?d.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var O1=Symbol("radix.slottable");function w4(e){const n=({children:r})=>p.jsx(p.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=O1,n}function _4(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===O1}function E4(e,n){const r={...n};for(const a in n){const o=e[a],i=n[a];/^on[A-Z]/.test(a)?o&&i?r[a]=(...l)=>{const c=i(...l);return o(...l),c}:o&&(r[a]=o):a==="style"?r[a]={...o,...i}:a==="className"&&(r[a]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function C4(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var S4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],be=S4.reduce((e,n)=>{const r=Yr(`Primitive.${n}`),a=d.forwardRef((o,i)=>{const{asChild:s,...l}=o,c=s?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...l,ref:i})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{});function j1(e,n){e&&Mn.flushSync(()=>e.dispatchEvent(n))}function hn(e){const n=d.useRef(e);return d.useEffect(()=>{n.current=e}),d.useMemo(()=>(...r)=>n.current?.(...r),[])}function A4(e,n=globalThis?.document){const r=hn(e);d.useEffect(()=>{const a=o=>{o.key==="Escape"&&r(o)};return n.addEventListener("keydown",a,{capture:!0}),()=>n.removeEventListener("keydown",a,{capture:!0})},[r,n])}var R4="DismissableLayer",Nl="dismissableLayer.update",M4="dismissableLayer.pointerDownOutside",T4="dismissableLayer.focusOutside",Yd,D1=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wo=d.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=e,u=d.useContext(D1),[h,f]=d.useState(null),m=h?.ownerDocument??globalThis?.document,[,g]=d.useState({}),y=Re(n,_=>f(_)),v=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(b),w=h?v.indexOf(h):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,C=w>=x,S=O4(_=>{const A=_.target,j=[...u.branches].some(P=>P.contains(A));!C||j||(o?.(_),s?.(_),_.defaultPrevented||l?.())},m),M=j4(_=>{const A=_.target;[...u.branches].some(P=>P.contains(A))||(i?.(_),s?.(_),_.defaultPrevented||l?.())},m);return A4(_=>{w===u.layers.size-1&&(a?.(_),!_.defaultPrevented&&l&&(_.preventDefault(),l()))},m),d.useEffect(()=>{if(h)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Yd=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),Qd(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Yd)}},[h,m,r,u]),d.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),Qd())},[h,u]),d.useEffect(()=>{const _=()=>g({});return document.addEventListener(Nl,_),()=>document.removeEventListener(Nl,_)},[]),p.jsx(be.div,{...c,ref:y,style:{pointerEvents:E?C?"auto":"none":void 0,...e.style},onFocusCapture:te(e.onFocusCapture,M.onFocusCapture),onBlurCapture:te(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:te(e.onPointerDownCapture,S.onPointerDownCapture)})});wo.displayName=R4;var P4="DismissableLayerBranch",N4=d.forwardRef((e,n)=>{const r=d.useContext(D1),a=d.useRef(null),o=Re(n,a);return d.useEffect(()=>{const i=a.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),p.jsx(be.div,{...e,ref:o})});N4.displayName=P4;function O4(e,n=globalThis?.document){const r=hn(e),a=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const i=l=>{if(l.target&&!a.current){let c=function(){k1(M4,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=c,n.addEventListener("click",o.current,{once:!0})):c()}else n.removeEventListener("click",o.current);a.current=!1},s=window.setTimeout(()=>{n.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),n.removeEventListener("pointerdown",i),n.removeEventListener("click",o.current)}},[n,r]),{onPointerDownCapture:()=>a.current=!0}}function j4(e,n=globalThis?.document){const r=hn(e),a=d.useRef(!1);return d.useEffect(()=>{const o=i=>{i.target&&!a.current&&k1(T4,r,{originalEvent:i},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,r]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function Qd(){const e=new CustomEvent(Nl);document.dispatchEvent(e)}function k1(e,n,r,{discrete:a}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&o.addEventListener(e,n,{once:!0}),a?j1(o,i):o.dispatchEvent(i)}var Us="focusScope.autoFocusOnMount",Vs="focusScope.autoFocusOnUnmount",Xd={bubbles:!1,cancelable:!0},D4="FocusScope",as=d.forwardRef((e,n)=>{const{loop:r=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,c]=d.useState(null),u=hn(o),h=hn(i),f=d.useRef(null),m=Re(n,v=>c(v)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(a){let v=function(E){if(g.paused||!l)return;const C=E.target;l.contains(C)?f.current=C:zn(f.current,{select:!0})},b=function(E){if(g.paused||!l)return;const C=E.relatedTarget;C!==null&&(l.contains(C)||zn(f.current,{select:!0}))},x=function(E){if(document.activeElement===document.body)for(const S of E)S.removedNodes.length>0&&zn(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const w=new MutationObserver(x);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),w.disconnect()}}},[a,l,g.paused]),d.useEffect(()=>{if(l){ef.add(g);const v=document.activeElement;if(!l.contains(v)){const x=new CustomEvent(Us,Xd);l.addEventListener(Us,u),l.dispatchEvent(x),x.defaultPrevented||(k4(H4(I1(l)),{select:!0}),document.activeElement===v&&zn(l))}return()=>{l.removeEventListener(Us,u),setTimeout(()=>{const x=new CustomEvent(Vs,Xd);l.addEventListener(Vs,h),l.dispatchEvent(x),x.defaultPrevented||zn(v??document.body,{select:!0}),l.removeEventListener(Vs,h),ef.remove(g)},0)}}},[l,u,h,g]);const y=d.useCallback(v=>{if(!r&&!a||g.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(b&&x){const w=v.currentTarget,[E,C]=I4(w);E&&C?!v.shiftKey&&x===C?(v.preventDefault(),r&&zn(E,{select:!0})):v.shiftKey&&x===E&&(v.preventDefault(),r&&zn(C,{select:!0})):x===w&&v.preventDefault()}},[r,a,g.paused]);return p.jsx(be.div,{tabIndex:-1,...s,ref:m,onKeyDown:y})});as.displayName=D4;function k4(e,{select:n=!1}={}){const r=document.activeElement;for(const a of e)if(zn(a,{select:n}),document.activeElement!==r)return}function I4(e){const n=I1(e),r=Jd(n,e),a=Jd(n.reverse(),e);return[r,a]}function I1(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function Jd(e,n){for(const r of e)if(!L4(r,{upTo:n}))return r}function L4(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function F4(e){return e instanceof HTMLInputElement&&"select"in e}function zn(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&F4(e)&&n&&e.select()}}var ef=$4();function $4(){let e=[];return{add(n){const r=e[0];n!==r&&r?.pause(),e=tf(e,n),e.unshift(n)},remove(n){e=tf(e,n),e[0]?.resume()}}}function tf(e,n){const r=[...e],a=r.indexOf(n);return a!==-1&&r.splice(a,1),r}function H4(e){return e.filter(n=>n.tagName!=="A")}var z4="Portal",_o=d.forwardRef((e,n)=>{const{container:r,...a}=e,[o,i]=d.useState(!1);it(()=>i(!0),[]);const s=r||o&&globalThis?.document?.body;return s?Ly.createPortal(p.jsx(be.div,{...a,ref:n}),s):null});_o.displayName=z4;function U4(e,n){return d.useReducer((r,a)=>n[r][a]??r,e)}var yn=e=>{const{present:n,children:r}=e,a=V4(n),o=typeof r=="function"?r({present:a.isPresent}):d.Children.only(r),i=Re(a.ref,Z4(o));return typeof r=="function"||a.isPresent?d.cloneElement(o,{ref:i}):null};yn.displayName="Presence";function V4(e){const[n,r]=d.useState(),a=d.useRef(null),o=d.useRef(e),i=d.useRef("none"),s=e?"mounted":"unmounted",[l,c]=U4(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Jo(a.current);i.current=l==="mounted"?u:"none"},[l]),it(()=>{const u=a.current,h=o.current;if(h!==e){const m=i.current,g=Jo(u);e?c("MOUNT"):g==="none"||u?.display==="none"?c("UNMOUNT"):c(h&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),it(()=>{if(n){let u;const h=n.ownerDocument.defaultView??window,f=g=>{const v=Jo(a.current).includes(CSS.escape(g.animationName));if(g.target===n&&v&&(c("ANIMATION_END"),!o.current)){const b=n.style.animationFillMode;n.style.animationFillMode="forwards",u=h.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=b)})}},m=g=>{g.target===n&&(i.current=Jo(a.current))};return n.addEventListener("animationstart",m),n.addEventListener("animationcancel",f),n.addEventListener("animationend",f),()=>{h.clearTimeout(u),n.removeEventListener("animationstart",m),n.removeEventListener("animationcancel",f),n.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:d.useCallback(u=>{a.current=u?getComputedStyle(u):null,r(u)},[])}}function Jo(e){return e?.animationName||"none"}function Z4(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Zs=0;function Qc(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??nf()),document.body.insertAdjacentElement("beforeend",e[1]??nf()),Zs++,()=>{Zs===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Zs--}},[])}function nf(){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 B4=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Ir=new WeakMap,ei=new WeakMap,ti={},Bs=0,L1=function(e){return e&&(e.host||L1(e.parentNode))},q4=function(e,n){return n.map(function(r){if(e.contains(r))return r;var a=L1(r);return a&&e.contains(a)?a:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},W4=function(e,n,r,a){var o=q4(n,Array.isArray(e)?e:[e]);ti[r]||(ti[r]=new WeakMap);var i=ti[r],s=[],l=new Set,c=new Set(o),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};o.forEach(u);var h=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(l.has(m))h(m);else try{var g=m.getAttribute(a),y=g!==null&&g!=="false",v=(Ir.get(m)||0)+1,b=(i.get(m)||0)+1;Ir.set(m,v),i.set(m,b),s.push(m),v===1&&y&&ei.set(m,!0),b===1&&m.setAttribute(r,"true"),y||m.setAttribute(a,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return h(n),l.clear(),Bs++,function(){s.forEach(function(f){var m=Ir.get(f)-1,g=i.get(f)-1;Ir.set(f,m),i.set(f,g),m||(ei.has(f)||f.removeAttribute(a),ei.delete(f)),g||f.removeAttribute(r)}),Bs--,Bs||(Ir=new WeakMap,Ir=new WeakMap,ei=new WeakMap,ti={})}},Xc=function(e,n,r){r===void 0&&(r="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),o=B4(e);return o?(a.push.apply(a,Array.from(o.querySelectorAll("[aria-live], script"))),W4(a,o,r,"aria-hidden")):function(){return null}},os="Dialog",[F1]=In(os),[G4,Gt]=F1(os),$1=e=>{const{__scopeDialog:n,children:r,open:a,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,l=d.useRef(null),c=d.useRef(null),[u,h]=jn({prop:a,defaultProp:o??!1,onChange:i,caller:os});return p.jsx(G4,{scope:n,triggerRef:l,contentRef:c,contentId:un(),titleId:un(),descriptionId:un(),open:u,onOpenChange:h,onOpenToggle:d.useCallback(()=>h(f=>!f),[h]),modal:s,children:r})};$1.displayName=os;var H1="DialogTrigger",K4=d.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=Gt(H1,r),i=Re(n,o.triggerRef);return p.jsx(be.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":tu(o.open),...a,ref:i,onClick:te(e.onClick,o.onOpenToggle)})});K4.displayName=H1;var Jc="DialogPortal",[Y4,z1]=F1(Jc,{forceMount:void 0}),U1=e=>{const{__scopeDialog:n,forceMount:r,children:a,container:o}=e,i=Gt(Jc,n);return p.jsx(Y4,{scope:n,forceMount:r,children:d.Children.map(a,s=>p.jsx(yn,{present:r||i.open,children:p.jsx(_o,{asChild:!0,container:o,children:s})}))})};U1.displayName=Jc;var Ni="DialogOverlay",V1=d.forwardRef((e,n)=>{const r=z1(Ni,e.__scopeDialog),{forceMount:a=r.forceMount,...o}=e,i=Gt(Ni,e.__scopeDialog);return i.modal?p.jsx(yn,{present:a||i.open,children:p.jsx(X4,{...o,ref:n})}):null});V1.displayName=Ni;var Q4=Yr("DialogOverlay.RemoveScroll"),X4=d.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=Gt(Ni,r);return p.jsx(Cc,{as:Q4,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(be.div,{"data-state":tu(o.open),...a,ref:n,style:{pointerEvents:"auto",...a.style}})})}),br="DialogContent",Z1=d.forwardRef((e,n)=>{const r=z1(br,e.__scopeDialog),{forceMount:a=r.forceMount,...o}=e,i=Gt(br,e.__scopeDialog);return p.jsx(yn,{present:a||i.open,children:i.modal?p.jsx(J4,{...o,ref:n}):p.jsx(eb,{...o,ref:n})})});Z1.displayName=br;var J4=d.forwardRef((e,n)=>{const r=Gt(br,e.__scopeDialog),a=d.useRef(null),o=Re(n,r.contentRef,a);return d.useEffect(()=>{const i=a.current;if(i)return Xc(i)},[]),p.jsx(B1,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:te(e.onCloseAutoFocus,i=>{i.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:te(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&i.preventDefault()}),onFocusOutside:te(e.onFocusOutside,i=>i.preventDefault())})}),eb=d.forwardRef((e,n)=>{const r=Gt(br,e.__scopeDialog),a=d.useRef(!1),o=d.useRef(!1);return p.jsx(B1,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(a.current||r.triggerRef.current?.focus(),i.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(a.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;r.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),B1=d.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,l=Gt(br,r),c=d.useRef(null),u=Re(n,c);return Qc(),p.jsxs(p.Fragment,{children:[p.jsx(as,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:i,children:p.jsx(wo,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":tu(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(nb,{titleId:l.titleId}),p.jsx(ab,{contentRef:c,descriptionId:l.descriptionId})]})]})}),eu="DialogTitle",q1=d.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=Gt(eu,r);return p.jsx(be.h2,{id:o.titleId,...a,ref:n})});q1.displayName=eu;var W1="DialogDescription",tb=d.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=Gt(W1,r);return p.jsx(be.p,{id:o.descriptionId,...a,ref:n})});tb.displayName=W1;var G1="DialogClose",K1=d.forwardRef((e,n)=>{const{__scopeDialog:r,...a}=e,o=Gt(G1,r);return p.jsx(be.button,{type:"button",...a,ref:n,onClick:te(e.onClick,()=>o.onOpenChange(!1))})});K1.displayName=G1;function tu(e){return e?"open":"closed"}var Y1="DialogTitleWarning",[Aj,Q1]=h4(Y1,{contentName:br,titleName:eu,docsSlug:"dialog"}),nb=({titleId:e})=>{const n=Q1(Y1),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
5
+
6
+ If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
7
+
8
+ For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},rb="DialogDescriptionWarning",ab=({contentRef:e,descriptionId:n})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Q1(rb).contentName}}.`;return d.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(a))},[a,e,n]),null},ob=$1,ib=U1,X1=V1,J1=Z1,sb=q1,lb=K1;const cb=ob,ub=ib,db=lb,ep=d.forwardRef(({className:e,...n},r)=>p.jsx(X1,{ref:r,className:["fixed","inset-0","z-[1100]","bg-black/50","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0",e].filter(Boolean).join(" "),...n}));ep.displayName=X1.displayName;const tp=d.forwardRef(({className:e,children:n,...r},a)=>p.jsxs(ub,{children:[p.jsx(ep,{}),p.jsx(J1,{ref:a,className:["fixed","left-1/2","top-1/2","z-[1100]","-translate-x-1/2","-translate-y-1/2","w-full","max-w-[640px]","bg-surface","border-2","border-border","shadow-sketchy-lg","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","mx-4","rounded-[24px_8px_25px_7px/8px_20px_8px_22px]",e].filter(Boolean).join(" "),...r,children:n})]}));tp.displayName=J1.displayName;const np=({title:e,onClose:n,className:r})=>p.jsxs("div",{className:["flex","items-center","justify-between","p-4","text-lg","font-bold",r].filter(Boolean).join(" "),children:[p.jsx(sb,{className:"text-lg font-bold",children:e}),n&&p.jsx(db,{asChild:!0,children:p.jsx("button",{type:"button",className:"w-11 h-11 flex items-center justify-center cursor-pointer hover:bg-hover rounded-[10px_3px_11px_3px/3px_8px_3px_10px] transition-colors",onClick:n,children:p.jsx(Yc,{className:"w-5 h-5"})})})]});np.displayName="DialogHeader";const rp=d.forwardRef(({className:e,...n},r)=>p.jsx("div",{ref:r,className:["p-4",e].filter(Boolean).join(" "),...n}));rp.displayName="DialogBody";const ap=d.forwardRef(({className:e,...n},r)=>p.jsx("div",{ref:r,className:["flex","items-center","justify-end","p-4",e].filter(Boolean).join(" "),...n}));ap.displayName="DialogFooter";const $e=({isOpen:e,onClose:n,children:r})=>p.jsx(cb,{open:e,onOpenChange:a=>!a&&n(),children:p.jsx(tp,{children:r})});$e.Header=np;$e.Body=rp;$e.Footer=ap;const op=d.createContext(null);function fb({children:e}){const[n,r]=d.useState(!1),[a,o]=d.useState(""),i=d.useRef(null),s=d.useCallback(u=>(o(u),r(!0),new Promise(h=>{i.current=h})),[]),l=()=>{i.current?.(!0),i.current=null,r(!1)},c=()=>{i.current?.(!1),i.current=null,r(!1)};return p.jsxs(op.Provider,{value:{confirm:s},children:[e,p.jsxs($e,{isOpen:n,onClose:c,children:[p.jsx($e.Header,{title:"Confirm",onClose:c}),p.jsx($e.Body,{children:p.jsx("p",{className:"text-sm font-bold",children:a})}),p.jsx($e.Footer,{children:p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(ze,{variant:"ghost",size:"sm",onClick:c,children:"Cancel"}),p.jsx(ze,{variant:"primary",size:"sm",onClick:l,children:"OK"})]})})]})]})}function is(){const e=d.useContext(op);if(!e)throw new Error("useConfirm must be used within a ConfirmProvider");return e.confirm}const ip=d.createContext(null);let hb=0;function pb({children:e}){const[n,r]=d.useState([]),a=d.useRef(new Map),o=d.useCallback(i=>{const s=hb++;r(c=>[...c,{id:s,message:i}]);const l=setTimeout(()=>{r(c=>c.filter(u=>u.id!==s)),a.current.delete(s)},3e3);a.current.set(s,l)},[]);return d.useEffect(()=>{const i=a.current;return()=>{i.forEach(s=>clearTimeout(s))}},[]),p.jsxs(ip.Provider,{value:{toast:o},children:[e,n.length>0&&p.jsx("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-[1200] flex flex-col gap-2 items-center",children:n.map(i=>p.jsx("div",{className:"px-5 py-3 bg-surface border-2 border-border rounded-[12px_4px_13px_3px/4px_10px_4px_12px] shadow-sketchy text-sm font-bold text-fg-default animate-slide-in-from-bottom whitespace-nowrap",children:i.message},i.id))})]})}function nu(){const e=d.useContext(ip);if(!e)throw new Error("useToast must be used within a ToastProvider");return e.toast}const mb=new n6({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}}),gb=({children:e})=>p.jsx(r6,{client:mb,children:p.jsx(fb,{children:p.jsx(pb,{children:e})})}),rf=e=>{let n;const r=new Set,a=(u,h)=>{const f=typeof u=="function"?u(n):u;if(!Object.is(f,n)){const m=n;n=h??(typeof f!="object"||f===null)?f:Object.assign({},n,f),r.forEach(g=>g(n,m))}},o=()=>n,l={setState:a,getState:o,getInitialState:()=>c,subscribe:u=>(r.add(u),()=>r.delete(u))},c=n=e(a,o,l);return l},yb=(e=>e?rf(e):rf),vb=e=>e;function xb(e,n=vb){const r=pe.useSyncExternalStore(e.subscribe,pe.useCallback(()=>n(e.getState()),[e,n]),pe.useCallback(()=>n(e.getInitialState()),[e,n]));return pe.useDebugValue(r),r}const af=e=>{const n=yb(e),r=a=>xb(n,a);return Object.assign(r,n),r},bb=(e=>e?af(e):af),oa=bb(e=>({theme:"light",setTheme:n=>{e({theme:n})},toggleTheme:()=>{e(n=>({theme:n.theme==="light"?"dark":"light"}))}}));oa.subscribe(e=>{localStorage.setItem("theme",e.theme),document.documentElement.classList.add(e.theme),document.documentElement.classList.remove(e.theme==="dark"?"light":"dark")});const wb="_SiteLayout_1pliv_1",_b="_side_1pliv_7",Eb="_open_1pliv_27",Cb="_menu_1pliv_32",Sb="_top_1pliv_62",Ab="_center_1pliv_78",Rb="_content_1pliv_86",Mb={SiteLayout:wb,side:_b,open:Eb,menu:Cb,top:Sb,"top-content":"_top-content_1pliv_72",center:Ab,content:Rb};var qs={exports:{}};var of;function Tb(){return of||(of=1,(function(e){(function(){var n={}.hasOwnProperty;function r(){for(var i="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(i=o(i,a.call(this,l)))}return i}function a(i){if(typeof i=="string"||typeof i=="number")return this&&this[i]||i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(this,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var s="";for(var l in i)n.call(i,l)&&i[l]&&(s=o(s,this&&this[l]||l));return s}function o(i,s){return s?i?i+" "+s:i+s:i}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(qs)),qs.exports}var Pb=Tb();const ru=na(Pb);function au({name:e}){return p.jsx("div",{className:"bg-pastel-teal-200 dark:bg-muted text-fg-default text-xs font-bold border border-border-secondary px-2 py-1 rounded-[8px_3px_9px_2px/3px_6px_3px_7px]",children:e})}const Nb={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},sf={sm:10,md:12,lg:14},ou=d.forwardRef(({className:e,size:n="md",checked:r,disabled:a,...o},i)=>p.jsxs("label",{className:["relative inline-flex items-center justify-center cursor-pointer",a&&"cursor-not-allowed opacity-50",e].filter(Boolean).join(" "),children:[p.jsx("input",{ref:i,type:"checkbox",checked:r,disabled:a,className:"sr-only peer",...o}),p.jsx("span",{className:[Nb[n],"flex items-center justify-center","border-2 border-border","rounded-[4px_2px_5px_2px/2px_4px_2px_4px]","bg-surface","transition-all duration-200","peer-checked:bg-accent-primary","peer-focus:shadow-sketchy"].join(" "),children:r&&p.jsx(J6,{width:sf[n],height:sf[n],className:"text-fg-default",weight:"bold"})})]}));ou.displayName="Checkbox";function iu(e){const n=e+"CollectionProvider",[r,a]=In(n),[o,i]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:b,children:x}=v,w=pe.useRef(null),E=pe.useRef(new Map).current;return p.jsx(o,{scope:b,itemMap:E,collectionRef:w,children:x})};s.displayName=n;const l=e+"CollectionSlot",c=Yr(l),u=pe.forwardRef((v,b)=>{const{scope:x,children:w}=v,E=i(l,x),C=Re(b,E.collectionRef);return p.jsx(c,{ref:C,children:w})});u.displayName=l;const h=e+"CollectionItemSlot",f="data-radix-collection-item",m=Yr(h),g=pe.forwardRef((v,b)=>{const{scope:x,children:w,...E}=v,C=pe.useRef(null),S=Re(b,C),M=i(h,x);return pe.useEffect(()=>(M.itemMap.set(C,{ref:C,...E}),()=>{M.itemMap.delete(C)})),p.jsx(m,{[f]:"",ref:S,children:w})});g.displayName=h;function y(v){const b=i(e+"CollectionConsumer",v);return pe.useCallback(()=>{const w=b.collectionRef.current;if(!w)return[];const E=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((M,_)=>E.indexOf(M.ref.current)-E.indexOf(_.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},y,a]}var Ob=d.createContext(void 0);function ss(e){const n=d.useContext(Ob);return e||n||"ltr"}var jb="Arrow",sp=d.forwardRef((e,n)=>{const{children:r,width:a=10,height:o=5,...i}=e;return p.jsx(be.svg,{...i,ref:n,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});sp.displayName=jb;var Db=sp;function kb(e){const[n,r]=d.useState(void 0);return it(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;r({width:s,height:l})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else r(void 0)},[e]),n}var su="Popper",[lp,ia]=In(su),[Ib,cp]=lp(su),up=e=>{const{__scopePopper:n,children:r}=e,[a,o]=d.useState(null);return p.jsx(Ib,{scope:n,anchor:a,onAnchorChange:o,children:r})};up.displayName=su;var dp="PopperAnchor",fp=d.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:a,...o}=e,i=cp(dp,r),s=d.useRef(null),l=Re(n,s),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=a?.current||s.current,u!==c.current&&i.onAnchorChange(c.current)}),a?null:p.jsx(be.div,{...o,ref:l})});fp.displayName=dp;var lu="PopperContent",[Lb,Fb]=lp(lu),hp=d.forwardRef((e,n)=>{const{__scopePopper:r,side:a="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:h=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:y,...v}=e,b=cp(lu,r),[x,w]=d.useState(null),E=Re(n,G=>w(G)),[C,S]=d.useState(null),M=kb(C),_=M?.width??0,A=M?.height??0,j=a+(i!=="center"?"-"+i:""),P=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},O=Array.isArray(u)?u:[u],H=O.length>0,Z={padding:P,boundary:O.filter(Hb),altBoundary:H},{refs:R,floatingStyles:k,placement:T,isPositioned:F,middlewareData:I}=Fy({strategy:"fixed",placement:j,whileElementsMounted:(...G)=>By(...G,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[$y({mainAxis:o+A,alignmentAxis:s}),c&&Hy({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?qy():void 0,...Z}),c&&zy({...Z}),Uy({...Z,apply:({elements:G,rects:ie,availableWidth:ye,availableHeight:J})=>{const{width:ge,height:ce}=ie.reference,Se=G.floating.style;Se.setProperty("--radix-popper-available-width",`${ye}px`),Se.setProperty("--radix-popper-available-height",`${J}px`),Se.setProperty("--radix-popper-anchor-width",`${ge}px`),Se.setProperty("--radix-popper-anchor-height",`${ce}px`)}}),C&&Vy({element:C,padding:l}),zb({arrowWidth:_,arrowHeight:A}),m&&Zy({strategy:"referenceHidden",...Z})]}),[$,V]=gp(T),B=hn(y);it(()=>{F&&B?.()},[F,B]);const q=I.arrow?.x,X=I.arrow?.y,Q=I.arrow?.centerOffset!==0,[re,de]=d.useState();return it(()=>{x&&de(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...k,transform:F?k.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Lb,{scope:r,placedSide:$,onArrowChange:S,arrowX:q,arrowY:X,shouldHideArrow:Q,children:p.jsx(be.div,{"data-side":$,"data-align":V,...v,ref:E,style:{...v.style,animation:F?void 0:"none"}})})})});hp.displayName=lu;var pp="PopperArrow",$b={top:"bottom",right:"left",bottom:"top",left:"right"},mp=d.forwardRef(function(n,r){const{__scopePopper:a,...o}=n,i=Fb(pp,a),s=$b[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(Db,{...o,ref:r,style:{...o.style,display:"block"}})})});mp.displayName=pp;function Hb(e){return e!==null}var zb=e=>({name:"transformOrigin",options:e,fn(n){const{placement:r,rects:a,middlewareData:o}=n,s=o.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,h]=gp(r),f={start:"0%",center:"50%",end:"100%"}[h],m=(o.arrow?.x??0)+l/2,g=(o.arrow?.y??0)+c/2;let y="",v="";return u==="bottom"?(y=s?f:`${m}px`,v=`${-c}px`):u==="top"?(y=s?f:`${m}px`,v=`${a.floating.height+c}px`):u==="right"?(y=`${-c}px`,v=s?f:`${g}px`):u==="left"&&(y=`${a.floating.width+c}px`,v=s?f:`${g}px`),{data:{x:y,y:v}}}});function gp(e){const[n,r="center"]=e.split("-");return[n,r]}var cu=up,uu=fp,du=hp,fu=mp,Ws="rovingFocusGroup.onEntryFocus",Ub={bubbles:!1,cancelable:!0},Eo="RovingFocusGroup",[Ol,yp,Vb]=iu(Eo),[Zb,ls]=In(Eo,[Vb]),[Bb,qb]=Zb(Eo),vp=d.forwardRef((e,n)=>p.jsx(Ol.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Ol.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Wb,{...e,ref:n})})}));vp.displayName=Eo;var Wb=d.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:a,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:h=!1,...f}=e,m=d.useRef(null),g=Re(n,m),y=ss(i),[v,b]=jn({prop:s,defaultProp:l??null,onChange:c,caller:Eo}),[x,w]=d.useState(!1),E=hn(u),C=yp(r),S=d.useRef(!1),[M,_]=d.useState(0);return d.useEffect(()=>{const A=m.current;if(A)return A.addEventListener(Ws,E),()=>A.removeEventListener(Ws,E)},[E]),p.jsx(Bb,{scope:r,orientation:a,dir:y,loop:o,currentTabStopId:v,onItemFocus:d.useCallback(A=>b(A),[b]),onItemShiftTab:d.useCallback(()=>w(!0),[]),onFocusableItemAdd:d.useCallback(()=>_(A=>A+1),[]),onFocusableItemRemove:d.useCallback(()=>_(A=>A-1),[]),children:p.jsx(be.div,{tabIndex:x||M===0?-1:0,"data-orientation":a,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:te(e.onMouseDown,()=>{S.current=!0}),onFocus:te(e.onFocus,A=>{const j=!S.current;if(A.target===A.currentTarget&&j&&!x){const P=new CustomEvent(Ws,Ub);if(A.currentTarget.dispatchEvent(P),!P.defaultPrevented){const O=C().filter(T=>T.focusable),H=O.find(T=>T.active),Z=O.find(T=>T.id===v),k=[H,Z,...O].filter(Boolean).map(T=>T.ref.current);wp(k,h)}}S.current=!1}),onBlur:te(e.onBlur,()=>w(!1))})})}),xp="RovingFocusGroupItem",bp=d.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:a=!0,active:o=!1,tabStopId:i,children:s,...l}=e,c=un(),u=i||c,h=qb(xp,r),f=h.currentTabStopId===u,m=yp(r),{onFocusableItemAdd:g,onFocusableItemRemove:y,currentTabStopId:v}=h;return d.useEffect(()=>{if(a)return g(),()=>y()},[a,g,y]),p.jsx(Ol.ItemSlot,{scope:r,id:u,focusable:a,active:o,children:p.jsx(be.span,{tabIndex:f?0:-1,"data-orientation":h.orientation,...l,ref:n,onMouseDown:te(e.onMouseDown,b=>{a?h.onItemFocus(u):b.preventDefault()}),onFocus:te(e.onFocus,()=>h.onItemFocus(u)),onKeyDown:te(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){h.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=Yb(b,h.orientation,h.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let E=m().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")E.reverse();else if(x==="prev"||x==="next"){x==="prev"&&E.reverse();const C=E.indexOf(b.currentTarget);E=h.loop?Qb(E,C+1):E.slice(C+1)}setTimeout(()=>wp(E))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:v!=null}):s})})});bp.displayName=xp;var Gb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kb(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Yb(e,n,r){const a=Kb(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return Gb[a]}function wp(e,n=!1){const r=document.activeElement;for(const a of e)if(a===r||(a.focus({preventScroll:n}),document.activeElement!==r))return}function Qb(e,n){return e.map((r,a)=>e[(n+a)%e.length])}var _p=vp,Ep=bp,jl=["Enter"," "],Xb=["ArrowDown","PageUp","Home"],Cp=["ArrowUp","PageDown","End"],Jb=[...Xb,...Cp],ew={ltr:[...jl,"ArrowRight"],rtl:[...jl,"ArrowLeft"]},tw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Co="Menu",[Ja,nw,rw]=iu(Co),[Rr,Sp]=In(Co,[rw,ia,ls]),cs=ia(),Ap=ls(),[aw,Mr]=Rr(Co),[ow,So]=Rr(Co),Rp=e=>{const{__scopeMenu:n,open:r=!1,children:a,dir:o,onOpenChange:i,modal:s=!0}=e,l=cs(n),[c,u]=d.useState(null),h=d.useRef(!1),f=hn(i),m=ss(o);return d.useEffect(()=>{const g=()=>{h.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>h.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),p.jsx(cu,{...l,children:p.jsx(aw,{scope:n,open:r,onOpenChange:f,content:c,onContentChange:u,children:p.jsx(ow,{scope:n,onClose:d.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:h,dir:m,modal:s,children:a})})})};Rp.displayName=Co;var iw="MenuAnchor",hu=d.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e,o=cs(r);return p.jsx(uu,{...o,...a,ref:n})});hu.displayName=iw;var pu="MenuPortal",[sw,Mp]=Rr(pu,{forceMount:void 0}),Tp=e=>{const{__scopeMenu:n,forceMount:r,children:a,container:o}=e,i=Mr(pu,n);return p.jsx(sw,{scope:n,forceMount:r,children:p.jsx(yn,{present:r||i.open,children:p.jsx(_o,{asChild:!0,container:o,children:a})})})};Tp.displayName=pu;var Lt="MenuContent",[lw,mu]=Rr(Lt),Pp=d.forwardRef((e,n)=>{const r=Mp(Lt,e.__scopeMenu),{forceMount:a=r.forceMount,...o}=e,i=Mr(Lt,e.__scopeMenu),s=So(Lt,e.__scopeMenu);return p.jsx(Ja.Provider,{scope:e.__scopeMenu,children:p.jsx(yn,{present:a||i.open,children:p.jsx(Ja.Slot,{scope:e.__scopeMenu,children:s.modal?p.jsx(cw,{...o,ref:n}):p.jsx(uw,{...o,ref:n})})})})}),cw=d.forwardRef((e,n)=>{const r=Mr(Lt,e.__scopeMenu),a=d.useRef(null),o=Re(n,a);return d.useEffect(()=>{const i=a.current;if(i)return Xc(i)},[]),p.jsx(gu,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:te(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),uw=d.forwardRef((e,n)=>{const r=Mr(Lt,e.__scopeMenu);return p.jsx(gu,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),dw=Yr("MenuContent.ScrollLock"),gu=d.forwardRef((e,n)=>{const{__scopeMenu:r,loop:a=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:m,onDismiss:g,disableOutsideScroll:y,...v}=e,b=Mr(Lt,r),x=So(Lt,r),w=cs(r),E=Ap(r),C=nw(r),[S,M]=d.useState(null),_=d.useRef(null),A=Re(n,_,b.onContentChange),j=d.useRef(0),P=d.useRef(""),O=d.useRef(0),H=d.useRef(null),Z=d.useRef("right"),R=d.useRef(0),k=y?Cc:d.Fragment,T=y?{as:dw,allowPinchZoom:!0}:void 0,F=$=>{const V=P.current+$,B=C().filter(G=>!G.disabled),q=document.activeElement,X=B.find(G=>G.ref.current===q)?.textValue,Q=B.map(G=>G.textValue),re=Ew(Q,V,X),de=B.find(G=>G.textValue===re)?.ref.current;(function G(ie){P.current=ie,window.clearTimeout(j.current),ie!==""&&(j.current=window.setTimeout(()=>G(""),1e3))})(V),de&&setTimeout(()=>de.focus())};d.useEffect(()=>()=>window.clearTimeout(j.current),[]),Qc();const I=d.useCallback($=>Z.current===H.current?.side&&Sw($,H.current?.area),[]);return p.jsx(lw,{scope:r,searchRef:P,onItemEnter:d.useCallback($=>{I($)&&$.preventDefault()},[I]),onItemLeave:d.useCallback($=>{I($)||(_.current?.focus(),M(null))},[I]),onTriggerLeave:d.useCallback($=>{I($)&&$.preventDefault()},[I]),pointerGraceTimerRef:O,onPointerGraceIntentChange:d.useCallback($=>{H.current=$},[]),children:p.jsx(k,{...T,children:p.jsx(as,{asChild:!0,trapped:o,onMountAutoFocus:te(i,$=>{$.preventDefault(),_.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:p.jsx(wo,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:m,onDismiss:g,children:p.jsx(_p,{asChild:!0,...E,dir:x.dir,orientation:"vertical",loop:a,currentTabStopId:S,onCurrentTabStopIdChange:M,onEntryFocus:te(c,$=>{x.isUsingKeyboardRef.current||$.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(du,{role:"menu","aria-orientation":"vertical","data-state":qp(b.open),"data-radix-menu-content":"",dir:x.dir,...w,...v,ref:A,style:{outline:"none",...v.style},onKeyDown:te(v.onKeyDown,$=>{const B=$.target.closest("[data-radix-menu-content]")===$.currentTarget,q=$.ctrlKey||$.altKey||$.metaKey,X=$.key.length===1;B&&($.key==="Tab"&&$.preventDefault(),!q&&X&&F($.key));const Q=_.current;if($.target!==Q||!Jb.includes($.key))return;$.preventDefault();const de=C().filter(G=>!G.disabled).map(G=>G.ref.current);Cp.includes($.key)&&de.reverse(),ww(de)}),onBlur:te(e.onBlur,$=>{$.currentTarget.contains($.target)||(window.clearTimeout(j.current),P.current="")}),onPointerMove:te(e.onPointerMove,eo($=>{const V=$.target,B=R.current!==$.clientX;if($.currentTarget.contains(V)&&B){const q=$.clientX>R.current?"right":"left";Z.current=q,R.current=$.clientX}}))})})})})})})});Pp.displayName=Lt;var fw="MenuGroup",yu=d.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e;return p.jsx(be.div,{role:"group",...a,ref:n})});yu.displayName=fw;var hw="MenuLabel",Np=d.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e;return p.jsx(be.div,{...a,ref:n})});Np.displayName=hw;var Oi="MenuItem",lf="menu.itemSelect",us=d.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:a,...o}=e,i=d.useRef(null),s=So(Oi,e.__scopeMenu),l=mu(Oi,e.__scopeMenu),c=Re(n,i),u=d.useRef(!1),h=()=>{const f=i.current;if(!r&&f){const m=new CustomEvent(lf,{bubbles:!0,cancelable:!0});f.addEventListener(lf,g=>a?.(g),{once:!0}),j1(f,m),m.defaultPrevented?u.current=!1:s.onClose()}};return p.jsx(Op,{...o,ref:c,disabled:r,onClick:te(e.onClick,h),onPointerDown:f=>{e.onPointerDown?.(f),u.current=!0},onPointerUp:te(e.onPointerUp,f=>{u.current||f.currentTarget?.click()}),onKeyDown:te(e.onKeyDown,f=>{const m=l.searchRef.current!=="";r||m&&f.key===" "||jl.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});us.displayName=Oi;var Op=d.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:a=!1,textValue:o,...i}=e,s=mu(Oi,r),l=Ap(r),c=d.useRef(null),u=Re(n,c),[h,f]=d.useState(!1),[m,g]=d.useState("");return d.useEffect(()=>{const y=c.current;y&&g((y.textContent??"").trim())},[i.children]),p.jsx(Ja.ItemSlot,{scope:r,disabled:a,textValue:o??m,children:p.jsx(Ep,{asChild:!0,...l,focusable:!a,children:p.jsx(be.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...i,ref:u,onPointerMove:te(e.onPointerMove,eo(y=>{a?s.onItemLeave(y):(s.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:te(e.onPointerLeave,eo(y=>s.onItemLeave(y))),onFocus:te(e.onFocus,()=>f(!0)),onBlur:te(e.onBlur,()=>f(!1))})})})}),pw="MenuCheckboxItem",jp=d.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:a,...o}=e;return p.jsx(Fp,{scope:e.__scopeMenu,checked:r,children:p.jsx(us,{role:"menuitemcheckbox","aria-checked":ji(r)?"mixed":r,...o,ref:n,"data-state":xu(r),onSelect:te(o.onSelect,()=>a?.(ji(r)?!0:!r),{checkForDefaultPrevented:!1})})})});jp.displayName=pw;var Dp="MenuRadioGroup",[mw,gw]=Rr(Dp,{value:void 0,onValueChange:()=>{}}),kp=d.forwardRef((e,n)=>{const{value:r,onValueChange:a,...o}=e,i=hn(a);return p.jsx(mw,{scope:e.__scopeMenu,value:r,onValueChange:i,children:p.jsx(yu,{...o,ref:n})})});kp.displayName=Dp;var Ip="MenuRadioItem",Lp=d.forwardRef((e,n)=>{const{value:r,...a}=e,o=gw(Ip,e.__scopeMenu),i=r===o.value;return p.jsx(Fp,{scope:e.__scopeMenu,checked:i,children:p.jsx(us,{role:"menuitemradio","aria-checked":i,...a,ref:n,"data-state":xu(i),onSelect:te(a.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Lp.displayName=Ip;var vu="MenuItemIndicator",[Fp,yw]=Rr(vu,{checked:!1}),$p=d.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:a,...o}=e,i=yw(vu,r);return p.jsx(yn,{present:a||ji(i.checked)||i.checked===!0,children:p.jsx(be.span,{...o,ref:n,"data-state":xu(i.checked)})})});$p.displayName=vu;var vw="MenuSeparator",Hp=d.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e;return p.jsx(be.div,{role:"separator","aria-orientation":"horizontal",...a,ref:n})});Hp.displayName=vw;var xw="MenuArrow",zp=d.forwardRef((e,n)=>{const{__scopeMenu:r,...a}=e,o=cs(r);return p.jsx(fu,{...o,...a,ref:n})});zp.displayName=xw;var bw="MenuSub",[Rj,Up]=Rr(bw),Oa="MenuSubTrigger",Vp=d.forwardRef((e,n)=>{const r=Mr(Oa,e.__scopeMenu),a=So(Oa,e.__scopeMenu),o=Up(Oa,e.__scopeMenu),i=mu(Oa,e.__scopeMenu),s=d.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},h=d.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return d.useEffect(()=>h,[h]),d.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),p.jsx(hu,{asChild:!0,...u,children:p.jsx(Op,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":qp(r.open),...e,ref:bo(n,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:te(e.onPointerMove,eo(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),h()},100))})),onPointerLeave:te(e.onPointerLeave,eo(f=>{h();const m=r.content?.getBoundingClientRect();if(m){const g=r.content?.dataset.side,y=g==="right",v=y?-5:5,b=m[y?"left":"right"],x=m[y?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:b,y:m.top},{x,y:m.top},{x,y:m.bottom},{x:b,y:m.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:te(e.onKeyDown,f=>{const m=i.searchRef.current!=="";e.disabled||m&&f.key===" "||ew[a.dir].includes(f.key)&&(r.onOpenChange(!0),r.content?.focus(),f.preventDefault())})})})});Vp.displayName=Oa;var Zp="MenuSubContent",Bp=d.forwardRef((e,n)=>{const r=Mp(Lt,e.__scopeMenu),{forceMount:a=r.forceMount,...o}=e,i=Mr(Lt,e.__scopeMenu),s=So(Lt,e.__scopeMenu),l=Up(Zp,e.__scopeMenu),c=d.useRef(null),u=Re(n,c);return p.jsx(Ja.Provider,{scope:e.__scopeMenu,children:p.jsx(yn,{present:a||i.open,children:p.jsx(Ja.Slot,{scope:e.__scopeMenu,children:p.jsx(gu,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{s.isUsingKeyboardRef.current&&c.current?.focus(),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:te(e.onFocusOutside,h=>{h.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:te(e.onEscapeKeyDown,h=>{s.onClose(),h.preventDefault()}),onKeyDown:te(e.onKeyDown,h=>{const f=h.currentTarget.contains(h.target),m=tw[s.dir].includes(h.key);f&&m&&(i.onOpenChange(!1),l.trigger?.focus(),h.preventDefault())})})})})})});Bp.displayName=Zp;function qp(e){return e?"open":"closed"}function ji(e){return e==="indeterminate"}function xu(e){return ji(e)?"indeterminate":e?"checked":"unchecked"}function ww(e){const n=document.activeElement;for(const r of e)if(r===n||(r.focus(),document.activeElement!==n))return}function _w(e,n){return e.map((r,a)=>e[(n+a)%e.length])}function Ew(e,n,r){const o=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,i=r?e.indexOf(r):-1;let s=_w(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==r));const c=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function Cw(e,n){const{x:r,y:a}=e;let o=!1;for(let i=0,s=n.length-1;i<n.length;s=i++){const l=n[i],c=n[s],u=l.x,h=l.y,f=c.x,m=c.y;h>a!=m>a&&r<(f-u)*(a-h)/(m-h)+u&&(o=!o)}return o}function Sw(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return Cw(r,n)}function eo(e){return n=>n.pointerType==="mouse"?e(n):void 0}var Aw=Rp,Rw=hu,Mw=Tp,Tw=Pp,Pw=yu,Nw=Np,Ow=us,jw=jp,Dw=kp,kw=Lp,Iw=$p,Lw=Hp,Fw=zp,$w=Vp,Hw=Bp,ds="DropdownMenu",[zw]=In(ds,[Sp]),mt=Sp(),[Uw,Wp]=zw(ds),Gp=e=>{const{__scopeDropdownMenu:n,children:r,dir:a,open:o,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,c=mt(n),u=d.useRef(null),[h,f]=jn({prop:o,defaultProp:i??!1,onChange:s,caller:ds});return p.jsx(Uw,{scope:n,triggerId:un(),triggerRef:u,contentId:un(),open:h,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(m=>!m),[f]),modal:l,children:p.jsx(Aw,{...c,open:h,onOpenChange:f,dir:a,modal:l,children:r})})};Gp.displayName=ds;var Kp="DropdownMenuTrigger",Yp=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:a=!1,...o}=e,i=Wp(Kp,r),s=mt(r);return p.jsx(Rw,{asChild:!0,...s,children:p.jsx(be.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...o,ref:bo(n,i.triggerRef),onPointerDown:te(e.onPointerDown,l=>{!a&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:te(e.onKeyDown,l=>{a||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Yp.displayName=Kp;var Vw="DropdownMenuPortal",Qp=e=>{const{__scopeDropdownMenu:n,...r}=e,a=mt(n);return p.jsx(Mw,{...a,...r})};Qp.displayName=Vw;var Xp="DropdownMenuContent",Jp=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=Wp(Xp,r),i=mt(r),s=d.useRef(!1);return p.jsx(Tw,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...a,ref:n,onCloseAutoFocus:te(e.onCloseAutoFocus,l=>{s.current||o.triggerRef.current?.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:te(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,h=c.button===2||u;(!o.modal||h)&&(s.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)"}})});Jp.displayName=Xp;var Zw="DropdownMenuGroup",Bw=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=mt(r);return p.jsx(Pw,{...o,...a,ref:n})});Bw.displayName=Zw;var qw="DropdownMenuLabel",em=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=mt(r);return p.jsx(Nw,{...o,...a,ref:n})});em.displayName=qw;var Ww="DropdownMenuItem",tm=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=mt(r);return p.jsx(Ow,{...o,...a,ref:n})});tm.displayName=Ww;var Gw="DropdownMenuCheckboxItem",nm=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=mt(r);return p.jsx(jw,{...o,...a,ref:n})});nm.displayName=Gw;var Kw="DropdownMenuRadioGroup",Yw=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=mt(r);return p.jsx(Dw,{...o,...a,ref:n})});Yw.displayName=Kw;var Qw="DropdownMenuRadioItem",rm=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=mt(r);return p.jsx(kw,{...o,...a,ref:n})});rm.displayName=Qw;var Xw="DropdownMenuItemIndicator",am=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=mt(r);return p.jsx(Iw,{...o,...a,ref:n})});am.displayName=Xw;var Jw="DropdownMenuSeparator",om=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=mt(r);return p.jsx(Lw,{...o,...a,ref:n})});om.displayName=Jw;var e3="DropdownMenuArrow",t3=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=mt(r);return p.jsx(Fw,{...o,...a,ref:n})});t3.displayName=e3;var n3="DropdownMenuSubTrigger",im=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=mt(r);return p.jsx($w,{...o,...a,ref:n})});im.displayName=n3;var r3="DropdownMenuSubContent",sm=d.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,o=mt(r);return p.jsx(Hw,{...o,...a,ref:n,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)"}})});sm.displayName=r3;var a3=Gp,o3=Yp,i3=Qp,lm=Jp,cm=em,um=tm,dm=nm,fm=rm,hm=am,pm=om,mm=im,gm=sm;const s3=a3,l3=o3,c3=d.forwardRef(({className:e,inset:n,children:r,...a},o)=>p.jsx(mm,{ref:o,className:["flex","cursor-default","select-none","items-center","rounded-sm","px-2","py-1.5","text-sm","outline-none","focus:bg-hover","data-[state=open]:bg-hover",n&&"pl-8",e].filter(Boolean).join(" "),...a,children:r}));c3.displayName=mm.displayName;const u3=d.forwardRef(({className:e,...n},r)=>p.jsx(gm,{ref:r,className:["z-50","min-w-[8rem]","overflow-hidden","rounded-md","bg-surface","p-1","shadow-lg",e].filter(Boolean).join(" "),...n}));u3.displayName=gm.displayName;const ym=d.forwardRef(({className:e,sideOffset:n=4,...r},a)=>p.jsx(i3,{children:p.jsx(lm,{ref:a,sideOffset:n,className:["z-[1100]","min-w-[10rem]","overflow-hidden","rounded-[10px_3px_11px_3px/3px_8px_3px_10px]","bg-surface","border-2","border-border","shadow-sketchy","p-1","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","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].filter(Boolean).join(" "),...r})}));ym.displayName=lm.displayName;const vm=d.forwardRef(({className:e,inset:n,...r},a)=>p.jsx(um,{ref:a,className:["relative","flex","cursor-pointer","select-none","items-center","px-3","py-2","text-sm","font-bold","text-fg-muted","outline-none","transition-colors","rounded-[6px_2px_7px_2px/2px_5px_2px_6px]","focus:bg-hover","focus:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",n&&"pl-8",e].filter(Boolean).join(" "),...r}));vm.displayName=um.displayName;const d3=d.forwardRef(({className:e,children:n,checked:r,...a},o)=>p.jsxs(dm,{ref:o,className:["relative","flex","cursor-pointer","select-none","items-center","rounded-sm","py-1.5","pl-8","pr-2","text-sm","outline-none","transition-colors","focus:bg-hover","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e].filter(Boolean).join(" "),checked:r,...a,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(hm,{children:"โœ“"})}),n]}));d3.displayName=dm.displayName;const f3=d.forwardRef(({className:e,children:n,...r},a)=>p.jsxs(fm,{ref:a,className:["relative","flex","cursor-pointer","select-none","items-center","rounded-sm","py-1.5","pl-8","pr-2","text-sm","outline-none","transition-colors","focus:bg-hover","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e].filter(Boolean).join(" "),...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(hm,{children:"โ—"})}),n]}));f3.displayName=fm.displayName;const h3=d.forwardRef(({className:e,inset:n,...r},a)=>p.jsx(cm,{ref:a,className:["px-2","py-1.5","text-sm","font-semibold",n&&"pl-8",e].filter(Boolean).join(" "),...r}));h3.displayName=cm.displayName;const p3=d.forwardRef(({className:e,...n},r)=>p.jsx(pm,{ref:r,className:["-mx-1","my-1","h-px","bg-divider",e].filter(Boolean).join(" "),...n}));p3.displayName=pm.displayName;const bu=({button:e,items:n})=>p.jsxs(s3,{children:[p.jsx(l3,{asChild:!0,children:p.jsx("button",{type:"button",className:"flex items-center justify-center",children:e})}),p.jsx(ym,{align:"end",children:n.map(r=>p.jsx(vm,{onClick:r.onClick,children:r.name},r.name))})]}),m3=Xn(["w-full","border-2","border-border","bg-surface","text-fg","placeholder:text-fg-placeholder","transition-all","focus:outline-none","focus:shadow-sketchy","disabled:cursor-not-allowed","disabled:opacity-50"],{variants:{variant:{default:[],ghost:["border-transparent","bg-subtle","focus:border-border-focus"],error:["border-border-error","bg-pastel-pink-200/20","focus:border-red-500"]},size:{sm:"h-8 px-2 text-sm rounded-[8px_3px_9px_2px/3px_7px_3px_8px]",md:"h-10 px-3 text-sm rounded-[10px_3px_11px_3px/3px_9px_3px_10px]",lg:"h-12 px-4 text-base rounded-[12px_4px_13px_3px/4px_10px_4px_12px]"}},defaultVariants:{variant:"default",size:"md"}}),Ha=d.forwardRef(({className:e,variant:n,size:r,type:a="text",...o},i)=>p.jsx("input",{ref:i,type:a,className:m3({variant:n,size:r,className:e}),...o}));Ha.displayName="Input";const g3=Xn(["font-bold","text-fg-muted","whitespace-nowrap"],{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"sm"}}),Gn=d.forwardRef(({className:e,size:n,...r},a)=>p.jsx("label",{ref:a,className:g3({size:n,className:e}),...r}));Gn.displayName="Label";function cf(e,[n,r]){return Math.min(r,Math.max(n,e))}function y3(e){const n=d.useRef({value:e,previous:e});return d.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var xm=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"}),v3="VisuallyHidden",bm=d.forwardRef((e,n)=>p.jsx(be.span,{...e,ref:n,style:{...xm,...e.style}}));bm.displayName=v3;var x3=bm,b3=[" ","Enter","ArrowUp","ArrowDown"],w3=[" ","Enter"],wr="Select",[fs,hs,_3]=iu(wr),[sa]=In(wr,[_3,ia]),ps=ia(),[E3,Jn]=sa(wr),[C3,S3]=sa(wr),wm=e=>{const{__scopeSelect:n,children:r,open:a,defaultOpen:o,onOpenChange:i,value:s,defaultValue:l,onValueChange:c,dir:u,name:h,autoComplete:f,disabled:m,required:g,form:y}=e,v=ps(n),[b,x]=d.useState(null),[w,E]=d.useState(null),[C,S]=d.useState(!1),M=ss(u),[_,A]=jn({prop:a,defaultProp:o??!1,onChange:i,caller:wr}),[j,P]=jn({prop:s,defaultProp:l,onChange:c,caller:wr}),O=d.useRef(null),H=b?y||!!b.closest("form"):!0,[Z,R]=d.useState(new Set),k=Array.from(Z).map(T=>T.props.value).join(";");return p.jsx(cu,{...v,children:p.jsxs(E3,{required:g,scope:n,trigger:b,onTriggerChange:x,valueNode:w,onValueNodeChange:E,valueNodeHasChildren:C,onValueNodeHasChildrenChange:S,contentId:un(),value:j,onValueChange:P,open:_,onOpenChange:A,dir:M,triggerPointerDownPosRef:O,disabled:m,children:[p.jsx(fs.Provider,{scope:n,children:p.jsx(C3,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(T=>{R(F=>new Set(F).add(T))},[]),onNativeOptionRemove:d.useCallback(T=>{R(F=>{const I=new Set(F);return I.delete(T),I})},[]),children:r})}),H?p.jsxs(Hm,{"aria-hidden":!0,required:g,tabIndex:-1,name:h,autoComplete:f,value:j,onChange:T=>P(T.target.value),disabled:m,form:y,children:[j===void 0?p.jsx("option",{value:""}):null,Array.from(Z)]},k):null]})})};wm.displayName=wr;var _m="SelectTrigger",Em=d.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:a=!1,...o}=e,i=ps(r),s=Jn(_m,r),l=s.disabled||a,c=Re(n,s.onTriggerChange),u=hs(r),h=d.useRef("touch"),[f,m,g]=Um(v=>{const b=u().filter(E=>!E.disabled),x=b.find(E=>E.value===s.value),w=Vm(b,v,x);w!==void 0&&s.onValueChange(w.value)}),y=v=>{l||(s.onOpenChange(!0),g()),v&&(s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return p.jsx(uu,{asChild:!0,...i,children:p.jsx(be.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":zm(s.value)?"":void 0,...o,ref:c,onClick:te(o.onClick,v=>{v.currentTarget.focus(),h.current!=="mouse"&&y(v)}),onPointerDown:te(o.onPointerDown,v=>{h.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(y(v),v.preventDefault())}),onKeyDown:te(o.onKeyDown,v=>{const b=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&m(v.key),!(b&&v.key===" ")&&b3.includes(v.key)&&(y(),v.preventDefault())})})})});Em.displayName=_m;var Cm="SelectValue",Sm=d.forwardRef((e,n)=>{const{__scopeSelect:r,className:a,style:o,children:i,placeholder:s="",...l}=e,c=Jn(Cm,r),{onValueNodeHasChildrenChange:u}=c,h=i!==void 0,f=Re(n,c.onValueNodeChange);return it(()=>{u(h)},[u,h]),p.jsx(be.span,{...l,ref:f,style:{pointerEvents:"none"},children:zm(c.value)?p.jsx(p.Fragment,{children:s}):i})});Sm.displayName=Cm;var A3="SelectIcon",Am=d.forwardRef((e,n)=>{const{__scopeSelect:r,children:a,...o}=e;return p.jsx(be.span,{"aria-hidden":!0,...o,ref:n,children:a||"โ–ผ"})});Am.displayName=A3;var R3="SelectPortal",Rm=e=>p.jsx(_o,{asChild:!0,...e});Rm.displayName=R3;var _r="SelectContent",Mm=d.forwardRef((e,n)=>{const r=Jn(_r,e.__scopeSelect),[a,o]=d.useState();if(it(()=>{o(new DocumentFragment)},[]),!r.open){const i=a;return i?Mn.createPortal(p.jsx(Tm,{scope:e.__scopeSelect,children:p.jsx(fs.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),i):null}return p.jsx(Pm,{...e,ref:n})});Mm.displayName=_r;var Ut=10,[Tm,er]=sa(_r),M3="SelectContentImpl",T3=Yr("SelectContent.RemoveScroll"),Pm=d.forwardRef((e,n)=>{const{__scopeSelect:r,position:a="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:c,align:u,alignOffset:h,arrowPadding:f,collisionBoundary:m,collisionPadding:g,sticky:y,hideWhenDetached:v,avoidCollisions:b,...x}=e,w=Jn(_r,r),[E,C]=d.useState(null),[S,M]=d.useState(null),_=Re(n,G=>C(G)),[A,j]=d.useState(null),[P,O]=d.useState(null),H=hs(r),[Z,R]=d.useState(!1),k=d.useRef(!1);d.useEffect(()=>{if(E)return Xc(E)},[E]),Qc();const T=d.useCallback(G=>{const[ie,...ye]=H().map(ce=>ce.ref.current),[J]=ye.slice(-1),ge=document.activeElement;for(const ce of G)if(ce===ge||(ce?.scrollIntoView({block:"nearest"}),ce===ie&&S&&(S.scrollTop=0),ce===J&&S&&(S.scrollTop=S.scrollHeight),ce?.focus(),document.activeElement!==ge))return},[H,S]),F=d.useCallback(()=>T([A,E]),[T,A,E]);d.useEffect(()=>{Z&&F()},[Z,F]);const{onOpenChange:I,triggerPointerDownPosRef:$}=w;d.useEffect(()=>{if(E){let G={x:0,y:0};const ie=J=>{G={x:Math.abs(Math.round(J.pageX)-($.current?.x??0)),y:Math.abs(Math.round(J.pageY)-($.current?.y??0))}},ye=J=>{G.x<=10&&G.y<=10?J.preventDefault():E.contains(J.target)||I(!1),document.removeEventListener("pointermove",ie),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",ye,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",ye,{capture:!0})}}},[E,I,$]),d.useEffect(()=>{const G=()=>I(!1);return window.addEventListener("blur",G),window.addEventListener("resize",G),()=>{window.removeEventListener("blur",G),window.removeEventListener("resize",G)}},[I]);const[V,B]=Um(G=>{const ie=H().filter(ge=>!ge.disabled),ye=ie.find(ge=>ge.ref.current===document.activeElement),J=Vm(ie,G,ye);J&&setTimeout(()=>J.ref.current.focus())}),q=d.useCallback((G,ie,ye)=>{const J=!k.current&&!ye;(w.value!==void 0&&w.value===ie||J)&&(j(G),J&&(k.current=!0))},[w.value]),X=d.useCallback(()=>E?.focus(),[E]),Q=d.useCallback((G,ie,ye)=>{const J=!k.current&&!ye;(w.value!==void 0&&w.value===ie||J)&&O(G)},[w.value]),re=a==="popper"?Dl:Nm,de=re===Dl?{side:l,sideOffset:c,align:u,alignOffset:h,arrowPadding:f,collisionBoundary:m,collisionPadding:g,sticky:y,hideWhenDetached:v,avoidCollisions:b}:{};return p.jsx(Tm,{scope:r,content:E,viewport:S,onViewportChange:M,itemRefCallback:q,selectedItem:A,onItemLeave:X,itemTextRefCallback:Q,focusSelectedItem:F,selectedItemText:P,position:a,isPositioned:Z,searchRef:V,children:p.jsx(Cc,{as:T3,allowPinchZoom:!0,children:p.jsx(as,{asChild:!0,trapped:w.open,onMountAutoFocus:G=>{G.preventDefault()},onUnmountAutoFocus:te(o,G=>{w.trigger?.focus({preventScroll:!0}),G.preventDefault()}),children:p.jsx(wo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:G=>G.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:p.jsx(re,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:G=>G.preventDefault(),...x,...de,onPlaced:()=>R(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:te(x.onKeyDown,G=>{const ie=G.ctrlKey||G.altKey||G.metaKey;if(G.key==="Tab"&&G.preventDefault(),!ie&&G.key.length===1&&B(G.key),["ArrowUp","ArrowDown","Home","End"].includes(G.key)){let J=H().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);if(["ArrowUp","End"].includes(G.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(G.key)){const ge=G.target,ce=J.indexOf(ge);J=J.slice(ce+1)}setTimeout(()=>T(J)),G.preventDefault()}})})})})})})});Pm.displayName=M3;var P3="SelectItemAlignedPosition",Nm=d.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:a,...o}=e,i=Jn(_r,r),s=er(_r,r),[l,c]=d.useState(null),[u,h]=d.useState(null),f=Re(n,_=>h(_)),m=hs(r),g=d.useRef(!1),y=d.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:x,focusSelectedItem:w}=s,E=d.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&v&&b&&x){const _=i.trigger.getBoundingClientRect(),A=u.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),P=x.getBoundingClientRect();if(i.dir!=="rtl"){const ge=P.left-A.left,ce=j.left-ge,Se=_.left-ce,Ve=_.width+Se,Rt=Math.max(Ve,A.width),Ge=window.innerWidth-Ut,Ln=cf(ce,[Ut,Math.max(Ut,Ge-Rt)]);l.style.minWidth=Ve+"px",l.style.left=Ln+"px"}else{const ge=A.right-P.right,ce=window.innerWidth-j.right-ge,Se=window.innerWidth-_.right-ce,Ve=_.width+Se,Rt=Math.max(Ve,A.width),Ge=window.innerWidth-Ut,Ln=cf(ce,[Ut,Math.max(Ut,Ge-Rt)]);l.style.minWidth=Ve+"px",l.style.right=Ln+"px"}const O=m(),H=window.innerHeight-Ut*2,Z=v.scrollHeight,R=window.getComputedStyle(u),k=parseInt(R.borderTopWidth,10),T=parseInt(R.paddingTop,10),F=parseInt(R.borderBottomWidth,10),I=parseInt(R.paddingBottom,10),$=k+T+Z+I+F,V=Math.min(b.offsetHeight*5,$),B=window.getComputedStyle(v),q=parseInt(B.paddingTop,10),X=parseInt(B.paddingBottom,10),Q=_.top+_.height/2-Ut,re=H-Q,de=b.offsetHeight/2,G=b.offsetTop+de,ie=k+T+G,ye=$-ie;if(ie<=Q){const ge=O.length>0&&b===O[O.length-1].ref.current;l.style.bottom="0px";const ce=u.clientHeight-v.offsetTop-v.offsetHeight,Se=Math.max(re,de+(ge?X:0)+ce+F),Ve=ie+Se;l.style.height=Ve+"px"}else{const ge=O.length>0&&b===O[0].ref.current;l.style.top="0px";const Se=Math.max(Q,k+v.offsetTop+(ge?q:0)+de)+ye;l.style.height=Se+"px",v.scrollTop=ie-Q+v.offsetTop}l.style.margin=`${Ut}px 0`,l.style.minHeight=V+"px",l.style.maxHeight=H+"px",a?.(),requestAnimationFrame(()=>g.current=!0)}},[m,i.trigger,i.valueNode,l,u,v,b,x,i.dir,a]);it(()=>E(),[E]);const[C,S]=d.useState();it(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const M=d.useCallback(_=>{_&&y.current===!0&&(E(),w?.(),y.current=!1)},[E,w]);return p.jsx(O3,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:M,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(be.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Nm.displayName=P3;var N3="SelectPopperPosition",Dl=d.forwardRef((e,n)=>{const{__scopeSelect:r,align:a="start",collisionPadding:o=Ut,...i}=e,s=ps(r);return p.jsx(du,{...s,...i,ref:n,align:a,collisionPadding:o,style:{boxSizing:"border-box",...i.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)"}})});Dl.displayName=N3;var[O3,wu]=sa(_r,{}),kl="SelectViewport",Om=d.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:a,...o}=e,i=er(kl,r),s=wu(kl,r),l=Re(n,i.onViewportChange),c=d.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),p.jsx(fs.Slot,{scope:r,children:p.jsx(be.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:te(o.onScroll,u=>{const h=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=s;if(m?.current&&f){const g=Math.abs(c.current-h.scrollTop);if(g>0){const y=window.innerHeight-Ut*2,v=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),x=Math.max(v,b);if(x<y){const w=x+g,E=Math.min(y,w),C=w-E;f.style.height=E+"px",f.style.bottom==="0px"&&(h.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}c.current=h.scrollTop})})})]})});Om.displayName=kl;var jm="SelectGroup",[j3,D3]=sa(jm),k3=d.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e,o=un();return p.jsx(j3,{scope:r,id:o,children:p.jsx(be.div,{role:"group","aria-labelledby":o,...a,ref:n})})});k3.displayName=jm;var Dm="SelectLabel",I3=d.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e,o=D3(Dm,r);return p.jsx(be.div,{id:o.id,...a,ref:n})});I3.displayName=Dm;var Di="SelectItem",[L3,km]=sa(Di),Im=d.forwardRef((e,n)=>{const{__scopeSelect:r,value:a,disabled:o=!1,textValue:i,...s}=e,l=Jn(Di,r),c=er(Di,r),u=l.value===a,[h,f]=d.useState(i??""),[m,g]=d.useState(!1),y=Re(n,w=>c.itemRefCallback?.(w,a,o)),v=un(),b=d.useRef("touch"),x=()=>{o||(l.onValueChange(a),l.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(L3,{scope:r,value:a,disabled:o,textId:v,isSelected:u,onItemTextChange:d.useCallback(w=>{f(E=>E||(w?.textContent??"").trim())},[]),children:p.jsx(fs.ItemSlot,{scope:r,value:a,disabled:o,textValue:h,children:p.jsx(be.div,{role:"option","aria-labelledby":v,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:y,onFocus:te(s.onFocus,()=>g(!0)),onBlur:te(s.onBlur,()=>g(!1)),onClick:te(s.onClick,()=>{b.current!=="mouse"&&x()}),onPointerUp:te(s.onPointerUp,()=>{b.current==="mouse"&&x()}),onPointerDown:te(s.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:te(s.onPointerMove,w=>{b.current=w.pointerType,o?c.onItemLeave?.():b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:te(s.onPointerLeave,w=>{w.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:te(s.onKeyDown,w=>{c.searchRef?.current!==""&&w.key===" "||(w3.includes(w.key)&&x(),w.key===" "&&w.preventDefault())})})})})});Im.displayName=Di;var ja="SelectItemText",Lm=d.forwardRef((e,n)=>{const{__scopeSelect:r,className:a,style:o,...i}=e,s=Jn(ja,r),l=er(ja,r),c=km(ja,r),u=S3(ja,r),[h,f]=d.useState(null),m=Re(n,x=>f(x),c.onItemTextChange,x=>l.itemTextRefCallback?.(x,c.value,c.disabled)),g=h?.textContent,y=d.useMemo(()=>p.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=u;return it(()=>(v(y),()=>b(y)),[v,b,y]),p.jsxs(p.Fragment,{children:[p.jsx(be.span,{id:c.textId,...i,ref:m}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Mn.createPortal(i.children,s.valueNode):null]})});Lm.displayName=ja;var Fm="SelectItemIndicator",F3=d.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e;return km(Fm,r).isSelected?p.jsx(be.span,{"aria-hidden":!0,...a,ref:n}):null});F3.displayName=Fm;var Il="SelectScrollUpButton",$3=d.forwardRef((e,n)=>{const r=er(Il,e.__scopeSelect),a=wu(Il,e.__scopeSelect),[o,i]=d.useState(!1),s=Re(n,a.onScrollButtonChange);return it(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?p.jsx($m,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});$3.displayName=Il;var Ll="SelectScrollDownButton",H3=d.forwardRef((e,n)=>{const r=er(Ll,e.__scopeSelect),a=wu(Ll,e.__scopeSelect),[o,i]=d.useState(!1),s=Re(n,a.onScrollButtonChange);return it(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,h=Math.ceil(c.scrollTop)<u;i(h)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?p.jsx($m,{...e,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});H3.displayName=Ll;var $m=d.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:a,...o}=e,i=er("SelectScrollButton",r),s=d.useRef(null),l=hs(r),c=d.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),it(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),p.jsx(be.div,{"aria-hidden":!0,...o,ref:n,style:{flexShrink:0,...o.style},onPointerDown:te(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(a,50))}),onPointerMove:te(o.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(a,50))}),onPointerLeave:te(o.onPointerLeave,()=>{c()})})}),z3="SelectSeparator",U3=d.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e;return p.jsx(be.div,{"aria-hidden":!0,...a,ref:n})});U3.displayName=z3;var Fl="SelectArrow",V3=d.forwardRef((e,n)=>{const{__scopeSelect:r,...a}=e,o=ps(r),i=Jn(Fl,r),s=er(Fl,r);return i.open&&s.position==="popper"?p.jsx(fu,{...o,...a,ref:n}):null});V3.displayName=Fl;var Z3="SelectBubbleInput",Hm=d.forwardRef(({__scopeSelect:e,value:n,...r},a)=>{const o=d.useRef(null),i=Re(a,o),s=y3(n);return d.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==n&&h){const f=new Event("change",{bubbles:!0});h.call(l,n),l.dispatchEvent(f)}},[s,n]),p.jsx(be.select,{...r,style:{...xm,...r.style},ref:i,defaultValue:n})});Hm.displayName=Z3;function zm(e){return e===""||e===void 0}function Um(e){const n=hn(e),r=d.useRef(""),a=d.useRef(0),o=d.useCallback(s=>{const l=r.current+s;n(l),(function c(u){r.current=u,window.clearTimeout(a.current),u!==""&&(a.current=window.setTimeout(()=>c(""),1e3))})(l)},[n]),i=d.useCallback(()=>{r.current="",window.clearTimeout(a.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(a.current),[]),[r,o,i]}function Vm(e,n,r){const o=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,i=r?e.indexOf(r):-1;let s=B3(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==r));const c=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function B3(e,n){return e.map((r,a)=>e[(n+a)%e.length])}var q3=wm,W3=Em,G3=Sm,K3=Am,Y3=Rm,Q3=Mm,X3=Om,J3=Im,e_=Lm;const t_=Xn(["inline-flex","items-center","justify-between","gap-2","border-2","bg-surface","text-fg","font-bold","transition-all","outline-none","focus:shadow-sketchy","disabled:cursor-not-allowed","disabled:opacity-50","cursor-pointer","whitespace-nowrap"],{variants:{variant:{default:["border-border"],ghost:["border-transparent","bg-subtle","focus:border-border-focus"]},size:{sm:"h-8 px-2 text-sm rounded-sketchy-sm",md:"h-10 px-3 text-sm rounded-sketchy-md",lg:"h-12 px-4 text-base rounded-sketchy-lg"}},defaultVariants:{variant:"default",size:"md"}}),mi=({value:e,defaultValue:n,onValueChange:r,placeholder:a,variant:o,size:i,className:s,children:l,disabled:c})=>p.jsxs(q3,{value:e,defaultValue:n,onValueChange:r,disabled:c,children:[p.jsxs(W3,{className:t_({variant:o,size:i,className:s}),children:[p.jsx(G3,{placeholder:a}),p.jsx(K3,{children:p.jsx(qc,{className:"w-3.5 h-3.5 opacity-60"})})]}),p.jsx(Y3,{children:p.jsx(Zm,{children:p.jsx(X3,{className:"p-1",children:l})})})]}),Zm=d.forwardRef(({className:e,children:n,...r},a)=>p.jsx(Q3,{ref:a,position:"popper",sideOffset:4,className:["z-[1100]","min-w-[var(--radix-select-trigger-width)]","overflow-hidden","rounded-sketchy-md","bg-surface","border-2","border-border","shadow-sketchy","data-[state=open]:animate-fade-in","data-[state=open]:animate-zoom-in",e].filter(Boolean).join(" "),...r,children:n}));Zm.displayName="SelectContent";const An=d.forwardRef(({className:e,children:n,...r},a)=>p.jsx(J3,{ref:a,className:["relative","flex","items-center","cursor-pointer","select-none","px-3","py-2","text-sm","font-bold","text-fg-muted","outline-none","transition-colors","rounded-sketchy-sm","data-[highlighted]:bg-hover","data-[highlighted]:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e].filter(Boolean).join(" "),...r,children:p.jsx(e_,{children:n})}));An.displayName="SelectItem";mi.displayName="Select";const n_=Xn(["w-full","border-2","border-border","bg-surface","text-fg","placeholder:text-fg-placeholder","transition-all","focus:outline-none","focus:shadow-sketchy","disabled:cursor-not-allowed","disabled:opacity-50","resize-none"],{variants:{variant:{default:[],ghost:["border-transparent","bg-subtle","focus:border-border-focus"],error:["border-border-error","bg-pastel-pink-200/20","focus:border-red-500"]},size:{sm:"p-2 text-sm rounded-[8px_3px_9px_2px/3px_7px_3px_8px] min-h-[60px]",md:"p-3 text-sm rounded-[10px_3px_11px_3px/3px_9px_3px_10px] min-h-[80px]",lg:"p-4 text-base rounded-[12px_4px_13px_3px/4px_10px_4px_12px] min-h-[100px]"}},defaultVariants:{variant:"default",size:"md"}}),Bm=d.forwardRef(({className:e,variant:n,size:r,...a},o)=>p.jsx("textarea",{ref:o,className:n_({variant:n,size:r,className:e}),...a}));Bm.displayName="Textarea";var qm="Toggle",Wm=d.forwardRef((e,n)=>{const{pressed:r,defaultPressed:a,onPressedChange:o,...i}=e,[s,l]=jn({prop:r,onChange:o,defaultProp:a??!1,caller:qm});return p.jsx(be.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:n,onClick:te(e.onClick,()=>{e.disabled||l(!s)})})});Wm.displayName=qm;var tr="ToggleGroup",[Gm]=In(tr,[ls]),Km=ls(),_u=pe.forwardRef((e,n)=>{const{type:r,...a}=e;if(r==="single"){const o=a;return p.jsx(r_,{...o,ref:n})}if(r==="multiple"){const o=a;return p.jsx(a_,{...o,ref:n})}throw new Error(`Missing prop \`type\` expected on \`${tr}\``)});_u.displayName=tr;var[Ym,Qm]=Gm(tr),r_=pe.forwardRef((e,n)=>{const{value:r,defaultValue:a,onValueChange:o=()=>{},...i}=e,[s,l]=jn({prop:r,defaultProp:a??"",onChange:o,caller:tr});return p.jsx(Ym,{scope:e.__scopeToggleGroup,type:"single",value:pe.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:pe.useCallback(()=>l(""),[l]),children:p.jsx(Xm,{...i,ref:n})})}),a_=pe.forwardRef((e,n)=>{const{value:r,defaultValue:a,onValueChange:o=()=>{},...i}=e,[s,l]=jn({prop:r,defaultProp:a??[],onChange:o,caller:tr}),c=pe.useCallback(h=>l((f=[])=>[...f,h]),[l]),u=pe.useCallback(h=>l((f=[])=>f.filter(m=>m!==h)),[l]);return p.jsx(Ym,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:u,children:p.jsx(Xm,{...i,ref:n})})});_u.displayName=tr;var[o_,i_]=Gm(tr),Xm=pe.forwardRef((e,n)=>{const{__scopeToggleGroup:r,disabled:a=!1,rovingFocus:o=!0,orientation:i,dir:s,loop:l=!0,...c}=e,u=Km(r),h=ss(s),f={role:"group",dir:h,...c};return p.jsx(o_,{scope:r,rovingFocus:o,disabled:a,children:o?p.jsx(_p,{asChild:!0,...u,orientation:i,dir:h,loop:l,children:p.jsx(be.div,{...f,ref:n})}):p.jsx(be.div,{...f,ref:n})})}),ki="ToggleGroupItem",Jm=pe.forwardRef((e,n)=>{const r=Qm(ki,e.__scopeToggleGroup),a=i_(ki,e.__scopeToggleGroup),o=Km(e.__scopeToggleGroup),i=r.value.includes(e.value),s=a.disabled||e.disabled,l={...e,pressed:i,disabled:s},c=pe.useRef(null);return a.rovingFocus?p.jsx(Ep,{asChild:!0,...o,focusable:!s,active:i,ref:c,children:p.jsx(uf,{...l,ref:n})}):p.jsx(uf,{...l,ref:n})});Jm.displayName=ki;var uf=pe.forwardRef((e,n)=>{const{__scopeToggleGroup:r,value:a,...o}=e,i=Qm(ki,r),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=i.type==="single"?s:void 0;return p.jsx(Wm,{...l,...o,ref:n,onPressedChange:c=>{c?i.onItemActivate(a):i.onItemDeactivate(a)}})}),s_=_u,l_=Jm;const c_=Xn(["inline-flex","gap-0.5","overflow-hidden"],{variants:{variant:{default:["border-2","border-border","rounded-[12px_4px_13px_3px/4px_10px_4px_12px]","bg-surface"],outline:["border-2","border-border","rounded-[12px_4px_13px_3px/4px_10px_4px_12px]","bg-transparent"],pills:["bg-subtle","rounded-[14px_4px_15px_4px/4px_12px_4px_14px]","p-1","border-2","border-border"]}},defaultVariants:{variant:"default"}}),u_=Xn(["flex","items-center","justify-center","font-bold","transition-all","duration-200","disabled:pointer-events-none","disabled:opacity-50"],{variants:{variant:{default:["text-fg-muted","hover:bg-hover","data-[state=on]:bg-accent-primary","data-[state=on]:text-white","data-[state=on]:shadow-sketchy"],outline:["text-fg-muted","hover:bg-hover-subtle","data-[state=on]:bg-accent-primary","data-[state=on]:text-white"],pills:["text-fg-secondary","rounded-[10px_3px_11px_3px/3px_8px_3px_10px]","data-[state=on]:bg-accent-primary","data-[state=on]:text-white","data-[state=on]:shadow-sketchy","data-[state=on]:border-2","data-[state=on]:border-border-secondary"]},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"}}),eg=d.createContext({}),Eu=d.forwardRef(({className:e,variant:n,size:r,children:a,...o},i)=>p.jsx(eg.Provider,{value:{variant:n??"default",size:r??"md"},children:p.jsx(s_,{ref:i,className:c_({variant:n,className:e}),...o,children:a})}));Eu.displayName="ToggleGroup";const Br=d.forwardRef(({className:e,activeClassName:n,children:r,...a},o)=>{const i=d.useContext(eg);return p.jsx(l_,{ref:o,className:u_({variant:i.variant,size:i.size,className:[e,n].filter(Boolean).join(" ")}),...a,children:r})});Br.displayName="ToggleGroupItem";var[ms]=In("Tooltip",[ia]),gs=ia(),tg="TooltipProvider",d_=700,$l="tooltip.open",[f_,Cu]=ms(tg),ng=e=>{const{__scopeTooltip:n,delayDuration:r=d_,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:i}=e,s=d.useRef(!0),l=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),p.jsx(f_,{scope:n,isOpenDelayedRef:s,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,a)},[a]),isPointerInTransitRef:l,onPointerInTransitChange:d.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:i})};ng.displayName=tg;var to="Tooltip",[h_,Ao]=ms(to),rg=e=>{const{__scopeTooltip:n,children:r,open:a,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:l}=e,c=Cu(to,e.__scopeTooltip),u=gs(n),[h,f]=d.useState(null),m=un(),g=d.useRef(0),y=s??c.disableHoverableContent,v=l??c.delayDuration,b=d.useRef(!1),[x,w]=jn({prop:a,defaultProp:o??!1,onChange:_=>{_?(c.onOpen(),document.dispatchEvent(new CustomEvent($l))):c.onClose(),i?.(_)},caller:to}),E=d.useMemo(()=>x?b.current?"delayed-open":"instant-open":"closed",[x]),C=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b.current=!1,w(!0)},[w]),S=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,w(!1)},[w]),M=d.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,w(!0),g.current=0},v)},[v,w]);return d.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),p.jsx(cu,{...u,children:p.jsx(h_,{scope:n,contentId:m,open:x,stateAttribute:E,trigger:h,onTriggerChange:f,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?M():C()},[c.isOpenDelayedRef,M,C]),onTriggerLeave:d.useCallback(()=>{y?S():(window.clearTimeout(g.current),g.current=0)},[S,y]),onOpen:C,onClose:S,disableHoverableContent:y,children:r})})};rg.displayName=to;var Hl="TooltipTrigger",ag=d.forwardRef((e,n)=>{const{__scopeTooltip:r,...a}=e,o=Ao(Hl,r),i=Cu(Hl,r),s=gs(r),l=d.useRef(null),c=Re(n,l,o.onTriggerChange),u=d.useRef(!1),h=d.useRef(!1),f=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(uu,{asChild:!0,...s,children:p.jsx(be.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:c,onPointerMove:te(e.onPointerMove,m=>{m.pointerType!=="touch"&&!h.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),h.current=!0)}),onPointerLeave:te(e.onPointerLeave,()=>{o.onTriggerLeave(),h.current=!1}),onPointerDown:te(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:te(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:te(e.onBlur,o.onClose),onClick:te(e.onClick,o.onClose)})})});ag.displayName=Hl;var Su="TooltipPortal",[p_,m_]=ms(Su,{forceMount:void 0}),og=e=>{const{__scopeTooltip:n,forceMount:r,children:a,container:o}=e,i=Ao(Su,n);return p.jsx(p_,{scope:n,forceMount:r,children:p.jsx(yn,{present:r||i.open,children:p.jsx(_o,{asChild:!0,container:o,children:a})})})};og.displayName=Su;var Qr="TooltipContent",ig=d.forwardRef((e,n)=>{const r=m_(Qr,e.__scopeTooltip),{forceMount:a=r.forceMount,side:o="top",...i}=e,s=Ao(Qr,e.__scopeTooltip);return p.jsx(yn,{present:a||s.open,children:s.disableHoverableContent?p.jsx(sg,{side:o,...i,ref:n}):p.jsx(g_,{side:o,...i,ref:n})})}),g_=d.forwardRef((e,n)=>{const r=Ao(Qr,e.__scopeTooltip),a=Cu(Qr,e.__scopeTooltip),o=d.useRef(null),i=Re(n,o),[s,l]=d.useState(null),{trigger:c,onClose:u}=r,h=o.current,{onPointerInTransitChange:f}=a,m=d.useCallback(()=>{l(null),f(!1)},[f]),g=d.useCallback((y,v)=>{const b=y.currentTarget,x={x:y.clientX,y:y.clientY},w=w_(x,b.getBoundingClientRect()),E=__(x,w),C=E_(v.getBoundingClientRect()),S=S_([...E,...C]);l(S),f(!0)},[f]);return d.useEffect(()=>()=>m(),[m]),d.useEffect(()=>{if(c&&h){const y=b=>g(b,h),v=b=>g(b,c);return c.addEventListener("pointerleave",y),h.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",y),h.removeEventListener("pointerleave",v)}}},[c,h,g,m]),d.useEffect(()=>{if(s){const y=v=>{const b=v.target,x={x:v.clientX,y:v.clientY},w=c?.contains(b)||h?.contains(b),E=!C_(x,s);w?m():E&&(m(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,h,s,u,m]),p.jsx(sg,{...e,ref:i})}),[y_,v_]=ms(to,{isInside:!1}),x_=w4("TooltipContent"),sg=d.forwardRef((e,n)=>{const{__scopeTooltip:r,children:a,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...l}=e,c=Ao(Qr,r),u=gs(r),{onClose:h}=c;return d.useEffect(()=>(document.addEventListener($l,h),()=>document.removeEventListener($l,h)),[h]),d.useEffect(()=>{if(c.trigger){const f=m=>{m.target?.contains(c.trigger)&&h()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,h]),p.jsx(wo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:h,children:p.jsxs(du,{"data-state":c.stateAttribute,...u,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(x_,{children:a}),p.jsx(y_,{scope:r,isInside:!0,children:p.jsx(x3,{id:c.contentId,role:"tooltip",children:o||a})})]})})});ig.displayName=Qr;var lg="TooltipArrow",b_=d.forwardRef((e,n)=>{const{__scopeTooltip:r,...a}=e,o=gs(r);return v_(lg,r).isInside?null:p.jsx(fu,{...o,...a,ref:n})});b_.displayName=lg;function w_(e,n){const r=Math.abs(n.top-e.y),a=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),i=Math.abs(n.left-e.x);switch(Math.min(r,a,o,i)){case i:return"left";case o:return"right";case r:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function __(e,n,r=5){const a=[];switch(n){case"top":a.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":a.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":a.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":a.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return a}function E_(e){const{top:n,right:r,bottom:a,left:o}=e;return[{x:o,y:n},{x:r,y:n},{x:r,y:a},{x:o,y:a}]}function C_(e,n){const{x:r,y:a}=e;let o=!1;for(let i=0,s=n.length-1;i<n.length;s=i++){const l=n[i],c=n[s],u=l.x,h=l.y,f=c.x,m=c.y;h>a!=m>a&&r<(f-u)*(a-h)/(m-h)+u&&(o=!o)}return o}function S_(e){const n=e.slice();return n.sort((r,a)=>r.x<a.x?-1:r.x>a.x?1:r.y<a.y?-1:r.y>a.y?1:0),A_(n)}function A_(e){if(e.length<=1)return e.slice();const n=[];for(let a=0;a<e.length;a++){const o=e[a];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}n.pop();const r=[];for(let a=e.length-1;a>=0;a--){const o=e[a];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var R_=ng,M_=rg,T_=ag,P_=og,cg=ig;const N_=R_,O_=M_,j_=T_,ug=d.forwardRef(({className:e,sideOffset:n=4,...r},a)=>p.jsx(cg,{ref:a,sideOffset:n,className:["z-50","overflow-hidden","px-3","py-1.5","text-xs","font-bold","bg-elevated","text-fg-default","border-2","border-border-secondary","rounded-[8px_3px_9px_2px/3px_6px_3px_7px]","shadow-sketchy","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].filter(Boolean).join(" "),...r}));ug.displayName=cg.displayName;const dg=({content:e,children:n,side:r="top",delayDuration:a=200})=>p.jsx(N_,{children:p.jsxs(O_,{delayDuration:a,children:[p.jsx(j_,{asChild:!0,children:n}),p.jsx(P_,{children:p.jsx(ug,{side:r,children:e})})]})}),Dn=d.forwardRef(({icon:e,title:n,description:r,className:a="",...o},i)=>p.jsxs("div",{ref:i,className:["flex flex-col items-center justify-center text-center","h-[400px]","bg-muted/30","border-2 border-dashed","border-border-secondary","rounded-[24px_8px_25px_7px/8px_20px_8px_22px]","p-8",a].join(" "),...o,children:[e&&p.jsx("div",{className:"mb-4 text-6xl opacity-80",children:e}),n&&p.jsx("h3",{className:"text-xl font-bold mb-2 text-fg-muted",children:n}),r&&p.jsx("p",{className:"text-fg-tertiary max-w-[400px] font-medium",children:r})]}));Dn.displayName="Empty";const nr=d.forwardRef(({page:e,last:n,onChange:r,className:a="",...o},i)=>{const s=Number(e),l=Number(n),c=[];for(let f=1;f<l+1;f++)(s===f||s===1&&f<s+5||s===2&&f<s+4||f>s-3&&f<s+3||s===l-1&&f>s-4||s===l&&f>s-5)&&c.push(f);const u=s===1,h=s===l;return p.jsxs("nav",{ref:i,className:`mt-8 flex justify-center items-center gap-1 ${a}`,...o,children:[p.jsxs(zr,{disabled:u,onClick:()=>!u&&r(1),"aria-label":"First page",isSkip:!0,children:[p.jsx(Zr,{width:16}),p.jsx(Zr,{width:16})]}),p.jsx(zr,{disabled:u,onClick:()=>!u&&r(s-1),"aria-label":"Previous page",children:p.jsx(Zr,{width:20})}),c.map(f=>p.jsx(zr,{active:s===f,onClick:()=>r(f),"aria-label":`Page ${f}`,"aria-current":s===f?"page":void 0,children:f},f)),p.jsx(zr,{disabled:h,onClick:()=>!h&&r(s+1),"aria-label":"Next page",children:p.jsx($a,{width:20})}),p.jsxs(zr,{disabled:h,onClick:()=>!h&&r(l),"aria-label":"Last page",isSkip:!0,children:[p.jsx($a,{width:16}),p.jsx($a,{width:16})]})]})});nr.displayName="Pagination";const zr=d.forwardRef(({active:e,disabled:n,isSkip:r,children:a,className:o="",...i},s)=>{const l=`
9
+ flex justify-center items-center
10
+ leading-normal text-base font-bold
11
+ w-9 h-9 md:w-10 md:h-10
12
+ border-2 border-transparent
13
+ rounded-[10px_3px_11px_3px/3px_8px_3px_10px]
14
+ transition-all duration-200
15
+ `,c=e?"cursor-default bg-accent-primary border-border text-white shadow-sketchy sketchy-sm":n?"cursor-default text-fg-disabled border-transparent":"cursor-pointer text-fg-default hover:bg-hover hover:border-border-secondary",u=r?"relative [&>svg]:absolute [&>svg:first-child]:-translate-x-[3px] [&>svg:last-child]:translate-x-[3px]":"";return p.jsx("button",{ref:s,type:"button",disabled:n,className:`${l} ${c} ${u} ${o}`,...i,children:a})});zr.displayName="PaginationItem";const D_=Xn(["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"}}),k_=d.forwardRef(({value:e,max:n,color:r,className:a="",...o},i)=>{const s=Math.min(100,Math.max(0,e/n*100));return p.jsx("div",{ref:i,className:["w-full h-3","bg-surface","border-2 border-border","rounded-[6px_2px_7px_2px/2px_5px_2px_6px]","overflow-hidden",a].join(" "),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":n,...o,children:p.jsx("div",{className:D_({color:r}),style:{width:`${s}%`}})})});k_.displayName="Progress";const Te=d.forwardRef(({width:e,height:n=30,opacity:r,className:a="",style:o,...i},s)=>p.jsx("div",{ref:s,className:["rounded-[10px_3px_11px_3px/3px_8px_3px_10px]","border-2","border-divider","bg-[length:200%_100%]","bg-gradient-to-r","from-pastel-lavender-200/30","via-pastel-yellow-200/20","to-pastel-lavender-200/30","dark:from-zinc-800","dark:via-zinc-700","dark:to-zinc-800","animate-shimmer","animate-fade-in",a].join(" "),style:{width:e,height:n,opacity:r,...o},...i}));Te.displayName="Skeleton";const fg=({children:e,className:n=""})=>p.jsx("div",{className:`bg-elevated py-3 px-4 rounded-[12px_4px_13px_3px/4px_10px_4px_12px] border-2 border-border-secondary shadow-sketchy ${n}`,children:p.jsx("div",{className:"flex items-center justify-between",children:p.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[p.jsx(r4,{className:"h-5 w-5 text-fg-muted"}),p.jsx("div",{className:"text-sm font-bold flex-1 text-fg-default",children:e})]})})}),St=({children:e,fallback:n})=>e||n,df=({children:e,match:n})=>{if(!n)return p.jsx("span",{children:e});const r=new RegExp(`(${n})`,"gi"),a=e.split(r);return p.jsx("span",{children:a.map((o,i)=>r.test(o)?p.jsx("mark",{children:o},i):o)})};function hg({src:e,alt:n,loading:r="lazy",className:a}){const o=d.useRef(null);return d.useEffect(()=>{if(!o.current||r!=="lazy"||!e)return;const i=new IntersectionObserver(([s])=>{if(s.isIntersecting){const l=s.target;l.src=l.dataset.src,i.unobserve(l)}});return i.observe(o.current),()=>{i.disconnect()}},[r,e]),p.jsx(p.Fragment,{children:r!=="lazy"?p.jsx("img",{src:e,alt:n,className:a}):p.jsx("img",{ref:o,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2O4evXqfwAIgQN/QHwrfwAAAABJRU5ErkJggg==",alt:n,"data-src":e,className:a})})}var Gs={exports:{}},Ks,ff;function I_(){if(ff)return Ks;ff=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ks=e,Ks}var Ys,hf;function L_(){if(hf)return Ys;hf=1;var e=I_();function n(){}function r(){}return r.resetWarningCache=n,Ys=function(){function a(s,l,c,u,h,f){if(f!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}a.isRequired=a;function o(){return a}var i={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:o,element:a,elementType:a,instanceOf:o,node:a,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:n};return i.PropTypes=i,i},Ys}var pf;function F_(){return pf||(pf=1,Gs.exports=L_()()),Gs.exports}var $_=F_();const D=na($_);var Qs,mf;function H_(){if(mf)return Qs;mf=1;function e(l){return l&&typeof l=="object"&&"default"in l?l.default:l}var n=Wy(),r=e(n);function a(l,c,u){return c in l?Object.defineProperty(l,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):l[c]=u,l}function o(l,c){l.prototype=Object.create(c.prototype),l.prototype.constructor=l,l.__proto__=c}var i=!!(typeof window<"u"&&window.document&&window.document.createElement);function s(l,c,u){if(typeof l!="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 u<"u"&&typeof u!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function h(f){return f.displayName||f.name||"Component"}return function(m){if(typeof m!="function")throw new Error("Expected WrappedComponent to be a React component.");var g=[],y;function v(){y=l(g.map(function(x){return x.props})),b.canUseDOM?c(y):u&&(y=u(y))}var b=(function(x){o(w,x);function w(){return x.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 S=y;return y=void 0,g=[],S};var E=w.prototype;return E.UNSAFE_componentWillMount=function(){g.push(this),v()},E.componentDidUpdate=function(){v()},E.componentWillUnmount=function(){var S=g.indexOf(this);g.splice(S,1),v()},E.render=function(){return r.createElement(m,this.props)},w})(n.PureComponent);return a(b,"displayName","SideEffect("+h(m)+")"),a(b,"canUseDOM",i),b}}return Qs=s,Qs}var z_=H_();const U_=na(z_);var Xs,gf;function V_(){if(gf)return Xs;gf=1;var e=typeof Element<"u",n=typeof Map=="function",r=typeof Set=="function",a=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(i,s){if(i===s)return!0;if(i&&s&&typeof i=="object"&&typeof s=="object"){if(i.constructor!==s.constructor)return!1;var l,c,u;if(Array.isArray(i)){if(l=i.length,l!=s.length)return!1;for(c=l;c--!==0;)if(!o(i[c],s[c]))return!1;return!0}var h;if(n&&i instanceof Map&&s instanceof Map){if(i.size!==s.size)return!1;for(h=i.entries();!(c=h.next()).done;)if(!s.has(c.value[0]))return!1;for(h=i.entries();!(c=h.next()).done;)if(!o(c.value[1],s.get(c.value[0])))return!1;return!0}if(r&&i instanceof Set&&s instanceof Set){if(i.size!==s.size)return!1;for(h=i.entries();!(c=h.next()).done;)if(!s.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(s)){if(l=i.length,l!=s.length)return!1;for(c=l;c--!==0;)if(i[c]!==s[c])return!1;return!0}if(i.constructor===RegExp)return i.source===s.source&&i.flags===s.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof s.valueOf=="function")return i.valueOf()===s.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof s.toString=="function")return i.toString()===s.toString();if(u=Object.keys(i),l=u.length,l!==Object.keys(s).length)return!1;for(c=l;c--!==0;)if(!Object.prototype.hasOwnProperty.call(s,u[c]))return!1;if(e&&i instanceof Element)return!1;for(c=l;c--!==0;)if(!((u[c]==="_owner"||u[c]==="__v"||u[c]==="__o")&&i.$$typeof)&&!o(i[u[c]],s[u[c]]))return!1;return!0}return i!==i&&s!==s}return Xs=function(s,l){try{return o(s,l)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},Xs}var Z_=V_();const B_=na(Z_);var Js,yf;function q_(){if(yf)return Js;yf=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(s).map(function(h){return s[h]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(h){u[h]=h}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Js=o()?Object.assign:function(i,s){for(var l,c=a(i),u,h=1;h<arguments.length;h++){l=Object(arguments[h]);for(var f in l)n.call(l,f)&&(c[f]=l[f]);if(e){u=e(l);for(var m=0;m<u.length;m++)r.call(l,u[m])&&(c[u[m]]=l[u[m]])}}return c},Js}var W_=q_();const G_=na(W_);var pr={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},me={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(me).map(function(e){return me[e]});var De={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"},Ii={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},no={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},K_=Object.keys(Ii).reduce(function(e,n){return e[Ii[n]]=n,e},{}),Y_=[me.NOSCRIPT,me.SCRIPT,me.STYLE],Zt="data-react-helmet",Q_=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},X_=function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")},J_=(function(){function e(n,r){for(var a=0;a<r.length;a++){var o=r[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}return function(n,r,a){return r&&e(n.prototype,r),a&&e(n,a),n}})(),yt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},e5=function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)},vf=function(e,n){var r={};for(var a in e)n.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},t5=function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:e},zl=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r===!1?String(n):String(n).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},n5=function(n){var r=qr(n,me.TITLE),a=qr(n,no.TITLE_TEMPLATE);if(a&&r)return a.replace(/%s/g,function(){return Array.isArray(r)?r.join(""):r});var o=qr(n,no.DEFAULT_TITLE);return r||o||void 0},r5=function(n){return qr(n,no.ON_CHANGE_CLIENT_STATE)||function(){}},el=function(n,r){return r.filter(function(a){return typeof a[n]<"u"}).map(function(a){return a[n]}).reduce(function(a,o){return yt({},a,o)},{})},a5=function(n,r){return r.filter(function(a){return typeof a[me.BASE]<"u"}).map(function(a){return a[me.BASE]}).reverse().reduce(function(a,o){if(!a.length)for(var i=Object.keys(o),s=0;s<i.length;s++){var l=i[s],c=l.toLowerCase();if(n.indexOf(c)!==-1&&o[c])return a.concat(o)}return a},[])},xa=function(n,r,a){var o={};return a.filter(function(i){return Array.isArray(i[n])?!0:(typeof i[n]<"u"&&l5("Helmet: "+n+' should be of type "Array". Instead found type "'+Q_(i[n])+'"'),!1)}).map(function(i){return i[n]}).reverse().reduce(function(i,s){var l={};s.filter(function(m){for(var g=void 0,y=Object.keys(m),v=0;v<y.length;v++){var b=y[v],x=b.toLowerCase();r.indexOf(x)!==-1&&!(g===De.REL&&m[g].toLowerCase()==="canonical")&&!(x===De.REL&&m[x].toLowerCase()==="stylesheet")&&(g=x),r.indexOf(b)!==-1&&(b===De.INNER_HTML||b===De.CSS_TEXT||b===De.ITEM_PROP)&&(g=b)}if(!g||!m[g])return!1;var w=m[g].toLowerCase();return o[g]||(o[g]={}),l[g]||(l[g]={}),o[g][w]?!1:(l[g][w]=!0,!0)}).reverse().forEach(function(m){return i.push(m)});for(var c=Object.keys(l),u=0;u<c.length;u++){var h=c[u],f=G_({},o[h],l[h]);o[h]=f}return i},[]).reverse()},qr=function(n,r){for(var a=n.length-1;a>=0;a--){var o=n[a];if(o.hasOwnProperty(r))return o[r]}return null},o5=function(n){return{baseTag:a5([De.HREF,De.TARGET],n),bodyAttributes:el(pr.BODY,n),defer:qr(n,no.DEFER),encode:qr(n,no.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:el(pr.HTML,n),linkTags:xa(me.LINK,[De.REL,De.HREF],n),metaTags:xa(me.META,[De.NAME,De.CHARSET,De.HTTPEQUIV,De.PROPERTY,De.ITEM_PROP],n),noscriptTags:xa(me.NOSCRIPT,[De.INNER_HTML],n),onChangeClientState:r5(n),scriptTags:xa(me.SCRIPT,[De.SRC,De.INNER_HTML],n),styleTags:xa(me.STYLE,[De.CSS_TEXT],n),title:n5(n),titleAttributes:el(pr.TITLE,n)}},Ul=(function(){var e=Date.now();return function(n){var r=Date.now();r-e>16?(e=r,n(r)):setTimeout(function(){Ul(n)},0)}})(),xf=function(n){return clearTimeout(n)},i5=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Ul:global.requestAnimationFrame||Ul,s5=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||xf:global.cancelAnimationFrame||xf,l5=function(n){return console&&typeof console.warn=="function"&&console.warn(n)},ba=null,c5=function(n){ba&&s5(ba),n.defer?ba=i5(function(){bf(n,function(){ba=null})}):(bf(n),ba=null)},bf=function(n,r){var a=n.baseTag,o=n.bodyAttributes,i=n.htmlAttributes,s=n.linkTags,l=n.metaTags,c=n.noscriptTags,u=n.onChangeClientState,h=n.scriptTags,f=n.styleTags,m=n.title,g=n.titleAttributes;Vl(me.BODY,o),Vl(me.HTML,i),u5(m,g);var y={baseTag:Lr(me.BASE,a),linkTags:Lr(me.LINK,s),metaTags:Lr(me.META,l),noscriptTags:Lr(me.NOSCRIPT,c),scriptTags:Lr(me.SCRIPT,h),styleTags:Lr(me.STYLE,f)},v={},b={};Object.keys(y).forEach(function(x){var w=y[x],E=w.newTags,C=w.oldTags;E.length&&(v[x]=E),C.length&&(b[x]=y[x].oldTags)}),r&&r(),u(n,v,b)},pg=function(n){return Array.isArray(n)?n.join(""):n},u5=function(n,r){typeof n<"u"&&document.title!==n&&(document.title=pg(n)),Vl(me.TITLE,r)},Vl=function(n,r){var a=document.getElementsByTagName(n)[0];if(a){for(var o=a.getAttribute(Zt),i=o?o.split(","):[],s=[].concat(i),l=Object.keys(r),c=0;c<l.length;c++){var u=l[c],h=r[u]||"";a.getAttribute(u)!==h&&a.setAttribute(u,h),i.indexOf(u)===-1&&i.push(u);var f=s.indexOf(u);f!==-1&&s.splice(f,1)}for(var m=s.length-1;m>=0;m--)a.removeAttribute(s[m]);i.length===s.length?a.removeAttribute(Zt):a.getAttribute(Zt)!==l.join(",")&&a.setAttribute(Zt,l.join(","))}},Lr=function(n,r){var a=document.head||document.querySelector(me.HEAD),o=a.querySelectorAll(n+"["+Zt+"]"),i=Array.prototype.slice.call(o),s=[],l=void 0;return r&&r.length&&r.forEach(function(c){var u=document.createElement(n);for(var h in c)if(c.hasOwnProperty(h))if(h===De.INNER_HTML)u.innerHTML=c.innerHTML;else if(h===De.CSS_TEXT)u.styleSheet?u.styleSheet.cssText=c.cssText:u.appendChild(document.createTextNode(c.cssText));else{var f=typeof c[h]>"u"?"":c[h];u.setAttribute(h,f)}u.setAttribute(Zt,"true"),i.some(function(m,g){return l=g,u.isEqualNode(m)})?i.splice(l,1):s.push(u)}),i.forEach(function(c){return c.parentNode.removeChild(c)}),s.forEach(function(c){return a.appendChild(c)}),{oldTags:i,newTags:s}},mg=function(n){return Object.keys(n).reduce(function(r,a){var o=typeof n[a]<"u"?a+'="'+n[a]+'"':""+a;return r?r+" "+o:o},"")},d5=function(n,r,a,o){var i=mg(a),s=pg(r);return i?"<"+n+" "+Zt+'="true" '+i+">"+zl(s,o)+"</"+n+">":"<"+n+" "+Zt+'="true">'+zl(s,o)+"</"+n+">"},f5=function(n,r,a){return r.reduce(function(o,i){var s=Object.keys(i).filter(function(u){return!(u===De.INNER_HTML||u===De.CSS_TEXT)}).reduce(function(u,h){var f=typeof i[h]>"u"?h:h+'="'+zl(i[h],a)+'"';return u?u+" "+f:f},""),l=i.innerHTML||i.cssText||"",c=Y_.indexOf(n)===-1;return o+"<"+n+" "+Zt+'="true" '+s+(c?"/>":">"+l+"</"+n+">")},"")},gg=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(n).reduce(function(a,o){return a[Ii[o]||o]=n[o],a},r)},h5=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(n).reduce(function(a,o){return a[K_[o]||o]=n[o],a},r)},p5=function(n,r,a){var o,i=(o={key:r},o[Zt]=!0,o),s=gg(a,i);return[pe.createElement(me.TITLE,s,r)]},m5=function(n,r){return r.map(function(a,o){var i,s=(i={key:o},i[Zt]=!0,i);return Object.keys(a).forEach(function(l){var c=Ii[l]||l;if(c===De.INNER_HTML||c===De.CSS_TEXT){var u=a.innerHTML||a.cssText;s.dangerouslySetInnerHTML={__html:u}}else s[c]=a[l]}),pe.createElement(n,s)})},bn=function(n,r,a){switch(n){case me.TITLE:return{toComponent:function(){return p5(n,r.title,r.titleAttributes)},toString:function(){return d5(n,r.title,r.titleAttributes,a)}};case pr.BODY:case pr.HTML:return{toComponent:function(){return gg(r)},toString:function(){return mg(r)}};default:return{toComponent:function(){return m5(n,r)},toString:function(){return f5(n,r,a)}}}},yg=function(n){var r=n.baseTag,a=n.bodyAttributes,o=n.encode,i=n.htmlAttributes,s=n.linkTags,l=n.metaTags,c=n.noscriptTags,u=n.scriptTags,h=n.styleTags,f=n.title,m=f===void 0?"":f,g=n.titleAttributes;return{base:bn(me.BASE,r,o),bodyAttributes:bn(pr.BODY,a,o),htmlAttributes:bn(pr.HTML,i,o),link:bn(me.LINK,s,o),meta:bn(me.META,l,o),noscript:bn(me.NOSCRIPT,c,o),script:bn(me.SCRIPT,u,o),style:bn(me.STYLE,h,o),title:bn(me.TITLE,{title:m,titleAttributes:g},o)}},g5=function(n){var r,a;return a=r=(function(o){e5(i,o);function i(){return X_(this,i),t5(this,o.apply(this,arguments))}return i.prototype.shouldComponentUpdate=function(l){return!B_(this.props,l)},i.prototype.mapNestedChildrenToProps=function(l,c){if(!c)return null;switch(l.type){case me.SCRIPT:case me.NOSCRIPT:return{innerHTML:c};case me.STYLE:return{cssText:c}}throw new Error("<"+l.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},i.prototype.flattenArrayTypeChildren=function(l){var c,u=l.child,h=l.arrayTypeChildren,f=l.newChildProps,m=l.nestedChildren;return yt({},h,(c={},c[u.type]=[].concat(h[u.type]||[],[yt({},f,this.mapNestedChildrenToProps(u,m))]),c))},i.prototype.mapObjectTypeChildren=function(l){var c,u,h=l.child,f=l.newProps,m=l.newChildProps,g=l.nestedChildren;switch(h.type){case me.TITLE:return yt({},f,(c={},c[h.type]=g,c.titleAttributes=yt({},m),c));case me.BODY:return yt({},f,{bodyAttributes:yt({},m)});case me.HTML:return yt({},f,{htmlAttributes:yt({},m)})}return yt({},f,(u={},u[h.type]=yt({},m),u))},i.prototype.mapArrayTypeChildrenToProps=function(l,c){var u=yt({},c);return Object.keys(l).forEach(function(h){var f;u=yt({},u,(f={},f[h]=l[h],f))}),u},i.prototype.warnOnInvalidChildren=function(l,c){return!0},i.prototype.mapChildrenToProps=function(l,c){var u=this,h={};return pe.Children.forEach(l,function(f){if(!(!f||!f.props)){var m=f.props,g=m.children,y=vf(m,["children"]),v=h5(y);switch(u.warnOnInvalidChildren(f,g),f.type){case me.LINK:case me.META:case me.NOSCRIPT:case me.SCRIPT:case me.STYLE:h=u.flattenArrayTypeChildren({child:f,arrayTypeChildren:h,newChildProps:v,nestedChildren:g});break;default:c=u.mapObjectTypeChildren({child:f,newProps:c,newChildProps:v,nestedChildren:g});break}}}),c=this.mapArrayTypeChildrenToProps(h,c),c},i.prototype.render=function(){var l=this.props,c=l.children,u=vf(l,["children"]),h=yt({},u);return c&&(h=this.mapChildrenToProps(c,h)),pe.createElement(n,h)},J_(i,null,[{key:"canUseDOM",set:function(l){n.canUseDOM=l}}]),i})(pe.Component),r.propTypes={base:D.object,bodyAttributes:D.object,children:D.oneOfType([D.arrayOf(D.node),D.node]),defaultTitle:D.string,defer:D.bool,encodeSpecialCharacters:D.bool,htmlAttributes:D.object,link:D.arrayOf(D.object),meta:D.arrayOf(D.object),noscript:D.arrayOf(D.object),onChangeClientState:D.func,script:D.arrayOf(D.object),style:D.arrayOf(D.object),title:D.string,titleAttributes:D.object,titleTemplate:D.string},r.defaultProps={defer:!0,encodeSpecialCharacters:!0},r.peek=n.peek,r.rewind=function(){var o=n.rewind();return o||(o=yg({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),o},a},y5=function(){return null},v5=U_(o5,c5,yg)(y5),Zl=g5(v5);Zl.renderStatic=Zl.rewind;function pt({title:e,variant:n="default",description:r,headerRight:a,children:o}){return p.jsxs(p.Fragment,{children:[p.jsx(Zl,{children:p.jsx("title",{children:e?`${e} | Ocean Brain`:"Ocean Brain"})}),n==="default"&&p.jsx("div",{className:"mb-4 pb-3 border-b-2 border-border",children:p.jsxs("div",{className:a?"flex items-center justify-between":void 0,children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-lg font-bold",children:e}),r&&p.jsx("p",{className:"text-sm text-fg-tertiary font-medium mt-1",children:r})]}),a]})}),n==="subtle"&&p.jsx("div",{className:"mb-6",children:p.jsxs("div",{className:a?"flex items-center justify-between":void 0,children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-lg font-bold",children:e}),r&&p.jsx("p",{className:"text-sm text-fg-tertiary font-medium mt-1",children:r})]}),a]})}),o]})}function x5({itemsPerPage:e,onItemsPerPageChange:n,isAutoLimit:r=!1,sortBy:a,onSortByChange:o,sortOrder:i,onSortOrderChange:s,pinnedFirst:l,onPinnedFirstChange:c}){return p.jsx("div",{className:"flex justify-end mb-4",children:p.jsxs("div",{className:"inline-flex flex-wrap gap-3 items-center px-4 py-2.5 bg-surface border-2 border-border rounded-sketchy-lg shadow-sketchy",children:[p.jsxs("div",{className:"flex gap-1.5 items-center",children:[p.jsx(Gc,{fontSize:24,className:"min-w-8 text-fg-tertiary"}),p.jsxs(mi,{value:r?"auto":String(e),onValueChange:u=>{u!=="auto"&&n(Number(u))},variant:"ghost",size:"sm",children:[r&&p.jsxs(An,{value:"auto",children:["Auto (",e,")"]}),p.jsx(An,{value:"25",children:"25"}),p.jsx(An,{value:"50",children:"50"}),p.jsx(An,{value:"100",children:"100"})]})]}),p.jsx("div",{className:"w-px h-5 bg-divider"}),p.jsxs("div",{className:"flex gap-1.5 items-center",children:[p.jsx(S1,{fontSize:24,className:"min-w-8 text-fg-tertiary"}),p.jsxs(mi,{value:a,onValueChange:u=>o(u),variant:"ghost",size:"sm",children:[p.jsx(An,{value:"updatedAt",children:"Updated"}),p.jsx(An,{value:"createdAt",children:"Created"})]}),p.jsxs(mi,{value:i,onValueChange:u=>s(u),variant:"ghost",size:"sm",children:[p.jsx(An,{value:"desc",children:"Newest"}),p.jsx(An,{value:"asc",children:"Oldest"})]})]}),p.jsx("div",{className:"w-px h-5 bg-divider"}),p.jsxs(Gn,{htmlFor:"pinnedFirst",size:"sm",className:"flex items-center gap-1.5 cursor-pointer",children:[p.jsx(ou,{id:"pinnedFirst",size:"sm",checked:l,onChange:u=>c(u.target.checked)}),p.jsx("span",{className:"text-fg-secondary",children:"Pinned First"})]})]})})}const b5=e=>{let n=!1;return()=>{n||(window.requestAnimationFrame(()=>{e(),n=!1}),n=!0)}},tl=new Map;function w5(){const e=gn(),n=d.useRef(null);return d.useEffect(()=>{if(n.current?.parentElement){const{parentElement:r}=n.current,a=s=>{if(s!==0){tl.set(e.pathname,s);return}tl.delete(e.pathname)},o=b5(()=>{if(n.current){const{scrollTop:s}=r;a(s)}}),i=tl.get(e.pathname);return i&&(r.scrollTop=i),r.addEventListener("scroll",o),()=>{r.removeEventListener("scroll",o)}}},[n,e]),p.jsx("div",{ref:n,style:{display:"none"}})}function _5(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return d.useMemo(()=>a=>{n.forEach(o=>o(a))},n)}const ys=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function la(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function Au(e){return"nodeType"in e}function wt(e){var n,r;return e?la(e)?e:Au(e)&&(n=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?n:window:window}function Ru(e){const{Document:n}=wt(e);return e instanceof n}function Ro(e){return la(e)?!1:e instanceof wt(e).HTMLElement}function vg(e){return e instanceof wt(e).SVGElement}function ca(e){return e?la(e)?e.document:Au(e)?Ru(e)?e:Ro(e)||vg(e)?e.ownerDocument:document:document:document}const pn=ys?d.useLayoutEffect:d.useEffect;function Mu(e){const n=d.useRef(e);return pn(()=>{n.current=e}),d.useCallback(function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n.current==null?void 0:n.current(...a)},[])}function E5(){const e=d.useRef(null),n=d.useCallback((a,o)=>{e.current=setInterval(a,o)},[]),r=d.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,r]}function ro(e,n){n===void 0&&(n=[e]);const r=d.useRef(e);return pn(()=>{r.current!==e&&(r.current=e)},n),r}function Mo(e,n){const r=d.useRef();return d.useMemo(()=>{const a=e(r.current);return r.current=a,a},[...n])}function Li(e){const n=Mu(e),r=d.useRef(null),a=d.useCallback(o=>{o!==r.current&&n?.(o,r.current),r.current=o},[]);return[r,a]}function Bl(e){const n=d.useRef();return d.useEffect(()=>{n.current=e},[e]),n.current}let nl={};function To(e,n){return d.useMemo(()=>{if(n)return n;const r=nl[e]==null?0:nl[e]+1;return nl[e]=r,e+"-"+r},[e,n])}function xg(e){return function(n){for(var r=arguments.length,a=new Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];return a.reduce((i,s)=>{const l=Object.entries(s);for(const[c,u]of l){const h=i[c];h!=null&&(i[c]=h+e*u)}return i},{...n})}}const Wr=xg(1),ao=xg(-1);function C5(e){return"clientX"in e&&"clientY"in e}function Tu(e){if(!e)return!1;const{KeyboardEvent:n}=wt(e.target);return n&&e instanceof n}function S5(e){if(!e)return!1;const{TouchEvent:n}=wt(e.target);return n&&e instanceof n}function ql(e){if(S5(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:r}=e.touches[0];return{x:n,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:r}=e.changedTouches[0];return{x:n,y:r}}}return C5(e)?{x:e.clientX,y:e.clientY}:null}const oo=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:r}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:r}=e;return"scaleX("+n+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[oo.Translate.toString(e),oo.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:r,easing:a}=e;return n+" "+r+"ms "+a}}}),wf="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function A5(e){return e.matches(wf)?e:e.querySelector(wf)}const R5={display:"none"};function M5(e){let{id:n,value:r}=e;return pe.createElement("div",{id:n,style:R5},r)}function T5(e){let{id:n,announcement:r,ariaLiveType:a="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 pe.createElement("div",{id:n,style:o,role:"status","aria-live":a,"aria-atomic":!0},r)}function P5(){const[e,n]=d.useState("");return{announce:d.useCallback(a=>{a!=null&&n(a)},[]),announcement:e}}const bg=d.createContext(null);function N5(e){const n=d.useContext(bg);d.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of <DndContext>");return n(e)},[e,n])}function O5(){const[e]=d.useState(()=>new Set),n=d.useCallback(a=>(e.add(a),()=>e.delete(a)),[e]);return[d.useCallback(a=>{let{type:o,event:i}=a;e.forEach(s=>{var l;return(l=s[o])==null?void 0:l.call(s,i)})},[e]),n]}const j5={draggable:`
16
+ To pick up a draggable item, press the space bar.
17
+ While dragging, use the arrow keys to move the item.
18
+ Press space again to drop the item in its new position, or press escape to cancel.
19
+ `},D5={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:r}=e;return r?"Draggable item "+n.id+" was moved over droppable area "+r.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:r}=e;return r?"Draggable item "+n.id+" was dropped over droppable area "+r.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function k5(e){let{announcements:n=D5,container:r,hiddenTextDescribedById:a,screenReaderInstructions:o=j5}=e;const{announce:i,announcement:s}=P5(),l=To("DndLiveRegion"),[c,u]=d.useState(!1);if(d.useEffect(()=>{u(!0)},[]),N5(d.useMemo(()=>({onDragStart(f){let{active:m}=f;i(n.onDragStart({active:m}))},onDragMove(f){let{active:m,over:g}=f;n.onDragMove&&i(n.onDragMove({active:m,over:g}))},onDragOver(f){let{active:m,over:g}=f;i(n.onDragOver({active:m,over:g}))},onDragEnd(f){let{active:m,over:g}=f;i(n.onDragEnd({active:m,over:g}))},onDragCancel(f){let{active:m,over:g}=f;i(n.onDragCancel({active:m,over:g}))}}),[i,n])),!c)return null;const h=pe.createElement(pe.Fragment,null,pe.createElement(M5,{id:a,value:o.draggable}),pe.createElement(T5,{id:l,announcement:s}));return r?Mn.createPortal(h,r):h}var qe;(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"})(qe||(qe={}));function Fi(){}function _f(e,n){return d.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function I5(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return d.useMemo(()=>[...n].filter(a=>a!=null),[...n])}const qt=Object.freeze({x:0,y:0});function wg(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function _g(e,n){let{data:{value:r}}=e,{data:{value:a}}=n;return r-a}function L5(e,n){let{data:{value:r}}=e,{data:{value:a}}=n;return a-r}function Ef(e){let{left:n,top:r,height:a,width:o}=e;return[{x:n,y:r},{x:n+o,y:r},{x:n,y:r+a},{x:n+o,y:r+a}]}function Eg(e,n){if(!e||e.length===0)return null;const[r]=e;return r[n]}function Cf(e,n,r){return n===void 0&&(n=e.left),r===void 0&&(r=e.top),{x:n+e.width*.5,y:r+e.height*.5}}const F5=e=>{let{collisionRect:n,droppableRects:r,droppableContainers:a}=e;const o=Cf(n,n.left,n.top),i=[];for(const s of a){const{id:l}=s,c=r.get(l);if(c){const u=wg(Cf(c),o);i.push({id:l,data:{droppableContainer:s,value:u}})}}return i.sort(_g)},$5=e=>{let{collisionRect:n,droppableRects:r,droppableContainers:a}=e;const o=Ef(n),i=[];for(const s of a){const{id:l}=s,c=r.get(l);if(c){const u=Ef(c),h=o.reduce((m,g,y)=>m+wg(u[y],g),0),f=Number((h/4).toFixed(4));i.push({id:l,data:{droppableContainer:s,value:f}})}}return i.sort(_g)};function H5(e,n){const r=Math.max(n.top,e.top),a=Math.max(n.left,e.left),o=Math.min(n.left+n.width,e.left+e.width),i=Math.min(n.top+n.height,e.top+e.height),s=o-a,l=i-r;if(a<o&&r<i){const c=n.width*n.height,u=e.width*e.height,h=s*l,f=h/(c+u-h);return Number(f.toFixed(4))}return 0}const z5=e=>{let{collisionRect:n,droppableRects:r,droppableContainers:a}=e;const o=[];for(const i of a){const{id:s}=i,l=r.get(s);if(l){const c=H5(l,n);c>0&&o.push({id:s,data:{droppableContainer:i,value:c}})}}return o.sort(L5)};function U5(e,n,r){return{...e,scaleX:n&&r?n.width/r.width:1,scaleY:n&&r?n.height/r.height:1}}function Cg(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:qt}function V5(e){return function(r){for(var a=arguments.length,o=new Array(a>1?a-1:0),i=1;i<a;i++)o[i-1]=arguments[i];return o.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...r})}}const Z5=V5(1);function B5(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function q5(e,n,r){const a=B5(n);if(!a)return e;const{scaleX:o,scaleY:i,x:s,y:l}=a,c=e.left-s-(1-o)*parseFloat(r),u=e.top-l-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),h=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:h,height:f,top:u,right:c+h,bottom:u+f,left:c}}const W5={ignoreTransform:!1};function ua(e,n){n===void 0&&(n=W5);let r=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:u,transformOrigin:h}=wt(e).getComputedStyle(e);u&&(r=q5(r,u,h))}const{top:a,left:o,width:i,height:s,bottom:l,right:c}=r;return{top:a,left:o,width:i,height:s,bottom:l,right:c}}function Sf(e){return ua(e,{ignoreTransform:!0})}function G5(e){const n=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:n,bottom:r,width:n,height:r}}function K5(e,n){return n===void 0&&(n=wt(e).getComputedStyle(e)),n.position==="fixed"}function Y5(e,n){n===void 0&&(n=wt(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=n[o];return typeof i=="string"?r.test(i):!1})}function vs(e,n){const r=[];function a(o){if(n!=null&&r.length>=n||!o)return r;if(Ru(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!Ro(o)||vg(o)||r.includes(o))return r;const i=wt(e).getComputedStyle(o);return o!==e&&Y5(o,i)&&r.push(o),K5(o,i)?r:a(o.parentNode)}return e?a(e):r}function Sg(e){const[n]=vs(e,1);return n??null}function rl(e){return!ys||!e?null:la(e)?e:Au(e)?Ru(e)||e===ca(e).scrollingElement?window:Ro(e)?e:null:null}function Ag(e){return la(e)?e.scrollX:e.scrollLeft}function Rg(e){return la(e)?e.scrollY:e.scrollTop}function Wl(e){return{x:Ag(e),y:Rg(e)}}var Qe;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Qe||(Qe={}));function Mg(e){return!ys||!e?!1:e===document.scrollingElement}function Tg(e){const n={x:0,y:0},r=Mg(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},a={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=n.y,i=e.scrollLeft<=n.x,s=e.scrollTop>=a.y,l=e.scrollLeft>=a.x;return{isTop:o,isLeft:i,isBottom:s,isRight:l,maxScroll:a,minScroll:n}}const Q5={x:.2,y:.2};function X5(e,n,r,a,o){let{top:i,left:s,right:l,bottom:c}=r;a===void 0&&(a=10),o===void 0&&(o=Q5);const{isTop:u,isBottom:h,isLeft:f,isRight:m}=Tg(e),g={x:0,y:0},y={x:0,y:0},v={height:n.height*o.y,width:n.width*o.x};return!u&&i<=n.top+v.height?(g.y=Qe.Backward,y.y=a*Math.abs((n.top+v.height-i)/v.height)):!h&&c>=n.bottom-v.height&&(g.y=Qe.Forward,y.y=a*Math.abs((n.bottom-v.height-c)/v.height)),!m&&l>=n.right-v.width?(g.x=Qe.Forward,y.x=a*Math.abs((n.right-v.width-l)/v.width)):!f&&s<=n.left+v.width&&(g.x=Qe.Backward,y.x=a*Math.abs((n.left+v.width-s)/v.width)),{direction:g,speed:y}}function J5(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:n,left:r,right:a,bottom:o}=e.getBoundingClientRect();return{top:n,left:r,right:a,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Pg(e){return e.reduce((n,r)=>Wr(n,Wl(r)),qt)}function eE(e){return e.reduce((n,r)=>n+Ag(r),0)}function tE(e){return e.reduce((n,r)=>n+Rg(r),0)}function nE(e,n){if(n===void 0&&(n=ua),!e)return;const{top:r,left:a,bottom:o,right:i}=n(e);Sg(e)&&(o<=0||i<=0||r>=window.innerHeight||a>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const rE=[["x",["left","right"],eE],["y",["top","bottom"],tE]];class Pu{constructor(n,r){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 a=vs(r),o=Pg(a);this.rect={...n},this.width=n.width,this.height=n.height;for(const[i,s,l]of rE)for(const c of s)Object.defineProperty(this,c,{get:()=>{const u=l(a),h=o[i]-u;return this.rect[c]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class za{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var a;return(a=this.target)==null?void 0:a.removeEventListener(...r)})},this.target=n}add(n,r,a){var o;(o=this.target)==null||o.addEventListener(n,r,a),this.listeners.push([n,r,a])}}function aE(e){const{EventTarget:n}=wt(e);return e instanceof n?e:ca(e)}function al(e,n){const r=Math.abs(e.x),a=Math.abs(e.y);return typeof n=="number"?Math.sqrt(r**2+a**2)>n:"x"in n&&"y"in n?r>n.x&&a>n.y:"x"in n?r>n.x:"y"in n?a>n.y:!1}var Dt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Dt||(Dt={}));function Af(e){e.preventDefault()}function oE(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 Ng={start:[we.Space,we.Enter],cancel:[we.Esc],end:[we.Space,we.Enter,we.Tab]},iE=(e,n)=>{let{currentCoordinates:r}=n;switch(e.code){case we.Right:return{...r,x:r.x+25};case we.Left:return{...r,x:r.x-25};case we.Down:return{...r,y:r.y+25};case we.Up:return{...r,y:r.y-25}}};class Nu{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:r}}=n;this.props=n,this.listeners=new za(ca(r)),this.windowListeners=new za(wt(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Dt.Resize,this.handleCancel),this.windowListeners.add(Dt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Dt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:r}=this.props,a=n.node.current;a&&nE(a),r(qt)}handleKeyDown(n){if(Tu(n)){const{active:r,context:a,options:o}=this.props,{keyboardCodes:i=Ng,coordinateGetter:s=iE,scrollBehavior:l="smooth"}=o,{code:c}=n;if(i.end.includes(c)){this.handleEnd(n);return}if(i.cancel.includes(c)){this.handleCancel(n);return}const{collisionRect:u}=a.current,h=u?{x:u.left,y:u.top}:qt;this.referenceCoordinates||(this.referenceCoordinates=h);const f=s(n,{active:r,context:a.current,currentCoordinates:h});if(f){const m=ao(f,h),g={x:0,y:0},{scrollableAncestors:y}=a.current;for(const v of y){const b=n.code,{isTop:x,isRight:w,isLeft:E,isBottom:C,maxScroll:S,minScroll:M}=Tg(v),_=J5(v),A={x:Math.min(b===we.Right?_.right-_.width/2:_.right,Math.max(b===we.Right?_.left:_.left+_.width/2,f.x)),y:Math.min(b===we.Down?_.bottom-_.height/2:_.bottom,Math.max(b===we.Down?_.top:_.top+_.height/2,f.y))},j=b===we.Right&&!w||b===we.Left&&!E,P=b===we.Down&&!C||b===we.Up&&!x;if(j&&A.x!==f.x){const O=v.scrollLeft+m.x,H=b===we.Right&&O<=S.x||b===we.Left&&O>=M.x;if(H&&!m.y){v.scrollTo({left:O,behavior:l});return}H?g.x=v.scrollLeft-O:g.x=b===we.Right?v.scrollLeft-S.x:v.scrollLeft-M.x,g.x&&v.scrollBy({left:-g.x,behavior:l});break}else if(P&&A.y!==f.y){const O=v.scrollTop+m.y,H=b===we.Down&&O<=S.y||b===we.Up&&O>=M.y;if(H&&!m.x){v.scrollTo({top:O,behavior:l});return}H?g.y=v.scrollTop-O:g.y=b===we.Down?v.scrollTop-S.y:v.scrollTop-M.y,g.y&&v.scrollBy({top:-g.y,behavior:l});break}}this.handleMove(n,Wr(ao(f,this.referenceCoordinates),g))}}}handleMove(n,r){const{onMove:a}=this.props;n.preventDefault(),a(r)}handleEnd(n){const{onEnd:r}=this.props;n.preventDefault(),this.detach(),r()}handleCancel(n){const{onCancel:r}=this.props;n.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Nu.activators=[{eventName:"onKeyDown",handler:(e,n,r)=>{let{keyboardCodes:a=Ng,onActivation:o}=n,{active:i}=r;const{code:s}=e.nativeEvent;if(a.start.includes(s)){const l=i.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function Rf(e){return!!(e&&"distance"in e)}function Mf(e){return!!(e&&"delay"in e)}class Ou{constructor(n,r,a){var o;a===void 0&&(a=aE(n.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=n,this.events=r;const{event:i}=n,{target:s}=i;this.props=n,this.events=r,this.document=ca(s),this.documentListeners=new za(this.document),this.listeners=new za(a),this.windowListeners=new za(wt(s)),this.initialCoordinates=(o=ql(i))!=null?o:qt,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:n,props:{options:{activationConstraint:r,bypassActivationConstraint:a}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(Dt.Resize,this.handleCancel),this.windowListeners.add(Dt.DragStart,Af),this.windowListeners.add(Dt.VisibilityChange,this.handleCancel),this.windowListeners.add(Dt.ContextMenu,Af),this.documentListeners.add(Dt.Keydown,this.handleKeydown),r){if(a!=null&&a({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Mf(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(Rf(r)){this.handlePending(r);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(n,r){const{active:a,onPending:o}=this.props;o(a,n,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:n}=this,{onStart:r}=this.props;n&&(this.activated=!0,this.documentListeners.add(Dt.Click,oE,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Dt.SelectionChange,this.removeTextSelection),r(n))}handleMove(n){var r;const{activated:a,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:l}}=i;if(!o)return;const c=(r=ql(n))!=null?r:qt,u=ao(o,c);if(!a&&l){if(Rf(l)){if(l.tolerance!=null&&al(u,l.tolerance))return this.handleCancel();if(al(u,l.distance))return this.handleStart()}if(Mf(l)&&al(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}n.cancelable&&n.preventDefault(),s(c)}handleEnd(){const{onAbort:n,onEnd:r}=this.props;this.detach(),this.activated||n(this.props.active),r()}handleCancel(){const{onAbort:n,onCancel:r}=this.props;this.detach(),this.activated||n(this.props.active),r()}handleKeydown(n){n.code===we.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const sE={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ju extends Ou{constructor(n){const{event:r}=n,a=ca(r.target);super(n,sE,a)}}ju.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:r}=e,{onActivation:a}=n;return!r.isPrimary||r.button!==0?!1:(a?.({event:r}),!0)}}];const lE={move:{name:"mousemove"},end:{name:"mouseup"}};var Gl;(function(e){e[e.RightClick=2]="RightClick"})(Gl||(Gl={}));class cE extends Ou{constructor(n){super(n,lE,ca(n.event.target))}}cE.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:r}=e,{onActivation:a}=n;return r.button===Gl.RightClick?!1:(a?.({event:r}),!0)}}];const ol={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class uE extends Ou{constructor(n){super(n,ol)}static setup(){return window.addEventListener(ol.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(ol.move.name,n)};function n(){}}}uE.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:r}=e,{onActivation:a}=n;const{touches:o}=r;return o.length>1?!1:(a?.({event:r}),!0)}}];var Ua;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ua||(Ua={}));var $i;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})($i||($i={}));function dE(e){let{acceleration:n,activator:r=Ua.Pointer,canScroll:a,draggingRect:o,enabled:i,interval:s=5,order:l=$i.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:h,delta:f,threshold:m}=e;const g=hE({delta:f,disabled:!i}),[y,v]=E5(),b=d.useRef({x:0,y:0}),x=d.useRef({x:0,y:0}),w=d.useMemo(()=>{switch(r){case Ua.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ua.DraggableRect:return o}},[r,o,c]),E=d.useRef(null),C=d.useCallback(()=>{const M=E.current;if(!M)return;const _=b.current.x*x.current.x,A=b.current.y*x.current.y;M.scrollBy(_,A)},[]),S=d.useMemo(()=>l===$i.TreeOrder?[...u].reverse():u,[l,u]);d.useEffect(()=>{if(!i||!u.length||!w){v();return}for(const M of S){if(a?.(M)===!1)continue;const _=u.indexOf(M),A=h[_];if(!A)continue;const{direction:j,speed:P}=X5(M,A,w,n,m);for(const O of["x","y"])g[O][j[O]]||(P[O]=0,j[O]=0);if(P.x>0||P.y>0){v(),E.current=M,y(C,s),b.current=P,x.current=j;return}}b.current={x:0,y:0},x.current={x:0,y:0},v()},[n,C,a,v,i,s,JSON.stringify(w),JSON.stringify(g),y,u,S,h,JSON.stringify(m)])}const fE={x:{[Qe.Backward]:!1,[Qe.Forward]:!1},y:{[Qe.Backward]:!1,[Qe.Forward]:!1}};function hE(e){let{delta:n,disabled:r}=e;const a=Bl(n);return Mo(o=>{if(r||!a||!o)return fE;const i={x:Math.sign(n.x-a.x),y:Math.sign(n.y-a.y)};return{x:{[Qe.Backward]:o.x[Qe.Backward]||i.x===-1,[Qe.Forward]:o.x[Qe.Forward]||i.x===1},y:{[Qe.Backward]:o.y[Qe.Backward]||i.y===-1,[Qe.Forward]:o.y[Qe.Forward]||i.y===1}}},[r,n,a])}function pE(e,n){const r=n!=null?e.get(n):void 0,a=r?r.node.current:null;return Mo(o=>{var i;return n==null?null:(i=a??o)!=null?i:null},[a,n])}function mE(e,n){return d.useMemo(()=>e.reduce((r,a)=>{const{sensor:o}=a,i=o.activators.map(s=>({eventName:s.eventName,handler:n(s.handler,a)}));return[...r,...i]},[]),[e,n])}var io;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(io||(io={}));var Kl;(function(e){e.Optimized="optimized"})(Kl||(Kl={}));const Tf=new Map;function gE(e,n){let{dragging:r,dependencies:a,config:o}=n;const[i,s]=d.useState(null),{frequency:l,measure:c,strategy:u}=o,h=d.useRef(e),f=b(),m=ro(f),g=d.useCallback(function(x){x===void 0&&(x=[]),!m.current&&s(w=>w===null?x:w.concat(x.filter(E=>!w.includes(E))))},[m]),y=d.useRef(null),v=Mo(x=>{if(f&&!r)return Tf;if(!x||x===Tf||h.current!==e||i!=null){const w=new Map;for(let E of e){if(!E)continue;if(i&&i.length>0&&!i.includes(E.id)&&E.rect.current){w.set(E.id,E.rect.current);continue}const C=E.node.current,S=C?new Pu(c(C),C):null;E.rect.current=S,S&&w.set(E.id,S)}return w}return x},[e,i,r,f,c]);return d.useEffect(()=>{h.current=e},[e]),d.useEffect(()=>{f||g()},[r,f]),d.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),d.useEffect(()=>{f||typeof l!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},l))},[l,f,g,...a]),{droppableRects:v,measureDroppableContainers:g,measuringScheduled:i!=null};function b(){switch(u){case io.Always:return!1;case io.BeforeDragging:return r;default:return!r}}}function Og(e,n){return Mo(r=>e?r||(typeof n=="function"?n(e):e):null,[n,e])}function yE(e,n){return Og(e,n)}function vE(e){let{callback:n,disabled:r}=e;const a=Mu(n),o=d.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(a)},[a,r]);return d.useEffect(()=>()=>o?.disconnect(),[o]),o}function xs(e){let{callback:n,disabled:r}=e;const a=Mu(n),o=d.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(a)},[r]);return d.useEffect(()=>()=>o?.disconnect(),[o]),o}function xE(e){return new Pu(ua(e),e)}function Pf(e,n,r){n===void 0&&(n=xE);const[a,o]=d.useState(null);function i(){o(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??r)!=null?u:null}const h=n(e);return JSON.stringify(c)===JSON.stringify(h)?c:h})}const s=vE({callback(c){if(e)for(const u of c){const{type:h,target:f}=u;if(h==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),l=xs({callback:i});return pn(()=>{i(),e?(l?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(l?.disconnect(),s?.disconnect())},[e]),a}function bE(e){const n=Og(e);return Cg(e,n)}const Nf=[];function wE(e){const n=d.useRef(e),r=Mo(a=>e?a&&a!==Nf&&e&&n.current&&e.parentNode===n.current.parentNode?a:vs(e):Nf,[e]);return d.useEffect(()=>{n.current=e},[e]),r}function _E(e){const[n,r]=d.useState(null),a=d.useRef(e),o=d.useCallback(i=>{const s=rl(i.target);s&&r(l=>l?(l.set(s,Wl(s)),new Map(l)):null)},[]);return d.useEffect(()=>{const i=a.current;if(e!==i){s(i);const l=e.map(c=>{const u=rl(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,Wl(u)]):null}).filter(c=>c!=null);r(l.length?new Map(l):null),a.current=e}return()=>{s(e),s(i)};function s(l){l.forEach(c=>{const u=rl(c);u?.removeEventListener("scroll",o)})}},[o,e]),d.useMemo(()=>e.length?n?Array.from(n.values()).reduce((i,s)=>Wr(i,s),qt):Pg(e):qt,[e,n])}function Of(e,n){n===void 0&&(n=[]);const r=d.useRef(null);return d.useEffect(()=>{r.current=null},n),d.useEffect(()=>{const a=e!==qt;a&&!r.current&&(r.current=e),!a&&r.current&&(r.current=null)},[e]),r.current?ao(e,r.current):qt}function EE(e){d.useEffect(()=>{if(!ys)return;const n=e.map(r=>{let{sensor:a}=r;return a.setup==null?void 0:a.setup()});return()=>{for(const r of n)r?.()}},e.map(n=>{let{sensor:r}=n;return r}))}function CE(e,n){return d.useMemo(()=>e.reduce((r,a)=>{let{eventName:o,handler:i}=a;return r[o]=s=>{i(s,n)},r},{}),[e,n])}function jg(e){return d.useMemo(()=>e?G5(e):null,[e])}const jf=[];function SE(e,n){n===void 0&&(n=ua);const[r]=e,a=jg(r?wt(r):null),[o,i]=d.useState(jf);function s(){i(()=>e.length?e.map(c=>Mg(c)?a:new Pu(n(c),c)):jf)}const l=xs({callback:s});return pn(()=>{l?.disconnect(),s(),e.forEach(c=>l?.observe(c))},[e]),o}function AE(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Ro(n)?n:e}function RE(e){let{measure:n}=e;const[r,a]=d.useState(null),o=d.useCallback(u=>{for(const{target:h}of u)if(Ro(h)){a(f=>{const m=n(h);return f?{...f,width:m.width,height:m.height}:m});break}},[n]),i=xs({callback:o}),s=d.useCallback(u=>{const h=AE(u);i?.disconnect(),h&&i?.observe(h),a(h?n(h):null)},[n,i]),[l,c]=Li(s);return d.useMemo(()=>({nodeRef:l,rect:r,setRef:c}),[r,l,c])}const ME=[{sensor:ju,options:{}},{sensor:Nu,options:{}}],TE={current:{}},gi={draggable:{measure:Sf},droppable:{measure:Sf,strategy:io.WhileDragging,frequency:Kl.Optimized},dragOverlay:{measure:ua}};class Va extends Map{get(n){var r;return n!=null&&(r=super.get(n))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:r}=n;return!r})}getNodeFor(n){var r,a;return(r=(a=this.get(n))==null?void 0:a.node.current)!=null?r:void 0}}const PE={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Va,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Fi},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:gi,measureDroppableContainers:Fi,windowRect:null,measuringScheduled:!1},NE={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Fi,draggableNodes:new Map,over:null,measureDroppableContainers:Fi},bs=d.createContext(NE),Dg=d.createContext(PE);function OE(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Va}}}function jE(e,n){switch(n.type){case qe.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case qe.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case qe.DragEnd:case qe.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case qe.RegisterDroppable:{const{element:r}=n,{id:a}=r,o=new Va(e.droppable.containers);return o.set(a,r),{...e,droppable:{...e.droppable,containers:o}}}case qe.SetDroppableDisabled:{const{id:r,key:a,disabled:o}=n,i=e.droppable.containers.get(r);if(!i||a!==i.key)return e;const s=new Va(e.droppable.containers);return s.set(r,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case qe.UnregisterDroppable:{const{id:r,key:a}=n,o=e.droppable.containers.get(r);if(!o||a!==o.key)return e;const i=new Va(e.droppable.containers);return i.delete(r),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function DE(e){let{disabled:n}=e;const{active:r,activatorEvent:a,draggableNodes:o}=d.useContext(bs),i=Bl(a),s=Bl(r?.id);return d.useEffect(()=>{if(!n&&!a&&i&&s!=null){if(!Tu(i)||document.activeElement===i.target)return;const l=o.get(s);if(!l)return;const{activatorNode:c,node:u}=l;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const h of[c.current,u.current]){if(!h)continue;const f=A5(h);if(f){f.focus();break}}})}},[a,n,o,s,i]),null}function kE(e,n){let{transform:r,...a}=n;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...a}),r):r}function IE(e){return d.useMemo(()=>({draggable:{...gi.draggable,...e?.draggable},droppable:{...gi.droppable,...e?.droppable},dragOverlay:{...gi.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function LE(e){let{activeNode:n,measure:r,initialRect:a,config:o=!0}=e;const i=d.useRef(!1),{x:s,y:l}=typeof o=="boolean"?{x:o,y:o}:o;pn(()=>{if(!s&&!l||!n){i.current=!1;return}if(i.current||!a)return;const u=n?.node.current;if(!u||u.isConnected===!1)return;const h=r(u),f=Cg(h,a);if(s||(f.x=0),l||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const m=Sg(u);m&&m.scrollBy({top:f.y,left:f.x})}},[n,s,l,a,r])}const kg=d.createContext({...qt,scaleX:1,scaleY:1});var Un;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Un||(Un={}));const FE=d.memo(function(n){var r,a,o,i;let{id:s,accessibility:l,autoScroll:c=!0,children:u,sensors:h=ME,collisionDetection:f=z5,measuring:m,modifiers:g,...y}=n;const v=d.useReducer(jE,void 0,OE),[b,x]=v,[w,E]=O5(),[C,S]=d.useState(Un.Uninitialized),M=C===Un.Initialized,{draggable:{active:_,nodes:A,translate:j},droppable:{containers:P}}=b,O=_!=null?A.get(_):null,H=d.useRef({initial:null,translated:null}),Z=d.useMemo(()=>{var Ze;return _!=null?{id:_,data:(Ze=O?.data)!=null?Ze:TE,rect:H}:null},[_,O]),R=d.useRef(null),[k,T]=d.useState(null),[F,I]=d.useState(null),$=ro(y,Object.values(y)),V=To("DndDescribedBy",s),B=d.useMemo(()=>P.getEnabled(),[P]),q=IE(m),{droppableRects:X,measureDroppableContainers:Q,measuringScheduled:re}=gE(B,{dragging:M,dependencies:[j.x,j.y],config:q.droppable}),de=pE(A,_),G=d.useMemo(()=>F?ql(F):null,[F]),ie=Bo(),ye=yE(de,q.draggable.measure);LE({activeNode:_!=null?A.get(_):null,config:ie.layoutShiftCompensation,initialRect:ye,measure:q.draggable.measure});const J=Pf(de,q.draggable.measure,ye),ge=Pf(de?de.parentElement:null),ce=d.useRef({activatorEvent:null,active:null,activeNode:de,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Se=P.getNodeFor((r=ce.current.over)==null?void 0:r.id),Ve=RE({measure:q.dragOverlay.measure}),Rt=(a=Ve.nodeRef.current)!=null?a:de,Ge=M?(o=Ve.rect)!=null?o:J:null,Ln=!!(Ve.nodeRef.current&&Ve.rect),$o=bE(Ln?null:J),Tr=jg(Rt?wt(Rt):null),Qt=wE(M?Se??de:null),Pr=SE(Qt),Nr=kE(g,{transform:{x:j.x-$o.x,y:j.y-$o.y,scaleX:1,scaleY:1},activatorEvent:F,active:Z,activeNodeRect:J,containerNodeRect:ge,draggingNodeRect:Ge,over:ce.current.over,overlayNodeRect:Ve.rect,scrollableAncestors:Qt,scrollableAncestorRects:Pr,windowRect:Tr}),Ho=G?Wr(G,j):null,Xt=_E(Qt),ar=Of(Xt),zo=Of(Xt,[J]),Jt=Wr(Nr,ar),et=Ge?Z5(Ge,Nr):null,st=Z&&et?f({active:Z,collisionRect:et,droppableRects:X,droppableContainers:B,pointerCoordinates:Ho}):null,fa=Eg(st,"id"),[en,Or]=d.useState(null),Ds=Ln?Nr:Wr(Nr,zo),Ht=U5(Ds,(i=en?.rect)!=null?i:null,J),jr=d.useRef(null),ha=d.useCallback((Ze,lt)=>{let{sensor:tt,options:tn}=lt;if(R.current==null)return;const ct=A.get(R.current);if(!ct)return;const Ke=Ze.nativeEvent,ut=new tt({active:R.current,activeNode:ct,event:Ke,options:tn,context:ce,onAbort(Be){if(!A.get(Be))return;const{onDragAbort:N}=$.current,L={id:Be};N?.(L),w({type:"onDragAbort",event:L})},onPending(Be,nn,N,L){if(!A.get(Be))return;const{onDragPending:W}=$.current,K={id:Be,constraint:nn,initialCoordinates:N,offset:L};W?.(K),w({type:"onDragPending",event:K})},onStart(Be){const nn=R.current;if(nn==null)return;const N=A.get(nn);if(!N)return;const{onDragStart:L}=$.current,z={activatorEvent:Ke,active:{id:nn,data:N.data,rect:H}};Mn.unstable_batchedUpdates(()=>{L?.(z),S(Un.Initializing),x({type:qe.DragStart,initialCoordinates:Be,active:nn}),w({type:"onDragStart",event:z}),T(jr.current),I(Ke)})},onMove(Be){x({type:qe.DragMove,coordinates:Be})},onEnd:xn(qe.DragEnd),onCancel:xn(qe.DragCancel)});jr.current=ut;function xn(Be){return async function(){const{active:N,collisions:L,over:z,scrollAdjustedTranslate:W}=ce.current;let K=null;if(N&&W){const{cancelDrop:ne}=$.current;K={activatorEvent:Ke,active:N,collisions:L,delta:W,over:z},Be===qe.DragEnd&&typeof ne=="function"&&await Promise.resolve(ne(K))&&(Be=qe.DragCancel)}R.current=null,Mn.unstable_batchedUpdates(()=>{x({type:Be}),S(Un.Uninitialized),Or(null),T(null),I(null),jr.current=null;const ne=Be===qe.DragEnd?"onDragEnd":"onDragCancel";if(K){const ee=$.current[ne];ee?.(K),w({type:ne,event:K})}})}}},[A]),Uo=d.useCallback((Ze,lt)=>(tt,tn)=>{const ct=tt.nativeEvent,Ke=A.get(tn);if(R.current!==null||!Ke||ct.dndKit||ct.defaultPrevented)return;const ut={active:Ke};Ze(tt,lt.options,ut)===!0&&(ct.dndKit={capturedBy:lt.sensor},R.current=tn,ha(tt,lt))},[A,ha]),Vo=mE(h,Uo);EE(h),pn(()=>{J&&C===Un.Initializing&&S(Un.Initialized)},[J,C]),d.useEffect(()=>{const{onDragMove:Ze}=$.current,{active:lt,activatorEvent:tt,collisions:tn,over:ct}=ce.current;if(!lt||!tt)return;const Ke={active:lt,activatorEvent:tt,collisions:tn,delta:{x:Jt.x,y:Jt.y},over:ct};Mn.unstable_batchedUpdates(()=>{Ze?.(Ke),w({type:"onDragMove",event:Ke})})},[Jt.x,Jt.y]),d.useEffect(()=>{const{active:Ze,activatorEvent:lt,collisions:tt,droppableContainers:tn,scrollAdjustedTranslate:ct}=ce.current;if(!Ze||R.current==null||!lt||!ct)return;const{onDragOver:Ke}=$.current,ut=tn.get(fa),xn=ut&&ut.rect.current?{id:ut.id,rect:ut.rect.current,data:ut.data,disabled:ut.disabled}:null,Be={active:Ze,activatorEvent:lt,collisions:tt,delta:{x:ct.x,y:ct.y},over:xn};Mn.unstable_batchedUpdates(()=>{Or(xn),Ke?.(Be),w({type:"onDragOver",event:Be})})},[fa]),pn(()=>{ce.current={activatorEvent:F,active:Z,activeNode:de,collisionRect:et,collisions:st,droppableRects:X,draggableNodes:A,draggingNode:Rt,draggingNodeRect:Ge,droppableContainers:P,over:en,scrollableAncestors:Qt,scrollAdjustedTranslate:Jt},H.current={initial:Ge,translated:et}},[Z,de,st,et,A,Rt,Ge,X,P,en,Qt,Jt]),dE({...ie,delta:j,draggingRect:et,pointerCoordinates:Ho,scrollableAncestors:Qt,scrollableAncestorRects:Pr});const Zo=d.useMemo(()=>({active:Z,activeNode:de,activeNodeRect:J,activatorEvent:F,collisions:st,containerNodeRect:ge,dragOverlay:Ve,draggableNodes:A,droppableContainers:P,droppableRects:X,over:en,measureDroppableContainers:Q,scrollableAncestors:Qt,scrollableAncestorRects:Pr,measuringConfiguration:q,measuringScheduled:re,windowRect:Tr}),[Z,de,J,F,st,ge,Ve,A,P,X,en,Q,Qt,Pr,q,re,Tr]),Dr=d.useMemo(()=>({activatorEvent:F,activators:Vo,active:Z,activeNodeRect:J,ariaDescribedById:{draggable:V},dispatch:x,draggableNodes:A,over:en,measureDroppableContainers:Q}),[F,Vo,Z,J,x,V,A,en,Q]);return pe.createElement(bg.Provider,{value:E},pe.createElement(bs.Provider,{value:Dr},pe.createElement(Dg.Provider,{value:Zo},pe.createElement(kg.Provider,{value:Ht},u)),pe.createElement(DE,{disabled:l?.restoreFocus===!1})),pe.createElement(k5,{...l,hiddenTextDescribedById:V}));function Bo(){const Ze=k?.autoScrollEnabled===!1,lt=typeof c=="object"?c.enabled===!1:c===!1,tt=M&&!Ze&&!lt;return typeof c=="object"?{...c,enabled:tt}:{enabled:tt}}}),$E=d.createContext(null),Df="button",HE="Draggable";function zE(e){let{id:n,data:r,disabled:a=!1,attributes:o}=e;const i=To(HE),{activators:s,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:h,draggableNodes:f,over:m}=d.useContext(bs),{role:g=Df,roleDescription:y="draggable",tabIndex:v=0}=o??{},b=c?.id===n,x=d.useContext(b?kg:$E),[w,E]=Li(),[C,S]=Li(),M=CE(s,n),_=ro(r);pn(()=>(f.set(n,{id:n,key:i,node:w,activatorNode:C,data:_}),()=>{const j=f.get(n);j&&j.key===i&&f.delete(n)}),[f,n]);const A=d.useMemo(()=>({role:g,tabIndex:v,"aria-disabled":a,"aria-pressed":b&&g===Df?!0:void 0,"aria-roledescription":y,"aria-describedby":h.draggable}),[a,g,v,b,y,h.draggable]);return{active:c,activatorEvent:l,activeNodeRect:u,attributes:A,isDragging:b,listeners:a?void 0:M,node:w,over:m,setNodeRef:E,setActivatorNodeRef:S,transform:x}}function UE(){return d.useContext(Dg)}const VE="Droppable",ZE={timeout:25};function BE(e){let{data:n,disabled:r=!1,id:a,resizeObserverConfig:o}=e;const i=To(VE),{active:s,dispatch:l,over:c,measureDroppableContainers:u}=d.useContext(bs),h=d.useRef({disabled:r}),f=d.useRef(!1),m=d.useRef(null),g=d.useRef(null),{disabled:y,updateMeasurementsFor:v,timeout:b}={...ZE,...o},x=ro(v??a),w=d.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(x.current)?x.current:[x.current]),g.current=null},b)},[b]),E=xs({callback:w,disabled:y||!s}),C=d.useCallback((A,j)=>{E&&(j&&(E.unobserve(j),f.current=!1),A&&E.observe(A))},[E]),[S,M]=Li(C),_=ro(n);return d.useEffect(()=>{!E||!S.current||(E.disconnect(),f.current=!1,E.observe(S.current))},[S,E]),d.useEffect(()=>(l({type:qe.RegisterDroppable,element:{id:a,key:i,disabled:r,node:S,rect:m,data:_}}),()=>l({type:qe.UnregisterDroppable,key:i,id:a})),[a]),d.useEffect(()=>{r!==h.current.disabled&&(l({type:qe.SetDroppableDisabled,id:a,key:i,disabled:r}),h.current.disabled=r)},[a,i,r,l]),{active:s,rect:m,isOver:c?.id===a,node:S,over:c,setNodeRef:M}}function Du(e,n,r){const a=e.slice();return a.splice(r<0?a.length+r:r,0,a.splice(n,1)[0]),a}function qE(e,n){return e.reduce((r,a,o)=>{const i=n.get(a);return i&&(r[o]=i),r},Array(e.length))}function ni(e){return e!==null&&e>=0}function WE(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==n[r])return!1;return!0}function GE(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Ig=e=>{let{rects:n,activeIndex:r,overIndex:a,index:o}=e;const i=Du(n,a,r),s=n[o],l=i[o];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},ri={scaleX:1,scaleY:1},KE=e=>{var n;let{activeIndex:r,activeNodeRect:a,index:o,rects:i,overIndex:s}=e;const l=(n=i[r])!=null?n:a;if(!l)return null;if(o===r){const u=i[s];return u?{x:0,y:r<s?u.top+u.height-(l.top+l.height):u.top-l.top,...ri}:null}const c=YE(i,o,r);return o>r&&o<=s?{x:0,y:-l.height-c,...ri}:o<r&&o>=s?{x:0,y:l.height+c,...ri}:{x:0,y:0,...ri}};function YE(e,n,r){const a=e[n],o=e[n-1],i=e[n+1];return a?r<n?o?a.top-(o.top+o.height):i?i.top-(a.top+a.height):0:i?i.top-(a.top+a.height):o?a.top-(o.top+o.height):0:0}const Lg="Sortable",Fg=pe.createContext({activeIndex:-1,containerId:Lg,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ig,disabled:{draggable:!1,droppable:!1}});function QE(e){let{children:n,id:r,items:a,strategy:o=Ig,disabled:i=!1}=e;const{active:s,dragOverlay:l,droppableRects:c,over:u,measureDroppableContainers:h}=UE(),f=To(Lg,r),m=l.rect!==null,g=d.useMemo(()=>a.map(M=>typeof M=="object"&&"id"in M?M.id:M),[a]),y=s!=null,v=s?g.indexOf(s.id):-1,b=u?g.indexOf(u.id):-1,x=d.useRef(g),w=!WE(g,x.current),E=b!==-1&&v===-1||w,C=GE(i);pn(()=>{w&&y&&h(g)},[w,g,y,h]),d.useEffect(()=>{x.current=g},[g]);const S=d.useMemo(()=>({activeIndex:v,containerId:f,disabled:C,disableTransforms:E,items:g,overIndex:b,useDragOverlay:m,sortedRects:qE(g,c),strategy:o}),[v,f,C.draggable,C.droppable,E,g,b,c,m,o]);return pe.createElement(Fg.Provider,{value:S},n)}const XE=e=>{let{id:n,items:r,activeIndex:a,overIndex:o}=e;return Du(r,a,o).indexOf(n)},JE=e=>{let{containerId:n,isSorting:r,wasDragging:a,index:o,items:i,newIndex:s,previousItems:l,previousContainerId:c,transition:u}=e;return!u||!a||l!==i&&o===s?!1:r?!0:s!==o&&n===c},eC={duration:200,easing:"ease"},$g="transform",tC=oo.Transition.toString({property:$g,duration:0,easing:"linear"}),nC={roleDescription:"sortable"};function rC(e){let{disabled:n,index:r,node:a,rect:o}=e;const[i,s]=d.useState(null),l=d.useRef(r);return pn(()=>{if(!n&&r!==l.current&&a.current){const c=o.current;if(c){const u=ua(a.current,{ignoreTransform:!0}),h={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(h.x||h.y)&&s(h)}}r!==l.current&&(l.current=r)},[n,r,a,o]),d.useEffect(()=>{i&&s(null)},[i]),i}function aC(e){let{animateLayoutChanges:n=JE,attributes:r,disabled:a,data:o,getNewIndex:i=XE,id:s,strategy:l,resizeObserverConfig:c,transition:u=eC}=e;const{items:h,containerId:f,activeIndex:m,disabled:g,disableTransforms:y,sortedRects:v,overIndex:b,useDragOverlay:x,strategy:w}=d.useContext(Fg),E=oC(a,g),C=h.indexOf(s),S=d.useMemo(()=>({sortable:{containerId:f,index:C,items:h},...o}),[f,o,C,h]),M=d.useMemo(()=>h.slice(h.indexOf(s)),[h,s]),{rect:_,node:A,isOver:j,setNodeRef:P}=BE({id:s,data:S,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:M,...c}}),{active:O,activatorEvent:H,activeNodeRect:Z,attributes:R,setNodeRef:k,listeners:T,isDragging:F,over:I,setActivatorNodeRef:$,transform:V}=zE({id:s,data:S,attributes:{...nC,...r},disabled:E.draggable}),B=_5(P,k),q=!!O,X=q&&!y&&ni(m)&&ni(b),Q=!x&&F,re=Q&&X?V:null,G=X?re??(l??w)({rects:v,activeNodeRect:Z,activeIndex:m,overIndex:b,index:C}):null,ie=ni(m)&&ni(b)?i({id:s,items:h,activeIndex:m,overIndex:b}):C,ye=O?.id,J=d.useRef({activeId:ye,items:h,newIndex:ie,containerId:f}),ge=h!==J.current.items,ce=n({active:O,containerId:f,isDragging:F,isSorting:q,id:s,index:C,items:h,newIndex:J.current.newIndex,previousItems:J.current.items,previousContainerId:J.current.containerId,transition:u,wasDragging:J.current.activeId!=null}),Se=rC({disabled:!ce,index:C,node:A,rect:_});return d.useEffect(()=>{q&&J.current.newIndex!==ie&&(J.current.newIndex=ie),f!==J.current.containerId&&(J.current.containerId=f),h!==J.current.items&&(J.current.items=h)},[q,ie,f,h]),d.useEffect(()=>{if(ye===J.current.activeId)return;if(ye!=null&&J.current.activeId==null){J.current.activeId=ye;return}const Rt=setTimeout(()=>{J.current.activeId=ye},50);return()=>clearTimeout(Rt)},[ye]),{active:O,activeIndex:m,attributes:R,data:S,rect:_,index:C,newIndex:ie,items:h,isOver:j,isSorting:q,isDragging:F,listeners:T,node:A,overIndex:b,over:I,setNodeRef:B,setActivatorNodeRef:$,setDroppableNodeRef:P,setDraggableNodeRef:k,transform:Se??G,transition:Ve()};function Ve(){if(Se||ge&&J.current.newIndex===C)return tC;if(!(Q&&!Tu(H)||!u)&&(q||ce))return oo.Transition.toString({...u,property:$g})}}function oC(e,n){var r,a;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e?.draggable)!=null?r:n.draggable,droppable:(a=e?.droppable)!=null?a:n.droppable}}function Hi(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const iC=[we.Down,we.Right,we.Up,we.Left],sC=(e,n)=>{let{context:{active:r,collisionRect:a,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:l}}=n;if(iC.includes(e.code)){if(e.preventDefault(),!r||!a)return;const c=[];i.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const m=o.get(f.id);if(m)switch(e.code){case we.Down:a.top<m.top&&c.push(f);break;case we.Up:a.top>m.top&&c.push(f);break;case we.Left:a.left>m.left&&c.push(f);break;case we.Right:a.left<m.left&&c.push(f);break}});const u=$5({collisionRect:a,droppableRects:o,droppableContainers:c});let h=Eg(u,"id");if(h===s?.id&&u.length>1&&(h=u[1].id),h!=null){const f=i.get(r.id),m=i.get(h),g=m?o.get(m.id):null,y=m?.node.current;if(y&&g&&f&&m){const b=vs(y).some((M,_)=>l[_]!==M),x=Hg(f,m),w=lC(f,m),E=b||!x?{x:0,y:0}:{x:w?a.width-g.width:0,y:w?a.height-g.height:0},C={x:g.left,y:g.top};return E.x&&E.y?C:ao(C,E)}}}};function Hg(e,n){return!Hi(e)||!Hi(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function lC(e,n){return!Hi(e)||!Hi(n)||!Hg(e,n)?!1:e.data.current.sortable.index<n.data.current.sortable.index}const cC=e=>{let{transform:n}=e;return{...n,x:0}},zg=e=>{const[n,r]=d.useState(!1),a=d.useRef(null),o=d.useCallback(i=>{r(!0),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{i(),r(!1)},e)},[e]);return[n,o]};function Ug(e,n){return function(){return e.apply(n,arguments)}}const{toString:uC}=Object.prototype,{getPrototypeOf:ku}=Object,{iterator:ws,toStringTag:Vg}=Symbol,_s=(e=>n=>{const r=uC.call(n);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Kt=e=>(e=e.toLowerCase(),n=>_s(n)===e),Es=e=>n=>typeof n===e,{isArray:da}=Array,Xr=Es("undefined");function Po(e){return e!==null&&!Xr(e)&&e.constructor!==null&&!Xr(e.constructor)&&xt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Zg=Kt("ArrayBuffer");function dC(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&Zg(e.buffer),n}const fC=Es("string"),xt=Es("function"),Bg=Es("number"),No=e=>e!==null&&typeof e=="object",hC=e=>e===!0||e===!1,yi=e=>{if(_s(e)!=="object")return!1;const n=ku(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Vg in e)&&!(ws in e)},pC=e=>{if(!No(e)||Po(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},mC=Kt("Date"),gC=Kt("File"),yC=Kt("Blob"),vC=Kt("FileList"),xC=e=>No(e)&&xt(e.pipe),bC=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||xt(e.append)&&((n=_s(e))==="formdata"||n==="object"&&xt(e.toString)&&e.toString()==="[object FormData]"))},wC=Kt("URLSearchParams"),[_C,EC,CC,SC]=["ReadableStream","Request","Response","Headers"].map(Kt),AC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Oo(e,n,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let a,o;if(typeof e!="object"&&(e=[e]),da(e))for(a=0,o=e.length;a<o;a++)n.call(null,e[a],a,e);else{if(Po(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let l;for(a=0;a<s;a++)l=i[a],n.call(null,e[l],l,e)}}function qg(e,n){if(Po(e))return null;n=n.toLowerCase();const r=Object.keys(e);let a=r.length,o;for(;a-- >0;)if(o=r[a],n===o.toLowerCase())return o;return null}const fr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wg=e=>!Xr(e)&&e!==fr;function Yl(){const{caseless:e,skipUndefined:n}=Wg(this)&&this||{},r={},a=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const s=e&&qg(r,i)||i;yi(r[s])&&yi(o)?r[s]=Yl(r[s],o):yi(o)?r[s]=Yl({},o):da(o)?r[s]=o.slice():(!n||!Xr(o))&&(r[s]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&Oo(arguments[o],a);return r}const RC=(e,n,r,{allOwnKeys:a}={})=>(Oo(n,(o,i)=>{r&&xt(o)?Object.defineProperty(e,i,{value:Ug(o,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:a}),e),MC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),TC=(e,n,r,a)=>{e.prototype=Object.create(n.prototype,a),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:n.prototype}),r&&Object.assign(e.prototype,r)},PC=(e,n,r,a)=>{let o,i,s;const l={};if(n=n||{},e==null)return n;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!a||a(s,e,n))&&!l[s]&&(n[s]=e[s],l[s]=!0);e=r!==!1&&ku(e)}while(e&&(!r||r(e,n))&&e!==Object.prototype);return n},NC=(e,n,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=n.length;const a=e.indexOf(n,r);return a!==-1&&a===r},OC=e=>{if(!e)return null;if(da(e))return e;let n=e.length;if(!Bg(n))return null;const r=new Array(n);for(;n-- >0;)r[n]=e[n];return r},jC=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&ku(Uint8Array)),DC=(e,n)=>{const a=(e&&e[ws]).call(e);let o;for(;(o=a.next())&&!o.done;){const i=o.value;n.call(e,i[0],i[1])}},kC=(e,n)=>{let r;const a=[];for(;(r=e.exec(n))!==null;)a.push(r);return a},IC=Kt("HTMLFormElement"),LC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,a,o){return a.toUpperCase()+o}),kf=(({hasOwnProperty:e})=>(n,r)=>e.call(n,r))(Object.prototype),FC=Kt("RegExp"),Gg=(e,n)=>{const r=Object.getOwnPropertyDescriptors(e),a={};Oo(r,(o,i)=>{let s;(s=n(o,i,e))!==!1&&(a[i]=s||o)}),Object.defineProperties(e,a)},$C=e=>{Gg(e,(n,r)=>{if(xt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const a=e[r];if(xt(a)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},HC=(e,n)=>{const r={},a=o=>{o.forEach(i=>{r[i]=!0})};return da(e)?a(e):a(String(e).split(n)),r},zC=()=>{},UC=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function VC(e){return!!(e&&xt(e.append)&&e[Vg]==="FormData"&&e[ws])}const ZC=e=>{const n=new Array(10),r=(a,o)=>{if(No(a)){if(n.indexOf(a)>=0)return;if(Po(a))return a;if(!("toJSON"in a)){n[o]=a;const i=da(a)?[]:{};return Oo(a,(s,l)=>{const c=r(s,o+1);!Xr(c)&&(i[l]=c)}),n[o]=void 0,i}}return a};return r(e,0)},BC=Kt("AsyncFunction"),qC=e=>e&&(No(e)||xt(e))&&xt(e.then)&&xt(e.catch),Kg=((e,n)=>e?setImmediate:n?((r,a)=>(fr.addEventListener("message",({source:o,data:i})=>{o===fr&&i===r&&a.length&&a.shift()()},!1),o=>{a.push(o),fr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",xt(fr.postMessage)),WC=typeof queueMicrotask<"u"?queueMicrotask.bind(fr):typeof process<"u"&&process.nextTick||Kg,GC=e=>e!=null&&xt(e[ws]),U={isArray:da,isArrayBuffer:Zg,isBuffer:Po,isFormData:bC,isArrayBufferView:dC,isString:fC,isNumber:Bg,isBoolean:hC,isObject:No,isPlainObject:yi,isEmptyObject:pC,isReadableStream:_C,isRequest:EC,isResponse:CC,isHeaders:SC,isUndefined:Xr,isDate:mC,isFile:gC,isBlob:yC,isRegExp:FC,isFunction:xt,isStream:xC,isURLSearchParams:wC,isTypedArray:jC,isFileList:vC,forEach:Oo,merge:Yl,extend:RC,trim:AC,stripBOM:MC,inherits:TC,toFlatObject:PC,kindOf:_s,kindOfTest:Kt,endsWith:NC,toArray:OC,forEachEntry:DC,matchAll:kC,isHTMLForm:IC,hasOwnProperty:kf,hasOwnProp:kf,reduceDescriptors:Gg,freezeMethods:$C,toObjectSet:HC,toCamelCase:LC,noop:zC,toFiniteNumber:UC,findKey:qg,global:fr,isContextDefined:Wg,isSpecCompliantForm:VC,toJSONObject:ZC,isAsyncFn:BC,isThenable:qC,setImmediate:Kg,asap:WC,isIterable:GC};let he=class Yg extends Error{static from(n,r,a,o,i,s){const l=new Yg(n.message,r||n.code,a,o,i);return l.cause=n,l.name=n.name,s&&Object.assign(l,s),l}constructor(n,r,a,o,i){super(n),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),a&&(this.config=a),o&&(this.request=o),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),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.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";const KC=null;function Ql(e){return U.isPlainObject(e)||U.isArray(e)}function Qg(e){return U.endsWith(e,"[]")?e.slice(0,-2):e}function If(e,n,r){return e?e.concat(n).map(function(o,i){return o=Qg(o),!r&&i?"["+o+"]":o}).join(r?".":""):n}function YC(e){return U.isArray(e)&&!e.some(Ql)}const QC=U.toFlatObject(U,{},null,function(n){return/^is[A-Z]/.test(n)});function Cs(e,n,r){if(!U.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,r=U.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!U.isUndefined(b[v])});const a=r.metaTokens,o=r.visitor||h,i=r.dots,s=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&U.isSpecCompliantForm(n);if(!U.isFunction(o))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(U.isDate(y))return y.toISOString();if(U.isBoolean(y))return y.toString();if(!c&&U.isBlob(y))throw new he("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(y)||U.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function h(y,v,b){let x=y;if(y&&!b&&typeof y=="object"){if(U.endsWith(v,"{}"))v=a?v:v.slice(0,-2),y=JSON.stringify(y);else if(U.isArray(y)&&YC(y)||(U.isFileList(y)||U.endsWith(v,"[]"))&&(x=U.toArray(y)))return v=Qg(v),x.forEach(function(E,C){!(U.isUndefined(E)||E===null)&&n.append(s===!0?If([v],C,i):s===null?v:v+"[]",u(E))}),!1}return Ql(y)?!0:(n.append(If(b,v,i),u(y)),!1)}const f=[],m=Object.assign(QC,{defaultVisitor:h,convertValue:u,isVisitable:Ql});function g(y,v){if(!U.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(y),U.forEach(y,function(x,w){(!(U.isUndefined(x)||x===null)&&o.call(n,x,U.isString(w)?w.trim():w,v,m))===!0&&g(x,v?v.concat(w):[w])}),f.pop()}}if(!U.isObject(e))throw new TypeError("data must be an object");return g(e),n}function Lf(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return n[a]})}function Iu(e,n){this._pairs=[],e&&Cs(e,this,n)}const Xg=Iu.prototype;Xg.append=function(n,r){this._pairs.push([n,r])};Xg.toString=function(n){const r=n?function(a){return n.call(this,a,Lf)}:Lf;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function XC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Jg(e,n,r){if(!n)return e;const a=r&&r.encode||XC,o=U.isFunction(r)?{serialize:r}:r,i=o&&o.serialize;let s;if(i?s=i(n,o):s=U.isURLSearchParams(n)?n.toString():new Iu(n,o).toString(a),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Ff{constructor(){this.handlers=[]}use(n,r,a){return this.handlers.push({fulfilled:n,rejected:r,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){U.forEach(this.handlers,function(a){a!==null&&n(a)})}}const Lu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},JC=typeof URLSearchParams<"u"?URLSearchParams:Iu,eS=typeof FormData<"u"?FormData:null,tS=typeof Blob<"u"?Blob:null,nS={isBrowser:!0,classes:{URLSearchParams:JC,FormData:eS,Blob:tS},protocols:["http","https","file","blob","url","data"]},Fu=typeof window<"u"&&typeof document<"u",Xl=typeof navigator=="object"&&navigator||void 0,rS=Fu&&(!Xl||["ReactNative","NativeScript","NS"].indexOf(Xl.product)<0),aS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",oS=Fu&&window.location.href||"http://localhost",iS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fu,hasStandardBrowserEnv:rS,hasStandardBrowserWebWorkerEnv:aS,navigator:Xl,origin:oS},Symbol.toStringTag,{value:"Module"})),ot={...iS,...nS};function sS(e,n){return Cs(e,new ot.classes.URLSearchParams,{visitor:function(r,a,o,i){return ot.isNode&&U.isBuffer(r)?(this.append(a,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...n})}function lS(e){return U.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function cS(e){const n={},r=Object.keys(e);let a;const o=r.length;let i;for(a=0;a<o;a++)i=r[a],n[i]=e[i];return n}function e2(e){function n(r,a,o,i){let s=r[i++];if(s==="__proto__")return!0;const l=Number.isFinite(+s),c=i>=r.length;return s=!s&&U.isArray(o)?o.length:s,c?(U.hasOwnProp(o,s)?o[s]=[o[s],a]:o[s]=a,!l):((!o[s]||!U.isObject(o[s]))&&(o[s]=[]),n(r,a,o[s],i)&&U.isArray(o[s])&&(o[s]=cS(o[s])),!l)}if(U.isFormData(e)&&U.isFunction(e.entries)){const r={};return U.forEachEntry(e,(a,o)=>{n(lS(a),o,r,0)}),r}return null}function uS(e,n,r){if(U.isString(e))try{return(n||JSON.parse)(e),U.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(r||JSON.stringify)(e)}const jo={transitional:Lu,adapter:["xhr","http","fetch"],transformRequest:[function(n,r){const a=r.getContentType()||"",o=a.indexOf("application/json")>-1,i=U.isObject(n);if(i&&U.isHTMLForm(n)&&(n=new FormData(n)),U.isFormData(n))return o?JSON.stringify(e2(n)):n;if(U.isArrayBuffer(n)||U.isBuffer(n)||U.isStream(n)||U.isFile(n)||U.isBlob(n)||U.isReadableStream(n))return n;if(U.isArrayBufferView(n))return n.buffer;if(U.isURLSearchParams(n))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let l;if(i){if(a.indexOf("application/x-www-form-urlencoded")>-1)return sS(n,this.formSerializer).toString();if((l=U.isFileList(n))||a.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Cs(l?{"files[]":n}:n,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),uS(n)):n}],transformResponse:[function(n){const r=this.transitional||jo.transitional,a=r&&r.forcedJSONParsing,o=this.responseType==="json";if(U.isResponse(n)||U.isReadableStream(n))return n;if(n&&U.isString(n)&&(a&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(n,this.parseReviver)}catch(l){if(s)throw l.name==="SyntaxError"?he.from(l,he.ERR_BAD_RESPONSE,this,null,this.response):l}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};U.forEach(["delete","get","head","post","put","patch"],e=>{jo.headers[e]={}});const dS=U.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"]),fS=e=>{const n={};let r,a,o;return e&&e.split(`
20
+ `).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),a=s.substring(o+1).trim(),!(!r||n[r]&&dS[r])&&(r==="set-cookie"?n[r]?n[r].push(a):n[r]=[a]:n[r]=n[r]?n[r]+", "+a:a)}),n},$f=Symbol("internals");function wa(e){return e&&String(e).trim().toLowerCase()}function vi(e){return e===!1||e==null?e:U.isArray(e)?e.map(vi):String(e)}function hS(e){const n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=r.exec(e);)n[a[1]]=a[2];return n}const pS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function il(e,n,r,a,o){if(U.isFunction(a))return a.call(this,n,r);if(o&&(n=r),!!U.isString(n)){if(U.isString(a))return n.indexOf(a)!==-1;if(U.isRegExp(a))return a.test(n)}}function mS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,r,a)=>r.toUpperCase()+a)}function gS(e,n){const r=U.toCamelCase(" "+n);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+r,{value:function(o,i,s){return this[a].call(this,n,o,i,s)},configurable:!0})})}let bt=class{constructor(n){n&&this.set(n)}set(n,r,a){const o=this;function i(l,c,u){const h=wa(c);if(!h)throw new Error("header name must be a non-empty string");const f=U.findKey(o,h);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||c]=vi(l))}const s=(l,c)=>U.forEach(l,(u,h)=>i(u,h,c));if(U.isPlainObject(n)||n instanceof this.constructor)s(n,r);else if(U.isString(n)&&(n=n.trim())&&!pS(n))s(fS(n),r);else if(U.isObject(n)&&U.isIterable(n)){let l={},c,u;for(const h of n){if(!U.isArray(h))throw TypeError("Object iterator must return a key-value pair");l[u=h[0]]=(c=l[u])?U.isArray(c)?[...c,h[1]]:[c,h[1]]:h[1]}s(l,r)}else n!=null&&i(r,n,a);return this}get(n,r){if(n=wa(n),n){const a=U.findKey(this,n);if(a){const o=this[a];if(!r)return o;if(r===!0)return hS(o);if(U.isFunction(r))return r.call(this,o,a);if(U.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,r){if(n=wa(n),n){const a=U.findKey(this,n);return!!(a&&this[a]!==void 0&&(!r||il(this,this[a],a,r)))}return!1}delete(n,r){const a=this;let o=!1;function i(s){if(s=wa(s),s){const l=U.findKey(a,s);l&&(!r||il(a,a[l],l,r))&&(delete a[l],o=!0)}}return U.isArray(n)?n.forEach(i):i(n),o}clear(n){const r=Object.keys(this);let a=r.length,o=!1;for(;a--;){const i=r[a];(!n||il(this,this[i],i,n,!0))&&(delete this[i],o=!0)}return o}normalize(n){const r=this,a={};return U.forEach(this,(o,i)=>{const s=U.findKey(a,i);if(s){r[s]=vi(o),delete r[i];return}const l=n?mS(i):String(i).trim();l!==i&&delete r[i],r[l]=vi(o),a[l]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const r=Object.create(null);return U.forEach(this,(a,o)=>{a!=null&&a!==!1&&(r[o]=n&&U.isArray(a)?a.join(", "):a)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,r])=>n+": "+r).join(`
21
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...r){const a=new this(n);return r.forEach(o=>a.set(o)),a}static accessor(n){const a=(this[$f]=this[$f]={accessors:{}}).accessors,o=this.prototype;function i(s){const l=wa(s);a[l]||(gS(o,s),a[l]=!0)}return U.isArray(n)?n.forEach(i):i(n),this}};bt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);U.reduceDescriptors(bt.prototype,({value:e},n)=>{let r=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(a){this[r]=a}}});U.freezeMethods(bt);function sl(e,n){const r=this||jo,a=n||r,o=bt.from(a.headers);let i=a.data;return U.forEach(e,function(l){i=l.call(r,i,o.normalize(),n?n.status:void 0)}),o.normalize(),i}function t2(e){return!!(e&&e.__CANCEL__)}let Do=class extends he{constructor(n,r,a){super(n??"canceled",he.ERR_CANCELED,r,a),this.name="CanceledError",this.__CANCEL__=!0}};function n2(e,n,r){const a=r.config.validateStatus;!r.status||!a||a(r.status)?e(r):n(new he("Request failed with status code "+r.status,[he.ERR_BAD_REQUEST,he.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function yS(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function vS(e,n){e=e||10;const r=new Array(e),a=new Array(e);let o=0,i=0,s;return n=n!==void 0?n:1e3,function(c){const u=Date.now(),h=a[i];s||(s=u),r[o]=c,a[o]=u;let f=i,m=0;for(;f!==o;)m+=r[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<n)return;const g=h&&u-h;return g?Math.round(m*1e3/g):void 0}}function xS(e,n){let r=0,a=1e3/n,o,i;const s=(u,h=Date.now())=>{r=h,o=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const h=Date.now(),f=h-r;f>=a?s(u,h):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},a-f)))},()=>o&&s(o)]}const zi=(e,n,r=3)=>{let a=0;const o=vS(50,250);return xS(i=>{const s=i.loaded,l=i.lengthComputable?i.total:void 0,c=s-a,u=o(c),h=s<=l;a=s;const f={loaded:s,total:l,progress:l?s/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&h?(l-s)/u:void 0,event:i,lengthComputable:l!=null,[n?"download":"upload"]:!0};e(f)},r)},Hf=(e,n)=>{const r=e!=null;return[a=>n[0]({lengthComputable:r,total:e,loaded:a}),n[1]]},zf=e=>(...n)=>U.asap(()=>e(...n)),bS=ot.hasStandardBrowserEnv?((e,n)=>r=>(r=new URL(r,ot.origin),e.protocol===r.protocol&&e.host===r.host&&(n||e.port===r.port)))(new URL(ot.origin),ot.navigator&&/(msie|trident)/i.test(ot.navigator.userAgent)):()=>!0,wS=ot.hasStandardBrowserEnv?{write(e,n,r,a,o,i,s){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(n)}`];U.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),U.isString(a)&&l.push(`path=${a}`),U.isString(o)&&l.push(`domain=${o}`),i===!0&&l.push("secure"),U.isString(s)&&l.push(`SameSite=${s}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _S(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ES(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function r2(e,n,r){let a=!_S(n);return e&&(a||r==!1)?ES(e,n):n}const Uf=e=>e instanceof bt?{...e}:e;function Er(e,n){n=n||{};const r={};function a(u,h,f,m){return U.isPlainObject(u)&&U.isPlainObject(h)?U.merge.call({caseless:m},u,h):U.isPlainObject(h)?U.merge({},h):U.isArray(h)?h.slice():h}function o(u,h,f,m){if(U.isUndefined(h)){if(!U.isUndefined(u))return a(void 0,u,f,m)}else return a(u,h,f,m)}function i(u,h){if(!U.isUndefined(h))return a(void 0,h)}function s(u,h){if(U.isUndefined(h)){if(!U.isUndefined(u))return a(void 0,u)}else return a(void 0,h)}function l(u,h,f){if(f in n)return a(u,h);if(f in e)return a(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(u,h,f)=>o(Uf(u),Uf(h),f,!0)};return U.forEach(Object.keys({...e,...n}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const f=U.hasOwnProp(c,h)?c[h]:o,m=f(e[h],n[h],h);U.isUndefined(m)&&f!==l||(r[h]=m)}),r}const a2=e=>{const n=Er({},e);let{data:r,withXSRFToken:a,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:l}=n;if(n.headers=s=bt.from(s),n.url=Jg(r2(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),U.isFormData(r)){if(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(U.isFunction(r.getHeaders)){const c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([h,f])=>{u.includes(h.toLowerCase())&&s.set(h,f)})}}if(ot.hasStandardBrowserEnv&&(a&&U.isFunction(a)&&(a=a(n)),a||a!==!1&&bS(n.url))){const c=o&&i&&wS.read(i);c&&s.set(o,c)}return n},CS=typeof XMLHttpRequest<"u",SS=CS&&function(e){return new Promise(function(r,a){const o=a2(e);let i=o.data;const s=bt.from(o.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=o,h,f,m,g,y;function v(){g&&g(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(h),o.signal&&o.signal.removeEventListener("abort",h)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function x(){if(!b)return;const E=bt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),S={data:!l||l==="text"||l==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:E,config:e,request:b};n2(function(_){r(_),v()},function(_){a(_),v()},S),b=null}"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(x)},b.onabort=function(){b&&(a(new he("Request aborted",he.ECONNABORTED,e,b)),b=null)},b.onerror=function(C){const S=C&&C.message?C.message:"Network Error",M=new he(S,he.ERR_NETWORK,e,b);M.event=C||null,a(M),b=null},b.ontimeout=function(){let C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const S=o.transitional||Lu;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),a(new he(C,S.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,e,b)),b=null},i===void 0&&s.setContentType(null),"setRequestHeader"in b&&U.forEach(s.toJSON(),function(C,S){b.setRequestHeader(S,C)}),U.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),l&&l!=="json"&&(b.responseType=o.responseType),u&&([m,y]=zi(u,!0),b.addEventListener("progress",m)),c&&b.upload&&([f,g]=zi(c),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(h=E=>{b&&(a(!E||E.type?new Do(null,e,b):E),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(h),o.signal&&(o.signal.aborted?h():o.signal.addEventListener("abort",h)));const w=yS(o.url);if(w&&ot.protocols.indexOf(w)===-1){a(new he("Unsupported protocol "+w+":",he.ERR_BAD_REQUEST,e));return}b.send(i||null)})},AS=(e,n)=>{const{length:r}=e=e?e.filter(Boolean):[];if(n||r){let a=new AbortController,o;const i=function(u){if(!o){o=!0,l();const h=u instanceof Error?u:this.reason;a.abort(h instanceof he?h:new Do(h instanceof Error?h.message:h))}};let s=n&&setTimeout(()=>{s=null,i(new he(`timeout of ${n}ms exceeded`,he.ETIMEDOUT))},n);const l=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=a;return c.unsubscribe=()=>U.asap(l),c}},RS=function*(e,n){let r=e.byteLength;if(r<n){yield e;return}let a=0,o;for(;a<r;)o=a+n,yield e.slice(a,o),a=o},MS=async function*(e,n){for await(const r of TS(e))yield*RS(r,n)},TS=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:r,value:a}=await n.read();if(r)break;yield a}}finally{await n.cancel()}},Vf=(e,n,r,a)=>{const o=MS(e,n);let i=0,s,l=c=>{s||(s=!0,a&&a(c))};return new ReadableStream({async pull(c){try{const{done:u,value:h}=await o.next();if(u){l(),c.close();return}let f=h.byteLength;if(r){let m=i+=f;r(m)}c.enqueue(new Uint8Array(h))}catch(u){throw l(u),u}},cancel(c){return l(c),o.return()}},{highWaterMark:2})},Zf=64*1024,{isFunction:ai}=U,PS=(({Request:e,Response:n})=>({Request:e,Response:n}))(U.global),{ReadableStream:Bf,TextEncoder:qf}=U.global,Wf=(e,...n)=>{try{return!!e(...n)}catch{return!1}},NS=e=>{e=U.merge.call({skipUndefined:!0},PS,e);const{fetch:n,Request:r,Response:a}=e,o=n?ai(n):typeof fetch=="function",i=ai(r),s=ai(a);if(!o)return!1;const l=o&&ai(Bf),c=o&&(typeof qf=="function"?(y=>v=>y.encode(v))(new qf):async y=>new Uint8Array(await new r(y).arrayBuffer())),u=i&&l&&Wf(()=>{let y=!1;const v=new r(ot.origin,{body:new Bf,method:"POST",get duplex(){return y=!0,"half"}}).headers.has("Content-Type");return y&&!v}),h=s&&l&&Wf(()=>U.isReadableStream(new a("").body)),f={stream:h&&(y=>y.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!f[y]&&(f[y]=(v,b)=>{let x=v&&v[y];if(x)return x.call(v);throw new he(`Response type '${y}' is not supported`,he.ERR_NOT_SUPPORT,b)})});const m=async y=>{if(y==null)return 0;if(U.isBlob(y))return y.size;if(U.isSpecCompliantForm(y))return(await new r(ot.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(U.isArrayBufferView(y)||U.isArrayBuffer(y))return y.byteLength;if(U.isURLSearchParams(y)&&(y=y+""),U.isString(y))return(await c(y)).byteLength},g=async(y,v)=>{const b=U.toFiniteNumber(y.getContentLength());return b??m(v)};return async y=>{let{url:v,method:b,data:x,signal:w,cancelToken:E,timeout:C,onDownloadProgress:S,onUploadProgress:M,responseType:_,headers:A,withCredentials:j="same-origin",fetchOptions:P}=a2(y),O=n||fetch;_=_?(_+"").toLowerCase():"text";let H=AS([w,E&&E.toAbortSignal()],C),Z=null;const R=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let k;try{if(M&&u&&b!=="get"&&b!=="head"&&(k=await g(A,x))!==0){let B=new r(v,{method:"POST",body:x,duplex:"half"}),q;if(U.isFormData(x)&&(q=B.headers.get("content-type"))&&A.setContentType(q),B.body){const[X,Q]=Hf(k,zi(zf(M)));x=Vf(B.body,Zf,X,Q)}}U.isString(j)||(j=j?"include":"omit");const T=i&&"credentials"in r.prototype,F={...P,signal:H,method:b.toUpperCase(),headers:A.normalize().toJSON(),body:x,duplex:"half",credentials:T?j:void 0};Z=i&&new r(v,F);let I=await(i?O(Z,P):O(v,F));const $=h&&(_==="stream"||_==="response");if(h&&(S||$&&R)){const B={};["status","statusText","headers"].forEach(re=>{B[re]=I[re]});const q=U.toFiniteNumber(I.headers.get("content-length")),[X,Q]=S&&Hf(q,zi(zf(S),!0))||[];I=new a(Vf(I.body,Zf,X,()=>{Q&&Q(),R&&R()}),B)}_=_||"text";let V=await f[U.findKey(f,_)||"text"](I,y);return!$&&R&&R(),await new Promise((B,q)=>{n2(B,q,{data:V,headers:bt.from(I.headers),status:I.status,statusText:I.statusText,config:y,request:Z})})}catch(T){throw R&&R(),T&&T.name==="TypeError"&&/Load failed|fetch/i.test(T.message)?Object.assign(new he("Network Error",he.ERR_NETWORK,y,Z,T&&T.response),{cause:T.cause||T}):he.from(T,T&&T.code,y,Z,T&&T.response)}}},OS=new Map,o2=e=>{let n=e&&e.env||{};const{fetch:r,Request:a,Response:o}=n,i=[a,o,r];let s=i.length,l=s,c,u,h=OS;for(;l--;)c=i[l],u=h.get(c),u===void 0&&h.set(c,u=l?new Map:NS(n)),h=u;return u};o2();const $u={http:KC,xhr:SS,fetch:{get:o2}};U.forEach($u,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const Gf=e=>`- ${e}`,jS=e=>U.isFunction(e)||e===null||e===!1;function DS(e,n){e=U.isArray(e)?e:[e];const{length:r}=e;let a,o;const i={};for(let s=0;s<r;s++){a=e[s];let l;if(o=a,!jS(a)&&(o=$u[(l=String(a)).toLowerCase()],o===void 0))throw new he(`Unknown adapter '${l}'`);if(o&&(U.isFunction(o)||(o=o.get(n))))break;i[l||"#"+s]=o}if(!o){const s=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=r?s.length>1?`since :
22
+ `+s.map(Gf).join(`
23
+ `):" "+Gf(s[0]):"as no adapter specified";throw new he("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o}const i2={getAdapter:DS,adapters:$u};function ll(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Do(null,e)}function Kf(e){return ll(e),e.headers=bt.from(e.headers),e.data=sl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),i2.getAdapter(e.adapter||jo.adapter,e)(e).then(function(a){return ll(e),a.data=sl.call(e,e.transformResponse,a),a.headers=bt.from(a.headers),a},function(a){return t2(a)||(ll(e),a&&a.response&&(a.response.data=sl.call(e,e.transformResponse,a.response),a.response.headers=bt.from(a.response.headers))),Promise.reject(a)})}const s2="1.13.5",Ss={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{Ss[e]=function(a){return typeof a===e||"a"+(n<1?"n ":" ")+e}});const Yf={};Ss.transitional=function(n,r,a){function o(i,s){return"[Axios v"+s2+"] Transitional option '"+i+"'"+s+(a?". "+a:"")}return(i,s,l)=>{if(n===!1)throw new he(o(s," has been removed"+(r?" in "+r:"")),he.ERR_DEPRECATED);return r&&!Yf[s]&&(Yf[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),n?n(i,s,l):!0}};Ss.spelling=function(n){return(r,a)=>(console.warn(`${a} is likely a misspelling of ${n}`),!0)};function kS(e,n,r){if(typeof e!="object")throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let o=a.length;for(;o-- >0;){const i=a[o],s=n[i];if(s){const l=e[i],c=l===void 0||s(l,i,e);if(c!==!0)throw new he("option "+i+" must be "+c,he.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new he("Unknown option "+i,he.ERR_BAD_OPTION)}}const xi={assertOptions:kS,validators:Ss},Tt=xi.validators;let mr=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Ff,response:new Ff}}async request(n,r){try{return await this._request(n,r)}catch(a){if(a instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{a.stack?i&&!String(a.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(a.stack+=`
24
+ `+i):a.stack=i}catch{}}throw a}}_request(n,r){typeof n=="string"?(r=r||{},r.url=n):r=n||{},r=Er(this.defaults,r);const{transitional:a,paramsSerializer:o,headers:i}=r;a!==void 0&&xi.assertOptions(a,{silentJSONParsing:Tt.transitional(Tt.boolean),forcedJSONParsing:Tt.transitional(Tt.boolean),clarifyTimeoutError:Tt.transitional(Tt.boolean),legacyInterceptorReqResOrdering:Tt.transitional(Tt.boolean)},!1),o!=null&&(U.isFunction(o)?r.paramsSerializer={serialize:o}:xi.assertOptions(o,{encode:Tt.function,serialize:Tt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),xi.assertOptions(r,{baseUrl:Tt.spelling("baseURL"),withXsrfToken:Tt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&U.merge(i.common,i[r.method]);i&&U.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),r.headers=bt.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(r)===!1)return;c=c&&v.synchronous;const b=r.transitional||Lu;b&&b.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let h,f=0,m;if(!c){const y=[Kf.bind(this),void 0];for(y.unshift(...l),y.push(...u),m=y.length,h=Promise.resolve(r);f<m;)h=h.then(y[f++],y[f++]);return h}m=l.length;let g=r;for(;f<m;){const y=l[f++],v=l[f++];try{g=y(g)}catch(b){v.call(this,b);break}}try{h=Kf.call(this,g)}catch(y){return Promise.reject(y)}for(f=0,m=u.length;f<m;)h=h.then(u[f++],u[f++]);return h}getUri(n){n=Er(this.defaults,n);const r=r2(n.baseURL,n.url,n.allowAbsoluteUrls);return Jg(r,n.params,n.paramsSerializer)}};U.forEach(["delete","get","head","options"],function(n){mr.prototype[n]=function(r,a){return this.request(Er(a||{},{method:n,url:r,data:(a||{}).data}))}});U.forEach(["post","put","patch"],function(n){function r(a){return function(i,s,l){return this.request(Er(l||{},{method:n,headers:a?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}mr.prototype[n]=r(),mr.prototype[n+"Form"]=r(!0)});let IS=class l2{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const a=this;this.promise.then(o=>{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](o);a._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(l=>{a.subscribe(l),i=l}).then(o);return s.cancel=function(){a.unsubscribe(i)},s},n(function(i,s,l){a.reason||(a.reason=new Do(i,s,l),r(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const r=this._listeners.indexOf(n);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const n=new AbortController,r=a=>{n.abort(a)};return this.subscribe(r),n.signal.unsubscribe=()=>this.unsubscribe(r),n.signal}static source(){let n;return{token:new l2(function(o){n=o}),cancel:n}}};function LS(e){return function(r){return e.apply(null,r)}}function FS(e){return U.isObject(e)&&e.isAxiosError===!0}const Jl={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(Jl).forEach(([e,n])=>{Jl[n]=e});function c2(e){const n=new mr(e),r=Ug(mr.prototype.request,n);return U.extend(r,mr.prototype,n,{allOwnKeys:!0}),U.extend(r,n,null,{allOwnKeys:!0}),r.create=function(o){return c2(Er(e,o))},r}const Le=c2(jo);Le.Axios=mr;Le.CanceledError=Do;Le.CancelToken=IS;Le.isCancel=t2;Le.VERSION=s2;Le.toFormData=Cs;Le.AxiosError=he;Le.Cancel=Le.CanceledError;Le.all=function(n){return Promise.all(n)};Le.spread=LS;Le.isAxiosError=FS;Le.mergeConfig=Er;Le.AxiosHeaders=bt;Le.formToJSON=e=>e2(U.isHTMLForm(e)?new FormData(e):e);Le.getAdapter=i2.getAdapter;Le.HttpStatusCode=Jl;Le.default=Le;const{Axios:Nj,AxiosError:Oj,CanceledError:jj,isCancel:Dj,CancelToken:kj,VERSION:Ij,all:Lj,Cancel:Fj,isAxiosError:$j,spread:Hj,toFormData:zj,AxiosHeaders:Uj,HttpStatusCode:Vj,formToJSON:Zj,getAdapter:Bj,mergeConfig:qj}=Le,Pe=async(e,n)=>{const{data:r}=await Le("/graphql",{method:"post",data:{query:e,variables:n}});return r.errors?{type:"error",...r}:{type:"success",...r.data}};function Hu({limit:e=25,offset:n=0,query:r="",sortBy:a,sortOrder:o,pinnedFirst:i,fields:s}={}){return Pe(`query def(
25
+ $searchFilter: SearchFilterInput,
26
+ $pagination: PaginationInput
27
+ ) {
28
+ allNotes(
29
+ searchFilter: $searchFilter,
30
+ pagination: $pagination
31
+ ) {
32
+ totalCount
33
+ notes {
34
+ ${s?s.join(`
35
+ `):""}
36
+ id
37
+ title
38
+ pinned
39
+ createdAt
40
+ updatedAt
41
+ tags {
42
+ id
43
+ name
44
+ }
45
+ }
46
+ }
47
+ }`,{searchFilter:{query:r,sortBy:a,sortOrder:o,pinnedFirst:i},pagination:{limit:e,offset:n}})}function $S({query:e="",limit:n=25,offset:r=0}={}){return Pe(`query def(
48
+ $searchFilter: SearchFilterInput,
49
+ $pagination: PaginationInput
50
+ ) {
51
+ tagNotes(
52
+ searchFilter: $searchFilter,
53
+ pagination: $pagination
54
+ ) {
55
+ totalCount
56
+ notes {
57
+ id
58
+ title
59
+ pinned
60
+ tags {
61
+ id
62
+ name
63
+ }
64
+ createdAt
65
+ updatedAt
66
+ }
67
+ }
68
+ }`,{searchFilter:{query:e},pagination:{limit:n,offset:r}})}function HS(e){return Pe(`query {
69
+ imageNotes(src: "${e}") {
70
+ id
71
+ title
72
+ createdAt
73
+ updatedAt
74
+ }
75
+ }`)}function zS(e){return Pe(`mutation def($note: NoteInput!) {
76
+ createNote(note: $note) {
77
+ id
78
+ }
79
+ }`,{note:e})}const Qf=({id:e,...n})=>Pe(`mutation def($note: NoteInput!) {
80
+ updateNote(id: "${e}", note: $note) {
81
+ id
82
+ title
83
+ }
84
+ }`,{note:n});function US(e,n){return Pe(`mutation {
85
+ pinNote(id: "${e}", pinned: ${n}) {
86
+ id
87
+ title
88
+ pinned
89
+ createdAt
90
+ updatedAt
91
+ }
92
+ }`)}function VS(e){return Pe(`mutation {
93
+ deleteNote(id: "${e}")
94
+ }`)}function ZS(e){return Pe(`mutation def($notes: [NoteOrderInput!]!) {
95
+ reorderNotes(notes: $notes) {
96
+ id
97
+ order
98
+ }
99
+ }`,{notes:e})}function BS(){return Pe(`query {
100
+ noteGraph {
101
+ nodes {
102
+ id
103
+ title
104
+ connections
105
+ }
106
+ links {
107
+ source
108
+ target
109
+ }
110
+ }
111
+ }`)}const Ui=()=>["pinned-notes"],qS=e=>["back-references",e];var bi={exports:{}},WS=bi.exports,Xf;function GS(){return Xf||(Xf=1,(function(e,n){(function(r,a){e.exports=a()})(WS,(function(){var r=1e3,a=6e4,o=36e5,i="millisecond",s="second",l="minute",c="hour",u="day",h="week",f="month",m="quarter",g="year",y="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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(R){var k=["th","st","nd","rd"],T=R%100;return"["+R+(k[(T-20)%10]||k[T]||k[0])+"]"}},E=function(R,k,T){var F=String(R);return!F||F.length>=k?R:""+Array(k+1-F.length).join(T)+R},C={s:E,z:function(R){var k=-R.utcOffset(),T=Math.abs(k),F=Math.floor(T/60),I=T%60;return(k<=0?"+":"-")+E(F,2,"0")+":"+E(I,2,"0")},m:function R(k,T){if(k.date()<T.date())return-R(T,k);var F=12*(T.year()-k.year())+(T.month()-k.month()),I=k.clone().add(F,f),$=T-I<0,V=k.clone().add(F+($?-1:1),f);return+(-(F+(T-I)/($?I-V:V-I))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:f,y:g,w:h,d:u,D:y,h:c,m:l,s,ms:i,Q:m}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},S="en",M={};M[S]=w;var _="$isDayjsObject",A=function(R){return R instanceof H||!(!R||!R[_])},j=function R(k,T,F){var I;if(!k)return S;if(typeof k=="string"){var $=k.toLowerCase();M[$]&&(I=$),T&&(M[$]=T,I=$);var V=k.split("-");if(!I&&V.length>1)return R(V[0])}else{var B=k.name;M[B]=k,I=B}return!F&&I&&(S=I),I||!F&&S},P=function(R,k){if(A(R))return R.clone();var T=typeof k=="object"?k:{};return T.date=R,T.args=arguments,new H(T)},O=C;O.l=j,O.i=A,O.w=function(R,k){return P(R,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var H=(function(){function R(T){this.$L=j(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[_]=!0}var k=R.prototype;return k.parse=function(T){this.$d=(function(F){var I=F.date,$=F.utc;if(I===null)return new Date(NaN);if(O.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var V=I.match(b);if(V){var B=V[2]-1||0,q=(V[7]||"0").substring(0,3);return $?new Date(Date.UTC(V[1],B,V[3]||1,V[4]||0,V[5]||0,V[6]||0,q)):new Date(V[1],B,V[3]||1,V[4]||0,V[5]||0,V[6]||0,q)}}return new Date(I)})(T),this.init()},k.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},k.$utils=function(){return O},k.isValid=function(){return this.$d.toString()!==v},k.isSame=function(T,F){var I=P(T);return this.startOf(F)<=I&&I<=this.endOf(F)},k.isAfter=function(T,F){return P(T)<this.startOf(F)},k.isBefore=function(T,F){return this.endOf(F)<P(T)},k.$g=function(T,F,I){return O.u(T)?this[F]:this.set(I,T)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(T,F){var I=this,$=!!O.u(F)||F,V=O.p(T),B=function(ye,J){var ge=O.w(I.$u?Date.UTC(I.$y,J,ye):new Date(I.$y,J,ye),I);return $?ge:ge.endOf(u)},q=function(ye,J){return O.w(I.toDate()[ye].apply(I.toDate("s"),($?[0,0,0,0]:[23,59,59,999]).slice(J)),I)},X=this.$W,Q=this.$M,re=this.$D,de="set"+(this.$u?"UTC":"");switch(V){case g:return $?B(1,0):B(31,11);case f:return $?B(1,Q):B(0,Q+1);case h:var G=this.$locale().weekStart||0,ie=(X<G?X+7:X)-G;return B($?re-ie:re+(6-ie),Q);case u:case y:return q(de+"Hours",0);case c:return q(de+"Minutes",1);case l:return q(de+"Seconds",2);case s:return q(de+"Milliseconds",3);default:return this.clone()}},k.endOf=function(T){return this.startOf(T,!1)},k.$set=function(T,F){var I,$=O.p(T),V="set"+(this.$u?"UTC":""),B=(I={},I[u]=V+"Date",I[y]=V+"Date",I[f]=V+"Month",I[g]=V+"FullYear",I[c]=V+"Hours",I[l]=V+"Minutes",I[s]=V+"Seconds",I[i]=V+"Milliseconds",I)[$],q=$===u?this.$D+(F-this.$W):F;if($===f||$===g){var X=this.clone().set(y,1);X.$d[B](q),X.init(),this.$d=X.set(y,Math.min(this.$D,X.daysInMonth())).$d}else B&&this.$d[B](q);return this.init(),this},k.set=function(T,F){return this.clone().$set(T,F)},k.get=function(T){return this[O.p(T)]()},k.add=function(T,F){var I,$=this;T=Number(T);var V=O.p(F),B=function(Q){var re=P($);return O.w(re.date(re.date()+Math.round(Q*T)),$)};if(V===f)return this.set(f,this.$M+T);if(V===g)return this.set(g,this.$y+T);if(V===u)return B(1);if(V===h)return B(7);var q=(I={},I[l]=a,I[c]=o,I[s]=r,I)[V]||1,X=this.$d.getTime()+T*q;return O.w(X,this)},k.subtract=function(T,F){return this.add(-1*T,F)},k.format=function(T){var F=this,I=this.$locale();if(!this.isValid())return I.invalidDate||v;var $=T||"YYYY-MM-DDTHH:mm:ssZ",V=O.z(this),B=this.$H,q=this.$m,X=this.$M,Q=I.weekdays,re=I.months,de=I.meridiem,G=function(J,ge,ce,Se){return J&&(J[ge]||J(F,$))||ce[ge].slice(0,Se)},ie=function(J){return O.s(B%12||12,J,"0")},ye=de||function(J,ge,ce){var Se=J<12?"AM":"PM";return ce?Se.toLowerCase():Se};return $.replace(x,(function(J,ge){return ge||(function(ce){switch(ce){case"YY":return String(F.$y).slice(-2);case"YYYY":return O.s(F.$y,4,"0");case"M":return X+1;case"MM":return O.s(X+1,2,"0");case"MMM":return G(I.monthsShort,X,re,3);case"MMMM":return G(re,X);case"D":return F.$D;case"DD":return O.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return G(I.weekdaysMin,F.$W,Q,2);case"ddd":return G(I.weekdaysShort,F.$W,Q,3);case"dddd":return Q[F.$W];case"H":return String(B);case"HH":return O.s(B,2,"0");case"h":return ie(1);case"hh":return ie(2);case"a":return ye(B,q,!0);case"A":return ye(B,q,!1);case"m":return String(q);case"mm":return O.s(q,2,"0");case"s":return String(F.$s);case"ss":return O.s(F.$s,2,"0");case"SSS":return O.s(F.$ms,3,"0");case"Z":return V}return null})(J)||V.replace(":","")}))},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(T,F,I){var $,V=this,B=O.p(F),q=P(T),X=(q.utcOffset()-this.utcOffset())*a,Q=this-q,re=function(){return O.m(V,q)};switch(B){case g:$=re()/12;break;case f:$=re();break;case m:$=re()/3;break;case h:$=(Q-X)/6048e5;break;case u:$=(Q-X)/864e5;break;case c:$=Q/o;break;case l:$=Q/a;break;case s:$=Q/r;break;default:$=Q}return I?$:O.a($)},k.daysInMonth=function(){return this.endOf(f).$D},k.$locale=function(){return M[this.$L]},k.locale=function(T,F){if(!T)return this.$L;var I=this.clone(),$=j(T,F,!0);return $&&(I.$L=$),I},k.clone=function(){return O.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},R})(),Z=H.prototype;return P.prototype=Z,[["$ms",i],["$s",s],["$m",l],["$H",c],["$W",u],["$M",f],["$y",g],["$D",y]].forEach((function(R){Z[R[1]]=function(k){return this.$g(k,R[0],R[1])}})),P.extend=function(R,k){return R.$i||(R(k,H,P),R.$i=!0),P},P.locale=j,P.isDayjs=A,P.unix=function(R){return P(1e3*R)},P.en=M[S],P.Ls=M,P.p={},P}))})(bi)),bi.exports}var KS=GS();const ve=na(KS),YS=()=>{const e=new Date,n=e.getDate(),r=e.getMonth(),a=e.getFullYear(),i=new Date(a,r,1).getDay();return Math.ceil((n+i)/7)},u2=()=>[{name:"Year",template:"year",replacement:ve().format("YYYY")},{name:"Month",template:"month",replacement:ve().format("MM")},{name:"Short Month",template:"mon",replacement:ve().format("M")},{name:"Day",template:"day",replacement:ve().format("DD")},{name:"Short Day",template:"d",replacement:ve().format("D")},{name:"Week of Month",template:"week_of_month",replacement:YS().toString()},{name:"Hour 24",template:"hour",replacement:ve().format("HH")},{name:"Hour 12",template:"hour_12",replacement:ve().format("hh")},{name:"Short Hour 24",template:"h",replacement:ve().format("H")},{name:"Short Hour 12",template:"h_12",replacement:ve().format("h")},{name:"AM/PM",template:"ampm",replacement:ve().format("A")},{name:"Minute",template:"minute",replacement:ve().format("mm")},{name:"Short Minute",template:"m",replacement:ve().format("m")},{name:"Second",template:"second",replacement:ve().format("ss")},{name:"Short Second",template:"s",replacement:ve().format("s")}],ec="{%",tc="%}",Jf=e=>e.replace(new RegExp(`${ec}([^}]+)${tc}`,"g"),(n,r)=>u2().find(o=>o.template===r)?.replacement||n),As=()=>{const e=is(),n=Qn(),r=Ar();return{onCreate:async(s="",l="",c)=>{const u=Jf(s),h=Jf(l),f=await zS({title:u,content:h,...c&&{layout:c}});f.type!=="error"&&r(`/${f.createNote.id}`)},onPinned:async(s,l,c)=>{try{await US(s,!l),await n.invalidateQueries({queryKey:["notes"]}),await n.invalidateQueries({queryKey:["tag-notes"]}),await n.invalidateQueries({queryKey:[Ui()]}),c?.()}catch{}},onDelete:async(s,l)=>{await e("Are you really sure?")&&(await VS(s),await n.invalidateQueries({queryKey:["notes"]}),await n.invalidateQueries({queryKey:["tag-notes"]}),await n.invalidateQueries({queryKey:[Ui()]}),l?.())}}};function zu({query:e="",limit:n=50,offset:r=0}={}){return Pe(`query def(
112
+ $searchFilter: SearchFilterInput,
113
+ $pagination: PaginationInput
114
+ ) {
115
+ allTags(
116
+ searchFilter: $searchFilter,
117
+ pagination: $pagination
118
+ ) {
119
+ totalCount
120
+ tags {
121
+ id
122
+ name
123
+ referenceCount
124
+ }
125
+ }
126
+ }`,{searchFilter:{query:e},pagination:{limit:n,offset:r}})}function QS({name:e=""}){return Pe(`mutation {
127
+ createTag(name: "${e}") {
128
+ id
129
+ name
130
+ }
131
+ }`)}const XS=async e=>{try{const n=await Pe(`
132
+ query {
133
+ cache(key: "${e}") {
134
+ value
135
+ }
136
+ }
137
+ `);if(n.type==="error")throw n;return n.cache.value}catch{return""}},d2=async(e,n)=>Pe(`
138
+ mutation {
139
+ setCache(key: "${e}", value: "${encodeURIComponent(n)}") {
140
+ value
141
+ }
142
+ }
143
+ `),JS=e=>{const{data:n}=aa({queryKey:[Ui()],async queryFn(){const r=await Pe(`
144
+ query {
145
+ pinnedNotes {
146
+ id
147
+ title
148
+ order
149
+ }
150
+ }
151
+ `);if(r.type==="error")throw r;return r.pinnedNotes}});return p.jsx(p.Fragment,{children:e.render(n)})};function eA({limit:e=50,offset:n=0}={}){return Pe(`query def($pagination: PaginationInput) {
152
+ allImages(pagination: $pagination) {
153
+ totalCount
154
+ images {
155
+ id
156
+ url
157
+ referenceCount
158
+ }
159
+ }
160
+ }`,{pagination:{limit:e,offset:n}})}function tA(e){return Pe(`query {
161
+ image(id: ${e}) {
162
+ id
163
+ url
164
+ }
165
+ }`)}function f2(e){return Pe(`mutation {
166
+ deleteImage(id: ${e})
167
+ }`)}async function nA({base64:e,externalSrc:n}){if(e){const{data:r}=await Le.post("/api/image",{image:e});return r.url}if(n){const{data:r}=await Le.post("/api/image-from-src",{src:n});return r.url}throw new Error("No file or src provided")}const rA=e=>{const{data:n}=aa({queryKey:["images",e.searchParams.offset,e.searchParams.limit],async queryFn(){const r=await eA({offset:e.searchParams.offset,limit:e.searchParams.limit});if(r.type==="error")throw r;return r.allImages}});return e.render(n)},aA=e=>["notes",...Object.values(e)],h2=e=>{const{data:n}=aa({queryKey:aA(e.searchParams),async queryFn(){const r=await Hu(e.searchParams);if(r.type==="error")throw r;return r.allNotes}});return e.render(n)},oA=e=>{const{data:n}=aa({queryKey:[qS(e.noteId)],async queryFn(){const r=await Pe(`
168
+ query {
169
+ backReferences(id: "${e.noteId}") {
170
+ id
171
+ title
172
+ }
173
+ }
174
+ `);if(r.type==="error")throw r;return r.backReferences}});return e.render(n)},iA=e=>{const{data:n}=aa({queryKey:["tags",e.searchParams.offset,e.searchParams.limit],async queryFn(){const r=await zu({offset:e.searchParams.offset,limit:e.searchParams.limit});if(r.type==="error")throw r;return r.allTags}});return e.render(n)},sA=e=>["tag-notes",...Object.values(e)],lA=e=>{const{data:n}=aa({queryKey:sA(e.searchParams),async queryFn(){const r=await $S({query:e.searchParams.query,offset:e.searchParams.offset,limit:e.searchParams.limit});if(r.type==="error")throw r;return r.tagNotes}});return e.render(n)};function p2({noteId:e,searchParams:n,render:r}){const{data:a}=On({queryKey:e?["noteReminders",e,n]:["upcomingReminders",n],queryFn:async()=>{const o=n?`pagination: { limit: ${n.limit}, offset: ${n.offset} }`:"";let i;e?i=`
175
+ query {
176
+ noteReminders(noteId: "${e}", ${o}) {
177
+ totalCount
178
+ reminders {
179
+ id
180
+ noteId
181
+ reminderDate
182
+ priority
183
+ content
184
+ completed
185
+ createdAt
186
+ updatedAt
187
+ }
188
+ }
189
+ }
190
+ `:i=`
191
+ query {
192
+ upcomingReminders(${o}) {
193
+ totalCount
194
+ reminders {
195
+ id
196
+ noteId
197
+ reminderDate
198
+ priority
199
+ content
200
+ completed
201
+ createdAt
202
+ updatedAt
203
+ note {
204
+ id
205
+ title
206
+ }
207
+ }
208
+ }
209
+ }
210
+ `;const s=await Pe(i);if(s.type==="error")throw s;return e?s.noteReminders:s.upcomingReminders}});return a?p.jsx(p.Fragment,{children:r(a)}):null}const an=ru.bind(Mb);function cA({id:e,children:n,tooltip:r}){const{attributes:a,listeners:o,setNodeRef:i,transform:s,transition:l,isDragging:c,setActivatorNodeRef:u}=aC({id:e}),h={transform:oo.Transform.toString(s),transition:l,opacity:c?.5:1},f=p.jsx("div",{className:"flex-1 min-w-0 font-bold text-sm truncate",children:n});return p.jsxs("div",{ref:i,style:h,...a,className:"flex items-center gap-2 p-2 rounded-md hover:bg-hover-subtle transition-colors",children:[p.jsx("button",{ref:u,...o,className:"cursor-grab active:cursor-grabbing touch-none flex items-center justify-center",style:{cursor:c?"grabbing":"grab"},children:p.jsx(Xa,{className:"size-4 text-fg-placeholder hover:text-fg-secondary"})}),r?p.jsx(dg,{content:r,side:"right",children:f}):f]})}function uA({notes:e,sensors:n,handleDragEnd:r,location:a,pinnedItems:o,setPinnedItems:i}){pe.useEffect(()=>{e&&e.length>0&&i(e)},[e,i]);const s=o.length>0?o:e;return!s||s.length===0?null:p.jsx(FE,{sensors:n,collisionDetection:F5,onDragEnd:r,modifiers:[cC],children:p.jsx(QE,{items:s.map(l=>l.id),strategy:KE,children:s.map(l=>p.jsx(cA,{id:l.id,tooltip:l.title||"Untitled",children:p.jsx(He,{className:`transition-colors ${a.pathname===`/${l.id}`?"text-accent-primary":"text-fg-secondary hover:text-fg-default"}`,to:`/${l.id}`,children:l.title||"Untitled"})},l.id))})})}const dA=[{name:"Notes",path:"/",icon:t4},{name:"Graph",path:"/graph",icon:d4},{name:"Calendar",path:"/calendar",icon:Q6},{name:"Reminders",path:"/reminders",icon:a1},{name:"Tags",path:"/tag",icon:u4},{name:"Setting",path:"/setting",icon:e4}],fA=({children:e})=>{const n=is(),r=gn(),a=Ar(),o=Qn(),{theme:i}=oa(A=>A),[s,l]=d.useState(!1),[c,u]=d.useState(""),[h,f]=d.useState([]),[m,g]=d.useState([]),[y,v]=d.useState([]),[,b]=zg(500),{onCreate:x}=As(),w=Ti({mutationFn:ZS,onSuccess:()=>{o.invalidateQueries({queryKey:[Ui()]})}}),E=I5(_f(ju,{activationConstraint:{distance:8}}),_f(Nu,{coordinateGetter:sC})),C=A=>{const{active:j,over:P}=A;P&&j.id!==P.id&&v(O=>{const H=O.findIndex(T=>T.id===j.id),Z=O.findIndex(T=>T.id===P.id),R=Du(O,H,Z),k=R.map((T,F)=>({id:T.id,order:F}));return w.mutate(k),R})},{data:S}=On({queryKey:["heroBanner"],async queryFn(){return XS("heroBanner")}}),M=A=>{A?.preventDefault(),a(`/search?query=${encodeURIComponent(c)}`)},_=()=>{u("")};return d.useEffect(()=>{if(c.length<=0){b(()=>{}),f([]),g([]);return}b(()=>{Hu({query:c,limit:5}).then(A=>{A.type==="success"&&f(A.allNotes.notes)}),zu({query:c,limit:5}).then(A=>{A.type==="success"&&g(A.allTags.tags)})})},[c,b]),d.useEffect(()=>{l(!1)},[r.pathname]),p.jsxs("div",{className:an("SiteLayout"),children:[p.jsx("div",{className:"md:hidden",children:p.jsx("button",{type:"button",className:an("menu"),onClick:()=>l(A=>!A),children:p.jsx(Xa,{className:"h-6 w-6"})})}),p.jsxs("div",{className:an("side",{open:s}),children:[S&&p.jsx("div",{className:"p-3 pb-0",children:p.jsxs("div",{className:"relative rounded-[16px_5px_17px_4px/5px_13px_5px_15px] border-2 border-border shadow-sketchy overflow-hidden cursor-pointer group",onClick:async()=>{await n("Do you want to remove this hero banner?")&&(await d2("heroBanner",""),await o.invalidateQueries({queryKey:["heroBanner"]}))},children:[p.jsx("img",{className:"w-full transition-transform duration-300 group-hover:scale-105",style:{filter:i==="dark"?"brightness(.8) contrast(1.2)":void 0},src:S}),p.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 flex items-center justify-center",children:p.jsx("span",{className:"text-white text-xs font-bold opacity-0 group-hover:opacity-100 transition-opacity duration-300 bg-black/50 px-3 py-1.5 rounded-[8px_3px_9px_2px/3px_6px_3px_7px]",children:"Click to remove"})})]})}),p.jsx("div",{className:"p-3",children:p.jsxs("form",{className:"flex flex-col gap-3",onSubmit:M,children:[p.jsx("div",{className:"flex gap-3",children:p.jsxs("div",{style:{gridTemplateColumns:"40px 1fr 32px"},className:"grid flex-1 bg-surface border-2 border-border rounded-[12px_4px_13px_3px/4px_10px_4px_12px] shadow-sketchy",children:[p.jsx("button",{type:"submit",className:"flex items-center justify-center hover:text-accent-primary transition-colors",children:p.jsx(o4,{className:"h-5 w-5",weight:"bold"})}),p.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:A=>u(A.target.value),className:"h-10 w-full bg-transparent text-fg-default py-4 outline-none font-bold"}),c&&p.jsx("button",{type:"button",className:"flex items-center justify-center hover:text-accent-primary transition-colors",onClick:_,children:p.jsx(Yc,{className:"h-4 w-4",weight:"bold"})})]})}),(h.length>0||m.length>0)&&p.jsxs("div",{className:"p-3 bg-surface border-2 border-border rounded-[16px_5px_17px_4px/5px_13px_5px_15px] shadow-sketchy",children:[h.length>0&&p.jsx("ul",{className:"flex flex-col",children:h.map(({id:A,title:j})=>p.jsx("li",{className:"flex py-2 items-center border-b border-dashed border-border-subtle last:border-b-0",children:p.jsx(He,{to:`/${A}`,className:"text-sm font-bold hover:text-accent-primary transition-colors",children:j||"Untitled"})},A))}),m.length>0&&p.jsx("ul",{className:"flex flex-wrap gap-2 p-2",children:m.map(({id:A,name:j})=>p.jsx("li",{className:"flex items-center gap-2",children:p.jsx(He,{to:`/tag/${A}`,children:p.jsx(au,{name:j})})},A))}),p.jsx("div",{className:"p-2 border-t border-dashed border-border-subtle",children:p.jsx("button",{type:"submit",className:"text-sm font-bold text-pastel-blue-200 hover:text-pastel-teal-200 transition-colors",children:"view detailed results โ†’"})})]})]})}),p.jsxs("div",{className:an("p-3","flex","flex-col","gap-2"),children:[p.jsxs(ze,{variant:"primary",size:"lg",className:"w-full shadow-sketchy",onClick:()=>x(),children:[p.jsx(_1,{className:"w-5 h-5",weight:"bold"})," Capture"]}),p.jsxs("div",{className:an("font-bold","flex","items-center","gap-2","p-2","pt-6","mt-5","border-t-2","border-dashed","border-border-subtle"),children:[p.jsx(s4,{className:"w-5 h-5",weight:"fill"}),"Pinned"]}),p.jsx("div",{className:"flex flex-col gap-2",children:p.jsx(d.Suspense,{fallback:p.jsxs(p.Fragment,{children:[p.jsx(Te,{height:"24px",opacity:.5}),p.jsx(Te,{height:"24px",opacity:.5})]}),children:p.jsx(JS,{render:A=>p.jsx(uA,{notes:A,sensors:E,handleDragEnd:C,location:r,pinnedItems:y,setPinnedItems:v})})})})]})]}),p.jsxs("div",{className:an("center"),children:[p.jsx("div",{className:an("top"),children:p.jsx("div",{className:an("top-content"),children:p.jsx("div",{className:an("flex","gap-2","p-3"),children:dA.map(A=>{const j=r.pathname===A.path;return p.jsx(He,{to:A.path,children:p.jsxs("div",{className:`flex items-center gap-2 text-sm font-bold px-3 py-2 border-2 transition-all rounded-[10px_3px_11px_3px/3px_8px_3px_10px] ${j?"bg-accent-primary text-white border-border-secondary shadow-sketchy":"border-transparent hover:border-border-secondary hover:bg-hover"}`,children:[p.jsx(A.icon,{className:"size-5",weight:j?"fill":"regular"}),A.name]})},A.path)})})})}),p.jsx("div",{className:an("content"),children:e}),p.jsx(w5,{})]})]})},nc=e=>{let n=0;for(let r=0;r<e.length;r++)n+=e.charCodeAt(r);return n},Za={high:"bg-accent-danger",medium:"bg-pastel-yellow-200 dark:bg-elevated",low:"bg-accent-success"},hA={high:"bg-accent-soft-danger",medium:"bg-pastel-yellow-200/50 dark:bg-elevated/50",low:"bg-accent-soft-success"},m2="bg-red-200 dark:bg-emphasis",e0=["bg-pastel-yellow-200 dark:bg-muted","bg-pastel-green-200 dark:bg-muted","bg-pastel-pink-200 dark:bg-muted","bg-pastel-orange-200 dark:bg-muted","bg-pastel-blue-200 dark:bg-muted","bg-pastel-purple-200 dark:bg-muted","bg-pastel-teal-200 dark:bg-muted","bg-pastel-lavender-200 dark:bg-muted"],g2=e=>e0[nc(e)%e0.length];function y2(e){const n=new Date,r=new Date(e),a=Math.floor((n.getTime()-r.getTime())/1e3);let o=Math.floor(a/31536e3);return o>=1?o+" years ago":(o=Math.floor(a/2592e3),o>=1?o+" months ago":(o=Math.floor(a/86400),o>=1?o+" days ago":(o=Math.floor(a/3600),o>=1?o+" hours ago":(o=Math.floor(a/60),o>=1?o+" minutes ago":Math.floor(a)+" seconds ago"))))}const pA=e=>`/tag/${e}`,rr=e=>`/${e}`,mA=e=>`/setting/manage-image/${e}`;function v2({id:e,title:n,tags:r,pinned:a,createdAt:o,updatedAt:i,onPinned:s,onDelete:l}){const c=new Date(Number(o)),u=y2(Number(i));return p.jsxs("div",{className:`${g2(e)} p-4 relative sketchy shadow-sketchy`,children:[a&&p.jsx("div",{className:"absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 z-10",children:p.jsx(Kc,{weight:"fill",className:"text-red-500 stroke-black stroke-8 drop-shadow-md",size:28})}),p.jsx("div",{className:"rounded-xl flex justify-between items-center",children:p.jsxs("div",{className:"flex flex-col w-full gap-4",children:[p.jsxs("div",{className:"flex justify-between",children:[p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx("div",{className:"text-fg-default text-xs",children:u}),p.jsxs("div",{className:"text-fg-muted text-xs",children:["(",c.toDateString(),")"]})]}),p.jsx("div",{className:"flex items-center gap-2",children:p.jsx(bu,{button:p.jsx(Wc,{className:"w-5 h-5"}),items:[{name:a?"Unpin":"Pin",onClick:()=>s?.()},{name:"Delete",onClick:()=>l?.()}]})})]}),p.jsx(He,{className:"font-bold",to:rr(e),children:n||"Untitled"}),r.length>0&&p.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(h=>p.jsx(He,{to:`/tag/${h.id}`,children:p.jsx(au,{name:h.name})},h.id))})]})},e)]},e)}function gA({id:e,title:n,tags:r,createdAt:a,updatedAt:o}){const i=new Date(Number(a)),s=y2(Number(o));return p.jsx("div",{className:"border-b-2 border-dashed border-border-subtle last:border-b-0",children:p.jsxs("div",{className:"py-4 flex flex-col gap-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-fg-tertiary text-xs font-medium",children:s}),p.jsxs("span",{className:"text-fg-placeholder text-xs",children:["(",i.toDateString(),")"]})]}),p.jsx(He,{className:"font-bold text-fg-default hover:text-accent-primary transition-colors",to:rr(e),children:n||"Untitled"}),r&&r.length>0&&p.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(l=>p.jsx(He,{to:`/tag/${l.id}`,children:p.jsx(au,{name:l.name})},l.id))})]})})}const yA=[{value:"narrow",label:"Narrow",description:"Optimized for reading long-form content"},{value:"wide",label:"Wide",description:"Balanced width suitable for most content"},{value:"full",label:"Full Width",description:"Maximize screen space utilization"}];function vA({isOpen:e,onClose:n,onSave:r,currentLayout:a="wide"}){const[o,i]=d.useState(a);d.useEffect(()=>{e&&i(a)},[e,a]);const s=()=>{r(o),n()};return p.jsxs($e,{isOpen:e,onClose:n,children:[p.jsx($e.Header,{title:"Layout Settings",onClose:n}),p.jsx($e.Body,{children:p.jsx("div",{className:"flex flex-col gap-3 sm:gap-4",children:p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx("label",{className:"text-xs sm:text-sm font-bold text-fg-muted",children:"Note Layout"}),p.jsx("div",{className:"flex flex-col gap-2",children:yA.map(l=>p.jsx(ze,{variant:o===l.value?"primary":"ghost",className:`!justify-start !text-left !h-auto p-3 sm:p-4 ${o===l.value?"shadow-sketchy":""}`,onClick:()=>i(l.value),children:p.jsxs("div",{children:[p.jsx("div",{className:"font-bold text-sm sm:text-base text-fg-default",children:l.label}),p.jsx("div",{className:"text-xs sm:text-sm text-fg-tertiary mt-1 font-medium",children:l.description})]})},l.value))})]})})}),p.jsx($e.Footer,{children:p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(ze,{variant:"ghost",size:"sm",onClick:n,children:"Cancel"}),p.jsx(ze,{size:"sm",onClick:s,children:"Apply"})]})})]})}function xA(e,n,r,a){const o=Math.floor((e+r)/(n+r));return Math.max(o*a,a)}function Uu({minItemWidth:e,gap:n,rows:r,fallback:a,override:o}){const i=d.useRef(null),[s,l]=d.useState(a??r);return d.useLayoutEffect(()=>{if(o||!i.current)return;const h=i.current.offsetWidth,f=xA(h,e,n,r);l(f)},[e,n,r,o]),{containerRef:i,limit:o??s,isAutoLimit:!o}}const bA=240,wA=24,_A=6;function EA(){const[e,n]=Yn(),r=e.get("limit"),{containerRef:a,limit:o,isAutoLimit:i}=Uu({minItemWidth:bA,gap:wA,rows:_A,override:r?Number(r):null}),s=Number(e.get("page"))||1,l=e.get("sortBy")||"updatedAt",c=e.get("sortOrder")||"desc",u=e.get("pinnedFirst")==="true",{onDelete:h,onPinned:f}=As(),m=g=>{n(y=>(Object.entries(g).forEach(([v,b])=>{y.set(v,b)}),y))};return p.jsx(pt,{title:"",variant:"none",children:p.jsxs("div",{ref:a,children:[p.jsx(x5,{itemsPerPage:o,onItemsPerPageChange:g=>m({limit:g.toString(),page:"1"}),isAutoLimit:i,sortBy:l,onSortByChange:g=>m({sortBy:g,page:"1"}),sortOrder:c,onSortOrderChange:g=>m({sortOrder:g,page:"1"}),pinnedFirst:u,onPinnedFirstChange:g=>m({pinnedFirst:g.toString(),page:"1"})}),p.jsx(d.Suspense,{fallback:p.jsxs("div",{className:"grid gap-6 mt-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:[p.jsx(Te,{height:"112px"}),p.jsx(Te,{height:"112px"}),p.jsx(Te,{height:"112px"})]}),children:p.jsx(h2,{searchParams:{offset:(s-1)*o,limit:o,sortBy:l,sortOrder:c,pinnedFirst:u},render:({notes:g,totalCount:y})=>p.jsx(St,{fallback:p.jsx(Dn,{icon:"๐Ÿง ",title:"Ocean is calm",description:"Capture anything and make waves in the ocean!"}),children:g.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"grid gap-6 mt-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:g.map(v=>p.jsx(v2,{...v,onPinned:()=>f(v.id,v.pinned),onDelete:()=>h(v.id)},v.id))}),p.jsx(St,{fallback:null,children:y&&o<y&&p.jsx(nr,{page:s,last:Math.ceil(y/o),onChange:v=>{m({page:v.toString()})}})})]})})})})]})})}const CA="_Reference_rhhoi_1",SA={Reference:CA},AA=ru.bind(SA),RA=fh({type:"reference",propSchema:{id:{default:""},title:{default:"Unknown"}},content:"none"},{render:e=>p.jsx("span",{className:AA("Reference"),children:p.jsx(He,{to:rr(e.inlineContent.props.id),children:p.jsxs("span",{className:"text-fg-default",children:["[",e.inlineContent.props.title,"]"]})})})}),MA="_Tag_lr7ah_1",TA={Tag:MA},PA=ru.bind(TA),NA=fh({type:"tag",propSchema:{id:{default:""},tag:{default:"@Unknown"}},content:"none"},{render:e=>p.jsx("span",{className:PA("Tag"),children:p.jsx(He,{to:pA(e.inlineContent.props.id),children:p.jsx("span",{className:"text-fg-default",children:e.inlineContent.props.tag})})})}),OA=()=>{const e=Ky(),[n,r]=d.useState([]);d.useEffect(()=>{const o=()=>{const s=e.document,l=[],c=u=>{for(const h of u){if(h.type==="heading"){const f=h,m=f.props.level||1,g=f.content?.map(y=>y.text||"").join("")||"";g.trim()&&l.push({id:h.id,level:m,text:g})}h.children&&Array.isArray(h.children)&&c(h.children)}};c(s),r(l)};o();const i=e.onChange?.(o);return()=>{i&&i()}},[e]);const a=o=>{e.setTextCursorPosition(o);const i=document.querySelector(`[data-id="${o}"]`);i&&i.scrollIntoView({behavior:"smooth",block:"center"})};return n.length===0?p.jsx("div",{className:"w-full rounded-sketchy-lg border-2 border-border bg-subtle p-6",children:p.jsxs("div",{className:"flex items-center gap-3 text-fg-tertiary",children:[p.jsx(Xa,{className:"text-2xl flex-shrink-0"}),p.jsxs("div",{children:[p.jsx("div",{className:"font-medium text-base mb-1",children:"Table of Contents"}),p.jsx("div",{className:"text-sm opacity-75",children:"Add headings to your document to generate a table of contents"})]})]})}):p.jsxs("div",{className:"w-full rounded-sketchy-lg border-2 border-border bg-subtle p-6",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[p.jsx(Xa,{className:"text-xl text-fg-muted"}),p.jsx("h3",{className:"text-base font-bold text-fg",children:"Table of Contents"})]}),p.jsx("nav",{className:"space-y-0.5",children:n.map(o=>{const i=(o.level-1)*16,s=o.level===1;return p.jsx("button",{onClick:()=>a(o.id),className:`
211
+ block w-full text-left rounded-sketchy-sm px-3 py-2 transition-all duration-150
212
+ hover:bg-hover
213
+ hover:translate-x-1
214
+ ${s?"text-sm font-semibold text-fg":"text-sm text-fg-muted"}
215
+ `,style:{paddingLeft:`${12+i}px`},children:p.jsxs("span",{className:"flex items-center gap-2",children:[s&&p.jsx("span",{className:"w-2 h-2 rounded-sketchy-xs bg-fg-default flex-shrink-0"}),p.jsx("span",{className:"line-clamp-2",children:o.text})]})},o.id)})})]})},jA=Gy({type:"tableOfContents",propSchema:{},content:"none"},{render:()=>p.jsx(OA,{})})(),DA=ev.create({inlineContentSpecs:{...nv,tag:NA,reference:RA},blockSpecs:{...tv,tableOfContents:jA}}),kA=({editor:e})=>p.jsx(Sc,{triggerCharacter:"/",getItems:async n=>rv([...Yy(e).filter(r=>r.title!=="Audio"&&r.title!=="Video"&&r.title!=="File"),{title:"Table of Contents",subtext:"Insert a table of contents based on headings",onItemClick:()=>{e.insertBlocks([{type:"tableOfContents"}],e.getTextCursorPosition().block,"after")},aliases:["toc","table of contents","contents","outline","index"],group:"Other",icon:p.jsx(Xa,{})}],n)}),IA=({onClick:e})=>p.jsx(Sc,{triggerCharacter:"[",getItems:async n=>{const r=await Hu({query:n,limit:5});if(r.type==="error")return[];const{notes:a}=r.allNotes;return a.map(o=>({title:o.title,onItemClick:()=>e({type:"reference",props:{id:o.id,title:o.title}})}))}}),LA=({onClick:e})=>p.jsx(Sc,{triggerCharacter:"@",getItems:async n=>{const r=await zu({query:n,limit:5});if(r.type==="error")return[];const{tags:a}=r.allTags,o=a.some(s=>s.name!==`@${n}`),i=[{title:"Add a new tag",onItemClick:async()=>{const s=await QS({name:"@"+n});if(s.type==="error")return;const{id:l,name:c}=s.createTag;e({type:"tag",props:{id:l,tag:c}})}}];return a.length===0?i:a.map(s=>({title:s.name,onItemClick:()=>e({type:"tag",props:{id:s.id,tag:s.name}})})).concat(n&&o?i:[])}});async function FA(e){return new Promise((n,r)=>{const a=new FileReader;a.readAsDataURL(e),a.onload=()=>n(a.result),a.onerror=o=>r(o)})}const $A=d.forwardRef(({content:e,editable:n,onChange:r},a)=>{const{theme:o}=oa(s=>s),i=Qy({schema:DA,initialContent:e&&JSON.parse(e)||void 0,uploadFile:async s=>nA({base64:await FA(s)})},[]);return d.useImperativeHandle(a,()=>({getContent:()=>JSON.stringify(i.document)})),p.jsxs(Xy,{slashMenu:!1,theme:o,editor:i,editable:n,onChange:r,children:[p.jsx(kA,{editor:i}),p.jsx(IA,{onClick:s=>{i.insertInlineContent([s," "])}}),p.jsx(LA,{onClick:s=>{i.insertInlineContent([s," "])}})]})}),HA=async e=>{const{noteId:n,reminderDate:r,priority:a="medium",content:o}=e;return Pe(`
216
+ mutation CreateReminder($noteId: ID!, $reminderDate: String!, $priority: ReminderPriority, $content: String) {
217
+ createReminder(
218
+ noteId: $noteId,
219
+ reminderDate: $reminderDate,
220
+ priority: $priority,
221
+ content: $content
222
+ ) {
223
+ id
224
+ noteId
225
+ reminderDate
226
+ completed
227
+ priority
228
+ createdAt
229
+ updatedAt
230
+ }
231
+ }
232
+ `,{noteId:n,reminderDate:r,priority:a,content:o})},zA=async({id:e,reminderDate:n,completed:r,priority:a,content:o})=>{const i={id:e};return n&&(i.reminderDate=n.toISOString()),r!==void 0&&(i.completed=r),a&&(i.priority=a),o!==void 0&&(i.content=o),Pe(`
233
+ mutation UpdateReminder(
234
+ $id: ID!,
235
+ $reminderDate: String,
236
+ $completed: Boolean,
237
+ $priority: ReminderPriority,
238
+ $content: String
239
+ ) {
240
+ updateReminder(
241
+ id: $id,
242
+ reminderDate: $reminderDate,
243
+ completed: $completed,
244
+ priority: $priority,
245
+ content: $content
246
+ ) {
247
+ id
248
+ noteId
249
+ reminderDate
250
+ completed
251
+ priority
252
+ createdAt
253
+ updatedAt
254
+ }
255
+ }
256
+ `,i)},UA=async e=>Pe(`
257
+ mutation DeleteReminder($id: ID!) {
258
+ deleteReminder(id: $id)
259
+ }
260
+ `,{id:e});function x2(){const e=nu(),n=Qn(),r=d.useCallback(async(i,s,l="medium",c,u)=>{const h=await HA({noteId:i,reminderDate:s,priority:l,content:u});if(h.type==="error"){e(h.errors[0].message);return}n.invalidateQueries({queryKey:["noteReminders",i]}),n.invalidateQueries({queryKey:["upcomingReminders"]}),c&&c()},[n,e]),a=d.useCallback(async(i,s,l,c)=>{const u=await zA({id:i,...l});if(u.type==="error"){e(u.errors[0].message);return}n.invalidateQueries({queryKey:["noteReminders",s]}),n.invalidateQueries({queryKey:["upcomingReminders"]}),c&&c()},[n,e]),o=d.useCallback(async(i,s,l)=>{const c=await UA(i);if(c.type==="error"){e(c.errors[0].message);return}n.invalidateQueries({queryKey:["noteReminders",s]}),n.invalidateQueries({queryKey:["upcomingReminders"]}),l&&l()},[n,e]);return{onCreate:r,onUpdate:a,onDelete:o}}const t0={low:{active:"bg-accent-success text-fg-default border-2 border-border shadow-sketchy",inactive:"bg-subtle text-fg-muted border-2 border-transparent"},medium:{active:"bg-pastel-yellow-200 dark:bg-elevated text-fg-default border-2 border-border shadow-sketchy",inactive:"bg-subtle text-fg-muted border-2 border-transparent"},high:{active:"bg-accent-danger text-fg-default border-2 border-border shadow-sketchy",inactive:"bg-subtle text-fg-muted border-2 border-transparent"}};function VA({isOpen:e,onClose:n,onSave:r,reminder:a,mode:o}){const[i,s]=d.useState(new Date),[l,c]=d.useState("medium"),[u,h]=d.useState("");d.useEffect(()=>{e&&o==="edit"&&a?(s(new Date(Number(a.reminderDate))),c(a.priority||"medium"),h(a.content||"")):e&&o==="create"&&(s(new Date),c("medium"),h(""))},[e,o,a]);const f=()=>{r(i,l,u||void 0),n()},m=g=>l===g?t0[g].active:t0[g].inactive;return p.jsxs($e,{isOpen:e,onClose:n,children:[p.jsx($e.Header,{title:o==="create"?"Create Reminder":"Edit Reminder",onClose:n}),p.jsx($e.Body,{children:p.jsxs("div",{className:"flex flex-col gap-3 sm:gap-4",children:[p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(Gn,{children:"Date & Time"}),p.jsx(Ha,{type:"datetime-local",size:"sm",value:ve(i).format("YYYY-MM-DDTHH:mm"),onChange:g=>s(new Date(g.target.value))})]}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(Gn,{children:"Content"}),p.jsx(Bm,{size:"sm",placeholder:"Enter reminder content (optional)",value:u,onChange:g=>h(g.target.value)})]}),p.jsxs("div",{className:"flex flex-col gap-2",children:[p.jsx(Gn,{children:"Priority"}),p.jsxs(Eu,{type:"single",value:l,onValueChange:g=>g&&c(g),className:"border-none gap-1.5 sm:gap-2",children:[p.jsx(Br,{value:"low",className:`flex-1 rounded-[8px_3px_9px_2px/3px_6px_3px_7px] font-bold ${m("low")}`,children:"Low"}),p.jsx(Br,{value:"medium",className:`flex-1 rounded-[8px_3px_9px_2px/3px_6px_3px_7px] font-bold ${m("medium")}`,children:"Medium"}),p.jsx(Br,{value:"high",className:`flex-1 rounded-[8px_3px_9px_2px/3px_6px_3px_7px] font-bold ${m("high")}`,children:"High"})]})]})]})}),p.jsx($e.Footer,{children:p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(ze,{variant:"ghost",size:"sm",onClick:n,children:"Cancel"}),p.jsx(ze,{size:"sm",onClick:f,children:o==="create"?"Create":"Save"})]})})]})}const ZA="_pulsingText_jjwi3_1",BA="_urgent_jjwi3_7",n0={pulsingText:ZA,urgent:BA};function qA({noteId:e}){const[n,r]=d.useState(!1),[a,o]=d.useState(!1),[i,s]=d.useState("create"),[l,c]=d.useState(void 0),{onCreate:u,onUpdate:h,onDelete:f}=x2(),m=()=>{s("create"),c(void 0),o(!0)},g=E=>{s("edit"),c(E),o(!0)},y=(E,C,S)=>{i==="create"?u(e,E,C,()=>{o(!1)},S):i==="edit"&&l&&h(l.id,e,{reminderDate:E,priority:C,content:S},()=>{o(!1)})},v=E=>{h(E.id,e,{completed:!E.completed})},b=E=>{const C=ve(Number(E)),S=ve();return C.isSame(S,"day")?`Today at ${C.format("HH:mm")}`:C.isSame(S.add(1,"day"),"day")?`Tomorrow at ${C.format("HH:mm")}`:C.format("YYYY-MM-DD HH:mm")},x=E=>{const C=ve(Number(E)),S=ve(),M=C.diff(S,"hour");return M<=6?"high":M<=24?"medium":"low"},w=E=>{const C=ve(Number(E)),S=ve(),M=C.diff(S,"hour"),_=C.diff(S,"minute")%60;return M<0||_<0?"Overdue":M===0?`${_}m remaining`:`${M}h ${_}m remaining`};return p.jsxs("div",{className:"p-4 rounded-sketchy-lg mb-5 border-2 border-border bg-surface/50",children:[p.jsxs("div",{className:"flex justify-between items-center mb-3",children:[p.jsxs("button",{onClick:()=>r(!n),className:"flex items-center gap-2 px-2 py-1 rounded-sketchy-sm hover:bg-hover-subtle transition-colors",children:[n?p.jsx($a,{size:14}):p.jsx(qc,{size:14}),p.jsx("p",{className:"text-sm font-bold",children:"Reminders"})]}),!n&&p.jsxs(ze,{size:"sm",variant:"ghost",onClick:m,children:[p.jsx(C1,{className:"w-3 h-3"}),p.jsx("span",{className:"hidden sm:inline text-xs",children:"Add"})]})]}),!n&&p.jsx(p2,{noteId:e,searchParams:{offset:0,limit:9999},render:({reminders:E,totalCount:C})=>p.jsx("div",{className:"flex flex-col gap-2",children:E.length===0?p.jsx("p",{className:"text-fg-placeholder text-xs",children:C===0?"No reminders.":"No incomplete reminders."}):p.jsx("div",{className:"flex flex-col gap-1.5",children:E.map(S=>{const M=S.priority||x(S.reminderDate),_=w(S.reminderDate);return p.jsxs("div",{className:`flex items-start gap-2 p-2 rounded-sketchy-md transition-colors ${S.completed?"bg-muted":hA[M]}`,children:[p.jsx(ou,{checked:S.completed,onChange:()=>v(S),size:"sm"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:`font-bold text-xs text-fg-muted ${S.completed?"line-through opacity-50":""}`,children:b(S.reminderDate)}),S.content&&p.jsx("div",{className:`text-xs text-fg-tertiary ${S.completed?"line-through opacity-50":""} truncate`,children:S.content}),!S.completed&&p.jsx("span",{className:`text-[10px] font-medium ${n0.pulsingText} ${M==="high"?n0.urgent:"text-fg-placeholder"}`,children:_})]}),p.jsx(bu,{button:p.jsx(Wc,{size:14,className:"text-fg-placeholder"}),items:[{name:"Edit",onClick:()=>g(S)},{name:"Delete",onClick:()=>f(S.id,e)}]})]},S.id)})})})}),p.jsx(VA,{isOpen:a,onClose:()=>o(!1),onSave:y,reminder:l,mode:i})]})}function WA(){const{id:e}=Ic(),n=Ar(),r=nu(),a=d.useRef(null),o=d.useRef(null),[i,s]=d.useState(""),[l,c]=d.useState({}),[u,h]=d.useState(!1),[f,m]=d.useState("wide"),[g,y]=d.useState(!1),[v,b]=zg(1e3),{data:x,isError:w,isLoading:E}=On({queryKey:["note",e],async queryFn(){const O=await Pe(`
261
+ query {
262
+ note(id: "${e}") {
263
+ title
264
+ pinned
265
+ layout
266
+ content
267
+ updatedAt
268
+ }
269
+ }
270
+ `);if(O.type==="error")throw r(O.errors[0].message),O;return s(O.note.title),h(O.note.pinned),m(O.note.layout||"wide"),c(H=>Object.assign({},H,{[e]:ve(Number(O.note.updatedAt)).format("YYYY-MM-DD HH:mm:ss")})),O.note},enabled:!!e,gcTime:0}),C=async({title:O="",content:H=""})=>{!e||E||b(async()=>{const Z=await Qf({id:e,title:O,content:H});if(Z.type==="error"){r(Z.errors[0].message);return}s(O),c(R=>Object.assign({},R,{[e]:ve().format("YYYY-MM-DD HH:mm:ss")}))})},S=()=>{C({title:o.current?.value,content:a?.current?.getContent()})},M=async O=>{if(!e||E)return;const H=await Qf({id:e,layout:O});if(H.type==="error"){r(H.errors[0].message);return}m(O),r("Layout has been updated.")},{onCreate:_,onDelete:A,onPinned:j}=As();if(w)return p.jsx("div",{className:"h-full flex justify-center items-center",children:p.jsxs("div",{onClick:()=>n(-1),className:"flex justify-center items-center gap-2 cursor-pointer animate-bounce",children:[p.jsx(Zr,{className:"w-6"}),p.jsx("div",{className:"font-bold text-lg",children:"take you back"})]})});const P=()=>({narrow:"max-w-[640px]",wide:"max-w-[896px]",full:"max-w-full px-4"})[f];return p.jsx(pt,{title:i,variant:"none",children:p.jsxs("main",{className:`mx-auto ${P()}`,children:[E&&p.jsxs(p.Fragment,{children:[p.jsx(Te,{className:"mb-8",height:"66px"}),p.jsx(Te,{className:"ml-12 mb-8",height:"150px"})]}),x&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{style:{zIndex:"1001"},className:"sticky top-20 mb-8 flex items-center justify-between gap-3 p-3 px-4 border-2 border-border rounded-sketchy-lg bg-surface/90 backdrop-blur-sm shadow-sketchy",children:[p.jsxs("div",{className:"flex flex-col flex-1 gap-1",children:[p.jsx("input",{ref:o,placeholder:"Title",className:"text-md font-bold outline-none bg-transparent w-full",type:"text",defaultValue:x.title,onChange:S}),e&&l[e]&&p.jsxs("div",{className:"text-fg-placeholder text-xs",children:["Last saved at ",l[e]]})]}),p.jsxs("div",{className:"flex gap-2 items-center",children:[p.jsx(bu,{button:p.jsx(Wc,{className:"w-5 h-5"}),items:[{name:u?"Unpin":"Pin",onClick:()=>j(e,u,()=>{h(O=>!O)})},{name:"Clone this note",onClick:()=>_(o.current?.value||"untitled",a?.current?.getContent()||"",f)},{name:"Delete",onClick:()=>A(e,()=>{r("The note has been deleted.")})},{name:"Change layout",onClick:()=>y(!0)}]}),p.jsx(ze,{size:"sm",isLoading:v,onClick:S,children:"Save"})]})]}),p.jsx($A,{ref:a,content:x.content,onChange:S})]}),e&&p.jsx(d.Suspense,{fallback:p.jsx(Te,{height:"80px"}),children:p.jsx(qA,{noteId:e})}),p.jsx(d.Suspense,{fallback:p.jsx(Te,{height:"80px"}),children:p.jsx(oA,{noteId:e,render:O=>O&&O.length>0&&p.jsxs("div",{className:"p-4 rounded-sketchy-lg border-2 border-border bg-surface/50",children:[p.jsx("p",{className:"text-sm font-bold mb-2",children:"Back References"}),p.jsx("ul",{className:"text-sm flex flex-col gap-1",children:O?.map(H=>p.jsx("li",{children:p.jsxs(He,{to:rr(H.id),className:"block px-2 py-1 rounded-sketchy-sm text-fg-secondary hover:bg-hover transition-colors",children:["- ",H.title]})},H.id))})]})})}),p.jsx(vA,{isOpen:g,onClose:()=>y(!1),onSave:M,currentLayout:f})]})})}function GA(){const[e,n]=Yn(),r=10,a=Number(e.get("page"))||1,o=e.get("query")||"";return p.jsx(pt,{title:`Search "${o}"`,variant:"none",children:p.jsx("main",{className:"mx-auto max-w-[896px]",children:p.jsx(d.Suspense,{fallback:null,children:p.jsx(h2,{searchParams:{query:o,limit:r,offset:(a-1)*r,fields:["content"]},render:({notes:i,totalCount:s})=>p.jsxs(p.Fragment,{children:[p.jsx(St,{fallback:p.jsx(Dn,{icon:"๐Ÿ‘€",title:"No results found",description:"Try searching for something else."}),children:i.length>0&&i.map(l=>p.jsxs("div",{className:"mb-5",children:[p.jsx("div",{className:"font-semibold text-lg mb-1",children:p.jsx(He,{to:rr(l.id),children:p.jsx(df,{match:o,children:l.title})})}),p.jsx("div",{className:"bg-muted p-3 rounded-lg",children:JSON.parse(l.content).filter(c=>JSON.stringify(c).includes(o)).map(c=>p.jsx(df,{match:o,children:JSON.stringify(c)}))})]},l.id))}),p.jsx(St,{fallback:null,children:s&&r<s&&p.jsx(nr,{page:a,last:Math.ceil(s/r),onChange:l=>{n(c=>(c.set("page",l.toString()),c))}})})]})})})})})}function KA(){const{id:e}=Ic(),[n,r]=Yn(),a=25,o=Number(n.get("page"))||1,{onDelete:i,onPinned:s}=As();return p.jsx(pt,{title:"Tag",variant:"subtle",children:p.jsx(d.Suspense,{fallback:p.jsxs("div",{className:"grid gap-6 mt-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:[p.jsx(Te,{height:"112px"}),p.jsx(Te,{height:"112px"}),p.jsx(Te,{height:"112px"})]}),children:p.jsx(lA,{searchParams:{query:e,offset:(o-1)*a,limit:a},render:({notes:l,totalCount:c})=>p.jsx(St,{fallback:p.jsx(Dn,{icon:"๐Ÿง ",title:"Ocean is calm",description:"Capture anything and make waves in the ocean!"}),children:l.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"grid gap-6 mt-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:l.map(u=>p.jsx(v2,{...u,onPinned:()=>s(u.id,u.pinned),onDelete:()=>i(u.id)},u.id))}),p.jsx(St,{fallback:null,children:c&&a<c&&p.jsx(nr,{page:o,last:Math.ceil(c/a),onChange:u=>{r(h=>(h.set("page",u.toString()),h))}})})]})})})})})}const YA=100,QA=8,XA=12;function JA(){const[e,n]=Yn(),{containerRef:r,limit:a}=Uu({minItemWidth:YA,gap:QA,rows:XA}),o=Number(e.get("page"))||1;return p.jsx(pt,{title:"Tags",description:"Organize and browse notes by tags",children:p.jsx("div",{ref:r,children:p.jsx(d.Suspense,{fallback:p.jsxs("div",{className:"flex flex-wrap gap-2",children:[p.jsx(Te,{width:"90px",height:"36px"}),p.jsx(Te,{width:"120px",height:"36px"}),p.jsx(Te,{width:"80px",height:"36px"}),p.jsx(Te,{width:"100px",height:"36px"}),p.jsx(Te,{width:"110px",height:"36px"}),p.jsx(Te,{width:"70px",height:"36px"})]}),children:p.jsx(iA,{searchParams:{offset:(o-1)*a,limit:a},render:({tags:i,totalCount:s})=>p.jsx(St,{fallback:p.jsx(Dn,{icon:"๐Ÿค”",title:"There are no tags",description:"Try to tag some notes using <@> key."}),children:i.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"flex flex-wrap gap-2",children:i.map(l=>p.jsx(He,{to:`/tag/${l.id}`,children:p.jsxs("div",{className:"bg-pastel-teal-200 dark:bg-muted px-3 py-1.5 rounded-[8px_3px_9px_2px/3px_6px_3px_7px] border-2 border-border shadow-sketchy hover:shadow-sketchy-lg hover:-translate-y-0.5 active:translate-x-0.5 active:translate-y-0.5 active:shadow-none transition-all duration-200 font-bold text-sm text-fg-default whitespace-nowrap",children:[l.name," ",p.jsxs("span",{className:"text-fg-tertiary text-xs",children:["(",l.referenceCount,")"]})]})},l.id))}),p.jsx(St,{fallback:null,children:s&&a<s&&p.jsx(nr,{page:o,last:Math.ceil(s/a),onChange:l=>{n(c=>(c.set("page",l.toString()),c))}})})]})})})})})})}const eR=({note:e,type:n})=>p.jsx(He,{to:rr(e.id),className:"block min-h-[44px]",children:p.jsxs("div",{className:`
271
+ ${g2(e.title)}
272
+ rounded-sketchy-sm
273
+ px-2 py-1.5
274
+ hover:brightness-95 dark:hover:brightness-110
275
+ transition-all
276
+ h-full flex flex-col justify-center
277
+ `,children:[p.jsx("div",{className:"font-bold text-xs line-clamp-1 text-fg-default",children:e.title}),p.jsx("div",{className:"text-fg-secondary text-[10px] font-medium",children:ve(Number(n==="create"?e.createdAt:e.updatedAt)).format("HH:mm")})]})}),tR=({reminder:e,isPast:n})=>{const r=n&&!e.completed,a=e.priority||"medium";return p.jsx(He,{to:rr(e.note?.id||""),className:"block min-h-[44px]",children:p.jsxs("div",{className:`
278
+ rounded-sketchy-sm
279
+ px-2 py-1.5
280
+ hover:brightness-95 dark:hover:brightness-110
281
+ transition-all
282
+ h-full flex flex-col justify-center
283
+ ${r?m2:Za[a]}
284
+ ${e.completed?"opacity-40":""}
285
+ `,children:[p.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[p.jsx(a1,{size:12,className:"text-fg-muted"}),r&&p.jsx("span",{className:"text-[9px] font-bold text-fg-error",children:"!"})]}),p.jsx("div",{className:`font-bold line-clamp-1 text-xs text-fg-default ${e.completed?"line-through":""}`,children:e.content||e.note?.title||"No title"}),p.jsx("div",{className:"text-fg-secondary text-[10px] font-medium",children:ve(Number(e.reminderDate)).format("HH:mm")})]})})},cl=3,r0=(e,n,r)=>e.map(a=>a.type==="note"?p.jsx(eR,{note:a.item,type:n},`note-${a.item.id}`):p.jsx(tR,{reminder:a.item,isPast:r},`reminder-${a.item.id}`)),nR=({day:e,isCurrentMonth:n,isSunday:r,isToday:a,isPast:o,notes:i,reminders:s,type:l})=>{const[c,u]=d.useState(!1),h=d.useMemo(()=>{const b=i.map(w=>({type:"note",item:w})),x=s.map(w=>({type:"reminder",item:w}));return o?[...b,...x]:[...x,...b]},[o,i,s]),f=h.length>cl,m=d.useCallback(()=>u(!0),[]),g=d.useCallback(()=>u(!1),[]),y=()=>n?a?"border-border outline outline-1 outline-border":"bg-surface border-border-subtle":"bg-muted/30 border-border-subtle",v=()=>a?"bg-accent-danger text-fg-default border-2 border-border font-bold":n?r?"text-rose-500 dark:text-rose-400 font-bold":"text-fg-secondary font-bold":"text-fg-disabled";return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:`min-h-[140px] rounded-sketchy-sm border p-2 ${y()}`,children:[p.jsx("div",{className:"flex justify-end mb-2",children:p.jsx("span",{className:`
286
+ flex items-center justify-center
287
+ w-7 h-7 text-sm
288
+ rounded-sketchy-xs
289
+ ${v()}
290
+ `,children:e})}),n&&h.length>0&&p.jsxs("div",{className:"flex flex-col gap-1",children:[r0(h.slice(0,cl),l,o),f&&p.jsxs("button",{type:"button",onClick:m,className:"text-center text-[10px] font-bold text-fg-tertiary py-1 cursor-pointer hover:text-fg-muted hover:bg-hover-subtle rounded-sketchy-xs transition-colors",children:["+",h.length-cl," more"]})]})]}),f&&p.jsxs($e,{isOpen:c,onClose:g,children:[p.jsx($e.Header,{title:`${e}์ผ`,onClose:g}),p.jsx($e.Body,{children:p.jsx("div",{className:"flex flex-col gap-2 max-h-[60vh] overflow-y-auto",children:r0(h,l,o)})})]})]})},rR=d.memo(nR),aR=["January","February","March","April","May","June","July","August","September","October","November","December"],oR=({month:e,year:n,onPrevMonth:r,onNextMonth:a,onToday:o})=>p.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mb-6",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("h1",{className:"text-2xl sm:text-3xl font-bold",children:aR[e-1]}),p.jsx("span",{className:"text-xl sm:text-2xl text-fg-placeholder",children:n})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(ze,{variant:"ghost",size:"sm",onClick:o,children:"Today"}),p.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:r,children:p.jsx(Zr,{width:18,height:18})}),p.jsx(ze,{variant:"ghost",size:"icon-sm",onClick:a,children:p.jsx($a,{width:18,height:18})})]})]}),iR=[{label:"High",className:Za.high},{label:"Medium",className:Za.medium},{label:"Low",className:Za.low},{label:"Overdue",className:m2}],b2=()=>p.jsx("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:iR.map(({label:e,className:n})=>p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("div",{className:`w-3 h-3 rounded-sketchy-xs ${n}`}),p.jsx("span",{className:"text-fg-tertiary font-medium",children:e})]},e))}),sR=`
291
+ query NotesInDateRange($dateRange: DateRangeInput) {
292
+ notesInDateRange(dateRange: $dateRange) {
293
+ id
294
+ title
295
+ createdAt
296
+ updatedAt
297
+ }
298
+ }
299
+ `,lR=`
300
+ query RemindersInDateRange($dateRange: DateRangeInput) {
301
+ remindersInDateRange(dateRange: $dateRange) {
302
+ id
303
+ noteId
304
+ reminderDate
305
+ completed
306
+ priority
307
+ content
308
+ note {
309
+ id
310
+ title
311
+ }
312
+ }
313
+ }
314
+ `,cR=async e=>{const n=await Pe(sR,{dateRange:e});if(n.type==="error")throw n;return n.notesInDateRange},uR=async e=>{const n=await Pe(lR,{dateRange:e});if(n.type==="error")throw n;return n.remindersInDateRange},dR=({year:e,month:n})=>{const r=`${e}-${String(n).padStart(2,"0")}-01`,a=n===12?1:n+1,i=`${n===12?e+1:e}-${String(a).padStart(2,"0")}-01`,s={start:r,end:i},l=On({queryKey:["notesInDateRange",e,n],queryFn:()=>cR(s)}),c=On({queryKey:["remindersInDateRange",e,n],queryFn:()=>uR(s)});return{notes:l.data??[],reminders:c.data??[],isLoading:l.isLoading||c.isLoading,isError:l.isError||c.isError}},fR=["SUN","MON","TUE","WED","THU","FRI","SAT"],hR=[],pR=[];function mR(){const[e,n]=Yn(),r=Number(e.get("year"))||ve().year(),a=Number(e.get("month"))||ve().month()+1,o=e.get("type")||"create",{notes:i,reminders:s,isLoading:l,isError:c}=dR({year:r,month:a}),u=d.useMemo(()=>{const y=ve(),v=`${y.year()}-${y.month()+1}-${y.date()}`,b=new Map;for(const R of i){const k=ve(Number(o==="create"?R.createdAt:R.updatedAt)),T=`${k.year()}-${k.month()+1}-${k.date()}`,F=b.get(T)||[];F.push(R),b.set(T,F)}const x=new Map;for(const R of s){const k=ve(Number(R.reminderDate)),T=`${k.year()}-${k.month()+1}-${k.date()}`,F=x.get(T)||[];F.push(R),x.set(T,F)}const w=new Date(r,a-1,1),E=new Date(r,a,0),C=w.getDay(),S=E.getDate(),M=[],_=a===1?12:a-1,A=a===1?r-1:r,j=new Date(A,_,0).getDate();for(let R=C-1;R>=0;R--)M.push({day:j-R,isCurrentMonth:!1,year:A,month:_});for(let R=1;R<=S;R++)M.push({day:R,isCurrentMonth:!0,year:r,month:a});const P=(C+S)%7,O=P===0?0:7-P,H=a===12?1:a+1,Z=a===12?r+1:r;for(let R=1;R<=O;R++)M.push({day:R,isCurrentMonth:!1,year:Z,month:H});return M.map((R,k)=>{const T=`${R.year}-${R.month}-${R.day}`,F=ve(`${R.year}-${String(R.month).padStart(2,"0")}-${String(R.day).padStart(2,"0")}`);return{key:T,day:R.day,isCurrentMonth:R.isCurrentMonth,isSunday:k%7===0,isToday:T===v,isPast:F.isBefore(y,"day"),notes:b.get(T)||hR,reminders:x.get(T)||pR}})},[r,a,i,s,o]),h=()=>{const y=a===1?12:a-1,v=a===1?r-1:r;n(b=>(b.set("month",y.toString()),b.set("year",v.toString()),b))},f=()=>{const y=a===12?1:a+1,v=a===12?r+1:r;n(b=>(b.set("month",y.toString()),b.set("year",v.toString()),b))},m=()=>{n(y=>(y.set("month",(ve().month()+1).toString()),y.set("year",ve().year().toString()),y))},g=y=>{y&&n(v=>(y==="create"?v.delete("type"):v.set("type",y),v))};return p.jsx(pt,{title:"Calendar",variant:"none",children:p.jsxs("div",{className:"w-full px-4 sm:px-6 py-6 sm:py-10 max-w-screen-2xl mx-auto",children:[c?p.jsx(fg,{children:"Failed to load calendar data. Please try again later."}):p.jsxs("div",{className:"bg-surface rounded-[16px_5px_17px_5px/5px_13px_5px_15px] p-3 sm:p-4 border-2 border-border shadow-sketchy overflow-x-auto",children:[p.jsx(oR,{month:a,year:r,onPrevMonth:h,onNextMonth:f,onToday:m}),p.jsxs("div",{className:"min-w-[900px]",children:[p.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:fR.map((y,v)=>p.jsx("div",{className:`
315
+ py-2 text-center text-xs font-bold tracking-wider
316
+ ${v===0?"text-rose-500":"text-fg-secondary"}
317
+ `,children:y},y))}),l?p.jsx("div",{className:"grid grid-cols-7 gap-1",children:Array.from({length:35}).map((y,v)=>p.jsx(Te,{height:140},v))}):p.jsx("div",{className:"grid grid-cols-7 gap-1",children:u.map(y=>p.jsx(rR,{day:y.day,isCurrentMonth:y.isCurrentMonth,isSunday:y.isSunday,isToday:y.isToday,isPast:y.isPast,notes:y.notes,reminders:y.reminders,type:o},y.key))})]})]}),p.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mt-6",children:[p.jsx(b2,{}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("span",{className:"text-sm text-fg-tertiary font-bold",children:"Display by:"}),p.jsxs(Eu,{type:"single",variant:"pills",size:"sm",value:o,onValueChange:g,children:[p.jsx(Br,{value:"create",children:"Create date"}),p.jsx(Br,{value:"update",children:"Update date"})]})]})]})]})})}const gR="_urgentPulsing_1th0h_47",yR="_priorityHigh_1th0h_51",vR="_priorityMedium_1th0h_67",ul={urgentPulsing:gR,priorityHigh:yR,priorityMedium:vR};function xR({reminder:e,onUpdate:n,onDelete:r}){const a=l=>{const c=ve(Number(l)),u=ve();return c.isSame(u,"day")?`Today at ${c.format("HH:mm")}`:c.isSame(u.add(1,"day"),"day")?`Tomorrow at ${c.format("HH:mm")}`:c.format("YYYY-MM-DD HH:mm")},o=l=>{const c=ve(Number(l)),u=ve(),h=c.diff(u,"hour"),f=c.diff(u,"minute")%60;return h<0||f<0?"Overdue":h===0?`${f}m remaining`:`${h}h ${f}m remaining`},i=o(e.reminderDate)==="Overdue",s=e.priority==="high"?ul.priorityHigh:e.priority==="medium"?ul.priorityMedium:"";return p.jsxs("div",{className:`flex justify-between items-center p-4 border-2 rounded-[12px_4px_13px_3px/4px_10px_4px_12px] shadow-sketchy ${Za[e.priority||"low"]} border-border-secondary ${s}`,children:[p.jsxs("div",{className:"flex flex-col",children:[p.jsx(He,{to:rr(e.note?.id||""),className:"font-bold hover:underline flex items-center gap-2 text-fg-default",children:e.note?.title||"Untitled Note"}),e.content&&p.jsx("p",{className:"text-sm text-fg-muted mt-1 mb-1 font-medium",children:e.content}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-sm text-fg-secondary font-medium",children:a(e.reminderDate)}),p.jsx("span",{className:`text-xs font-bold ${i?`text-fg-error ${ul.urgentPulsing}`:"text-fg-tertiary"}`,children:o(e.reminderDate)})]})]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(ze,{variant:"soft-success",size:"sm",onClick:()=>n(e.id,e.noteId.toString(),{completed:!0}),children:"Complete"}),p.jsx(ze,{variant:"soft-danger",size:"sm",onClick:()=>r(e.id,e.noteId.toString()),children:"Delete"})]})]})}function bR(){const[e,n]=Yn(),{onUpdate:r,onDelete:a}=x2(),o=25,i=Number(e.get("page"))||1;return p.jsx(pt,{title:"Reminders",description:"Manage all your note reminders in one place",headerRight:p.jsx(b2,{}),children:p.jsx(d.Suspense,{fallback:p.jsxs("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:[p.jsx(Te,{height:"60px"}),p.jsx(Te,{height:"60px"}),p.jsx(Te,{height:"60px"}),p.jsx(Te,{height:"60px"})]}),children:p.jsx(p2,{searchParams:{offset:(i-1)*o,limit:o},render:({reminders:s,totalCount:l})=>p.jsxs(St,{fallback:p.jsx(Dn,{icon:"๐Ÿ””",title:"No upcoming reminders",description:"Add reminders to your notes to see them here"}),children:[s.length>0&&p.jsx("div",{className:"grid gap-4 grid-cols-1 lg:grid-cols-2",children:s.map(c=>p.jsx(xR,{reminder:c,onUpdate:r,onDelete:a},c.id))}),p.jsx(St,{fallback:null,children:l&&o<l&&p.jsx(nr,{page:i,last:Math.ceil(l/o),onChange:c=>{n(u=>(u.set("page",c.toString()),u))}})})]})})})})}function wR(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,o,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==n);c=!0);}catch(h){u=!0,o=h}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function _R(e,n,r){return n=PR(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function a0(e,n){return SR(e)||wR(e,n)||w2(e,n)||MR()}function ER(e){return CR(e)||AR(e)||w2(e)||RR()}function CR(e){if(Array.isArray(e))return rc(e)}function SR(e){if(Array.isArray(e))return e}function AR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function w2(e,n){if(e){if(typeof e=="string")return rc(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rc(e,n)}}function rc(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=new Array(n);r<n;r++)a[r]=e[r];return a}function RR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
318
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
319
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TR(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,n);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function PR(e){var n=TR(e,"string");return typeof n=="symbol"?n:String(n)}var NR=function(n,r){var a=new Set(r);return Object.assign.apply(Object,[{}].concat(ER(Object.entries(n).filter(function(o){var i=a0(o,1),s=i[0];return!a.has(s)}).map(function(o){var i=a0(o,2),s=i[0],l=i[1];return _R({},s,l)}))))};function ac(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function OR(e){if(Array.isArray(e))return e}function jR(e){if(Array.isArray(e))return ac(e)}function DR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kR(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,o,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,n!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==n);c=!0);}catch(h){u=!0,o=h}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function IR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
320
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
321
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FR(e,n){return OR(e)||kR(e,n)||_2(e,n)||IR()}function o0(e){return jR(e)||DR(e)||_2(e)||LR()}function _2(e,n){if(e){if(typeof e=="string")return ac(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ac(e,n):void 0}}function $R(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.wrapperElementType,a=r===void 0?"div":r,o=n.nodeMapper,i=o===void 0?function(h){return h}:o,s=n.methodNames,l=s===void 0?[]:s,c=n.initPropNames,u=c===void 0?[]:c;return d.forwardRef(function(h,f){var m=d.useRef(),g=d.useMemo(function(){var b=Object.fromEntries(u.filter(function(x){return h.hasOwnProperty(x)}).map(function(x){return[x,h[x]]}));return e(b)},[]);i0(function(){g(i(m.current))},d.useLayoutEffect),i0(function(){return g._destructor instanceof Function?g._destructor:void 0});var y=d.useCallback(function(b){for(var x=arguments.length,w=new Array(x>1?x-1:0),E=1;E<x;E++)w[E-1]=arguments[E];return g[b]instanceof Function?g[b].apply(g,w):void 0},[g]),v=d.useRef({});return Object.keys(NR(h,[].concat(o0(l),o0(u)))).filter(function(b){return v.current[b]!==h[b]}).forEach(function(b){return y(b,h[b])}),v.current=h,d.useImperativeHandle(f,function(){return Object.fromEntries(l.map(function(b){return[b,function(){for(var x=arguments.length,w=new Array(x),E=0;E<x;E++)w[E]=arguments[E];return y.apply(void 0,[b].concat(w))}]}))},[y]),pe.createElement(a,{ref:m})})}function i0(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.useEffect,r=d.useRef(),a=d.useRef(!1),o=d.useRef(!1),i=d.useState(0),s=FR(i,2);s[0];var l=s[1];a.current&&(o.current=!0),n(function(){return a.current||(r.current=e(),a.current=!0),l(function(c){return c+1}),function(){o.current&&r.current&&r.current()}},[])}var oc="http://www.w3.org/1999/xhtml";const s0={svg:"http://www.w3.org/2000/svg",xhtml:oc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Rs(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),s0.hasOwnProperty(n)?{space:s0[n],local:e}:e}function HR(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===oc&&n.documentElement.namespaceURI===oc?n.createElement(e):n.createElementNS(r,e)}}function zR(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function E2(e){var n=Rs(e);return(n.local?zR:HR)(n)}function UR(){}function Vu(e){return e==null?UR:function(){return this.querySelector(e)}}function VR(e){typeof e!="function"&&(e=Vu(e));for(var n=this._groups,r=n.length,a=new Array(r),o=0;o<r;++o)for(var i=n[o],s=i.length,l=a[o]=new Array(s),c,u,h=0;h<s;++h)(c=i[h])&&(u=e.call(c,c.__data__,h,i))&&("__data__"in c&&(u.__data__=c.__data__),l[h]=u);return new At(a,this._parents)}function ZR(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function BR(){return[]}function C2(e){return e==null?BR:function(){return this.querySelectorAll(e)}}function qR(e){return function(){return ZR(e.apply(this,arguments))}}function WR(e){typeof e=="function"?e=qR(e):e=C2(e);for(var n=this._groups,r=n.length,a=[],o=[],i=0;i<r;++i)for(var s=n[i],l=s.length,c,u=0;u<l;++u)(c=s[u])&&(a.push(e.call(c,c.__data__,u,s)),o.push(c));return new At(a,o)}function S2(e){return function(){return this.matches(e)}}function A2(e){return function(n){return n.matches(e)}}var GR=Array.prototype.find;function KR(e){return function(){return GR.call(this.children,e)}}function YR(){return this.firstElementChild}function QR(e){return this.select(e==null?YR:KR(typeof e=="function"?e:A2(e)))}var XR=Array.prototype.filter;function JR(){return Array.from(this.children)}function eM(e){return function(){return XR.call(this.children,e)}}function tM(e){return this.selectAll(e==null?JR:eM(typeof e=="function"?e:A2(e)))}function nM(e){typeof e!="function"&&(e=S2(e));for(var n=this._groups,r=n.length,a=new Array(r),o=0;o<r;++o)for(var i=n[o],s=i.length,l=a[o]=[],c,u=0;u<s;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new At(a,this._parents)}function R2(e){return new Array(e.length)}function rM(){return new At(this._enter||this._groups.map(R2),this._parents)}function Vi(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}Vi.prototype={constructor:Vi,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function aM(e){return function(){return e}}function oM(e,n,r,a,o,i){for(var s=0,l,c=n.length,u=i.length;s<u;++s)(l=n[s])?(l.__data__=i[s],a[s]=l):r[s]=new Vi(e,i[s]);for(;s<c;++s)(l=n[s])&&(o[s]=l)}function iM(e,n,r,a,o,i,s){var l,c,u=new Map,h=n.length,f=i.length,m=new Array(h),g;for(l=0;l<h;++l)(c=n[l])&&(m[l]=g=s.call(c,c.__data__,l,n)+"",u.has(g)?o[l]=c:u.set(g,c));for(l=0;l<f;++l)g=s.call(e,i[l],l,i)+"",(c=u.get(g))?(a[l]=c,c.__data__=i[l],u.delete(g)):r[l]=new Vi(e,i[l]);for(l=0;l<h;++l)(c=n[l])&&u.get(m[l])===c&&(o[l]=c)}function sM(e){return e.__data__}function lM(e,n){if(!arguments.length)return Array.from(this,sM);var r=n?iM:oM,a=this._parents,o=this._groups;typeof e!="function"&&(e=aM(e));for(var i=o.length,s=new Array(i),l=new Array(i),c=new Array(i),u=0;u<i;++u){var h=a[u],f=o[u],m=f.length,g=cM(e.call(h,h&&h.__data__,u,a)),y=g.length,v=l[u]=new Array(y),b=s[u]=new Array(y),x=c[u]=new Array(m);r(h,f,v,b,x,g,n);for(var w=0,E=0,C,S;w<y;++w)if(C=v[w]){for(w>=E&&(E=w+1);!(S=b[E])&&++E<y;);C._next=S||null}}return s=new At(s,a),s._enter=l,s._exit=c,s}function cM(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function uM(){return new At(this._exit||this._groups.map(R2),this._parents)}function dM(e,n,r){var a=this.enter(),o=this,i=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),n!=null&&(o=n(o),o&&(o=o.selection())),r==null?i.remove():r(i),a&&o?a.merge(o).order():o}function fM(e){for(var n=e.selection?e.selection():e,r=this._groups,a=n._groups,o=r.length,i=a.length,s=Math.min(o,i),l=new Array(o),c=0;c<s;++c)for(var u=r[c],h=a[c],f=u.length,m=l[c]=new Array(f),g,y=0;y<f;++y)(g=u[y]||h[y])&&(m[y]=g);for(;c<o;++c)l[c]=r[c];return new At(l,this._parents)}function hM(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var a=e[n],o=a.length-1,i=a[o],s;--o>=0;)(s=a[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function pM(e){e||(e=mM);function n(f,m){return f&&m?e(f.__data__,m.__data__):!f-!m}for(var r=this._groups,a=r.length,o=new Array(a),i=0;i<a;++i){for(var s=r[i],l=s.length,c=o[i]=new Array(l),u,h=0;h<l;++h)(u=s[h])&&(c[h]=u);c.sort(n)}return new At(o,this._parents).order()}function mM(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function gM(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function yM(){return Array.from(this)}function vM(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var a=e[n],o=0,i=a.length;o<i;++o){var s=a[o];if(s)return s}return null}function xM(){let e=0;for(const n of this)++e;return e}function bM(){return!this.node()}function wM(e){for(var n=this._groups,r=0,a=n.length;r<a;++r)for(var o=n[r],i=0,s=o.length,l;i<s;++i)(l=o[i])&&e.call(l,l.__data__,i,o);return this}function _M(e){return function(){this.removeAttribute(e)}}function EM(e){return function(){this.removeAttributeNS(e.space,e.local)}}function CM(e,n){return function(){this.setAttribute(e,n)}}function SM(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function AM(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function RM(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function MM(e,n){var r=Rs(e);if(arguments.length<2){var a=this.node();return r.local?a.getAttributeNS(r.space,r.local):a.getAttribute(r)}return this.each((n==null?r.local?EM:_M:typeof n=="function"?r.local?RM:AM:r.local?SM:CM)(r,n))}function M2(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function TM(e){return function(){this.style.removeProperty(e)}}function PM(e,n,r){return function(){this.style.setProperty(e,n,r)}}function NM(e,n,r){return function(){var a=n.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,r)}}function OM(e,n,r){return arguments.length>1?this.each((n==null?TM:typeof n=="function"?NM:PM)(e,n,r??"")):Jr(this.node(),e)}function Jr(e,n){return e.style.getPropertyValue(n)||M2(e).getComputedStyle(e,null).getPropertyValue(n)}function jM(e){return function(){delete this[e]}}function DM(e,n){return function(){this[e]=n}}function kM(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function IM(e,n){return arguments.length>1?this.each((n==null?jM:typeof n=="function"?kM:DM)(e,n)):this.node()[e]}function T2(e){return e.trim().split(/^|\s+/)}function Zu(e){return e.classList||new P2(e)}function P2(e){this._node=e,this._names=T2(e.getAttribute("class")||"")}P2.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function N2(e,n){for(var r=Zu(e),a=-1,o=n.length;++a<o;)r.add(n[a])}function O2(e,n){for(var r=Zu(e),a=-1,o=n.length;++a<o;)r.remove(n[a])}function LM(e){return function(){N2(this,e)}}function FM(e){return function(){O2(this,e)}}function $M(e,n){return function(){(n.apply(this,arguments)?N2:O2)(this,e)}}function HM(e,n){var r=T2(e+"");if(arguments.length<2){for(var a=Zu(this.node()),o=-1,i=r.length;++o<i;)if(!a.contains(r[o]))return!1;return!0}return this.each((typeof n=="function"?$M:n?LM:FM)(r,n))}function zM(){this.textContent=""}function UM(e){return function(){this.textContent=e}}function VM(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function ZM(e){return arguments.length?this.each(e==null?zM:(typeof e=="function"?VM:UM)(e)):this.node().textContent}function BM(){this.innerHTML=""}function qM(e){return function(){this.innerHTML=e}}function WM(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function GM(e){return arguments.length?this.each(e==null?BM:(typeof e=="function"?WM:qM)(e)):this.node().innerHTML}function KM(){this.nextSibling&&this.parentNode.appendChild(this)}function YM(){return this.each(KM)}function QM(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function XM(){return this.each(QM)}function JM(e){var n=typeof e=="function"?e:E2(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function e7(){return null}function t7(e,n){var r=typeof e=="function"?e:E2(e),a=n==null?e7:typeof n=="function"?n:Vu(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),a.apply(this,arguments)||null)})}function n7(){var e=this.parentNode;e&&e.removeChild(this)}function r7(){return this.each(n7)}function a7(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function o7(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function i7(e){return this.select(e?o7:a7)}function s7(e){return arguments.length?this.property("__data__",e):this.node().__data__}function l7(e){return function(n){e.call(this,n,this.__data__)}}function c7(e){return e.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");return a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),{type:n,name:r}})}function u7(e){return function(){var n=this.__on;if(n){for(var r=0,a=-1,o=n.length,i;r<o;++r)i=n[r],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):n[++a]=i;++a?n.length=a:delete this.__on}}}function d7(e,n,r){return function(){var a=this.__on,o,i=l7(n);if(a){for(var s=0,l=a.length;s<l;++s)if((o=a[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=r),o.value=n;return}}this.addEventListener(e.type,i,r),o={type:e.type,name:e.name,value:n,listener:i,options:r},a?a.push(o):this.__on=[o]}}function f7(e,n,r){var a=c7(e+""),o,i=a.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,h;c<u;++c)for(o=0,h=l[c];o<i;++o)if((s=a[o]).type===h.type&&s.name===h.name)return h.value}return}for(l=n?d7:u7,o=0;o<i;++o)this.each(l(a[o],n,r));return this}function j2(e,n,r){var a=M2(e),o=a.CustomEvent;typeof o=="function"?o=new o(n,r):(o=a.document.createEvent("Event"),r?(o.initEvent(n,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(n,!1,!1)),e.dispatchEvent(o)}function h7(e,n){return function(){return j2(this,e,n)}}function p7(e,n){return function(){return j2(this,e,n.apply(this,arguments))}}function m7(e,n){return this.each((typeof n=="function"?p7:h7)(e,n))}function*g7(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var a=e[n],o=0,i=a.length,s;o<i;++o)(s=a[o])&&(yield s)}var D2=[null];function At(e,n){this._groups=e,this._parents=n}function ko(){return new At([[document.documentElement]],D2)}function y7(){return this}At.prototype=ko.prototype={constructor:At,select:VR,selectAll:WR,selectChild:QR,selectChildren:tM,filter:nM,data:lM,enter:rM,exit:uM,join:dM,merge:fM,selection:y7,order:hM,sort:pM,call:gM,nodes:yM,node:vM,size:xM,empty:bM,each:wM,attr:MM,style:OM,property:IM,classed:HM,text:ZM,html:GM,raise:YM,lower:XM,append:JM,insert:t7,remove:r7,clone:i7,datum:s7,on:f7,dispatch:m7,[Symbol.iterator]:g7};function kt(e){return typeof e=="string"?new At([[document.querySelector(e)]],[document.documentElement]):new At([[e]],D2)}function v7(e){let n;for(;n=e.sourceEvent;)e=n;return e}function sn(e,n){if(e=v7(e),n===void 0&&(n=e.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var a=r.createSVGPoint();return a.x=e.clientX,a.y=e.clientY,a=a.matrixTransform(n.getScreenCTM().inverse()),[a.x,a.y]}if(n.getBoundingClientRect){var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}}return[e.pageX,e.pageY]}var x7={value:()=>{}};function Io(){for(var e=0,n=arguments.length,r={},a;e<n;++e){if(!(a=arguments[e]+"")||a in r||/[\s.]/.test(a))throw new Error("illegal type: "+a);r[a]=[]}return new wi(r)}function wi(e){this._=e}function b7(e,n){return e.trim().split(/^|\s+/).map(function(r){var a="",o=r.indexOf(".");if(o>=0&&(a=r.slice(o+1),r=r.slice(0,o)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:a}})}wi.prototype=Io.prototype={constructor:wi,on:function(e,n){var r=this._,a=b7(e+"",r),o,i=-1,s=a.length;if(arguments.length<2){for(;++i<s;)if((o=(e=a[i]).type)&&(o=w7(r[o],e.name)))return o;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++i<s;)if(o=(e=a[i]).type)r[o]=l0(r[o],e.name,n);else if(n==null)for(o in r)r[o]=l0(r[o],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new wi(e)},call:function(e,n){if((o=arguments.length-2)>0)for(var r=new Array(o),a=0,o,i;a<o;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],a=0,o=i.length;a<o;++a)i[a].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],o=0,i=a.length;o<i;++o)a[o].value.apply(n,r)}};function w7(e,n){for(var r=0,a=e.length,o;r<a;++r)if((o=e[r]).name===n)return o.value}function l0(e,n,r){for(var a=0,o=e.length;a<o;++a)if(e[a].name===n){e[a]=x7,e=e.slice(0,a).concat(e.slice(a+1));break}return r!=null&&e.push({name:n,value:r}),e}const _7={passive:!1},so={capture:!0,passive:!1};function dl(e){e.stopImmediatePropagation()}function Gr(e){e.preventDefault(),e.stopImmediatePropagation()}function k2(e){var n=e.document.documentElement,r=kt(e).on("dragstart.drag",Gr,so);"onselectstart"in n?r.on("selectstart.drag",Gr,so):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function I2(e,n){var r=e.document.documentElement,a=kt(e).on("dragstart.drag",null);n&&(a.on("click.drag",Gr,so),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in r?a.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const oi=e=>()=>e;function ic(e,{sourceEvent:n,subject:r,target:a,identifier:o,active:i,x:s,y:l,dx:c,dy:u,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}ic.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function E7(e){return!e.ctrlKey&&!e.button}function C7(){return this.parentNode}function S7(e,n){return n??{x:e.x,y:e.y}}function A7(){return navigator.maxTouchPoints||"ontouchstart"in this}function R7(){var e=E7,n=C7,r=S7,a=A7,o={},i=Io("start","drag","end"),s=0,l,c,u,h,f=0;function m(C){C.on("mousedown.drag",g).filter(a).on("touchstart.drag",b).on("touchmove.drag",x,_7).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(C,S){if(!(h||!e.call(this,C,S))){var M=E(this,n.call(this,C,S),C,S,"mouse");M&&(kt(C.view).on("mousemove.drag",y,so).on("mouseup.drag",v,so),k2(C.view),dl(C),u=!1,l=C.clientX,c=C.clientY,M("start",C))}}function y(C){if(Gr(C),!u){var S=C.clientX-l,M=C.clientY-c;u=S*S+M*M>f}o.mouse("drag",C)}function v(C){kt(C.view).on("mousemove.drag mouseup.drag",null),I2(C.view,u),Gr(C),o.mouse("end",C)}function b(C,S){if(e.call(this,C,S)){var M=C.changedTouches,_=n.call(this,C,S),A=M.length,j,P;for(j=0;j<A;++j)(P=E(this,_,C,S,M[j].identifier,M[j]))&&(dl(C),P("start",C,M[j]))}}function x(C){var S=C.changedTouches,M=S.length,_,A;for(_=0;_<M;++_)(A=o[S[_].identifier])&&(Gr(C),A("drag",C,S[_]))}function w(C){var S=C.changedTouches,M=S.length,_,A;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),_=0;_<M;++_)(A=o[S[_].identifier])&&(dl(C),A("end",C,S[_]))}function E(C,S,M,_,A,j){var P=i.copy(),O=sn(j||M,S),H,Z,R;if((R=r.call(C,new ic("beforestart",{sourceEvent:M,target:m,identifier:A,active:s,x:O[0],y:O[1],dx:0,dy:0,dispatch:P}),_))!=null)return H=R.x-O[0]||0,Z=R.y-O[1]||0,function k(T,F,I){var $=O,V;switch(T){case"start":o[A]=k,V=s++;break;case"end":delete o[A],--s;case"drag":O=sn(I||F,S),V=s;break}P.call(T,C,new ic(T,{sourceEvent:F,subject:R,target:m,identifier:A,active:V,x:O[0]+H,y:O[1]+Z,dx:O[0]-$[0],dy:O[1]-$[1],dispatch:P}),_)}}return m.filter=function(C){return arguments.length?(e=typeof C=="function"?C:oi(!!C),m):e},m.container=function(C){return arguments.length?(n=typeof C=="function"?C:oi(C),m):n},m.subject=function(C){return arguments.length?(r=typeof C=="function"?C:oi(C),m):r},m.touchable=function(C){return arguments.length?(a=typeof C=="function"?C:oi(!!C),m):a},m.on=function(){var C=i.on.apply(i,arguments);return C===i?m:C},m.clickDistance=function(C){return arguments.length?(f=(C=+C)*C,m):Math.sqrt(f)},m}function Bu(e,n,r){e.prototype=n.prototype=r,r.constructor=e}function L2(e,n){var r=Object.create(e.prototype);for(var a in n)r[a]=n[a];return r}function Lo(){}var lo=.7,Zi=1/lo,Kr="\\s*([+-]?\\d+)\\s*",co="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",dn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",M7=/^#([0-9a-f]{3,8})$/,T7=new RegExp(`^rgb\\(${Kr},${Kr},${Kr}\\)$`),P7=new RegExp(`^rgb\\(${dn},${dn},${dn}\\)$`),N7=new RegExp(`^rgba\\(${Kr},${Kr},${Kr},${co}\\)$`),O7=new RegExp(`^rgba\\(${dn},${dn},${dn},${co}\\)$`),j7=new RegExp(`^hsl\\(${co},${dn},${dn}\\)$`),D7=new RegExp(`^hsla\\(${co},${dn},${dn},${co}\\)$`),c0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Bu(Lo,uo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:u0,formatHex:u0,formatHex8:k7,formatHsl:I7,formatRgb:d0,toString:d0});function u0(){return this.rgb().formatHex()}function k7(){return this.rgb().formatHex8()}function I7(){return F2(this).formatHsl()}function d0(){return this.rgb().formatRgb()}function uo(e){var n,r;return e=(e+"").trim().toLowerCase(),(n=M7.exec(e))?(r=n[1].length,n=parseInt(n[1],16),r===6?f0(n):r===3?new vt(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?ii(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?ii(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=T7.exec(e))?new vt(n[1],n[2],n[3],1):(n=P7.exec(e))?new vt(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=N7.exec(e))?ii(n[1],n[2],n[3],n[4]):(n=O7.exec(e))?ii(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=j7.exec(e))?m0(n[1],n[2]/100,n[3]/100,1):(n=D7.exec(e))?m0(n[1],n[2]/100,n[3]/100,n[4]):c0.hasOwnProperty(e)?f0(c0[e]):e==="transparent"?new vt(NaN,NaN,NaN,0):null}function f0(e){return new vt(e>>16&255,e>>8&255,e&255,1)}function ii(e,n,r,a){return a<=0&&(e=n=r=NaN),new vt(e,n,r,a)}function L7(e){return e instanceof Lo||(e=uo(e)),e?(e=e.rgb(),new vt(e.r,e.g,e.b,e.opacity)):new vt}function sc(e,n,r,a){return arguments.length===1?L7(e):new vt(e,n,r,a??1)}function vt(e,n,r,a){this.r=+e,this.g=+n,this.b=+r,this.opacity=+a}Bu(vt,sc,L2(Lo,{brighter(e){return e=e==null?Zi:Math.pow(Zi,e),new vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?lo:Math.pow(lo,e),new vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vt(gr(this.r),gr(this.g),gr(this.b),Bi(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:h0,formatHex:h0,formatHex8:F7,formatRgb:p0,toString:p0}));function h0(){return`#${hr(this.r)}${hr(this.g)}${hr(this.b)}`}function F7(){return`#${hr(this.r)}${hr(this.g)}${hr(this.b)}${hr((isNaN(this.opacity)?1:this.opacity)*255)}`}function p0(){const e=Bi(this.opacity);return`${e===1?"rgb(":"rgba("}${gr(this.r)}, ${gr(this.g)}, ${gr(this.b)}${e===1?")":`, ${e})`}`}function Bi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function gr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function hr(e){return e=gr(e),(e<16?"0":"")+e.toString(16)}function m0(e,n,r,a){return a<=0?e=n=r=NaN:r<=0||r>=1?e=n=NaN:n<=0&&(e=NaN),new Vt(e,n,r,a)}function F2(e){if(e instanceof Vt)return new Vt(e.h,e.s,e.l,e.opacity);if(e instanceof Lo||(e=uo(e)),!e)return new Vt;if(e instanceof Vt)return e;e=e.rgb();var n=e.r/255,r=e.g/255,a=e.b/255,o=Math.min(n,r,a),i=Math.max(n,r,a),s=NaN,l=i-o,c=(i+o)/2;return l?(n===i?s=(r-a)/l+(r<a)*6:r===i?s=(a-n)/l+2:s=(n-r)/l+4,l/=c<.5?i+o:2-i-o,s*=60):l=c>0&&c<1?0:s,new Vt(s,l,c,e.opacity)}function $7(e,n,r,a){return arguments.length===1?F2(e):new Vt(e,n,r,a??1)}function Vt(e,n,r,a){this.h=+e,this.s=+n,this.l=+r,this.opacity=+a}Bu(Vt,$7,L2(Lo,{brighter(e){return e=e==null?Zi:Math.pow(Zi,e),new Vt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?lo:Math.pow(lo,e),new Vt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,a=r+(r<.5?r:1-r)*n,o=2*r-a;return new vt(fl(e>=240?e-240:e+120,o,a),fl(e,o,a),fl(e<120?e+240:e-120,o,a),this.opacity)},clamp(){return new Vt(g0(this.h),si(this.s),si(this.l),Bi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Bi(this.opacity);return`${e===1?"hsl(":"hsla("}${g0(this.h)}, ${si(this.s)*100}%, ${si(this.l)*100}%${e===1?")":`, ${e})`}`}}));function g0(e){return e=(e||0)%360,e<0?e+360:e}function si(e){return Math.max(0,Math.min(1,e||0))}function fl(e,n,r){return(e<60?n+(r-n)*e/60:e<180?r:e<240?n+(r-n)*(240-e)/60:n)*255}const $2=e=>()=>e;function H7(e,n){return function(r){return e+r*n}}function z7(e,n,r){return e=Math.pow(e,r),n=Math.pow(n,r)-e,r=1/r,function(a){return Math.pow(e+a*n,r)}}function U7(e){return(e=+e)==1?H2:function(n,r){return r-n?z7(n,r,e):$2(isNaN(n)?r:n)}}function H2(e,n){var r=n-e;return r?H7(e,r):$2(isNaN(e)?n:e)}const y0=(function e(n){var r=U7(n);function a(o,i){var s=r((o=sc(o)).r,(i=sc(i)).r),l=r(o.g,i.g),c=r(o.b,i.b),u=H2(o.opacity,i.opacity);return function(h){return o.r=s(h),o.g=l(h),o.b=c(h),o.opacity=u(h),o+""}}return a.gamma=e,a})(1);function Vn(e,n){return e=+e,n=+n,function(r){return e*(1-r)+n*r}}var lc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hl=new RegExp(lc.source,"g");function V7(e){return function(){return e}}function Z7(e){return function(n){return e(n)+""}}function B7(e,n){var r=lc.lastIndex=hl.lastIndex=0,a,o,i,s=-1,l=[],c=[];for(e=e+"",n=n+"";(a=lc.exec(e))&&(o=hl.exec(n));)(i=o.index)>r&&(i=n.slice(r,i),l[s]?l[s]+=i:l[++s]=i),(a=a[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,c.push({i:s,x:Vn(a,o)})),r=hl.lastIndex;return r<n.length&&(i=n.slice(r),l[s]?l[s]+=i:l[++s]=i),l.length<2?c[0]?Z7(c[0].x):V7(n):(n=c.length,function(u){for(var h=0,f;h<n;++h)l[(f=c[h]).i]=f.x(u);return l.join("")})}var v0=180/Math.PI,cc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function z2(e,n,r,a,o,i){var s,l,c;return(s=Math.sqrt(e*e+n*n))&&(e/=s,n/=s),(c=e*r+n*a)&&(r-=e*c,a-=n*c),(l=Math.sqrt(r*r+a*a))&&(r/=l,a/=l,c/=l),e*a<n*r&&(e=-e,n=-n,c=-c,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(n,e)*v0,skewX:Math.atan(c)*v0,scaleX:s,scaleY:l}}var li;function q7(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?cc:z2(n.a,n.b,n.c,n.d,n.e,n.f)}function W7(e){return e==null||(li||(li=document.createElementNS("http://www.w3.org/2000/svg","g")),li.setAttribute("transform",e),!(e=li.transform.baseVal.consolidate()))?cc:(e=e.matrix,z2(e.a,e.b,e.c,e.d,e.e,e.f))}function U2(e,n,r,a){function o(u){return u.length?u.pop()+" ":""}function i(u,h,f,m,g,y){if(u!==f||h!==m){var v=g.push("translate(",null,n,null,r);y.push({i:v-4,x:Vn(u,f)},{i:v-2,x:Vn(h,m)})}else(f||m)&&g.push("translate("+f+n+m+r)}function s(u,h,f,m){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),m.push({i:f.push(o(f)+"rotate(",null,a)-2,x:Vn(u,h)})):h&&f.push(o(f)+"rotate("+h+a)}function l(u,h,f,m){u!==h?m.push({i:f.push(o(f)+"skewX(",null,a)-2,x:Vn(u,h)}):h&&f.push(o(f)+"skewX("+h+a)}function c(u,h,f,m,g,y){if(u!==f||h!==m){var v=g.push(o(g)+"scale(",null,",",null,")");y.push({i:v-4,x:Vn(u,f)},{i:v-2,x:Vn(h,m)})}else(f!==1||m!==1)&&g.push(o(g)+"scale("+f+","+m+")")}return function(u,h){var f=[],m=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,f,m),s(u.rotate,h.rotate,f,m),l(u.skewX,h.skewX,f,m),c(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,m),u=h=null,function(g){for(var y=-1,v=m.length,b;++y<v;)f[(b=m[y]).i]=b.x(g);return f.join("")}}}var G7=U2(q7,"px, ","px)","deg)"),K7=U2(W7,", ",")",")"),Y7=1e-12;function x0(e){return((e=Math.exp(e))+1/e)/2}function Q7(e){return((e=Math.exp(e))-1/e)/2}function X7(e){return((e=Math.exp(2*e))-1)/(e+1)}const J7=(function e(n,r,a){function o(i,s){var l=i[0],c=i[1],u=i[2],h=s[0],f=s[1],m=s[2],g=h-l,y=f-c,v=g*g+y*y,b,x;if(v<Y7)x=Math.log(m/u)/n,b=function(_){return[l+_*g,c+_*y,u*Math.exp(n*_*x)]};else{var w=Math.sqrt(v),E=(m*m-u*u+a*v)/(2*u*r*w),C=(m*m-u*u-a*v)/(2*m*r*w),S=Math.log(Math.sqrt(E*E+1)-E),M=Math.log(Math.sqrt(C*C+1)-C);x=(M-S)/n,b=function(_){var A=_*x,j=x0(S),P=u/(r*w)*(j*X7(n*A+S)-Q7(S));return[l+P*g,c+P*y,u*j/x0(n*A+S)]}}return b.duration=x*1e3*n/Math.SQRT2,b}return o.rho=function(i){var s=Math.max(.001,+i),l=s*s,c=l*l;return e(s,l,c)},o})(Math.SQRT2,2,4);var ea=0,Da=0,_a=0,V2=1e3,qi,ka,Wi=0,Cr=0,Ms=0,fo=typeof performance=="object"&&performance.now?performance:Date,Z2=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function qu(){return Cr||(Z2(eT),Cr=fo.now()+Ms)}function eT(){Cr=0}function Gi(){this._call=this._time=this._next=null}Gi.prototype=Wu.prototype={constructor:Gi,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?qu():+r)+(n==null?0:+n),!this._next&&ka!==this&&(ka?ka._next=this:qi=this,ka=this),this._call=e,this._time=r,uc()},stop:function(){this._call&&(this._call=null,this._time=1/0,uc())}};function Wu(e,n,r){var a=new Gi;return a.restart(e,n,r),a}function tT(){qu(),++ea;for(var e=qi,n;e;)(n=Cr-e._time)>=0&&e._call.call(void 0,n),e=e._next;--ea}function b0(){Cr=(Wi=fo.now())+Ms,ea=Da=0;try{tT()}finally{ea=0,rT(),Cr=0}}function nT(){var e=fo.now(),n=e-Wi;n>V2&&(Ms-=n,Wi=e)}function rT(){for(var e,n=qi,r,a=1/0;n;)n._call?(a>n._time&&(a=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:qi=r);ka=e,uc(a)}function uc(e){if(!ea){Da&&(Da=clearTimeout(Da));var n=e-Cr;n>24?(e<1/0&&(Da=setTimeout(b0,e-fo.now()-Ms)),_a&&(_a=clearInterval(_a))):(_a||(Wi=fo.now(),_a=setInterval(nT,V2)),ea=1,Z2(b0))}}function w0(e,n,r){var a=new Gi;return n=n==null?0:+n,a.restart(o=>{a.stop(),e(o+n)},n,r),a}var aT=Io("start","end","cancel","interrupt"),oT=[],B2=0,_0=1,dc=2,_i=3,E0=4,fc=5,Ei=6;function Ts(e,n,r,a,o,i){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;iT(e,r,{name:n,index:a,group:o,on:aT,tween:oT,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:B2})}function Gu(e,n){var r=Yt(e,n);if(r.state>B2)throw new Error("too late; already scheduled");return r}function vn(e,n){var r=Yt(e,n);if(r.state>_i)throw new Error("too late; already running");return r}function Yt(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function iT(e,n,r){var a=e.__transition,o;a[n]=r,r.timer=Wu(i,0,r.time);function i(u){r.state=_0,r.timer.restart(s,r.delay,r.time),r.delay<=u&&s(u-r.delay)}function s(u){var h,f,m,g;if(r.state!==_0)return c();for(h in a)if(g=a[h],g.name===r.name){if(g.state===_i)return w0(s);g.state===E0?(g.state=Ei,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete a[h]):+h<n&&(g.state=Ei,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete a[h])}if(w0(function(){r.state===_i&&(r.state=E0,r.timer.restart(l,r.delay,r.time),l(u))}),r.state=dc,r.on.call("start",e,e.__data__,r.index,r.group),r.state===dc){for(r.state=_i,o=new Array(m=r.tween.length),h=0,f=-1;h<m;++h)(g=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(o[++f]=g);o.length=f+1}}function l(u){for(var h=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(c),r.state=fc,1),f=-1,m=o.length;++f<m;)o[f].call(e,h);r.state===fc&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Ei,r.timer.stop(),delete a[n];for(var u in a)return;delete e.__transition}}function Ci(e,n){var r=e.__transition,a,o,i=!0,s;if(r){n=n==null?null:n+"";for(s in r){if((a=r[s]).name!==n){i=!1;continue}o=a.state>dc&&a.state<fc,a.state=Ei,a.timer.stop(),a.on.call(o?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete r[s]}i&&delete e.__transition}}function sT(e){return this.each(function(){Ci(this,e)})}function lT(e,n){var r,a;return function(){var o=vn(this,e),i=o.tween;if(i!==r){a=r=i;for(var s=0,l=a.length;s<l;++s)if(a[s].name===n){a=a.slice(),a.splice(s,1);break}}o.tween=a}}function cT(e,n,r){var a,o;if(typeof r!="function")throw new Error;return function(){var i=vn(this,e),s=i.tween;if(s!==a){o=(a=s).slice();for(var l={name:n,value:r},c=0,u=o.length;c<u;++c)if(o[c].name===n){o[c]=l;break}c===u&&o.push(l)}i.tween=o}}function uT(e,n){var r=this._id;if(e+="",arguments.length<2){for(var a=Yt(this.node(),r).tween,o=0,i=a.length,s;o<i;++o)if((s=a[o]).name===e)return s.value;return null}return this.each((n==null?lT:cT)(r,e,n))}function Ku(e,n,r){var a=e._id;return e.each(function(){var o=vn(this,a);(o.value||(o.value={}))[n]=r.apply(this,arguments)}),function(o){return Yt(o,a).value[n]}}function q2(e,n){var r;return(typeof n=="number"?Vn:n instanceof uo?y0:(r=uo(n))?(n=r,y0):B7)(e,n)}function dT(e){return function(){this.removeAttribute(e)}}function fT(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hT(e,n,r){var a,o=r+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===a?i:i=n(a=s,r)}}function pT(e,n,r){var a,o=r+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===a?i:i=n(a=s,r)}}function mT(e,n,r){var a,o,i;return function(){var s,l=r(this),c;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=l+"",s===c?null:s===a&&c===o?i:(o=c,i=n(a=s,l)))}}function gT(e,n,r){var a,o,i;return function(){var s,l=r(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=l+"",s===c?null:s===a&&c===o?i:(o=c,i=n(a=s,l)))}}function yT(e,n){var r=Rs(e),a=r==="transform"?K7:q2;return this.attrTween(e,typeof n=="function"?(r.local?gT:mT)(r,a,Ku(this,"attr."+e,n)):n==null?(r.local?fT:dT)(r):(r.local?pT:hT)(r,a,n))}function vT(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function xT(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function bT(e,n){var r,a;function o(){var i=n.apply(this,arguments);return i!==a&&(r=(a=i)&&xT(e,i)),r}return o._value=n,o}function wT(e,n){var r,a;function o(){var i=n.apply(this,arguments);return i!==a&&(r=(a=i)&&vT(e,i)),r}return o._value=n,o}function _T(e,n){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;var a=Rs(e);return this.tween(r,(a.local?bT:wT)(a,n))}function ET(e,n){return function(){Gu(this,e).delay=+n.apply(this,arguments)}}function CT(e,n){return n=+n,function(){Gu(this,e).delay=n}}function ST(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?ET:CT)(n,e)):Yt(this.node(),n).delay}function AT(e,n){return function(){vn(this,e).duration=+n.apply(this,arguments)}}function RT(e,n){return n=+n,function(){vn(this,e).duration=n}}function MT(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?AT:RT)(n,e)):Yt(this.node(),n).duration}function TT(e,n){if(typeof n!="function")throw new Error;return function(){vn(this,e).ease=n}}function PT(e){var n=this._id;return arguments.length?this.each(TT(n,e)):Yt(this.node(),n).ease}function NT(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;vn(this,e).ease=r}}function OT(e){if(typeof e!="function")throw new Error;return this.each(NT(this._id,e))}function jT(e){typeof e!="function"&&(e=S2(e));for(var n=this._groups,r=n.length,a=new Array(r),o=0;o<r;++o)for(var i=n[o],s=i.length,l=a[o]=[],c,u=0;u<s;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new kn(a,this._parents,this._name,this._id)}function DT(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._groups,a=n.length,o=r.length,i=Math.min(a,o),s=new Array(a),l=0;l<i;++l)for(var c=n[l],u=r[l],h=c.length,f=s[l]=new Array(h),m,g=0;g<h;++g)(m=c[g]||u[g])&&(f[g]=m);for(;l<a;++l)s[l]=n[l];return new kn(s,this._parents,this._name,this._id)}function kT(e){return(e+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function IT(e,n,r){var a,o,i=kT(n)?Gu:vn;return function(){var s=i(this,e),l=s.on;l!==a&&(o=(a=l).copy()).on(n,r),s.on=o}}function LT(e,n){var r=this._id;return arguments.length<2?Yt(this.node(),r).on.on(e):this.each(IT(r,e,n))}function FT(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function $T(){return this.on("end.remove",FT(this._id))}function HT(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Vu(e));for(var a=this._groups,o=a.length,i=new Array(o),s=0;s<o;++s)for(var l=a[s],c=l.length,u=i[s]=new Array(c),h,f,m=0;m<c;++m)(h=l[m])&&(f=e.call(h,h.__data__,m,l))&&("__data__"in h&&(f.__data__=h.__data__),u[m]=f,Ts(u[m],n,r,m,u,Yt(h,r)));return new kn(i,this._parents,n,r)}function zT(e){var n=this._name,r=this._id;typeof e!="function"&&(e=C2(e));for(var a=this._groups,o=a.length,i=[],s=[],l=0;l<o;++l)for(var c=a[l],u=c.length,h,f=0;f<u;++f)if(h=c[f]){for(var m=e.call(h,h.__data__,f,c),g,y=Yt(h,r),v=0,b=m.length;v<b;++v)(g=m[v])&&Ts(g,n,r,v,m,y);i.push(m),s.push(h)}return new kn(i,s,n,r)}var UT=ko.prototype.constructor;function VT(){return new UT(this._groups,this._parents)}function ZT(e,n){var r,a,o;return function(){var i=Jr(this,e),s=(this.style.removeProperty(e),Jr(this,e));return i===s?null:i===r&&s===a?o:o=n(r=i,a=s)}}function W2(e){return function(){this.style.removeProperty(e)}}function BT(e,n,r){var a,o=r+"",i;return function(){var s=Jr(this,e);return s===o?null:s===a?i:i=n(a=s,r)}}function qT(e,n,r){var a,o,i;return function(){var s=Jr(this,e),l=r(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Jr(this,e))),s===c?null:s===a&&c===o?i:(o=c,i=n(a=s,l))}}function WT(e,n){var r,a,o,i="style."+n,s="end."+i,l;return function(){var c=vn(this,e),u=c.on,h=c.value[i]==null?l||(l=W2(n)):void 0;(u!==r||o!==h)&&(a=(r=u).copy()).on(s,o=h),c.on=a}}function GT(e,n,r){var a=(e+="")=="transform"?G7:q2;return n==null?this.styleTween(e,ZT(e,a)).on("end.style."+e,W2(e)):typeof n=="function"?this.styleTween(e,qT(e,a,Ku(this,"style."+e,n))).each(WT(this._id,e)):this.styleTween(e,BT(e,a,n),r).on("end.style."+e,null)}function KT(e,n,r){return function(a){this.style.setProperty(e,n.call(this,a),r)}}function YT(e,n,r){var a,o;function i(){var s=n.apply(this,arguments);return s!==o&&(a=(o=s)&&KT(e,s,r)),a}return i._value=n,i}function QT(e,n,r){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(n==null)return this.tween(a,null);if(typeof n!="function")throw new Error;return this.tween(a,YT(e,n,r??""))}function XT(e){return function(){this.textContent=e}}function JT(e){return function(){var n=e(this);this.textContent=n??""}}function e9(e){return this.tween("text",typeof e=="function"?JT(Ku(this,"text",e)):XT(e==null?"":e+""))}function t9(e){return function(n){this.textContent=e.call(this,n)}}function n9(e){var n,r;function a(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&t9(o)),n}return a._value=e,a}function r9(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,n9(e))}function a9(){for(var e=this._name,n=this._id,r=G2(),a=this._groups,o=a.length,i=0;i<o;++i)for(var s=a[i],l=s.length,c,u=0;u<l;++u)if(c=s[u]){var h=Yt(c,n);Ts(c,e,r,u,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new kn(a,this._parents,e,r)}function o9(){var e,n,r=this,a=r._id,o=r.size();return new Promise(function(i,s){var l={value:s},c={value:function(){--o===0&&i()}};r.each(function(){var u=vn(this,a),h=u.on;h!==e&&(n=(e=h).copy(),n._.cancel.push(l),n._.interrupt.push(l),n._.end.push(c)),u.on=n}),o===0&&i()})}var i9=0;function kn(e,n,r,a){this._groups=e,this._parents=n,this._name=r,this._id=a}function G2(){return++i9}var wn=ko.prototype;kn.prototype={constructor:kn,select:HT,selectAll:zT,selectChild:wn.selectChild,selectChildren:wn.selectChildren,filter:jT,merge:DT,selection:VT,transition:a9,call:wn.call,nodes:wn.nodes,node:wn.node,size:wn.size,empty:wn.empty,each:wn.each,on:LT,attr:yT,attrTween:_T,style:GT,styleTween:QT,text:e9,textTween:r9,remove:$T,tween:uT,delay:ST,duration:MT,ease:PT,easeVarying:OT,end:o9,[Symbol.iterator]:wn[Symbol.iterator]};function s9(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var l9={time:null,delay:0,duration:250,ease:s9};function c9(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return r}function u9(e){var n,r;e instanceof kn?(n=e._id,e=e._name):(n=G2(),(r=l9).time=qu(),e=e==null?null:e+"");for(var a=this._groups,o=a.length,i=0;i<o;++i)for(var s=a[i],l=s.length,c,u=0;u<l;++u)(c=s[u])&&Ts(c,e,n,u,s,r||c9(c,n));return new kn(a,this._parents,e,n)}ko.prototype.interrupt=sT;ko.prototype.transition=u9;const ci=e=>()=>e;function d9(e,{sourceEvent:n,target:r,transform:a,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:o}})}function Tn(e,n,r){this.k=e,this.x=n,this.y=r}Tn.prototype={constructor:Tn,scale:function(e){return e===1?this:new Tn(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Tn(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Yu=new Tn(1,0,0);on.prototype=Tn.prototype;function on(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Yu;return e.__zoom}function pl(e){e.stopImmediatePropagation()}function Ea(e){e.preventDefault(),e.stopImmediatePropagation()}function f9(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function h9(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function C0(){return this.__zoom||Yu}function p9(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function m9(){return navigator.maxTouchPoints||"ontouchstart"in this}function g9(e,n,r){var a=e.invertX(n[0][0])-r[0][0],o=e.invertX(n[1][0])-r[1][0],i=e.invertY(n[0][1])-r[0][1],s=e.invertY(n[1][1])-r[1][1];return e.translate(o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function y9(){var e=f9,n=h9,r=g9,a=p9,o=m9,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=J7,u=Io("start","zoom","end"),h,f,m,g=500,y=150,v=0,b=10;function x(R){R.property("__zoom",C0).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",P).filter(o).on("touchstart.zoom",O).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",Z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(R,k,T,F){var I=R.selection?R.selection():R;I.property("__zoom",C0),R!==I?S(R,k,T,F):I.interrupt().each(function(){M(this,arguments).event(F).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},x.scaleBy=function(R,k,T,F){x.scaleTo(R,function(){var I=this.__zoom.k,$=typeof k=="function"?k.apply(this,arguments):k;return I*$},T,F)},x.scaleTo=function(R,k,T,F){x.transform(R,function(){var I=n.apply(this,arguments),$=this.__zoom,V=T==null?C(I):typeof T=="function"?T.apply(this,arguments):T,B=$.invert(V),q=typeof k=="function"?k.apply(this,arguments):k;return r(E(w($,q),V,B),I,s)},T,F)},x.translateBy=function(R,k,T,F){x.transform(R,function(){return r(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof T=="function"?T.apply(this,arguments):T),n.apply(this,arguments),s)},null,F)},x.translateTo=function(R,k,T,F,I){x.transform(R,function(){var $=n.apply(this,arguments),V=this.__zoom,B=F==null?C($):typeof F=="function"?F.apply(this,arguments):F;return r(Yu.translate(B[0],B[1]).scale(V.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof T=="function"?-T.apply(this,arguments):-T),$,s)},F,I)};function w(R,k){return k=Math.max(i[0],Math.min(i[1],k)),k===R.k?R:new Tn(k,R.x,R.y)}function E(R,k,T){var F=k[0]-T[0]*R.k,I=k[1]-T[1]*R.k;return F===R.x&&I===R.y?R:new Tn(R.k,F,I)}function C(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function S(R,k,T,F){R.on("start.zoom",function(){M(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){M(this,arguments).event(F).end()}).tween("zoom",function(){var I=this,$=arguments,V=M(I,$).event(F),B=n.apply(I,$),q=T==null?C(B):typeof T=="function"?T.apply(I,$):T,X=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),Q=I.__zoom,re=typeof k=="function"?k.apply(I,$):k,de=c(Q.invert(q).concat(X/Q.k),re.invert(q).concat(X/re.k));return function(G){if(G===1)G=re;else{var ie=de(G),ye=X/ie[2];G=new Tn(ye,q[0]-ie[0]*ye,q[1]-ie[1]*ye)}V.zoom(null,G)}})}function M(R,k,T){return!T&&R.__zooming||new _(R,k)}function _(R,k){this.that=R,this.args=k,this.active=0,this.sourceEvent=null,this.extent=n.apply(R,k),this.taps=0}_.prototype={event:function(R){return R&&(this.sourceEvent=R),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(R,k){return this.mouse&&R!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var k=kt(this.that).datum();u.call(R,this.that,new d9(R,{sourceEvent:this.sourceEvent,target:x,transform:this.that.__zoom,dispatch:u}),k)}};function A(R,...k){if(!e.apply(this,arguments))return;var T=M(this,k).event(R),F=this.__zoom,I=Math.max(i[0],Math.min(i[1],F.k*Math.pow(2,a.apply(this,arguments)))),$=sn(R);if(T.wheel)(T.mouse[0][0]!==$[0]||T.mouse[0][1]!==$[1])&&(T.mouse[1]=F.invert(T.mouse[0]=$)),clearTimeout(T.wheel);else{if(F.k===I)return;T.mouse=[$,F.invert($)],Ci(this),T.start()}Ea(R),T.wheel=setTimeout(V,y),T.zoom("mouse",r(E(w(F,I),T.mouse[0],T.mouse[1]),T.extent,s));function V(){T.wheel=null,T.end()}}function j(R,...k){if(m||!e.apply(this,arguments))return;var T=R.currentTarget,F=M(this,k,!0).event(R),I=kt(R.view).on("mousemove.zoom",q,!0).on("mouseup.zoom",X,!0),$=sn(R,T),V=R.clientX,B=R.clientY;k2(R.view),pl(R),F.mouse=[$,this.__zoom.invert($)],Ci(this),F.start();function q(Q){if(Ea(Q),!F.moved){var re=Q.clientX-V,de=Q.clientY-B;F.moved=re*re+de*de>v}F.event(Q).zoom("mouse",r(E(F.that.__zoom,F.mouse[0]=sn(Q,T),F.mouse[1]),F.extent,s))}function X(Q){I.on("mousemove.zoom mouseup.zoom",null),I2(Q.view,F.moved),Ea(Q),F.event(Q).end()}}function P(R,...k){if(e.apply(this,arguments)){var T=this.__zoom,F=sn(R.changedTouches?R.changedTouches[0]:R,this),I=T.invert(F),$=T.k*(R.shiftKey?.5:2),V=r(E(w(T,$),F,I),n.apply(this,k),s);Ea(R),l>0?kt(this).transition().duration(l).call(S,V,F,R):kt(this).call(x.transform,V,F,R)}}function O(R,...k){if(e.apply(this,arguments)){var T=R.touches,F=T.length,I=M(this,k,R.changedTouches.length===F).event(R),$,V,B,q;for(pl(R),V=0;V<F;++V)B=T[V],q=sn(B,this),q=[q,this.__zoom.invert(q),B.identifier],I.touch0?!I.touch1&&I.touch0[2]!==q[2]&&(I.touch1=q,I.taps=0):(I.touch0=q,$=!0,I.taps=1+!!h);h&&(h=clearTimeout(h)),$&&(I.taps<2&&(f=q[0],h=setTimeout(function(){h=null},g)),Ci(this),I.start())}}function H(R,...k){if(this.__zooming){var T=M(this,k).event(R),F=R.changedTouches,I=F.length,$,V,B,q;for(Ea(R),$=0;$<I;++$)V=F[$],B=sn(V,this),T.touch0&&T.touch0[2]===V.identifier?T.touch0[0]=B:T.touch1&&T.touch1[2]===V.identifier&&(T.touch1[0]=B);if(V=T.that.__zoom,T.touch1){var X=T.touch0[0],Q=T.touch0[1],re=T.touch1[0],de=T.touch1[1],G=(G=re[0]-X[0])*G+(G=re[1]-X[1])*G,ie=(ie=de[0]-Q[0])*ie+(ie=de[1]-Q[1])*ie;V=w(V,Math.sqrt(G/ie)),B=[(X[0]+re[0])/2,(X[1]+re[1])/2],q=[(Q[0]+de[0])/2,(Q[1]+de[1])/2]}else if(T.touch0)B=T.touch0[0],q=T.touch0[1];else return;T.zoom("touch",r(E(V,B,q),T.extent,s))}}function Z(R,...k){if(this.__zooming){var T=M(this,k).event(R),F=R.changedTouches,I=F.length,$,V;for(pl(R),m&&clearTimeout(m),m=setTimeout(function(){m=null},g),$=0;$<I;++$)V=F[$],T.touch0&&T.touch0[2]===V.identifier?delete T.touch0:T.touch1&&T.touch1[2]===V.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&(V=sn(V,this),Math.hypot(f[0]-V[0],f[1]-V[1])<b)){var B=kt(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return x.wheelDelta=function(R){return arguments.length?(a=typeof R=="function"?R:ci(+R),x):a},x.filter=function(R){return arguments.length?(e=typeof R=="function"?R:ci(!!R),x):e},x.touchable=function(R){return arguments.length?(o=typeof R=="function"?R:ci(!!R),x):o},x.extent=function(R){return arguments.length?(n=typeof R=="function"?R:ci([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),x):n},x.scaleExtent=function(R){return arguments.length?(i[0]=+R[0],i[1]=+R[1],x):[i[0],i[1]]},x.translateExtent=function(R){return arguments.length?(s[0][0]=+R[0][0],s[1][0]=+R[1][0],s[0][1]=+R[0][1],s[1][1]=+R[1][1],x):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},x.constrain=function(R){return arguments.length?(r=R,x):r},x.duration=function(R){return arguments.length?(l=+R,x):l},x.interpolate=function(R){return arguments.length?(c=R,x):c},x.on=function(){var R=u.on.apply(u,arguments);return R===u?x:R},x.clickDistance=function(R){return arguments.length?(v=(R=+R)*R,x):Math.sqrt(v)},x.tapDistance=function(R){return arguments.length?(b=+R,x):b},x}class S0 extends Map{constructor(n,r=b9){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),n!=null)for(const[a,o]of n)this.set(a,o)}get(n){return super.get(A0(this,n))}has(n){return super.has(A0(this,n))}set(n,r){return super.set(v9(this,n),r)}delete(n){return super.delete(x9(this,n))}}function A0({_intern:e,_key:n},r){const a=n(r);return e.has(a)?e.get(a):r}function v9({_intern:e,_key:n},r){const a=n(r);return e.has(a)?e.get(a):(e.set(a,r),r)}function x9({_intern:e,_key:n},r){const a=n(r);return e.has(a)&&(r=e.get(a),e.delete(a)),r}function b9(e){return e!==null&&typeof e=="object"?e.valueOf():e}function R0(e,n){let r;if(n===void 0)for(const a of e)a!=null&&(r<a||r===void 0&&a>=a)&&(r=a);else{let a=-1;for(let o of e)(o=n(o,++a,e))!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}return r}function M0(e,n){let r;if(n===void 0)for(const a of e)a!=null&&(r>a||r===void 0&&a>=a)&&(r=a);else{let a=-1;for(let o of e)(o=n(o,++a,e))!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}return r}function w9(e,n){let r=0;for(let a of e)(a=+a)&&(r+=a);return r}var _9=typeof global=="object"&&global&&global.Object===Object&&global,E9=typeof self=="object"&&self&&self.Object===Object&&self,K2=_9||E9||Function("return this")(),Ki=K2.Symbol,Y2=Object.prototype,C9=Y2.hasOwnProperty,S9=Y2.toString,Ca=Ki?Ki.toStringTag:void 0;function A9(e){var n=C9.call(e,Ca),r=e[Ca];try{e[Ca]=void 0;var a=!0}catch{}var o=S9.call(e);return a&&(n?e[Ca]=r:delete e[Ca]),o}var R9=Object.prototype,M9=R9.toString;function T9(e){return M9.call(e)}var P9="[object Null]",N9="[object Undefined]",T0=Ki?Ki.toStringTag:void 0;function O9(e){return e==null?e===void 0?N9:P9:T0&&T0 in Object(e)?A9(e):T9(e)}function j9(e){return e!=null&&typeof e=="object"}var D9="[object Symbol]";function k9(e){return typeof e=="symbol"||j9(e)&&O9(e)==D9}var I9=/\s/;function L9(e){for(var n=e.length;n--&&I9.test(e.charAt(n)););return n}var F9=/^\s+/;function $9(e){return e&&e.slice(0,L9(e)+1).replace(F9,"")}function Yi(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var P0=NaN,H9=/^[-+]0x[0-9a-f]+$/i,z9=/^0b[01]+$/i,U9=/^0o[0-7]+$/i,V9=parseInt;function N0(e){if(typeof e=="number")return e;if(k9(e))return P0;if(Yi(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Yi(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=$9(e);var r=z9.test(e);return r||U9.test(e)?V9(e.slice(2),r?2:8):H9.test(e)?P0:+e}var ml=function(){return K2.Date.now()},Z9="Expected a function",B9=Math.max,q9=Math.min;function Q2(e,n,r){var a,o,i,s,l,c,u=0,h=!1,f=!1,m=!0;if(typeof e!="function")throw new TypeError(Z9);n=N0(n)||0,Yi(r)&&(h=!!r.leading,f="maxWait"in r,i=f?B9(N0(r.maxWait)||0,n):i,m="trailing"in r?!!r.trailing:m);function g(M){var _=a,A=o;return a=o=void 0,u=M,s=e.apply(A,_),s}function y(M){return u=M,l=setTimeout(x,n),h?g(M):s}function v(M){var _=M-c,A=M-u,j=n-_;return f?q9(j,i-A):j}function b(M){var _=M-c,A=M-u;return c===void 0||_>=n||_<0||f&&A>=i}function x(){var M=ml();if(b(M))return w(M);l=setTimeout(x,v(M))}function w(M){return l=void 0,m&&a?g(M):(a=o=void 0,s)}function E(){l!==void 0&&clearTimeout(l),u=0,a=c=o=l=void 0}function C(){return l===void 0?s:w(ml())}function S(){var M=ml(),_=b(M);if(a=arguments,o=this,c=M,_){if(l===void 0)return y(c);if(f)return clearTimeout(l),l=setTimeout(x,n),g(c)}return l===void 0&&(l=setTimeout(x,n)),s}return S.cancel=E,S.flush=C,S}var W9="Expected a function";function G9(e,n,r){var a=!0,o=!0;if(typeof e!="function")throw new TypeError(W9);return Yi(r)&&(a="leading"in r?!!r.leading:a,o="trailing"in r?!!r.trailing:o),Q2(e,n,{leading:a,maxWait:n,trailing:o})}var yr=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-yr.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?yr.Bounce.In(e*2)*.5:yr.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),Ia=function(){return performance.now()},X2=(function(){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,n)}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var n,r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];for(var o=0,i=r;o<i.length;o++){var s=i[o];(n=s._group)===null||n===void 0||n.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},e.prototype.remove=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var a=0,o=n;a<o.length;a++){var i=o[a];i._group=void 0,delete this._tweens[i.getId()],delete this._tweensAddedDuringUpdate[i.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(n){return!n.isPlaying()})},e.prototype.update=function(n,r){n===void 0&&(n=Ia()),r===void 0&&(r=!0);var a=Object.keys(this._tweens);if(a.length!==0)for(;a.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<a.length;o++){var i=this._tweens[a[o]],s=!r;i&&i.update(n,s)===!1&&!r&&this.remove(i)}a=Object.keys(this._tweensAddedDuringUpdate)}},e})(),hc={Linear:function(e,n){var r=e.length-1,a=r*n,o=Math.floor(a),i=hc.Utils.Linear;return n<0?i(e[0],e[1],a):n>1?i(e[r],e[r-1],r-a):i(e[o],e[o+1>r?r:o+1],a-o)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},J2=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),pc=new X2,O0=(function(){function e(n,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=yr.Linear.None,this._interpolationFunction=hc.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=J2.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=n,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=pc,pc.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=Ia()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var a in this._valuesStartRepeat)this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var i in this._valuesEnd)o[i]=this._valuesEnd[i];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,a,o,i){for(var s in a){var l=n[s],c=Array.isArray(l),u=c?"array":typeof l,h=!c&&Array.isArray(a[s]);if(!(u==="undefined"||u==="function")){if(h){var f=a[s];if(f.length===0)continue;for(var m=[l],g=0,y=f.length;g<y;g+=1){var v=this._handleRelativeValue(l,f[g]);if(isNaN(v)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}m.push(v)}h&&(a[s]=m)}if((u==="object"||c)&&l&&!h){r[s]=c?[]:{};var b=l;for(var x in b)r[s][x]=b[x];o[s]=c?[]:{};var f=a[s];if(!this._isDynamic){var w={};for(var x in f)w[x]=f[x];a[s]=f=w}this._setupProperties(b,r[s],f,o[s],i)}else(typeof r[s]>"u"||i)&&(r[s]=l),c||(r[s]*=1),h?o[s]=a[s].slice().reverse():o[s]=r[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(n){return n===void 0&&(n=Ia()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this)},e.prototype.resume=function(n){return n===void 0&&(n=Ia()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;n<r;n++)this._chainedTweens[n].stop();return this},e.prototype.group=function(n){return n?(n.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var n;return(n=this._group)===null||n===void 0||n.remove(this),this},e.prototype.delay=function(n){return n===void 0&&(n=0),this._delayTime=n,this},e.prototype.repeat=function(n){return n===void 0&&(n=0),this._initialRepeat=n,this._repeat=n,this},e.prototype.repeatDelay=function(n){return this._repeatDelayTime=n,this},e.prototype.yoyo=function(n){return n===void 0&&(n=!1),this._yoyo=n,this},e.prototype.easing=function(n){return n===void 0&&(n=yr.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=hc.Linear),this._interpolationFunction=n,this},e.prototype.chain=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._chainedTweens=n,this},e.prototype.onStart=function(n){return this._onStartCallback=n,this},e.prototype.onEveryStart=function(n){return this._onEveryStartCallback=n,this},e.prototype.onUpdate=function(n){return this._onUpdateCallback=n,this},e.prototype.onRepeat=function(n){return this._onRepeatCallback=n,this},e.prototype.onComplete=function(n){return this._onCompleteCallback=n,this},e.prototype.onStop=function(n){return this._onStopCallback=n,this},e.prototype.update=function(n,r){var a=this,o;if(n===void 0&&(n=Ia()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var i;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var s=n-this._startTime,l=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),c=this._duration+this._repeat*l,u=function(){if(a._duration===0||s>c)return 1;var v=Math.trunc(s/l),b=s-v*l,x=Math.min(b/a._duration,1);return x===0&&s===a._duration?1:x},h=u(),f=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,f),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||s>=this._duration)if(this._repeat>0){var m=Math.min(Math.trunc((s-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=m);for(i in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[i]=="string"&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=l*m,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var g=0,y=this._chainedTweens.length;g<y;g++)this._chainedTweens[g].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(n,r,a,o){for(var i in a)if(r[i]!==void 0){var s=r[i]||0,l=a[i],c=Array.isArray(n[i]),u=Array.isArray(l),h=!c&&u;h?n[i]=this._interpolationFunction(l,o):typeof l=="object"&&l?this._updateProperties(n[i],s,l,o):(l=this._handleRelativeValue(s,l),typeof l=="number"&&(n[i]=s+(l-s)*o))}},e.prototype._handleRelativeValue=function(n,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?n+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(n){var r=this._valuesStartRepeat[n],a=this._valuesEnd[n];typeof a=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(a):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=r},e.autoStartOnUpdate=!1,e})();J2.nextId;var mn=pc;mn.getAll.bind(mn);mn.removeAll.bind(mn);mn.add.bind(mn);mn.remove.bind(mn);mn.update.bind(mn);function j0(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function K9(e){if(Array.isArray(e))return e}function Y9(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Q9(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function X9(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,o,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,n!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==n);c=!0);}catch(h){u=!0,o=h}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function J9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
322
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eP(e,n){return K9(e)||X9(e,n)||tP(e,n)||J9()}function tP(e,n){if(e){if(typeof e=="string")return j0(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j0(e,n):void 0}}var nP=Q9(function e(n,r){var a=r.default,o=a===void 0?null:a,i=r.triggerUpdate,s=i===void 0?!0:i,l=r.onChange,c=l===void 0?function(u,h){}:l;Y9(this,e),this.name=n,this.defaultVal=o,this.triggerUpdate=s,this.onChange=c});function Qu(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,a=e.props,o=a===void 0?{}:a,i=e.methods,s=i===void 0?{}:i,l=e.aliases,c=l===void 0?{}:l,u=e.init,h=u===void 0?function(){}:u,f=e.update,m=f===void 0?function(){}:f,g=Object.keys(o).map(function(y){return new nP(y,o[y])});return function y(){for(var v=arguments.length,b=new Array(v),x=0;x<v;x++)b[x]=arguments[x];var w=!!(this instanceof y&&this.constructor),E=w?b.shift():void 0,C=b[0],S=C===void 0?{}:C,M=Object.assign({},r instanceof Function?r(S):r,{initialised:!1}),_={};function A(O){return j(O,S),P(),A}var j=function(H,Z){h.call(A,H,M,Z),M.initialised=!0},P=Q2(function(){M.initialised&&(m.call(A,M,_),_={})},1);return g.forEach(function(O){A[O.name]=H(O);function H(Z){var R=Z.name,k=Z.triggerUpdate,T=k===void 0?!1:k,F=Z.onChange,I=F===void 0?function(B,q){}:F,$=Z.defaultVal,V=$===void 0?null:$;return function(B){var q=M[R];if(!arguments.length)return q;var X=B===void 0?V:B;return M[R]=X,I.call(A,X,M,q),!_.hasOwnProperty(R)&&(_[R]=q),T&&P(),A}}}),Object.keys(s).forEach(function(O){A[O]=function(){for(var H,Z=arguments.length,R=new Array(Z),k=0;k<Z;k++)R[k]=arguments[k];return(H=s[O]).call.apply(H,[A,M].concat(R))}}),Object.entries(c).forEach(function(O){var H=eP(O,2),Z=H[0],R=H[1];return A[Z]=A[R]}),A.resetProps=function(){return g.forEach(function(O){A[O.name](O.defaultVal)}),A},A.resetProps(),M._rerender=P,w&&E&&A(E),A}}var Ae=(function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}});function Qi(e){"@babel/helpers - typeof";return Qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qi(e)}var rP=/^\s+/,aP=/\s+$/;function oe(e,n){if(e=e||"",n=n||{},e instanceof oe)return e;if(!(this instanceof oe))return new oe(e,n);var r=oP(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}oe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,a,o,i,s,l;return r=n.r/255,a=n.g/255,o=n.b/255,r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),o<=.03928?l=o/12.92:l=Math.pow((o+.055)/1.055,2.4),.2126*i+.7152*s+.0722*l},setAlpha:function(n){return this._a=ey(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=k0(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=k0(this._r,this._g,this._b),r=Math.round(n.h*360),a=Math.round(n.s*100),o=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+a+"%, "+o+"%)":"hsva("+r+", "+a+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var n=D0(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=D0(this._r,this._g,this._b),r=Math.round(n.h*360),a=Math.round(n.s*100),o=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+a+"%, "+o+"%)":"hsla("+r+", "+a+"%, "+o+"%, "+this._roundA+")"},toHex:function(n){return I0(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return cP(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ke(this._r,255)*100)+"%",g:Math.round(ke(this._g,255)*100)+"%",b:Math.round(ke(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ke(this._r,255)*100)+"%, "+Math.round(ke(this._g,255)*100)+"%, "+Math.round(ke(this._b,255)*100)+"%)":"rgba("+Math.round(ke(this._r,255)*100)+"%, "+Math.round(ke(this._g,255)*100)+"%, "+Math.round(ke(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:wP[I0(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+L0(this._r,this._g,this._b,this._a),a=r,o=this._gradientType?"GradientType = 1, ":"";if(n){var i=oe(n);a="#"+L0(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+r+",endColorstr="+a+")"},toString:function(n){var r=!!n;n=n||this._format;var a=!1,o=this._a<1&&this._a>=0,i=!r&&o&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return i?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(a=this.toRgbString()),n==="prgb"&&(a=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(a=this.toHexString()),n==="hex3"&&(a=this.toHexString(!0)),n==="hex4"&&(a=this.toHex8String(!0)),n==="hex8"&&(a=this.toHex8String()),n==="name"&&(a=this.toName()),n==="hsl"&&(a=this.toHslString()),n==="hsv"&&(a=this.toHsvString()),a||this.toHexString())},clone:function(){return oe(this.toString())},_applyModification:function(n,r){var a=n.apply(null,[this].concat([].slice.call(r)));return this._r=a._r,this._g=a._g,this._b=a._b,this.setAlpha(a._a),this},lighten:function(){return this._applyModification(hP,arguments)},brighten:function(){return this._applyModification(pP,arguments)},darken:function(){return this._applyModification(mP,arguments)},desaturate:function(){return this._applyModification(uP,arguments)},saturate:function(){return this._applyModification(dP,arguments)},greyscale:function(){return this._applyModification(fP,arguments)},spin:function(){return this._applyModification(gP,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(xP,arguments)},complement:function(){return this._applyCombination(yP,arguments)},monochromatic:function(){return this._applyCombination(bP,arguments)},splitcomplement:function(){return this._applyCombination(vP,arguments)},triad:function(){return this._applyCombination(F0,[3])},tetrad:function(){return this._applyCombination(F0,[4])}};oe.fromRatio=function(e,n){if(Qi(e)=="object"){var r={};for(var a in e)e.hasOwnProperty(a)&&(a==="a"?r[a]=e[a]:r[a]=La(e[a]));e=r}return oe(e,n)};function oP(e){var n={r:0,g:0,b:0},r=1,a=null,o=null,i=null,s=!1,l=!1;return typeof e=="string"&&(e=SP(e)),Qi(e)=="object"&&(_n(e.r)&&_n(e.g)&&_n(e.b)?(n=iP(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):_n(e.h)&&_n(e.s)&&_n(e.v)?(a=La(e.s),o=La(e.v),n=lP(e.h,a,o),s=!0,l="hsv"):_n(e.h)&&_n(e.s)&&_n(e.l)&&(a=La(e.s),i=La(e.l),n=sP(e.h,a,i),s=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=ey(r),{ok:s,format:e.format||l,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function iP(e,n,r){return{r:ke(e,255)*255,g:ke(n,255)*255,b:ke(r,255)*255}}function D0(e,n,r){e=ke(e,255),n=ke(n,255),r=ke(r,255);var a=Math.max(e,n,r),o=Math.min(e,n,r),i,s,l=(a+o)/2;if(a==o)i=s=0;else{var c=a-o;switch(s=l>.5?c/(2-a-o):c/(a+o),a){case e:i=(n-r)/c+(n<r?6:0);break;case n:i=(r-e)/c+2;break;case r:i=(e-n)/c+4;break}i/=6}return{h:i,s,l}}function sP(e,n,r){var a,o,i;e=ke(e,360),n=ke(n,100),r=ke(r,100);function s(u,h,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?u+(h-u)*6*f:f<1/2?h:f<2/3?u+(h-u)*(2/3-f)*6:u}if(n===0)a=o=i=r;else{var l=r<.5?r*(1+n):r+n-r*n,c=2*r-l;a=s(c,l,e+1/3),o=s(c,l,e),i=s(c,l,e-1/3)}return{r:a*255,g:o*255,b:i*255}}function k0(e,n,r){e=ke(e,255),n=ke(n,255),r=ke(r,255);var a=Math.max(e,n,r),o=Math.min(e,n,r),i,s,l=a,c=a-o;if(s=a===0?0:c/a,a==o)i=0;else{switch(a){case e:i=(n-r)/c+(n<r?6:0);break;case n:i=(r-e)/c+2;break;case r:i=(e-n)/c+4;break}i/=6}return{h:i,s,v:l}}function lP(e,n,r){e=ke(e,360)*6,n=ke(n,100),r=ke(r,100);var a=Math.floor(e),o=e-a,i=r*(1-n),s=r*(1-o*n),l=r*(1-(1-o)*n),c=a%6,u=[r,s,i,i,l,r][c],h=[l,r,r,s,i,i][c],f=[i,i,l,r,r,s][c];return{r:u*255,g:h*255,b:f*255}}function I0(e,n,r,a){var o=[Bt(Math.round(e).toString(16)),Bt(Math.round(n).toString(16)),Bt(Math.round(r).toString(16))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function cP(e,n,r,a,o){var i=[Bt(Math.round(e).toString(16)),Bt(Math.round(n).toString(16)),Bt(Math.round(r).toString(16)),Bt(ty(a))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function L0(e,n,r,a){var o=[Bt(ty(a)),Bt(Math.round(e).toString(16)),Bt(Math.round(n).toString(16)),Bt(Math.round(r).toString(16))];return o.join("")}oe.equals=function(e,n){return!e||!n?!1:oe(e).toRgbString()==oe(n).toRgbString()};oe.random=function(){return oe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function uP(e,n){n=n===0?0:n||10;var r=oe(e).toHsl();return r.s-=n/100,r.s=Ps(r.s),oe(r)}function dP(e,n){n=n===0?0:n||10;var r=oe(e).toHsl();return r.s+=n/100,r.s=Ps(r.s),oe(r)}function fP(e){return oe(e).desaturate(100)}function hP(e,n){n=n===0?0:n||10;var r=oe(e).toHsl();return r.l+=n/100,r.l=Ps(r.l),oe(r)}function pP(e,n){n=n===0?0:n||10;var r=oe(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),oe(r)}function mP(e,n){n=n===0?0:n||10;var r=oe(e).toHsl();return r.l-=n/100,r.l=Ps(r.l),oe(r)}function gP(e,n){var r=oe(e).toHsl(),a=(r.h+n)%360;return r.h=a<0?360+a:a,oe(r)}function yP(e){var n=oe(e).toHsl();return n.h=(n.h+180)%360,oe(n)}function F0(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=oe(e).toHsl(),a=[oe(e)],o=360/n,i=1;i<n;i++)a.push(oe({h:(r.h+i*o)%360,s:r.s,l:r.l}));return a}function vP(e){var n=oe(e).toHsl(),r=n.h;return[oe(e),oe({h:(r+72)%360,s:n.s,l:n.l}),oe({h:(r+216)%360,s:n.s,l:n.l})]}function xP(e,n,r){n=n||6,r=r||30;var a=oe(e).toHsl(),o=360/r,i=[oe(e)];for(a.h=(a.h-(o*n>>1)+720)%360;--n;)a.h=(a.h+o)%360,i.push(oe(a));return i}function bP(e,n){n=n||6;for(var r=oe(e).toHsv(),a=r.h,o=r.s,i=r.v,s=[],l=1/n;n--;)s.push(oe({h:a,s:o,v:i})),i=(i+l)%1;return s}oe.mix=function(e,n,r){r=r===0?0:r||50;var a=oe(e).toRgb(),o=oe(n).toRgb(),i=r/100,s={r:(o.r-a.r)*i+a.r,g:(o.g-a.g)*i+a.g,b:(o.b-a.b)*i+a.b,a:(o.a-a.a)*i+a.a};return oe(s)};oe.readability=function(e,n){var r=oe(e),a=oe(n);return(Math.max(r.getLuminance(),a.getLuminance())+.05)/(Math.min(r.getLuminance(),a.getLuminance())+.05)};oe.isReadable=function(e,n,r){var a=oe.readability(e,n),o,i;switch(i=!1,o=AP(r),o.level+o.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7;break}return i};oe.mostReadable=function(e,n,r){var a=null,o=0,i,s,l,c;r=r||{},s=r.includeFallbackColors,l=r.level,c=r.size;for(var u=0;u<n.length;u++)i=oe.readability(e,n[u]),i>o&&(o=i,a=oe(n[u]));return oe.isReadable(e,a,{level:l,size:c})||!s?a:(r.includeFallbackColors=!1,oe.mostReadable(e,["#fff","#000"],r))};var mc=oe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},wP=oe.hexNames=_P(mc);function _P(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function ey(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ke(e,n){EP(e)&&(e="100%");var r=CP(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function Ps(e){return Math.min(1,Math.max(0,e))}function Et(e){return parseInt(e,16)}function EP(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function CP(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Bt(e){return e.length==1?"0"+e:""+e}function La(e){return e<=1&&(e=e*100+"%"),e}function ty(e){return Math.round(parseFloat(e)*255).toString(16)}function $0(e){return Et(e)/255}var zt=(function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+a),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+a),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+a),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function _n(e){return!!zt.CSS_UNIT.exec(e)}function SP(e){e=e.replace(rP,"").replace(aP,"").toLowerCase();var n=!1;if(mc[e])e=mc[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=zt.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=zt.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=zt.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=zt.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=zt.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=zt.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=zt.hex8.exec(e))?{r:Et(r[1]),g:Et(r[2]),b:Et(r[3]),a:$0(r[4]),format:n?"name":"hex8"}:(r=zt.hex6.exec(e))?{r:Et(r[1]),g:Et(r[2]),b:Et(r[3]),format:n?"name":"hex"}:(r=zt.hex4.exec(e))?{r:Et(r[1]+""+r[1]),g:Et(r[2]+""+r[2]),b:Et(r[3]+""+r[3]),a:$0(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=zt.hex3.exec(e))?{r:Et(r[1]+""+r[1]),g:Et(r[2]+""+r[2]),b:Et(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function AP(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function gc(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function RP(e){if(Array.isArray(e))return gc(e)}function ny(e,n,r){if(typeof e=="function"?e===n:e.has(n))return arguments.length<3?n:r;throw new TypeError("Private element is not present on this object")}function MP(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function TP(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Pt(e,n){return e.get(ny(e,n))}function H0(e,n,r){MP(e,n),n.set(e,r)}function z0(e,n,r){return e.set(ny(e,n),r),r}function PP(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,IP(a.key),a)}}function NP(e,n,r){return n&&PP(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function OP(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
323
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DP(e){return RP(e)||OP(e)||LP(e)||jP()}function kP(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,n);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function IP(e){var n=kP(e,"string");return typeof n=="symbol"?n:n+""}function LP(e,n){if(e){if(typeof e=="string")return gc(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?gc(e,n):void 0}}var FP=123,$P=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},ry=function(n,r,a){return(n<<16)+(r<<8)+a},HP=function(n){var r=oe(n).toRgb(),a=r.r,o=r.g,i=r.b;return ry(a,o,i)},U0=function(n,r){return n*FP%Math.pow(2,r)},lr=new WeakMap,En=new WeakMap,zP=(function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;TP(this,e),H0(this,lr,void 0),H0(this,En,void 0),z0(En,this,n),this.reset()}return NP(e,[{key:"reset",value:function(){z0(lr,this,["__reserved for background__"])}},{key:"register",value:function(r){if(Pt(lr,this).length>=Math.pow(2,24-Pt(En,this)))return null;var a=Pt(lr,this).length,o=U0(a,Pt(En,this)),i=$P(a+(o<<24-Pt(En,this)));return Pt(lr,this).push(r),i}},{key:"lookup",value:function(r){if(!r)return null;var a=typeof r=="string"?HP(r):ry.apply(void 0,DP(r));if(!a)return null;var o=a&Math.pow(2,24-Pt(En,this))-1,i=a>>24-Pt(En,this)&Math.pow(2,Pt(En,this))-1;return U0(o,Pt(En,this))!==i||o>=Pt(lr,this).length?null:Pt(lr,this)[o]}}])})(),Fo,Ie,ay,oy,cr,V0,iy,sy,ly,Xu,yc,vc,ho={},cy=[],UP=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ns=Array.isArray;function ln(e,n){for(var r in n)e[r]=n[r];return e}function Ju(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function VP(e,n,r){var a,o,i,s={};for(i in n)i=="key"?a=n[i]:i=="ref"?o=n[i]:s[i]=n[i];if(arguments.length>2&&(s.children=arguments.length>3?Fo.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Ba(e,s,a,o,null)}function Ba(e,n,r,a,o){var i={type:e,props:n,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++ay,__i:-1,__u:0};return o==null&&Ie.vnode!=null&&Ie.vnode(i),i}function Os(e){return e.children}function Si(e,n){this.props=e,this.context=n}function ta(e,n){if(n==null)return e.__?ta(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ta(e):null}function uy(e){var n,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return uy(e)}}function Z0(e){(!e.__d&&(e.__d=!0)&&cr.push(e)&&!Xi.__r++||V0!=Ie.debounceRendering)&&((V0=Ie.debounceRendering)||iy)(Xi)}function Xi(){for(var e,n,r,a,o,i,s,l=1;cr.length;)cr.length>l&&cr.sort(sy),e=cr.shift(),l=cr.length,e.__d&&(r=void 0,a=void 0,o=(a=(n=e).__v).__e,i=[],s=[],n.__P&&((r=ln({},a)).__v=a.__v+1,Ie.vnode&&Ie.vnode(r),ed(n.__P,r,a,n.__n,n.__P.namespaceURI,32&a.__u?[o]:null,i,o??ta(a),!!(32&a.__u),s),r.__v=a.__v,r.__.__k[r.__i]=r,hy(i,r,s),a.__e=a.__=null,r.__e!=o&&uy(r)));Xi.__r=0}function dy(e,n,r,a,o,i,s,l,c,u,h){var f,m,g,y,v,b,x,w=a&&a.__k||cy,E=n.length;for(c=ZP(r,n,w,c,E),f=0;f<E;f++)(g=r.__k[f])!=null&&(m=g.__i==-1?ho:w[g.__i]||ho,g.__i=f,b=ed(e,g,m,o,i,s,l,c,u,h),y=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&td(m.ref,null,g),h.push(g.ref,g.__c||y,g)),v==null&&y!=null&&(v=y),(x=!!(4&g.__u))||m.__k===g.__k?c=fy(g,c,e,x):typeof g.type=="function"&&b!==void 0?c=b:y&&(c=y.nextSibling),g.__u&=-7);return r.__e=v,c}function ZP(e,n,r,a,o){var i,s,l,c,u,h=r.length,f=h,m=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=n[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=Ba(null,s,null,null,null):Ns(s)?s=e.__k[i]=Ba(Os,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Ba(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,c=i+m,s.__=e,s.__b=e.__b+1,l=null,(u=s.__i=BP(s,r,c,f))!=-1&&(f--,(l=r[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(o>h?m--:o<h&&m++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?m--:u==c+1?m++:(u>c?m--:m++,s.__u|=4))):e.__k[i]=null;if(f)for(i=0;i<h;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=ta(l)),my(l,l));return a}function fy(e,n,r,a){var o,i;if(typeof e.type=="function"){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,n=fy(o[i],n,r,a));return n}e.__e!=n&&(a&&(n&&e.type&&!n.parentNode&&(n=ta(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function BP(e,n,r,a){var o,i,s,l=e.key,c=e.type,u=n[r],h=u!=null&&(2&u.__u)==0;if(u===null&&l==null||h&&l==u.key&&c==u.type)return r;if(a>(h?1:0)){for(o=r-1,i=r+1;o>=0||i<n.length;)if((u=n[s=o>=0?o--:i++])!=null&&(2&u.__u)==0&&l==u.key&&c==u.type)return s}return-1}function B0(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||UP.test(n)?r:r+"px"}function ui(e,n,r,a,o){var i,s;e:if(n=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof a=="string"&&(e.style.cssText=a=""),a)for(n in a)r&&n in r||B0(e.style,n,"");if(r)for(n in r)a&&r[n]==a[n]||B0(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")i=n!=(n=n.replace(ly,"$1")),s=n.toLowerCase(),n=s in e||n=="onFocusOut"||n=="onFocusIn"?s.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=r,r?a?r.u=a.u:(r.u=Xu,e.addEventListener(n,i?vc:yc,i)):e.removeEventListener(n,i?vc:yc,i);else{if(o=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function q0(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n.t==null)n.t=Xu++;else if(n.t<r.u)return;return r(Ie.event?Ie.event(n):n)}}}function ed(e,n,r,a,o,i,s,l,c,u){var h,f,m,g,y,v,b,x,w,E,C,S,M,_,A,j,P,O=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),i=[l=n.__e=r.__e]),(h=Ie.__b)&&h(n);e:if(typeof O=="function")try{if(x=n.props,w="prototype"in O&&O.prototype.render,E=(h=O.contextType)&&a[h.__c],C=h?E?E.props.value:h.__:a,r.__c?b=(f=n.__c=r.__c).__=f.__E:(w?n.__c=f=new O(x,C):(n.__c=f=new Si(x,C),f.constructor=O,f.render=WP),E&&E.sub(f),f.state||(f.state={}),f.__n=a,m=f.__d=!0,f.__h=[],f._sb=[]),w&&f.__s==null&&(f.__s=f.state),w&&O.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ln({},f.__s)),ln(f.__s,O.getDerivedStateFromProps(x,f.__s))),g=f.props,y=f.state,f.__v=n,m)w&&O.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),w&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(w&&O.getDerivedStateFromProps==null&&x!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(x,C),n.__v==r.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(x,f.__s,C)===!1){for(n.__v!=r.__v&&(f.props=x,f.state=f.__s,f.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(H){H&&(H.__=n)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&s.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(x,f.__s,C),w&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,y,v)})}if(f.context=C,f.props=x,f.__P=e,f.__e=!1,M=Ie.__r,_=0,w){for(f.state=f.__s,f.__d=!1,M&&M(n),h=f.render(f.props,f.state,f.context),A=0;A<f._sb.length;A++)f.__h.push(f._sb[A]);f._sb=[]}else do f.__d=!1,M&&M(n),h=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++_<25);f.state=f.__s,f.getChildContext!=null&&(a=ln(ln({},a),f.getChildContext())),w&&!m&&f.getSnapshotBeforeUpdate!=null&&(v=f.getSnapshotBeforeUpdate(g,y)),j=h,h!=null&&h.type===Os&&h.key==null&&(j=py(h.props.children)),l=dy(e,Ns(j)?j:[j],n,r,a,o,i,s,l,c,u),f.base=n.__e,n.__u&=-161,f.__h.length&&s.push(f),b&&(f.__E=f.__=null)}catch(H){if(n.__v=null,c||i!=null)if(H.then){for(n.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,n.__e=l}else{for(P=i.length;P--;)Ju(i[P]);xc(n)}else n.__e=r.__e,n.__k=r.__k,H.then||xc(n);Ie.__e(H,n,r)}else i==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):l=n.__e=qP(r.__e,n,r,a,o,i,s,c,u);return(h=Ie.diffed)&&h(n),128&n.__u?void 0:l}function xc(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(xc)}function hy(e,n,r){for(var a=0;a<r.length;a++)td(r[a],r[++a],r[++a]);Ie.__c&&Ie.__c(n,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){Ie.__e(i,o.__v)}})}function py(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Ns(e)?e.map(py):ln({},e)}function qP(e,n,r,a,o,i,s,l,c){var u,h,f,m,g,y,v,b=r.props||ho,x=n.props,w=n.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((g=i[u])&&"setAttribute"in g==!!w&&(w?g.localName==w:g.nodeType==3)){e=g,i[u]=null;break}}if(e==null){if(w==null)return document.createTextNode(x);e=document.createElementNS(o,w,x.is&&x),l&&(Ie.__m&&Ie.__m(n,i),l=!1),i=null}if(w==null)b===x||l&&e.data==x||(e.data=x);else{if(i=i&&Fo.call(e.childNodes),!l&&i!=null)for(b={},u=0;u<e.attributes.length;u++)b[(g=e.attributes[u]).name]=g.value;for(u in b)if(g=b[u],u!="children"){if(u=="dangerouslySetInnerHTML")f=g;else if(!(u in x)){if(u=="value"&&"defaultValue"in x||u=="checked"&&"defaultChecked"in x)continue;ui(e,u,null,g,o)}}for(u in x)g=x[u],u=="children"?m=g:u=="dangerouslySetInnerHTML"?h=g:u=="value"?y=g:u=="checked"?v=g:l&&typeof g!="function"||b[u]===g||ui(e,u,g,b[u],o);if(h)l||f&&(h.__html==f.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),n.__k=[];else if(f&&(e.innerHTML=""),dy(n.type=="template"?e.content:e,Ns(m)?m:[m],n,r,a,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:r.__k&&ta(r,0),l,c),i!=null)for(u=i.length;u--;)Ju(i[u]);l||(u="value",w=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[u]||w=="progress"&&!y||w=="option"&&y!=b[u])&&ui(e,u,y,b[u],o),u="checked",v!=null&&v!=e[u]&&ui(e,u,v,b[u],o))}return e}function td(e,n,r){try{if(typeof e=="function"){var a=typeof e.__u=="function";a&&e.__u(),a&&n==null||(e.__u=e(n))}else e.current=n}catch(o){Ie.__e(o,r)}}function my(e,n,r){var a,o;if(Ie.unmount&&Ie.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||td(a,null,n)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){Ie.__e(i,n)}a.base=a.__P=null}if(a=e.__k)for(o=0;o<a.length;o++)a[o]&&my(a[o],n,r||typeof e.type!="function");r||Ju(e.__e),e.__c=e.__=e.__e=void 0}function WP(e,n,r){return this.constructor(e,r)}function GP(e,n,r){var a,o,i,s;n==document&&(n=document.documentElement),Ie.__&&Ie.__(e,n),o=(a=!1)?null:n.__k,i=[],s=[],ed(n,e=n.__k=VP(Os,null,[e]),o||ho,ho,n.namespaceURI,o?null:n.firstChild?Fo.call(n.childNodes):null,i,o?o.__e:n.firstChild,a,s),hy(i,e,s)}function gy(e,n,r){var a,o,i,s,l=ln({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),n)i=="key"?a=n[i]:i=="ref"?o=n[i]:l[i]=n[i]===void 0&&s!=null?s[i]:n[i];return arguments.length>2&&(l.children=arguments.length>3?Fo.call(arguments,2):r),Ba(e.type,l,a||e.key,o||e.ref,null)}Fo=cy.slice,Ie={__e:function(e,n,r,a){for(var o,i,s;n=n.__;)if((o=n.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,a||{}),s=o.__d),s)return o.__E=o}catch(l){e=l}throw e}},ay=0,oy=function(e){return e!=null&&e.constructor===void 0},Si.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ln({},this.state),typeof e=="function"&&(e=e(ln({},r),this.props)),e&&ln(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),Z0(this))},Si.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Z0(this))},Si.prototype.render=Os,cr=[],iy=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,sy=function(e,n){return e.__v.__b-n.__v.__b},Xi.__r=0,ly=/(PointerCapture)$|Capture$/i,Xu=0,yc=q0(!1),vc=q0(!0);function W0(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function KP(e){if(Array.isArray(e))return e}function YP(e,n,r){return(n=nN(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function QP(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,o,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,n!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==n);c=!0);}catch(h){u=!0,o=h}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function XP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
324
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G0(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function JP(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?G0(Object(r),!0).forEach(function(a){YP(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G0(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function eN(e,n){return KP(e)||QP(e,n)||rN(e,n)||XP()}function tN(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,n);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function nN(e){var n=tN(e,"string");return typeof n=="symbol"?n:n+""}function Ji(e){"@babel/helpers - typeof";return Ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ji(e)}function rN(e,n){if(e){if(typeof e=="string")return W0(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W0(e,n):void 0}}var bc=function(n){if(Ji(n)!=="object")return n;var r=gy(n);if(r.props){var a;r.props=JP({},r.props),r!=null&&(a=r.props)!==null&&a!==void 0&&a.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(bc):bc(r.props.children))}return r},aN=function(n){return oy(gy(n))},oN=function(n,r){delete r.__k,GP(bc(n),r)};function iN(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var sN=`.float-tooltip-kap {
325
+ position: absolute;
326
+ width: max-content; /* prevent shrinking near right edge */
327
+ max-width: max(50%, 150px);
328
+ padding: 3px 5px;
329
+ border-radius: 3px;
330
+ font: 12px sans-serif;
331
+ color: #eee;
332
+ background: rgba(0,0,0,0.6);
333
+ pointer-events: none;
334
+ }
335
+ `;iN(sN);var lN=Qu({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(n,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=a.style,i=o===void 0?{}:o,s=!!n&&Ji(n)==="object"&&!!n.node&&typeof n.node=="function",l=kt(s?n.node():n);l.style("position")==="static"&&l.style("position","relative"),r.tooltipEl=l.append("div").attr("class","float-tooltip-kap"),Object.entries(i).forEach(function(u){var h=eN(u,2),f=h[0],m=h[1];return r.tooltipEl.style(f,m)}),r.tooltipEl.style("left","-10000px").style("display","none");var c="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,l.on("mousemove.".concat(c),function(u){r.mouseInside=!0;var h=sn(u),f=l.node(),m=f.offsetWidth,g=f.offsetHeight,y=[r.offsetX===null||r.offsetX===void 0?"-".concat(h[0]/m*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?g>130&&g-h[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",h[0]+"px").style("top",h[1]+"px").style("transform","translate(".concat(y.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseover.".concat(c),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseout.".concat(c),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):aN(n.content)?(n.tooltipEl.text(""),oN(n.content,n.tooltipEl.node())):(n.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",n.content,n.content.toString())):n.tooltipEl.text("")}});function cN(e,n,r){var a,o=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function i(){var s,l=a.length,c,u=0,h=0,f=0;for(s=0;s<l;++s)c=a[s],u+=c.x||0,h+=c.y||0,f+=c.z||0;for(u=(u/l-e)*o,h=(h/l-n)*o,f=(f/l-r)*o,s=0;s<l;++s)c=a[s],u&&(c.x-=u),h&&(c.y-=h),f&&(c.z-=f)}return i.initialize=function(s){a=s},i.x=function(s){return arguments.length?(e=+s,i):e},i.y=function(s){return arguments.length?(n=+s,i):n},i.z=function(s){return arguments.length?(r=+s,i):r},i.strength=function(s){return arguments.length?(o=+s,i):o},i}function uN(e){const n=+this._x.call(null,e);return yy(this.cover(n),n,e)}function yy(e,n,r){if(isNaN(n))return e;var a,o=e._root,i={data:r},s=e._x0,l=e._x1,c,u,h,f,m;if(!o)return e._root=i,e;for(;o.length;)if((h=n>=(c=(s+l)/2))?s=c:l=c,a=o,!(o=o[f=+h]))return a[f]=i,e;if(u=+e._x.call(null,o.data),n===u)return i.next=o,a?a[f]=i:e._root=i,e;do a=a?a[f]=new Array(2):e._root=new Array(2),(h=n>=(c=(s+l)/2))?s=c:l=c;while((f=+h)==(m=+(u>=c)));return a[m]=o,a[f]=i,e}function dN(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n);let a=1/0,o=-1/0;for(let i=0,s;i<n;++i)isNaN(s=+this._x.call(null,e[i]))||(r[i]=s,s<a&&(a=s),s>o&&(o=s));if(a>o)return this;this.cover(a).cover(o);for(let i=0;i<n;++i)yy(this,r[i],e[i]);return this}function fN(e){if(isNaN(e=+e))return this;var n=this._x0,r=this._x1;if(isNaN(n))r=(n=Math.floor(e))+1;else{for(var a=r-n||1,o=this._root,i,s;n>e||e>=r;)switch(s=+(e<n),i=new Array(2),i[s]=o,o=i,a*=2,s){case 0:r=n+a;break;case 1:n=r-a;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._x1=r,this}function hN(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function pN(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Nn(e,n,r){this.node=e,this.x0=n,this.x1=r}function mN(e,n){var r,a=this._x0,o,i,s=this._x1,l=[],c=this._root,u,h;for(c&&l.push(new Nn(c,a,s)),n==null?n=1/0:(a=e-n,s=e+n);u=l.pop();)if(!(!(c=u.node)||(o=u.x0)>s||(i=u.x1)<a))if(c.length){var f=(o+i)/2;l.push(new Nn(c[1],f,i),new Nn(c[0],o,f)),(h=+(e>=f))&&(u=l[l.length-1],l[l.length-1]=l[l.length-1-h],l[l.length-1-h]=u)}else{var m=Math.abs(e-+this._x.call(null,c.data));m<n&&(n=m,a=e-m,s=e+m,r=c.data)}return r}function gN(e){if(isNaN(c=+this._x.call(null,e)))return this;var n,r=this._root,a,o,i,s=this._x0,l=this._x1,c,u,h,f,m;if(!r)return this;if(r.length)for(;;){if((h=c>=(u=(s+l)/2))?s=u:l=u,n=r,!(r=r[f=+h]))return this;if(!r.length)break;n[f+1&1]&&(a=n,m=f)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(i=r.next)&&delete r.next,o?(i?o.next=i:delete o.next,this):n?(i?n[f]=i:delete n[f],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(a?a[m]=r:this._root=r),this):(this._root=i,this)}function yN(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function vN(){return this._root}function xN(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function bN(e){var n=[],r,a=this._root,o,i,s;for(a&&n.push(new Nn(a,this._x0,this._x1));r=n.pop();)if(!e(a=r.node,i=r.x0,s=r.x1)&&a.length){var l=(i+s)/2;(o=a[1])&&n.push(new Nn(o,l,s)),(o=a[0])&&n.push(new Nn(o,i,l))}return this}function wN(e){var n=[],r=[],a;for(this._root&&n.push(new Nn(this._root,this._x0,this._x1));a=n.pop();){var o=a.node;if(o.length){var i,s=a.x0,l=a.x1,c=(s+l)/2;(i=o[0])&&n.push(new Nn(i,s,c)),(i=o[1])&&n.push(new Nn(i,c,l))}r.push(a)}for(;a=r.pop();)e(a.node,a.x0,a.x1);return this}function _N(e){return e[0]}function EN(e){return arguments.length?(this._x=e,this):this._x}function vy(e,n){var r=new nd(n??_N,NaN,NaN);return e==null?r:r.addAll(e)}function nd(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function K0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var _t=vy.prototype=nd.prototype;_t.copy=function(){var e=new nd(this._x,this._x0,this._x1),n=this._root,r,a;if(!n)return e;if(!n.length)return e._root=K0(n),e;for(r=[{source:n,target:e._root=new Array(2)}];n=r.pop();)for(var o=0;o<2;++o)(a=n.source[o])&&(a.length?r.push({source:a,target:n.target[o]=new Array(2)}):n.target[o]=K0(a));return e};_t.add=uN;_t.addAll=dN;_t.cover=fN;_t.data=hN;_t.extent=pN;_t.find=mN;_t.remove=gN;_t.removeAll=yN;_t.root=vN;_t.size=xN;_t.visit=bN;_t.visitAfter=wN;_t.x=EN;function CN(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return xy(this.cover(n,r),n,r,e)}function xy(e,n,r,a){if(isNaN(n)||isNaN(r))return e;var o,i=e._root,s={data:a},l=e._x0,c=e._y0,u=e._x1,h=e._y1,f,m,g,y,v,b,x,w;if(!i)return e._root=s,e;for(;i.length;)if((v=n>=(f=(l+u)/2))?l=f:u=f,(b=r>=(m=(c+h)/2))?c=m:h=m,o=i,!(i=i[x=b<<1|v]))return o[x]=s,e;if(g=+e._x.call(null,i.data),y=+e._y.call(null,i.data),n===g&&r===y)return s.next=i,o?o[x]=s:e._root=s,e;do o=o?o[x]=new Array(4):e._root=new Array(4),(v=n>=(f=(l+u)/2))?l=f:u=f,(b=r>=(m=(c+h)/2))?c=m:h=m;while((x=b<<1|v)===(w=(y>=m)<<1|g>=f));return o[w]=i,o[x]=s,e}function SN(e){var n,r,a=e.length,o,i,s=new Array(a),l=new Array(a),c=1/0,u=1/0,h=-1/0,f=-1/0;for(r=0;r<a;++r)isNaN(o=+this._x.call(null,n=e[r]))||isNaN(i=+this._y.call(null,n))||(s[r]=o,l[r]=i,o<c&&(c=o),o>h&&(h=o),i<u&&(u=i),i>f&&(f=i));if(c>h||u>f)return this;for(this.cover(c,u).cover(h,f),r=0;r<a;++r)xy(this,s[r],l[r],e[r]);return this}function AN(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,a=this._y0,o=this._x1,i=this._y1;if(isNaN(r))o=(r=Math.floor(e))+1,i=(a=Math.floor(n))+1;else{for(var s=o-r||1,l=this._root,c,u;r>e||e>=o||a>n||n>=i;)switch(u=(n<a)<<1|e<r,c=new Array(4),c[u]=l,l=c,s*=2,u){case 0:o=r+s,i=a+s;break;case 1:r=o-s,i=a+s;break;case 2:o=r+s,a=i-s;break;case 3:r=o-s,a=i-s;break}this._root&&this._root.length&&(this._root=l)}return this._x0=r,this._y0=a,this._x1=o,this._y1=i,this}function RN(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function MN(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function ht(e,n,r,a,o){this.node=e,this.x0=n,this.y0=r,this.x1=a,this.y1=o}function TN(e,n,r){var a,o=this._x0,i=this._y0,s,l,c,u,h=this._x1,f=this._y1,m=[],g=this._root,y,v;for(g&&m.push(new ht(g,o,i,h,f)),r==null?r=1/0:(o=e-r,i=n-r,h=e+r,f=n+r,r*=r);y=m.pop();)if(!(!(g=y.node)||(s=y.x0)>h||(l=y.y0)>f||(c=y.x1)<o||(u=y.y1)<i))if(g.length){var b=(s+c)/2,x=(l+u)/2;m.push(new ht(g[3],b,x,c,u),new ht(g[2],s,x,b,u),new ht(g[1],b,l,c,x),new ht(g[0],s,l,b,x)),(v=(n>=x)<<1|e>=b)&&(y=m[m.length-1],m[m.length-1]=m[m.length-1-v],m[m.length-1-v]=y)}else{var w=e-+this._x.call(null,g.data),E=n-+this._y.call(null,g.data),C=w*w+E*E;if(C<r){var S=Math.sqrt(r=C);o=e-S,i=n-S,h=e+S,f=n+S,a=g.data}}return a}function PN(e){if(isNaN(h=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,a,o,i,s=this._x0,l=this._y0,c=this._x1,u=this._y1,h,f,m,g,y,v,b,x;if(!r)return this;if(r.length)for(;;){if((y=h>=(m=(s+c)/2))?s=m:c=m,(v=f>=(g=(l+u)/2))?l=g:u=g,n=r,!(r=r[b=v<<1|y]))return this;if(!r.length)break;(n[b+1&3]||n[b+2&3]||n[b+3&3])&&(a=n,x=b)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(i=r.next)&&delete r.next,o?(i?o.next=i:delete o.next,this):n?(i?n[b]=i:delete n[b],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(a?a[x]=r:this._root=r),this):(this._root=i,this)}function NN(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function ON(){return this._root}function jN(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function DN(e){var n=[],r,a=this._root,o,i,s,l,c;for(a&&n.push(new ht(a,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(a=r.node,i=r.x0,s=r.y0,l=r.x1,c=r.y1)&&a.length){var u=(i+l)/2,h=(s+c)/2;(o=a[3])&&n.push(new ht(o,u,h,l,c)),(o=a[2])&&n.push(new ht(o,i,h,u,c)),(o=a[1])&&n.push(new ht(o,u,s,l,h)),(o=a[0])&&n.push(new ht(o,i,s,u,h))}return this}function kN(e){var n=[],r=[],a;for(this._root&&n.push(new ht(this._root,this._x0,this._y0,this._x1,this._y1));a=n.pop();){var o=a.node;if(o.length){var i,s=a.x0,l=a.y0,c=a.x1,u=a.y1,h=(s+c)/2,f=(l+u)/2;(i=o[0])&&n.push(new ht(i,s,l,h,f)),(i=o[1])&&n.push(new ht(i,h,l,c,f)),(i=o[2])&&n.push(new ht(i,s,f,h,u)),(i=o[3])&&n.push(new ht(i,h,f,c,u))}r.push(a)}for(;a=r.pop();)e(a.node,a.x0,a.y0,a.x1,a.y1);return this}function IN(e){return e[0]}function LN(e){return arguments.length?(this._x=e,this):this._x}function FN(e){return e[1]}function $N(e){return arguments.length?(this._y=e,this):this._y}function by(e,n,r){var a=new rd(n??IN,r??FN,NaN,NaN,NaN,NaN);return e==null?a:a.addAll(e)}function rd(e,n,r,a,o,i){this._x=e,this._y=n,this._x0=r,this._y0=a,this._x1=o,this._y1=i,this._root=void 0}function Y0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var gt=by.prototype=rd.prototype;gt.copy=function(){var e=new rd(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,a;if(!n)return e;if(!n.length)return e._root=Y0(n),e;for(r=[{source:n,target:e._root=new Array(4)}];n=r.pop();)for(var o=0;o<4;++o)(a=n.source[o])&&(a.length?r.push({source:a,target:n.target[o]=new Array(4)}):n.target[o]=Y0(a));return e};gt.add=CN;gt.addAll=SN;gt.cover=AN;gt.data=RN;gt.extent=MN;gt.find=TN;gt.remove=PN;gt.removeAll=NN;gt.root=ON;gt.size=jN;gt.visit=DN;gt.visitAfter=kN;gt.x=LN;gt.y=$N;function HN(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),a=+this._z.call(null,e);return wy(this.cover(n,r,a),n,r,a,e)}function wy(e,n,r,a,o){if(isNaN(n)||isNaN(r)||isNaN(a))return e;var i,s=e._root,l={data:o},c=e._x0,u=e._y0,h=e._z0,f=e._x1,m=e._y1,g=e._z1,y,v,b,x,w,E,C,S,M,_,A;if(!s)return e._root=l,e;for(;s.length;)if((C=n>=(y=(c+f)/2))?c=y:f=y,(S=r>=(v=(u+m)/2))?u=v:m=v,(M=a>=(b=(h+g)/2))?h=b:g=b,i=s,!(s=s[_=M<<2|S<<1|C]))return i[_]=l,e;if(x=+e._x.call(null,s.data),w=+e._y.call(null,s.data),E=+e._z.call(null,s.data),n===x&&r===w&&a===E)return l.next=s,i?i[_]=l:e._root=l,e;do i=i?i[_]=new Array(8):e._root=new Array(8),(C=n>=(y=(c+f)/2))?c=y:f=y,(S=r>=(v=(u+m)/2))?u=v:m=v,(M=a>=(b=(h+g)/2))?h=b:g=b;while((_=M<<2|S<<1|C)===(A=(E>=b)<<2|(w>=v)<<1|x>=y));return i[A]=s,i[_]=l,e}function zN(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n),a=new Float64Array(n),o=new Float64Array(n);let i=1/0,s=1/0,l=1/0,c=-1/0,u=-1/0,h=-1/0;for(let f=0,m,g,y,v;f<n;++f)isNaN(g=+this._x.call(null,m=e[f]))||isNaN(y=+this._y.call(null,m))||isNaN(v=+this._z.call(null,m))||(r[f]=g,a[f]=y,o[f]=v,g<i&&(i=g),g>c&&(c=g),y<s&&(s=y),y>u&&(u=y),v<l&&(l=v),v>h&&(h=v));if(i>c||s>u||l>h)return this;this.cover(i,s,l).cover(c,u,h);for(let f=0;f<n;++f)wy(this,r[f],a[f],o[f],e[f]);return this}function UN(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var a=this._x0,o=this._y0,i=this._z0,s=this._x1,l=this._y1,c=this._z1;if(isNaN(a))s=(a=Math.floor(e))+1,l=(o=Math.floor(n))+1,c=(i=Math.floor(r))+1;else{for(var u=s-a||1,h=this._root,f,m;a>e||e>=s||o>n||n>=l||i>r||r>=c;)switch(m=(r<i)<<2|(n<o)<<1|e<a,f=new Array(8),f[m]=h,h=f,u*=2,m){case 0:s=a+u,l=o+u,c=i+u;break;case 1:a=s-u,l=o+u,c=i+u;break;case 2:s=a+u,o=l-u,c=i+u;break;case 3:a=s-u,o=l-u,c=i+u;break;case 4:s=a+u,l=o+u,i=c-u;break;case 5:a=s-u,l=o+u,i=c-u;break;case 6:s=a+u,o=l-u,i=c-u;break;case 7:a=s-u,o=l-u,i=c-u;break}this._root&&this._root.length&&(this._root=h)}return this._x0=a,this._y0=o,this._z0=i,this._x1=s,this._y1=l,this._z1=c,this}function VN(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function ZN(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function Ne(e,n,r,a,o,i,s){this.node=e,this.x0=n,this.y0=r,this.z0=a,this.x1=o,this.y1=i,this.z1=s}function BN(e,n,r,a){var o,i=this._x0,s=this._y0,l=this._z0,c,u,h,f,m,g,y=this._x1,v=this._y1,b=this._z1,x=[],w=this._root,E,C;for(w&&x.push(new Ne(w,i,s,l,y,v,b)),a==null?a=1/0:(i=e-a,s=n-a,l=r-a,y=e+a,v=n+a,b=r+a,a*=a);E=x.pop();)if(!(!(w=E.node)||(c=E.x0)>y||(u=E.y0)>v||(h=E.z0)>b||(f=E.x1)<i||(m=E.y1)<s||(g=E.z1)<l))if(w.length){var S=(c+f)/2,M=(u+m)/2,_=(h+g)/2;x.push(new Ne(w[7],S,M,_,f,m,g),new Ne(w[6],c,M,_,S,m,g),new Ne(w[5],S,u,_,f,M,g),new Ne(w[4],c,u,_,S,M,g),new Ne(w[3],S,M,h,f,m,_),new Ne(w[2],c,M,h,S,m,_),new Ne(w[1],S,u,h,f,M,_),new Ne(w[0],c,u,h,S,M,_)),(C=(r>=_)<<2|(n>=M)<<1|e>=S)&&(E=x[x.length-1],x[x.length-1]=x[x.length-1-C],x[x.length-1-C]=E)}else{var A=e-+this._x.call(null,w.data),j=n-+this._y.call(null,w.data),P=r-+this._z.call(null,w.data),O=A*A+j*j+P*P;if(O<a){var H=Math.sqrt(a=O);i=e-H,s=n-H,l=r-H,y=e+H,v=n+H,b=r+H,o=w.data}}return o}const qN=(e,n,r,a,o,i)=>Math.sqrt((e-a)**2+(n-o)**2+(r-i)**2);function WN(e,n,r,a){const o=[],i=e-a,s=n-a,l=r-a,c=e+a,u=n+a,h=r+a;return this.visit((f,m,g,y,v,b,x)=>{if(!f.length)do{const w=f.data;qN(e,n,r,this._x(w),this._y(w),this._z(w))<=a&&o.push(w)}while(f=f.next);return m>c||g>u||y>h||v<i||b<s||x<l}),o}function GN(e){if(isNaN(m=+this._x.call(null,e))||isNaN(g=+this._y.call(null,e))||isNaN(y=+this._z.call(null,e)))return this;var n,r=this._root,a,o,i,s=this._x0,l=this._y0,c=this._z0,u=this._x1,h=this._y1,f=this._z1,m,g,y,v,b,x,w,E,C,S,M;if(!r)return this;if(r.length)for(;;){if((w=m>=(v=(s+u)/2))?s=v:u=v,(E=g>=(b=(l+h)/2))?l=b:h=b,(C=y>=(x=(c+f)/2))?c=x:f=x,n=r,!(r=r[S=C<<2|E<<1|w]))return this;if(!r.length)break;(n[S+1&7]||n[S+2&7]||n[S+3&7]||n[S+4&7]||n[S+5&7]||n[S+6&7]||n[S+7&7])&&(a=n,M=S)}for(;r.data!==e;)if(o=r,!(r=r.next))return this;return(i=r.next)&&delete r.next,o?(i?o.next=i:delete o.next,this):n?(i?n[S]=i:delete n[S],(r=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&r===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!r.length&&(a?a[M]=r:this._root=r),this):(this._root=i,this)}function KN(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function YN(){return this._root}function QN(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function XN(e){var n=[],r,a=this._root,o,i,s,l,c,u,h;for(a&&n.push(new Ne(a,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(a=r.node,i=r.x0,s=r.y0,l=r.z0,c=r.x1,u=r.y1,h=r.z1)&&a.length){var f=(i+c)/2,m=(s+u)/2,g=(l+h)/2;(o=a[7])&&n.push(new Ne(o,f,m,g,c,u,h)),(o=a[6])&&n.push(new Ne(o,i,m,g,f,u,h)),(o=a[5])&&n.push(new Ne(o,f,s,g,c,m,h)),(o=a[4])&&n.push(new Ne(o,i,s,g,f,m,h)),(o=a[3])&&n.push(new Ne(o,f,m,l,c,u,g)),(o=a[2])&&n.push(new Ne(o,i,m,l,f,u,g)),(o=a[1])&&n.push(new Ne(o,f,s,l,c,m,g)),(o=a[0])&&n.push(new Ne(o,i,s,l,f,m,g))}return this}function JN(e){var n=[],r=[],a;for(this._root&&n.push(new Ne(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));a=n.pop();){var o=a.node;if(o.length){var i,s=a.x0,l=a.y0,c=a.z0,u=a.x1,h=a.y1,f=a.z1,m=(s+u)/2,g=(l+h)/2,y=(c+f)/2;(i=o[0])&&n.push(new Ne(i,s,l,c,m,g,y)),(i=o[1])&&n.push(new Ne(i,m,l,c,u,g,y)),(i=o[2])&&n.push(new Ne(i,s,g,c,m,h,y)),(i=o[3])&&n.push(new Ne(i,m,g,c,u,h,y)),(i=o[4])&&n.push(new Ne(i,s,l,y,m,g,f)),(i=o[5])&&n.push(new Ne(i,m,l,y,u,g,f)),(i=o[6])&&n.push(new Ne(i,s,g,y,m,h,f)),(i=o[7])&&n.push(new Ne(i,m,g,y,u,h,f))}r.push(a)}for(;a=r.pop();)e(a.node,a.x0,a.y0,a.z0,a.x1,a.y1,a.z1);return this}function eO(e){return e[0]}function tO(e){return arguments.length?(this._x=e,this):this._x}function nO(e){return e[1]}function rO(e){return arguments.length?(this._y=e,this):this._y}function aO(e){return e[2]}function oO(e){return arguments.length?(this._z=e,this):this._z}function _y(e,n,r,a){var o=new ad(n??eO,r??nO,a??aO,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function ad(e,n,r,a,o,i,s,l,c){this._x=e,this._y=n,this._z=r,this._x0=a,this._y0=o,this._z0=i,this._x1=s,this._y1=l,this._z1=c,this._root=void 0}function Q0(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var Je=_y.prototype=ad.prototype;Je.copy=function(){var e=new ad(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),n=this._root,r,a;if(!n)return e;if(!n.length)return e._root=Q0(n),e;for(r=[{source:n,target:e._root=new Array(8)}];n=r.pop();)for(var o=0;o<8;++o)(a=n.source[o])&&(a.length?r.push({source:a,target:n.target[o]=new Array(8)}):n.target[o]=Q0(a));return e};Je.add=HN;Je.addAll=zN;Je.cover=UN;Je.data=VN;Je.extent=ZN;Je.find=BN;Je.findAllWithinRadius=WN;Je.remove=GN;Je.removeAll=KN;Je.root=YN;Je.size=QN;Je.visit=XN;Je.visitAfter=JN;Je.x=tO;Je.y=rO;Je.z=oO;function Pn(e){return function(){return e}}function Rn(e){return(e()-.5)*1e-6}function iO(e){return e.index}function X0(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function sO(e){var n=iO,r=m,a,o=Pn(30),i,s,l,c,u,h,f=1;e==null&&(e=[]);function m(x){return 1/Math.min(c[x.source.index],c[x.target.index])}function g(x){for(var w=0,E=e.length;w<f;++w)for(var C=0,S,M,_,A=0,j=0,P=0,O,H;C<E;++C)S=e[C],M=S.source,_=S.target,A=_.x+_.vx-M.x-M.vx||Rn(h),l>1&&(j=_.y+_.vy-M.y-M.vy||Rn(h)),l>2&&(P=_.z+_.vz-M.z-M.vz||Rn(h)),O=Math.sqrt(A*A+j*j+P*P),O=(O-i[C])/O*x*a[C],A*=O,j*=O,P*=O,_.vx-=A*(H=u[C]),l>1&&(_.vy-=j*H),l>2&&(_.vz-=P*H),M.vx+=A*(H=1-H),l>1&&(M.vy+=j*H),l>2&&(M.vz+=P*H)}function y(){if(s){var x,w=s.length,E=e.length,C=new Map(s.map((M,_)=>[n(M,_,s),M])),S;for(x=0,c=new Array(w);x<E;++x)S=e[x],S.index=x,typeof S.source!="object"&&(S.source=X0(C,S.source)),typeof S.target!="object"&&(S.target=X0(C,S.target)),c[S.source.index]=(c[S.source.index]||0)+1,c[S.target.index]=(c[S.target.index]||0)+1;for(x=0,u=new Array(E);x<E;++x)S=e[x],u[x]=c[S.source.index]/(c[S.source.index]+c[S.target.index]);a=new Array(E),v(),i=new Array(E),b()}}function v(){if(s)for(var x=0,w=e.length;x<w;++x)a[x]=+r(e[x],x,e)}function b(){if(s)for(var x=0,w=e.length;x<w;++x)i[x]=+o(e[x],x,e)}return g.initialize=function(x,...w){s=x,h=w.find(E=>typeof E=="function")||Math.random,l=w.find(E=>[1,2,3].includes(E))||2,y()},g.links=function(x){return arguments.length?(e=x,y(),g):e},g.id=function(x){return arguments.length?(n=x,g):n},g.iterations=function(x){return arguments.length?(f=+x,g):f},g.strength=function(x){return arguments.length?(r=typeof x=="function"?x:Pn(+x),v(),g):r},g.distance=function(x){return arguments.length?(o=typeof x=="function"?x:Pn(+x),b(),g):o},g}const lO=1664525,cO=1013904223,J0=4294967296;function uO(){let e=1;return()=>(e=(lO*e+cO)%J0)/J0}var eh=3;function gl(e){return e.x}function th(e){return e.y}function dO(e){return e.z}var fO=10,hO=Math.PI*(3-Math.sqrt(5)),pO=Math.PI*20/(9+Math.sqrt(221));function mO(e,n){n=n||2;var r=Math.min(eh,Math.max(1,Math.round(n))),a,o=1,i=.001,s=1-Math.pow(i,1/300),l=0,c=.6,u=new Map,h=Wu(g),f=Io("tick","end"),m=uO();e==null&&(e=[]);function g(){y(),f.call("tick",a),o<i&&(h.stop(),f.call("end",a))}function y(x){var w,E=e.length,C;x===void 0&&(x=1);for(var S=0;S<x;++S)for(o+=(l-o)*s,u.forEach(function(M){M(o)}),w=0;w<E;++w)C=e[w],C.fx==null?C.x+=C.vx*=c:(C.x=C.fx,C.vx=0),r>1&&(C.fy==null?C.y+=C.vy*=c:(C.y=C.fy,C.vy=0)),r>2&&(C.fz==null?C.z+=C.vz*=c:(C.z=C.fz,C.vz=0));return a}function v(){for(var x=0,w=e.length,E;x<w;++x){if(E=e[x],E.index=x,E.fx!=null&&(E.x=E.fx),E.fy!=null&&(E.y=E.fy),E.fz!=null&&(E.z=E.fz),isNaN(E.x)||r>1&&isNaN(E.y)||r>2&&isNaN(E.z)){var C=fO*(r>2?Math.cbrt(.5+x):r>1?Math.sqrt(.5+x):x),S=x*hO,M=x*pO;r===1?E.x=C:r===2?(E.x=C*Math.cos(S),E.y=C*Math.sin(S)):(E.x=C*Math.sin(S)*Math.cos(M),E.y=C*Math.cos(S),E.z=C*Math.sin(S)*Math.sin(M))}(isNaN(E.vx)||r>1&&isNaN(E.vy)||r>2&&isNaN(E.vz))&&(E.vx=0,r>1&&(E.vy=0),r>2&&(E.vz=0))}}function b(x){return x.initialize&&x.initialize(e,m,r),x}return v(),a={tick:y,restart:function(){return h.restart(g),a},stop:function(){return h.stop(),a},numDimensions:function(x){return arguments.length?(r=Math.min(eh,Math.max(1,Math.round(x))),u.forEach(b),a):r},nodes:function(x){return arguments.length?(e=x,v(),u.forEach(b),a):e},alpha:function(x){return arguments.length?(o=+x,a):o},alphaMin:function(x){return arguments.length?(i=+x,a):i},alphaDecay:function(x){return arguments.length?(s=+x,a):+s},alphaTarget:function(x){return arguments.length?(l=+x,a):l},velocityDecay:function(x){return arguments.length?(c=1-x,a):1-c},randomSource:function(x){return arguments.length?(m=x,u.forEach(b),a):m},force:function(x,w){return arguments.length>1?(w==null?u.delete(x):u.set(x,b(w)),a):u.get(x)},find:function(){var x=Array.prototype.slice.call(arguments),w=x.shift()||0,E=(r>1?x.shift():null)||0,C=(r>2?x.shift():null)||0,S=x.shift()||1/0,M=0,_=e.length,A,j,P,O,H,Z;for(S*=S,M=0;M<_;++M)H=e[M],A=w-H.x,j=E-(H.y||0),P=C-(H.z||0),O=A*A+j*j+P*P,O<S&&(Z=H,S=O);return Z},on:function(x,w){return arguments.length>1?(f.on(x,w),a):f.on(x)}}}function gO(){var e,n,r,a,o,i=Pn(-30),s,l=1,c=1/0,u=.81;function h(y){var v,b=e.length,x=(n===1?vy(e,gl):n===2?by(e,gl,th):n===3?_y(e,gl,th,dO):null).visitAfter(m);for(o=y,v=0;v<b;++v)r=e[v],x.visit(g)}function f(){if(e){var y,v=e.length,b;for(s=new Array(v),y=0;y<v;++y)b=e[y],s[b.index]=+i(b,y,e)}}function m(y){var v=0,b,x,w=0,E,C,S,M,_=y.length;if(_){for(E=C=S=M=0;M<_;++M)(b=y[M])&&(x=Math.abs(b.value))&&(v+=b.value,w+=x,E+=x*(b.x||0),C+=x*(b.y||0),S+=x*(b.z||0));v*=Math.sqrt(4/_),y.x=E/w,n>1&&(y.y=C/w),n>2&&(y.z=S/w)}else{b=y,b.x=b.data.x,n>1&&(b.y=b.data.y),n>2&&(b.z=b.data.z);do v+=s[b.data.index];while(b=b.next)}y.value=v}function g(y,v,b,x,w){if(!y.value)return!0;var E=[b,x,w][n-1],C=y.x-r.x,S=n>1?y.y-r.y:0,M=n>2?y.z-r.z:0,_=E-v,A=C*C+S*S+M*M;if(_*_/u<A)return A<c&&(C===0&&(C=Rn(a),A+=C*C),n>1&&S===0&&(S=Rn(a),A+=S*S),n>2&&M===0&&(M=Rn(a),A+=M*M),A<l&&(A=Math.sqrt(l*A)),r.vx+=C*y.value*o/A,n>1&&(r.vy+=S*y.value*o/A),n>2&&(r.vz+=M*y.value*o/A)),!0;if(y.length||A>=c)return;(y.data!==r||y.next)&&(C===0&&(C=Rn(a),A+=C*C),n>1&&S===0&&(S=Rn(a),A+=S*S),n>2&&M===0&&(M=Rn(a),A+=M*M),A<l&&(A=Math.sqrt(l*A)));do y.data!==r&&(_=s[y.data.index]*o/A,r.vx+=C*_,n>1&&(r.vy+=S*_),n>2&&(r.vz+=M*_));while(y=y.next)}return h.initialize=function(y,...v){e=y,a=v.find(b=>typeof b=="function")||Math.random,n=v.find(b=>[1,2,3].includes(b))||2,f()},h.strength=function(y){return arguments.length?(i=typeof y=="function"?y:Pn(+y),f(),h):i},h.distanceMin=function(y){return arguments.length?(l=y*y,h):Math.sqrt(l)},h.distanceMax=function(y){return arguments.length?(c=y*y,h):Math.sqrt(c)},h.theta=function(y){return arguments.length?(u=y*y,h):Math.sqrt(u)},h}function yO(e,n,r,a){var o,i,s=Pn(.1),l,c;typeof e!="function"&&(e=Pn(+e)),n==null&&(n=0),r==null&&(r=0),a==null&&(a=0);function u(f){for(var m=0,g=o.length;m<g;++m){var y=o[m],v=y.x-n||1e-6,b=(y.y||0)-r||1e-6,x=(y.z||0)-a||1e-6,w=Math.sqrt(v*v+b*b+x*x),E=(c[m]-w)*l[m]*f/w;y.vx+=v*E,i>1&&(y.vy+=b*E),i>2&&(y.vz+=x*E)}}function h(){if(o){var f,m=o.length;for(l=new Array(m),c=new Array(m),f=0;f<m;++f)c[f]=+e(o[f],f,o),l[f]=isNaN(c[f])?0:+s(o[f],f,o)}}return u.initialize=function(f,...m){o=f,i=m.find(g=>[1,2,3].includes(g))||2,h()},u.strength=function(f){return arguments.length?(s=typeof f=="function"?f:Pn(+f),h(),u):s},u.radius=function(f){return arguments.length?(e=typeof f=="function"?f:Pn(+f),h(),u):e},u.x=function(f){return arguments.length?(n=+f,u):n},u.y=function(f){return arguments.length?(r=+f,u):r},u.z=function(f){return arguments.length?(a=+f,u):a},u}const{abs:Sa,cos:Cn,sin:Fr,acos:vO,atan2:Aa,sqrt:$n,pow:Nt}=Math;function Ra(e){return e<0?-Nt(-e,1/3):Nt(e,1/3)}const Ey=Math.PI,di=2*Ey,Hn=Ey/2,xO=1e-6,yl=Number.MAX_SAFE_INTEGER||9007199254740991,vl=Number.MIN_SAFE_INTEGER||-9007199254740991,bO={x:0,y:0,z:0},Y={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,n){const r=n(e);let a=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(a+=r.z*r.z),$n(a)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];const a=n.length-1;if(e===1)return n[a].t=1,n[a];const o=1-e;let i=n;if(a===0)return n[0].t=e,n[0];if(a===1){const l={x:o*i[0].x+e*i[1].x,y:o*i[0].y+e*i[1].y,t:e};return r&&(l.z=o*i[0].z+e*i[1].z),l}if(a<4){let l=o*o,c=e*e,u,h,f,m=0;a===2?(i=[i[0],i[1],i[2],bO],u=l,h=o*e*2,f=c):a===3&&(u=l*o,h=l*e*3,f=o*c*3,m=e*c);const g={x:u*i[0].x+h*i[1].x+f*i[2].x+m*i[3].x,y:u*i[0].y+h*i[1].y+f*i[2].y+m*i[3].y,t:e};return r&&(g.z=u*i[0].z+h*i[1].z+f*i[2].z+m*i[3].z),g}const s=JSON.parse(JSON.stringify(n));for(;s.length>1;){for(let l=0;l<s.length-1;l++)s[l]={x:s[l].x+(s[l+1].x-s[l].x)*e,y:s[l].y+(s[l+1].y-s[l].y)*e},typeof s[l].z<"u"&&(s[l].z=s[l].z+(s[l+1].z-s[l].z)*e);s.splice(s.length-1,1)}return s[0].t=e,s[0]},computeWithRatios:function(e,n,r,a){const o=1-e,i=r,s=n;let l=i[0],c=i[1],u=i[2],h=i[3],f;if(l*=o,c*=e,s.length===2)return f=l+c,{x:(l*s[0].x+c*s[1].x)/f,y:(l*s[0].y+c*s[1].y)/f,z:a?(l*s[0].z+c*s[1].z)/f:!1,t:e};if(l*=o,c*=2*o,u*=e*e,s.length===3)return f=l+c+u,{x:(l*s[0].x+c*s[1].x+u*s[2].x)/f,y:(l*s[0].y+c*s[1].y+u*s[2].y)/f,z:a?(l*s[0].z+c*s[1].z+u*s[2].z)/f:!1,t:e};if(l*=o,c*=1.5*o,u*=3*o,h*=e*e*e,s.length===4)return f=l+c+u+h,{x:(l*s[0].x+c*s[1].x+u*s[2].x+h*s[3].x)/f,y:(l*s[0].y+c*s[1].y+u*s[2].y+h*s[3].y)/f,z:a?(l*s[0].z+c*s[1].z+u*s[2].z+h*s[3].z)/f:!1,t:e}},derive:function(e,n){const r=[];for(let a=e,o=a.length,i=o-1;o>1;o--,i--){const s=[];for(let l=0,c;l<i;l++)c={x:i*(a[l+1].x-a[l].x),y:i*(a[l+1].y-a[l].y)},n&&(c.z=i*(a[l+1].z-a[l].z)),s.push(c);r.push(s),a=s}return r},between:function(e,n,r){return n<=e&&e<=r||Y.approximately(e,n)||Y.approximately(e,r)},approximately:function(e,n,r){return Sa(e-n)<=(r||xO)},length:function(e){const r=Y.Tvalues.length;let a=0;for(let o=0,i;o<r;o++)i=.5*Y.Tvalues[o]+.5,a+=Y.Cvalues[o]*Y.arcfn(i,e);return .5*a},map:function(e,n,r,a,o){const i=r-n,s=o-a,l=e-n,c=l/i;return a+s*c},lerp:function(e,n,r){const a={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return n.z!==void 0&&r.z!==void 0&&(a.z=n.z+e*(r.z-n.z)),a},pointToString:function(e){let n=e.x+"/"+e.y;return typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(Y.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){const a=n.x-e.x,o=n.y-e.y,i=r.x-e.x,s=r.y-e.y,l=a*s-o*i,c=a*i+o*s;return Aa(l,c)},round:function(e,n){const r=""+e,a=r.indexOf(".");return parseFloat(r.substring(0,a+1+n))},dist:function(e,n){const r=e.x-n.x,a=e.y-n.y;return $n(r*r+a*a)},closest:function(e,n){let r=Nt(2,63),a,o;return e.forEach(function(i,s){o=Y.dist(n,i),o<r&&(r=o,a=s)}),{mdist:r,mpos:a}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=Nt(e,n)+Nt(1-e,n),a=r-1;return Sa(a/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=Nt(1-e,n),a=Nt(e,n)+r;return r/a},lli8:function(e,n,r,a,o,i,s,l){const c=(e*a-n*r)*(o-s)-(e-r)*(o*l-i*s),u=(e*a-n*r)*(i-l)-(n-a)*(o*l-i*s),h=(e-r)*(i-l)-(n-a)*(o-s);return h==0?!1:{x:c/h,y:u/h}},lli4:function(e,n,r,a){const o=e.x,i=e.y,s=n.x,l=n.y,c=r.x,u=r.y,h=a.x,f=a.y;return Y.lli8(o,i,s,l,c,u,h,f)},lli:function(e,n){return Y.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new je(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=yl,r=yl,a=vl,o=vl;return e.forEach(function(i){const s=i.bbox();n>s.x.min&&(n=s.x.min),r>s.y.min&&(r=s.y.min),a<s.x.max&&(a=s.x.max),o<s.y.max&&(o=s.y.max)}),{x:{min:n,mid:(n+a)/2,max:a,size:a-n},y:{min:r,mid:(r+o)/2,max:o,size:o-r}}},shapeintersections:function(e,n,r,a,o){if(!Y.bboxoverlap(n,a))return[];const i=[],s=[e.startcap,e.forward,e.back,e.endcap],l=[r.startcap,r.forward,r.back,r.endcap];return s.forEach(function(c){c.virtual||l.forEach(function(u){if(u.virtual)return;const h=c.intersects(u,o);h.length>0&&(h.c1=c,h.c2=u,h.s1=e,h.s2=r,i.push(h))})}),i},makeshape:function(e,n,r){const a=n.points.length,o=e.points.length,i=Y.makeline(n.points[a-1],e.points[0]),s=Y.makeline(e.points[o-1],n.points[0]),l={startcap:i,forward:e,back:n,endcap:s,bbox:Y.findbbox([i,e,n,s])};return l.intersections=function(c){return Y.shapeintersections(l,l.bbox,c,c.bbox,r)},l},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let a=yl,o=vl,i,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let l=0,c=r.length;l<c;l++)i=r[l],s=e.get(i),s[n]<a&&(a=s[n]),s[n]>o&&(o=s[n]);return{min:a,mid:(a+o)/2,max:o,size:o-a}},align:function(e,n){const r=n.p1.x,a=n.p1.y,o=-Aa(n.p2.y-a,n.p2.x-r),i=function(s){return{x:(s.x-r)*Cn(o)-(s.y-a)*Fr(o),y:(s.x-r)*Fr(o)+(s.y-a)*Cn(o)}};return e.map(i)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=e.length-1,a=Y.align(e,n),o=function(_){return 0<=_&&_<=1};if(r===2){const _=a[0].y,A=a[1].y,j=a[2].y,P=_-2*A+j;if(P!==0){const O=-$n(A*A-_*j),H=-_+A,Z=-(O+H)/P,R=-(-O+H)/P;return[Z,R].filter(o)}else if(A!==j&&P===0)return[(2*A-j)/(2*A-2*j)].filter(o);return[]}const i=a[0].y,s=a[1].y,l=a[2].y,c=a[3].y;let u=-i+3*s-3*l+c,h=3*i-6*s+3*l,f=-3*i+3*s,m=i;if(Y.approximately(u,0)){if(Y.approximately(h,0))return Y.approximately(f,0)?[]:[-m/f].filter(o);const _=$n(f*f-4*h*m),A=2*h;return[(_-f)/A,(-f-_)/A].filter(o)}h/=u,f/=u,m/=u;const g=(3*f-h*h)/3,y=g/3,v=(2*h*h*h-9*h*f+27*m)/27,b=v/2,x=b*b+y*y*y;let w,E,C,S,M;if(x<0){const _=-g/3,A=_*_*_,j=$n(A),P=-v/(2*j),O=P<-1?-1:P>1?1:P,H=vO(O),Z=Ra(j),R=2*Z;return C=R*Cn(H/3)-h/3,S=R*Cn((H+di)/3)-h/3,M=R*Cn((H+2*di)/3)-h/3,[C,S,M].filter(o)}else{if(x===0)return w=b<0?Ra(-b):-Ra(b),C=2*w-h/3,S=-w-h/3,[C,S].filter(o);{const _=$n(x);return w=Ra(-b+_),E=Ra(b+_),[w-E-h/3].filter(o)}}},droots:function(e){if(e.length===3){const n=e[0],r=e[1],a=e[2],o=n-2*r+a;if(o!==0){const i=-$n(r*r-n*a),s=-n+r,l=-(i+s)/o,c=-(-i+s)/o;return[l,c]}else if(r!==a&&o===0)return[(2*r-a)/(2*(r-a))];return[]}if(e.length===2){const n=e[0],r=e[1];return n!==r?[n/(n-r)]:[]}return[]},curvature:function(e,n,r,a,o){let i,s,l,c,u=0,h=0;const f=Y.compute(e,n),m=Y.compute(e,r),g=f.x*f.x+f.y*f.y;if(a?(i=$n(Nt(f.y*m.z-m.y*f.z,2)+Nt(f.z*m.x-m.z*f.x,2)+Nt(f.x*m.y-m.x*f.y,2)),s=Nt(g+f.z*f.z,3/2)):(i=f.x*m.y-f.y*m.x,s=Nt(g,3/2)),i===0||s===0)return{k:0,r:0};if(u=i/s,h=s/i,!o){const y=Y.curvature(e-.001,n,r,a,!0).k,v=Y.curvature(e+.001,n,r,a,!0).k;c=(v-u+(u-y))/2,l=(Sa(v-u)+Sa(u-y))/2}return{k:u,r:h,dk:c,adk:l}},inflections:function(e){if(e.length<4)return[];const n=Y.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,a=n[3].x*n[1].y,o=n[1].x*n[2].y,i=n[3].x*n[2].y,s=18*(-3*r+2*a+3*o-i),l=18*(3*r-a-3*o),c=18*(o-r);if(Y.approximately(s,0)){if(!Y.approximately(l,0)){let m=-c/l;if(0<=m&&m<=1)return[m]}return[]}const u=2*s;if(Y.approximately(u,0))return[];const h=l*l-4*s*c;if(h<0)return[];const f=Math.sqrt(h);return[(f-l)/u,-(l+f)/u].filter(function(m){return 0<=m&&m<=1})},bboxoverlap:function(e,n){const r=["x","y"],a=r.length;for(let o=0,i,s,l,c;o<a;o++)if(i=r[o],s=e[i].mid,l=n[i].mid,c=(e[i].size+n[i].size)/2,Sa(s-l)>=c)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,r){const a=e.bbox(),o=n.bbox(),i=1e5,s=r||.5;if(a.x.size+a.y.size<s&&o.x.size+o.y.size<s)return[(i*(e._t1+e._t2)/2|0)/i+"/"+(i*(n._t1+n._t2)/2|0)/i];let l=e.split(.5),c=n.split(.5),u=[{left:l.left,right:c.left},{left:l.left,right:c.right},{left:l.right,right:c.right},{left:l.right,right:c.left}];u=u.filter(function(f){return Y.bboxoverlap(f.left.bbox(),f.right.bbox())});let h=[];return u.length===0||(u.forEach(function(f){h=h.concat(Y.pairiteration(f.left,f.right,s))}),h=h.filter(function(f,m){return h.indexOf(f)===m})),h},getccenter:function(e,n,r){const a=n.x-e.x,o=n.y-e.y,i=r.x-n.x,s=r.y-n.y,l=a*Cn(Hn)-o*Fr(Hn),c=a*Fr(Hn)+o*Cn(Hn),u=i*Cn(Hn)-s*Fr(Hn),h=i*Fr(Hn)+s*Cn(Hn),f=(e.x+n.x)/2,m=(e.y+n.y)/2,g=(n.x+r.x)/2,y=(n.y+r.y)/2,v=f+l,b=m+c,x=g+u,w=y+h,E=Y.lli8(f,m,v,b,g,y,x,w),C=Y.dist(E,e);let S=Aa(e.y-E.y,e.x-E.x),M=Aa(n.y-E.y,n.x-E.x),_=Aa(r.y-E.y,r.x-E.x),A;return S<_?((S>M||M>_)&&(S+=di),S>_&&(A=_,_=S,S=A)):_<M&&M<S?(A=_,_=S,S=A):_+=di,E.s=S,E.e=_,E.r=C,E},numberSort:function(e,n){return e-n}};class qa{constructor(n){this.curves=[],this._3d=!1,n&&(this.curves=n,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(n){return Y.pointsToString(n.points)}).join(", ")+"]"}addCurve(n){this.curves.push(n),this._3d=this._3d||n._3d}length(){return this.curves.map(function(n){return n.length()}).reduce(function(n,r){return n+r})}curve(n){return this.curves[n]}bbox(){const n=this.curves;for(var r=n[0].bbox(),a=1;a<n.length;a++)Y.expandbox(r,n[a].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(a){r.push(...a.offset(n))}),new qa(r)}}const{abs:Ma,min:nh,max:rh,cos:wO,sin:_O,acos:EO,sqrt:Ta}=Math,CO=Math.PI;class je{constructor(n){let r=n&&n.forEach?n:Array.from(arguments).slice(),a=!1;if(typeof r[0]=="object"){a=r.length;const g=[];r.forEach(function(y){["x","y","z"].forEach(function(v){typeof y[v]<"u"&&g.push(y[v])})}),r=g}let o=!1;const i=r.length;if(a){if(a>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(i!==6&&i!==8&&i!==9&&i!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!o&&(i===9||i===12)||n&&n[0]&&typeof n[0].z<"u",l=this.points=[];for(let g=0,y=s?3:2;g<i;g+=y){var c={x:r[g],y:r[g+1]};s&&(c.z=r[g+2]),l.push(c)}const u=this.order=l.length-1,h=this.dims=["x","y"];s&&h.push("z"),this.dimlen=h.length;const f=Y.align(l,{p1:l[0],p2:l[u]}),m=Y.dist(l[0],l[u]);this._linear=f.reduce((g,y)=>g+Ma(y.y),0)<m/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,a,o){if(typeof o>"u"&&(o=.5),o===0)return new je(r,r,a);if(o===1)return new je(n,r,r);const i=je.getABC(2,n,r,a,o);return new je(n,i.A,a)}static cubicFromPoints(n,r,a,o,i){typeof o>"u"&&(o=.5);const s=je.getABC(3,n,r,a,o);typeof i>"u"&&(i=Y.dist(r,s.C));const l=i*(1-o)/o,c=Y.dist(n,a),u=(a.x-n.x)/c,h=(a.y-n.y)/c,f=i*u,m=i*h,g=l*u,y=l*h,v={x:r.x-f,y:r.y-m},b={x:r.x+g,y:r.y+y},x=s.A,w={x:x.x+(v.x-x.x)/(1-o),y:x.y+(v.y-x.y)/(1-o)},E={x:x.x+(b.x-x.x)/o,y:x.y+(b.y-x.y)/o},C={x:n.x+(w.x-n.x)/o,y:n.y+(w.y-n.y)/o},S={x:a.x+(E.x-a.x)/(1-o),y:a.y+(E.y-a.y)/(1-o)};return new je(n,C,S,a)}static getUtils(){return Y}getUtils(){return je.getUtils()}static get PolyBezier(){return qa}valueOf(){return this.toString()}toString(){return Y.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const n=this.points,r=n[0].x,a=n[0].y,o=["M",r,a,this.order===2?"Q":"C"];for(let i=1,s=n.length;i<s;i++)o.push(n[i].x),o.push(n[i].y);return o.join(" ")}setRatios(n){if(n.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=n,this._lut=[]}verify(){const n=this.coordDigest();n!==this._print&&(this._print=n,this.update())}coordDigest(){return this.points.map(function(n,r){return""+r+n.x+n.y+(n.z?n.z:0)}).join("")}update(){this._lut=[],this.dpoints=Y.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=Y.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return Y.length(this.derivative.bind(this))}static getABC(n=2,r,a,o,i=.5){const s=Y.projectionratio(i,n),l=1-s,c={x:s*r.x+l*o.x,y:s*r.y+l*o.y},u=Y.abcratio(i,n);return{A:{x:a.x+(a.x-c.x)/u,y:a.y+(a.y-c.y)/u},B:a,C:c,S:r,E:o}}getABC(n,r){r=r||this.get(n);let a=this.points[0],o=this.points[this.order];return je.getABC(this.order,a,r,o,n)}getLUT(n){if(this.verify(),n=n||100,this._lut.length===n+1)return this._lut;this._lut=[],n++,this._lut=[];for(let r=0,a,o;r<n;r++)o=r/(n-1),a=this.compute(o),a.t=o,this._lut.push(a);return this._lut}on(n,r){r=r||5;const a=this.getLUT(),o=[];for(let i=0,s,l=0;i<a.length;i++)s=a[i],Y.dist(s,n)<r&&(o.push(s),l+=i/a.length);return o.length?t/=o.length:!1}project(n){const r=this.getLUT(),a=r.length-1,o=Y.closest(r,n),i=o.mpos,s=(i-1)/a,l=(i+1)/a,c=.1/a;let u=o.mdist,h=s,f=h,m;u+=1;for(let g;h<l+c;h+=c)m=this.compute(h),g=Y.dist(n,m),g<u&&(u=g,f=h);return f=f<0?0:f>1?1:f,m=this.compute(f),m.t=f,m.d=u,m}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?Y.computeWithRatios(n,this.points,this.ratios,this._3d):Y.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,r=[n[0]],a=n.length;for(let o=1,i,s;o<a;o++)i=n[o],s=n[o-1],r[o]={x:(a-o)/a*i.x+o/a*s.x,y:(a-o)/a*i.y+o/a*s.y};return r[a]=n[a-1],new je(r)}derivative(n){return Y.compute(n,this.dpoints[0],this._3d)}dderivative(n){return Y.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new je(Y.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return Y.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return Y.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),a=Ta(r.x*r.x+r.y*r.y);return{t:n,x:-r.y/a,y:r.x/a}}__normal3(n){const r=this.derivative(n),a=this.derivative(n+.01),o=Ta(r.x*r.x+r.y*r.y+r.z*r.z),i=Ta(a.x*a.x+a.y*a.y+a.z*a.z);r.x/=o,r.y/=o,r.z/=o,a.x/=i,a.y/=i,a.z/=i;const s={x:a.y*r.z-a.z*r.y,y:a.z*r.x-a.x*r.z,z:a.x*r.y-a.y*r.x},l=Ta(s.x*s.x+s.y*s.y+s.z*s.z);s.x/=l,s.y/=l,s.z/=l;const c=[s.x*s.x,s.x*s.y-s.z,s.x*s.z+s.y,s.x*s.y+s.z,s.y*s.y,s.y*s.z-s.x,s.x*s.z-s.y,s.y*s.z+s.x,s.z*s.z];return{t:n,x:c[0]*r.x+c[1]*r.y+c[2]*r.z,y:c[3]*r.x+c[4]*r.y+c[5]*r.z,z:c[6]*r.x+c[7]*r.y+c[8]*r.z}}hull(n){let r=this.points,a=[],o=[],i=0;for(o[i++]=r[0],o[i++]=r[1],o[i++]=r[2],this.order===3&&(o[i++]=r[3]);r.length>1;){a=[];for(let s=0,l,c=r.length-1;s<c;s++)l=Y.lerp(n,r[s],r[s+1]),o[i++]=l,a.push(l);r=a}return o}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;const a=this.hull(n),o={left:this.order===2?new je([a[0],a[3],a[5]]):new je([a[0],a[4],a[7],a[9]]),right:this.order===2?new je([a[5],a[4],a[2]]):new je([a[9],a[8],a[6],a[3]]),span:a};return o.left._t1=Y.map(0,0,1,this._t1,this._t2),o.left._t2=Y.map(n,0,1,this._t1,this._t2),o.right._t1=Y.map(n,0,1,this._t1,this._t2),o.right._t2=Y.map(1,0,1,this._t1,this._t2),r?(r=Y.map(r,n,1,0,1),o.right.split(r).left):o}extrema(){const n={};let r=[];return this.dims.forEach((function(a){let o=function(s){return s[a]},i=this.dpoints[0].map(o);n[a]=Y.droots(i),this.order===3&&(i=this.dpoints[1].map(o),n[a]=n[a].concat(Y.droots(i))),n[a]=n[a].filter(function(s){return s>=0&&s<=1}),r=r.concat(n[a].sort(Y.numberSort))}).bind(this)),n.values=r.sort(Y.numberSort).filter(function(a,o){return r.indexOf(a)===o}),n}bbox(){const n=this.extrema(),r={};return this.dims.forEach((function(a){r[a]=Y.getminmax(this,a,n[a])}).bind(this)),r}overlaps(n){const r=this.bbox(),a=n.bbox();return Y.bboxoverlap(r,a)}offset(n,r){if(typeof r<"u"){const a=this.get(n),o=this.normal(n),i={c:a,n:o,x:a.x+o.x*r,y:a.y+o.y*r};return this._3d&&(i.z=a.z+o.z*r),i}if(this._linear){const a=this.normal(0),o=this.points.map(function(i){const s={x:i.x+n*a.x,y:i.y+n*a.y};return i.z&&a.z&&(s.z=i.z+n*a.z),s});return[new je(o)]}return this.reduce().map(function(a){return a._linear?a.offset(n)[0]:a.scale(n)})}simple(){if(this.order===3){const o=Y.angle(this.points[0],this.points[3],this.points[1]),i=Y.angle(this.points[0],this.points[3],this.points[2]);if(o>0&&i<0||o<0&&i>0)return!1}const n=this.normal(0),r=this.normal(1);let a=n.x*r.x+n.y*r.y;return this._3d&&(a+=n.z*r.z),Ma(EO(a))<CO/3}reduce(){let n,r=0,a=0,o=.01,i,s=[],l=[],c=this.extrema().values;for(c.indexOf(0)===-1&&(c=[0].concat(c)),c.indexOf(1)===-1&&c.push(1),r=c[0],n=1;n<c.length;n++)a=c[n],i=this.split(r,a),i._t1=r,i._t2=a,s.push(i),r=a;return s.forEach(function(u){for(r=0,a=0;a<=1;)for(a=r+o;a<=1+o;a+=o)if(i=u.split(r,a),!i.simple()){if(a-=o,Ma(r-a)<o)return[];i=u.split(r,a),i._t1=Y.map(r,0,1,u._t1,u._t2),i._t2=Y.map(a,0,1,u._t1,u._t2),l.push(i),r=a;break}r<1&&(i=u.split(r,1),i._t1=Y.map(r,0,1,u._t1,u._t2),i._t2=u._t2,l.push(i))}),l}translate(n,r,a){a=typeof a=="number"?a:r;const o=this.order;let i=this.points.map((s,l)=>(1-l/o)*r+l/o*a);return new je(this.points.map((s,l)=>({x:s.x+n.x*i[l],y:s.y+n.y*i[l]})))}scale(n){const r=this.order;let a=!1;if(typeof n=="function"&&(a=n),a&&r===2)return this.raise().scale(a);const o=this.clockwise,i=this.points;if(this._linear)return this.translate(this.normal(0),a?a(0):n,a?a(1):n);const s=a?a(0):n,l=a?a(1):n,c=[this.offset(0,10),this.offset(1,10)],u=[],h=Y.lli4(c[0],c[0].c,c[1],c[1].c);if(!h)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(f){const m=u[f*r]=Y.copy(i[f*r]);m.x+=(f?l:s)*c[f].n.x,m.y+=(f?l:s)*c[f].n.y}),a?([0,1].forEach(function(f){if(!(r===2&&f)){var m=i[f+1],g={x:m.x-h.x,y:m.y-h.y},y=a?a((f+1)/r):n;a&&!o&&(y=-y);var v=Ta(g.x*g.x+g.y*g.y);g.x/=v,g.y/=v,u[f+1]={x:m.x+y*g.x,y:m.y+y*g.y}}}),new je(u)):([0,1].forEach(f=>{if(r===2&&f)return;const m=u[f*r],g=this.derivative(f),y={x:m.x+g.x,y:m.y+g.y};u[f+1]=Y.lli4(m,y,h,i[f+1])}),new je(u))}outline(n,r,a,o){if(r=r===void 0?n:r,this._linear){const S=this.normal(0),M=this.points[0],_=this.points[this.points.length-1];let A,j,P;a===void 0&&(a=n,o=r),A={x:M.x+S.x*n,y:M.y+S.y*n},P={x:_.x+S.x*a,y:_.y+S.y*a},j={x:(A.x+P.x)/2,y:(A.y+P.y)/2};const O=[A,j,P];A={x:M.x-S.x*r,y:M.y-S.y*r},P={x:_.x-S.x*o,y:_.y-S.y*o},j={x:(A.x+P.x)/2,y:(A.y+P.y)/2};const H=[P,j,A],Z=Y.makeline(H[2],O[0]),R=Y.makeline(O[2],H[0]),k=[Z,new je(O),R,new je(H)];return new qa(k)}const i=this.reduce(),s=i.length,l=[];let c=[],u,h=0,f=this.length();const m=typeof a<"u"&&typeof o<"u";function g(S,M,_,A,j){return function(P){const O=A/_,H=(A+j)/_,Z=M-S;return Y.map(P,0,1,S+O*Z,S+H*Z)}}i.forEach(function(S){const M=S.length();m?(l.push(S.scale(g(n,a,f,h,M))),c.push(S.scale(g(-r,-o,f,h,M)))):(l.push(S.scale(n)),c.push(S.scale(-r))),h+=M}),c=c.map(function(S){return u=S.points,u[3]?S.points=[u[3],u[2],u[1],u[0]]:S.points=[u[2],u[1],u[0]],S}).reverse();const y=l[0].points[0],v=l[s-1].points[l[s-1].points.length-1],b=c[s-1].points[c[s-1].points.length-1],x=c[0].points[0],w=Y.makeline(b,y),E=Y.makeline(v,x),C=[w].concat(l).concat([E]).concat(c);return new qa(C)}outlineshapes(n,r,a){r=r||n;const o=this.outline(n,r).curves,i=[];for(let s=1,l=o.length;s<l/2;s++){const c=Y.makeshape(o[s],o[l-s],a);c.startcap.virtual=s>1,c.endcap.virtual=s<l/2-1,i.push(c)}return i}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof je&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=nh(n.p1.x,n.p2.x),a=nh(n.p1.y,n.p2.y),o=rh(n.p1.x,n.p2.x),i=rh(n.p1.y,n.p2.y);return Y.roots(this.points,n).filter(s=>{var l=this.get(s);return Y.between(l.x,r,o)&&Y.between(l.y,a,i)})}selfintersects(n){const r=this.reduce(),a=r.length-2,o=[];for(let i=0,s,l,c;i<a;i++)l=r.slice(i,i+1),c=r.slice(i+2),s=this.curveintersects(l,c,n),o.push(...s);return o}curveintersects(n,r,a){const o=[];n.forEach(function(s){r.forEach(function(l){s.overlaps(l)&&o.push({left:s,right:l})})});let i=[];return o.forEach(function(s){const l=Y.pairiteration(s.left,s.right,a);l.length>0&&(i=i.concat(l))}),i}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,r,a,o){const i=(o-a)/4,s=this.get(a+i),l=this.get(o-i),c=Y.dist(n,r),u=Y.dist(n,s),h=Y.dist(n,l);return Ma(u-c)+Ma(h-c)}_iterate(n,r){let a=0,o=1,i;do{i=0,o=1;let s=this.get(a),l,c,u,h,f=!1,m=!1,g,y=o,v=1;do if(m=f,h=u,y=(a+o)/2,l=this.get(y),c=this.get(o),u=Y.getccenter(s,l,c),u.interval={start:a,end:o},f=this._error(u,s,a,o)<=n,g=m&&!f,g||(v=o),f){if(o>=1){if(u.interval.end=v=1,h=u,o>1){let x={x:u.x+u.r*wO(u.e),y:u.y+u.r*_O(u.e)};u.e+=Y.angle({x:u.x,y:u.y},x,this.get(1))}break}o=o+(o-a)/2}else o=y;while(!g&&i++<100);if(i>=100)break;h=h||u,r.push(h),a=v}while(o<1);return r}}function wc(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function SO(e){if(Array.isArray(e))return e}function AO(e){if(Array.isArray(e))return wc(e)}function RO(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function MO(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,o,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,n!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==n);c=!0);}catch(h){u=!0,o=h}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function TO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
336
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
337
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NO(e,n){if(e==null)return{};var r,a,o=OO(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function OO(e,n){if(e==null)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(n.includes(a))continue;r[a]=e[a]}return r}function jO(e,n){return SO(e)||MO(e,n)||Cy(e,n)||TO()}function DO(e){return AO(e)||RO(e)||Cy(e)||PO()}function kO(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,n);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function IO(e){var n=kO(e,"string");return typeof n=="symbol"?n:n+""}function Cy(e,n){if(e){if(typeof e=="string")return wc(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wc(e,n):void 0}}var LO=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(l){return{keyAccessor:l,isProp:!(l instanceof Function)}}),i=e.reduce(function(l,c){var u=l,h=c;return o.forEach(function(f,m){var g=f.keyAccessor,y=f.isProp,v;if(y){var b=h,x=b[g],w=NO(b,[g].map(IO));v=x,h=w}else v=g(h,m);m+1<o.length?(u.hasOwnProperty(v)||(u[v]={}),u=u[v]):r?(u.hasOwnProperty(v)||(u[v]=[]),u[v].push(h)):u[v]=h}),l},{});r instanceof Function&&(function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;u===o.length?Object.keys(c).forEach(function(h){return c[h]=r(c[h])}):Object.values(c).forEach(function(h){return l(h,u+1)})})(i);var s=i;return a&&(s=[],(function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];u.length===o.length?s.push({keys:u,vals:c}):Object.entries(c).forEach(function(h){var f=jO(h,2),m=f[0],g=f[1];return l(g,[].concat(DO(u),[m]))})})(i),n instanceof Array&&n.length===0&&s.length===1&&(s[0].keys=[])),s});function FO(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}const ah=Symbol("implicit");function Sy(){var e=new S0,n=[],r=[],a=ah;function o(i){let s=e.get(i);if(s===void 0){if(a!==ah)return a;e.set(i,s=n.push(i)-1)}return r[s%r.length]}return o.domain=function(i){if(!arguments.length)return n.slice();n=[],e=new S0;for(const s of i)e.has(s)||e.set(s,n.push(s)-1);return o},o.range=function(i){return arguments.length?(r=Array.from(i),o):r.slice()},o.unknown=function(i){return arguments.length?(a=i,o):a},o.copy=function(){return Sy(n,r).unknown(a)},FO.apply(o,arguments),o}function $O(e){for(var n=e.length/6|0,r=new Array(n),a=0;a<n;)r[a]="#"+e.slice(a*6,++a*6);return r}const HO=$O("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function zO(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r==="top"&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var UO=`.force-graph-container canvas {
338
+ display: block;
339
+ user-select: none;
340
+ outline: none;
341
+ -webkit-tap-highlight-color: transparent;
342
+ }
343
+
344
+ .force-graph-container .clickable {
345
+ cursor: pointer;
346
+ }
347
+
348
+ .force-graph-container .grabbable {
349
+ cursor: move;
350
+ cursor: grab;
351
+ cursor: -moz-grab;
352
+ cursor: -webkit-grab;
353
+ }
354
+
355
+ .force-graph-container .grabbable:active {
356
+ cursor: grabbing;
357
+ cursor: -moz-grabbing;
358
+ cursor: -webkit-grabbing;
359
+ }
360
+ `;zO(UO);function _c(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function VO(e){if(Array.isArray(e))return e}function ZO(e){if(Array.isArray(e))return _c(e)}function oh(e,n,r){if(Ay())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,n);var o=new(e.bind.apply(e,a));return o}function po(e,n,r){return(n=YO(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Ay(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ay=function(){return!!e})()}function BO(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qO(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,o,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,n!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==n);c=!0);}catch(h){u=!0,o=h}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function WO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
361
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
362
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ih(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function $r(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?ih(Object(r),!0).forEach(function(a){po(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ih(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function Wa(e,n){return VO(e)||qO(e,n)||Ry(e,n)||WO()}function It(e){return ZO(e)||BO(e)||Ry(e)||GO()}function KO(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,n);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function YO(e){var n=KO(e,"string");return typeof n=="symbol"?n:n+""}function Ec(e){"@babel/helpers - typeof";return Ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ec(e)}function Ry(e,n){if(e){if(typeof e=="string")return _c(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_c(e,n):void 0}}var QO=Sy(HO);function sh(e,n,r){!n||typeof r!="string"||e.filter(function(a){return!a[r]}).forEach(function(a){a[r]=QO(n(a))})}function XO(e,n){var r=e.nodes,a=e.links,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.nodeFilter,s=i===void 0?function(){return!0}:i,l=o.onLoopError,c=l===void 0?function(g){throw"Invalid DAG structure! Found cycle in node path: ".concat(g.join(" -> "),".")}:l,u={};r.forEach(function(g){return u[n(g)]={data:g,out:[],depth:-1,skip:!s(g)}}),a.forEach(function(g){var y=g.source,v=g.target,b=C(y),x=C(v);if(!u.hasOwnProperty(b))throw"Missing source node with id: ".concat(b);if(!u.hasOwnProperty(x))throw"Missing target node with id: ".concat(x);var w=u[b],E=u[x];w.out.push(E);function C(S){return Ec(S)==="object"?n(S):S}});var h=[];m(Object.values(u));var f=Object.assign.apply(Object,[{}].concat(It(Object.entries(u).filter(function(g){var y=Wa(g,2),v=y[1];return!v.skip}).map(function(g){var y=Wa(g,2),v=y[0],b=y[1];return po({},v,b.depth)}))));return f;function m(g){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,b=function(){var C=g[x];if(y.indexOf(C)!==-1){var S=[].concat(It(y.slice(y.indexOf(C))),[C]).map(function(M){return n(M.data)});return h.some(function(M){return M.length===S.length&&M.every(function(_,A){return _===S[A]})})||(h.push(S),c(S)),1}v>C.depth&&(C.depth=v,m(C.out,[].concat(It(y),[C]),v+(C.skip?0:1)))},x=0,w=g.length;x<w;x++)b()}}var JO=2,rt=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},lh=function(n,r){if(!r.isShadow){var a=Ae(r.linkDirectionalParticles);r.graphData.links.forEach(function(o){var i=Math.round(Math.abs(a(o)));i?o.__photons=It(Array(i)).map(function(){return{}}):delete o.__photons})}},es=Qu({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,lh(n,r)}},dagMode:{onChange:function(n,r){!n&&(r.graphData.nodes||[]).forEach(function(a){return a.fx=a.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(n){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:rt},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:rt},nodeColor:{default:"color",triggerUpdate:!1,onChange:rt},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:rt},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:rt},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:rt},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:rt},linkColor:{default:"color",triggerUpdate:!1,onChange:rt},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:rt},linkWidth:{default:1,triggerUpdate:!1,onChange:rt},linkCurvature:{default:0,triggerUpdate:!1,onChange:rt},linkCanvasObject:{triggerUpdate:!1,onChange:rt},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:rt},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:rt},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:rt},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:rt},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:lh},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaDecay(n)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaTarget(n)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.velocityDecay(n)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(n,r,a){return a===void 0?n.forceLayout.force(r):(n.forceLayout.force(r,a),this)},d3ReheatSimulation:function(n){return n.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(n){return n.cntTicks=0,n.startTickTime=new Date,n.engineRunning=!0,this},isEngineRunning:function(n){return!!n.engineRunning},tickFrame:function(n){return!n.isShadow&&r(),o(),!n.isShadow&&i(),!n.isShadow&&s(),a(),this;function r(){n.engineRunning&&(++n.cntTicks>n.cooldownTicks||new Date-n.startTickTime>n.cooldownTime||n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin?(n.engineRunning=!1,n.onEngineStop()):(n.forceLayout.tick(),n.onEngineTick()))}function a(){var l=Ae(n.nodeVisibility),c=Ae(n.nodeVal),u=Ae(n.nodeColor),h=Ae(n.nodeCanvasObjectMode),f=n.ctx,m=n.isShadow/n.globalScale,g=n.graphData.nodes.filter(l);f.save(),g.forEach(function(y){var v=h(y);if(n.nodeCanvasObject&&(v==="before"||v==="replace")&&(n.nodeCanvasObject(y,f,n.globalScale),v==="replace")){f.restore();return}var b=Math.sqrt(Math.max(0,c(y)||1))*n.nodeRelSize+m;f.beginPath(),f.arc(y.x,y.y,b,0,2*Math.PI,!1),f.fillStyle=u(y)||"rgba(31, 120, 180, 0.92)",f.fill(),n.nodeCanvasObject&&v==="after"&&n.nodeCanvasObject(y,n.ctx,n.globalScale)}),f.restore()}function o(){var l=Ae(n.linkVisibility),c=Ae(n.linkColor),u=Ae(n.linkWidth),h=Ae(n.linkLineDash),f=Ae(n.linkCurvature),m=Ae(n.linkCanvasObjectMode),g=n.ctx,y=n.isShadow*2,v=n.graphData.links.filter(l);v.forEach(M);var b=[],x=[],w=v;if(n.linkCanvasObject){var E=[],C=[];v.forEach(function(_){return({before:b,after:x,replace:E}[m(_)]||C).push(_)}),w=[].concat(It(b),x,C),b=b.concat(E)}g.save(),b.forEach(function(_){return n.linkCanvasObject(_,g,n.globalScale)}),g.restore();var S=LO(w,[c,u,h]);g.save(),Object.entries(S).forEach(function(_){var A=Wa(_,2),j=A[0],P=A[1],O=!j||j==="undefined"?"rgba(0,0,0,0.15)":j;Object.entries(P).forEach(function(H){var Z=Wa(H,2),R=Z[0],k=Z[1],T=(R||1)/n.globalScale+y;Object.entries(k).forEach(function(F){var I=Wa(F,2);I[0];var $=I[1],V=h($[0]);g.beginPath(),$.forEach(function(B){var q=B.source,X=B.target;if(!(!q||!X||!q.hasOwnProperty("x")||!X.hasOwnProperty("x"))){g.moveTo(q.x,q.y);var Q=B.__controlPoints;Q?g[Q.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(g,It(Q).concat([X.x,X.y])):g.lineTo(X.x,X.y)}}),g.strokeStyle=O,g.lineWidth=T,g.setLineDash(V||[]),g.stroke()})})}),g.restore(),g.save(),x.forEach(function(_){return n.linkCanvasObject(_,g,n.globalScale)}),g.restore();function M(_){var A=f(_);if(!A){_.__controlPoints=null;return}var j=_.source,P=_.target;if(!(!j||!P||!j.hasOwnProperty("x")||!P.hasOwnProperty("x"))){var O=Math.sqrt(Math.pow(P.x-j.x,2)+Math.pow(P.y-j.y,2));if(O>0){var H=Math.atan2(P.y-j.y,P.x-j.x),Z=O*A,R={x:(j.x+P.x)/2+Z*Math.cos(H-Math.PI/2),y:(j.y+P.y)/2+Z*Math.sin(H-Math.PI/2)};_.__controlPoints=[R.x,R.y]}else{var k=A*70;_.__controlPoints=[P.x,P.y-k,P.x+k,P.y]}}}}function i(){var l=1.6,c=.2,u=Ae(n.linkDirectionalArrowLength),h=Ae(n.linkDirectionalArrowRelPos),f=Ae(n.linkVisibility),m=Ae(n.linkDirectionalArrowColor||n.linkColor),g=Ae(n.nodeVal),y=n.ctx;y.save(),n.graphData.links.filter(f).forEach(function(v){var b=u(v);if(!(!b||b<0)){var x=v.source,w=v.target;if(!(!x||!w||!x.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var E=Math.sqrt(Math.max(0,g(x)||1))*n.nodeRelSize,C=Math.sqrt(Math.max(0,g(w)||1))*n.nodeRelSize,S=Math.min(1,Math.max(0,h(v))),M=m(v)||"rgba(0,0,0,0.28)",_=b/l/2,A=v.__controlPoints&&oh(je,[x.x,x.y].concat(It(v.__controlPoints),[w.x,w.y])),j=A?function(T){return A.get(T)}:function(T){return{x:x.x+(w.x-x.x)*T||0,y:x.y+(w.y-x.y)*T||0}},P=A?A.length():Math.sqrt(Math.pow(w.x-x.x,2)+Math.pow(w.y-x.y,2)),O=E+b+(P-E-C-b)*S,H=j(O/P),Z=j((O-b)/P),R=j((O-b*(1-c))/P),k=Math.atan2(H.y-Z.y,H.x-Z.x)-Math.PI/2;y.beginPath(),y.moveTo(H.x,H.y),y.lineTo(Z.x+_*Math.cos(k),Z.y+_*Math.sin(k)),y.lineTo(R.x,R.y),y.lineTo(Z.x-_*Math.cos(k),Z.y-_*Math.sin(k)),y.fillStyle=M,y.fill()}}}),y.restore()}function s(){var l=Ae(n.linkDirectionalParticles),c=Ae(n.linkDirectionalParticleSpeed),u=Ae(n.linkDirectionalParticleOffset),h=Ae(n.linkDirectionalParticleWidth),f=Ae(n.linkVisibility),m=Ae(n.linkDirectionalParticleColor||n.linkColor),g=n.ctx;g.save(),n.graphData.links.filter(f).forEach(function(y){var v=l(y);if(!(!y.hasOwnProperty("__photons")||!y.__photons.length)){var b=y.source,x=y.target;if(!(!b||!x||!b.hasOwnProperty("x")||!x.hasOwnProperty("x"))){var w=c(y),E=Math.abs(u(y)),C=y.__photons||[],S=Math.max(0,h(y)/2)/Math.sqrt(n.globalScale),M=m(y)||"rgba(0,0,0,0.28)";g.fillStyle=M;var _=y.__controlPoints?oh(je,[b.x,b.y].concat(It(y.__controlPoints),[x.x,x.y])):null,A=0,j=!1;C.forEach(function(P){var O=!!P.__singleHop;if(P.hasOwnProperty("__progressRatio")||(P.__progressRatio=O?0:(A+E)/v),!O&&A++,P.__progressRatio+=w,P.__progressRatio>=1)if(!O)P.__progressRatio=P.__progressRatio%1;else{j=!0;return}var H=P.__progressRatio,Z=_?_.get(H):{x:b.x+(x.x-b.x)*H||0,y:b.y+(x.y-b.y)*H||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(Z.x,Z.y,y,g,n.globalScale):(g.beginPath(),g.arc(Z.x,Z.y,S,0,2*Math.PI,!1),g.fill())}),j&&(y.__photons=y.__photons.filter(function(P){return!P.__singleHop||P.__progressRatio<=1}))}}}),g.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:mO().force("link",sO()).force("charge",gO()).force("center",cN()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(n,r){r.ctx=n},update:function(n,r){n.engineRunning=!1,n.onUpdate(),n.nodeAutoColorBy!==null&&sh(n.graphData.nodes,Ae(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&sh(n.graphData.links,Ae(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(m){m.source=m[n.linkSource],m.target=m[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var a=n.forceLayout.force("link");a&&a.id(function(m){return m[n.nodeId]}).links(n.graphData.links);var o=n.dagMode&&XO(n.graphData,function(m){return m[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),i=Math.max.apply(Math,It(Object.values(o||[]))),s=n.dagLevelDistance||n.graphData.nodes.length/(i||1)*JO*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var l=["lr","rl"].includes(r.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(m){return delete m[l]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var c=["rl","bu"].includes(n.dagMode),u=function(g){return(o[g[n.nodeId]]-i/2)*s*(c?-1:1)},h=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(m){return m[h]=u(m)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?yO(function(m){var g=o[m[n.nodeId]]||-1;return(n.dagMode==="radialin"?i-g:g)*s}).strength(function(m){return n.dagNodeFilter(m)?1:0}):null);for(var f=0;f<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);f++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function My(e,n){var r=e instanceof Array?e:[e],a=new n;return a._destructor&&a._destructor(),{linkProp:function(i){return{default:a[i](),onChange:function(l,c){r.forEach(function(u){return c[u][i](l)})},triggerUpdate:!1}},linkMethod:function(i){return function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];var h=[];return r.forEach(function(f){var m=s[f],g=m[i].apply(m,c);g!==m&&h.push(g)}),h.length?h[0]:this}}}}var ej=800,tj=4,nj=5,Ty=My("forceGraph",es),rj=My(["forceGraph","shadowGraph"],es),aj=Object.assign.apply(Object,It(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return po({},e,Ty.linkProp(e))})).concat(It(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return po({},e,rj.linkProp(e))})))),oj=Object.assign.apply(Object,It(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return po({},e,Ty.linkMethod(e))})));function xl(e){if(e.canvas){var n=e.canvas.width,r=e.canvas.height;n===300&&r===150&&(n=r=0);var a=window.devicePixelRatio;n/=a,r/=a,[e.canvas,e.shadowCanvas].forEach(function(i){i.style.width="".concat(e.width,"px"),i.style.height="".concat(e.height,"px"),i.width=e.width*a,i.height=e.height*a,!n&&!r&&i.getContext("2d").scale(a,a)});var o=on(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/o,(e.height-r)/2/o),e.needsRedraw=!0}}function Py(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function ch(e,n,r){e.save(),Py(e),e.clearRect(0,0,n,r),e.restore()}var ij=Qu({props:$r({width:{default:window.innerWidth,onChange:function(n,r){return xl(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return xl(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(o){return(o||[]).every(function(i){return!i.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(a),r.forceGraph.graphData(n),r.shadowGraph.graphData(n);function a(o){var i=o.type,s=o.objs;s.filter(function(l){if(!l.hasOwnProperty("__indexColor"))return!0;var c=r.colorTracker.lookup(l.__indexColor);return!c||!c.hasOwnProperty("d")||c.d!==l}).forEach(function(l){l.__indexColor=r.colorTracker.register({type:i,d:l})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,r){r.canvas&&n&&(r.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,r){r.shadowGraph.nodeCanvasObject(n?function(a,o,i){return n(a,a.__indexColor,o,i)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(a,o,i){return n(a,a.__indexColor,o,i)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,r){r.zoom.scaleExtent([n,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],n])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(n,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},aj),aliases:{stopAnimation:"pauseAnimation"},methods:$r({graph2ScreenCoords:function(n,r,a){var o=on(n.canvas);return{x:r*o.k+o.x,y:a*o.k+o.y}},screen2GraphCoords:function(n,r,a){var o=on(n.canvas);return{x:(r-o.x)/o.k,y:(a-o.y)/o.k}},centerAt:function(n,r,a,o){if(!n.canvas)return null;if(r!==void 0||a!==void 0){var i=Object.assign({},r!==void 0?{x:r}:{},a!==void 0?{y:a}:{});return o?n.tweenGroup.add(new O0(s()).to(i,o).easing(yr.Quadratic.Out).onUpdate(l).start()):l(i),this}return s();function s(){var c=on(n.canvas);return{x:(n.width/2-c.x)/c.k,y:(n.height/2-c.y)/c.k}}function l(c){var u=c.x,h=c.y;n.zoom.translateTo(n.zoom.__baseElem,u===void 0?s().x:u,h===void 0?s().y:h),n.needsRedraw=!0}},zoom:function(n,r,a){if(!n.canvas)return null;if(r!==void 0)return a?n.tweenGroup.add(new O0({k:o()}).to({k:r},a).easing(yr.Quadratic.Out).onUpdate(function(s){var l=s.k;return i(l)}).start()):i(r),this;return o();function o(){return on(n.canvas).k}function i(s){n.zoom.scaleTo(n.zoom.__baseElem,s),n.needsRedraw=!0}},zoomToFit:function(n){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,o=arguments.length,i=new Array(o>3?o-3:0),s=3;s<o;s++)i[s-3]=arguments[s];var l=this.getGraphBbox.apply(this,i);if(l){var c={x:(l.x[0]+l.x[1])/2,y:(l.y[0]+l.y[1])/2},u=Math.max(1e-12,Math.min(1e12,(n.width-a*2)/(l.x[1]-l.x[0]),(n.height-a*2)/(l.y[1]-l.y[0])));this.centerAt(c.x,c.y,r),this.zoom(u,r)}return this},getGraphBbox:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},a=Ae(n.nodeVal),o=function(l){return Math.sqrt(Math.max(0,a(l)||1))*n.nodeRelSize},i=n.graphData.nodes.filter(r).map(function(s){return{x:s.x,y:s.y,r:o(s)}});return i.length?{x:[M0(i,function(s){return s.x-s.r}),R0(i,function(s){return s.x+s.r})],y:[M0(i,function(s){return s.y-s.r}),R0(i,function(s){return s.y+s.r})]}:null},pauseAnimation:function(n){return n.animationFrameRequestId&&(cancelAnimationFrame(n.animationFrameRequestId),n.animationFrameRequestId=null),this},resumeAnimation:function(n){return n.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},oj),stateInit:function(){return{lastSetZoom:1,zoom:y9(),forceGraph:new es,shadowGraph:new es().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new zP,tweenGroup:new X2}},init:function(n,r){var a=this;n.innerHTML="";var o=document.createElement("div");o.classList.add("force-graph-container"),o.style.position="relative",n.appendChild(o),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),o.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var i=r.canvas.getContext("2d"),s=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),l={x:-1e12,y:-1e12},c=function(){var f=null,m=window.devicePixelRatio,g=l.x>0&&l.y>0?s.getImageData(l.x*m,l.y*m,1,1):null;return g&&(f=r.colorTracker.lookup(g.data)),f};kt(r.canvas).call(R7().subject(function(){if(!r.enableNodeDrag)return null;var h=c();return h&&h.type==="Node"?h.d:null}).on("start",function(h){var f=h.subject;f.__initialDragPos={x:f.x,y:f.y,fx:f.fx,fy:f.fy},h.active||(f.fx=f.x,f.fy=f.y),r.canvas.classList.add("grabbable")}).on("drag",function(h){var f=h.subject,m=f.__initialDragPos,g=h,y=on(r.canvas).k,v={x:m.x+(g.x-m.x)/y-f.x,y:m.y+(g.y-m.y)/y-f.y};["x","y"].forEach(function(b){return f["f".concat(b)]=f[b]=m[b]+(g[b]-m[b])/y}),!(!f.__dragged&&nj>=Math.sqrt(w9(["x","y"].map(function(b){return Math.pow(h[b]-m[b],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,f.__dragged=!0,r.onNodeDrag(f,v))}).on("end",function(h){var f=h.subject,m=f.__initialDragPos,g={x:f.x-m.x,y:f.y-m.y};m.fx===void 0&&(f.fx=void 0),m.fy===void 0&&(f.fy=void 0),delete f.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,f.__dragged&&(delete f.__dragged,r.onNodeDragEnd(f,g))})),r.zoom(r.zoom.__baseElem=kt(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(h){return!h.button&&r.enableZoomPanInteraction&&(h.type!=="wheel"||Ae(r.enableZoomInteraction)(h))&&(h.type==="wheel"||Ae(r.enablePanInteraction)(h))}).on("zoom",function(h){var f=h.transform;[i,s].forEach(function(m){Py(m),m.translate(f.x,f.y),m.scale(f.k,f.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom($r($r({},f),a.centerAt())),r.needsRedraw=!0}).on("end",function(h){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd($r($r({},h.transform),a.centerAt()))}),xl(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){on(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=tj/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new lN(o),["pointermove","pointerdown"].forEach(function(h){return o.addEventListener(h,function(f){h==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=f),!r.isPointerDragging&&f.type==="pointermove"&&r.onBackgroundClick&&(f.pressure>0||r.isPointerPressed)&&(f.pointerType==="mouse"||f.movementX===void 0||[f.movementX,f.movementY].some(function(y){return Math.abs(y)>1}))&&(r.isPointerDragging=!0);var m=g(o);l.x=f.pageX-m.left,l.y=f.pageY-m.top;function g(y){var v=y.getBoundingClientRect(),b=window.pageXOffset||document.documentElement.scrollLeft,x=window.pageYOffset||document.documentElement.scrollTop;return{top:v.top+x,left:v.left+b}}},{passive:!0})}),o.addEventListener("pointerup",function(h){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var f=[h,r.pointerDownEvent];requestAnimationFrame(function(){if(h.button===0)if(r.hoverObj){var m=r["on".concat(r.hoverObj.type,"Click")];m&&m.apply(void 0,[r.hoverObj.d].concat(f))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,f);if(h.button===2)if(r.hoverObj){var g=r["on".concat(r.hoverObj.type,"RightClick")];g&&g.apply(void 0,[r.hoverObj.d].concat(f))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,f)})}},{passive:!0}),o.addEventListener("contextmenu",function(h){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(h.preventDefault(),!1)}),r.forceGraph(i),r.shadowGraph(s);var u=G9(function(){ch(s,r.width,r.height),r.shadowGraph.linkWidth(function(f){return Ae(r.linkWidth)(f)+r.linkHoverPrecision});var h=on(r.canvas);r.shadowGraph.globalScale(h.k).tickFrame()},ej);r.flushShadowCanvas=u.flush,(this._animationCycle=function h(){var f=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(E){return E.__photons&&E.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var m=r.isPointerDragging?null:c();if(m!==r.hoverObj){var g=r.hoverObj,y=g?g.type:null,v=m?m.type:null;if(y&&y!==v){var b=r["on".concat(y,"Hover")];b&&b(null,g.d)}if(v){var x=r["on".concat(v,"Hover")];x&&x(m.d,y===v?g.d:null)}r.tooltip.content(m&&Ae(r["".concat(m.type.toLowerCase(),"Label")])(m.d)||null),r.canvas.classList[(m&&r["on".concat(v,"Click")]||!m&&r.onBackgroundClick)&&Ae(r.showPointerCursor)(m?.d)?"add":"remove"]("clickable"),r.hoverObj=m}f&&u()}if(f){ch(i,r.width,r.height);var w=on(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(i,w),r.forceGraph.globalScale(w).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(i,w)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(h)})()},update:function(n){}});const js={width:D.number,height:D.number,graphData:D.shape({nodes:D.arrayOf(D.object).isRequired,links:D.arrayOf(D.object).isRequired}),backgroundColor:D.string,nodeRelSize:D.number,nodeId:D.string,nodeLabel:D.oneOfType([D.string,D.func]),nodeVal:D.oneOfType([D.number,D.string,D.func]),nodeVisibility:D.oneOfType([D.bool,D.string,D.func]),nodeColor:D.oneOfType([D.string,D.func]),nodeAutoColorBy:D.oneOfType([D.string,D.func]),onNodeHover:D.func,onNodeClick:D.func,linkSource:D.string,linkTarget:D.string,linkLabel:D.oneOfType([D.string,D.func]),linkVisibility:D.oneOfType([D.bool,D.string,D.func]),linkColor:D.oneOfType([D.string,D.func]),linkAutoColorBy:D.oneOfType([D.string,D.func]),linkWidth:D.oneOfType([D.number,D.string,D.func]),linkCurvature:D.oneOfType([D.number,D.string,D.func]),linkDirectionalArrowLength:D.oneOfType([D.number,D.string,D.func]),linkDirectionalArrowColor:D.oneOfType([D.string,D.func]),linkDirectionalArrowRelPos:D.oneOfType([D.number,D.string,D.func]),linkDirectionalParticles:D.oneOfType([D.number,D.string,D.func]),linkDirectionalParticleSpeed:D.oneOfType([D.number,D.string,D.func]),linkDirectionalParticleOffset:D.oneOfType([D.number,D.string,D.func]),linkDirectionalParticleWidth:D.oneOfType([D.number,D.string,D.func]),linkDirectionalParticleColor:D.oneOfType([D.string,D.func]),onLinkHover:D.func,onLinkClick:D.func,dagMode:D.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:D.number,dagNodeFilter:D.func,onDagError:D.func,d3AlphaMin:D.number,d3AlphaDecay:D.number,d3VelocityDecay:D.number,warmupTicks:D.number,cooldownTicks:D.number,cooldownTime:D.number,onEngineTick:D.func,onEngineStop:D.func,getGraphBbox:D.func},Ny={zoomToFit:D.func,onNodeRightClick:D.func,onNodeDrag:D.func,onNodeDragEnd:D.func,onLinkRightClick:D.func,linkHoverPrecision:D.number,onBackgroundClick:D.func,onBackgroundRightClick:D.func,showPointerCursor:D.oneOfType([D.bool,D.func]),enablePointerInteraction:D.bool,enableNodeDrag:D.bool},od={showNavInfo:D.bool,nodeOpacity:D.number,nodeResolution:D.number,nodeThreeObject:D.oneOfType([D.object,D.string,D.func]),nodeThreeObjectExtend:D.oneOfType([D.bool,D.string,D.func]),nodePositionUpdate:D.func,linkOpacity:D.number,linkResolution:D.number,linkCurveRotation:D.oneOfType([D.number,D.string,D.func]),linkMaterial:D.oneOfType([D.object,D.string,D.func]),linkThreeObject:D.oneOfType([D.object,D.string,D.func]),linkThreeObjectExtend:D.oneOfType([D.bool,D.string,D.func]),linkPositionUpdate:D.func,linkDirectionalArrowResolution:D.number,linkDirectionalParticleResolution:D.number,linkDirectionalParticleThreeObject:D.oneOfType([D.object,D.string,D.func]),forceEngine:D.oneOf(["d3","ngraph"]),ngraphPhysics:D.object,numDimensions:D.oneOf([1,2,3])},sj=Object.assign({},js,Ny,{linkLineDash:D.oneOfType([D.arrayOf(D.number),D.string,D.func]),nodeCanvasObjectMode:D.oneOfType([D.string,D.func]),nodeCanvasObject:D.func,nodePointerAreaPaint:D.func,linkCanvasObjectMode:D.oneOfType([D.string,D.func]),linkCanvasObject:D.func,linkPointerAreaPaint:D.func,linkDirectionalParticleCanvasObject:D.func,autoPauseRedraw:D.bool,minZoom:D.number,maxZoom:D.number,enableZoomInteraction:D.oneOfType([D.bool,D.func]),enablePanInteraction:D.oneOfType([D.bool,D.func]),onZoom:D.func,onZoomEnd:D.func,onRenderFramePre:D.func,onRenderFramePost:D.func});Object.assign({},js,Ny,od,{enableNavigationControls:D.bool,controlType:D.oneOf(["trackball","orbit","fly"]),rendererConfig:D.object,extraRenderers:D.arrayOf(D.shape({render:D.func.isRequired}))});Object.assign({},js,od,{nodeDesc:D.oneOfType([D.string,D.func]),linkDesc:D.oneOfType([D.string,D.func])});Object.assign({},js,od,{markerAttrs:D.object,yOffset:D.number,glScale:D.number});const id=$R(ij,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});id.displayName="ForceGraph2D";id.propTypes=sj;const Oy=["#FCEBAF","#B2E0B2","#FFB3C1","#FFCCB3","#A4D8E1","#E1B7E1","#A4DBD6","#E1C6E7"],jy=["#5c5540","#3d5c3d","#5c3d44","#5c4d40","#3d4f5c","#5c3d5c","#3d5c56","#4f3d5c"],lj=Oy.map(e=>Dy(e,.15)),cj=jy.map(e=>Dy(e,.15));function Dy(e,n){const r=parseInt(e.slice(1,3),16),a=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return`rgba(${r},${a},${o},${n})`}function uh(e){return e<=1?3:e<=3?4:e<=5?5:Math.min(8,5+Math.sqrt(e)*.8)}function uj(){const e=Ar(),n=d.useRef(null),r=d.useRef(null),[a,o]=d.useState({width:800,height:600}),[i,s]=d.useState(null),{theme:l}=oa(j=>j),c=l==="dark",u=d.useRef(c);u.current=c;const{data:h,isLoading:f,error:m}=On({queryKey:["noteGraph"],async queryFn(){const j=await BS();if(j.type==="success")return j.noteGraph;throw new Error("Failed to fetch graph data")}});d.useEffect(()=>{if(!h)return;const j=()=>{if(n.current){const P=n.current.getBoundingClientRect();o({width:P.width,height:Math.max(600,window.innerHeight-150)})}};return j(),window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[h]),d.useEffect(()=>{h&&r.current&&setTimeout(()=>{r.current?.zoomToFit(400,50)},500)},[h]);const g=d.useRef(i);g.current=i;const y=d.useCallback(j=>{g.current===j.id?e(`/${j.id}`):s(j.id)},[e]),v=d.useCallback(()=>{s(null)},[]),b=d.useCallback(j=>{n.current&&(n.current.style.cursor=j?"pointer":"default")},[]),x=d.useRef(!1),w=d.useCallback(()=>{x.current||(x.current=!0,r.current?.enableZoomInteraction(!1))},[]),E=d.useCallback(()=>{x.current=!1,r.current?.enableZoomInteraction(!0)},[]),C=d.useMemo(()=>{if(!h||h.nodes.length===0)return null;const j=h.nodes.filter(O=>O.connections>0);if(j.length===0)return null;const P=new Set(j.map(O=>O.id));return{nodes:j,links:h.links.filter(O=>P.has(O.source)&&P.has(O.target))}},[h]),S=d.useRef(new Map),M=d.useMemo(()=>{const j=new Map;if(C)for(const P of C.links)j.has(P.source)||j.set(P.source,new Set),j.has(P.target)||j.set(P.target,new Set),j.get(P.source).add(P.target),j.get(P.target).add(P.source);return j},[C]);S.current=M;const _=d.useCallback((j,P,O)=>{const H=u.current,Z=i,R=S.current,k=uh(j.connections),T=j.x||0,F=j.y||0,I=Z===j.id,$=Z?R.get(Z)?.has(j.id)??!1:!1,V=Z!==null&&!I&&!$;if(P.beginPath(),P.arc(T,F,k,0,Math.PI*2),V){if(j.connections>3)P.fillStyle=H?"rgba(92,61,68,0.15)":"rgba(255,179,193,0.15)";else{const B=H?cj:lj;P.fillStyle=B[nc(j.id)%B.length]}P.fill();return}if(I)P.fillStyle="#FFCCB3";else if($)P.fillStyle=H?"#E1C6E7":"#E1B7E1";else if(j.connections>3)P.fillStyle=H?"#5c3d44":"#FFB3C1";else{const B=H?jy:Oy;P.fillStyle=B[nc(j.id)%B.length]}if(P.fill(),P.strokeStyle=H?"#404040":"#3d3d3d",P.lineWidth=(I?2:1)/O,P.stroke(),I&&(P.beginPath(),P.arc(T,F,k+2/O,0,Math.PI*2),P.strokeStyle=H?"#e4e4e7":"#27272a",P.lineWidth=1.5/O,P.stroke()),I||$||O>2.5){const B=j.title||"Untitled",q=Math.max(10/O,2.5);P.font=`${I||$?"bold ":""}${q}px Gaegu, cursive`,P.textAlign="center",P.textBaseline="top";const X=P.measureText(B).width,Q=2/O,re=F+k+3/O;P.fillStyle=H?"rgba(42,37,32,0.85)":"rgba(255,252,247,0.9)",P.fillRect(T-X/2-Q,re,X+Q*2,q+Q*2),P.fillStyle=H?"#e4e4e7":"#27272a",P.fillText(B,T,re+Q)}},[i]),A=d.useCallback((j,P,O)=>{const H=u.current,Z=i,R=j.source,k=j.target,T=Z?R.id===Z||k.id===Z:!1,F=Z!==null&&!T;P.beginPath(),P.moveTo(R.x||0,R.y||0),P.lineTo(k.x||0,k.y||0),F?(P.strokeStyle=H?"rgba(82,82,91,0.06)":"rgba(212,212,216,0.06)",P.lineWidth=.5/O):T?(P.strokeStyle=H?"#E1C6E7":"#E1B7E1",P.lineWidth=2/O):(P.strokeStyle=H?"rgba(82,82,91,0.5)":"rgba(212,212,216,0.7)",P.lineWidth=.5/O),P.stroke()},[i]);return f?p.jsx(pt,{title:"Knowledge Graph",children:p.jsx("div",{className:"flex items-center justify-center",style:{height:"600px"},children:p.jsx(Te,{width:"100%",height:"100%"})})}):m?p.jsx(pt,{title:"Knowledge Graph",children:p.jsx(Dn,{icon:"โŒ",title:"Failed to load graph",description:"There was an error loading the knowledge graph."})}):C?p.jsxs(pt,{title:"Knowledge Graph",description:`${C.nodes.length} linked notes ยท ${C.links.length} connections`,children:[p.jsxs("div",{ref:n,className:"relative overflow-hidden border-2 border-border rounded-sketchy-lg shadow-sketchy",style:{background:c?"#2a2520":"#fffcf7"},children:[i&&(()=>{const j=C.nodes.find(P=>P.id===i);return j?p.jsxs("div",{className:"absolute top-3 left-3 z-10 flex items-center gap-2 px-3 py-1.5 rounded-sketchy-md border-2 border-border bg-bg-primary shadow-sketchy text-sm",children:[p.jsx("span",{className:"font-bold truncate max-w-48",children:j.title}),p.jsxs("span",{className:"text-fg-tertiary",children:["ยท ",j.connections," links"]}),p.jsx("button",{onClick:()=>s(null),className:"ml-1 text-fg-tertiary hover:text-fg-primary transition-colors cursor-pointer","aria-label":"Deselect node",children:"โœ•"})]}):null})(),p.jsx(id,{ref:r,graphData:C,width:a.width,height:a.height,nodeId:"id",nodeLabel:"",nodeCanvasObject:_,nodePointerAreaPaint:(j,P,O)=>{O.beginPath(),O.arc(j.x||0,j.y||0,Math.max(uh(j.connections)+4,10),0,2*Math.PI),O.fillStyle=P,O.fill()},linkCanvasObject:A,linkCanvasObjectMode:()=>"replace",linkDirectionalParticles:0,onNodeClick:y,onNodeHover:b,onBackgroundClick:v,onNodeDrag:w,onNodeDragEnd:E,warmupTicks:30,cooldownTicks:80,d3AlphaDecay:.05,d3VelocityDecay:.3,enableZoomInteraction:!0,enablePanInteraction:!0,minZoom:.3,maxZoom:5})]}),p.jsxs("div",{className:"mt-4 flex flex-wrap gap-4 text-sm",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-4 h-4 rounded-sketchy-xs border-2 border-border",style:{background:c?"#5c3d44":"#FFB3C1"}}),p.jsx("span",{className:"text-fg-tertiary font-medium",children:"Hub notes (4+ connections)"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-4 h-4 rounded-sketchy-xs border-2 border-border",style:{background:c?"#3d5c3d":"#B2E0B2"}}),p.jsx("span",{className:"text-fg-tertiary font-medium",children:"Connected notes"})]})]})]}):p.jsx(pt,{title:"Knowledge Graph",children:p.jsx(Dn,{icon:"๐ŸŒŒ",title:"No constellations yet",description:"Link your notes together and watch your own starry sky unfold"})})}const dj=()=>{const{theme:e,toggleTheme:n}=oa(r=>r);return p.jsx(pt,{title:"Settings",description:"Customize your Ocean Brain experience",children:p.jsxs("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",children:[p.jsxs("button",{type:"button",className:"flex flex-col items-center gap-3 bg-subtle p-6 rounded-[12px_4px_13px_3px/4px_10px_4px_12px] border-2 border-border-secondary font-bold hover:shadow-sketchy hover:-translate-y-0.5 active:translate-y-0 active:shadow-none transition-all",onClick:n,children:[p.jsx("span",{className:"text-3xl",children:e==="dark"?p.jsx(i4,{className:"h-8 w-8 text-pastel-yellow-200",weight:"fill"}):p.jsx(c4,{className:"h-8 w-8 text-pastel-orange-200",weight:"fill"})}),p.jsx("span",{children:"Theme"}),p.jsx("span",{className:"text-xs text-fg-tertiary font-medium",children:e==="dark"?"Dark mode":"Light mode"})]}),p.jsxs(He,{to:"manage-image",className:"flex flex-col items-center gap-3 bg-subtle p-6 rounded-[12px_4px_13px_3px/4px_10px_4px_12px] border-2 border-border-secondary font-bold hover:shadow-sketchy hover:-translate-y-0.5 active:translate-y-0 active:shadow-none transition-all",children:[p.jsx(m1,{className:"h-8 w-8 text-fg-secondary"}),p.jsx("span",{children:"Manage Image"}),p.jsx("span",{className:"text-xs text-fg-tertiary font-medium",children:"Upload and organize images"})]}),p.jsxs(He,{to:"placeholder",className:"flex flex-col items-center gap-3 bg-subtle p-6 rounded-[12px_4px_13px_3px/4px_10px_4px_12px] border-2 border-border-secondary font-bold hover:shadow-sketchy hover:-translate-y-0.5 active:translate-y-0 active:shadow-none transition-all",children:[p.jsx(_1,{className:"h-8 w-8 text-fg-secondary"}),p.jsx("span",{children:"Placeholder"}),p.jsx("span",{className:"text-xs text-fg-tertiary font-medium",children:"Manage template variables"})]})]})})},fj=240,hj=20,pj=4,mj=()=>{const e=is(),n=Qn(),[r,a]=Yn(),{containerRef:o,limit:i}=Uu({minItemWidth:fj,gap:hj,rows:pj}),s=Number(r.get("page"))||1,l=Ti({mutationFn:f2,onSuccess:u=>{if(u.type==="error")throw u;n.invalidateQueries({queryKey:["images"]})}}),c=async u=>{await e("Are you really sure?")&&l.mutate(u)};return p.jsx(pt,{title:"Images",variant:"subtle",description:"Manage images uploaded to your notes",children:p.jsx("div",{ref:o,children:p.jsx(d.Suspense,{fallback:p.jsxs("div",{className:"grid gap-5",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:[p.jsx(Te,{height:"200px"}),p.jsx(Te,{height:"200px"}),p.jsx(Te,{height:"200px"})]}),children:p.jsx(rA,{searchParams:{offset:(s-1)*i,limit:i},render:({images:u,totalCount:h})=>p.jsx(St,{fallback:p.jsx(Dn,{icon:"๐Ÿ–ผ๏ธ",title:"There are no images",description:"Try drag and drop an image on the note editor."}),children:u.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"grid gap-5",style:{gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))"},children:u.map(f=>p.jsxs("div",{className:"rounded-[12px_4px_13px_3px/4px_10px_4px_12px] overflow-hidden border-2 border-border shadow-sketchy hover:shadow-sketchy-lg hover:-translate-y-0.5 active:translate-x-0.5 active:translate-y-0.5 active:shadow-none transition-all duration-200",children:[p.jsx(He,{to:mA(f.id),children:p.jsx(hg,{className:"h-48 w-full object-cover",src:f.url,alt:f.id})}),p.jsxs("div",{className:"flex p-2 justify-between items-center border-t-2 border-dashed border-border-subtle bg-subtle",children:[p.jsxs("span",{className:"text-xs font-bold text-fg-secondary px-1",children:[f.referenceCount," refs"]}),p.jsx(ze,{variant:"danger",size:"icon-sm",disabled:f.referenceCount>0,onClick:()=>c(f.id),children:p.jsx(P1,{className:"h-4 w-4"})})]})]},f.id))}),p.jsx(St,{fallback:null,children:h&&i<h&&p.jsx(nr,{page:s,last:Math.ceil(h/i),onChange:f=>{a(m=>(m.set("page",f.toString()),m))}})})]})})})})})})},gj=()=>{const e=is(),{id:n}=Ic(),r=Ar(),a=Qn(),{data:o}=On({queryKey:["image",n],async queryFn(){const c=await tA(n);if(c.type==="error")throw c;return c.image},enabled:!!n}),{data:i}=On({queryKey:["image",n,"notes"],async queryFn(){const c=await HS(o.url);if(c.type==="error")throw c;return c.imageNotes},enabled:!!o}),s=!i||(i?.length||0)>0,l=async()=>{s||await e("Are you really sure?")&&(await f2(n),r("/setting/manage-image"))};return p.jsxs(pt,{title:"Image Detail",variant:"none",children:[p.jsxs(He,{to:"/setting/manage-image",className:"inline-flex items-center gap-1 text-sm font-bold text-fg-tertiary hover:text-accent-primary transition-colors mb-4",children:[p.jsx(Zr,{size:16}),"Back to Images"]}),p.jsxs("div",{className:"flex gap-6 flex-col lg:flex-row",children:[o&&p.jsx("div",{className:"w-full lg:w-[400px] lg:flex-shrink-0",children:p.jsxs("div",{className:"bg-subtle rounded-[16px_5px_17px_4px/5px_13px_5px_15px] border-2 border-border shadow-sketchy overflow-hidden",children:[p.jsx("div",{className:"bg-muted/30 p-4 flex items-center justify-center",children:p.jsx(hg,{className:"max-h-80 w-auto max-w-full object-contain rounded-sketchy-sm",src:o.url})}),p.jsxs("div",{className:"p-4 flex flex-col gap-3 border-t-2 border-dashed border-border-subtle",children:[p.jsx("div",{className:"flex items-center justify-between",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(a4,{size:14,className:"text-fg-tertiary"}),p.jsxs("span",{className:"text-sm font-bold text-fg-secondary",children:[i?.length||0," ",(i?.length||0)===1?"reference":"references"]})]})}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx(dg,{content:s?"Cannot delete while referenced by notes":"Delete this image",side:"bottom",children:p.jsxs(ze,{variant:"danger",size:"sm",className:"flex-1",disabled:s,onClick:l,children:[p.jsx(P1,{size:16}),p.jsx("span",{children:"Delete"})]})}),p.jsxs(ze,{variant:"ghost",size:"sm",className:"flex-1",onClick:async()=>{await d2("heroBanner",o.url),await a.invalidateQueries({queryKey:["heroBanner"]})},children:[p.jsx(n4,{size:16,className:"fill-red-500 text-red-500"}),p.jsx("span",{children:"Set hero banner"})]})]})]})]})}),p.jsx("div",{className:"flex-1 min-w-0",children:i&&i.length>0?p.jsxs("div",{className:"bg-subtle rounded-[16px_5px_17px_4px/5px_13px_5px_15px] border-2 border-border shadow-sketchy p-4",children:[p.jsx("p",{className:"text-sm font-bold mb-2 pb-2 border-b-2 border-dashed border-border-subtle",children:"Referenced Notes"}),p.jsx("ul",{className:"flex flex-col",children:i.map(c=>p.jsx("li",{children:p.jsx(gA,{...c})},c.id))})]}):p.jsxs("div",{className:"bg-subtle rounded-[16px_5px_17px_4px/5px_13px_5px_15px] border-2 border-border p-8 flex flex-col items-center justify-center text-center",children:[p.jsx(m1,{size:32,className:"text-fg-disabled mb-2"}),p.jsx("p",{className:"text-sm font-bold text-fg-tertiary",children:"No notes reference this image"}),p.jsx("p",{className:"text-xs text-fg-placeholder mt-1",children:"This image can be safely deleted"})]})})]})]})},yj=async({limit:e=25,offset:n=0,query:r="",fields:a}={})=>Pe(`query def(
363
+ $searchFilter: SearchFilterInput,
364
+ $pagination: PaginationInput
365
+ ) {
366
+ allPlaceholders(
367
+ searchFilter: $searchFilter,
368
+ pagination: $pagination
369
+ ) {
370
+ totalCount
371
+ placeholders {
372
+ ${a?a.join(`
373
+ `):""}
374
+ id
375
+ name
376
+ template
377
+ replacement
378
+ createdAt
379
+ updatedAt
380
+ }
381
+ }
382
+ }`,{searchFilter:{query:r},pagination:{limit:e,offset:n}}),vj=e=>Pe(`mutation {
383
+ createPlaceholder(name: "${e.name}", template: "${e.template}", replacement: "${e.replacement}") {
384
+ id
385
+ name
386
+ template
387
+ replacement
388
+ createdAt
389
+ updatedAt
390
+ }
391
+ }`),xj=e=>Pe(`mutation {
392
+ deletePlaceholder(id: "${e}")
393
+ }`),dh="bg-subtle flex flex-col gap-1 p-4 rounded-[10px_3px_11px_3px/3px_8px_3px_10px] border-2 border-border-secondary font-bold",bj=()=>{const e=nu(),n=Qn(),[r,a]=Yn(),[o,i]=d.useState(!1),[s,l]=d.useState(!1),[c,u]=d.useState({name:"",template:"",replacement:""}),h=25,f=Number(r.get("page"))||1,[m]=d.useState(u2),{data:g,isLoading:y}=On({queryKey:["placeholders",f],queryFn:async()=>{const x=await yj({offset:(f-1)*h,limit:h});if(x.type==="error")throw x;return x.allPlaceholders}}),v=Ti({mutationFn:vj,onSuccess:async()=>{e("Placeholder added successfully"),i(!1),u({name:"",template:"",replacement:""}),await n.invalidateQueries({queryKey:["placeholders",f]})}}),b=Ti({mutationFn:xj,onSuccess:async()=>{e("Placeholder deleted successfully"),await n.invalidateQueries({queryKey:["placeholders",f]})}});return p.jsxs(pt,{title:"Placeholders",variant:"subtle",description:"Manage template variables for note cloning",children:[p.jsx(fg,{className:"mb-4",children:p.jsxs("div",{className:"flex gap-2 items-center justify-between",children:[p.jsx("span",{children:"Placeholders will be replaced with new note data during cloning."}),p.jsx(ze,{onClick:()=>i(!0),children:p.jsx(C1,{width:20,height:20})})]})}),p.jsxs("div",{className:"flex flex-col gap-3 mt-3",children:[p.jsxs("button",{type:"button",onClick:()=>l(!s),className:"bg-subtle flex gap-2 items-center justify-between p-4 rounded-[10px_3px_11px_3px/3px_8px_3px_10px] border-2 border-border-secondary font-bold",children:[p.jsx("div",{children:"System Placeholders"}),p.jsx("div",{className:"w-6 h-6",children:s?p.jsx(X6,{}):p.jsx(qc,{})})]}),s&&p.jsx("div",{className:"grid gap-3 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:m.map(x=>p.jsxs("div",{className:dh,children:[p.jsx("div",{className:"text-sm",children:x.name}),p.jsxs("div",{className:"text-fg-tertiary text-xs font-medium",children:[ec,x.template,tc," โ†’ '",x.replacement,"'"]})]},x.name))}),!y&&g?.placeholders&&g.placeholders.length>0&&p.jsx("div",{className:"grid gap-3 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:g.placeholders.map(x=>p.jsxs("div",{className:`${dh} relative`,children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("div",{className:"text-sm",children:x.name}),p.jsx("button",{type:"button",className:"w-5 h-5 hover:text-red-500 transition-colors",onClick:()=>b.mutate(x.id.toString()),children:p.jsx(Yc,{})})]}),p.jsxs("div",{className:"text-fg-tertiary text-xs font-medium",children:[ec,x.template,tc," โ†’ '",x.replacement,"'"]})]},x.id))})]}),p.jsxs($e,{isOpen:o,onClose:()=>i(!1),children:[p.jsx($e.Header,{title:"Add Placeholder",onClose:()=>i(!1)}),p.jsx($e.Body,{children:p.jsxs("div",{className:"flex flex-col gap-3",children:[p.jsx(Gn,{htmlFor:"name",children:"Name:"}),p.jsx(Ha,{id:"name",type:"text",value:c.name,onChange:x=>u({...c,name:x.target.value}),placeholder:"Description of this placeholder"}),p.jsx(Gn,{htmlFor:"template",children:"Placeholder:"}),p.jsx(Ha,{id:"template",type:"text",value:c.template,onChange:x=>u({...c,template:x.target.value}),placeholder:"note_app"}),p.jsx(Gn,{htmlFor:"replacement",children:"Replacement:"}),p.jsx(Ha,{id:"replacement",type:"text",value:c.replacement,onChange:x=>u({...c,replacement:x.target.value}),placeholder:"Ocean Brain"})]})}),p.jsx($e.Footer,{children:p.jsxs("div",{className:"flex gap-2",children:[p.jsx(ze,{variant:"ghost",onClick:()=>i(!1),children:"Cancel"}),p.jsx(ze,{isLoading:v.isPending,onClick:()=>{if(!c.name||!c.template||!c.replacement){e("All fields are required");return}v.mutate({name:c.name,template:c.template,replacement:c.replacement})},children:"Add"})]})})]}),p.jsx(St,{fallback:null,children:g?.totalCount&&h<g.totalCount&&p.jsx(nr,{page:f,last:Math.ceil(g.totalCount/h),onChange:x=>{a(w=>(w.set("page",x.toString()),w))}})})]})},wj=w8([{path:"/",element:p.jsx(fA,{children:p.jsx(Kx,{})}),children:[{path:"/",element:p.jsx(EA,{})},{path:"/calendar",element:p.jsx(mR,{})},{path:"/reminders",element:p.jsx(bR,{})},{path:"/graph",element:p.jsx(uj,{})},{path:"/search",element:p.jsx(GA,{})},{path:"/tag",element:p.jsx(JA,{})},{path:"/:id",element:p.jsx(WA,{})},{path:"/tag/:id",element:p.jsx(KA,{})},{path:"/setting",children:[{path:"",element:p.jsx(dj,{})},{path:"manage-image",element:p.jsx(mj,{})},{path:"manage-image/:id",element:p.jsx(gj,{})},{path:"placeholder",element:p.jsx(bj,{})}]}]}]);function _j(){const{setTheme:e}=oa();return d.useEffect(()=>{const n=localStorage.getItem("theme");return n&&e(n),iv.listenThemeChange(r=>e(r?"dark":"light"),!n)},[e]),p.jsx(gb,{children:p.jsx(j8,{router:wj})})}Jy.createRoot(document.getElementById("root")).render(p.jsx(pe.StrictMode,{children:p.jsx(_j,{})}));