studiograph 1.3.27 → 1.3.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/integrations/figma.js +1 -0
  2. package/dist/integrations/figma.js.map +1 -1
  3. package/dist/integrations/types.d.ts +2 -0
  4. package/dist/mcp/server-oauth-provider.js +5 -1
  5. package/dist/mcp/server-oauth-provider.js.map +1 -1
  6. package/dist/server/routes/sync-api.js +9 -1
  7. package/dist/server/routes/sync-api.js.map +1 -1
  8. package/dist/web/_app/immutable/assets/{7.BMfme7ZM.css → 7.BxtZACYG.css} +1 -1
  9. package/dist/web/_app/immutable/chunks/{DKX4rCEq.js → 1WeD8Dgt.js} +1 -1
  10. package/dist/web/_app/immutable/chunks/{Zx02i7Iu.js → 1oOHgkus.js} +1 -1
  11. package/dist/web/_app/immutable/chunks/{DvFfSfZL.js → B-KjI0ur.js} +1 -1
  12. package/dist/web/_app/immutable/chunks/{UAIfljIe.js → BF8w7RLE.js} +1 -1
  13. package/dist/web/_app/immutable/chunks/{2Upm8eP-.js → BPbvISqE.js} +1 -1
  14. package/dist/web/_app/immutable/chunks/{JPu9c3TR.js → BYSOAjj8.js} +1 -1
  15. package/dist/web/_app/immutable/chunks/{BLp0X8Gk.js → BYbm6UVc.js} +1 -1
  16. package/dist/web/_app/immutable/chunks/{DoQdsI-P.js → BYgtSFKq.js} +2 -2
  17. package/dist/web/_app/immutable/chunks/{BSywCyUT.js → BmKipDWm.js} +1 -1
  18. package/dist/web/_app/immutable/chunks/{DLGVnhPm.js → BrXfVLPD.js} +1 -1
  19. package/dist/web/_app/immutable/chunks/{AnfEg8V4.js → Bubrmc6b.js} +1 -1
  20. package/dist/web/_app/immutable/chunks/{Cd9--YY2.js → C-CLyBoI.js} +1 -1
  21. package/dist/web/_app/immutable/chunks/{e45W8JRh.js → C0RjqvEF.js} +1 -1
  22. package/dist/web/_app/immutable/chunks/{CgErnhBW.js → C1RoOxRU.js} +1 -1
  23. package/dist/web/_app/immutable/chunks/{CrgPkghk.js → CGZ5Stl2.js} +1 -1
  24. package/dist/web/_app/immutable/chunks/{B97Kx4RB.js → CP-3tjjf.js} +1 -1
  25. package/dist/web/_app/immutable/chunks/{FefWW-qv.js → CT4WYSCT.js} +1 -1
  26. package/dist/web/_app/immutable/chunks/{BFkbtedR.js → CWissqSe.js} +1 -1
  27. package/dist/web/_app/immutable/chunks/{BmmrOFcc.js → Cuwg-FeC.js} +1 -1
  28. package/dist/web/_app/immutable/chunks/{Ceu3bj1o.js → D6sUaay0.js} +1 -1
  29. package/dist/web/_app/immutable/chunks/{DZaKuUr5.js → D77fBiaD.js} +1 -1
  30. package/dist/web/_app/immutable/chunks/{OKhOOfKB.js → DUJDFyU7.js} +1 -1
  31. package/dist/web/_app/immutable/chunks/{Bjfzvir2.js → DZiqytsh.js} +1 -1
  32. package/dist/web/_app/immutable/chunks/{DBMv3OC7.js → GbY5W7LN.js} +1 -1
  33. package/dist/web/_app/immutable/chunks/{CqwkWwtq.js → UjXrxZYE.js} +1 -1
  34. package/dist/web/_app/immutable/chunks/{BNVCPAnF.js → qLcHE2VO.js} +1 -1
  35. package/dist/web/_app/immutable/chunks/{UIOTQXX3.js → tVN-VGzX.js} +1 -1
  36. package/dist/web/_app/immutable/entry/{app.ClCursx2.js → app.oMamrosJ.js} +2 -2
  37. package/dist/web/_app/immutable/entry/start.CpCJfxRz.js +1 -0
  38. package/dist/web/_app/immutable/nodes/0.hAU6Kzq3.js +10 -0
  39. package/dist/web/_app/immutable/nodes/{1.DhZf5Uqn.js → 1.CNDyDbUc.js} +1 -1
  40. package/dist/web/_app/immutable/nodes/{2.CVeavPzg.js → 2.Cneoorzn.js} +2 -2
  41. package/dist/web/_app/immutable/nodes/{3.BI6fhFGq.js → 3.4lth-EkX.js} +1 -1
  42. package/dist/web/_app/immutable/nodes/{4.CNezfIA7.js → 4.DePwfXdf.js} +3 -3
  43. package/dist/web/_app/immutable/nodes/{5.nS4yMvWf.js → 5.BDvfwojL.js} +1 -1
  44. package/dist/web/_app/immutable/nodes/{6.B2rjIPrn.js → 6.CQTWvpzP.js} +1 -1
  45. package/dist/web/_app/immutable/nodes/{7.Bgvo_kdX.js → 7.EdJJ7aAz.js} +1 -1
  46. package/dist/web/_app/immutable/nodes/{8.C3wohZ2Q.js → 8.DcqUu0GZ.js} +1 -1
  47. package/dist/web/_app/immutable/nodes/9.s0kOeLf9.js +1 -0
  48. package/dist/web/_app/version.json +1 -1
  49. package/dist/web/index.html +12 -12
  50. package/package.json +1 -1
  51. package/dist/web/_app/immutable/entry/start.BglM1yYz.js +0 -1
  52. package/dist/web/_app/immutable/nodes/0.DSax59bf.js +0 -10
  53. package/dist/web/_app/immutable/nodes/9.B7ooV5AO.js +0 -1
