studiograph 1.3.19 → 1.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/types.d.ts +3 -0
- package/dist/core/types.js +1 -0
- package/dist/core/types.js.map +1 -1
- package/dist/server/chrome/chrome.css +4 -8
- package/dist/server/index.js +15 -2
- package/dist/server/index.js.map +1 -1
- package/dist/web/_app/immutable/assets/0.D8EoqqcB.css +1 -0
- package/dist/web/_app/immutable/assets/2.DRZ4qWy8.css +1 -0
- package/dist/web/_app/immutable/assets/{3.C-bIa9M8.css → 3.Bxy1xbfc.css} +1 -1
- package/dist/web/_app/immutable/assets/{4.BhKgiXd2.css → 4.aFSdMTV2.css} +1 -1
- package/dist/web/_app/immutable/assets/{5.CydFyZSu.css → 5.CquhUpOu.css} +1 -1
- package/dist/web/_app/immutable/assets/{6.kqeOo0OW.css → 6.CT4xL4K3.css} +1 -1
- package/dist/web/_app/immutable/assets/{7.CseIx7qQ.css → 7.BMfme7ZM.css} +1 -1
- package/dist/web/_app/immutable/assets/{8.BYpFDZHK.css → 8.BUrHkYry.css} +1 -1
- package/dist/web/_app/immutable/assets/AppShell.DFQamTEo.css +1 -0
- package/dist/web/_app/immutable/assets/ViewToolbar.39HnhXNY.css +1 -0
- package/dist/web/_app/immutable/chunks/2lIPsyS1.js +1 -0
- package/dist/web/_app/immutable/chunks/{BVmVTxxa.js → 8_3AquXS.js} +1 -1
- package/dist/web/_app/immutable/chunks/9H0Eug-K.js +1 -0
- package/dist/web/_app/immutable/chunks/{DKQjBKyp.js → B340SUKR.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DJKRyj_1.js → BCc0wQRF.js} +1 -1
- package/dist/web/_app/immutable/chunks/{CIZkRAuY.js → CXrT-896.js} +1 -1
- package/dist/web/_app/immutable/chunks/D2nVx4xh.js +1 -0
- package/dist/web/_app/immutable/chunks/DGXEf2nW.js +1 -0
- package/dist/web/_app/immutable/chunks/DJCIIlIq.js +91 -0
- package/dist/web/_app/immutable/chunks/DJk-tEOI.js +1 -0
- package/dist/web/_app/immutable/chunks/DQ4B6jbE.js +2 -0
- package/dist/web/_app/immutable/chunks/{CnKc_Tae.js → DVeBSOEs.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BUSlXG5Y.js → DZcH3k7y.js} +1 -1
- package/dist/web/_app/immutable/chunks/EXt9EGH6.js +1 -0
- package/dist/web/_app/immutable/chunks/{BaUG0bh_.js → EpaeaOC3.js} +2 -2
- package/dist/web/_app/immutable/chunks/_VqKaRO3.js +2 -0
- package/dist/web/_app/immutable/chunks/bZnjPslN.js +1 -0
- package/dist/web/_app/immutable/chunks/u-BJ4rdO.js +1 -0
- package/dist/web/_app/immutable/chunks/{BpUdqMox.js → xf3JUd0V.js} +1 -1
- package/dist/web/_app/immutable/entry/app.Bq3TZW-V.js +2 -0
- package/dist/web/_app/immutable/entry/start.C4gZuziE.js +1 -0
- package/dist/web/_app/immutable/nodes/0.BEIzN223.js +10 -0
- package/dist/web/_app/immutable/nodes/1.B5D1CJ1m.js +1 -0
- package/dist/web/_app/immutable/nodes/2.BGaiMS7x.js +1 -0
- package/dist/web/_app/immutable/nodes/3.C3goG01r.js +11 -0
- package/dist/web/_app/immutable/nodes/{4.CD5YzRYT.js → 4.C4ze80_s.js} +2 -2
- package/dist/web/_app/immutable/nodes/5.IqOopG3B.js +2 -0
- package/dist/web/_app/immutable/nodes/6.DaqAOjv4.js +1 -0
- package/dist/web/_app/immutable/nodes/7.C_M49E5I.js +2 -0
- package/dist/web/_app/immutable/nodes/8.CuCVLNZd.js +1 -0
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +11 -11
- package/package.json +1 -1
- package/dist/web/_app/immutable/assets/0.CupILLQs.css +0 -1
- package/dist/web/_app/immutable/assets/2.DRHi7ABa.css +0 -1
- package/dist/web/_app/immutable/assets/AppShell.D3hRAjzT.css +0 -1
- package/dist/web/_app/immutable/assets/ChatPanel.CP-_8txt.css +0 -1
- package/dist/web/_app/immutable/chunks/0x0awhVy.js +0 -2
- package/dist/web/_app/immutable/chunks/8FUQuwgM.js +0 -1
- package/dist/web/_app/immutable/chunks/Bl1mtM70.js +0 -1
- package/dist/web/_app/immutable/chunks/C7R6dA2m.js +0 -1
- package/dist/web/_app/immutable/chunks/CbJfRYJV.js +0 -1
- package/dist/web/_app/immutable/chunks/DKIqe64p.js +0 -64
- package/dist/web/_app/immutable/chunks/DVuLyxG5.js +0 -1
- package/dist/web/_app/immutable/chunks/DxxhVGi2.js +0 -1
- package/dist/web/_app/immutable/chunks/EDLlAC9C.js +0 -2
- package/dist/web/_app/immutable/chunks/Scb_NG-a.js +0 -28
- package/dist/web/_app/immutable/chunks/glgUBDR2.js +0 -1
- package/dist/web/_app/immutable/entry/app.DjTkwlaQ.js +0 -2
- package/dist/web/_app/immutable/entry/start.Bupokdng.js +0 -1
- package/dist/web/_app/immutable/nodes/0.Q3C-jhjE.js +0 -10
- package/dist/web/_app/immutable/nodes/1.BPCfgPXb.js +0 -1
- package/dist/web/_app/immutable/nodes/2.Bdsd2uts.js +0 -1
- package/dist/web/_app/immutable/nodes/3.Doh56lgy.js +0 -11
- package/dist/web/_app/immutable/nodes/5.DN4bEWf-.js +0 -2
- package/dist/web/_app/immutable/nodes/6.BfA9chPb.js +0 -1
- package/dist/web/_app/immutable/nodes/7.DhU0-U33.js +0 -2
- package/dist/web/_app/immutable/nodes/8.wSRycWoC.js +0 -1
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/BaUG0bh_.js","../chunks/DJKRyj_1.js","../chunks/8FUQuwgM.js","../chunks/CbJfRYJV.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{c as Nt,_ as jt}from"../chunks/DJKRyj_1.js";import{a as s,f as rt,q as Qt,o as xt,g as qt,e as an,c as y,j as sn,t as Re,s as ie,r as Ut}from"../chunks/0x0awhVy.js";import{q as ht,w as it,z as $,A as nt,v as mt,br as cn,t as He,bs as Pe,F as B,a7 as Rt,a as ct,D as c,g as e,b as Xt,R as Ce,x as Mt,T as m,aF as J,f as g,u as Ge,bt as De,bp as ln,B as un,$ as dn}from"../chunks/8FUQuwgM.js";import{j as _t,s as bt,g as A,i as Se,e as U,d as Me,S as fn,a as re,w as We}from"../chunks/EDLlAC9C.js";import{h as hn}from"../chunks/C7R6dA2m.js";import{g as Ee}from"../chunks/CIZkRAuY.js";import{e as le,t as Z,c as yt,S as mn,b as gn,i as vn,n as wn,r as Fe}from"../chunks/glgUBDR2.js";import{p as k,i as L,b as Qe,s as kt,r as Ct}from"../chunks/CbJfRYJV.js";import"../chunks/Bl1mtM70.js";const yn=Array(12).fill(0);var _n=rt('<div class="sonner-loading-bar"></div>'),bn=rt('<div><div class="sonner-spinner"></div></div>');function xn(n,t){ht(t,!0);var o=bn(),i=it(o);le(i,23,()=>yn,(r,u)=>`spinner-bar-${u}`,(r,u)=>{var a=_n();s(r,a)}),$(i),$(o),nt(r=>{bt(o,1,r),A(o,"data-visible",t.visible)},[()=>_t(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),s(n,o),mt()}const In=typeof window<"u"?window:void 0;function Tn(n){let t=n.activeElement;for(;t?.shadowRoot;){const o=t.shadowRoot.activeElement;if(o===t)break;t=o}return t}class Sn{#e;#t;constructor(t,o){this.#e=t,this.#t=Qt(o)}get current(){return this.#t(),this.#e()}}const En=/\(.+\)/,An=new Set(["all","print","screen","and","or","not","only"]);class kn extends Sn{constructor(t,o){let i=En.test(t)||t.split(/[\s,]+/).some(u=>An.has(u.trim()))?t:`(${t})`;const r=window.matchMedia(i);super(()=>r.matches,u=>xt(r,"change",u))}}let Bn=class{#e;#t;constructor(t={}){const{window:o=In,document:i=o?.document}=t;o!==void 0&&(this.#e=i,this.#t=Qt(r=>{const u=xt(o,"focusin",r),a=xt(o,"focusout",r);return()=>{u(),a()}}))}get current(){return this.#t?.(),this.#e?Tn(this.#e):null}};new Bn;class Pn{#e;#t;constructor(t){this.#e=t,this.#t=Symbol(t)}get key(){return this.#t}exists(){return cn(this.#t)}get(){const t=He(this.#t);if(t===void 0)throw new Error(`Context "${this.#e}" not found`);return t}getOr(t){const o=He(this.#t);return o===void 0?t:o}set(t){return Pe(this.#t,t)}}const Mn=new Pn("<Toaster/>");function ae(n){return n.label!==void 0}function Cn(){let n=B(Rt(typeof document<"u"?document.hidden:!1));return ct(()=>xt(document,"visibilitychange",()=>{c(n,document.hidden,!0)})),{get current(){return e(n)}}}const Ve=4e3,Dn=14,Ln=45,On=200,zn=.05,Nn={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function Rn(n){const[t,o]=n.split("-"),i=[];return t&&i.push(t),o&&i.push(o),i}function je(n){return 1/(1.5+Math.abs(n)/20)}var Hn=rt("<div><!></div>"),Wn=rt('<button data-close-button=""><!></button>'),Fn=rt('<div data-icon=""><!> <!></div>'),Vn=rt('<div data-description=""><!></div>'),jn=rt('<button data-button="" data-cancel=""> </button>'),qn=rt('<button data-button=""> </button>'),Un=rt('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Kn=rt('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function Yn(n,t){ht(t,!0);const o=h=>{var w=y(),T=g(w);{var M=E=>{var K=Hn(),zt=it(K);U(zt,()=>t.loadingIcon),$(K),nt(Yt=>{bt(K,1,Yt),A(K,"data-visible",e(z)==="loading")},[()=>_t(yt(e(ot)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),s(E,K)},C=E=>{{let K=m(()=>yt(e(ot)?.loader,t.toast.classes?.loader)),zt=m(()=>e(z)==="loading");xn(E,{get class(){return e(K)},get visible(){return e(zt)}})}};L(T,E=>{t.loadingIcon?E(M):E(C,!1)})}s(h,w)};let i=k(t,"cancelButtonStyle",3,""),r=k(t,"actionButtonStyle",3,""),u=k(t,"descriptionClass",3,""),a=k(t,"unstyled",3,!1),_=k(t,"defaultRichColors",3,!1);const v={...Nn};let P=B(!1),O=B(!1),at=B(!1),j=B(!1),st=B(!1),R=B(0),tt=B(0),lt=t.toast.duration||t.duration||Ve,X=B(void 0),q=B(null),Ht=B(null);const de=m(()=>t.index===0),fe=m(()=>t.index+1<=t.visibleToasts),z=m(()=>t.toast.type),et=m(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),Wt=m(()=>t.toast.class||""),Dt=m(()=>t.toast.descriptionClass||""),It=m(()=>Z.heights.findIndex(h=>h.toastId===t.toast.id)||0),Tt=m(()=>t.toast.closeButton??t.closeButton),Lt=m(()=>t.toast.duration??t.duration??Ve);let Bt=null;const pt=m(()=>t.position.split("-")),he=m(()=>Z.heights.reduce((h,w,T)=>T>=e(It)?h:h+w.height,0)),me=Cn(),ge=m(()=>t.toast.invert||t.invert),Kt=m(()=>e(z)==="loading"),ot=m(()=>({...v,...t.classes})),ve=m(()=>t.toast.title),we=m(()=>t.toast.description);let St=B(0),$t=B(0);const Ft=m(()=>Math.round(e(It)*Dn+e(he)));ct(()=>{e(ve),e(we);let h;t.expanded||t.expandByDefault?h=1:h=1-t.index*zn;const w=Xt(()=>e(X));if(w===void 0)return;w.style.setProperty("height","auto");const T=w.offsetHeight,M=w.getBoundingClientRect().height,C=Math.round(M/h+Number.EPSILON&100)/100;w.style.removeProperty("height");let E;Math.abs(C-T)<1?E=C:E=T,c(tt,E,!0),Z.setHeight({toastId:t.toast.id,height:E})});function l(){c(O,!0),c(R,e(Ft),!0),Z.removeHeight(t.toast.id),setTimeout(()=>{Z.remove(t.toast.id)},On)}let H;const gt=m(()=>t.toast.promise&&e(z)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function vt(){c(St,new Date().getTime(),!0),H=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),l()},lt)}function Ot(){if(e($t)<e(St)){const h=new Date().getTime()-e(St);lt=lt-h}c($t,new Date().getTime(),!0)}ct(()=>{t.toast.updated&&(clearTimeout(H),lt=e(Lt),vt())}),ct(()=>(e(gt)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&me.current?Ot():vt()),()=>clearTimeout(H))),Ce(()=>{c(P,!0);const h=e(X)?.getBoundingClientRect().height;return c(tt,h,!0),Z.setHeight({toastId:t.toast.id,height:h}),()=>{Z.removeHeight(t.toast.id)}}),ct(()=>{t.toast.delete&&Xt(()=>{l(),t.toast.onDismiss?.(t.toast)})});const ye=h=>{if(e(Kt))return;c(R,e(Ft),!0);const w=h.target;w.setPointerCapture(h.pointerId),w.tagName!=="BUTTON"&&(c(at,!0),Bt={x:h.clientX,y:h.clientY})},ze=()=>{if(e(j)||!e(et))return;Bt=null;const h=Number(e(X)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),w=Number(e(X)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),T=new Date().getTime()-0,M=e(q)==="x"?h:w,C=Math.abs(M)/T;if(Math.abs(M)>=Ln||C>.11){c(R,e(Ft),!0),t.toast.onDismiss?.(t.toast),e(q)==="x"?c(Ht,h>0?"right":"left",!0):c(Ht,w>0?"down":"up",!0),l(),c(j,!0);return}else e(X)?.style.setProperty("--swipe-amount-x","0px"),e(X)?.style.setProperty("--swipe-amount-y","0px");c(st,!1),c(at,!1),c(q,null)},te=h=>{if(!Bt||!e(et)||(window.getSelection()?.toString().length??-1)>0)return;const T=h.clientY-Bt.y,M=h.clientX-Bt.x,C=t.swipeDirections??Rn(t.position);!e(q)&&(Math.abs(M)>1||Math.abs(T)>1)&&c(q,Math.abs(M)>Math.abs(T)?"x":"y",!0);let E={x:0,y:0};if(e(q)==="y"){if(C.includes("top")||C.includes("bottom"))if(C.includes("top")&&T<0||C.includes("bottom")&&T>0)E.y=T;else{const K=T*je(T);E.y=Math.abs(K)<Math.abs(T)?K:T}}else if(e(q)==="x"&&(C.includes("left")||C.includes("right")))if(C.includes("left")&&M<0||C.includes("right")&&M>0)E.x=M;else{const K=M*je(M);E.x=Math.abs(K)<Math.abs(M)?K:M}(Math.abs(E.x)>0||Math.abs(E.y)>0)&&c(st,!0),e(X)?.style.setProperty("--swipe-amount-x",`${E.x}px`),e(X)?.style.setProperty("--swipe-amount-y",`${E.y}px`)},wt=()=>{c(at,!1),c(q,null),Bt=null},Et=m(()=>t.toast.icon?t.toast.icon:e(z)==="success"?t.successIcon:e(z)==="error"?t.errorIcon:e(z)==="warning"?t.warningIcon:e(z)==="info"?t.infoIcon:e(z)==="loading"?t.loadingIcon:null);var f=Kn();A(f,"tabindex",0);let Vt;var ee=it(f);{var Ne=h=>{var w=Wn(),T=it(w);U(T,()=>t.closeIcon??J),$(w),nt(M=>{A(w,"aria-label",t.closeButtonAriaLabel),A(w,"data-disabled",e(Kt)),bt(w,1,M)},[()=>_t(yt(e(ot)?.closeButton,t.toast?.classes?.closeButton))]),qt("click",w,()=>{e(Kt)||!e(et)||(l(),t.toast.onDismiss?.(t.toast))}),s(h,w)};L(ee,h=>{e(Tt)&&!t.toast.component&&e(z)!=="loading"&&t.closeIcon!==null&&h(Ne)})}var _e=Mt(ee,2);{var be=h=>{const w=m(()=>t.toast.component);var T=y(),M=g(T);Nt(M,()=>e(w),(C,E)=>{E(C,kt(()=>t.toast.componentProps,{closeToast:l}))}),s(h,T)},xe=h=>{var w=Un(),T=g(w);{var M=x=>{var S=Fn(),d=it(S);{var D=b=>{var I=y(),p=g(I);{var W=Pt=>{var oe=y(),Te=g(oe);Nt(Te,()=>t.toast.icon,(Y,Q)=>{Q(Y,{})}),s(Pt,oe)},ft=Pt=>{o(Pt)};L(p,Pt=>{t.toast.icon?Pt(W):Pt(ft,!1)})}s(b,I)};L(d,b=>{(t.toast.promise||e(z)==="loading")&&b(D)})}var V=Mt(d,2);{var N=b=>{var I=y(),p=g(I);{var W=Y=>{var Q=y(),At=g(Q);Nt(At,()=>t.toast.icon,(on,rn)=>{rn(on,{})}),s(Y,Q)},ft=Y=>{var Q=y(),At=g(Q);U(At,()=>t.successIcon??J),s(Y,Q)},Pt=Y=>{var Q=y(),At=g(Q);U(At,()=>t.errorIcon??J),s(Y,Q)},oe=Y=>{var Q=y(),At=g(Q);U(At,()=>t.warningIcon??J),s(Y,Q)},Te=Y=>{var Q=y(),At=g(Q);U(At,()=>t.infoIcon??J),s(Y,Q)};L(p,Y=>{t.toast.icon?Y(W):e(z)==="success"?Y(ft,1):e(z)==="error"?Y(Pt,2):e(z)==="warning"?Y(oe,3):e(z)==="info"&&Y(Te,4)})}s(b,I)};L(V,b=>{t.toast.type!=="loading"&&b(N)})}$(S),nt(b=>bt(S,1,b),[()=>_t(yt(e(ot)?.icon,t.toast?.classes?.icon))]),s(x,S)};L(T,x=>{(e(z)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(Et)!==null||t.toast.icon)&&x(M)})}var C=Mt(T,2),E=it(C),K=it(E);{var zt=x=>{var S=y(),d=g(S);{var D=N=>{const b=m(()=>t.toast.title);var I=y(),p=g(I);Nt(p,()=>e(b),(W,ft)=>{ft(W,kt(()=>t.toast.componentProps))}),s(N,I)},V=N=>{var b=Re();nt(()=>ie(b,t.toast.title)),s(N,b)};L(d,N=>{typeof t.toast.title!="string"?N(D):N(V,!1)})}s(x,S)};L(K,x=>{t.toast.title&&x(zt)})}$(E);var Yt=Mt(E,2);{var Ie=x=>{var S=Vn(),d=it(S);{var D=N=>{const b=m(()=>t.toast.description);var I=y(),p=g(I);Nt(p,()=>e(b),(W,ft)=>{ft(W,kt(()=>t.toast.componentProps))}),s(N,I)},V=N=>{var b=Re();nt(()=>ie(b,t.toast.description)),s(N,b)};L(d,N=>{typeof t.toast.description!="string"?N(D):N(V,!1)})}$(S),nt(N=>bt(S,1,N),[()=>_t(yt(u(),e(Dt),e(ot)?.description,t.toast.classes?.description))]),s(x,S)};L(Yt,x=>{t.toast.description&&x(Ie)})}$(C);var ne=Mt(C,2);{var ut=x=>{var S=y(),d=g(S);{var D=b=>{var I=y(),p=g(I);Nt(p,()=>t.toast.cancel,(W,ft)=>{ft(W,{})}),s(b,I)},V=b=>{var I=jn(),p=it(I,!0);$(I),nt(W=>{Se(I,t.toast.cancelButtonStyle??i()),bt(I,1,W),ie(p,t.toast.cancel.label)},[()=>_t(yt(e(ot)?.cancelButton,t.toast?.classes?.cancelButton))]),qt("click",I,W=>{ae(t.toast.cancel)&&e(et)&&(t.toast.cancel?.onClick?.(W),l())}),s(b,I)},N=m(()=>ae(t.toast.cancel));L(d,b=>{typeof t.toast.cancel=="function"?b(D):e(N)&&b(V,1)})}s(x,S)};L(ne,x=>{t.toast.cancel&&x(ut)})}var G=Mt(ne,2);{var dt=x=>{var S=y(),d=g(S);{var D=b=>{var I=y(),p=g(I);Nt(p,()=>t.toast.action,(W,ft)=>{ft(W,{})}),s(b,I)},V=b=>{var I=qn(),p=it(I,!0);$(I),nt(W=>{Se(I,t.toast.actionButtonStyle??r()),bt(I,1,W),ie(p,t.toast.action.label)},[()=>_t(yt(e(ot)?.actionButton,t.toast?.classes?.actionButton))]),qt("click",I,W=>{ae(t.toast.action)&&(t.toast.action?.onClick(W),!W.defaultPrevented&&l())}),s(b,I)},N=m(()=>ae(t.toast.action));L(d,b=>{typeof t.toast.action=="function"?b(D):e(N)&&b(V,1)})}s(x,S)};L(G,x=>{t.toast.action&&x(dt)})}nt((x,S)=>{bt(C,1,x),bt(E,1,S)},[()=>_t(yt(e(ot)?.content,t.toast?.classes?.content)),()=>_t(yt(e(ot)?.title,t.toast?.classes?.title))]),s(h,w)};L(_e,h=>{t.toast.component?h(be):h(xe,!1)})}$(f),Qe(f,h=>c(X,h),()=>e(X)),nt((h,w,T)=>{bt(f,1,h),A(f,"aria-live",t.toast.important?"assertive":"polite"),A(f,"data-rich-colors",t.toast.richColors??_()),A(f,"data-styled",!(t.toast.component||t.toast.unstyled||a())),A(f,"data-mounted",e(P)),A(f,"data-promise",w),A(f,"data-swiped",e(st)),A(f,"data-removed",e(O)),A(f,"data-visible",e(fe)),A(f,"data-y-position",e(pt)[0]),A(f,"data-x-position",e(pt)[1]),A(f,"data-index",t.index),A(f,"data-front",e(de)),A(f,"data-swiping",e(at)),A(f,"data-dismissible",e(et)),A(f,"data-type",e(z)),A(f,"data-invert",e(ge)),A(f,"data-swipe-out",e(j)),A(f,"data-swipe-direction",e(Ht)),A(f,"data-expanded",T),Vt=Se(f,`${t.style} ${t.toast.style}`,Vt,{"--index":t.index,"--toasts-before":t.index,"--z-index":Z.toasts.length-t.index,"--offset":`${e(O)?e(R):e(Ft)}px`,"--initial-height":t.expandByDefault?"auto":`${e(tt)}px`})},[()=>_t(yt(t.class,e(Wt),e(ot)?.toast,t.toast?.classes?.toast,e(ot)?.[e(z)],t.toast?.classes?.[e(z)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(P))]),qt("pointermove",f,te),qt("pointerup",f,ze),qt("pointerdown",f,ye),an("dragend",f,wt),s(n,f),mt()}sn(["pointermove","pointerup","pointerdown","click"]);var Zn=Ut('<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 Xn(n){var t=Zn();s(n,t)}var Gn=Ut('<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 Qn(n){var t=Gn();s(n,t)}var Jn=Ut('<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 pn(n){var t=Jn();s(n,t)}var $n=Ut('<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 to(n){var t=$n();s(n,t)}var eo=Ut('<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 no(n){var t=eo();s(n,t)}const oo=3,Je="24px",pe="16px",io=4e3,ro=356,ao=14,Ae="dark",se="light";function so(n,t){const o={};return[n,t].forEach((i,r)=>{const u=r===1,a=u?"--mobile-offset":"--offset",_=u?pe:Je;function v(P){["top","right","bottom","left"].forEach(O=>{o[`${a}-${O}`]=typeof P=="number"?`${P}px`:P})}typeof i=="number"||typeof i=="string"?v(i):typeof i=="object"?["top","right","bottom","left"].forEach(P=>{const O=i[P];O===void 0?o[`${a}-${P}`]=_:o[`${a}-${P}`]=typeof O=="number"?`${O}px`:O}):v(_)}),o}var co=rt("<ol></ol>"),lo=rt('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function uo(n,t){ht(t,!0);function o(l){return l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ae:se}let i=k(t,"invert",3,!1),r=k(t,"position",3,"bottom-right"),u=k(t,"hotkey",19,()=>["altKey","KeyT"]),a=k(t,"expand",3,!1),_=k(t,"closeButton",3,!1),v=k(t,"offset",3,Je),P=k(t,"mobileOffset",3,pe),O=k(t,"theme",3,"light"),at=k(t,"richColors",3,!1),j=k(t,"duration",3,io),st=k(t,"visibleToasts",3,oo),R=k(t,"toastOptions",19,()=>({})),tt=k(t,"dir",7,"auto"),lt=k(t,"gap",3,ao),X=k(t,"pauseWhenPageIsHidden",3,!1),q=k(t,"containerAriaLabel",3,"Notifications"),Ht=k(t,"closeButtonAriaLabel",3,"Close toast"),de=Ct(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 fe(){if(tt()!=="auto")return tt();if(typeof window>"u"||typeof document>"u")return"ltr";const l=document.documentElement.getAttribute("dir");return l==="auto"||!l?(Xt(()=>tt(window.getComputedStyle(document.documentElement).direction??"ltr")),tt()):(Xt(()=>tt(l)),l)}const z=m(()=>Array.from(new Set([r(),...Z.toasts.filter(l=>l.position).map(l=>l.position)].filter(Boolean))));let et=B(!1),Wt=B(!1),Dt=B(Rt(o(O()))),It=B(void 0),Tt=B(null),Lt=B(!1);const Bt=m(()=>u().join("+").replace(/Key/g,"").replace(/Digit/g,""));ct(()=>{Z.toasts.length<=1&&c(et,!1)}),ct(()=>{const l=Z.toasts.filter(H=>H.dismiss&&!H.delete);if(l.length>0){const H=Z.toasts.map(gt=>l.find(Ot=>Ot.id===gt.id)?{...gt,delete:!0}:gt);Z.toasts=H}}),ct(()=>()=>{e(It)&&e(Tt)&&(e(Tt).focus({preventScroll:!0}),c(Tt,null),c(Lt,!1))}),Ce(()=>(Z.reset(),xt(document,"keydown",H=>{u().every(vt=>H[vt]||H.code===vt)&&(c(et,!0),e(It)?.focus()),H.code==="Escape"&&(document.activeElement===e(It)||e(It)?.contains(document.activeElement))&&c(et,!1)}))),ct(()=>{if(O()!=="system"&&c(Dt,O()),typeof window<"u"){O()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?c(Dt,Ae):c(Dt,se));const l=window.matchMedia("(prefers-color-scheme: dark)"),H=({matches:gt})=>{O()==="system"&&c(Dt,gt?Ae:se,!0)};"addEventListener"in l?l.addEventListener("change",H):l.addListener(H)}});const pt=l=>{t.onblur?.(l),e(Lt)&&!l.currentTarget.contains(l.relatedTarget)&&(c(Lt,!1),e(Tt)&&(e(Tt).focus({preventScroll:!0}),c(Tt,null)))},he=l=>{t.onfocus?.(l),!(l.target instanceof HTMLElement&&l.target.dataset.dismissible==="false")&&(e(Lt)||(c(Lt,!0),c(Tt,l.relatedTarget,!0)))},me=l=>{t.onpointerdown?.(l),!(l.target instanceof HTMLElement&&l.target.dataset.dismissible==="false")&&c(Wt,!0)},ge=l=>{t.onmouseenter?.(l),c(et,!0)},Kt=l=>{t.onmouseleave?.(l),e(Wt)||c(et,!1)},ot=l=>{t.onmousemove?.(l),c(et,!0)},ve=l=>{t.ondragend?.(l),c(et,!1)},we=l=>{t.onpointerup?.(l),c(Wt,!1)};Mn.set(new mn);var St=lo();A(St,"tabindex",-1);var $t=it(St);{var Ft=l=>{var H=y(),gt=g(H);le(gt,18,()=>e(z),vt=>vt,(vt,Ot,ye,ze)=>{const te=m(()=>{const[f,Vt]=Ot.split("-");return{y:f,x:Vt}}),wt=m(()=>so(v(),P()));var Et=co();Me(Et,f=>({tabindex:-1,dir:f,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(Dt),"data-y-position":e(te).y,"data-x-position":e(te).x,style:t.style,onblur:pt,onfocus:he,onmouseenter:ge,onmousemove:ot,onmouseleave:Kt,ondragend:ve,onpointerdown:me,onpointerup:we,...de,[fn]:{"--front-toast-height":`${Z.heights[0]?.height}px`,"--width":`${ro}px`,"--gap":`${lt()}px`,"--offset-top":e(wt)["--offset-top"],"--offset-right":e(wt)["--offset-right"],"--offset-bottom":e(wt)["--offset-bottom"],"--offset-left":e(wt)["--offset-left"],"--mobile-offset-top":e(wt)["--mobile-offset-top"],"--mobile-offset-right":e(wt)["--mobile-offset-right"],"--mobile-offset-bottom":e(wt)["--mobile-offset-bottom"],"--mobile-offset-left":e(wt)["--mobile-offset-left"]}}),[fe],void 0,void 0,"svelte-nbs0zk"),le(Et,23,()=>Z.toasts.filter(f=>!f.position&&e(ye)===0||f.position===Ot),f=>f.id,(f,Vt,ee,Ne)=>{{const _e=ut=>{var G=y(),dt=g(G);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.successIcon??J),s(d,D)},S=d=>{Xn(d)};L(dt,d=>{t.successIcon?d(x):t.successIcon!==null&&d(S,1)})}s(ut,G)},be=ut=>{var G=y(),dt=g(G);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.errorIcon??J),s(d,D)},S=d=>{Qn(d)};L(dt,d=>{t.errorIcon?d(x):t.errorIcon!==null&&d(S,1)})}s(ut,G)},xe=ut=>{var G=y(),dt=g(G);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.warningIcon??J),s(d,D)},S=d=>{pn(d)};L(dt,d=>{t.warningIcon?d(x):t.warningIcon!==null&&d(S,1)})}s(ut,G)},h=ut=>{var G=y(),dt=g(G);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.infoIcon??J),s(d,D)},S=d=>{to(d)};L(dt,d=>{t.infoIcon?d(x):t.infoIcon!==null&&d(S,1)})}s(ut,G)},w=ut=>{var G=y(),dt=g(G);{var x=d=>{var D=y(),V=g(D);U(V,()=>t.closeIcon??J),s(d,D)},S=d=>{no(d)};L(dt,d=>{t.closeIcon?d(x):t.closeIcon!==null&&d(S,1)})}s(ut,G)};let T=m(()=>R()?.duration??j()),M=m(()=>R()?.class??""),C=m(()=>R()?.descriptionClass||""),E=m(()=>R()?.style??""),K=m(()=>R().classes||{}),zt=m(()=>R().unstyled??!1),Yt=m(()=>R()?.cancelButtonStyle??""),Ie=m(()=>R()?.actionButtonStyle??""),ne=m(()=>R()?.closeButtonAriaLabel??Ht());Yn(f,{get index(){return e(ee)},get toast(){return e(Vt)},get defaultRichColors(){return at()},get duration(){return e(T)},get class(){return e(M)},get descriptionClass(){return e(C)},get invert(){return i()},get visibleToasts(){return st()},get closeButton(){return _()},get interacting(){return e(Wt)},get position(){return Ot},get style(){return e(E)},get classes(){return e(K)},get unstyled(){return e(zt)},get cancelButtonStyle(){return e(Yt)},get actionButtonStyle(){return e(Ie)},get closeButtonAriaLabel(){return e(ne)},get expandByDefault(){return a()},get expanded(){return e(et)},get pauseWhenPageIsHidden(){return X()},get loadingIcon(){return t.loadingIcon},successIcon:_e,errorIcon:be,warningIcon:xe,infoIcon:h,closeIcon:w,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),$(Et),Qe(Et,f=>c(It,f),()=>e(It)),nt(()=>Et.dir=Et.dir),s(vt,Et)}),s(l,H)};L($t,l=>{Z.toasts.length>0&&l(Ft)})}$(St),nt(()=>A(St,"aria-label",`${q()??""} ${e(Bt)??""}`)),s(n,St),mt()}const $e=typeof window<"u"?window:void 0;function fo(n){let t=n.activeElement;for(;t?.shadowRoot;){const o=t.shadowRoot.activeElement;if(o===t)break;t=o}return t}let ho=class{#e;#t;constructor(t={}){const{window:o=$e,document:i=o?.document}=t;o!==void 0&&(this.#e=i,this.#t=Qt(r=>{const u=xt(o,"focusin",r),a=xt(o,"focusout",r);return()=>{u(),a()}}))}get current(){return this.#t?.(),this.#e?fo(this.#e):null}};new ho;function mo(n,t){switch(n){case"post":ct(t);break;case"pre":Ge(t);break}}function tn(n,t,o,i={}){const{lazy:r=!1}=i;let u=!r,a=Array.isArray(n)?[]:void 0;mo(t,()=>{const _=Array.isArray(n)?n.map(P=>P()):n();if(!u){u=!0,a=_;return}const v=Xt(()=>o(_,a));return a=_,v})}function Le(n,t,o){tn(n,"post",t,o)}function go(n,t,o){tn(n,"pre",t,o)}Le.pre=go;function vo(n,t){switch(n){case"local":return t.localStorage;case"session":return t.sessionStorage}}class en{#e;#t;#o;#n;#r;#i=B(0);constructor(t,o,i={}){const{storage:r="local",serializer:u={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs:a=!0,window:_=$e}=i;if(this.#e=o,this.#t=t,this.#o=u,_===void 0)return;const v=vo(r,_);this.#n=v;const P=v.getItem(t);P!==null?this.#e=this.#a(P):this.#s(o),a&&r==="local"&&(this.#r=Qt(()=>xt(_,"storage",this.#c)))}get current(){this.#r?.(),e(this.#i);const t=this.#a(this.#n?.getItem(this.#t))??this.#e,o=new WeakMap,i=r=>{if(r===null||r?.constructor.name==="Date"||typeof r!="object")return r;let u=o.get(r);return u||(u=new Proxy(r,{get:(a,_)=>(e(this.#i),i(Reflect.get(a,_))),set:(a,_,v)=>(c(this.#i,e(this.#i)+1),Reflect.set(a,_,v),this.#s(t),!0)}),o.set(r,u)),u};return i(t)}set current(t){this.#s(t),c(this.#i,e(this.#i)+1)}#c=t=>{t.key!==this.#t||t.newValue===null||(this.#e=this.#a(t.newValue),c(this.#i,e(this.#i)+1))};#a(t){try{return this.#o.deserialize(t)}catch(o){console.error(`Error when parsing "${t}" from persisted store "${this.#t}"`,o);return}}#s(t){try{t!=null&&this.#n?.setItem(this.#t,this.#o.serialize(t))}catch(o){console.error(`Error when writing value from persisted store "${this.#t}" to ${this.#n}`,o)}}}function qe(n){return n.filter(t=>t.length>0)}const nn={getItem:n=>null,setItem:(n,t)=>{}},ue=typeof document<"u";function wo(n){return typeof n=="function"}function yo(n){return n!==null&&typeof n=="object"}const Gt=Symbol("box"),Oe=Symbol("is-writable");function _o(n){return yo(n)&&Gt in n}function bo(n){return F.isBox(n)&&Oe in n}function F(n){let t=B(Rt(n));return{[Gt]:!0,[Oe]:!0,get current(){return e(t)},set current(o){c(t,o,!0)}}}function xo(n,t){const o=m(n);return t?{[Gt]:!0,[Oe]:!0,get current(){return e(o)},set current(i){t(i)}}:{[Gt]:!0,get current(){return n()}}}function Io(n){return F.isBox(n)?n:wo(n)?F.with(n):F(n)}function To(n){return Object.entries(n).reduce((t,[o,i])=>F.isBox(i)?(F.isWritableBox(i)?Object.defineProperty(t,o,{get(){return i.current},set(r){i.current=r}}):Object.defineProperty(t,o,{get(){return i.current}}),t):Object.assign(t,{[o]:i}),{})}function So(n){return F.isWritableBox(n)?{[Gt]:!0,get current(){return n.current}}:n}F.from=Io;F.with=xo;F.flatten=To;F.readonly=So;F.isBox=_o;F.isWritableBox=bo;function Eo(n,t){const o=RegExp(n,"g");return i=>{if(typeof i!="string")throw new TypeError(`expected an argument of type string, but got ${typeof i}`);return i.match(o)?i.replace(o,t):i}}const Ao=Eo(/[A-Z]/,n=>`-${n.toLowerCase()}`);function ko(n){if(!n||typeof n!="object"||Array.isArray(n))throw new TypeError(`expected an argument of type object, but got ${typeof n}`);return Object.keys(n).map(t=>`${Ao(t)}: ${n[t]};`).join(`
|
|
3
|
-
`)}function Bo(n={}){return ko(n).replace(`
|
|
4
|
-
`," ")}const Po={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%)"};Bo(Po);const Mo=typeof window<"u"?window:void 0;function Co(n){let t=n.activeElement;for(;t?.shadowRoot;){const o=t.shadowRoot.activeElement;if(o===t)break;t=o}return t}class Do{#e;#t;constructor(t={}){const{window:o=Mo,document:i=o?.document}=t;o!==void 0&&(this.#e=i,this.#t=Qt(r=>{const u=xt(o,"focusin",r),a=xt(o,"focusout",r);return()=>{u(),a()}}))}get current(){return this.#t?.(),this.#e?Co(this.#e):null}}new Do;const ke=F("mode-watcher-mode"),Be=F("mode-watcher-theme"),Lo=["dark","light","system"];function Ue(n){return typeof n!="string"?!1:Lo.includes(n)}class Oo{#e="system";#t=ue?localStorage:nn;#o=this.#t.getItem(ke.current);#n=Ue(this.#o)?this.#o:this.#e;#r=B(Rt(this.#i()));#i(t=this.#n){return new en(ke.current,t,{serializer:{serialize:o=>o,deserialize:o=>Ue(o)?o:this.#e}})}constructor(){De(()=>Le.pre(()=>ke.current,(t,o)=>{const i=e(this.#r).current;c(this.#r,this.#i(i),!0),o&&localStorage.removeItem(o)}))}get current(){return e(this.#r).current}set current(t){e(this.#r).current=t}}class zo{#e=void 0;#t=!0;#o=B(Rt(this.#e));#n=typeof window<"u"&&typeof window.matchMedia=="function"?new kn("prefers-color-scheme: light"):{current:!1};query(){ue&&c(this.#o,this.#n.current?"light":"dark",!0)}tracking(t){this.#t=t}constructor(){De(()=>{Ge(()=>{this.#t&&this.query()})}),this.query=this.query.bind(this),this.tracking=this.tracking.bind(this)}get current(){return e(this.#o)}}const Ke=new Oo,No=new zo;class Ro{#e=ue?localStorage:nn;#t=this.#e.getItem(Be.current);#o=this.#t===null||this.#t===void 0?"":this.#t;#n=B(Rt(this.#r()));#r(t=this.#o){return new en(Be.current,t,{serializer:{serialize:o=>typeof o!="string"?"":o,deserialize:o=>o}})}constructor(){De(()=>Le.pre(()=>Be.current,(t,o)=>{const i=e(this.#n).current;c(this.#n,this.#r(i),!0),o&&localStorage.removeItem(o)}))}get current(){return e(this.#n).current}set current(t){e(this.#n).current=t}}new Ro;let Ye,Ze,Xe=!1,Zt=null;function Ho(){return Zt||(Zt=document.createElement("style"),Zt.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
|
-
}`)),Zt)}function Wo(n,t=!1){if(typeof document>"u")return;if(!Xe){Xe=!0,n();return}if(typeof window<"u"&&window.__vitest_worker__){n();return}clearTimeout(Ye),clearTimeout(Ze);const i=Ho(),r=()=>document.head.appendChild(i),u=()=>{i.parentNode&&document.head.removeChild(i)};function a(){n(),window.requestAnimationFrame(u)}if(typeof window.requestAnimationFrame<"u"){r(),t?a():window.requestAnimationFrame(()=>{a()});return}r(),Ye=window.setTimeout(()=>{n(),Ze=window.setTimeout(u,16)},16)}const ce=F(void 0),Fo=F(!0),Vo=F(!1),jo=F([]),qo=F([]);function Uo(){const n=m(()=>{if(!ue)return;const t=Ke.current==="system"?No.current:Ke.current,o=qe(jo.current),i=qe(qo.current);function r(){const u=document.documentElement,a=document.querySelector('meta[name="theme-color"]');t==="light"?(o.length&&u.classList.remove(...o),i.length&&u.classList.add(...i),u.style.colorScheme="light",a&&ce.current&&a.setAttribute("content",ce.current.light)):(i.length&&u.classList.remove(...i),o.length&&u.classList.add(...o),u.style.colorScheme="dark",a&&ce.current&&a.setAttribute("content",ce.current.dark))}return Fo.current?Wo(r,Vo.current):r(),t});return{get current(){return e(n)}}}const Ko=Uo();const Yo={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const Zo=n=>{for(const t in n)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var Xo=Ut("<svg><!><!></svg>");function Jt(n,t){ht(t,!0);const o=k(t,"color",3,"currentColor"),i=k(t,"size",3,24),r=k(t,"strokeWidth",3,2),u=k(t,"absoluteStrokeWidth",3,!1),a=k(t,"iconNode",19,()=>[]),_=Ct(t,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var v=Xo();Me(v,(at,j)=>({...Yo,...at,..._,width:i(),height:i(),stroke:o(),"stroke-width":j,class:["lucide-icon lucide",t.name&&`lucide-${t.name}`,t.class]}),[()=>!t.children&&!Zo(_)&&{"aria-hidden":"true"},()=>u()?Number(r())*24/Number(i()):r()]);var P=it(v);le(P,17,a,vn,(at,j)=>{var st=m(()=>ln(e(j),2));let R=()=>e(st)[0],tt=()=>e(st)[1];var lt=y(),X=g(lt);gn(X,R,!0,(q,Ht)=>{Me(q,()=>({...tt()}))}),s(at,lt)});var O=Mt(P);U(O,()=>t.children??J),$(v),s(n,v),mt()}function Go(n,t){ht(t,!0);let o=Ct(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];Jt(n,kt({name:"loader-circle"},()=>o,{get iconNode(){return i},children:(r,u)=>{var a=y(),_=g(a);U(_,()=>t.children??J),s(r,a)},$$slots:{default:!0}})),mt()}function Qo(n,t){ht(t,!0);let o=Ct(t,["$$slots","$$events","$$legacy"]);const i=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]];Jt(n,kt({name:"circle-check"},()=>o,{get iconNode(){return i},children:(r,u)=>{var a=y(),_=g(a);U(_,()=>t.children??J),s(r,a)},$$slots:{default:!0}})),mt()}function Jo(n,t){ht(t,!0);let o=Ct(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m15 9-6 6"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z"}],["path",{d:"m9 9 6 6"}]];Jt(n,kt({name:"octagon-x"},()=>o,{get iconNode(){return i},children:(r,u)=>{var a=y(),_=g(a);U(_,()=>t.children??J),s(r,a)},$$slots:{default:!0}})),mt()}function po(n,t){ht(t,!0);let o=Ct(t,["$$slots","$$events","$$legacy"]);const i=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];Jt(n,kt({name:"info"},()=>o,{get iconNode(){return i},children:(r,u)=>{var a=y(),_=g(a);U(_,()=>t.children??J),s(r,a)},$$slots:{default:!0}})),mt()}function $o(n,t){ht(t,!0);let o=Ct(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];Jt(n,kt({name:"triangle-alert"},()=>o,{get iconNode(){return i},children:(r,u)=>{var a=y(),_=g(a);U(_,()=>t.children??J),s(r,a)},$$slots:{default:!0}})),mt()}function ti(n,t){ht(t,!0);let o=Ct(t,["$$slots","$$events","$$legacy"]);uo(n,kt({get theme(){return Ko.current},class:"toaster group",style:"--normal-bg: var(--color-bg-elevated); --normal-text: var(--color-text-primary); --normal-border: var(--color-border-strong);"},()=>o,{loadingIcon:v=>{Go(v,{class:"size-4 animate-spin"})},successIcon:v=>{Qo(v,{class:"size-4"})},errorIcon:v=>{Jo(v,{class:"size-4"})},infoIcon:v=>{po(v,{class:"size-4"})},warningIcon:v=>{$o(v,{class:"size-4"})},$$slots:{loadingIcon:!0,successIcon:!0,errorIcon:!0,infoIcon:!0,warningIcon:!0}})),mt()}var ei=rt('<div style="display: contents;"><!> <!></div>');function hi(n,t){ht(t,!0);const o=typeof localStorage<"u"?localStorage.getItem("theme"):null;let i=B(Rt(o==="light"?"light":"dark"));Pe("theme",{get current(){return e(i)},toggle(){c(i,e(i)==="dark"?"light":"dark",!0),localStorage.setItem("theme",e(i))}});const u=typeof localStorage<"u"?localStorage.getItem("chatOpen"):null;let a=B(u==="true");Pe("chat",{get open(){return e(a)},toggle(){c(a,!e(a)),localStorage.setItem("chatOpen",String(e(a)))},close(){c(a,!1),localStorage.setItem("chatOpen","false")}}),ct(()=>{document.documentElement.setAttribute("data-theme",e(i))});let v=B(null);ct(()=>{if(re.loading)return;const j=re.user?.email??(re.authEnabled?null:"__open__");j&&j!==e(v)&&(e(v)!==null&&wn.deselect(),c(v,j,!0),We.load(),Fe.connect()),!j&&e(v)&&(c(v,null),Fe.disconnect())}),Ce(async()=>{const j=window.location.pathname,st=j==="/login",R=j==="/setup",{authenticated:tt,authEnabled:lt,needsSetup:X}=await re.checkAuth();if(X&&!R){Ee("/setup");return}if(lt&&!tt&&!st){Ee("/login");return}if(tt&&(st||R)){Ee("/");return}st||R||(jt(()=>import("../chunks/BaUG0bh_.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url).catch(()=>{}),Promise.all([jt(()=>import("../chunks/CX_61fY8.js"),[],import.meta.url),jt(()=>import("../chunks/DnL9f0lc.js").then(q=>q.i),__vite__mapDeps([5,6]),import.meta.url),jt(()=>import("../chunks/CscoF-YL.js"),__vite__mapDeps([7,6,5,8,9,10]),import.meta.url),jt(()=>import("../chunks/D7ZqAKi9.js"),__vite__mapDeps([8,9,6,5]),import.meta.url),jt(()=>import("../chunks/C7VoTosa.js").then(q=>q.i),[],import.meta.url)]).catch(()=>{}),window.addEventListener("sg-theme-change",q=>{c(i,q.detail,!0)}))});var P=ei();hn("12qhfyh",j=>{un(()=>{dn.title=(We.name||"Studiograph")??""})});var O=it(P);U(O,()=>t.children);var at=Mt(O,2);ti(at,{}),$(P),nt(()=>A(P,"data-theme",e(i))),s(n,P),mt()}export{hi as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as u,f as h,s as a}from"../chunks/0x0awhVy.js";import"../chunks/Bl1mtM70.js";import{q as g,f as v,A as l,v as d,w as e,z as o,x}from"../chunks/8FUQuwgM.js";import{i as _}from"../chunks/DxxhVGi2.js";import{s as $,p}from"../chunks/CIZkRAuY.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const m=k;var b=h("<h1> </h1> <p> </p>",1);function j(i,f){g(f,!1),_();var t=b(),r=v(t),n=e(r,!0);o(r);var s=x(r,2),c=e(s,!0);o(s),l(()=>{a(n,m.status),a(c,m.error?.message)}),u(i,t),d()}export{j as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n,s as $,f as d}from"../chunks/0x0awhVy.js";import"../chunks/Bl1mtM70.js";import{q as b,t as C,v as A,w as t,x as l,y as S,z as e,A as V}from"../chunks/8FUQuwgM.js";import{i as m}from"../chunks/CbJfRYJV.js";import{i as k}from"../chunks/DxxhVGi2.js";import{A as P}from"../chunks/Scb_NG-a.js";import{V as q,C as z}from"../chunks/DKIqe64p.js";import{w as p}from"../chunks/EDLlAC9C.js";import{n as E}from"../chunks/glgUBDR2.js";var L=d('<h2 class="svelte-1uha8ag"> </h2>'),T=d('<div class="content-row svelte-1uha8ag"><div class="entity-area svelte-1uha8ag"><!> <div class="welcome svelte-1uha8ag"><!> <p class="svelte-1uha8ag">Select an entity from the sidebar to get started.</p></div></div> <!></div>');function M(c,f){b(f,!1);const h=C("chat");E.showEntity(),k(),P(c,{children:(g,W)=>{var o=T(),s=t(o),i=t(s);q(i,{activeView:"entity"});var v=l(i,2),_=t(v);{var u=a=>{var r=L(),y=t(r);e(r),V(()=>$(y,`Welcome to ${(p.name||"Studiograph")??""}`)),n(a,r)};m(_,a=>{p.nameLoaded&&a(u)})}S(2),e(v),e(s);var w=l(s,2);{var x=a=>{z(a,{})};m(w,a=>{h.open&&a(x)})}e(o),n(g,o)},$$slots:{default:!0}}),A()}export{M as component};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/DnL9f0lc.js","../chunks/CX_61fY8.js","../chunks/CscoF-YL.js","../chunks/D7ZqAKi9.js","../chunks/C7VoTosa.js","../chunks/CrdV0ttd.js","../chunks/CWQRQXxy.js","../chunks/DKQjBKyp.js","../chunks/CnKc_Tae.js","../chunks/CLFba8FK.js","../chunks/glgUBDR2.js","../chunks/8FUQuwgM.js","../chunks/0x0awhVy.js","../chunks/CbJfRYJV.js","../chunks/CIZkRAuY.js","../chunks/EDLlAC9C.js","../chunks/i9c_RUF6.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{f as ra,r as lt,s as tt,w as yt,h as At,i as Be,g as sa,a as Lt,j as ia}from"../chunks/EDLlAC9C.js";import{c as Ne,_ as qe}from"../chunks/DJKRyj_1.js";import{j as Dt,g as Ue,e as Je,a as y,c as Le,t as Ye,s as me,f as N}from"../chunks/0x0awhVy.js";import{M as oa,b as qt,q as at,F as Ae,a7 as Qe,a as Ge,S as la,w as C,x as Y,z as m,g as e,D as E,v as nt,f as we,y as Ve,A as ye,T as De,bn as Vt,aj as ot,t as Wt,R as ca,bo as Ht}from"../chunks/8FUQuwgM.js";import{p as ct,i as Se,b as kt,l as Ze,s as Xe}from"../chunks/CbJfRYJV.js";import{e as Me,i as Ke,a as je,n as Pt,r as ua}from"../chunks/glgUBDR2.js";import{g as Rt,i as da}from"../chunks/CIZkRAuY.js";import{I as $e,s as et,b as fa,P as va,C as ha,c as zt,S as pa,T as _a,R as ga,d as ma,e as wt,X as Ft,p as Mt,A as ya,f as wa,g as ka,h as ba,i as xa,j as Ea,k as Ca,l as Sa,m as Pa,r as Aa}from"../chunks/Scb_NG-a.js";import{c as Ra,V as Da,C as Ta}from"../chunks/DKIqe64p.js";import{b as Bt,B as Ie}from"../chunks/BVmVTxxa.js";import"../chunks/Bl1mtM70.js";import{C as Oa}from"../chunks/DVuLyxG5.js";import{g as La}from"../chunks/CqkleIqs.js";function za(W,t,f){oa(()=>{var i=qt(()=>t(W,f?.())||{});if(i?.destroy)return()=>i.destroy()})}const Fa=async({params:W,fetch:t})=>{const{repo:f,type:i,id:u}=W,D=await ra(f,i,u);return{repo:f,type:i,id:u,entity:D}},mr=Object.freeze(Object.defineProperty({__proto__:null,load:Fa},Symbol.toStringTag,{value:"Module"}));var Ma=N('<span class="chip svelte-84vb17"> <!></span>'),Ia=N('<div><span class="entity-title svelte-84vb17"> </span> <span class="entity-meta svelte-84vb17"><span class="entity-type-badge svelte-84vb17"> </span> <span class="entity-repo svelte-84vb17"> </span></span></div>'),ja=N('<div class="dropdown svelte-84vb17"></div>'),Na=N('<div class="autocomplete svelte-84vb17"><div class="input-row svelte-84vb17"><!> <input class="ac-input svelte-84vb17" type="text" placeholder="Search entities..."/></div> <!></div>');function Ua(W,t){at(t,!0);let f=ct(t,"multi",3,!1),i=Ae(""),u=Ae(0),D;const b=De(()=>yt.repos.flatMap(w=>w.entities.map(h=>({id:h.id,title:h.title,entityType:h.entityType,repo:w.name})))),x=De(()=>()=>{const w=e(i).toLowerCase().trim();return w?e(b).filter(h=>h.title.toLowerCase().includes(w)||h.id.toLowerCase().includes(w)).slice(0,20):e(b).slice(0,20)}),J=Array.isArray(t.value)?[...t.value]:t.value?[t.value]:[];let d=Ae(Qe(J));Ge(()=>{la().then(()=>D?.focus())});function Q(w){f()?(e(d).includes(w)||E(d,[...e(d),w],!0),E(i,""),E(u,0),D?.focus()):t.onselect(w)}function H(w){E(d,e(d).filter(h=>h!==w),!0)}function j(){e(d).length===J.length&&e(d).every((h,a)=>h===J[a])?t.oncancel():t.onselect(e(d))}function G(w){const h=e(x)();w.key==="ArrowDown"?(w.preventDefault(),E(u,Math.min(e(u)+1,h.length-1),!0)):w.key==="ArrowUp"?(w.preventDefault(),E(u,Math.max(e(u)-1,0),!0)):w.key==="Enter"?(w.preventDefault(),h.length>0?Q(h[e(u)].id):f()&&j()):w.key==="Escape"?f()&&e(d).length>0?j():t.oncancel():w.key==="Backspace"&&!e(i)&&f()&&e(d).length>0&&E(d,e(d).slice(0,-1),!0)}var ve=Na(),q=C(ve),ke=C(q);{var Ee=w=>{var h=Le(),a=we(h);Me(a,17,()=>e(d),Ke,(n,o)=>{var _=Ma(),k=C(_),U=Y(k);Ie(U,{variant:"ghost",size:"icon",class:"chip-remove",onclick:()=>H(e(o)),children:(ge,Ce)=>{Ve();var g=Ye("×");y(ge,g)},$$slots:{default:!0}}),m(_),ye(()=>me(k,`${e(o)??""} `)),y(n,_)}),y(w,h)};Se(ke,w=>{f()&&w(Ee)})}var $=Y(ke,2);lt($),kt($,w=>D=w,()=>D),m(q);var le=Y(q,2);{var _e=w=>{var h=ja();Me(h,21,()=>e(x)(),Ke,(a,n,o)=>{var _=Ia();let k;var U=C(_),ge=C(U,!0);m(U);var Ce=Y(U,2),g=C(Ce),l=C(g,!0);m(g);var c=Y(g,2),R=C(c,!0);m(c),m(Ce),m(_),ye(()=>{k=tt(_,1,"dropdown-item svelte-84vb17",null,k,{highlighted:o===e(u)}),me(ge,e(n).title),me(l,e(n).entityType),me(R,e(n).repo)}),Ue("mousedown",_,v=>{v.preventDefault(),Q(e(n).id)}),Je("mouseenter",_,()=>E(u,o,!0)),y(a,_)}),m(h),y(w,h)},he=De(()=>e(x)().length>0);Se(le,w=>{e(he)&&w(_e)})}m(ve),Ue("keydown",$,G),Je("blur",$,()=>{setTimeout(()=>{f()&&e(d).length>0?j():f()||t.oncancel()},150)}),Bt($,()=>e(i),w=>E(i,w)),y(W,ve),nt()}Dt(["keydown","mousedown"]);function ht(W,t){const f=Ze(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M12 4v16"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2"}],["path",{d:"M9 20h6"}]];$e(W,Xe({name:"type"},()=>f,{get iconNode(){return i},children:(u,D)=>{var b=Le(),x=we(b);et(x,t,"default",{}),y(u,b)},$$slots:{default:!0}}))}function pt(W,t){const f=Ze(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M8 2v4"}],["path",{d:"M16 2v4"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}],["path",{d:"M3 10h18"}]];$e(W,Xe({name:"calendar"},()=>f,{get iconNode(){return i},children:(u,D)=>{var b=Le(),x=we(b);et(x,t,"default",{}),y(u,b)},$$slots:{default:!0}}))}function _t(W,t){const f=Ze(t,["children","$$slots","$$events","$$legacy"]);const i=[["circle",{cx:"12",cy:"12",r:"10"}],["circle",{cx:"12",cy:"12",r:"1"}]];$e(W,Xe({name:"circle-dot"},()=>f,{get iconNode(){return i},children:(u,D)=>{var b=Le(),x=we(b);et(x,t,"default",{}),y(u,b)},$$slots:{default:!0}}))}function gt(W,t){const f=Ze(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]];$e(W,Xe({name:"link"},()=>f,{get iconNode(){return i},children:(u,D)=>{var b=Le(),x=we(b);et(x,t,"default",{}),y(u,b)},$$slots:{default:!0}}))}function Yt(W,t){const f=Ze(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor"}]];$e(W,Xe({name:"tag"},()=>f,{get iconNode(){return i},children:(u,D)=>{var b=Le(),x=we(b);et(x,t,"default",{}),y(u,b)},$$slots:{default:!0}}))}function Ka(W,t){const f=Ze(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"m15 18-6-6 6-6"}]];$e(W,Xe({name:"chevron-left"},()=>f,{get iconNode(){return i},children:(u,D)=>{var b=Le(),x=we(b);et(x,t,"default",{}),y(u,b)},$$slots:{default:!0}}))}var qa=N('<span class="ip-menu-check svelte-x7sio8"><!></span>'),Va=N('<span class="ip-menu-item-icon svelte-x7sio8"><!></span> <span> </span> <!>',1),Wa=N('<span class="ip-menu-item-icon svelte-x7sio8"><!></span> <span>Remove</span>',1),Ha=N("<!> <!> <!>",1),Ba=N("<!> <!>",1),Ya=N('<input class="ip-edit-input svelte-x7sio8" type="text"/>'),Ja=N('<span class="ip-status-dot svelte-x7sio8"></span> ',1),Qa=N('<div class="ip-status-wrap svelte-x7sio8"><div class="ip-status-value svelte-x7sio8"><span class="ip-status-dot svelte-x7sio8"></span> <span class="ip-status-text svelte-x7sio8"> </span></div> <div class="ip-status-dropdown svelte-x7sio8"></div></div>'),Ga=N('<span class="ip-cal-wd svelte-x7sio8"> </span>'),Za=N('<div class="ip-cal-week svelte-x7sio8"></div>'),Xa=N('<div class="ip-cal-wrap svelte-x7sio8"><span class="ip-date-text svelte-x7sio8"> </span> <div class="ip-cal-dropdown svelte-x7sio8"><div class="ip-cal-header svelte-x7sio8"><!> <span class="ip-cal-title svelte-x7sio8"> </span> <!></div> <div class="ip-cal-weekdays svelte-x7sio8"></div> <!></div></div>'),$a=N('<span class="ip-badge svelte-x7sio8"> </span>'),en=N('<div class="ip-wikilink-group svelte-x7sio8"></div>'),tn=N('<div class="ip-status-value svelte-x7sio8"><span class="ip-status-dot svelte-x7sio8"></span> <span class="ip-status-text svelte-x7sio8"> </span></div>'),an=N('<span class="ip-date-text svelte-x7sio8"> </span>'),nn=N('<a class="ip-url-link svelte-x7sio8" target="_blank" rel="noopener noreferrer"> </a>'),rn=N('<span class="ip-text-value svelte-x7sio8"> </span>'),sn=N('<div><div class="ip-icon svelte-x7sio8"><!></div> <div class="ip-key svelte-x7sio8"> </div> <div class="ip-value svelte-x7sio8"><!></div></div>'),on=N('<div class="ip-row ip-add-row svelte-x7sio8"><div class="ip-icon svelte-x7sio8"><!></div> <div class="ip-key svelte-x7sio8"><input class="ip-add-key-input svelte-x7sio8" type="text" placeholder="Property name"/></div> <div class="ip-value svelte-x7sio8"></div></div>'),ln=N("<!> <span>Add property</span>",1),cn=N('<div class="inline-properties svelte-x7sio8"><!> <!></div>');function un(W,t){at(t,!0);let f=ct(t,"editable",3,!1);const i=[{type:"text",label:"Text"},{type:"date",label:"Date"},{type:"status",label:"Status"},{type:"wikilink",label:"Link"}],u=["active","inactive","in-progress","completed","draft","archived","current","former","won","lost","open","closed"];let D=Ae(null),b=Ae(!1),x=Ae(""),J=Ae(void 0);function d(r){switch(r.toLowerCase()){case"active":case"current":case"won":return"#3ecf8e";case"in-progress":case"open":return"#f0c246";case"inactive":case"lost":case"closed":case"former":return"#e54d4d";default:return"#5c5c66"}}function Q(r){for(const s of yt.repos){const T=s.entities.find(O=>O.id===r);if(T){Rt(`/${s.name}/${T.entityType}/${T.id}`);return}}}function H(r){return typeof r.value=="string"?r.value:r.value[0]}function j(r){return/^https?:\/\//.test(r)}function G(r){try{return new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return r}}let ve=Ae(Qe(new Date().getFullYear())),q=Ae(Qe(new Date().getMonth()));const ke=["Su","Mo","Tu","We","Th","Fr","Sa"],Ee=["January","February","March","April","May","June","July","August","September","October","November","December"];function $(r,s){const T=new Date(r,s,1).getDay(),O=new Date(r,s+1,0).getDate(),B=new Date(r,s,0).getDate(),P=[];let A=[];for(let ee=T-1;ee>=0;ee--){const S=B-ee,se=s===0?11:s-1,fe=s===0?r-1:r;A.push({day:S,month:se,year:fe,outside:!0})}for(let ee=1;ee<=O;ee++)A.push({day:ee,month:s,year:r,outside:!1}),A.length===7&&(P.push(A),A=[]);if(A.length>0){const ee=s===11?0:s+1,S=s===11?r+1:r;let se=1;for(;A.length<7;)A.push({day:se++,month:ee,year:S,outside:!0});P.push(A)}return P}function le(r){const s=new Date;return r.day===s.getDate()&&r.month===s.getMonth()&&r.year===s.getFullYear()}function _e(r,s){const T=s.slice(0,10).split("-");return r.year===+T[0]&&r.month===+T[1]-1&&r.day===+T[2]}function he(){e(q)===0?(E(q,11),ot(ve,-1)):ot(q,-1)}function w(){e(q)===11?(E(q,0),ot(ve)):ot(q)}function h(r){try{const s=r.slice(0,10).split("-");E(ve,+s[0]),E(q,+s[1]-1)}catch{const s=new Date;E(ve,s.getFullYear(),!0),E(q,s.getMonth(),!0)}}function a(r){requestAnimationFrame(()=>{r.focus(),r.select()})}function n(r){!f()||r.type==="badge"||(r.type==="date"&&h(H(r)),E(D,r.key,!0))}function o(r,s){t.onedit&&t.onedit(r,s),E(D,null)}function _(r,s){const T=`${s.year}-${String(s.month+1).padStart(2,"0")}-${String(s.day).padStart(2,"0")}`;t.onedit&&t.onedit(r,T),E(D,null)}function k(r,s){t.ontypechange&&t.ontypechange(r,s)}function U(r){E(D,null),t.onremove&&t.onremove(r)}function ge(){E(b,!0),E(x,""),requestAnimationFrame(()=>e(J)?.focus())}function Ce(){const r=e(x).trim();r&&t.onadd&&t.onadd(r,""),E(b,!1),E(x,"")}function g(){E(b,!1),E(x,"")}function l(r){r.key==="Enter"?(r.preventDefault(),Ce()):r.key==="Escape"&&g()}var c=cn();Je("click",Vt,()=>{E(D,null)});var R=C(c);Me(R,17,()=>t.properties,r=>r.key,(r,s)=>{const T=De(()=>e(D)===e(s).key);var O=sn();let B;var P=C(O),A=C(P);{var ee=z=>{var F=Le(),M=we(F);Ne(M,()=>ga,(K,oe)=>{oe(K,{children:(ue,be)=>{var Z=Ba(),te=we(Z);Ne(te,()=>fa,(X,V)=>{V(X,{class:"ip-icon-trigger",children:(ne,pe)=>{var xe=Le(),Te=we(xe);{var Oe=ze=>{pt(ze,{size:14})},He=ze=>{_t(ze,{size:14})},rt=ze=>{gt(ze,{size:14})},ut=ze=>{ht(ze,{size:14})};Se(Te,ze=>{e(s).type==="date"?ze(Oe):e(s).type==="status"?ze(He,1):e(s).type==="wikilink"?ze(rt,2):ze(ut,!1)})}y(ne,xe)},$$slots:{default:!0}})});var Re=Y(te,2);Ne(Re,()=>va,(X,V)=>{V(X,{children:(ne,pe)=>{var xe=Le(),Te=we(xe);Ne(Te,()=>ha,(Oe,He)=>{He(Oe,{class:"ip-menu-content",sideOffset:4,align:"start",children:(rt,ut)=>{var ze=Ha(),bt=we(ze);Me(bt,17,()=>i,Ke,(it,We)=>{var dt=Le(),Tt=we(dt);Ne(Tt,()=>zt,(ft,vt)=>{vt(ft,{class:"ip-menu-item",onSelect:()=>k(e(s).key,e(We).type),children:(xt,rr)=>{var Ot=Va(),Et=we(Ot),Qt=C(Et);{var Gt=Fe=>{ht(Fe,{size:13})},Zt=Fe=>{pt(Fe,{size:13})},Xt=Fe=>{_t(Fe,{size:13})},$t=Fe=>{gt(Fe,{size:13})};Se(Qt,Fe=>{e(We).type==="text"?Fe(Gt):e(We).type==="date"?Fe(Zt,1):e(We).type==="status"?Fe(Xt,2):e(We).type==="wikilink"&&Fe($t,3)})}m(Et);var Ct=Y(Et,2),ea=C(Ct,!0);m(Ct);var ta=Y(Ct,2);{var aa=Fe=>{var St=qa(),na=C(St);Oa(na,{size:12}),m(St),y(Fe,St)};Se(ta,Fe=>{e(s).type===e(We).type&&Fe(aa)})}ye(()=>me(ea,e(We).label)),y(xt,Ot)},$$slots:{default:!0}})}),y(it,dt)});var st=Y(bt,2);Ne(st,()=>pa,(it,We)=>{We(it,{class:"ip-menu-sep"})});var Jt=Y(st,2);Ne(Jt,()=>zt,(it,We)=>{We(it,{class:"ip-menu-item ip-menu-destructive",onSelect:()=>U(e(s).key),children:(dt,Tt)=>{var ft=Wa(),vt=we(ft),xt=C(vt);_a(xt,{size:13}),m(vt),Ve(2),y(dt,ft)},$$slots:{default:!0}})}),y(rt,ze)},$$slots:{default:!0}})}),y(ne,xe)},$$slots:{default:!0}})}),y(ue,Z)},$$slots:{default:!0}})}),y(z,F)},S=z=>{var F=Le(),M=we(F);{var K=te=>{pt(te,{size:14})},oe=te=>{_t(te,{size:14})},ue=te=>{gt(te,{size:14})},be=te=>{Yt(te,{size:14})},Z=te=>{ht(te,{size:14})};Se(M,te=>{e(s).type==="date"?te(K):e(s).type==="status"?te(oe,1):e(s).type==="wikilink"?te(ue,2):e(s).type==="badge"?te(be,3):te(Z,!1)})}y(z,F)};Se(A,z=>{f()&&e(s).type!=="badge"?z(ee):z(S,!1)})}m(P);var se=Y(P,2),fe=C(se,!0);m(se);var re=Y(se,2),de=C(re);{var ae=z=>{var F=Ya();lt(F),za(F,M=>a?.(M)),ye(M=>At(F,M),[()=>H(e(s))]),Je("blur",F,M=>{const K=M.currentTarget.value;K!==H(e(s))&&t.onedit?.(e(s).key,K),E(D,null)}),Ue("keydown",F,M=>{M.key==="Enter"?M.currentTarget.blur():M.key==="Escape"&&(M.currentTarget.value=H(e(s)),E(D,null))}),y(z,F)},ce=z=>{var F=Qa(),M=C(F),K=C(M);let oe;var ue=Y(K,2),be=C(ue,!0);m(ue),m(M);var Z=Y(M,2);Me(Z,21,()=>u,Ke,(te,Re)=>{{let X=De(()=>H(e(s))===e(Re)?"selected":"");Ie(te,{variant:"ghost",get class(){return`ip-status-option ${e(X)??""}`},onclick:()=>o(e(s).key,e(Re)),children:(V,ne)=>{var pe=Ja(),xe=we(pe);let Te;var Oe=Y(xe);ye(He=>{Te=Be(xe,"",Te,He),me(Oe,` ${e(Re)??""}`)},[()=>({background:d(e(Re))})]),y(V,pe)},$$slots:{default:!0}})}}),m(Z),m(F),ye((te,Re)=>{oe=Be(K,"",oe,te),me(be,Re)},[()=>({background:d(H(e(s)))}),()=>H(e(s))]),Ue("click",F,te=>te.stopPropagation()),y(z,F)},I=z=>{var F=Xa(),M=C(F),K=C(M,!0);m(M);var oe=Y(M,2),ue=C(oe),be=C(ue);Ie(be,{variant:"ghost",size:"icon",class:"ip-cal-nav",onclick:he,children:(ne,pe)=>{Ka(ne,{size:14})},$$slots:{default:!0}});var Z=Y(be,2),te=C(Z);m(Z);var Re=Y(Z,2);Ie(Re,{variant:"ghost",size:"icon",class:"ip-cal-nav",onclick:w,children:(ne,pe)=>{ma(ne,{size:14})},$$slots:{default:!0}}),m(ue);var X=Y(ue,2);Me(X,21,()=>ke,Ke,(ne,pe)=>{var xe=Ga(),Te=C(xe,!0);m(xe),ye(()=>me(Te,e(pe))),y(ne,xe)}),m(X);var V=Y(X,2);Me(V,17,()=>$(e(ve),e(q)),Ke,(ne,pe)=>{var xe=Za();Me(xe,21,()=>e(pe),Ke,(Te,Oe)=>{{let He=De(()=>e(Oe).outside?"outside":""),rt=De(()=>le(e(Oe))?"today":""),ut=De(()=>_e(e(Oe),H(e(s)))?"selected":"");Ie(Te,{variant:"ghost",get class(){return`ip-cal-day ${e(He)??""} ${e(rt)??""} ${e(ut)??""}`},onclick:()=>_(e(s).key,e(Oe)),children:(ze,bt)=>{Ve();var st=Ye();ye(()=>me(st,e(Oe).day)),y(ze,st)},$$slots:{default:!0}})}}),m(xe),y(ne,xe)}),m(oe),m(F),ye(ne=>{me(K,ne),me(te,`${Ee[e(q)]??""} ${e(ve)??""}`)},[()=>G(H(e(s)))]),Ue("click",F,ne=>ne.stopPropagation()),y(z,F)},ie=z=>{{let F=De(()=>Array.isArray(e(s).value));Ua(z,{get value(){return e(s).value},get multi(){return e(F)},onselect:M=>{t.onedit?.(e(s).key,M),E(D,null)},oncancel:()=>{E(D,null)}})}},Pe=z=>{var F=Le(),M=we(F);{var K=X=>{var V=$a(),ne=C(V,!0);m(V),ye(pe=>me(ne,pe),[()=>H(e(s))]),y(X,V)},oe=X=>{var V=en();Me(V,21,()=>Array.isArray(e(s).value)?e(s).value:[e(s).value],Ke,(ne,pe)=>{Ie(ne,{variant:"ghost",class:"ip-wikilink-chip",onclick:xe=>{xe.stopPropagation(),Q(e(pe))},children:(xe,Te)=>{Ve();var Oe=Ye();ye(()=>me(Oe,e(pe))),y(xe,Oe)},$$slots:{default:!0}})}),m(V),y(X,V)},ue=X=>{var V=tn(),ne=C(V);let pe;var xe=Y(ne,2),Te=C(xe,!0);m(xe),m(V),ye((Oe,He)=>{pe=Be(ne,"",pe,Oe),me(Te,He)},[()=>({background:d(H(e(s)))}),()=>H(e(s))]),y(X,V)},be=X=>{var V=an(),ne=C(V,!0);m(V),ye(pe=>me(ne,pe),[()=>G(H(e(s)))]),y(X,V)},Z=X=>{var V=nn(),ne=C(V,!0);m(V),ye((pe,xe)=>{sa(V,"href",pe),me(ne,xe)},[()=>H(e(s)),()=>H(e(s))]),Ue("click",V,pe=>pe.stopPropagation()),y(X,V)},te=De(()=>j(H(e(s)))),Re=X=>{var V=rn(),ne=C(V,!0);m(V),ye(pe=>me(ne,pe),[()=>H(e(s))]),y(X,V)};Se(M,X=>{e(s).type==="badge"?X(K):e(s).type==="wikilink"?X(oe,1):e(s).type==="status"?X(ue,2):e(s).type==="date"?X(be,3):e(te)?X(Z,4):X(Re,!1)})}y(z,F)};Se(de,z=>{e(T)&&e(s).type==="text"?z(ae):e(T)&&e(s).type==="status"?z(ce,1):e(T)&&e(s).type==="date"?z(I,2):e(T)&&e(s).type==="wikilink"?z(ie,3):z(Pe,!1)})}m(re),m(O),ye(()=>{B=tt(O,1,"ip-row svelte-x7sio8",null,B,{"ip-focused":e(T)}),me(fe,e(s).key)}),Ue("click",P,z=>z.stopPropagation()),Ue("click",re,z=>{z.stopPropagation(),n(e(s))}),y(r,O)});var v=Y(R,2);{var p=r=>{var s=on(),T=C(s),O=C(T);wt(O,{size:14}),m(T);var B=Y(T,2),P=C(B);lt(P),kt(P,A=>E(J,A),()=>e(J)),m(B),Ve(2),m(s),Ue("keydown",P,l),Je("blur",P,g),Bt(P,()=>e(x),A=>E(x,A)),y(r,s)},L=r=>{Ie(r,{variant:"ghost",class:"ip-add-btn",onclick:s=>{s.stopPropagation(),ge()},children:(s,T)=>{var O=ln(),B=we(O);wt(B,{size:14}),Ve(2),y(s,O)},$$slots:{default:!0}})};Se(v,r=>{e(b)?r(p):f()&&r(L,1)})}m(c),y(W,c),nt()}Dt(["click","keydown"]);var dn=N('<div class="remote-cursor svelte-ok7wy5"><span class="remote-cursor-label svelte-ok7wy5"> </span></div>'),fn=N('<div class="cursor-overlay svelte-ok7wy5"></div>'),vn=N('<div class="editor-wrap svelte-ok7wy5"><div class="cm-container svelte-ok7wy5"></div> <!></div>');function hn(W,t){at(t,!0);let f=ct(t,"readonly",3,!0),i=ct(t,"resetKey",3,0);const u=Wt("theme");let D,b=null,x=null,J=Ae(""),d=null,Q=Ae(Qe([])),H=null,j=t.content;function G(le,_e){return le.theme({"&":{backgroundColor:"transparent",color:"var(--color-text-primary)",fontSize:"15px",fontFamily:"var(--font-sans)"},".cm-content":{padding:"32px 40px",fontFamily:"var(--font-sans)",caretColor:"var(--color-accent)",lineHeight:"1.6"},".cm-cursor":{borderLeftColor:"var(--color-accent)"},".cm-selectionBackground":{backgroundColor:_e?"rgba(110,110,232,0.2)":"rgba(110,110,232,0.15)"},"&.cm-focused .cm-selectionBackground":{backgroundColor:_e?"rgba(110,110,232,0.3)":"rgba(110,110,232,0.2)"},".cm-gutters":{display:"none"},".cm-activeLine":{backgroundColor:"transparent"},".cm-line":{padding:"0"},".cm-header-1":{fontSize:"22px",fontWeight:"600"},".cm-header-2":{fontSize:"16px",fontWeight:"600"},".cm-header-3":{fontSize:"15px",fontWeight:"600"},".cm-formatting":{color:"var(--color-text-tertiary)",opacity:"0.5"},".cm-link":{color:"var(--color-link)",textDecoration:"none"}},{dark:_e})}async function ve(){b&&(b.destroy(),b=null),x&&(x.destroy(),x=null),E(Q,[],!0);const{EditorState:le,Transaction:_e}=await qe(async()=>{const{EditorState:r,Transaction:s}=await import("../chunks/CX_61fY8.js");return{EditorState:r,Transaction:s}},[],import.meta.url);d=_e;const{EditorView:he,keymap:w,ViewPlugin:h}=await qe(async()=>{const{EditorView:r,keymap:s,ViewPlugin:T}=await import("../chunks/DnL9f0lc.js").then(O=>O.i);return{EditorView:r,keymap:s,ViewPlugin:T}},__vite__mapDeps([0,1]),import.meta.url),{markdown:a}=await qe(async()=>{const{markdown:r}=await import("../chunks/CscoF-YL.js");return{markdown:r}},__vite__mapDeps([2,1,0,3,4,5]),import.meta.url),{syntaxHighlighting:n,HighlightStyle:o}=await qe(async()=>{const{syntaxHighlighting:r,HighlightStyle:s}=await import("../chunks/D7ZqAKi9.js");return{syntaxHighlighting:r,HighlightStyle:s}},__vite__mapDeps([3,4,1,0]),import.meta.url),{history:_,defaultKeymap:k,historyKeymap:U}=await qe(async()=>{const{history:r,defaultKeymap:s,historyKeymap:T}=await import("../chunks/CWQRQXxy.js");return{history:r,defaultKeymap:s,historyKeymap:T}},__vite__mapDeps([6,1,0,3,4]),import.meta.url),{tags:ge}=await qe(async()=>{const{tags:r}=await import("../chunks/C7VoTosa.js").then(s=>s.i);return{tags:r}},[],import.meta.url),{livePreviewPlugin:Ce,livePreviewTheme:g}=await qe(async()=>{const{livePreviewPlugin:r,livePreviewTheme:s}=await import("../chunks/DKQjBKyp.js");return{livePreviewPlugin:r,livePreviewTheme:s}},__vite__mapDeps([7,0,1,3,4]),import.meta.url),l=u.current==="dark",c=G(he,l),R=o.define([{tag:ge.processingInstruction,color:"var(--color-text-tertiary)",opacity:"0.7"}]),v=[a(),c,n(R),Ce,g,he.lineWrapping];f()&&v.push(le.readOnly.of(!0));let p=!1;if(t.cursorDocName&&!f())try{let I=function(){if(!b||!S){E(Q,[],!0);return}const z=S.awareness,F=S.ytext,M=F.doc;if(!M){E(Q,[],!0);return}const K=[],oe=b.dom.getBoundingClientRect();z.getStates().forEach((ue,be)=>{if(be===ce)return;const Z=ue.cursor;if(!Z?.head)return;const{name:te="Anonymous",color:Re="#6e6ee8"}=ue.user||{};let X;try{X=A.createRelativePositionFromJSON(Z.head)}catch{return}const V=A.createAbsolutePositionFromRelativePosition(X,M);if(!V||V.type!==F)return;const ne=b.coordsAtPos(Math.min(V.index,b.state.doc.length));ne&&K.push({id:be,name:te,color:Re,top:ne.top-oe.top,left:ne.left-oe.left,height:ne.bottom-ne.top})}),E(Q,K,!0)},ie=function(){H&&cancelAnimationFrame(H),H=requestAnimationFrame(()=>{H=null,I()})},Pe=function({added:z,updated:F,removed:M}){[...z,...F,...M].some(oe=>oe!==ce)&&ie()};const{createCollabSession:r}=await qe(async()=>{const{createCollabSession:z}=await import("../chunks/CnKc_Tae.js");return{createCollabSession:z}},__vite__mapDeps([8,9,10,11,12,13,14,15]),import.meta.url),{ySync:s,ySyncFacet:T,YSyncConfig:O,yUndoManagerKeymap:B}=await qe(async()=>{const{ySync:z,ySyncFacet:F,YSyncConfig:M,yUndoManagerKeymap:K}=await import("../chunks/i9c_RUF6.js");return{ySync:z,ySyncFacet:F,YSyncConfig:M,yUndoManagerKeymap:K}},__vite__mapDeps([16,9,0,1]),import.meta.url),{auth:P}=await qe(async()=>{const{auth:z}=await import("../chunks/EDLlAC9C.js").then(F=>F.x);return{auth:z}},__vite__mapDeps([15,11,13,12]),import.meta.url),A=await qe(()=>import("../chunks/CLFba8FK.js").then(z=>z.A),[],import.meta.url),ee=getComputedStyle(document.documentElement).getPropertyValue("--color-accent").trim()||"#6e6ee8",S=r(t.cursorDocName,{name:P.user?.displayName??"Anonymous",color:ee,colorLight:ee+"33"}),se=new A.UndoManager(S.ytext,{captureTimeout:500}),{yUndoManagerFacet:fe,yUndoManager:re,YUndoManagerConfig:de}=await qe(async()=>{const{yUndoManagerFacet:z,yUndoManager:F,YUndoManagerConfig:M}=await import("../chunks/i9c_RUF6.js");return{yUndoManagerFacet:z,yUndoManager:F,YUndoManagerConfig:M}},__vite__mapDeps([16,9,0,1]),import.meta.url),ae=new O(S.ytext,S.awareness);v.push(T.of(ae),s,fe.of(new de(se)),re,w.of(B)),v.push(h.define(z=>{function F(){const M=z.state.selection.main,K=S.ytext,oe=A.createRelativePositionFromTypeIndex(K,M.anchor),ue=A.createRelativePositionFromTypeIndex(K,M.head);S.awareness.setLocalStateField("cursor",{anchor:A.relativePositionToJSON(oe),head:A.relativePositionToJSON(ue)})}return F(),{update(M){(M.selectionSet||M.docChanged)&&F()}}}));const ce=S.ydoc.clientID;S.awareness.on("change",Pe),v.push(h.define(()=>({update(z){(z.docChanged||z.geometryChanged||z.viewportChanged)&&ie()},destroy(){S.awareness.off("change",Pe)}}))),x=S,p=!0}catch(r){console.warn("Yjs collab setup failed, falling back to solo editing:",r)}if(!f()&&!p?(v.push(_({newGroupDelay:500})),v.push(w.of([...k,...U]))):!f()&&p&&v.push(w.of(k)),t.onchange)if(p){const r=Date.now();v.push(he.updateListener.of(s=>{if(s.docChanged&&Date.now()-r>1e3&&s.transactions.some(O=>O.isUserEvent("input")||O.isUserEvent("delete")||O.isUserEvent("move")||O.isUserEvent("undo")||O.isUserEvent("redo"))){const O=s.state.doc.toString();j=O,t.onchange(O)}}))}else v.push(he.updateListener.of(r=>{if(r.docChanged){const s=r.state.doc.toString();j=s,t.onchange(s)}}));v.push(he.domEventHandlers({click(r){const s=r.target;if(t.onwikilinkclick){const O=s.closest(".cm-live-wikilink");if(O){r.preventDefault();const B=O.textContent?.replace(/^\[{1,2}|\]{1,2}$/g,"").trim();return B&&t.onwikilinkclick(B),!0}}const T=s.closest(".cm-live-link");if(T){const O=T.getAttribute("data-href");if(O)return r.preventDefault(),window.open(O,"_blank","noopener,noreferrer"),!0}return!1}})),t.onsave&&v.push(w.of([{key:"Mod-s",run:()=>(t.onsave(),!0)}]));const L=le.create({doc:p?"":t.content,extensions:v});b=new he({state:L,parent:D}),j=p?"":t.content,E(J,t.cursorDocName??"",!0)}ca(()=>{ve()}),Ge(()=>{t.cursorDocName&&e(J)&&t.cursorDocName!==e(J)&&ve()}),Ge(()=>{if(i(),b&&!x&&t.content!==j){j=t.content;const le=D.closest(".document-scroll"),_e=le?.scrollTop??0;b.dispatch({changes:{from:0,to:b.state.doc.length,insert:t.content},...d?{annotations:d.addToHistory.of(!1)}:{}}),le&&requestAnimationFrame(()=>{le.scrollTop=_e})}}),Ht(()=>{H&&cancelAnimationFrame(H),x?.destroy(),x=null,b?.destroy()});var q=vn(),ke=C(q);kt(ke,le=>D=le,()=>D);var Ee=Y(ke,2);{var $=le=>{var _e=fn();Me(_e,21,()=>e(Q),he=>he.id,(he,w)=>{var h=dn(),a=C(h),n=C(a,!0);m(a),m(h),ye(()=>{Be(h,`top: ${e(w).top??""}px; left: ${e(w).left??""}px; height: ${e(w).height??""}px; --cursor-color: ${e(w).color??""};`),Be(a,`background-color: ${e(w).color??""};`),me(n,e(w).name)}),y(he,h)}),m(_e),y(le,_e)};Se(Ee,le=>{e(Q).length>0&&le($)})}m(q),y(W,q),nt()}var mt={exports:{}};var pn=mt.exports,It;function _n(){return It||(It=1,(function(W,t){((f,i)=>{W.exports=i()})(pn,function f(){var i=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:{},u,D=!i.document&&!!i.postMessage,b=i.IS_PAPA_WORKER||!1,x={},J=0,d={};function Q(a){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(n){var o=he(n);o.chunkSize=parseInt(o.chunkSize),n.step||n.chunk||(o.chunkSize=null),this._handle=new q(o),(this._handle.streamer=this)._config=o}).call(this,a),this.parseChunk=function(n,o){var _=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<_){let U=this._config.newline;U||(k=this._config.quoteChar||'"',U=this._handle.guessLineEndings(n,k)),n=[...n.split(U).slice(_)].join(U)}this.isFirstChunk&&h(this._config.beforeFirstChunk)&&(k=this._config.beforeFirstChunk(n))!==void 0&&(n=k),this.isFirstChunk=!1,this._halted=!1;var _=this._partialLine+n,k=(this._partialLine="",this._handle.parse(_,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(n=k.meta.cursor,_=(this._finished||(this._partialLine=_.substring(n-this._baseIndex),this._baseIndex=n),k&&k.data&&(this._rowCount+=k.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),b)i.postMessage({results:k,workerId:d.WORKER_ID,finished:_});else if(h(this._config.chunk)&&!o){if(this._config.chunk(k,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=k=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(k.data),this._completeResults.errors=this._completeResults.errors.concat(k.errors),this._completeResults.meta=k.meta),this._completed||!_||!h(this._config.complete)||k&&k.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),_||k&&k.meta.paused||this._nextChunk(),k}this._halted=!0},this._sendError=function(n){h(this._config.error)?this._config.error(n):b&&this._config.error&&i.postMessage({workerId:d.WORKER_ID,error:n,finished:!1})}}function H(a){var n;(a=a||{}).chunkSize||(a.chunkSize=d.RemoteChunkSize),Q.call(this,a),this._nextChunk=D?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(o){this._input=o,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(n=new XMLHttpRequest,this._config.withCredentials&&(n.withCredentials=this._config.withCredentials),D||(n.onload=w(this._chunkLoaded,this),n.onerror=w(this._chunkError,this)),n.open(this._config.downloadRequestBody?"POST":"GET",this._input,!D),this._config.downloadRequestHeaders){var o,_=this._config.downloadRequestHeaders;for(o in _)n.setRequestHeader(o,_[o])}var k;this._config.chunkSize&&(k=this._start+this._config.chunkSize-1,n.setRequestHeader("Range","bytes="+this._start+"-"+k));try{n.send(this._config.downloadRequestBody)}catch(U){this._chunkError(U.message)}D&&n.status===0&&this._chunkError()}},this._chunkLoaded=function(){n.readyState===4&&(n.status<200||400<=n.status?this._chunkError():(this._start+=this._config.chunkSize||n.responseText.length,this._finished=!this._config.chunkSize||this._start>=(o=>(o=o.getResponseHeader("Content-Range"))!==null?parseInt(o.substring(o.lastIndexOf("/")+1)):-1)(n),this.parseChunk(n.responseText)))},this._chunkError=function(o){o=n.statusText||o,this._sendError(new Error(o))}}function j(a){(a=a||{}).chunkSize||(a.chunkSize=d.LocalChunkSize),Q.call(this,a);var n,o,_=typeof FileReader<"u";this.stream=function(k){this._input=k,o=k.slice||k.webkitSlice||k.mozSlice,_?((n=new FileReader).onload=w(this._chunkLoaded,this),n.onerror=w(this._chunkError,this)):n=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var k=this._input,U=(this._config.chunkSize&&(U=Math.min(this._start+this._config.chunkSize,this._input.size),k=o.call(k,this._start,U)),n.readAsText(k,this._config.encoding));_||this._chunkLoaded({target:{result:U}})},this._chunkLoaded=function(k){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(k.target.result)},this._chunkError=function(){this._sendError(n.error)}}function G(a){var n;Q.call(this,a=a||{}),this.stream=function(o){return n=o,this._nextChunk()},this._nextChunk=function(){var o,_;if(!this._finished)return o=this._config.chunkSize,n=o?(_=n.substring(0,o),n.substring(o)):(_=n,""),this._finished=!n,this.parseChunk(_)}}function ve(a){Q.call(this,a=a||{});var n=[],o=!0,_=!1;this.pause=function(){Q.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){Q.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(k){this._input=k,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){_&&n.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),n.length?this.parseChunk(n.shift()):o=!0},this._streamData=w(function(k){try{n.push(typeof k=="string"?k:k.toString(this._config.encoding)),o&&(o=!1,this._checkIsFinished(),this.parseChunk(n.shift()))}catch(U){this._streamError(U)}},this),this._streamError=w(function(k){this._streamCleanUp(),this._sendError(k)},this),this._streamEnd=w(function(){this._streamCleanUp(),_=!0,this._streamData("")},this),this._streamCleanUp=w(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function q(a){var n,o,_,k,U=Math.pow(2,53),ge=-U,Ce=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,g=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,l=this,c=0,R=0,v=!1,p=!1,L=[],r={data:[],errors:[],meta:{}};function s(P){return a.skipEmptyLines==="greedy"?P.join("").trim()==="":P.length===1&&P[0].length===0}function T(){if(r&&_&&(B("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+d.DefaultDelimiter+"'"),_=!1),a.skipEmptyLines&&(r.data=r.data.filter(function(S){return!s(S)})),O()){let S=function(se,fe){h(a.transformHeader)&&(se=a.transformHeader(se,fe)),L.push(se)};if(r)if(Array.isArray(r.data[0])){for(var P=0;O()&&P<r.data.length;P++)r.data[P].forEach(S);r.data.splice(0,1)}else r.data.forEach(S)}function A(S,se){for(var fe=a.header?{}:[],re=0;re<S.length;re++){var de=re,ae=S[re],ae=((ce,I)=>(ie=>(a.dynamicTypingFunction&&a.dynamicTyping[ie]===void 0&&(a.dynamicTyping[ie]=a.dynamicTypingFunction(ie)),(a.dynamicTyping[ie]||a.dynamicTyping)===!0))(ce)?I==="true"||I==="TRUE"||I!=="false"&&I!=="FALSE"&&((ie=>{if(Ce.test(ie)&&(ie=parseFloat(ie),ge<ie&&ie<U))return 1})(I)?parseFloat(I):g.test(I)?new Date(I):I===""?null:I):I)(de=a.header?re>=L.length?"__parsed_extra":L[re]:de,ae=a.transform?a.transform(ae,de):ae);de==="__parsed_extra"?(fe[de]=fe[de]||[],fe[de].push(ae)):fe[de]=ae}return a.header&&(re>L.length?B("FieldMismatch","TooManyFields","Too many fields: expected "+L.length+" fields but parsed "+re,R+se):re<L.length&&B("FieldMismatch","TooFewFields","Too few fields: expected "+L.length+" fields but parsed "+re,R+se)),fe}var ee;r&&(a.header||a.dynamicTyping||a.transform)&&(ee=1,!r.data.length||Array.isArray(r.data[0])?(r.data=r.data.map(A),ee=r.data.length):r.data=A(r.data,0),a.header&&r.meta&&(r.meta.fields=L),R+=ee)}function O(){return a.header&&L.length===0}function B(P,A,ee,S){P={type:P,code:A,message:ee},S!==void 0&&(P.row=S),r.errors.push(P)}h(a.step)&&(k=a.step,a.step=function(P){r=P,O()?T():(T(),r.data.length!==0&&(c+=P.data.length,a.preview&&c>a.preview?o.abort():(r.data=r.data[0],k(r,l))))}),this.parse=function(P,A,ee){var S=a.quoteChar||'"',S=(a.newline||(a.newline=this.guessLineEndings(P,S)),_=!1,a.delimiter?h(a.delimiter)&&(a.delimiter=a.delimiter(P),r.meta.delimiter=a.delimiter):((S=((se,fe,re,de,ae)=>{var ce,I,ie,Pe;ae=ae||[","," ","|",";",d.RECORD_SEP,d.UNIT_SEP];for(var z=0;z<ae.length;z++){for(var F,M=ae[z],K=0,oe=0,ue=0,be=(ie=void 0,new Ee({comments:de,delimiter:M,newline:fe,preview:10}).parse(se)),Z=0;Z<be.data.length;Z++)re&&s(be.data[Z])?ue++:(F=be.data[Z].length,oe+=F,ie===void 0?ie=F:0<F&&(K+=Math.abs(F-ie),ie=F));0<be.data.length&&(oe/=be.data.length-ue),(I===void 0||K<=I)&&(Pe===void 0||Pe<oe)&&1.99<oe&&(I=K,ce=M,Pe=oe)}return{successful:!!(a.delimiter=ce),bestDelimiter:ce}})(P,a.newline,a.skipEmptyLines,a.comments,a.delimitersToGuess)).successful?a.delimiter=S.bestDelimiter:(_=!0,a.delimiter=d.DefaultDelimiter),r.meta.delimiter=a.delimiter),he(a));return a.preview&&a.header&&S.preview++,n=P,o=new Ee(S),r=o.parse(n,A,ee),T(),v?{meta:{paused:!0}}:r||{meta:{paused:!1}}},this.paused=function(){return v},this.pause=function(){v=!0,o.abort(),n=h(a.chunk)?"":n.substring(o.getCharIndex())},this.resume=function(){l.streamer._halted?(v=!1,l.streamer.parseChunk(n,!0)):setTimeout(l.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,o.abort(),r.meta.aborted=!0,h(a.complete)&&a.complete(r),n=""},this.guessLineEndings=function(se,S){se=se.substring(0,1048576);var S=new RegExp(ke(S)+"([^]*?)"+ke(S),"gm"),ee=(se=se.replace(S,"")).split("\r"),S=se.split(`
|
|
3
|
-
`),se=1<S.length&&S[0].length<ee[0].length;if(ee.length===1||se)return`
|
|
4
|
-
`;for(var fe=0,re=0;re<ee.length;re++)ee[re][0]===`
|
|
5
|
-
`&&fe++;return fe>=ee.length/2?`\r
|
|
6
|
-
`:"\r"}}function ke(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ee(a){var n=(a=a||{}).delimiter,o=a.newline,_=a.comments,k=a.step,U=a.preview,ge=a.fastMode,Ce=null,g=!1,l=a.quoteChar==null?'"':a.quoteChar,c=l;if(a.escapeChar!==void 0&&(c=a.escapeChar),(typeof n!="string"||-1<d.BAD_DELIMITERS.indexOf(n))&&(n=","),_===n)throw new Error("Comment character same as delimiter");_===!0?_="#":(typeof _!="string"||-1<d.BAD_DELIMITERS.indexOf(_))&&(_=!1),o!==`
|
|
7
|
-
`&&o!=="\r"&&o!==`\r
|
|
8
|
-
`&&(o=`
|
|
9
|
-
`);var R=0,v=!1;this.parse=function(p,L,r){if(typeof p!="string")throw new Error("Input must be a string");var s=p.length,T=n.length,O=o.length,B=_.length,P=h(k),A=[],ee=[],S=[],se=R=0;if(!p)return K();if(ge||ge!==!1&&p.indexOf(l)===-1){for(var fe=p.split(o),re=0;re<fe.length;re++){if(S=fe[re],R+=S.length,re!==fe.length-1)R+=o.length;else if(r)return K();if(!_||S.substring(0,B)!==_){if(P){if(A=[],Pe(S.split(n)),oe(),v)return K()}else Pe(S.split(n));if(U&&U<=re)return A=A.slice(0,U),K(!0)}}return K()}for(var de=p.indexOf(n,R),ae=p.indexOf(o,R),ce=new RegExp(ke(c)+ke(l),"g"),I=p.indexOf(l,R);;)if(p[R]===l)for(I=R,R++;;){if((I=p.indexOf(l,I+1))===-1)return r||ee.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:A.length,index:R}),F();if(I===s-1)return F(p.substring(R,I).replace(ce,l));if(l===c&&p[I+1]===c)I++;else if(l===c||I===0||p[I-1]!==c){de!==-1&&de<I+1&&(de=p.indexOf(n,I+1));var ie=z((ae=ae!==-1&&ae<I+1?p.indexOf(o,I+1):ae)===-1?de:Math.min(de,ae));if(p.substr(I+1+ie,T)===n){S.push(p.substring(R,I).replace(ce,l)),p[R=I+1+ie+T]!==l&&(I=p.indexOf(l,R)),de=p.indexOf(n,R),ae=p.indexOf(o,R);break}if(ie=z(ae),p.substring(I+1+ie,I+1+ie+O)===o){if(S.push(p.substring(R,I).replace(ce,l)),M(I+1+ie+O),de=p.indexOf(n,R),I=p.indexOf(l,R),P&&(oe(),v))return K();if(U&&A.length>=U)return K(!0);break}ee.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:A.length,index:R}),I++}}else if(_&&S.length===0&&p.substring(R,R+B)===_){if(ae===-1)return K();R=ae+O,ae=p.indexOf(o,R),de=p.indexOf(n,R)}else if(de!==-1&&(de<ae||ae===-1))S.push(p.substring(R,de)),R=de+T,de=p.indexOf(n,R);else{if(ae===-1)break;if(S.push(p.substring(R,ae)),M(ae+O),P&&(oe(),v))return K();if(U&&A.length>=U)return K(!0)}return F();function Pe(ue){A.push(ue),se=R}function z(ue){var be=0;return be=ue!==-1&&(ue=p.substring(I+1,ue))&&ue.trim()===""?ue.length:be}function F(ue){return r||(ue===void 0&&(ue=p.substring(R)),S.push(ue),R=s,Pe(S),P&&oe()),K()}function M(ue){R=ue,Pe(S),S=[],ae=p.indexOf(o,R)}function K(ue){if(a.header&&!L&&A.length&&!g){var be=A[0],Z=Object.create(null),te=new Set(be);let Re=!1;for(let X=0;X<be.length;X++){let V=be[X];if(Z[V=h(a.transformHeader)?a.transformHeader(V,X):V]){let ne,pe=Z[V];for(;ne=V+"_"+pe,pe++,te.has(ne););te.add(ne),be[X]=ne,Z[V]++,Re=!0,(Ce=Ce===null?{}:Ce)[ne]=V}else Z[V]=1,be[X]=V;te.add(V)}Re&&console.warn("Duplicate headers found and renamed."),g=!0}return{data:A,errors:ee,meta:{delimiter:n,linebreak:o,aborted:v,truncated:!!ue,cursor:se+(L||0),renamedHeaders:Ce}}}function oe(){k(K()),A=[],ee=[]}},this.abort=function(){v=!0},this.getCharIndex=function(){return R}}function $(a){var n=a.data,o=x[n.workerId],_=!1;if(n.error)o.userError(n.error,n.file);else if(n.results&&n.results.data){var k={abort:function(){_=!0,le(n.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:_e,resume:_e};if(h(o.userStep)){for(var U=0;U<n.results.data.length&&(o.userStep({data:n.results.data[U],errors:n.results.errors,meta:n.results.meta},k),!_);U++);delete n.results}else h(o.userChunk)&&(o.userChunk(n.results,k,n.file),delete n.results)}n.finished&&!_&&le(n.workerId,n.results)}function le(a,n){var o=x[a];h(o.userComplete)&&o.userComplete(n),o.terminate(),delete x[a]}function _e(){throw new Error("Not implemented.")}function he(a){if(typeof a!="object"||a===null)return a;var n,o=Array.isArray(a)?[]:{};for(n in a)o[n]=he(a[n]);return o}function w(a,n){return function(){a.apply(n,arguments)}}function h(a){return typeof a=="function"}return d.parse=function(a,n){var o=(n=n||{}).dynamicTyping||!1;if(h(o)&&(n.dynamicTypingFunction=o,o={}),n.dynamicTyping=o,n.transform=!!h(n.transform)&&n.transform,!n.worker||!d.WORKERS_SUPPORTED)return o=null,d.NODE_STREAM_INPUT,typeof a=="string"?(a=(_=>_.charCodeAt(0)!==65279?_:_.slice(1))(a),o=new(n.download?H:G)(n)):a.readable===!0&&h(a.read)&&h(a.on)?o=new ve(n):(i.File&&a instanceof File||a instanceof Object)&&(o=new j(n)),o.stream(a);(o=(()=>{var _;return!!d.WORKERS_SUPPORTED&&(_=(()=>{var k=i.URL||i.webkitURL||null,U=f.toString();return d.BLOB_URL||(d.BLOB_URL=k.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",U,")();"],{type:"text/javascript"})))})(),(_=new i.Worker(_)).onmessage=$,_.id=J++,x[_.id]=_)})()).userStep=n.step,o.userChunk=n.chunk,o.userComplete=n.complete,o.userError=n.error,n.step=h(n.step),n.chunk=h(n.chunk),n.complete=h(n.complete),n.error=h(n.error),delete n.worker,o.postMessage({input:a,config:n,workerId:o.id})},d.unparse=function(a,n){var o=!1,_=!0,k=",",U=`\r
|
|
10
|
-
`,ge='"',Ce=ge+ge,g=!1,l=null,c=!1,R=((()=>{if(typeof n=="object"){if(typeof n.delimiter!="string"||d.BAD_DELIMITERS.filter(function(L){return n.delimiter.indexOf(L)!==-1}).length||(k=n.delimiter),typeof n.quotes!="boolean"&&typeof n.quotes!="function"&&!Array.isArray(n.quotes)||(o=n.quotes),typeof n.skipEmptyLines!="boolean"&&typeof n.skipEmptyLines!="string"||(g=n.skipEmptyLines),typeof n.newline=="string"&&(U=n.newline),typeof n.quoteChar=="string"&&(ge=n.quoteChar),typeof n.header=="boolean"&&(_=n.header),Array.isArray(n.columns)){if(n.columns.length===0)throw new Error("Option columns is empty");l=n.columns}n.escapeChar!==void 0&&(Ce=n.escapeChar+ge),n.escapeFormulae instanceof RegExp?c=n.escapeFormulae:typeof n.escapeFormulae=="boolean"&&n.escapeFormulae&&(c=/^[=+\-@\t\r].*$/)}})(),new RegExp(ke(ge),"g"));if(typeof a=="string"&&(a=JSON.parse(a)),Array.isArray(a)){if(!a.length||Array.isArray(a[0]))return v(null,a,g);if(typeof a[0]=="object")return v(l||Object.keys(a[0]),a,g)}else if(typeof a=="object")return typeof a.data=="string"&&(a.data=JSON.parse(a.data)),Array.isArray(a.data)&&(a.fields||(a.fields=a.meta&&a.meta.fields||l),a.fields||(a.fields=Array.isArray(a.data[0])?a.fields:typeof a.data[0]=="object"?Object.keys(a.data[0]):[]),Array.isArray(a.data[0])||typeof a.data[0]=="object"||(a.data=[a.data])),v(a.fields||[],a.data||[],g);throw new Error("Unable to serialize unrecognized input");function v(L,r,s){var T="",O=(typeof L=="string"&&(L=JSON.parse(L)),typeof r=="string"&&(r=JSON.parse(r)),Array.isArray(L)&&0<L.length),B=!Array.isArray(r[0]);if(O&&_){for(var P=0;P<L.length;P++)0<P&&(T+=k),T+=p(L[P],P);0<r.length&&(T+=U)}for(var A=0;A<r.length;A++){var ee=(O?L:r[A]).length,S=!1,se=O?Object.keys(r[A]).length===0:r[A].length===0;if(s&&!O&&(S=s==="greedy"?r[A].join("").trim()==="":r[A].length===1&&r[A][0].length===0),s==="greedy"&&O){for(var fe=[],re=0;re<ee;re++){var de=B?L[re]:re;fe.push(r[A][de])}S=fe.join("").trim()===""}if(!S){for(var ae=0;ae<ee;ae++){0<ae&&!se&&(T+=k);var ce=O&&B?L[ae]:ae;T+=p(r[A][ce],ae)}A<r.length-1&&(!s||0<ee&&!se)&&(T+=U)}}return T}function p(L,r){var s,T;return L==null?"":L.constructor===Date?JSON.stringify(L).slice(1,25):(T=!1,c&&typeof L=="string"&&c.test(L)&&(L="'"+L,T=!0),s=L.toString().replace(R,Ce),(T=T||o===!0||typeof o=="function"&&o(L,r)||Array.isArray(o)&&o[r]||((O,B)=>{for(var P=0;P<B.length;P++)if(-1<O.indexOf(B[P]))return!0;return!1})(s,d.BAD_DELIMITERS)||-1<s.indexOf(k)||s.charAt(0)===" "||s.charAt(s.length-1)===" ")?ge+s+ge:s)}},d.RECORD_SEP="",d.UNIT_SEP="",d.BYTE_ORDER_MARK="\uFEFF",d.BAD_DELIMITERS=["\r",`
|
|
11
|
-
`,'"',d.BYTE_ORDER_MARK],d.WORKERS_SUPPORTED=!D&&!!i.Worker,d.NODE_STREAM_INPUT=1,d.LocalChunkSize=10485760,d.RemoteChunkSize=5242880,d.DefaultDelimiter=",",d.Parser=Ee,d.ParserHandle=q,d.NetworkStreamer=H,d.FileStreamer=j,d.StringStreamer=G,d.ReadableStreamStreamer=ve,i.jQuery&&((u=i.jQuery).fn.parse=function(a){var n=a.config||{},o=[];return this.each(function(U){if(!(u(this).prop("tagName").toUpperCase()==="INPUT"&&u(this).attr("type").toLowerCase()==="file"&&i.FileReader)||!this.files||this.files.length===0)return!0;for(var ge=0;ge<this.files.length;ge++)o.push({file:this.files[ge],inputElem:this,instanceConfig:u.extend({},n)})}),_(),this;function _(){if(o.length===0)h(a.complete)&&a.complete();else{var U,ge,Ce,g,l=o[0];if(h(a.before)){var c=a.before(l.file,l.inputElem);if(typeof c=="object"){if(c.action==="abort")return U="AbortError",ge=l.file,Ce=l.inputElem,g=c.reason,void(h(a.error)&&a.error({name:U},ge,Ce,g));if(c.action==="skip")return void k();typeof c.config=="object"&&(l.instanceConfig=u.extend(l.instanceConfig,c.config))}else if(c==="skip")return void k()}var R=l.instanceConfig.complete;l.instanceConfig.complete=function(v){h(R)&&R(v,l.file,l.inputElem),k()},d.parse(l.file,l.instanceConfig)}}function k(){o.splice(0,1),_()}}),b&&(i.onmessage=function(a){a=a.data,d.WORKER_ID===void 0&&a&&(d.WORKER_ID=a.workerId),typeof a.input=="string"?i.postMessage({workerId:d.WORKER_ID,results:d.parse(a.input,a.config),finished:!0}):(i.File&&a.input instanceof File||a.input instanceof Object)&&(a=d.parse(a.input,a.config))&&i.postMessage({workerId:d.WORKER_ID,results:a,finished:!0})}),(H.prototype=Object.create(Q.prototype)).constructor=H,(j.prototype=Object.create(Q.prototype)).constructor=j,(G.prototype=Object.create(G.prototype)).constructor=G,(ve.prototype=Object.create(Q.prototype)).constructor=ve,d})})(mt)),mt.exports}var gn=_n();const jt=La(gn);var mn=N('<span class="remote-cell-label svelte-63hltt"> </span>'),yn=N('<th><!> <input class="cell-input header-input svelte-63hltt"/> <!></th>'),wn=N('<span class="remote-cell-label svelte-63hltt"> </span>'),kn=N('<td><!> <input class="cell-input svelte-63hltt"/></td>'),bn=N('<tr class="svelte-63hltt"><td class="row-num svelte-63hltt"></td><!><td class="actions svelte-63hltt"><!></td></tr>'),xn=N("<!> <span>Add row</span>",1),En=N('<div class="csv-editor svelte-63hltt"><div class="table-scroll svelte-63hltt"><table class="svelte-63hltt"><thead><tr class="svelte-63hltt"><th class="row-num svelte-63hltt"></th><!><th class="col-add svelte-63hltt"><!></th></tr></thead><tbody></tbody></table></div> <div class="csv-footer svelte-63hltt"><!></div></div>');function Cn(W,t){at(t,!0);let f=ct(t,"remoteCursors",19,()=>[]),i=Ae(Qe([])),u=Ae(Qe([])),D=Ae(void 0);function b(g){const l=jt.parse(g.trim(),{header:!1,skipEmptyLines:!0});l.data.length>0?(E(i,l.data[0],!0),E(u,l.data.slice(1),!0)):(E(i,[],!0),E(u,[],!0))}b(t.content),Ge(()=>{b(t.content)});function x(){return jt.unparse([e(i),...e(u)])}function J(){const g=x();t.onchange?.(g)}function d(g,l,c){e(u)[g][l]=c,E(u,[...e(u)],!0),J()}function Q(g,l){e(i)[g]=l,E(i,[...e(i)],!0),J()}function H(){E(u,[...e(u),e(i).map(()=>"")],!0),J(),q(e(u).length-1,0)}function j(g){E(u,e(u).filter((l,c)=>c!==g),!0),J()}function G(){const g=`col${e(i).length+1}`;E(i,[...e(i),g],!0),E(u,e(u).map(l=>[...l,""]),!0),J(),requestAnimationFrame(()=>{const l=e(D)?.querySelector(`thead th:nth-child(${e(i).length+1}) input`);l&&(l.focus(),l.select())})}function ve(g){e(i).length<=1||(E(i,e(i).filter((l,c)=>c!==g),!0),E(u,e(u).map(l=>l.filter((c,R)=>R!==g)),!0),J())}function q(g,l){requestAnimationFrame(()=>{if(!e(D))return;let c=null;g<0?c=e(D).querySelector(`thead th:nth-child(${l+2}) input`):c=e(D).querySelector(`tbody tr:nth-child(${g+1}) td:nth-child(${l+2}) input`),c&&(c.focus(),c.select())})}function ke(g,l,c){if(g.key==="Tab"){g.preventDefault(),g.shiftKey?c>0?q(l,c-1):l>0?q(l-1,e(i).length-1):l===0&&q(-1,e(i).length-1):c<e(i).length-1?q(l,c+1):l<e(u).length-1?q(l+1,0):l===e(u).length-1&&H();return}if(g.key==="Enter"){g.preventDefault(),g.shiftKey?l>0?q(l-1,c):q(-1,c):l<e(u).length-1?q(l+1,c):H();return}if(g.key==="Escape"){g.target.blur();return}}function Ee(g,l){if(g.key==="Tab"){g.preventDefault(),g.shiftKey?l>0&&q(-1,l-1):l<e(i).length-1?q(-1,l+1):e(u).length>0&&q(0,0);return}if(g.key==="Enter"){g.preventDefault(),e(u).length>0?q(0,l):H();return}if(g.key==="Escape"){g.target.blur();return}}function $(g,l){return f().find(c=>c.row===g&&c.col===l)}function le(g,l){t.oncellselect?.(g,l)}function _e(g){(g.metaKey||g.ctrlKey)&&g.key==="s"&&(g.preventDefault(),t.onsave?.())}var he=En(),w=C(he),h=C(w),a=C(h),n=C(a),o=Y(C(n));Me(o,17,()=>e(i),Ke,(g,l,c)=>{const R=De(()=>$(-1,c));var v=yn();let p;var L=C(v);{var r=B=>{var P=mn(),A=C(P,!0);m(P),ye(()=>{Be(P,`background-color: ${e(R).color??""}`),me(A,e(R).name)}),y(B,P)};Se(L,B=>{e(R)&&B(r)})}var s=Y(L,2);lt(s);var T=Y(s,2);{var O=B=>{Ie(B,{variant:"ghost",size:"icon",class:"col-delete-btn",title:"Delete column",onclick:()=>ve(c),children:(P,A)=>{Ft(P,{size:12})},$$slots:{default:!0}})};Se(T,B=>{e(i).length>1&&B(O)})}m(v),ye(()=>{Be(v,e(R)?`--rc-color: ${e(R).color}`:""),p=tt(v,1,"svelte-63hltt",null,p,{"remote-active":!!e(R)}),At(s,e(l))}),Ue("input",s,B=>Q(c,B.currentTarget.value)),Ue("keydown",s,B=>Ee(B,c)),Je("focus",s,()=>le(-1,c)),y(g,v)});var _=Y(o),k=C(_);Ie(k,{variant:"ghost",size:"icon",class:"col-add-btn",title:"Add column",onclick:G,children:(g,l)=>{wt(g,{size:14})},$$slots:{default:!0}}),m(_),m(n),m(a);var U=Y(a);Me(U,21,()=>e(u),Ke,(g,l,c)=>{var R=bn(),v=C(R);v.textContent=c+1;var p=Y(v);Me(p,17,()=>e(l),Ke,(s,T,O)=>{const B=De(()=>$(c,O));var P=kn();let A;var ee=C(P);{var S=fe=>{var re=wn(),de=C(re,!0);m(re),ye(()=>{Be(re,`background-color: ${e(B).color??""}`),me(de,e(B).name)}),y(fe,re)};Se(ee,fe=>{e(B)&&fe(S)})}var se=Y(ee,2);lt(se),m(P),ye(()=>{Be(P,e(B)?`--rc-color: ${e(B).color}`:""),A=tt(P,1,"svelte-63hltt",null,A,{"remote-active":!!e(B)}),At(se,e(T))}),Ue("input",se,fe=>d(c,O,fe.currentTarget.value)),Ue("keydown",se,fe=>ke(fe,c,O)),Je("focus",se,()=>le(c,O)),y(s,P)});var L=Y(p),r=C(L);Ie(r,{variant:"ghost",size:"icon",class:"delete-btn",title:"Delete row",onclick:()=>j(c),children:(s,T)=>{Ft(s,{size:12})},$$slots:{default:!0}}),m(L),m(R),y(g,R)}),m(U),m(h),kt(h,g=>E(D,g),()=>e(D)),m(w);var ge=Y(w,2),Ce=C(ge);Ie(Ce,{variant:"ghost",class:"add-row-btn",onclick:H,children:(g,l)=>{var c=xn(),R=we(c);wt(R,{size:14}),Ve(2),y(g,c)},$$slots:{default:!0}}),m(ge),m(he),Ue("keydown",he,_e),y(W,he),nt()}Dt(["keydown","input"]);const Sn=/^\d{4}-\d{2}-\d{2}/,Pn=new Set(["active","inactive","in-progress","completed","draft","archived","current","former","contractor","client","partner","won","lost","open","closed"]),An=new Set(["entity_type","format"]),Rn=new Set(["entity_id","created_at","updated_at","created_by","updated_by"]);function Dn(W,t){const f=[];for(const[i,u]of Object.entries(W)){if(Rn.has(i)||u==null)continue;const D=Tn(i,u);D&&f.push(D)}return f}function Tn(W,t){if(An.has(W))return{key:W,value:String(t).toUpperCase(),type:"badge"};if(W==="status")return{key:W,value:String(t),type:"status"};if(Array.isArray(t)){if(t.length>0&&typeof t[0]=="object"&&t[0]!==null){const x=t.map(J=>Object.entries(J).map(([Q,H])=>`${Q}: ${H}`).join(", "));return{key:W,value:x.join(" | "),type:"text"}}const u=t.map(String),D=u.some(x=>/^\[\[.+?\]\]$/.test(x)),b=u.map(x=>{const J=x.match(/^\[\[(.+?)\]\]$/);return J?J[1]:x});return D||b.every(x=>Nt(x))?{key:W,value:b,type:"wikilink"}:{key:W,value:u.join(", "),type:"text"}}const f=String(t),i=f.match(/^\[\[(.+?)\]\]$/);return i?{key:W,value:i[1],type:"wikilink"}:Sn.test(f)?{key:W,value:f,type:"date"}:Pn.has(f.toLowerCase())?{key:W,value:f,type:"status"}:Nt(f)&&!f.includes(" ")?{key:W,value:f,type:"wikilink"}:{key:W,value:f,type:"text"}}function Nt(W){return/^[a-z0-9][a-z0-9-]*[a-z0-9]$/.test(W)&&W.includes("-")}function Ut(W,t){const f=Ze(t,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];$e(W,Xe({name:"loader-circle"},()=>f,{get iconNode(){return i},children:(u,D)=>{var b=Le(),x=we(b);et(x,t,"default",{}),y(u,b)},$$slots:{default:!0}}))}class On{diff(t,f,i={}){let u;typeof i=="function"?(u=i,i={}):"callback"in i&&(u=i.callback);const D=this.castInput(t,i),b=this.castInput(f,i),x=this.removeEmpty(this.tokenize(D,i)),J=this.removeEmpty(this.tokenize(b,i));return this.diffWithOptionsObj(x,J,i,u)}diffWithOptionsObj(t,f,i,u){var D;const b=$=>{if($=this.postProcess($,i),u){setTimeout(function(){u($)},0);return}else return $},x=f.length,J=t.length;let d=1,Q=x+J;i.maxEditLength!=null&&(Q=Math.min(Q,i.maxEditLength));const H=(D=i.timeout)!==null&&D!==void 0?D:1/0,j=Date.now()+H,G=[{oldPos:-1,lastComponent:void 0}];let ve=this.extractCommon(G[0],f,t,0,i);if(G[0].oldPos+1>=J&&ve+1>=x)return b(this.buildValues(G[0].lastComponent,f,t));let q=-1/0,ke=1/0;const Ee=()=>{for(let $=Math.max(q,-d);$<=Math.min(ke,d);$+=2){let le;const _e=G[$-1],he=G[$+1];_e&&(G[$-1]=void 0);let w=!1;if(he){const a=he.oldPos-$;w=he&&0<=a&&a<x}const h=_e&&_e.oldPos+1<J;if(!w&&!h){G[$]=void 0;continue}if(!h||w&&_e.oldPos<he.oldPos?le=this.addToPath(he,!0,!1,0,i):le=this.addToPath(_e,!1,!0,1,i),ve=this.extractCommon(le,f,t,$,i),le.oldPos+1>=J&&ve+1>=x)return b(this.buildValues(le.lastComponent,f,t))||!0;G[$]=le,le.oldPos+1>=J&&(ke=Math.min(ke,$-1)),ve+1>=x&&(q=Math.max(q,$+1))}d++};if(u)(function $(){setTimeout(function(){if(d>Q||Date.now()>j)return u(void 0);Ee()||$()},0)})();else for(;d<=Q&&Date.now()<=j;){const $=Ee();if($)return $}}addToPath(t,f,i,u,D){const b=t.lastComponent;return b&&!D.oneChangePerToken&&b.added===f&&b.removed===i?{oldPos:t.oldPos+u,lastComponent:{count:b.count+1,added:f,removed:i,previousComponent:b.previousComponent}}:{oldPos:t.oldPos+u,lastComponent:{count:1,added:f,removed:i,previousComponent:b}}}extractCommon(t,f,i,u,D){const b=f.length,x=i.length;let J=t.oldPos,d=J-u,Q=0;for(;d+1<b&&J+1<x&&this.equals(i[J+1],f[d+1],D);)d++,J++,Q++,D.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return Q&&!D.oneChangePerToken&&(t.lastComponent={count:Q,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=J,d}equals(t,f,i){return i.comparator?i.comparator(t,f):t===f||!!i.ignoreCase&&t.toLowerCase()===f.toLowerCase()}removeEmpty(t){const f=[];for(let i=0;i<t.length;i++)t[i]&&f.push(t[i]);return f}castInput(t,f){return t}tokenize(t,f){return Array.from(t)}join(t){return t.join("")}postProcess(t,f){return t}get useLongestToken(){return!1}buildValues(t,f,i){const u=[];let D;for(;t;)u.push(t),D=t.previousComponent,delete t.previousComponent,t=D;u.reverse();const b=u.length;let x=0,J=0,d=0;for(;x<b;x++){const Q=u[x];if(Q.removed)Q.value=this.join(i.slice(d,d+Q.count)),d+=Q.count;else{if(!Q.added&&this.useLongestToken){let H=f.slice(J,J+Q.count);H=H.map(function(j,G){const ve=i[d+G];return ve.length>j.length?ve:j}),Q.value=this.join(H)}else Q.value=this.join(f.slice(J,J+Q.count));J+=Q.count,Q.added||(d+=Q.count)}}return u}}const Kt="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class Ln extends On{tokenize(t){const f=new RegExp(`(\\r?\\n)|[${Kt}]+|[^\\S\\n\\r]+|[^${Kt}]`,"ug");return t.match(f)||[]}}const zn=new Ln;function Fn(W,t,f){return zn.diff(W,t,f)}var Mn=N('<div class="dp-row svelte-1g4tvol"><div class="dp-icon svelte-1g4tvol"><!></div> <div class="dp-key svelte-1g4tvol"> </div> <div class="dp-value svelte-1g4tvol"><div class="dp-diff-old svelte-1g4tvol"><span> </span></div> <div class="dp-diff-new svelte-1g4tvol"><span> </span></div></div></div>'),In=N('<div class="diff-properties svelte-1g4tvol"></div>'),jn=N('<span class="db-added"> </span>'),Nn=N('<span class="db-removed"> </span>'),Un=N("<span> </span>"),Kn=N("<span> </span>"),qn=N('<div class="diff-view svelte-1g4tvol"><!> <div class="diff-body svelte-1g4tvol"><!></div></div>');function Vn(W,t){at(t,!0);function f(j){if(j==null)return"";if(typeof j!="object")return String(j);const G=j;return String(G.name??G.title??G.label??G.id??JSON.stringify(G))}function i(j){return j==null?"":Array.isArray(j)?j.map(f).join(", "):typeof j=="object"?f(j):String(j)}const u=De(()=>t.refreshResult.body_changed&&t.refreshResult.body_diff?Fn(t.refreshResult.body_diff.old,t.refreshResult.body_diff.new):null);var D=qn(),b=C(D);{var x=j=>{var G=In();Me(G,21,()=>t.refreshResult.diffs,Ke,(ve,q)=>{const ke=De(()=>t.properties.find(c=>c.key===e(q).field));var Ee=Mn(),$=C(Ee),le=C($);{var _e=c=>{pt(c,{size:14})},he=c=>{_t(c,{size:14})},w=c=>{gt(c,{size:14})},h=c=>{Yt(c,{size:14})},a=c=>{ht(c,{size:14})};Se(le,c=>{e(ke)?.type==="date"?c(_e):e(ke)?.type==="status"?c(he,1):e(ke)?.type==="wikilink"?c(w,2):e(ke)?.type==="badge"?c(h,3):c(a,!1)})}m($);var n=Y($,2),o=C(n,!0);m(n);var _=Y(n,2),k=C(_),U=C(k),ge=C(U,!0);m(U),m(k);var Ce=Y(k,2),g=C(Ce),l=C(g,!0);m(g),m(Ce),m(_),m(Ee),ye((c,R)=>{me(o,e(q).field),me(ge,c),me(l,R)},[()=>i(e(q).old_value),()=>i(e(q).new_value)]),y(ve,Ee)}),m(G),y(j,G)};Se(b,j=>{t.refreshResult.diffs.length>0&&j(x)})}var J=Y(b,2),d=C(J);{var Q=j=>{var G=Le(),ve=we(G);Me(ve,17,()=>e(u),Ke,(q,ke)=>{var Ee=Le(),$=we(Ee);{var le=w=>{var h=jn(),a=C(h,!0);m(h),ye(()=>me(a,e(ke).value)),y(w,h)},_e=w=>{var h=Nn(),a=C(h,!0);m(h),ye(()=>me(a,e(ke).value)),y(w,h)},he=w=>{var h=Un(),a=C(h,!0);m(h),ye(()=>me(a,e(ke).value)),y(w,h)};Se($,w=>{e(ke).added?w(le):e(ke).removed?w(_e,1):w(he,!1)})}y(q,Ee)}),y(j,G)},H=j=>{var G=Kn(),ve=C(G,!0);m(G),ye(()=>me(ve,t.bodyContent)),y(j,G)};Se(d,j=>{e(u)?j(Q):j(H,!1)})}m(J),m(D),y(W,D),nt()}var Wn=N("<!> ",1),Hn=N('<span class="diff-action-title svelte-1dc9loe">Changes from source</span> <div class="diff-action-buttons svelte-1dc9loe"><!> <!></div>',1),Bn=N('<span class="bc-sep svelte-1dc9loe">/</span>'),Yn=N("<!><span> </span>",1),Jn=N('<span class="status-text saving svelte-1dc9loe">Saving...</span>'),Qn=N('<span class="status-text error svelte-1dc9loe"> </span>'),Gn=N("<!> ",1),Zn=N('<div class="breadcrumb-path svelte-1dc9loe"></div> <div class="editor-actions svelte-1dc9loe"><!> <!> <!></div>',1),Xn=N('<div class="refresh-panel svelte-1dc9loe"><div class="refresh-uptodate svelte-1dc9loe">Entity is up to date with source.</div></div>'),$n=N('<div class="document-scroll svelte-1dc9loe"><!> <!></div>'),er=N('<div class="content-row svelte-1dc9loe"><div class="entity-area svelte-1dc9loe"><!> <div><!></div> <!> <!></div> <!></div>'),tr=N("<!> <!>",1),ar=N("<!> <!>",1),nr=N("<!> <!>",1);function yr(W,t){at(t,!0);const f=Wt("chat"),i=De(()=>t.data.type==="dataset"||t.data.entity.document?.frontmatter?.entity_type==="dataset"),u=De(()=>yt.getAppForEntityType(t.data.entity.document?.frontmatter?.entity_type??t.data.type)),D=De(()=>()=>{const v=t.data.entity.path;if(v){const p=v.lastIndexOf(`/${t.data.repo}/`);if(p>=0)return v.substring(p+1).split("/")}return[t.data.repo,t.data.id,"main.md"]});let b=Ae(""),x=Ae(Qe({})),J=Ae(0);const d=De(()=>Dn(e(x))),Q=De(()=>!!t.data.entity.data?.source_ref);let H=Ae(!1),j=Ae(null),G=Ae(null);async function ve(){if(!e(H)){E(H,!0),E(j,null),E(G,null);try{const{result:v}=await Aa(t.data.repo,t.data.type,t.data.id);E(j,v,!0)}catch(v){E(G,v.message||"Refresh failed",!0)}finally{E(H,!1)}}}let q=Ae(!1);async function ke(){if(!e(q)){E(q,!0);try{await Pa(t.data.repo,t.data.type,t.data.id),E(j,null),await da()}catch(v){E(G,v.message||"Apply changes failed",!0)}finally{E(q,!1)}}}let Ee=null,$=Ae(""),le=!1,_e=Ae(Qe([]));function he(v){w(),qe(async()=>{const{createCollabSession:p}=await import("../chunks/CnKc_Tae.js");return{createCollabSession:p}},__vite__mapDeps([8,9,10,11,12,13,14,15]),import.meta.url).then(({createCollabSession:p})=>{const L=getComputedStyle(document.documentElement).getPropertyValue("--color-accent").trim()||"#6e6ee8",r=p(v,{name:Lt.user?.displayName??"Anonymous",color:L,colorLight:L+"33"});r.ytext.observe(()=>{const O=r.ytext.toString();O!==e(b)&&(le=!0,E(b,O,!0),requestAnimationFrame(()=>{le=!1}))});const s=r.ydoc.clientID;function T(){const O=[];r.awareness.getStates().forEach((B,P)=>{if(P===s)return;const A=B.cell;if(A==null||A.row==null||A.col==null)return;const{name:ee="Anonymous",color:S="#6e6ee8"}=B.user||{};O.push({row:A.row,col:A.col,name:ee,color:S})}),E(_e,O,!0)}r.awareness.on("change",T),Ee=r,E($,v,!0)})}function w(){Ee&&(Ee.destroy(),Ee=null,E($,""),E(_e,[],!0))}Ht(()=>w());let h=Ae(""),a=Ae(0);Ge(()=>{const v=`${t.data.repo}/${t.data.type}/${t.data.id}`,p=Ra.mutationCount;if(v!==e(h)||p!==e(a)){e(h)&&v!==e(h)&&je.flush(),E(h,v),E(a,p,!0),E(b,t.data.entity.document?.content??"",!0),E(x,{...t.data.entity.document?.frontmatter??t.data.entity.data??{}},!0),ot(J),je.reset();const L=`${t.data.repo}/${t.data.type}/${t.data.id}`;e(i)&&L!==e($)?he(L):e(i)||w()}}),Ge(()=>{const v=t.data.repo,p=t.data.type,L=t.data.id;qt(()=>{Pt.select(v,p,L),Pt.showEntity()})});function n(v){if(!le){if(E(b,v,!0),Ee){const p=Ee.ytext,L=p.toString();v!==L&&Ee.ydoc.transact(()=>{p.delete(0,p.length),p.insert(0,v)})}je.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{content:v})}}function o(v,p){E(x,{...e(x),[v]:p},!0),je.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:e(x)})}function _(v){const{[v]:p,...L}=e(x);E(x,L,!0),je.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:e(x)})}function k(v,p){E(x,{...e(x),[v]:p},!0),je.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:e(x)})}function U(v,p){je.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:e(x)})}function ge(v){for(const p of yt.repos){const L=p.entities.find(r=>r.id===v);if(L){Rt(`/${p.name}/${L.entityType}/${L.id}`);return}}ua.showToast(`"${v}" is in a collection you don't have access to`)}Ge(()=>(Mt.enter(t.data.repo,t.data.type,t.data.id),()=>Mt.leave()));const Ce=De(()=>e(j)!==null&&(e(j).diffs.length>0||e(j).body_changed));function g(v){(v.metaKey||v.ctrlKey)&&v.key==="s"&&(v.preventDefault(),je.flush()),v.key==="Escape"&&!(v.target instanceof HTMLInputElement||v.target instanceof HTMLTextAreaElement)&&(je.flush(),Pt.deselect(),Rt("/"))}var l=nr();Je("keydown",Vt,g);var c=we(l);ya(c,{children:(v,p)=>{var L=er(),r=C(L),s=C(r);Da(s,{activeView:"entity"});var T=Y(s,2);let O;var B=C(T);{var P=ce=>{var I=Hn(),ie=Y(we(I),2),Pe=C(ie);Ie(Pe,{variant:"outline",size:"default",onclick:()=>E(j,null),get disabled(){return e(q)},children:(F,M)=>{Ve();var K=Ye("Dismiss");y(F,K)},$$slots:{default:!0}});var z=Y(Pe,2);Ie(z,{variant:"accent",size:"default",onclick:ke,get disabled(){return e(q)},children:(F,M)=>{var K=Wn(),oe=we(K);{var ue=Z=>{Ut(Z,{class:"size-3 animate-spin",style:"display:inline;vertical-align:middle;margin-right:4px"})};Se(oe,Z=>{e(q)&&Z(ue)})}var be=Y(oe,1,!0);ye(()=>me(be,e(q)?"Applying...":"Apply changes")),y(F,K)},$$slots:{default:!0}}),m(ie),y(ce,I)},A=ce=>{var I=Zn(),ie=we(I);Me(ie,21,()=>e(D)(),Ke,(Z,te,Re)=>{var X=Yn(),V=we(X);{var ne=Te=>{var Oe=Bn();y(Te,Oe)};Se(V,Te=>{Re>0&&Te(ne)})}var pe=Y(V),xe=C(pe,!0);m(pe),ye(Te=>{tt(pe,1,Te,"svelte-1dc9loe"),me(xe,e(te))},[()=>ia(Re===e(D)().length-1?"bc-current":"bc-segment")]),y(Z,X)}),m(ie);var Pe=Y(ie,2),z=C(Pe);{var F=Z=>{var te=Jn();y(Z,te)},M=Z=>{var te=Qn(),Re=C(te,!0);m(te),ye(()=>me(Re,je.error)),y(Z,te)};Se(z,Z=>{je.saving?Z(F):je.error&&Z(M,1)})}var K=Y(z,2);{var oe=Z=>{Ie(Z,{variant:"outline",size:"sm",class:"refresh-btn",onclick:ve,get disabled(){return e(H)},children:(te,Re)=>{var X=Gn(),V=we(X);{var ne=xe=>{Ut(xe,{class:"size-3 animate-spin",style:"display:inline;vertical-align:middle;margin-right:4px"})};Se(V,xe=>{e(H)&&xe(ne)})}var pe=Y(V,1,!0);ye(()=>me(pe,e(H)?"Refreshing...":"Refresh from source")),y(te,X)},$$slots:{default:!0}})};Se(K,Z=>{e(Q)&&Lt.user?.role==="admin"&&Z(oe)})}var ue=Y(K,2);{var be=Z=>{Ie(Z,{variant:"link",size:"sm",class:"open-app",get href(){return`/${t.data.repo??""}/${t.data.type??""}/${t.data.id??""}/edit`},children:(te,Re)=>{Ve();var X=Ye();ye(()=>me(X,`Open in ${e(u).name??""} →`)),y(te,X)},$$slots:{default:!0}})};Se(ue,Z=>{e(u)&&Z(be)})}m(Pe),y(ce,I)};Se(B,ce=>{e(Ce)?ce(P):ce(A,!1)})}m(T);var ee=Y(T,2);{var S=ce=>{var I=Xn();y(ce,I)};Se(ee,ce=>{e(j)&&!e(Ce)&&ce(S)})}var se=Y(ee,2);{var fe=ce=>{Vn(ce,{get properties(){return e(d)},get refreshResult(){return e(j)},get bodyContent(){return e(b)}})},re=ce=>{var I=$n(),ie=C(I);un(ie,{get properties(){return e(d)},editable:!0,onedit:o,onremove:_,onadd:k,ontypechange:U});var Pe=Y(ie,2);{var z=M=>{Cn(M,{get content(){return e(b)},onchange:n,onsave:()=>je.flush(),oncellselect:(K,oe)=>{Ee?.awareness.setLocalStateField("cell",{row:K,col:oe})},get remoteCursors(){return e(_e)}})},F=M=>{{let K=De(()=>`${t.data.repo}/${t.data.type}/${t.data.id}`);hn(M,{get content(){return e(b)},readonly:!1,onchange:n,onsave:()=>je.flush(),onwikilinkclick:ge,get resetKey(){return e(J)},get cursorDocName(){return e(K)}})}};Se(Pe,M=>{e(i)?M(z):M(F,!1)})}m(I),y(ce,I)};Se(se,ce=>{e(Ce)?ce(fe):ce(re,!1)})}m(r);var de=Y(r,2);{var ae=ce=>{Ta(ce,{})};Se(de,ce=>{f.open&&ce(ae)})}m(L),ye(()=>O=tt(T,1,"editor-bar svelte-1dc9loe",null,O,{"editor-bar-diff":e(Ce)})),y(v,L)},$$slots:{default:!0}});var R=Y(c,2);{let v=De(()=>!!e(G));Ne(R,()=>Sa,(p,L)=>{L(p,{get open(){return e(v)},onOpenChange:r=>{r||E(G,null)},children:(r,s)=>{var T=Le(),O=we(T);Ne(O,()=>wa,(B,P)=>{P(B,{children:(A,ee)=>{var S=ar(),se=we(S);Ne(se,()=>ka,(re,de)=>{de(re,{children:(ae,ce)=>{var I=tr(),ie=we(I);Ne(ie,()=>ba,(z,F)=>{F(z,{children:(M,K)=>{Ve();var oe=Ye("Refresh failed");y(M,oe)},$$slots:{default:!0}})});var Pe=Y(ie,2);Ne(Pe,()=>xa,(z,F)=>{F(z,{children:(M,K)=>{Ve();var oe=Ye();ye(()=>me(oe,e(G))),y(M,oe)},$$slots:{default:!0}})}),y(ae,I)},$$slots:{default:!0}})});var fe=Y(se,2);Ne(fe,()=>Ea,(re,de)=>{de(re,{children:(ae,ce)=>{var I=Le(),ie=we(I);Ne(ie,()=>Ca,(Pe,z)=>{z(Pe,{children:(F,M)=>{Ve();var K=Ye("OK");y(F,K)},$$slots:{default:!0}})}),y(ae,I)},$$slots:{default:!0}})}),y(A,S)},$$slots:{default:!0}})}),y(r,T)},$$slots:{default:!0}})})}y(W,l),nt()}export{yr as component,mr as universal};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/BaUG0bh_.js","../chunks/DJKRyj_1.js","../chunks/8FUQuwgM.js","../chunks/CbJfRYJV.js","../chunks/CqkleIqs.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as Ie,g as Mt,a as gt,f as Tt,s as Rt,e as te,c as ae}from"../chunks/0x0awhVy.js";import{q as se,t as Ce,a as Nt,g as p,T as et,R as De,bo as He,A as At,v as le,w as ut,x as dt,z as it,D as ot,F as pt,f as ce,bp as Ve}from"../chunks/8FUQuwgM.js";import{p as Gt,b as Ne,l as Ae,s as ze,i as ee}from"../chunks/CbJfRYJV.js";import{n as _t,I as Pe,s as Se,A as Ke}from"../chunks/Scb_NG-a.js";import{V as Qe,c as Je,C as Ze}from"../chunks/DKIqe64p.js";import{_ as qe}from"../chunks/DJKRyj_1.js";import{e as ne,i as ie,n as qt}from"../chunks/glgUBDR2.js";import{s as tn,i as zt,w as Yt}from"../chunks/EDLlAC9C.js";import{g as en}from"../chunks/CIZkRAuY.js";import{B as nn}from"../chunks/BVmVTxxa.js";import"../chunks/Bl1mtM70.js";function rn(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return ke(this.cover(e,n),e,n,t)}function ke(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var r,s=t._root,c={data:i},o=t._x0,h=t._y0,a=t._x1,d=t._y1,C,x,f,y,u,l,g,w;if(!s)return t._root=c,t;for(;s.length;)if((u=e>=(C=(o+a)/2))?o=C:a=C,(l=n>=(x=(h+d)/2))?h=x:d=x,r=s,!(s=s[g=l<<1|u]))return r[g]=c,t;if(f=+t._x.call(null,s.data),y=+t._y.call(null,s.data),e===f&&n===y)return c.next=s,r?r[g]=c:t._root=c,t;do r=r?r[g]=new Array(4):t._root=new Array(4),(u=e>=(C=(o+a)/2))?o=C:a=C,(l=n>=(x=(h+d)/2))?h=x:d=x;while((g=l<<1|u)===(w=(y>=x)<<1|f>=C));return r[w]=s,r[g]=c,t}function on(t){var e,n,i=t.length,r,s,c=new Array(i),o=new Array(i),h=1/0,a=1/0,d=-1/0,C=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(s=+this._y.call(null,e))||(c[n]=r,o[n]=s,r<h&&(h=r),r>d&&(d=r),s<a&&(a=s),s>C&&(C=s));if(h>d||a>C)return this;for(this.cover(h,a).cover(d,C),n=0;n<i;++n)ke(this,c[n],o[n],t[n]);return this}function an(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,r=this._x1,s=this._y1;if(isNaN(n))r=(n=Math.floor(t))+1,s=(i=Math.floor(e))+1;else{for(var c=r-n||1,o=this._root,h,a;n>t||t>=r||i>e||e>=s;)switch(a=(e<i)<<1|t<n,h=new Array(4),h[a]=o,o=h,c*=2,a){case 0:r=n+c,s=i+c;break;case 1:n=r-c,s=i+c;break;case 2:r=n+c,i=s-c;break;case 3:n=r-c,i=s-c;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._y0=i,this._x1=r,this._y1=s,this}function sn(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function ln(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function at(t,e,n,i,r){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=r}function cn(t,e,n){var i,r=this._x0,s=this._y0,c,o,h,a,d=this._x1,C=this._y1,x=[],f=this._root,y,u;for(f&&x.push(new at(f,r,s,d,C)),n==null?n=1/0:(r=t-n,s=e-n,d=t+n,C=e+n,n*=n);y=x.pop();)if(!(!(f=y.node)||(c=y.x0)>d||(o=y.y0)>C||(h=y.x1)<r||(a=y.y1)<s))if(f.length){var l=(c+h)/2,g=(o+a)/2;x.push(new at(f[3],l,g,h,a),new at(f[2],c,g,l,a),new at(f[1],l,o,h,g),new at(f[0],c,o,l,g)),(u=(e>=g)<<1|t>=l)&&(y=x[x.length-1],x[x.length-1]=x[x.length-1-u],x[x.length-1-u]=y)}else{var w=t-+this._x.call(null,f.data),N=e-+this._y.call(null,f.data),m=w*w+N*N;if(m<n){var z=Math.sqrt(n=m);r=t-z,s=e-z,d=t+z,C=e+z,i=f.data}}return i}function fn(t){if(isNaN(d=+this._x.call(null,t))||isNaN(C=+this._y.call(null,t)))return this;var e,n=this._root,i,r,s,c=this._x0,o=this._y0,h=this._x1,a=this._y1,d,C,x,f,y,u,l,g;if(!n)return this;if(n.length)for(;;){if((y=d>=(x=(c+h)/2))?c=x:h=x,(u=C>=(f=(o+a)/2))?o=f:a=f,e=n,!(n=n[l=u<<1|y]))return this;if(!n.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(i=e,g=l)}for(;n.data!==t;)if(r=n,!(n=n.next))return this;return(s=n.next)&&delete n.next,r?(s?r.next=s:delete r.next,this):e?(s?e[l]=s:delete e[l],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(i?i[g]=n:this._root=n),this):(this._root=s,this)}function un(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function hn(){return this._root}function dn(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function gn(t){var e=[],n,i=this._root,r,s,c,o,h;for(i&&e.push(new at(i,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(i=n.node,s=n.x0,c=n.y0,o=n.x1,h=n.y1)&&i.length){var a=(s+o)/2,d=(c+h)/2;(r=i[3])&&e.push(new at(r,a,d,o,h)),(r=i[2])&&e.push(new at(r,s,d,a,h)),(r=i[1])&&e.push(new at(r,a,c,o,d)),(r=i[0])&&e.push(new at(r,s,c,a,d))}return this}function vn(t){var e=[],n=[],i;for(this._root&&e.push(new at(this._root,this._x0,this._y0,this._x1,this._y1));i=e.pop();){var r=i.node;if(r.length){var s,c=i.x0,o=i.y0,h=i.x1,a=i.y1,d=(c+h)/2,C=(o+a)/2;(s=r[0])&&e.push(new at(s,c,o,d,C)),(s=r[1])&&e.push(new at(s,d,o,h,C)),(s=r[2])&&e.push(new at(s,c,C,d,a)),(s=r[3])&&e.push(new at(s,d,C,h,a))}n.push(i)}for(;i=n.pop();)t(i.node,i.x0,i.y0,i.x1,i.y1);return this}function pn(t){return t[0]}function yn(t){return arguments.length?(this._x=t,this):this._x}function xn(t){return t[1]}function mn(t){return arguments.length?(this._y=t,this):this._y}function fe(t,e,n){var i=new ue(e??pn,n??xn,NaN,NaN,NaN,NaN);return t==null?i:i.addAll(t)}function ue(t,e,n,i,r,s){this._x=t,this._y=e,this._x0=n,this._y0=i,this._x1=r,this._y1=s,this._root=void 0}function ge(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var lt=fe.prototype=ue.prototype;lt.copy=function(){var t=new ue(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,i;if(!e)return t;if(!e.length)return t._root=ge(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var r=0;r<4;++r)(i=e.source[r])&&(i.length?n.push({source:i,target:e.target[r]=new Array(4)}):e.target[r]=ge(i));return t};lt.add=rn;lt.addAll=on;lt.cover=an;lt.data=sn;lt.extent=ln;lt.find=cn;lt.remove=fn;lt.removeAll=un;lt.root=hn;lt.size=dn;lt.visit=gn;lt.visitAfter=vn;lt.x=yn;lt.y=mn;function st(t){return function(){return t}}function yt(t){return(t()-.5)*1e-6}function wn(t){return t.x+t.vx}function _n(t){return t.y+t.vy}function ve(t){var e,n,i,r=1,s=1;typeof t!="function"&&(t=st(t==null?1:+t));function c(){for(var a,d=e.length,C,x,f,y,u,l,g=0;g<s;++g)for(C=fe(e,wn,_n).visitAfter(o),a=0;a<d;++a)x=e[a],u=n[x.index],l=u*u,f=x.x+x.vx,y=x.y+x.vy,C.visit(w);function w(N,m,z,P,$){var B=N.data,Z=N.r,W=u+Z;if(B){if(B.index>x.index){var ct=f-B.x-B.vx,Q=y-B.y-B.vy,rt=ct*ct+Q*Q;rt<W*W&&(ct===0&&(ct=yt(i),rt+=ct*ct),Q===0&&(Q=yt(i),rt+=Q*Q),rt=(W-(rt=Math.sqrt(rt)))/rt*r,x.vx+=(ct*=rt)*(W=(Z*=Z)/(l+Z)),x.vy+=(Q*=rt)*W,B.vx-=ct*(W=1-W),B.vy-=Q*W)}return}return m>f+W||P<f-W||z>y+W||$<y-W}}function o(a){if(a.data)return a.r=n[a.data.index];for(var d=a.r=0;d<4;++d)a[d]&&a[d].r>a.r&&(a.r=a[d].r)}function h(){if(e){var a,d=e.length,C;for(n=new Array(d),a=0;a<d;++a)C=e[a],n[C.index]=+t(C,a,e)}}return c.initialize=function(a,d){e=a,i=d,h()},c.iterations=function(a){return arguments.length?(s=+a,c):s},c.strength=function(a){return arguments.length?(r=+a,c):r},c.radius=function(a){return arguments.length?(t=typeof a=="function"?a:st(+a),h(),c):t},c}function Mn(t){return t.index}function pe(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function ye(t){var e=Mn,n=C,i,r=st(30),s,c,o,h,a,d=1;t==null&&(t=[]);function C(l){return 1/Math.min(o[l.source.index],o[l.target.index])}function x(l){for(var g=0,w=t.length;g<d;++g)for(var N=0,m,z,P,$,B,Z,W;N<w;++N)m=t[N],z=m.source,P=m.target,$=P.x+P.vx-z.x-z.vx||yt(a),B=P.y+P.vy-z.y-z.vy||yt(a),Z=Math.sqrt($*$+B*B),Z=(Z-s[N])/Z*l*i[N],$*=Z,B*=Z,P.vx-=$*(W=h[N]),P.vy-=B*W,z.vx+=$*(W=1-W),z.vy+=B*W}function f(){if(c){var l,g=c.length,w=t.length,N=new Map(c.map((z,P)=>[e(z,P,c),z])),m;for(l=0,o=new Array(g);l<w;++l)m=t[l],m.index=l,typeof m.source!="object"&&(m.source=pe(N,m.source)),typeof m.target!="object"&&(m.target=pe(N,m.target)),o[m.source.index]=(o[m.source.index]||0)+1,o[m.target.index]=(o[m.target.index]||0)+1;for(l=0,h=new Array(w);l<w;++l)m=t[l],h[l]=o[m.source.index]/(o[m.source.index]+o[m.target.index]);i=new Array(w),y(),s=new Array(w),u()}}function y(){if(c)for(var l=0,g=t.length;l<g;++l)i[l]=+n(t[l],l,t)}function u(){if(c)for(var l=0,g=t.length;l<g;++l)s[l]=+r(t[l],l,t)}return x.initialize=function(l,g){c=l,a=g,f()},x.links=function(l){return arguments.length?(t=l,f(),x):t},x.id=function(l){return arguments.length?(e=l,x):e},x.iterations=function(l){return arguments.length?(d=+l,x):d},x.strength=function(l){return arguments.length?(n=typeof l=="function"?l:st(+l),y(),x):n},x.distance=function(l){return arguments.length?(r=typeof l=="function"?l:st(+l),u(),x):r},x}var bn={value:()=>{}};function Ee(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new jt(n)}function jt(t){this._=t}function Tn(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}jt.prototype=Ee.prototype={constructor:jt,on:function(t,e){var n=this._,i=Tn(t+"",n),r,s=-1,c=i.length;if(arguments.length<2){for(;++s<c;)if((r=(t=i[s]).type)&&(r=In(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<c;)if(r=(t=i[s]).type)n[r]=xe(n[r],t.name,e);else if(e==null)for(r in n)n[r]=xe(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new jt(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,r=s.length;i<r;++i)s[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,s=i.length;r<s;++r)i[r].value.apply(e,n)}};function In(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function xe(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=bn,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var Pt=0,kt=0,St=0,Re=1e3,Wt,Et,$t=0,bt=0,Ut=0,Lt=typeof performance=="object"&&performance.now?performance:Date,Le=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Xe(){return bt||(Le(Cn),bt=Lt.now()+Ut)}function Cn(){bt=0}function re(){this._call=this._time=this._next=null}re.prototype=Fe.prototype={constructor:re,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Xe():+n)+(e==null?0:+e),!this._next&&Et!==this&&(Et?Et._next=this:Wt=this,Et=this),this._call=t,this._time=n,oe()},stop:function(){this._call&&(this._call=null,this._time=1/0,oe())}};function Fe(t,e,n){var i=new re;return i.restart(t,e,n),i}function Dn(){Xe(),++Pt;for(var t=Wt,e;t;)(e=bt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Pt}function me(){bt=($t=Lt.now())+Ut,Pt=kt=0;try{Dn()}finally{Pt=0,An(),bt=0}}function Nn(){var t=Lt.now(),e=t-$t;e>Re&&(Ut-=e,$t=t)}function An(){for(var t,e=Wt,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Wt=n);Et=t,oe(i)}function oe(t){if(!Pt){kt&&(kt=clearTimeout(kt));var e=t-bt;e>24?(t<1/0&&(kt=setTimeout(me,t-Lt.now()-Ut)),St&&(St=clearInterval(St))):(St||($t=Lt.now(),St=setInterval(Nn,Re)),Pt=1,Le(me))}}const zn=1664525,Pn=1013904223,we=4294967296;function Sn(){let t=1;return()=>(t=(zn*t+Pn)%we)/we}function kn(t){return t.x}function En(t){return t.y}var Rn=10,Ln=Math.PI*(3-Math.sqrt(5));function _e(t){var e,n=1,i=.001,r=1-Math.pow(i,1/300),s=0,c=.6,o=new Map,h=Fe(C),a=Ee("tick","end"),d=Sn();t==null&&(t=[]);function C(){x(),a.call("tick",e),n<i&&(h.stop(),a.call("end",e))}function x(u){var l,g=t.length,w;u===void 0&&(u=1);for(var N=0;N<u;++N)for(n+=(s-n)*r,o.forEach(function(m){m(n)}),l=0;l<g;++l)w=t[l],w.fx==null?w.x+=w.vx*=c:(w.x=w.fx,w.vx=0),w.fy==null?w.y+=w.vy*=c:(w.y=w.fy,w.vy=0);return e}function f(){for(var u=0,l=t.length,g;u<l;++u){if(g=t[u],g.index=u,g.fx!=null&&(g.x=g.fx),g.fy!=null&&(g.y=g.fy),isNaN(g.x)||isNaN(g.y)){var w=Rn*Math.sqrt(.5+u),N=u*Ln;g.x=w*Math.cos(N),g.y=w*Math.sin(N)}(isNaN(g.vx)||isNaN(g.vy))&&(g.vx=g.vy=0)}}function y(u){return u.initialize&&u.initialize(t,d),u}return f(),e={tick:x,restart:function(){return h.restart(C),e},stop:function(){return h.stop(),e},nodes:function(u){return arguments.length?(t=u,f(),o.forEach(y),e):t},alpha:function(u){return arguments.length?(n=+u,e):n},alphaMin:function(u){return arguments.length?(i=+u,e):i},alphaDecay:function(u){return arguments.length?(r=+u,e):+r},alphaTarget:function(u){return arguments.length?(s=+u,e):s},velocityDecay:function(u){return arguments.length?(c=1-u,e):1-c},randomSource:function(u){return arguments.length?(d=u,o.forEach(y),e):d},force:function(u,l){return arguments.length>1?(l==null?o.delete(u):o.set(u,y(l)),e):o.get(u)},find:function(u,l,g){var w=0,N=t.length,m,z,P,$,B;for(g==null?g=1/0:g*=g,w=0;w<N;++w)$=t[w],m=u-$.x,z=l-$.y,P=m*m+z*z,P<g&&(B=$,g=P);return B},on:function(u,l){return arguments.length>1?(a.on(u,l),e):a.on(u)}}}function Me(){var t,e,n,i,r=st(-30),s,c=1,o=1/0,h=.81;function a(f){var y,u=t.length,l=fe(t,kn,En).visitAfter(C);for(i=f,y=0;y<u;++y)e=t[y],l.visit(x)}function d(){if(t){var f,y=t.length,u;for(s=new Array(y),f=0;f<y;++f)u=t[f],s[u.index]=+r(u,f,t)}}function C(f){var y=0,u,l,g=0,w,N,m;if(f.length){for(w=N=m=0;m<4;++m)(u=f[m])&&(l=Math.abs(u.value))&&(y+=u.value,g+=l,w+=l*u.x,N+=l*u.y);f.x=w/g,f.y=N/g}else{u=f,u.x=u.data.x,u.y=u.data.y;do y+=s[u.data.index];while(u=u.next)}f.value=y}function x(f,y,u,l){if(!f.value)return!0;var g=f.x-e.x,w=f.y-e.y,N=l-y,m=g*g+w*w;if(N*N/h<m)return m<o&&(g===0&&(g=yt(n),m+=g*g),w===0&&(w=yt(n),m+=w*w),m<c&&(m=Math.sqrt(c*m)),e.vx+=g*f.value*i/m,e.vy+=w*f.value*i/m),!0;if(f.length||m>=o)return;(f.data!==e||f.next)&&(g===0&&(g=yt(n),m+=g*g),w===0&&(w=yt(n),m+=w*w),m<c&&(m=Math.sqrt(c*m)));do f.data!==e&&(N=s[f.data.index]*i/m,e.vx+=g*N,e.vy+=w*N);while(f=f.next)}return a.initialize=function(f,y){t=f,n=y,d()},a.strength=function(f){return arguments.length?(r=typeof f=="function"?f:st(+f),d(),a):r},a.distanceMin=function(f){return arguments.length?(c=f*f,a):Math.sqrt(c)},a.distanceMax=function(f){return arguments.length?(o=f*f,a):Math.sqrt(o)},a.theta=function(f){return arguments.length?(h=f*f,a):Math.sqrt(h)},a}function be(t){var e=st(.1),n,i,r;typeof t!="function"&&(t=st(t==null?0:+t));function s(o){for(var h=0,a=n.length,d;h<a;++h)d=n[h],d.vx+=(r[h]-d.x)*i[h]*o}function c(){if(n){var o,h=n.length;for(i=new Array(h),r=new Array(h),o=0;o<h;++o)i[o]=isNaN(r[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return s.initialize=function(o){n=o,c()},s.strength=function(o){return arguments.length?(e=typeof o=="function"?o:st(+o),c(),s):e},s.x=function(o){return arguments.length?(t=typeof o=="function"?o:st(+o),c(),s):t},s}function Te(t){var e=st(.1),n,i,r;typeof t!="function"&&(t=st(t==null?0:+t));function s(o){for(var h=0,a=n.length,d;h<a;++h)d=n[h],d.vy+=(r[h]-d.y)*i[h]*o}function c(){if(n){var o,h=n.length;for(i=new Array(h),r=new Array(h),o=0;o<h;++o)i[o]=isNaN(r[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return s.initialize=function(o){n=o,c()},s.strength=function(o){return arguments.length?(e=typeof o=="function"?o:st(+o),c(),s):e},s.y=function(o){return arguments.length?(t=typeof o=="function"?o:st(+o),c(),s):t},s}var Xn=Tt('<div><span class="legend-dot svelte-1i33fky"></span> <span class="legend-label svelte-1i33fky"> </span> <span class="legend-count svelte-1i33fky"> </span></div>'),Fn=Tt('<div class="graph-view svelte-1i33fky"><div class="canvas-wrap svelte-1i33fky"><div class="legend-panel svelte-1i33fky"></div></div></div>');function On(t,e){se(e,!0);let n=Gt(e,"selectedEntityId",3,null),i=Gt(e,"filteredIds",3,null),r=Gt(e,"sidebarHoveredId",3,null),s=Gt(e,"highlightedIds",3,null);function c(v){return e.nameMap?.get(v)??v.replace(/-/g," ").replace(/\b\w/g,_=>_.toUpperCase())}const o=Ce("theme"),h=et(()=>o.current==="light"?{default:14211288,dim:15263976,conn:12632256,labelText:1710623}:{default:2763306,dim:1315860,conn:4210752,labelText:15592943}),a=et(()=>o.current==="light"?16316666:592139),d=.75;Nt(()=>{o.current,K&&(K.style.fill=p(h).labelText);const v=p(Bt);for(const _ of y)_t(_.type)===Ct&&(_.color=v);tt()}),Nt(()=>{i(),tt()}),Nt(()=>{s(),tt()}),Nt(()=>{n(),tt()});let C=!1;Nt(()=>{const v=e.graphData;if(!q||!D||!R)return;if(!C){C=!0;return}const _=new Map;for(const T of v.edges)_.set(T.source,(_.get(T.source)??0)+1),_.set(T.target,(_.get(T.target)??0)+1);const M=new Map;for(const T of y)M.set(T.id,{x:T.x,y:T.y});const G=3600*v.nodes.length,Y=Math.sqrt(G),O=v.nodes.map(T=>{const j=_.get(T.id)??0,ht=M.get(T.id);return{id:T.id,type:T.type,repo:T.repo,color:_t(T.type)===Ct?p(Bt):_t(T.type),weight:j,x:ht?.x??(Math.random()-.5)*Y,y:ht?.y??(Math.random()-.5)*Y,vx:0,vy:0,r:It(j)}}),V=new Map;for(const T of O)V.set(T.id,T);const nt=new Set(L.keys()),ft=new Set(v.nodes.map(T=>T.id));for(const T of nt)if(!ft.has(T)){const j=L.get(T);j&&(R.removeChild(j),j.destroy()),L.delete(T)}let F=null;if(L.size>0&&(F=L.values().next().value?.texture),!F){const T=document.createElement("canvas");T.width=100,T.height=100;const j=T.getContext("2d");j.beginPath(),j.arc(50,50,48,0,Math.PI*2),j.fillStyle="#ffffff",j.fill(),F=q.Texture.from(T)}for(const T of O){let j=L.get(T.id);j||(j=new q.Sprite(F),j.anchor.set(.5),R.addChild(j),L.set(T.id,j)),j.tint=Ft(T.color)}y=O,f?.stop();const vt=v.edges.map(T=>({source:T.source,target:T.target})),X=ye(vt).id(T=>T.id).distance(250);f=_e(y).force("link",X).force("charge",Me().strength(-1e3).distanceMin(30)).force("x",be(0).strength(.1)).force("y",Te(0).strength(.1)).force("collide",ve().radius(60).strength(.5)).velocityDecay(.4).alpha(.3).on("tick",()=>{rt||Vt(),tt()}),u=X.links(),z=null,Xt(),tt()}),Nt(()=>{const v=r();if(v){const _=y.find(M=>M.id===v)??null;z=_,Xt(),b=_?1:0}else P||(b=0);tt()});let x,f=null,y=[],u=[],l=!1,g=0,w=0,N=0,m=1,z=null,P=null,$=pt(!1),B=0,Z=0,W=0,ct=0,Q=new Set,rt=!1,xt=pt(null),I=0,b=0;const E=4;let D=null,S=null,U=null,R=null,L=new Map,H=null,K=null,q=null;function It(v){return Math.max(3,Math.min(Math.sqrt(v+1)+2,10))}function Ht(v,_){const M=x.getBoundingClientRect();return{x:(v-M.left-w)/m,y:(_-M.top-N)/m}}function he(v,_){for(let M=y.length-1;M>=0;M--){const k=y[M],G=v-k.x,Y=_-k.y,O=(k.r*1.5+4)/m;if(G*G+Y*Y<=O*O)return k}return null}function Xt(){const v=z??null;if(Q.clear(),!!v){Q.add(v.id);for(const _ of u)_.source.id===v.id&&Q.add(_.target.id),_.target.id===v.id&&Q.add(_.source.id);if(R){const _=L.get(v.id);_&&R.setChildIndex(_,R.children.length-1)}}}function Vt(){if(y.length===0||!x)return;let v=1/0,_=-1/0,M=1/0,k=-1/0,G=0;for(const F of y)F.x<v&&(v=F.x),F.x>_&&(_=F.x),F.y<M&&(M=F.y),F.y>k&&(k=F.y),F.r>G&&(G=F.r);const Y=x.clientWidth,O=x.clientHeight,V=_-v,nt=k-M;if(V===0||nt===0)return;const ft=(60+G)*2;m=Math.min((Y-ft)/V,(O-ft)/nt,3),w=Y/2-(v+_)/2*m,N=O/2-(M+k)/2*m,tt()}function tt(){l=!0,g=0}function Ft(v){return parseInt(v.replace("#",""),16)}function mt(v,_,M){const k=(v>>16&255)+M*((_>>16&255)-(v>>16&255)),G=(v>>8&255)+M*((_>>8&255)-(v>>8&255)),Y=(v&255)+M*((_&255)-(v&255));return Math.round(k)<<16|Math.round(G)<<8|Math.round(Y)}function Oe(){if(!q||!S||!U)return;S.clear(),U.clear();const _=z!==null,M=I,k=p(xt),G=s(),Y=i(),O=p(h).default,V=p(h).dim,nt=p(h).conn;for(let ft=0;ft<u.length;ft++){const F=u[ft],vt=F.source.x*m+w,X=F.source.y*m+N,T=F.target.x*m+w,j=F.target.y*m+N,ht=_&&M>.01&&Q.has(F.source.id)&&Q.has(F.target.id);let A=O;_&&M>.01?A=ht?mt(O,nt,M):mt(O,V,M):(k!==null||G!==null||Y!==null)&&(A=V);const J=ht?U:S,Dt=ht?1:.2;J.setStrokeStyle({width:1,color:A,alpha:Dt}),J.moveTo(vt,X),J.lineTo(T,j),J.stroke()}}function Be(){if(!q)return;const v=z,_=v!==null,M=I,k=p(xt),G=s(),Y=i(),O=!v&&n()?y.find(X=>X.id===n())??null:null,V=new Set;if(O){V.add(O.id);for(const X of u)X.source.id===O.id&&V.add(X.target.id),X.target.id===O.id&&V.add(X.source.id)}for(const X of y){const T=L.get(X.id);if(!T)continue;const j=X.x*m+w,ht=X.y*m+N;T.position.set(j,ht),T.scale.set(X.r/50),T.alpha=1;const A=Ft(X.color);if(O&&!v){const J=V.has(X.id);T.tint=J?A:mt(A,p(a),d)}else{const J=X===v,Dt=_&&Q.has(X.id),$e=k!==null&&(k==="other"?_t(X.type)===Ct:X.type===k);if(J&&M>.01)T.tint=A,T.scale.set(X.r*(1+M*.4)/50);else if(Dt)T.tint=A;else if(k!==null)T.tint=$e?A:mt(A,p(a),d);else if(G!==null){const Zt=G.has(X.id)?M*d:d;T.tint=mt(A,p(a),Zt)}else if(Y!==null){const Zt=Y.has(X.id)?M*d:d;T.tint=mt(A,p(a),Zt)}else T.tint=mt(A,p(a),M*d)}}const nt=v??O,ft=v?M>.01:!!O;if(nt&&ft&&H){H.visible=!0;const X=nt.x*m+w,T=nt.y*m+N;H.position.set(X,T),H.scale.set(nt.r*5/64),H.alpha=v?M*.25:.25,H.tint=Ft(nt.color)}else H&&(H.visible=!1);const F=v??O,vt=v?M>.01:!!O;if(F&&vt&&K){const X=F.x*m+w,T=F.y*m+N;K.text=c(F.id),K.style.fontSize=12,K.position.set(X,T+F.r+8),K.alpha=v?M:1,K.visible=!0}else K&&(K.visible=!1)}let Ot=!1;function Ge(v){if(v.button!==0)return;Ot=!1;const _=Ht(v.clientX,v.clientY),M=he(_.x,_.y);M?(P=M,rt=!0,M.fx=M.x,M.fy=M.y,f?.alphaTarget(.3).restart(),tt()):(ot($,!0),B=v.clientX,Z=v.clientY,W=w,ct=N),x.setPointerCapture(v.pointerId),window.addEventListener("pointerup",Kt,{once:!0})}function Ye(v){if(P){Ot=!0;const _=Ht(v.clientX,v.clientY);P.fx=_.x,P.fy=_.y,tt()}else if(p($))Ot=!0,w=W+(v.clientX-B),N=ct+(v.clientY-Z),tt();else{const _=Ht(v.clientX,v.clientY),M=he(_.x,_.y);M?M!==z?(z&&(I=.15),z=M,Xt(),b=1,x.style.cursor="pointer",tt()):b!==1&&(b=1,x.style.cursor="pointer",tt()):b!==0&&(b=0,x.style.cursor="grab",tt())}}function Kt(v){if(!P&&!p($))return;window.removeEventListener("pointerup",Kt);const _=Ot;if(P){const M=P;P.fx=null,P.fy=null,f?.alphaTarget(0),P=null,b=0,tt(),_||en(`/${M.repo}/${M.type}/${M.id}`)}else p($)&&ot($,!1);try{x.releasePointerCapture(v.pointerId)}catch{}}const Ct="#5c5c66",je="#b0b0b8",Bt=et(()=>o.current==="light"?je:Ct),We=et(()=>{const v=new Map;for(const k of e.graphData.nodes)v.set(k.type,(v.get(k.type)??0)+1);const _=[];let M=0;for(const[k,G]of v){const Y=_t(k);Y===Ct?M+=G:_.push({name:k,color:Y,count:G})}return _.sort((k,G)=>G.count-k.count),M>0&&_.push({name:"other",color:p(Bt),count:M}),_});De(async()=>{q=await qe(()=>import("../chunks/BaUG0bh_.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),D=new q.Application,await D.init({antialias:!0,resolution:window.devicePixelRatio||1,autoDensity:!0,backgroundAlpha:0,resizeTo:x}),x.insertBefore(D.canvas,x.firstChild),D.canvas.style.position="absolute",D.canvas.style.inset="0",S=new q.Graphics,D.stage.addChild(S),U=new q.Graphics,D.stage.addChild(U),R=new q.Container,D.stage.addChild(R);const v=document.createElement("canvas");v.width=128,v.height=128;const _=v.getContext("2d"),M=_.createRadialGradient(64,64,0,64,64,64);M.addColorStop(0,"rgba(255,255,255,0.5)"),M.addColorStop(1,"rgba(255,255,255,0)"),_.fillStyle=M,_.fillRect(0,0,128,128);const k=q.Texture.from(v);H=new q.Sprite(k),H.anchor.set(.5),H.visible=!1,D.stage.addChild(H);const G=document.createElement("canvas");G.width=100,G.height=100;const Y=G.getContext("2d");Y.beginPath(),Y.arc(50,50,48,0,Math.PI*2),Y.fillStyle="#ffffff",Y.fill();const O=q.Texture.from(G),V=new Map;for(const A of e.graphData.edges)V.set(A.source,(V.get(A.source)??0)+1),V.set(A.target,(V.get(A.target)??0)+1);const nt=new Map,F=3600*e.graphData.nodes.length,vt=Math.sqrt(F);y=e.graphData.nodes.map(A=>{const J=V.get(A.id)??0,Dt={id:A.id,type:A.type,repo:A.repo,color:_t(A.type)===Ct?p(Bt):_t(A.type),weight:J,x:(Math.random()-.5)*vt,y:(Math.random()-.5)*vt,vx:0,vy:0,r:It(J)};return nt.set(A.id,Dt),Dt});for(const A of y){const J=new q.Sprite(O);J.anchor.set(.5),J.tint=Ft(A.color),R.addChild(J),L.set(A.id,J)}K=new q.Text({text:"",style:{fontFamily:"Inter, system-ui, sans-serif",fontWeight:"500",fontSize:12,fill:p(h).labelText,align:"center"}}),K.anchor.set(.5,0),K.visible=!1,D.stage.addChild(K);const X=e.graphData.edges.map(A=>({source:A.source,target:A.target})),T=ye(X).id(A=>A.id).distance(250);f=_e(y).force("link",T).force("charge",Me().strength(-1e3).distanceMin(30)).force("x",be(0).strength(.1)).force("y",Te(0).strength(.1)).force("collide",ve().radius(60).strength(.5)).velocityDecay(.4).alpha(1).on("tick",()=>{rt||Vt(),tt()}),u=T.links();let j=0;D.ticker.add(()=>{const A=performance.now(),J=j?Math.min((A-j)/1e3,.05):.016;j=A,I<b?(I=Math.min(b,I+E*J),l=!0):I>b&&(I=Math.max(b,I-E*J),l=!0),I===0&&b===0&&z&&!P&&(z=null,Xt(),l=!0),(l||g<120)&&(Oe(),Be(),l=!1,g++)});const ht=new ResizeObserver(()=>{D.renderer.resize(x.clientWidth,x.clientHeight),Vt()});return ht.observe(x),()=>{ht.disconnect()}}),He(()=>{f?.stop(),D&&(D.destroy(!0,{children:!0}),D=null)});var Qt=Fn(),wt=ut(Qt);let de;var Jt=ut(wt);ne(Jt,21,()=>p(We),ie,(v,_)=>{var M=Xn();let k;var G=ut(M);let Y;var O=dt(G,2),V=ut(O,!0);it(O);var nt=dt(O,2),ft=ut(nt,!0);it(nt),it(M),At(()=>{k=tn(M,1,"legend-item svelte-1i33fky",null,k,{"legend-item-active":p(xt)===p(_).name}),Y=zt(G,"",Y,{background:p(_).color}),Rt(V,p(_).name),Rt(ft,p(_).count)}),te("mouseenter",M,()=>{ot(xt,p(_).name,!0),tt()}),te("mouseleave",M,()=>{ot(xt,null),tt()}),gt(v,M)}),it(Jt),it(wt),Ne(wt,v=>x=v,()=>x),it(Qt),At(()=>de=zt(wt,"",de,{cursor:p($)?"grabbing":"grab"})),Mt("pointerdown",wt,Ge),Mt("pointermove",wt,Ye),Mt("pointerup",wt,Kt),Mt("pointerdown",Jt,v=>v.stopPropagation()),gt(t,Qt),le()}Ie(["pointerdown","pointermove","pointerup"]);function Bn(t,e){const n=Ae(e,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"}]];Pe(t,ze({name:"play"},()=>n,{get iconNode(){return i},children:(r,s)=>{var c=ae(),o=ce(c);Se(o,e,"default",{}),gt(r,c)},$$slots:{default:!0}}))}function Gn(t,e){const n=Ae(e,["children","$$slots","$$events","$$legacy"]);const i=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"}]];Pe(t,ze({name:"pause"},()=>n,{get iconNode(){return i},children:(r,s)=>{var c=ae(),o=ce(c);Se(o,e,"default",{}),gt(r,c)},$$slots:{default:!0}}))}var Yn=Tt('<div class="density-bar svelte-lzvab"></div>'),jn=Tt('<span class="date-label svelte-lzvab"> </span>'),Wn=Tt('<div class="timeline-tooltip svelte-lzvab"><div class="tooltip-date svelte-lzvab"> </div> <div class="tooltip-count svelte-lzvab"> </div></div>'),$n=Tt('<div class="timeline-bar svelte-lzvab"><!> <div class="timeline-track svelte-lzvab"><div class="track-line svelte-lzvab"></div> <div class="density-bars svelte-lzvab"></div> <div class="playhead svelte-lzvab"></div> <div class="date-labels svelte-lzvab"></div> <!></div></div>');function Un(t,e){se(e,!0);let n=pt(null),i=pt(0),r=pt(!1),s=pt(!1),c=pt(null),o=null;const h=et(()=>{let I=1/0,b=-1/0;for(const E of e.entities){const D=E.createdAt?new Date(E.createdAt).getTime():0;D>0&&D<I&&(I=D),D>b&&(b=D)}return I===1/0&&(I=Date.now()),b===-1/0&&(b=Date.now()),{min:I,max:b}}),a=et(()=>{let{min:I,max:b}=p(h);return b-I<864e5&&(I-=864e5*15,b+=864e5*15),{min:new Date(I),max:new Date(b)}}),d=et(()=>{const b=p(a).min.getTime(),E=p(a).max.getTime(),D=new Map;for(const S of e.entities){const U=S.createdAt?new Date(S.createdAt).getTime():0;if(U<=0)continue;const R=Math.floor((U-b)/864e5),L=b+R*864e5,H=D.get(L)??[];H.push(S),D.set(L,H)}return{map:D,minTime:b,maxTime:E,dayMs:864e5}}),C=et(()=>{let I=0;for(const b of p(d).map.values())b.length>I&&(I=b.length);return Math.max(1,I)}),x=et(()=>{const{minTime:I,maxTime:b}=p(d),E=b-I,D=[],S=Math.max(4,Math.min(8,Math.floor(p(i)/100))),U=E/S;for(let R=0;R<=S;R++){const L=I+R*U,K=new Date(L).toLocaleDateString("en-US",{month:"short",day:"numeric"});D.push({label:K,x:R/S})}return D}),f=et(()=>{const{minTime:I,maxTime:b}=p(d),E=b-I;if(E<=0)return .5;const D=e.currentDate?e.currentDate.getTime():p(h).max,S=Math.max(p(h).min,Math.min(p(h).max,D));return Math.max(0,Math.min(1,(S-I)/E))});function y(I){if(!p(n))return new Date;const b=p(n).getBoundingClientRect(),E=40,S=b.width-E-12,U=Math.max(0,Math.min(1,(I-b.left-E)/S)),{minTime:R,maxTime:L}=p(d),H=R+U*(L-R);return new Date(Math.max(p(h).min,Math.min(p(h).max,H)))}function u(I){ot(r,!0),z();const b=y(I.clientX);e.onDateChange(b),I.target.setPointerCapture(I.pointerId)}function l(I){if(p(r)&&e.onDateChange(y(I.clientX)),!p(n))return;const b=p(n).getBoundingClientRect(),E=40,S=b.width-E-12,U=(I.clientX-b.left-E)/S;if(U<0||U>1){ot(c,null);return}const{minTime:R,dayMs:L,map:H}=p(d),K=R+U*(p(d).maxTime-R),q=R+Math.floor((K-R)/L)*L,It=H.get(q);It&&It.length>0?ot(c,{date:new Date(q),count:It.length,x:I.clientX-b.left},!0):ot(c,null)}function g(){ot(r,!1)}function w(){ot(c,null)}function N(){p(s)?z():m()}function m(){ot(s,!0);const{min:I,max:b}=p(h),D=(b-I)/200;let S=e.currentDate?.getTime()??I;S>=b&&(S=I),o=setInterval(()=>{if(S+=D,S>=b){e.onDateChange(null),z();return}e.onDateChange(new Date(S))},50)}function z(){ot(s,!1),o&&(clearInterval(o),o=null)}De(()=>{if(p(n)){const I=new ResizeObserver(b=>{ot(i,b[0]?.contentRect.width??0,!0)});return I.observe(p(n)),()=>I.disconnect()}});var P=$n(),$=ut(P);{let I=et(()=>p(s)?"Pause":"Play");nn($,{variant:"ghost",size:"icon",class:"play-btn",onclick:N,get title(){return p(I)},children:(b,E)=>{var D=ae(),S=ce(D);{var U=L=>{Gn(L,{size:14})},R=L=>{Bn(L,{size:14})};ee(S,L=>{p(s)?L(U):L(R,!1)})}gt(b,D)},$$slots:{default:!0}})}var B=dt($,2),Z=dt(ut(B),2);ne(Z,21,()=>Array.from(p(d).map.entries()),ie,(I,b)=>{var E=et(()=>Ve(p(b),2));let D=()=>p(E)[0],S=()=>p(E)[1];const U=et(()=>(D()-p(d).minTime)/(p(d).maxTime-p(d).minTime)),R=et(()=>S().length/p(C)),L=et(()=>.05+.95*p(R)*p(R));var H=Yn();let K;At(()=>K=zt(H,"",K,{left:`${p(U)*100}%`,opacity:p(L)})),gt(I,H)}),it(Z);var W=dt(Z,2);let ct;var Q=dt(W,2);ne(Q,21,()=>p(x),ie,(I,b)=>{var E=jn();let D;var S=ut(E,!0);it(E),At(()=>{D=zt(E,"",D,{left:`${p(b).x*100}%`}),Rt(S,p(b).label)}),gt(I,E)}),it(Q);var rt=dt(Q,2);{var xt=I=>{var b=Wn();let E;var D=ut(b),S=ut(D,!0);it(D);var U=dt(D,2),R=ut(U);it(U),it(b),At(L=>{E=zt(b,"",E,{left:`${p(c).x??""}px`}),Rt(S,L),Rt(R,`${p(c).count??""} ${p(c).count===1?"entity":"entities"}`)},[()=>p(c).date.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]),gt(I,b)};ee(rt,I=>{p(c)&&!p(r)&&I(xt)})}it(B),it(P),Ne(P,I=>ot(n,I),()=>p(n)),At(()=>ct=zt(W,"",ct,{left:`${p(f)*100}%`})),Mt("pointerdown",B,u),Mt("pointermove",B,l),Mt("pointerup",B,g),te("pointerleave",B,w),gt(t,P),le()}Ie(["pointerdown","pointermove","pointerup"]);var Hn=Tt('<div class="content-row svelte-315y67"><div class="graph-area svelte-315y67"><!> <!> <!></div> <!></div>');function oi(t,e){se(e,!0);const n=Ce("chat");qt.showGraph();let i=pt(null);const r=et(()=>{const o=new Map;for(const h of Yt.repos)for(const a of h.entities)o.set(a.id,a.title);return o}),s=et(()=>{const o=[];for(const h of Yt.repos)for(const a of h.entities)a.id.toLowerCase().startsWith("readme")||o.push(a);return o}),c=et(()=>{const o=[],h=[],a=new Set,d=new Set,C=p(i)?.getTime()??1/0;for(const f of Yt.repos)for(const y of f.entities){if(y.id.toLowerCase().startsWith("readme")||a.has(y.id)||(y.createdAt?new Date(y.createdAt).getTime():0)>C)continue;a.add(y.id),o.push({id:y.id,type:y.entityType,repo:f.name});const l=y.wikilinks??[];for(const g of l){const w=y.id<g?`${y.id}|${g}`:`${g}|${y.id}`;!d.has(w)&&y.id!==g&&(d.add(w),h.push({source:y.id,target:g}))}}const x=h.filter(f=>a.has(f.source)&&a.has(f.target));return{nodes:o,edges:x}});Ke(t,{children:(o,h)=>{var a=Hn(),d=ut(a),C=ut(d);Qe(C,{activeView:"graph"});var x=dt(C,2);On(x,{get graphData(){return p(c)},get selectedEntityId(){return qt.selectedId},get nameMap(){return p(r)},get filteredIds(){return Yt.filteredIds},get sidebarHoveredId(){return qt.hoveredEntityId},get highlightedIds(){return Je.highlightedIds}});var f=dt(x,2);Un(f,{get entities(){return p(s)},get currentDate(){return p(i)},onDateChange:l=>{ot(i,l,!0)}}),it(d);var y=dt(d,2);{var u=l=>{Ze(l,{})};ee(y,l=>{n.open&&l(u)})}it(a),gt(o,a)},$$slots:{default:!0}}),le()}export{oi as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as C,a as x,f as q,t as G,s as y}from"../chunks/0x0awhVy.js";import{q as H,A as w,v as J,B as K,D as l,x as r,F as v,w as a,$ as L,z as t,g as i,y as M}from"../chunks/8FUQuwgM.js";import{i as N}from"../chunks/CbJfRYJV.js";import{h as O}from"../chunks/C7R6dA2m.js";import{g as Q}from"../chunks/CIZkRAuY.js";import{a as R,w as $}from"../chunks/EDLlAC9C.js";import{I as S,B as U}from"../chunks/BVmVTxxa.js";var V=q('<p class="error-msg svelte-1x05zx6"> </p>'),W=q('<div class="login-page svelte-1x05zx6"><div class="login-card svelte-1x05zx6"><div class="logo svelte-1x05zx6"><div class="logo-icon svelte-1x05zx6">S</div> <span class="logo-text svelte-1x05zx6"> </span></div> <form class="svelte-1x05zx6"><label class="field svelte-1x05zx6"><span class="field-label svelte-1x05zx6">Email</span> <!></label> <label class="field svelte-1x05zx6"><span class="field-label svelte-1x05zx6">Password</span> <!></label> <!> <!></form></div></div>');function re(B,I){H(I,!0);let g=v(""),b=v(""),n=v(""),u=v(!1);async function P(e){e.preventDefault();const s=e.currentTarget,o=s.querySelector('input[type="email"]').value,T=s.querySelector('input[type="password"]').value;l(n,""),l(u,!0);try{await R.login(o,T),Q("/")}catch(j){l(n,j.message||"Invalid credentials",!0)}finally{l(u,!1)}}var p=W();O("1x05zx6",e=>{K(()=>{L.title=`Sign in — ${($.name||"Studiograph")??""}`})});var _=a(p),d=a(_),z=r(a(d),2),k=a(z,!0);t(z),t(d);var c=r(d,2),m=a(c),D=r(a(m),2);S(D,{type:"email",required:!0,autocomplete:"email",autofocus:!0,class:"field-input",get value(){return i(g)},set value(e){l(g,e,!0)}}),t(m);var f=r(m,2),E=r(a(f),2);S(E,{type:"password",required:!0,autocomplete:"current-password",class:"field-input",get value(){return i(b)},set value(e){l(b,e,!0)}}),t(f);var h=r(f,2);{var A=e=>{var s=V(),o=a(s,!0);t(s),w(()=>y(o,i(n))),x(e,s)};N(h,e=>{i(n)&&e(A)})}var F=r(h,2);U(F,{variant:"accent",type:"submit",class:"submit-btn",get disabled(){return i(u)},children:(e,s)=>{M();var o=G("Sign in");x(e,o)},$$slots:{default:!0}}),t(c),t(_),t(p),w(()=>y(k,$.name||"Studiograph")),C("submit",c,P),x(B,p),J()}export{re as component};
|