@@ -0,0 +1 @@
1
+ import{e as H,a as w,t as J,s as $,b as I}from"../chunks/BYgtSFKq.js";import{p as K,t as q,b as M,af as O,s as r,g as a,Y as o,a5 as l,c as t,ag as Q,ah as R,r as s,n as A}from"../chunks/BYbm6UVc.js";import{i as T}from"../chunks/DUJDFyU7.js";import{h as V}from"../chunks/C1RoOxRU.js";import{g as W}from"../chunks/CWissqSe.js";import{a as B}from"../chunks/C-CLyBoI.js";import{w as X}from"../chunks/D77fBiaD.js";import{B as Z}from"../chunks/BYSOAjj8.js";import{I as S}from"../chunks/B-KjI0ur.js";var ee=I('<p class="error-msg svelte-g40i6i"> </p>'),ae=I('<div class="setup-page svelte-g40i6i"><div class="setup-card svelte-g40i6i"><div class="logo svelte-g40i6i"><div class="logo-icon svelte-g40i6i"> </div> <span class="logo-text svelte-g40i6i"> </span></div> <p class="subtitle svelte-g40i6i">Create your admin account to get started.</p> <form class="svelte-g40i6i"><label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Name</span> <!></label> <label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Email</span> <!></label> <label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Password</span> <!> <span class="field-hint svelte-g40i6i">At least 8 characters</span></label> <!> <!></form></div></div>');function ve(P,Y){K(Y,!0);const n=Q(()=>B.workspaceName||"Studiograph");let u=o(""),v=o(""),d=o(""),p=o(""),c=o(!1);async function D(e){e.preventDefault(),r(p,""),r(c,!0);try{await B.setup(a(u),a(v),a(d)||void 0),X.load(),W("/")}catch(i){r(p,i.message||"Setup failed",!0)}finally{r(c,!1)}}var m=ae();V("g40i6i",e=>{O(()=>{R.title=`Setup — ${a(n)??""}`})});var k=t(m),f=t(k),g=t(f),E=t(g,!0);s(g);var C=l(g,2),L=t(C,!0);s(C),s(f);var b=l(f,4),_=t(b),U=l(t(_),2);S(U,{type:"text",placeholder:"Your name",autocomplete:"name",autofocus:!0,class:"field-input",get value(){return a(d)},set value(e){r(d,e,!0)}}),s(_);var h=l(_,2),j=l(t(h),2);S(j,{type:"email",required:!0,autocomplete:"email",class:"field-input",get value(){return a(u)},set value(e){r(u,e,!0)}}),s(h);var x=l(h,2),z=l(t(x),2);S(z,{type:"password",required:!0,minlength:8,autocomplete:"new-password",class:"field-input",get value(){return a(v)},set value(e){r(v,e,!0)}}),A(2),s(x);var N=l(x,2);{var F=e=>{var i=ee(),y=t(i,!0);s(i),q(()=>$(y,a(p))),w(e,i)};T(N,e=>{a(p)&&e(F)})}var G=l(N,2);Z(G,{variant:"accent",type:"submit",class:"submit-btn",get disabled(){return a(c)},children:(e,i)=>{A();var y=J("Create account");w(e,y)},$$slots:{default:!0}}),s(b),s(k),s(m),q(e=>{$(E,e),$(L,a(n))},[()=>a(n).charAt(0).toUpperCase()]),H("submit",b,D),w(P,m),M()}export{ve as component};
@@ -1 +1 @@
1
- {"version":"1774489021058"}
1
+ {"version":"1774540441402"}
@@ -7,31 +7,31 @@
7
7
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
8
8
  <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet" />
9
9
  <link rel="stylesheet" href="/api/chrome/chrome.css">
10
- <link href="/_app/immutable/entry/start.BglM1yYz.js" rel="modulepreload">
11
- <link href="/_app/immutable/chunks/BFkbtedR.js" rel="modulepreload">
12
- <link href="/_app/immutable/chunks/BLp0X8Gk.js" rel="modulepreload">
13
- <link href="/_app/immutable/chunks/DBMv3OC7.js" rel="modulepreload">
14
- <link href="/_app/immutable/entry/app.ClCursx2.js" rel="modulepreload">
10
+ <link href="/_app/immutable/entry/start.CpCJfxRz.js" rel="modulepreload">
11
+ <link href="/_app/immutable/chunks/CWissqSe.js" rel="modulepreload">
12
+ <link href="/_app/immutable/chunks/BYbm6UVc.js" rel="modulepreload">
13
+ <link href="/_app/immutable/chunks/GbY5W7LN.js" rel="modulepreload">
14
+ <link href="/_app/immutable/entry/app.oMamrosJ.js" rel="modulepreload">
15
15
  <link href="/_app/immutable/chunks/PPVm8Dsz.js" rel="modulepreload">
16
- <link href="/_app/immutable/chunks/DoQdsI-P.js" rel="modulepreload">
17
- <link href="/_app/immutable/chunks/OKhOOfKB.js" rel="modulepreload">
18
- <link href="/_app/immutable/chunks/B97Kx4RB.js" rel="modulepreload">
19
- <link href="/_app/immutable/chunks/FefWW-qv.js" rel="modulepreload">
16
+ <link href="/_app/immutable/chunks/BYgtSFKq.js" rel="modulepreload">
17
+ <link href="/_app/immutable/chunks/DUJDFyU7.js" rel="modulepreload">
18
+ <link href="/_app/immutable/chunks/CP-3tjjf.js" rel="modulepreload">
19
+ <link href="/_app/immutable/chunks/CT4WYSCT.js" rel="modulepreload">
20
20
 
21
21
  </head>
22
22
  <body data-sveltekit-preload-data="hover" data-sg-workspace="true">
23
23
  <div style="display: contents">
24
24
  <script>
25
25
  {
26
- __sveltekit_7e58fv = {
26
+ __sveltekit_uls34m = {
27
27
  base: ""
28
28
  };
29
29
 
30
30
  const element = document.currentScript.parentElement;
31
31
 
32
32
  Promise.all([
33
- import("/_app/immutable/entry/start.BglM1yYz.js"),
34
- import("/_app/immutable/entry/app.ClCursx2.js")
33
+ import("/_app/immutable/entry/start.CpCJfxRz.js"),
34
+ import("/_app/immutable/entry/app.oMamrosJ.js")
35
35
  ]).then(([kit, app]) => {
36
36
  kit.start(app, element);
37
37
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "studiograph",
3
- "version": "1.3.27",
3
+ "version": "1.3.29",
4
4
  "description": "Team-based AI agent platform with Git-backed knowledge graphs",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1 +0,0 @@
1
- import{a as r}from"../chunks/BFkbtedR.js";import{y as t}from"../chunks/DBMv3OC7.js";export{t as load_css,r as start};
@@ -1,10 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/BB_5th5W.js","../chunks/PPVm8Dsz.js","../chunks/CqkleIqs.js","../chunks/DnL9f0lc.js","../chunks/CX_61fY8.js","../chunks/CscoF-YL.js","../chunks/D7ZqAKi9.js","../chunks/C7VoTosa.js","../chunks/CrdV0ttd.js"])))=>i.map(i=>d[i]);
2
- import{_ as Ut}from"../chunks/PPVm8Dsz.js";import{a as s,b as it,l as $t,o as yt,c as Yt,e as fn,g as B,d as hn,t as We,s as kt,f as at}from"../chunks/DoQdsI-P.js";import{p as Mt,c as W,r as R,t as Y,b as At,bo as mn,ay as Ze,bp as Le,Y as k,a6 as Vt,ab as lt,s as r,g as e,a1 as Qt,aC as He,a5 as Nt,ag as g,aS as _t,a4 as A,a9 as tn,bq as Re,l as zt,a as fe,n as he,m as Dt,d as ct,af as gn,ah as vn}from"../chunks/BLp0X8Gk.js";import{d as C,c as Pe,s as st,a as te,S as wn}from"../chunks/CrgPkghk.js";import{h as bn}from"../chunks/CgErnhBW.js";import{g as Ce}from"../chunks/BFkbtedR.js";import{w as je}from"../chunks/DZaKuUr5.js";import{n as _n}from"../chunks/AnfEg8V4.js";import{a as se}from"../chunks/Cd9--YY2.js";import{t as G,c as vt,S as yn,r as Ue}from"../chunks/BmmrOFcc.js";import{p as S,s as de,r as en,l as Lt}from"../chunks/FefWW-qv.js";import{i as z,b as nn}from"../chunks/OKhOOfKB.js";import{e as Oe}from"../chunks/BSywCyUT.js";import{c as Ft}from"../chunks/B97Kx4RB.js";import{c as wt,s as bt}from"../chunks/DLGVnhPm.js";import{i as me}from"../chunks/BNVCPAnF.js";import{I as xn}from"../chunks/CqwkWwtq.js";const In=Array(12).fill(0);var Tn=it('<div class="sonner-loading-bar"></div>'),En=it('<div><div class="sonner-spinner"></div></div>');function Sn(o,t){Mt(t,!0);var n=En(),i=W(n);Oe(i,23,()=>In,(a,l)=>`spinner-bar-${l}`,(a,l)=>{var u=Tn();s(a,u)}),R(i),R(n),Y(a=>{bt(n,1,a),C(n,"data-visible",t.visible)},[()=>wt(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),s(o,n),At()}const Mn=typeof window<"u"?window:void 0;function An(o){let t=o.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class Bn{#e;#t;constructor(t,n){this.#e=t,this.#t=$t(n)}get current(){return this.#t(),this.#e()}}const Pn=/\(.+\)/,Cn=new Set(["all","print","screen","and","or","not","only"]);class kn extends Bn{constructor(t,n){let i=Pn.test(t)||t.split(/[\s,]+/).some(l=>Cn.has(l.trim()))?t:`(${t})`;const a=window.matchMedia(i);super(()=>a.matches,l=>yt(a,"change",l))}}let zn=class{#e;#t;constructor(t={}){const{window:n=Mn,document:i=n?.document}=t;n!==void 0&&(this.#e=i,this.#t=$t(a=>{const l=yt(n,"focusin",a),u=yt(n,"focusout",a);return()=>{l(),u()}}))}get current(){return this.#t?.(),this.#e?An(this.#e):null}};new zn;class Dn{#e;#t;constructor(t){this.#e=t,this.#t=Symbol(t)}get key(){return this.#t}exists(){return mn(this.#t)}get(){const t=Ze(this.#t);if(t===void 0)throw new Error(`Context "${this.#e}" not found`);return t}getOr(t){const n=Ze(this.#t);return n===void 0?t:n}set(t){return Le(this.#t,t)}}const Ln=new Dn("<Toaster/>");function le(o){return o.label!==void 0}function On(){let o=k(Vt(typeof document<"u"?document.hidden:!1));return lt(()=>yt(document,"visibilitychange",()=>{r(o,document.hidden,!0)})),{get current(){return e(o)}}}const Ye=4e3,Hn=14,Rn=45,pn=200,Fn=.05,Nn={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function Vn(o){const[t,n]=o.split("-"),i=[];return t&&i.push(t),n&&i.push(n),i}function qe(o){return 1/(1.5+Math.abs(o)/20)}var Wn=it("<div><!></div>"),Zn=it('<button data-close-button=""><!></button>'),jn=it('<div data-icon=""><!> <!></div>'),Un=it('<div data-description=""><!></div>'),Yn=it('<button data-button="" data-cancel=""> </button>'),qn=it('<button data-button=""> </button>'),Kn=it('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Xn=it('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function Gn(o,t){Mt(t,!0);const n=m=>{var w=B(),T=A(w);{var L=M=>{var K=Wn(),pt=W(K);st(pt,()=>t.loadingIcon),R(K),Y(Xt=>{bt(K,1,Xt),C(K,"data-visible",e(p)==="loading")},[()=>wt(vt(e(ot)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),s(M,K)},O=M=>{{let K=g(()=>vt(e(ot)?.loader,t.toast.classes?.loader)),pt=g(()=>e(p)==="loading");Sn(M,{get class(){return e(K)},get visible(){return e(pt)}})}};z(T,M=>{t.loadingIcon?M(L):M(O,!1)})}s(m,w)};let i=S(t,"cancelButtonStyle",3,""),a=S(t,"actionButtonStyle",3,""),l=S(t,"descriptionClass",3,""),u=S(t,"unstyled",3,!1),v=S(t,"defaultRichColors",3,!1);const d={...Nn};let _=k(!1),P=k(!1),D=k(!1),I=k(!1),q=k(!1),U=k(0),rt=k(0),Bt=t.toast.duration||t.duration||Ye,et=k(void 0),Q=k(null),qt=k(null);const ve=g(()=>t.index===0),we=g(()=>t.index+1<=t.visibleToasts),p=g(()=>t.toast.type),nt=g(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),Wt=g(()=>t.toast.class||""),Ot=g(()=>t.toast.descriptionClass||""),xt=g(()=>G.heights.findIndex(m=>m.toastId===t.toast.id)||0),It=g(()=>t.toast.closeButton??t.closeButton),Ht=g(()=>t.toast.duration??t.duration??Ye);let Pt=null;const ee=g(()=>t.position.split("-")),be=g(()=>G.heights.reduce((m,w,T)=>T>=e(xt)?m:m+w.height,0)),_e=On(),ye=g(()=>t.toast.invert||t.invert),Kt=g(()=>e(p)==="loading"),ot=g(()=>({...d,...t.classes})),xe=g(()=>t.toast.title),Ie=g(()=>t.toast.description);let Tt=k(0),ne=k(0);const Zt=g(()=>Math.round(e(xt)*Hn+e(be)));lt(()=>{e(xe),e(Ie);let m;t.expanded||t.expandByDefault?m=1:m=1-t.index*Fn;const w=Qt(()=>e(et));if(w===void 0)return;w.style.setProperty("height","auto");const T=w.offsetHeight,L=w.getBoundingClientRect().height,O=Math.round(L/m+Number.EPSILON&100)/100;w.style.removeProperty("height");let M;Math.abs(O-T)<1?M=O:M=T,r(rt,M,!0),G.setHeight({toastId:t.toast.id,height:M})});function c(){r(P,!0),r(U,e(Zt),!0),G.removeHeight(t.toast.id),setTimeout(()=>{G.remove(t.toast.id)},pn)}let N;const ht=g(()=>t.toast.promise&&e(p)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function mt(){r(Tt,new Date().getTime(),!0),N=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),c()},Bt)}function Rt(){if(e(ne)<e(Tt)){const m=new Date().getTime()-e(Tt);Bt=Bt-m}r(ne,new Date().getTime(),!0)}lt(()=>{t.toast.updated&&(clearTimeout(N),Bt=e(Ht),mt())}),lt(()=>(e(ht)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&_e.current?Rt():mt()),()=>clearTimeout(N))),He(()=>{r(_,!0);const m=e(et)?.getBoundingClientRect().height;return r(rt,m,!0),G.setHeight({toastId:t.toast.id,height:m}),()=>{G.removeHeight(t.toast.id)}}),lt(()=>{t.toast.delete&&Qt(()=>{c(),t.toast.onDismiss?.(t.toast)})});const Te=m=>{if(e(Kt))return;r(U,e(Zt),!0);const w=m.target;w.setPointerCapture(m.pointerId),w.tagName!=="BUTTON"&&(r(D,!0),Pt={x:m.clientX,y:m.clientY})},Ne=()=>{if(e(I)||!e(nt))return;Pt=null;const m=Number(e(et)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),w=Number(e(et)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),T=new Date().getTime()-0,L=e(Q)==="x"?m:w,O=Math.abs(L)/T;if(Math.abs(L)>=Rn||O>.11){r(U,e(Zt),!0),t.toast.onDismiss?.(t.toast),e(Q)==="x"?r(qt,m>0?"right":"left",!0):r(qt,w>0?"down":"up",!0),c(),r(I,!0);return}else e(et)?.style.setProperty("--swipe-amount-x","0px"),e(et)?.style.setProperty("--swipe-amount-y","0px");r(q,!1),r(D,!1),r(Q,null)},oe=m=>{if(!Pt||!e(nt)||(window.getSelection()?.toString().length??-1)>0)return;const T=m.clientY-Pt.y,L=m.clientX-Pt.x,O=t.swipeDirections??Vn(t.position);!e(Q)&&(Math.abs(L)>1||Math.abs(T)>1)&&r(Q,Math.abs(L)>Math.abs(T)?"x":"y",!0);let M={x:0,y:0};if(e(Q)==="y"){if(O.includes("top")||O.includes("bottom"))if(O.includes("top")&&T<0||O.includes("bottom")&&T>0)M.y=T;else{const K=T*qe(T);M.y=Math.abs(K)<Math.abs(T)?K:T}}else if(e(Q)==="x"&&(O.includes("left")||O.includes("right")))if(O.includes("left")&&L<0||O.includes("right")&&L>0)M.x=L;else{const K=L*qe(L);M.x=Math.abs(K)<Math.abs(L)?K:L}(Math.abs(M.x)>0||Math.abs(M.y)>0)&&r(q,!0),e(et)?.style.setProperty("--swipe-amount-x",`${M.x}px`),e(et)?.style.setProperty("--swipe-amount-y",`${M.y}px`)},gt=()=>{r(D,!1),r(Q,null),Pt=null},Et=g(()=>t.toast.icon?t.toast.icon:e(p)==="success"?t.successIcon:e(p)==="error"?t.errorIcon:e(p)==="warning"?t.warningIcon:e(p)==="info"?t.infoIcon:e(p)==="loading"?t.loadingIcon:null);var h=Xn();C(h,"tabindex",0);let jt;var ie=W(h);{var Ve=m=>{var w=Zn(),T=W(w);st(T,()=>t.closeIcon??_t),R(w),Y(L=>{C(w,"aria-label",t.closeButtonAriaLabel),C(w,"data-disabled",e(Kt)),bt(w,1,L)},[()=>wt(vt(e(ot)?.closeButton,t.toast?.classes?.closeButton))]),Yt("click",w,()=>{e(Kt)||!e(nt)||(c(),t.toast.onDismiss?.(t.toast))}),s(m,w)};z(ie,m=>{e(It)&&!t.toast.component&&e(p)!=="loading"&&t.closeIcon!==null&&m(Ve)})}var Ee=Nt(ie,2);{var Se=m=>{const w=g(()=>t.toast.component);var T=B(),L=A(T);Ft(L,()=>e(w),(O,M)=>{M(O,de(()=>t.toast.componentProps,{closeToast:c}))}),s(m,T)},Me=m=>{var w=Kn(),T=A(w);{var L=y=>{var E=jn(),f=W(E);{var H=b=>{var x=B(),tt=A(x);{var V=Ct=>{var re=B(),Be=A(re);Ft(Be,()=>t.toast.icon,(X,$)=>{$(X,{})}),s(Ct,re)},ft=Ct=>{n(Ct)};z(tt,Ct=>{t.toast.icon?Ct(V):Ct(ft,!1)})}s(b,x)};z(f,b=>{(t.toast.promise||e(p)==="loading")&&b(H)})}var j=Nt(f,2);{var F=b=>{var x=B(),tt=A(x);{var V=X=>{var $=B(),St=A($);Ft(St,()=>t.toast.icon,(un,dn)=>{dn(un,{})}),s(X,$)},ft=X=>{var $=B(),St=A($);st(St,()=>t.successIcon??_t),s(X,$)},Ct=X=>{var $=B(),St=A($);st(St,()=>t.errorIcon??_t),s(X,$)},re=X=>{var $=B(),St=A($);st(St,()=>t.warningIcon??_t),s(X,$)},Be=X=>{var $=B(),St=A($);st(St,()=>t.infoIcon??_t),s(X,$)};z(tt,X=>{t.toast.icon?X(V):e(p)==="success"?X(ft,1):e(p)==="error"?X(Ct,2):e(p)==="warning"?X(re,3):e(p)==="info"&&X(Be,4)})}s(b,x)};z(j,b=>{t.toast.type!=="loading"&&b(F)})}R(E),Y(b=>bt(E,1,b),[()=>wt(vt(e(ot)?.icon,t.toast?.classes?.icon))]),s(y,E)};z(T,y=>{(e(p)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(Et)!==null||t.toast.icon)&&y(L)})}var O=Nt(T,2),M=W(O),K=W(M);{var pt=y=>{var E=B(),f=A(E);{var H=F=>{const b=g(()=>t.toast.title);var x=B(),tt=A(x);Ft(tt,()=>e(b),(V,ft)=>{ft(V,de(()=>t.toast.componentProps))}),s(F,x)},j=F=>{var b=We();Y(()=>kt(b,t.toast.title)),s(F,b)};z(f,F=>{typeof t.toast.title!="string"?F(H):F(j,!1)})}s(y,E)};z(K,y=>{t.toast.title&&y(pt)})}R(M);var Xt=Nt(M,2);{var Ae=y=>{var E=Un(),f=W(E);{var H=F=>{const b=g(()=>t.toast.description);var x=B(),tt=A(x);Ft(tt,()=>e(b),(V,ft)=>{ft(V,de(()=>t.toast.componentProps))}),s(F,x)},j=F=>{var b=We();Y(()=>kt(b,t.toast.description)),s(F,b)};z(f,F=>{typeof t.toast.description!="string"?F(H):F(j,!1)})}R(E),Y(F=>bt(E,1,F),[()=>wt(vt(l(),e(Ot),e(ot)?.description,t.toast.classes?.description))]),s(y,E)};z(Xt,y=>{t.toast.description&&y(Ae)})}R(O);var ae=Nt(O,2);{var ut=y=>{var E=B(),f=A(E);{var H=b=>{var x=B(),tt=A(x);Ft(tt,()=>t.toast.cancel,(V,ft)=>{ft(V,{})}),s(b,x)},j=b=>{var x=Yn(),tt=W(x,!0);R(x),Y(V=>{Pe(x,t.toast.cancelButtonStyle??i()),bt(x,1,V),kt(tt,t.toast.cancel.label)},[()=>wt(vt(e(ot)?.cancelButton,t.toast?.classes?.cancelButton))]),Yt("click",x,V=>{le(t.toast.cancel)&&e(nt)&&(t.toast.cancel?.onClick?.(V),c())}),s(b,x)},F=g(()=>le(t.toast.cancel));z(f,b=>{typeof t.toast.cancel=="function"?b(H):e(F)&&b(j,1)})}s(y,E)};z(ae,y=>{t.toast.cancel&&y(ut)})}var J=Nt(ae,2);{var dt=y=>{var E=B(),f=A(E);{var H=b=>{var x=B(),tt=A(x);Ft(tt,()=>t.toast.action,(V,ft)=>{ft(V,{})}),s(b,x)},j=b=>{var x=qn(),tt=W(x,!0);R(x),Y(V=>{Pe(x,t.toast.actionButtonStyle??a()),bt(x,1,V),kt(tt,t.toast.action.label)},[()=>wt(vt(e(ot)?.actionButton,t.toast?.classes?.actionButton))]),Yt("click",x,V=>{le(t.toast.action)&&(t.toast.action?.onClick(V),!V.defaultPrevented&&c())}),s(b,x)},F=g(()=>le(t.toast.action));z(f,b=>{typeof t.toast.action=="function"?b(H):e(F)&&b(j,1)})}s(y,E)};z(J,y=>{t.toast.action&&y(dt)})}Y((y,E)=>{bt(O,1,y),bt(M,1,E)},[()=>wt(vt(e(ot)?.content,t.toast?.classes?.content)),()=>wt(vt(e(ot)?.title,t.toast?.classes?.title))]),s(m,w)};z(Ee,m=>{t.toast.component?m(Se):m(Me,!1)})}R(h),nn(h,m=>r(et,m),()=>e(et)),Y((m,w,T)=>{bt(h,1,m),C(h,"aria-live",t.toast.important?"assertive":"polite"),C(h,"data-rich-colors",t.toast.richColors??v()),C(h,"data-styled",!(t.toast.component||t.toast.unstyled||u())),C(h,"data-mounted",e(_)),C(h,"data-promise",w),C(h,"data-swiped",e(q)),C(h,"data-removed",e(P)),C(h,"data-visible",e(we)),C(h,"data-y-position",e(ee)[0]),C(h,"data-x-position",e(ee)[1]),C(h,"data-index",t.index),C(h,"data-front",e(ve)),C(h,"data-swiping",e(D)),C(h,"data-dismissible",e(nt)),C(h,"data-type",e(p)),C(h,"data-invert",e(ye)),C(h,"data-swipe-out",e(I)),C(h,"data-swipe-direction",e(qt)),C(h,"data-expanded",T),jt=Pe(h,`${t.style} ${t.toast.style}`,jt,{"--index":t.index,"--toasts-before":t.index,"--z-index":G.toasts.length-t.index,"--offset":`${e(P)?e(U):e(Zt)}px`,"--initial-height":t.expandByDefault?"auto":`${e(rt)}px`})},[()=>wt(vt(t.class,e(Wt),e(ot)?.toast,t.toast?.classes?.toast,e(ot)?.[e(p)],t.toast?.classes?.[e(p)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(_))]),Yt("pointermove",h,oe),Yt("pointerup",h,Ne),Yt("pointerdown",h,Te),fn("dragend",h,gt),s(o,h),At()}hn(["pointermove","pointerup","pointerdown","click"]);var Qn=at('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');function Jn(o){var t=Qn();s(o,t)}var $n=at('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>');function to(o){var t=$n();s(o,t)}var eo=at('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function no(o){var t=eo();s(o,t)}var oo=at('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>');function io(o){var t=oo();s(o,t)}var ao=at('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');function ro(o){var t=ao();s(o,t)}const so=3,on="24px",an="16px",lo=4e3,co=356,uo=14,ke="dark",ce="light";function fo(o,t){const n={};return[o,t].forEach((i,a)=>{const l=a===1,u=l?"--mobile-offset":"--offset",v=l?an:on;function d(_){["top","right","bottom","left"].forEach(P=>{n[`${u}-${P}`]=typeof _=="number"?`${_}px`:_})}typeof i=="number"||typeof i=="string"?d(i):typeof i=="object"?["top","right","bottom","left"].forEach(_=>{const P=i[_];P===void 0?n[`${u}-${_}`]=v:n[`${u}-${_}`]=typeof P=="number"?`${P}px`:P}):d(v)}),n}var ho=it("<ol></ol>"),mo=it('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function go(o,t){Mt(t,!0);function n(c){return c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ke:ce}let i=S(t,"invert",3,!1),a=S(t,"position",3,"bottom-right"),l=S(t,"hotkey",19,()=>["altKey","KeyT"]),u=S(t,"expand",3,!1),v=S(t,"closeButton",3,!1),d=S(t,"offset",3,on),_=S(t,"mobileOffset",3,an),P=S(t,"theme",3,"light"),D=S(t,"richColors",3,!1),I=S(t,"duration",3,lo),q=S(t,"visibleToasts",3,so),U=S(t,"toastOptions",19,()=>({})),rt=S(t,"dir",7,"auto"),Bt=S(t,"gap",3,uo),et=S(t,"pauseWhenPageIsHidden",3,!1),Q=S(t,"containerAriaLabel",3,"Notifications"),qt=S(t,"closeButtonAriaLabel",3,"Close toast"),ve=en(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","pauseWhenPageIsHidden","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function we(){if(rt()!=="auto")return rt();if(typeof window>"u"||typeof document>"u")return"ltr";const c=document.documentElement.getAttribute("dir");return c==="auto"||!c?(Qt(()=>rt(window.getComputedStyle(document.documentElement).direction??"ltr")),rt()):(Qt(()=>rt(c)),c)}const p=g(()=>Array.from(new Set([a(),...G.toasts.filter(c=>c.position).map(c=>c.position)].filter(Boolean))));let nt=k(!1),Wt=k(!1),Ot=k(Vt(n(P()))),xt=k(void 0),It=k(null),Ht=k(!1);const Pt=g(()=>l().join("+").replace(/Key/g,"").replace(/Digit/g,""));lt(()=>{G.toasts.length<=1&&r(nt,!1)}),lt(()=>{const c=G.toasts.filter(N=>N.dismiss&&!N.delete);if(c.length>0){const N=G.toasts.map(ht=>c.find(Rt=>Rt.id===ht.id)?{...ht,delete:!0}:ht);G.toasts=N}}),lt(()=>()=>{e(xt)&&e(It)&&(e(It).focus({preventScroll:!0}),r(It,null),r(Ht,!1))}),He(()=>(G.reset(),yt(document,"keydown",N=>{l().every(mt=>N[mt]||N.code===mt)&&(r(nt,!0),e(xt)?.focus()),N.code==="Escape"&&(document.activeElement===e(xt)||e(xt)?.contains(document.activeElement))&&r(nt,!1)}))),lt(()=>{if(P()!=="system"&&r(Ot,P()),typeof window<"u"){P()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?r(Ot,ke):r(Ot,ce));const c=window.matchMedia("(prefers-color-scheme: dark)"),N=({matches:ht})=>{P()==="system"&&r(Ot,ht?ke:ce,!0)};"addEventListener"in c?c.addEventListener("change",N):c.addListener(N)}});const ee=c=>{t.onblur?.(c),e(Ht)&&!c.currentTarget.contains(c.relatedTarget)&&(r(Ht,!1),e(It)&&(e(It).focus({preventScroll:!0}),r(It,null)))},be=c=>{t.onfocus?.(c),!(c.target instanceof HTMLElement&&c.target.dataset.dismissible==="false")&&(e(Ht)||(r(Ht,!0),r(It,c.relatedTarget,!0)))},_e=c=>{t.onpointerdown?.(c),!(c.target instanceof HTMLElement&&c.target.dataset.dismissible==="false")&&r(Wt,!0)},ye=c=>{t.onmouseenter?.(c),r(nt,!0)},Kt=c=>{t.onmouseleave?.(c),e(Wt)||r(nt,!1)},ot=c=>{t.onmousemove?.(c),r(nt,!0)},xe=c=>{t.ondragend?.(c),r(nt,!1)},Ie=c=>{t.onpointerup?.(c),r(Wt,!1)};Ln.set(new yn);var Tt=mo();C(Tt,"tabindex",-1);var ne=W(Tt);{var Zt=c=>{var N=B(),ht=A(N);Oe(ht,18,()=>e(p),mt=>mt,(mt,Rt,Te,Ne)=>{const oe=g(()=>{const[h,jt]=Rt.split("-");return{y:h,x:jt}}),gt=g(()=>fo(d(),_()));var Et=ho();te(Et,h=>({tabindex:-1,dir:h,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(Ot),"data-y-position":e(oe).y,"data-x-position":e(oe).x,style:t.style,onblur:ee,onfocus:be,onmouseenter:ye,onmousemove:ot,onmouseleave:Kt,ondragend:xe,onpointerdown:_e,onpointerup:Ie,...ve,[wn]:{"--front-toast-height":`${G.heights[0]?.height}px`,"--width":`${co}px`,"--gap":`${Bt()}px`,"--offset-top":e(gt)["--offset-top"],"--offset-right":e(gt)["--offset-right"],"--offset-bottom":e(gt)["--offset-bottom"],"--offset-left":e(gt)["--offset-left"],"--mobile-offset-top":e(gt)["--mobile-offset-top"],"--mobile-offset-right":e(gt)["--mobile-offset-right"],"--mobile-offset-bottom":e(gt)["--mobile-offset-bottom"],"--mobile-offset-left":e(gt)["--mobile-offset-left"]}}),[we],void 0,void 0,"svelte-nbs0zk"),Oe(Et,23,()=>G.toasts.filter(h=>!h.position&&e(Te)===0||h.position===Rt),h=>h.id,(h,jt,ie,Ve)=>{{const Ee=ut=>{var J=B(),dt=A(J);{var y=f=>{var H=B(),j=A(H);st(j,()=>t.successIcon??_t),s(f,H)},E=f=>{Jn(f)};z(dt,f=>{t.successIcon?f(y):t.successIcon!==null&&f(E,1)})}s(ut,J)},Se=ut=>{var J=B(),dt=A(J);{var y=f=>{var H=B(),j=A(H);st(j,()=>t.errorIcon??_t),s(f,H)},E=f=>{to(f)};z(dt,f=>{t.errorIcon?f(y):t.errorIcon!==null&&f(E,1)})}s(ut,J)},Me=ut=>{var J=B(),dt=A(J);{var y=f=>{var H=B(),j=A(H);st(j,()=>t.warningIcon??_t),s(f,H)},E=f=>{no(f)};z(dt,f=>{t.warningIcon?f(y):t.warningIcon!==null&&f(E,1)})}s(ut,J)},m=ut=>{var J=B(),dt=A(J);{var y=f=>{var H=B(),j=A(H);st(j,()=>t.infoIcon??_t),s(f,H)},E=f=>{io(f)};z(dt,f=>{t.infoIcon?f(y):t.infoIcon!==null&&f(E,1)})}s(ut,J)},w=ut=>{var J=B(),dt=A(J);{var y=f=>{var H=B(),j=A(H);st(j,()=>t.closeIcon??_t),s(f,H)},E=f=>{ro(f)};z(dt,f=>{t.closeIcon?f(y):t.closeIcon!==null&&f(E,1)})}s(ut,J)};let T=g(()=>U()?.duration??I()),L=g(()=>U()?.class??""),O=g(()=>U()?.descriptionClass||""),M=g(()=>U()?.style??""),K=g(()=>U().classes||{}),pt=g(()=>U().unstyled??!1),Xt=g(()=>U()?.cancelButtonStyle??""),Ae=g(()=>U()?.actionButtonStyle??""),ae=g(()=>U()?.closeButtonAriaLabel??qt());Gn(h,{get index(){return e(ie)},get toast(){return e(jt)},get defaultRichColors(){return D()},get duration(){return e(T)},get class(){return e(L)},get descriptionClass(){return e(O)},get invert(){return i()},get visibleToasts(){return q()},get closeButton(){return v()},get interacting(){return e(Wt)},get position(){return Rt},get style(){return e(M)},get classes(){return e(K)},get unstyled(){return e(pt)},get cancelButtonStyle(){return e(Xt)},get actionButtonStyle(){return e(Ae)},get closeButtonAriaLabel(){return e(ae)},get expandByDefault(){return u()},get expanded(){return e(nt)},get pauseWhenPageIsHidden(){return et()},get loadingIcon(){return t.loadingIcon},successIcon:Ee,errorIcon:Se,warningIcon:Me,infoIcon:m,closeIcon:w,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),R(Et),nn(Et,h=>r(xt,h),()=>e(xt)),Y(()=>Et.dir=Et.dir),s(mt,Et)}),s(c,N)};z(ne,c=>{G.toasts.length>0&&c(Zt)})}R(Tt),Y(()=>C(Tt,"aria-label",`${Q()??""} ${e(Pt)??""}`)),s(o,Tt),At()}const rn=typeof window<"u"?window:void 0;function vo(o){let t=o.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}let wo=class{#e;#t;constructor(t={}){const{window:n=rn,document:i=n?.document}=t;n!==void 0&&(this.#e=i,this.#t=$t(a=>{const l=yt(n,"focusin",a),u=yt(n,"focusout",a);return()=>{l(),u()}}))}get current(){return this.#t?.(),this.#e?vo(this.#e):null}};new wo;function bo(o,t){switch(o){case"post":lt(t);break;case"pre":tn(t);break}}function sn(o,t,n,i={}){const{lazy:a=!1}=i;let l=!a,u=Array.isArray(o)?[]:void 0;bo(t,()=>{const v=Array.isArray(o)?o.map(_=>_()):o();if(!l){l=!0,u=v;return}const d=Qt(()=>n(v,u));return u=v,d})}function pe(o,t,n){sn(o,"post",t,n)}function _o(o,t,n){sn(o,"pre",t,n)}pe.pre=_o;function yo(o,t){switch(o){case"local":return t.localStorage;case"session":return t.sessionStorage}}class ln{#e;#t;#o;#n;#a;#i=k(0);constructor(t,n,i={}){const{storage:a="local",serializer:l={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs:u=!0,window:v=rn}=i;if(this.#e=n,this.#t=t,this.#o=l,v===void 0)return;const d=yo(a,v);this.#n=d;const _=d.getItem(t);_!==null?this.#e=this.#r(_):this.#s(n),u&&a==="local"&&(this.#a=$t(()=>yt(v,"storage",this.#l)))}get current(){this.#a?.(),e(this.#i);const t=this.#r(this.#n?.getItem(this.#t))??this.#e,n=new WeakMap,i=a=>{if(a===null||a?.constructor.name==="Date"||typeof a!="object")return a;let l=n.get(a);return l||(l=new Proxy(a,{get:(u,v)=>(e(this.#i),i(Reflect.get(u,v))),set:(u,v,d)=>(r(this.#i,e(this.#i)+1),Reflect.set(u,v,d),this.#s(t),!0)}),n.set(a,l)),l};return i(t)}set current(t){this.#s(t),r(this.#i,e(this.#i)+1)}#l=t=>{t.key!==this.#t||t.newValue===null||(this.#e=this.#r(t.newValue),r(this.#i,e(this.#i)+1))};#r(t){try{return this.#o.deserialize(t)}catch(n){console.error(`Error when parsing "${t}" from persisted store "${this.#t}"`,n);return}}#s(t){try{t!=null&&this.#n?.setItem(this.#t,this.#o.serialize(t))}catch(n){console.error(`Error when writing value from persisted store "${this.#t}" to ${this.#n}`,n)}}}function Ke(o){return o.filter(t=>t.length>0)}const cn={getItem:o=>null,setItem:(o,t)=>{}},ge=typeof document<"u";function xo(o){return typeof o=="function"}function Io(o){return o!==null&&typeof o=="object"}const Jt=Symbol("box"),Fe=Symbol("is-writable");function To(o){return Io(o)&&Jt in o}function Eo(o){return Z.isBox(o)&&Fe in o}function Z(o){let t=k(Vt(o));return{[Jt]:!0,[Fe]:!0,get current(){return e(t)},set current(n){r(t,n,!0)}}}function So(o,t){const n=g(o);return t?{[Jt]:!0,[Fe]:!0,get current(){return e(n)},set current(i){t(i)}}:{[Jt]:!0,get current(){return o()}}}function Mo(o){return Z.isBox(o)?o:xo(o)?Z.with(o):Z(o)}function Ao(o){return Object.entries(o).reduce((t,[n,i])=>Z.isBox(i)?(Z.isWritableBox(i)?Object.defineProperty(t,n,{get(){return i.current},set(a){i.current=a}}):Object.defineProperty(t,n,{get(){return i.current}}),t):Object.assign(t,{[n]:i}),{})}function Bo(o){return Z.isWritableBox(o)?{[Jt]:!0,get current(){return o.current}}:o}Z.from=Mo;Z.with=So;Z.flatten=Ao;Z.readonly=Bo;Z.isBox=To;Z.isWritableBox=Eo;function Po(o,t){const n=RegExp(o,"g");return i=>{if(typeof i!="string")throw new TypeError(`expected an argument of type string, but got ${typeof i}`);return i.match(n)?i.replace(n,t):i}}const Co=Po(/[A-Z]/,o=>`-${o.toLowerCase()}`);function ko(o){if(!o||typeof o!="object"||Array.isArray(o))throw new TypeError(`expected an argument of type object, but got ${typeof o}`);return Object.keys(o).map(t=>`${Co(t)}: ${o[t]};`).join(`
3
- `)}function zo(o={}){return ko(o).replace(`
4
- `," ")}const Do={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};zo(Do);const Lo=typeof window<"u"?window:void 0;function Oo(o){let t=o.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class Ho{#e;#t;constructor(t={}){const{window:n=Lo,document:i=n?.document}=t;n!==void 0&&(this.#e=i,this.#t=$t(a=>{const l=yt(n,"focusin",a),u=yt(n,"focusout",a);return()=>{l(),u()}}))}get current(){return this.#t?.(),this.#e?Oo(this.#e):null}}new Ho;const ze=Z("mode-watcher-mode"),De=Z("mode-watcher-theme"),Ro=["dark","light","system"];function Xe(o){return typeof o!="string"?!1:Ro.includes(o)}class po{#e="system";#t=ge?localStorage:cn;#o=this.#t.getItem(ze.current);#n=Xe(this.#o)?this.#o:this.#e;#a=k(Vt(this.#i()));#i(t=this.#n){return new ln(ze.current,t,{serializer:{serialize:n=>n,deserialize:n=>Xe(n)?n:this.#e}})}constructor(){Re(()=>pe.pre(()=>ze.current,(t,n)=>{const i=e(this.#a).current;r(this.#a,this.#i(i),!0),n&&localStorage.removeItem(n)}))}get current(){return e(this.#a).current}set current(t){e(this.#a).current=t}}class Fo{#e=void 0;#t=!0;#o=k(Vt(this.#e));#n=typeof window<"u"&&typeof window.matchMedia=="function"?new kn("prefers-color-scheme: light"):{current:!1};query(){ge&&r(this.#o,this.#n.current?"light":"dark",!0)}tracking(t){this.#t=t}constructor(){Re(()=>{tn(()=>{this.#t&&this.query()})}),this.query=this.query.bind(this),this.tracking=this.tracking.bind(this)}get current(){return e(this.#o)}}const Ge=new po,No=new Fo;class Vo{#e=ge?localStorage:cn;#t=this.#e.getItem(De.current);#o=this.#t===null||this.#t===void 0?"":this.#t;#n=k(Vt(this.#a()));#a(t=this.#o){return new ln(De.current,t,{serializer:{serialize:n=>typeof n!="string"?"":n,deserialize:n=>n}})}constructor(){Re(()=>pe.pre(()=>De.current,(t,n)=>{const i=e(this.#n).current;r(this.#n,this.#a(i),!0),n&&localStorage.removeItem(n)}))}get current(){return e(this.#n).current}set current(t){e(this.#n).current=t}}new Vo;let Qe,Je,$e=!1,Gt=null;function Wo(){return Gt||(Gt=document.createElement("style"),Gt.appendChild(document.createTextNode(`* {
5
- -webkit-transition: none !important;
6
- -moz-transition: none !important;
7
- -o-transition: none !important;
8
- -ms-transition: none !important;
9
- transition: none !important;
10
- }`)),Gt)}function Zo(o,t=!1){if(typeof document>"u")return;if(!$e){$e=!0,o();return}if(typeof window<"u"&&window.__vitest_worker__){o();return}clearTimeout(Qe),clearTimeout(Je);const i=Wo(),a=()=>document.head.appendChild(i),l=()=>{i.parentNode&&document.head.removeChild(i)};function u(){o(),window.requestAnimationFrame(l)}if(typeof window.requestAnimationFrame<"u"){a(),t?u():window.requestAnimationFrame(()=>{u()});return}a(),Qe=window.setTimeout(()=>{o(),Je=window.setTimeout(l,16)},16)}const ue=Z(void 0),jo=Z(!0),Uo=Z(!1),Yo=Z([]),qo=Z([]);function Ko(){const o=g(()=>{if(!ge)return;const t=Ge.current==="system"?No.current:Ge.current,n=Ke(Yo.current),i=Ke(qo.current);function a(){const l=document.documentElement,u=document.querySelector('meta[name="theme-color"]');t==="light"?(n.length&&l.classList.remove(...n),i.length&&l.classList.add(...i),l.style.colorScheme="light",u&&ue.current&&u.setAttribute("content",ue.current.light)):(i.length&&l.classList.remove(...i),n.length&&l.classList.add(...n),l.style.colorScheme="dark",u&&ue.current&&u.setAttribute("content",ue.current.dark))}return jo.current?Zo(a,Uo.current):a(),t});return{get current(){return e(o)}}}const Xo=Ko();var Go=at("<title> </title>"),Qo=at('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"></path><path fill="none" d="M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z" data-icon-path="inner-path"></path></svg>');function Jo(o,t){const n=Lt(t,["children","$$slots","$$events","$$legacy"]),i=Lt(n,["size","title"]);Mt(t,!1);const a=Dt(),l=Dt();let u=S(t,"size",8,16),v=S(t,"title",8,void 0);zt(()=>(ct(n),ct(v())),()=>{r(a,n["aria-label"]||n["aria-labelledby"]||v())}),zt(()=>(e(a),ct(n)),()=>{r(l,{"aria-hidden":e(a)?void 0:!0,role:e(a)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),fe(),me();var d=Qo();te(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:u(),height:u(),...e(l),...i}));var _=W(d);{var P=D=>{var I=Go(),q=W(I,!0);R(I),Y(()=>kt(q,v())),s(D,I)};z(_,D=>{v()&&D(P)})}he(2),R(d),s(o,d),At()}var $o=at("<title> </title>"),ti=at('<svg><!><path fill="none" d="M14.9 7.2H17.1V24.799H14.9z" data-icon-path="inner-path" transform="rotate(-45 16 16)"></path><path d="M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"></path></svg>');function ei(o,t){const n=Lt(t,["children","$$slots","$$events","$$legacy"]),i=Lt(n,["size","title"]);Mt(t,!1);const a=Dt(),l=Dt();let u=S(t,"size",8,16),v=S(t,"title",8,void 0);zt(()=>(ct(n),ct(v())),()=>{r(a,n["aria-label"]||n["aria-labelledby"]||v())}),zt(()=>(e(a),ct(n)),()=>{r(l,{"aria-hidden":e(a)?void 0:!0,role:e(a)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),fe(),me();var d=ti();te(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:u(),height:u(),...e(l),...i}));var _=W(d);{var P=D=>{var I=$o(),q=W(I,!0);R(I),Y(()=>kt(q,v())),s(D,I)};z(_,D=>{v()&&D(P)})}he(2),R(d),s(o,d),At()}var ni=at("<title> </title>"),oi=at('<svg><!><path fill="none" d="M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z" data-icon-path="inner-path"></path><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"></path></svg>');function ii(o,t){const n=Lt(t,["children","$$slots","$$events","$$legacy"]),i=Lt(n,["size","title"]);Mt(t,!1);const a=Dt(),l=Dt();let u=S(t,"size",8,16),v=S(t,"title",8,void 0);zt(()=>(ct(n),ct(v())),()=>{r(a,n["aria-label"]||n["aria-labelledby"]||v())}),zt(()=>(e(a),ct(n)),()=>{r(l,{"aria-hidden":e(a)?void 0:!0,role:e(a)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),fe(),me();var d=oi();te(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:u(),height:u(),...e(l),...i}));var _=W(d);{var P=D=>{var I=ni(),q=W(I,!0);R(I),Y(()=>kt(q,v())),s(D,I)};z(_,D=>{v()&&D(P)})}he(2),R(d),s(o,d),At()}var ai=at("<title> </title>"),ri=at('<svg><!><path fill="none" d="M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z" data-icon-path="inner-path"></path><path d="M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"></path><path d="M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"></path></svg>');function si(o,t){const n=Lt(t,["children","$$slots","$$events","$$legacy"]),i=Lt(n,["size","title"]);Mt(t,!1);const a=Dt(),l=Dt();let u=S(t,"size",8,16),v=S(t,"title",8,void 0);zt(()=>(ct(n),ct(v())),()=>{r(a,n["aria-label"]||n["aria-labelledby"]||v())}),zt(()=>(e(a),ct(n)),()=>{r(l,{"aria-hidden":e(a)?void 0:!0,role:e(a)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),fe(),me();var d=ri();te(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:u(),height:u(),...e(l),...i}));var _=W(d);{var P=D=>{var I=ai(),q=W(I,!0);R(I),Y(()=>kt(q,v())),s(D,I)};z(_,D=>{v()&&D(P)})}he(3),R(d),s(o,d),At()}function li(o,t){Mt(t,!0);let n=en(t,["$$slots","$$events","$$legacy"]);go(o,de({get theme(){return Xo.current},class:"toaster group",style:"--normal-bg: var(--color-bg-elevated); --normal-text: var(--color-text-primary); --normal-border: var(--color-border-strong);"},()=>n,{loadingIcon:d=>{xn(d,{class:"size-4 animate-spin"})},successIcon:d=>{Jo(d,{class:"size-4"})},errorIcon:d=>{ei(d,{class:"size-4"})},infoIcon:d=>{ii(d,{class:"size-4"})},warningIcon:d=>{si(d,{class:"size-4"})},$$slots:{loadingIcon:!0,successIcon:!0,errorIcon:!0,infoIcon:!0,warningIcon:!0}})),At()}var ci=it('<div style="display: contents;"><!> <!></div>');function Pi(o,t){Mt(t,!0);const n=typeof localStorage<"u"?localStorage.getItem("theme"):null;let i=k(Vt(n==="light"?"light":"dark"));Le("theme",{get current(){return e(i)},toggle(){r(i,e(i)==="dark"?"light":"dark",!0),localStorage.setItem("theme",e(i))}});const l=typeof localStorage<"u"?localStorage.getItem("chatOpen"):null;let u=k(l==="true");Le("chat",{get open(){return e(u)},toggle(){r(u,!e(u)),localStorage.setItem("chatOpen",String(e(u)))},close(){r(u,!1),localStorage.setItem("chatOpen","false")}}),lt(()=>{document.documentElement.setAttribute("data-theme",e(i))});let d=k(null);lt(()=>{if(se.loading)return;const I=se.user?.email??(se.authEnabled?null:"__open__");I&&I!==e(d)&&(e(d)!==null&&_n.deselect(),r(d,I,!0),je.load(),Ue.connect()),!I&&e(d)&&(r(d,null),Ue.disconnect())}),He(async()=>{const I=window.location.pathname,q=I==="/login",U=I==="/setup",{authenticated:rt,authEnabled:Bt,needsSetup:et}=await se.checkAuth();if(et&&!U){Ce("/setup");return}if(Bt&&!rt&&!q){Ce("/login");return}if(rt&&(q||U)){Ce("/");return}q||U||(Ut(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url).catch(()=>{}),Promise.all([Ut(()=>import("../chunks/CX_61fY8.js"),[],import.meta.url),Ut(()=>import("../chunks/DnL9f0lc.js").then(Q=>Q.i),__vite__mapDeps([3,4]),import.meta.url),Ut(()=>import("../chunks/CscoF-YL.js"),__vite__mapDeps([5,4,3,6,7,8]),import.meta.url),Ut(()=>import("../chunks/D7ZqAKi9.js"),__vite__mapDeps([6,7,4,3]),import.meta.url),Ut(()=>import("../chunks/C7VoTosa.js").then(Q=>Q.i),[],import.meta.url)]).catch(()=>{}),window.addEventListener("sg-theme-change",Q=>{r(i,Q.detail,!0)}))});var _=ci();bn("12qhfyh",I=>{gn(()=>{vn.title=(je.name||"Studiograph")??""})});var P=W(_);st(P,()=>t.children);var D=Nt(P,2);li(D,{}),R(_),Y(()=>C(_,"data-theme",e(i))),s(o,_),At()}export{Pi as component};
@@ -1 +0,0 @@
1
- import{e as A,a as _,t as D,b as S,s as E}from"../chunks/DoQdsI-P.js";import{p as j,b as z,ai as F,s,g as a,Y as o,a5 as t,c as l,ah as G,r as i,n as $,t as H}from"../chunks/BLp0X8Gk.js";import{i as J}from"../chunks/OKhOOfKB.js";import{h as K}from"../chunks/CgErnhBW.js";import{g as L}from"../chunks/BFkbtedR.js";import{a as M}from"../chunks/Cd9--YY2.js";import{w as O}from"../chunks/DZaKuUr5.js";import{B as Q}from"../chunks/JPu9c3TR.js";import{I as y}from"../chunks/DvFfSfZL.js";var R=S('<p class="error-msg svelte-g40i6i"> </p>'),T=S('<div class="setup-page svelte-g40i6i"><div class="setup-card svelte-g40i6i"><div class="logo svelte-g40i6i"><div class="logo-icon svelte-g40i6i">S</div> <span class="logo-text svelte-g40i6i">Studiograph</span></div> <p class="subtitle svelte-g40i6i">Create your admin account to get started.</p> <form class="svelte-g40i6i"><label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Name</span> <!></label> <label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Email</span> <!></label> <label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Password</span> <!> <span class="field-hint svelte-g40i6i">At least 8 characters</span></label> <!> <!></form></div></div>');function le(k,q){j(q,!0);let n=o(""),u=o(""),d=o(""),p=o(""),v=o(!1);async function B(e){e.preventDefault(),s(p,""),s(v,!0);try{await M.setup(a(n),a(u),a(d)||void 0),O.load(),L("/")}catch(r){s(p,r.message||"Setup failed",!0)}finally{s(v,!1)}}var c=T();K("g40i6i",e=>{F(()=>{G.title="Setup — Studiograph"})});var w=l(c),m=t(l(w),4),f=l(m),C=t(l(f),2);y(C,{type:"text",placeholder:"Your name",autocomplete:"name",autofocus:!0,class:"field-input",get value(){return a(d)},set value(e){s(d,e,!0)}}),i(f);var g=t(f,2),I=t(l(g),2);y(I,{type:"email",required:!0,autocomplete:"email",class:"field-input",get value(){return a(n)},set value(e){s(n,e,!0)}}),i(g);var b=t(g,2),N=t(l(b),2);y(N,{type:"password",required:!0,minlength:8,autocomplete:"new-password",class:"field-input",get value(){return a(u)},set value(e){s(u,e,!0)}}),$(2),i(b);var x=t(b,2);{var P=e=>{var r=R(),h=l(r,!0);i(r),H(()=>E(h,a(p))),_(e,r)};J(x,e=>{a(p)&&e(P)})}var Y=t(x,2);Q(Y,{variant:"accent",type:"submit",class:"submit-btn",get disabled(){return a(v)},children:(e,r)=>{$();var h=D("Create account");_(e,h)},$$slots:{default:!0}}),i(m),i(w),i(c),A("submit",m,B),_(k,c),z()}export{le as component};